Main Page | Class Hierarchy | Alphabetical List | Class List | Directories | Class Members | Related Pages

PlotMM::VScaleLabels Class Reference

Inheritance diagram for PlotMM::VScaleLabels:

Inheritance graph
[legend]
Collaboration diagram for PlotMM::VScaleLabels:
[legend]
List of all members.

Detailed Description

Class to draw vertical scale labels.


Public Member Functions

 VScaleLabels (Gtk::PositionType p)
virtual ~VScaleLabels ()
Pango::FontDescription * font ()
void set_labels (int offs, const std::map< int, double > &labels)
void set_enabled (bool b)
bool enabled () const
Glib::ustring format (double) const
int text_width (const Glib::ustring &) const
int text_height (const Glib::ustring &) const
Gtk::PositionType position () const

Protected Member Functions

virtual bool on_expose_event (GdkEventExpose *event)
virtual void update_ ()
virtual void requestsize_ ()
virtual void newsize_ ()

Protected Attributes

int offset_
int layw_
int layh_
int range_
std::map< int, double > labels_
Glib::RefPtr< Pango::Layout > layout_
Pango::FontDescription font_


Constructor & Destructor Documentation

VScaleLabels::VScaleLabels Gtk::PositionType  p  ) 
 

Constructor

VScaleLabels::~VScaleLabels  )  [virtual]
 

Destructor


Member Function Documentation

bool PlotMM::ScaleLabels::enabled  )  const [inherited]
 

Return if the labels are enabled.

Pango::FontDescription* PlotMM::ScaleLabels::font  )  [inherited]
 

Return a pointer to the labels' font.

Glib::ustring ScaleLabels::format double  d  )  const [inherited]
 

Format a string from a double value

Todo:
find a smart way to user-define scale label formatting

Gtk::PositionType PlotMM::ScaleLabels::position  )  const [inherited]
 

Return where the labels are positioned.

void ScaleLabels::set_enabled bool  b  )  [inherited]
 

Enable drawing of scalelabels

See also:
newsize_ (called automatically)

void ScaleLabels::set_labels int  offs,
const std::map< int, double > &  labels
[inherited]
 

Set the labels to be drawn

The given map holds double values associated with int positions on a scale. The given offs can be taken as a hint to calculate the right positions for the labels. Normally, the leftmost or upmost border of the scale's Gdk::Window is taken for this offset.

See also:
newsize_ (called automatically)

int ScaleLabels::text_height const Glib::ustring &  str  )  const [inherited]
 

Query the pixel height of the given text when rendered with the current font() settings

int ScaleLabels::text_width const Glib::ustring &  str  )  const [inherited]
 

Query the pixel width of the given text when rendered with the current font() settings


Generated on Thu Nov 10 15:26:23 2005 for PlotMM by  doxygen 1.4.4