Reference Manual

Main Page | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Namespace Members | Compound Members | File Members

# Inti::Gtk::Ruler Class Reference

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

`#include <inti/gtk/ruler.h>`

Inheritance diagram for Inti::Gtk::Ruler:

List of all members.

## Public Member Functions

Accessors

- GtkRuler * gtk_ruler () const
    Get a pointer to the GtkRuler structure.
- GtkRulerClass * gtk_ruler_class () const
    Get a pointer to the GtkRulerClass structure.
- operator GtkRuler * () const
    Conversion operator; safely converts a Ruler to a GtkRuler pointer.
- MetricType get_metric () const
    Gets the units used for a Ruler (see gtk_ruler_set_metric()).
- double get_lower () const
    Gets the lower limit of the ruler.
- double get_upper () const
    Gets the upper limit of the ruler.
- double get_position () const
    Gets the current position of the mark on the ruler.
- void 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()).

Methods

- void set_metric (MetricType metric=PIXELS)
    Sets the ruler to the units defined.
- void set_range (double lower, double upper, double position, double max_size)
    Sets the range of the ruler using lower, upper, position, and max_size.
- void draw_ticks ()
    Draws the tick marks on the ruler.
- void draw_pos ()
    Draws the position mark on the ruler.

Property Proxies

- const LowerPropertyProxy prop_lower ()
    Lower limit of the ruler (double : Read / Write).
- const UpperPropertyProxy prop_upper ()
    Upper limit of ruler (double : Read / Write).
- const PositionPropertyProxy prop_position ()
    Position of the mark on the ruler (double : Read / Write).
- const MaxSizePropertyProxy prop_max_size ()
    Maximum size of the ruler (double : Read / Write).

## Protected Member Functions

Constructors

- Ruler ()
    Construct a new Ruler.
- Ruler (GtkRuler *ruler, bool reference=false)
    Construct a new Ruler from an existing GtkRuler.
- virtual ~Ruler ()=0
    Destructor.

## 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.

## Constructor & Destructor Documentation

Inti::Gtk::Ruler::Ruler | ( | GtkRuler * | ruler,
|  | bool | reference = false
| ) | `[explicit, protected]`

  | Construct a new Ruler from an existing GtkRuler. Parameters:
  ruler | A pointer to a GtkRuler.
  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 Inti::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 Inti::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 Inti::Gtk::Ruler::set_metric | ( | MetricType | metric = PIXELS | ) |

  | 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 Inti::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:

- ruler.h

Main Page - Footer