Class Index Cross Index Namespace Index

Class Gtk::Ruler

Abstract Ruler
Contained in: Gtk
Derived from: 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);
GTK_PIXELS, GTK_INCHES, or GTK_CENTIMETERS. 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);
upper, lower: The extents of the Ruler.

max_size: The largest number displayed by the ruler.

position: The initial value of the ruler.

Rulers do not have sane defaults so this function should always be called.