gtkmm 2.24.4

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions | Protected Member Functions | Related Functions

# Gtk::Ruler Class Reference
Widgets

Base class for horizontal or vertical rulers. More...

Inheritance diagram for Gtk::Ruler:
[legend]
Collaboration diagram for Gtk::Ruler:
[legend]

List of all members.

## Public Member Functions
virtual | ~Ruler ()
GtkRuler* | gobj ()
| Provides access to the underlying C GtkObject.
const GtkRuler* | gobj () const
| Provides access to the underlying C GtkObject.
void | set_metric (MetricType metric=PIXELS)
| Sets the desired metric of the ruler.
MetricType | get_metric () const
| Gets the units used for a Gtk::Ruler.
MetricType | get_metric ()
| Gets the units used for a Gtk::Ruler.
double | get_range_lower () const
double | get_range_upper () const
void | set_range (double lower, double upper, double position, double max_size)
| sets the range of the ruler.
void | get_range (double& lower, double& upper, double& position, double& max_size)
| Retrieves values indicating the range and current position of a Gtk::Ruler.
void | draw_ticks ()
| draw tick marks on the ruler
void | draw_pos ()
| draw a position indicator on the ruler
virtual void | draw_ticks_vfunc ()
virtual void | draw_pos_vfunc ()
Glib::PropertyProxy< double > | property_lower ()
| Lower limit of ruler.
Glib::PropertyProxy_ReadOnly < double > | property_lower () const
| Lower limit of ruler.
Glib::PropertyProxy< double > | property_upper ()
| Upper limit of ruler.
Glib::PropertyProxy_ReadOnly < double > | property_upper () const
| Upper limit of ruler.
Glib::PropertyProxy< double > | property_position ()
| Position of mark on the ruler.
Glib::PropertyProxy_ReadOnly < double > | property_position () const
| Position of mark on the ruler.
Glib::PropertyProxy< double > | property_max_size ()
| Maximum size of the ruler.
Glib::PropertyProxy_ReadOnly < double > | property_max_size () const
| Maximum size of the ruler.
Glib::PropertyProxy< MetricType > | property_metric ()
| The metric used for the ruler.
Glib::PropertyProxy_ReadOnly < MetricType > | property_metric () const
| The metric used for the ruler.
## Protected Member Functions
| Ruler ()
## Related Functions
(Note that these are not member functions.)
Gtk::Ruler* | wrap (GtkRuler* object, bool take_copy=false)
| A Glib::wrap() method for this object.

## Detailed Description

Base class for horizontal or vertical rulers.

NOTE this widget is considered too specialized/little-used for GTK+, and will in the future be moved to some other package. If your application needs this widget, feel free to use it, as the widget does work and is useful in some applications; it's just not of general interest. However, we are not accepting new features for the widget, and it will eventually move out of the GTK+ distribution. Rulers are used to show the mouse pointer's location in a window. The ruler can either be horizontal or vertical. Within the ruler a small triangle indicates the location of the mouse relative to the horixontal or vertical ruler.

This is an abstract base for Gtk::HRuler and Gtk::VRuler. Users should only instantiate those types.

Deprecated:
  This has been removed from gtkmm-3.0 because it was unmaintained and too specialized. There is no replacement other than using the original GtkRuler and Gtk::Ruler source files in your application.

## Constructor & Destructor Documentation

virtual Gtk::Ruler::~Ruler | ( |  | ) | `[virtual]`

Gtk::Ruler::Ruler | ( |  | ) | `[protected]`

## Member Function Documentation

void Gtk::Ruler::draw_pos | ( |  | ) |

draw a position indicator on the ruler

virtual void Gtk::Ruler::draw_pos_vfunc | ( |  | ) | `[virtual]`

void Gtk::Ruler::draw_ticks | ( |  | ) |

draw tick marks on the ruler

virtual void Gtk::Ruler::draw_ticks_vfunc | ( |  | ) | `[virtual]`

MetricType Gtk::Ruler::get_metric | ( |  | ) | const

Gets the units used for a Gtk::Ruler.

See set_metric().

Returns:
  The units currently used for ruler

