Xfce Foundation Classes
Main Page  | IndexNamespace List  |  Alphabetical List  |  Class List  |  File List


Public Member Functions
Xfc::Gtk::Ruler Class Reference

A GtkRuler C++ wrapper class. More...

#include <xfc/gtk/ruler.hh>

Inheritance diagram for Xfc::Gtk::Ruler:
Xfc::Gtk::Widget Xfc::Gtk::Object Xfc::Atk::Implementor Xfc::G::Object Xfc::G::TypeInterface Xfc::G::TypeInstance Xfc::G::TypeInstance Xfc::Trackable Xfc::Trackable Xfc::Gtk::HRuler Xfc::Gtk::VRuler

List of all members.

Public Member Functions

Accessors

Protected Member Functions

Constructors

Detailed Description

A GtkRuler C++ wrapper class.

The Ruler widget is a base class for horizontal and vertical rulers. Rulers are used to show the mouse pointer's location in a window. The ruler can either be horizontal or vertical on the window. Within the ruler a small triangle indicates the location of the mouse relative to the horizontal or vertical ruler. See HRuler to learn how to create a new horizontal ruler. See VRuler to learn how to create a new vertical ruler.

See also: the Ruler HOWTO and example.


Constructor & Destructor Documentation

Xfc::Gtk::Ruler::Ruler ( GtkRuler *  ruler,
bool  owns_reference = false 
) [explicit, protected]

Construct a new Ruler from an existing GtkRuler.

Parameters:
rulerA pointer to a GtkRuler.
owns_referenceSet false if the initial reference count is floating, set true if it's not.

The ruler can be a newly created GtkRuler or an existing GtkRuler (see G::Object::Object).


Member Function Documentation

Gets the units used for a Ruler (see gtk_ruler_set_metric()).

Returns:
The units currently used for the ruler.
void Xfc::Gtk::Ruler::get_range ( double *  lower,
double *  upper,
double *  position,
double *  max_size = 0 
)

Retrieves values indicating the range and current position of the ruler (see set_range()).

Parameters:
lowerThe location to store lower limit of the ruler, or null.
upperThe location to store upper limit of the ruler, or null.
positionThe location to store the current position of the mark on the ruler, or null.
max_sizeThe location to store the maximum size of the ruler used when calculating the space to leave for the text, or null.

Sets the ruler to the units defined.

Parameters:
metricThe unit of measurement.

Available units are PIXELS, INCHES, or CENTIMETERS. The default unit of measurement is PIXELS.

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

Sets the range of the ruler using lower, upper, position, and max_size.

Parameters:
lowerThe upper limit of the ruler.
upperThe lower limit of the ruler.
positionThe mark on the ruler.
max_sizeThe maximum size of the ruler.

The documentation for this class was generated from the following file:
Xfce Foundation Classes
Copyright © 2004-2005 The XFC Development Team XFC