Public Member Functions | |
HScaleLabels (Gtk::PositionType p) | |
virtual | ~HScaleLabels () |
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 |
|
Return if the labels are enabled.
|
|
Return a pointer to the labels' font.
|
|
Format a string from a double value
|
|
Return where the labels are positioned.
|
|
Enable drawing of scalelabels
|
|
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.
|
|
Query the pixel height of the given text when rendered with the current font() settings |
|
Query the pixel width of the given text when rendered with the current font() settings |