Class: Gtk::Adjustment

Inherits:
GObject::InitiallyUnowned
  • Object
show all
Defined in:
(unknown)

Instance Method Summary collapse

Constructor Details

#initialize(value, lower, upper, step_increment, page_increment, page_size) ⇒ Gtk::Adjustment

Creates a new GtkAdjustment.

Parameters:

  • value (Float)

    the initial value

  • lower (Float)

    the minimum value

  • upper (Float)

    the maximum value

  • step_increment (Float)

    the step increment

  • page_increment (Float)

    the page increment

  • page_size (Float)

    the page size

Instance Method Details

#clamp_page(lower, upper) ⇒ nil

Updates the value property to ensure that the range between lower and upper is in the current page.

The current page goes from value to value + page-size. If the range is larger than the page size, then only the start of it will be in the current page.

A [signalGtk.Adjustment::value-changed] signal will be emitted if the value is changed.

Parameters:

  • lower (Float)

    the lower value

  • upper (Float)

    the upper value

Returns:

  • (nil)

#configure(value, lower, upper, step_increment, page_increment, page_size) ⇒ nil

Sets all properties of the adjustment at once.

Use this function to avoid multiple emissions of the [signalGtk.Adjustment::changed] signal. See [methodGtk.Adjustment.set_lower] for an alternative way of compressing multiple emissions of [signalGtk.Adjustment::changed] into one.

Parameters:

  • value (Float)

    the new value

  • lower (Float)

    the new minimum value

  • upper (Float)

    the new maximum value

  • step_increment (Float)

    the new step increment

  • page_increment (Float)

    the new page increment

  • page_size (Float)

    the new page size

Returns:

  • (nil)

#lowerFloat

The minimum value of the adjustment.

Returns:

  • (Float)

    lower

#lower=(lower) ⇒ Float

The minimum value of the adjustment.

Parameters:

  • lower (Float)

Returns:

  • (Float)

    lower

  • (Float)

    lower

#minimum_incrementFloat

Gets the smaller of step increment and page increment.

Returns:

  • (Float)

    the minimum increment of adjustment

#page_incrementFloat

The page increment of the adjustment.

Returns:

  • (Float)

    page-increment

#page_increment=(page_increment) ⇒ Float

The page increment of the adjustment.

Parameters:

  • page_increment (Float)

Returns:

  • (Float)

    page-increment

  • (Float)

    page-increment

#page_sizeFloat

The page size of the adjustment.

Note that the page-size is irrelevant and should be set to zero if the adjustment is used for a simple scalar value, e.g. in a GtkSpinButton.

Returns:

  • (Float)

    page-size

#page_size=(page_size) ⇒ Float

The page size of the adjustment.

Note that the page-size is irrelevant and should be set to zero if the adjustment is used for a simple scalar value, e.g. in a GtkSpinButton.

Parameters:

  • page_size (Float)

Returns:

  • (Float)

    page-size

  • (Float)

    page-size

#step_incrementFloat

The step increment of the adjustment.

Returns:

  • (Float)

    step-increment

#step_increment=(step_increment) ⇒ Float

The step increment of the adjustment.

Parameters:

  • step_increment (Float)

Returns:

  • (Float)

    step-increment

  • (Float)

    step-increment

#upperFloat

The maximum value of the adjustment.

Note that values will be restricted by upper - page-size if the page-size property is nonzero.

Returns:

  • (Float)

    upper

#upper=(upper) ⇒ Float

The maximum value of the adjustment.

Note that values will be restricted by upper - page-size if the page-size property is nonzero.

Parameters:

  • upper (Float)

Returns:

  • (Float)

    upper

  • (Float)

    upper

#valueFloat

The value of the adjustment.

Returns:

  • (Float)

    value

#value=(value) ⇒ Float

The value of the adjustment.

Parameters:

  • value (Float)

Returns:

  • (Float)

    value

  • (Float)

    value