Public Member Functions | |
Scale (Gtk::PositionType p, ScaleLabels *labels=0) | |
virtual | ~Scale () |
void | set_position (Gtk::PositionType p) |
Gtk::PositionType | position () const |
void | set_ticklengths (int major, int minor) |
int | major_ticklength () const |
int | minor_ticklength () const |
void | set_enabled (bool b) |
bool | enabled () const |
const DoubleIntMap & | scale_map () const |
void | set_range (double l, double r) |
void | set_range (double l, double r, bool lg) |
void | set_autoscale (bool b) |
bool | autoscale () const |
void | begin_autoscale () |
void | autoscale (double min, double max) |
void | end_autoscale () |
Public Attributes | |
SigC::Signal1< void, bool > | signal_enabled |
Protected Member Functions | |
virtual void | on_realize () |
virtual bool | on_expose_event (GdkEventExpose *event) |
virtual void | on_tick_change () |
virtual void | redraw ()=0 |
Protected Attributes | |
Glib::RefPtr< Gdk::GC > | gc_ |
Glib::RefPtr< Gdk::Window > | window_ |
Glib::RefPtr< Gdk::Window > | labwin_ |
ScaleLabels * | labels_ |
ScaleDiv | scaleDiv_ |
DoubleIntMap | scaleMap_ |
|
Constructor Upon construction, the position for the Scale must be declared. Optionally, a reference to a ScaleLabels instance can be provided to allow for automatic label generation. If the labels are actually shown can be set with ScaleLabels::set_enabled() |
|
Destructor |
|
Add autoscale information The given minimum and maximum value extend the current autoscale information. Call end_autoscale() when finished. |
|
Query if autoscaling is enabled.
|
|
Reset autoscale information Before updating autoscale information with autoscale(min,max), begin_autoscale must be called to reset the old autoscale information. Call end_autoscale() when finished. |
|
Query if the scale is enabled (i.e. visible).
|
|
Finish update of autoscale information After updating autoscale information with autoscale(min,max) this function sets the new range of values.
|
|
Return the major ticklength.
|
|
Return the minor ticklength.
|
|
Handles an expose event |
|
Do the necessary initializations when window is realized. |
|
implement this to react on changes of tick lengths Reimplemented in PlotMM::VScale, and PlotMM::HScale. |
|
Return where the scale is positioned.
|
|
Query the ScaleMap used by this scale.
|
|
Turn on autoscaling |
|
Enable drawing of scales If scale drawing is disabled, no space will be occupied and nothing will be displayed. If a ScaleLabels instance was specified, the ScaleLabels will also be disabled. To re-enable Scale and ScaleLabels drawing, call this function with true. |
|
Change the position of the Scale (may not work)
|
|
Set the range of double values the scale represents. To make the scale logarithmic, true can be given as the third argument. After setting the new range, the scale is redrawn. |
|
Set the range of double values the scale represents. To make the scale logarithmic, true can be given as the third argument. After setting the new range, the scale is redrawn. |
|
Set the length of major and minor ticks |
|
This signal is thrown whenever the scale is enabled or disabled
|