Class: Gtk::Adjustment

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

Instance Method Summary collapse

Instance Method Details

#changednil

Emits a Gtk::Adjustment::changed signal from the #GtkAdjustment. This is typically called by the owner of the Gtk::Adjustment after it has changed any of the Gtk::Adjustment properties other than the value.

Returns:

  • (nil)

#clamp_page(lower, upper) ⇒ nil

Updates the Gtk::Adjustment:value property to ensure that the range between lower and upper is in the current page (i.e. between Gtk::Adjustment:value and #GtkAdjustment:value + #GtkAdjustment:page-size). If the range is larger than the page size, then only the start of it will be in the current page.

A Gtk::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 Gtk::Adjustment::changed signal. See gtk_adjustment_set_lower() for an alternative way of compressing multiple emissions of Gtk::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

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

Creates a new Gtk::Adjustment.

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

Returns:

#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 Gtk::SpinButton.

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 Gtk::SpinButton.

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

#value_changednil

Emits a Gtk::Adjustment::value-changed signal from the #GtkAdjustment. This is typically called by the owner of the Gtk::Adjustment after it has changed the Gtk::Adjustment:value property.

Returns:

  • (nil)