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


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
Methods

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:
ruler A pointer to a GtkRuler.
owns_reference Set 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

MetricType Xfc::Gtk::Ruler::get_metric  )  const
 

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:
lower The location to store lower limit of the ruler, or null.
upper The location to store upper limit of the ruler, or null.
position The location to store the current position of the mark on the ruler, or null.
max_size The location to store the maximum size of the ruler used when calculating the space to leave for the text, or null.

void Xfc::Gtk::Ruler::set_metric MetricType  metric  ) 
 

Sets the ruler to the units defined.

Parameters:
metric The 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:
lower The upper limit of the ruler.
upper The lower limit of the ruler.
position The mark on the ruler.
max_size The 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 4.3