Deprecated: 2.24: Gtk::Ruler has been removed from GTK 3 for being unmaintained and too specialized. There is no replacement.

MetricType Gtk::Ruler::get_metric | ( |  | ) |

Gets the units used for a Gtk::Ruler.

See set_metric().

Deprecated:
  Use the const version

Returns:
  The units currently used for ruler

Deprecated: 2.24: Gtk::Ruler has been removed from GTK 3 for being unmaintained and too specialized. There is no replacement.

void Gtk::Ruler::get_range | ( | double & | lower,
|  | double & | upper,
|  | double & | position,
|  | double & | max_size
| ) |  |

Retrieves values indicating the range and current position of a Gtk::Ruler.

See set_range().

Deprecated: 2.24: Gtk::Ruler has been removed from GTK 3 for being unmaintained and too specialized. There is no replacement.

Parameters:

  lower | Location to store lower limit of the ruler, or `0`.
  upper | Location to store upper limit of the ruler, or `0`.
  position | Location to store the current position of the mark on the ruler, or `0`.
  max_size | Location to store the maximum size of the ruler used when calculating the space to leave for the text, or `0`.

double Gtk::Ruler::get_range_lower | ( |  | ) | const

Deprecated:
  Use get_range() instead.

double Gtk::Ruler::get_range_upper | ( |  | ) | const

Deprecated:
  Use get_range() instead.

const GtkRuler* Gtk::Ruler::gobj | ( |  | ) | const`[inline]`

Provides access to the underlying C GtkObject.

Reimplemented from Gtk::Widget.

Reimplemented in Gtk::VRuler, and Gtk::HRuler.

GtkRuler* Gtk::Ruler::gobj | ( |  | ) | `[inline]`

Provides access to the underlying C GtkObject.

Reimplemented from Gtk::Widget.

Reimplemented in Gtk::VRuler, and Gtk::HRuler.

Glib::PropertyProxy<double> Gtk::Ruler::property_lower | ( |  | ) |

Lower limit of ruler.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
  A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy_ReadOnly<double> Gtk::Ruler::property_lower | ( |  | ) | const

Lower limit of ruler.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
  A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy<double> Gtk::Ruler::property_max_size | ( |  | ) |

Maximum size of the ruler.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
  A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy_ReadOnly<double> Gtk::Ruler::property_max_size | ( |  | ) | const

Maximum size of the ruler.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
  A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy<MetricType> Gtk::Ruler::property_metric | ( |  | ) |

The metric used for the ruler.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
  A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy_ReadOnly<MetricType> Gtk::Ruler::property_metric | ( |  | ) | const

The metric used for the ruler.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
  A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy_ReadOnly<double> Gtk::Ruler::property_position | ( |  | ) | const

Position of mark on the ruler.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
  A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy<double> Gtk::Ruler::property_position | ( |  | ) |

Position of mark on the ruler.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
  A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy_ReadOnly<double> Gtk::Ruler::property_upper | ( |  | ) | const

Upper limit of ruler.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
  A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy<double> Gtk::Ruler::property_upper | ( |  | ) |

Upper limit of ruler.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
  A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

void Gtk::Ruler::set_metric | ( | MetricType | metric = `PIXELS` | ) |

Sets the desired metric of the ruler.

The possible choices are:

- Gtk::PIXELS
- Gtk::INCHES
- Gtk::CENTIMETERS

The default metric is Gtk::PIXELS.

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

sets the range of the ruler.

upper and lower arguments denote the extents of the Ruler. max_size is the largest number displayed by the ruler. position gives the initial value of the ruler. Rulers do not have sane defaults so this function should always be called.

## Friends And Related Function Documentation

Gtk::Ruler* wrap | ( | GtkRuler * | object,
|  | bool | take_copy = `false`
| ) |  | `[related]`

A Glib::wrap() method for this object.

Parameters:

  object | The C instance.
  take_copy | False if the result should take ownership of the C instance. True if it should take a new copy or ref.

Returns:
  A C++ instance that wraps this C instance.

The documentation for this class was generated from the following file:

- gtkmm/ruler.h