Class Index Cross Index Namespace Index

Class Gtk::Ruler

Abstract Ruler
Contained in: Gtk
Derived from: Gtk::Widget
Derived by: Gtk::HRuler Gtk::VRuler

#include <gtk--/ruler.h>


public function member index:

void draw_pos();
void draw_ticks();
GtkMetricType get_metric() const;
gfloat get_range_lower() const;
gfloat get_range_upper() const;
GtkRuler* gtkobj();
const GtkRuler* gtkobj() const;
static bool isA(Object* object);
void set_metric(GtkMetricType metric=GTK_PIXELS);
void set_range(gfloat lower, gfloat upper, gfloat position, gfloat max_size);
virtual ~Ruler();
 

protected function member index:

Ruler();
 

Description:

Ruler is an abstraction used as the base for Gtk_HRuler and Gtk_VRuler. Users should only instantiate those types.


Function Member Descriptions:

Gtk::Ruler::draw_pos - draw a position indicator on the ruler

void draw_pos();

Gtk::Ruler::draw_ticks - draw tick marks on the ruler

void draw_ticks();

Gtk::Ruler::get_metric - Gets the metric of the ruler.

GtkMetricType get_metric() const;

Gtk::Ruler::gtkobj - Returns the underlaying gtk+ object.

GtkRuler* gtkobj();

Gtk::Ruler::isA - Returns true if object is this type.

static bool isA(Object* object);

Gtk::Ruler::set_metric - Sets the desired metric of the ruler. The possible choices are:

void set_metric(GtkMetricType metric=GTK_PIXELS);
<ul><li>GTK_PIXELS <li>GTK_INCHES <li>GTK_CENTIMETERS </ul>The default metric is GTK_PIXELS.


Gtk::Ruler::set_range - sets the range of the ruler.

void set_range(gfloat lower, gfloat upper, gfloat position, gfloat max_size);
<i>upper</i> and <i>lower</i> arguments denote the extents of the Ruler. <i>max_size</i> is the largest number displayed by the ruler. <i>position</i> gives the initial value of the ruler. Rulers do not have sane defaults so this function should always be called.