## GimpRuler

GimpRuler

## Synopsis

                        GimpRuler;
    void                gimp_ruler_set_unit                 (GimpRuler *ruler,
                                                             GimpUnit unit);
    GimpUnit            gimp_ruler_get_unit                 (GimpRuler *ruler);
    void                gimp_ruler_set_position             (GimpRuler *ruler,
                                                             gdouble position);
    gdouble             gimp_ruler_get_position             (GimpRuler *ruler);
    void                gimp_ruler_set_range                (GimpRuler *ruler,
                                                             gdouble lower,
                                                             gdouble upper,
                                                             gdouble max_size);
    void                gimp_ruler_get_range                (GimpRuler *ruler,
                                                             gdouble *lower,
                                                             gdouble *upper,
                                                             gdouble *max_size);

## Object Hierarchy

      GObject
       +----GInitiallyUnowned
             +----GtkObject
                   +----GtkWidget
                         +----GimpRuler

## Implemented Interfaces

GimpRuler implements AtkImplementorIface and GtkBuildable.

## Properties

      "lower"                    gdouble               : Read / Write
      "max-size"                 gdouble               : Read / Write
      "position"                 gdouble               : Read / Write
      "unit"                     GimpUnit              : Read / Write
      "upper"                    gdouble               : Read / Write

## Description

## Details

### GimpRuler

    typedef struct _GimpRuler GimpRuler;

### gimp_ruler_set_unit ()

    void                gimp_ruler_set_unit                 (GimpRuler *ruler,
                                                             GimpUnit unit);

`ruler` : |
`unit` : |

### gimp_ruler_get_unit ()

    GimpUnit            gimp_ruler_get_unit                 (GimpRuler *ruler);

`ruler` : | a GimpRuler
Returns : | the unit currently used in the `ruler` widget.

Since GIMP 2.8

### gimp_ruler_set_position ()

    void                gimp_ruler_set_position             (GimpRuler *ruler,
                                                             gdouble position);

This sets the position of the ruler.

`ruler` : | a GimpRuler
`position` : | the position to set the ruler to

Since GIMP 2.8

### gimp_ruler_get_position ()

    gdouble             gimp_ruler_get_position             (GimpRuler *ruler);

`ruler` : | a GimpRuler
Returns : | the current position of the `ruler` widget.

Since GIMP 2.8

### gimp_ruler_set_range ()

    void                gimp_ruler_set_range                (GimpRuler *ruler,
                                                             gdouble lower,
                                                             gdouble upper,
                                                             gdouble max_size);

This sets the range of the ruler.

`ruler` : | a GimpRuler
`lower` : | the lower limit of the ruler
`upper` : | the upper limit of the ruler
`max_size` : | the maximum size of the ruler used when calculating the space to leave for the text

Since GIMP 2.8

### gimp_ruler_get_range ()

    void                gimp_ruler_get_range                (GimpRuler *ruler,
                                                             gdouble *lower,
                                                             gdouble *upper,
                                                             gdouble *max_size);

Retrieves values indicating the range and current position of a GimpRuler. See `gimp_ruler_set_range()`.

`ruler` : | a GimpRuler
`lower` : | location to store lower limit of the ruler, or `NULL`
`upper` : | location to store upper limit of the ruler, or `NULL`
`max_size` : | location to store the maximum size of the ruler used when calculating the space to leave for the text, or `NULL`.

Since GIMP 2.8

## Property Details

### The `"lower"` property

      "lower"                    gdouble               : Read / Write

Lower limit of ruler.

Default value: 0

### The `"max-size"` property

      "max-size"                 gdouble               : Read / Write

Maximum size of the ruler.

Default value: 0

### The `"position"` property

      "position"                 gdouble               : Read / Write

Position of mark on the ruler.

Default value: 0

### The `"unit"` property

      "unit"                     GimpUnit              : Read / Write

Unit of ruler.

Allowed values: [0,65535]

Default value: 0

### The `"upper"` property

      "upper"                    gdouble               : Read / Write

Upper limit of ruler.

Default value: 0