## AgsRuler

AgsRuler — A ruler widget

## Stability Level

Stable, unless otherwise indicated

## Functions

guint | ags_ruler_get_font_size ()
void | ags_ruler_set_font_size ()
guint | ags_ruler_get_step ()
void | ags_ruler_set_step ()
guint | ags_ruler_get_large_step ()
void | ags_ruler_set_large_step ()
guint | ags_ruler_get_small_step ()
void | ags_ruler_set_small_step ()
gdouble | ags_ruler_get_factor ()
void | ags_ruler_set_factor ()
gdouble | ags_ruler_get_precision ()
void | ags_ruler_set_precision ()
gdouble | ags_ruler_get_scale_precision ()
void | ags_ruler_set_scale_precision ()
GtkAdjustment * | ags_ruler_get_adjustment ()
void | ags_ruler_set_adjustment ()
AgsRuler * | ags_ruler_new ()

## Properties

GObject * | adjustment | Read / Write
double | factor | Read / Write
guint | font-size | Read / Write
guint | large-step | Read / Write
double | precision | Read / Write
double | scale-precision | Read / Write
guint | small-step | Read / Write
guint | step | Read / Write

## Types and Values

#define | AGS_RULER_FONT_SIZE
#define | AGS_RULER_FREE_SPACE
#define | AGS_RULER_DEFAULT_FACTOR
#define | AGS_RULER_DEFAULT_PRECISION
#define | AGS_RULER_DEFAULT_SCALE_PRECISION
#define | AGS_RULER_DEFAULT_HEIGHT
#define | AGS_RULER_DEFAULT_STEP
#define | AGS_RULER_DEFAULT_LARGE_STEP
#define | AGS_RULER_DEFAULT_SMALL_STEP

## Object Hierarchy

        GObject
        ╰── GInitiallyUnowned
            ╰── GtkWidget
                ╰── AgsRuler

## Includes

    #include <ags/widget/ags_ruler.h>

## Description

AgsRuler is a widget representing a GtkAdjustment.

## Functions

### ags_ruler_get_font_size ()

    guint
    ags_ruler_get_font_size (AgsRuler *ruler);

Get font size of `ruler` .

#### Parameters

ruler | the AgsRuler |

#### Returns

the font size

Since: 3.6.15

### ags_ruler_set_font_size ()

    void
    ags_ruler_set_font_size (AgsRuler *ruler,
                             guint font_size);

Set font size of `ruler` .

#### Parameters

ruler | the AgsRuler |
font_size | the font size |

Since: 3.6.15

### ags_ruler_get_step ()

    guint
    ags_ruler_get_step (AgsRuler *ruler);

Get step of `ruler` .

#### Parameters

ruler | the AgsRuler |

#### Returns

the step

Since: 3.2.0

### ags_ruler_set_step ()

    void
    ags_ruler_set_step (AgsRuler *ruler,
                        guint step);

Set step of `ruler` .

#### Parameters

ruler | the AgsRuler |
step | the step |

Since: 3.2.0

### ags_ruler_get_large_step ()

    guint
    ags_ruler_get_large_step (AgsRuler *ruler);

Get large step of `ruler` .

#### Parameters

ruler | the AgsRuler |

#### Returns

the large step

Since: 3.2.0

### ags_ruler_set_large_step ()

    void
    ags_ruler_set_large_step (AgsRuler *ruler,
                              guint large_step);

Set large step of `ruler` .

#### Parameters

ruler | the AgsRuler |
large_step | the large step |

Since: 3.2.0

### ags_ruler_get_small_step ()

    guint
    ags_ruler_get_small_step (AgsRuler *ruler);

Get small step of `ruler` .

#### Parameters

ruler | the AgsRuler |

#### Returns

the small step

Since: 3.2.0

### ags_ruler_set_small_step ()

    void
    ags_ruler_set_small_step (AgsRuler *ruler,
                              guint small_step);

Set small step of `ruler` .

#### Parameters

ruler | the AgsRuler |
small_step | the small step |

Since: 3.2.0

### ags_ruler_get_factor ()

    gdouble
    ags_ruler_get_factor (AgsRuler *ruler);

Get factor of `ruler` .

#### Parameters

ruler | the AgsRuler |

#### Returns

the factor

Since: 4.0.0

### ags_ruler_set_factor ()

    void
    ags_ruler_set_factor (AgsRuler *ruler,
                          gdouble factor);

Set factor of `ruler` .

#### Parameters

ruler | the AgsRuler |
factor | the factor |

Since: 4.0.0

### ags_ruler_get_precision ()

    gdouble
    ags_ruler_get_precision (AgsRuler *ruler);

