logo top
Main Page   Widgets   Namespaces   Book  

Gtk::Ruler Class Reference
[Widgets]

Base class for horizontal or vertical rulers. More...

Inheritance diagram for Gtk::Ruler:

Inheritance graph
[legend]
List of all members.

Public Member Functions

virtual ~Ruler ()
GtkRuler* gobj ()
 Provides access to the underlying C GtkObject.

const GtkRuler* gobj () const
 Provides access to the underlying C GtkObject.

MetricType get_metric () const
void set_metric (MetricType metric=PIXELS)
 Sets the desired metric of the ruler.

MetricType get_metric ()
double get_range_lower () const
double get_range_upper () const
void set_range (double lower, double upper, double position, double max_size)
 sets the range of the ruler.

void get_range (double& lower, double& upper, double& position, double& max_size)
void draw_ticks ()
 draw tick marks on the ruler

void draw_pos ()
 draw a position indicator on the ruler

Glib::PropertyProxy<double> property_lower ()
Glib::PropertyProxy<double> property_upper ()
Glib::PropertyProxy<double> property_position ()
Glib::PropertyProxy<double> property_max_size ()

Protected Member Functions

virtual void draw_ticks_vfunc ()
virtual void draw_pos_vfunc ()
 Ruler ()

Related Functions

(Note that these are not member functions.)

Gtk::Rulerwrap (GtkRuler* object, bool take_copy=false)

Detailed Description

Base class for horizontal or vertical rulers.

NOTE this widget is considered too specialized/little-used for GTK+, and will in the future be moved to some other package. If your application needs this widget, feel free to use it, as the widget does work and is useful in some applications; it's just not of general interest. However, we are not accepting new features for the widget, and it will eventually move out of the GTK+ distribution. Rulers are used to show the mouse pointer's location in a window. The ruler can either be horizontal or vertical. Within the ruler a small triangle indicates the location of the mouse relative to the horixontal or vertical ruler.

This is an abstract base for Gtk::HRuler and Gtk::VRuler. Users should only instantiate those types.


Constructor & Destructor Documentation

virtual Gtk::Ruler::~Ruler (  )  [virtual]
 

Gtk::Ruler::Ruler (  )  [protected]
 


Member Function Documentation

void Gtk::Ruler::draw_pos (  ) 
 

draw a position indicator on the ruler

virtual void Gtk::Ruler::draw_pos_vfunc (  )  [protected, virtual]
 

void Gtk::Ruler::draw_ticks (  ) 
 

draw tick marks on the ruler

virtual void Gtk::Ruler::draw_ticks_vfunc (  )  [protected, virtual]
 

MetricType Gtk::Ruler::get_metric (  ) 
 

MetricType Gtk::Ruler::get_metric (  )  const
 

void Gtk::Ruler::get_range ( double&  lower,
double&  upper,
double&  position,
double&  max_size
 

double Gtk::Ruler::get_range_lower (  )  const
 

double Gtk::Ruler::get_range_upper (  )  const
 

const GtkRuler* Gtk::Ruler::gobj (  )  const [inline]
 

Provides access to the underlying C GtkObject.

Reimplemented from Gtk::Widget.

Reimplemented in Gtk::VRuler, and Gtk::HRuler.

GtkRuler* Gtk::Ruler::gobj (  )  [inline]
 

Provides access to the underlying C GtkObject.

Reimplemented from Gtk::Widget.

Reimplemented in Gtk::VRuler, and Gtk::HRuler.

Glib::PropertyProxy<double> Gtk::Ruler::property_lower (  ) 
 

Glib::PropertyProxy<double> Gtk::Ruler::property_max_size (  ) 
 

Glib::PropertyProxy<double> Gtk::Ruler::property_position (  ) 
 

Glib::PropertyProxy<double> Gtk::Ruler::property_upper (  ) 
 

void Gtk::Ruler::set_metric ( MetricType  metric = PIXELS  ) 
 

Sets the desired metric of the ruler.

The possible choices are:

The default metric is Gtk::PIXELS.

void Gtk::Ruler::set_range ( double  lower,
double  upper,
double  position,
double  max_size
 

sets the range of the ruler.

upper and lower arguments denote the extents of the Ruler. max_size is the largest number displayed by the ruler. position gives the initial value of the ruler. Rulers do not have sane defaults so this function should always be called.


Friends And Related Function Documentation

Gtk::Ruler* wrap ( GtkRuler*  object,
bool  take_copy = false
[related]
 


The documentation for this class was generated from the following file:
Generated for gtkmm2.2 by Doxygen 1.3.3 © 1997-2001