Get precision of `ruler` .

#### Parameters

ruler | the AgsRuler |

#### Returns

the precision

Since: 4.0.0

### ags_ruler_set_precision ()

    void
    ags_ruler_set_precision (AgsRuler *ruler,
                             gdouble precision);

Set precision of `ruler` .

#### Parameters

ruler | the AgsRuler |
precision | the precision |

Since: 4.0.0

### ags_ruler_get_scale_precision ()

    gdouble
    ags_ruler_get_scale_precision (AgsRuler *ruler);

Get scale precision of `ruler` .

#### Parameters

ruler | the AgsRuler |

#### Returns

the scale precision

Since: 4.0.0

### ags_ruler_set_scale_precision ()

    void
    ags_ruler_set_scale_precision (AgsRuler *ruler,
                                   gdouble scale_precision);

Set scale precision of `ruler` .

#### Parameters

ruler | the AgsRuler |
scale_precision | the scale precision |

Since: 4.0.0

### ags_ruler_get_adjustment ()

    GtkAdjustment *
    ags_ruler_get_adjustment (AgsRuler *ruler);

Get adjustment of `ruler` .

#### Parameters

ruler | the AgsRuler |

#### Returns

the GtkAdjustment.

[transfer full]

Since: 3.2.0

### ags_ruler_set_adjustment ()

    void
    ags_ruler_set_adjustment (AgsRuler *ruler,
                              GtkAdjustment *adjustment);

Set adjustment of `ruler` .

#### Parameters

ruler | the AgsRuler |
adjustment | the GtkAdjustment. | [transfer none]

Since: 3.2.0

### ags_ruler_new ()

    AgsRuler *
    ags_ruler_new (GtkOrientation orientation,
                   guint step,
                   gdouble factor,
                   gdouble precision,
                   gdouble scale_precision);

Create a new instance of AgsRuler

#### Parameters

orientation | the GtkOrientation |
step | the step size |
factor | the factor |
precision | the precision |
scale_precision | the scale precision |

#### Returns

the new AgsRuler

Since: 3.0.0

## Types and Values

### AGS_RULER_FONT_SIZE

    #define AGS_RULER_FONT_SIZE (12)

### AGS_RULER_FREE_SPACE

    #define AGS_RULER_FREE_SPACE (4.0)

### AGS_RULER_DEFAULT_FACTOR

    #define AGS_RULER_DEFAULT_FACTOR (16.0)

### AGS_RULER_DEFAULT_PRECISION

    #define AGS_RULER_DEFAULT_PRECISION (1.0)

### AGS_RULER_DEFAULT_SCALE_PRECISION

    #define AGS_RULER_DEFAULT_SCALE_PRECISION (1.0)

### AGS_RULER_DEFAULT_HEIGHT

    #define AGS_RULER_DEFAULT_HEIGHT (24)

### AGS_RULER_DEFAULT_STEP

    #define AGS_RULER_DEFAULT_STEP (16)

### AGS_RULER_DEFAULT_LARGE_STEP

    #define AGS_RULER_DEFAULT_LARGE_STEP (8.0)

### AGS_RULER_DEFAULT_SMALL_STEP

    #define AGS_RULER_DEFAULT_SMALL_STEP (6.0)

## Property Details

### The `“adjustment”` property

      “adjustment”               GObject *

The adjustment.

Owner: AgsRuler

Flags: Read / Write

Since: 3.0.0

### The `“factor”` property

      “factor”                   double

The factor.

Owner: AgsRuler

Flags: Read / Write

Allowed values: >= 0

Default value: 16

Since: 4.0.0

### The `“font-size”` property

      “font-size”                guint

The font size.

Owner: AgsRuler

Flags: Read / Write

Default value: 12

Since: 3.6.15

### The `“large-step”` property

      “large-step”               guint

The large step's width.

Owner: AgsRuler

Flags: Read / Write

Default value: 8

Since: 3.0.0

### The `“precision”` property

      “precision”                double

The precision.

Owner: AgsRuler

Flags: Read / Write

Allowed values: >= 0

Default value: 1

Since: 4.0.0

### The `“scale-precision”` property

      “scale-precision”          double

The scale precision.

Owner: AgsRuler

Flags: Read / Write

Allowed values: >= 0

Default value: 1

Since: 4.0.0

### The `“small-step”` property

      “small-step”               guint

The small step's width.

Owner: AgsRuler

Flags: Read / Write

Default value: 6

Since: 3.0.0

### The `“step”` property

      “step”                     guint

The step's width.

Owner: AgsRuler

Flags: Read / Write

Default value: 16

Since: 3.0.0