Class: Gtk::LevelBar

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

Instance Method Summary collapse

Instance Method Details

#add_offset_value(name, value) ⇒ nil

Adds a new offset marker on self at the position specified by value. When the bar value is in the interval topped by value (or between value and Gtk::LevelBar:max-value in case the offset is the last one on the bar) a style class named ‘level-`name will be applied when rendering the level bar fill. If another offset marker named name exists, its value will be replaced by value.

Parameters:

  • name (String)

    the name of the new offset

  • value (Float)

    the value for the new offset

Returns:

  • (nil)

#get_offset_value(name, value) ⇒ TrueClass

Fetches the value specified for the offset marker name in self, returning true in case an offset named name was found.

Parameters:

  • name (String)

    the name of an offset in the bar

  • value (Float)

    location where to store the value

Returns:

  • (TrueClass)

    true if the specified offset is found

#invertedTrueClass

Return the value of the Gtk::LevelBar:inverted property.

Returns:

  • (TrueClass)

    true if the level bar is inverted

#inverted=(inverted) ⇒ TrueClass

Level bars normally grow from top to bottom or left to right. Inverted level bars grow in the opposite direction.

Parameters:

  • inverted (TrueClass)

Returns:

  • (TrueClass)

    inverted

  • (TrueClass)

    inverted

#inverted?TrueClass

Level bars normally grow from top to bottom or left to right. Inverted level bars grow in the opposite direction.

Returns:

  • (TrueClass)

    inverted

#max_valueFloat

The Gtk::LevelBar:max-value property determaxes the maximum value of the interval that can be displayed by the bar.

Returns:

  • (Float)

    max-value

#max_value=(max_value) ⇒ Float

The Gtk::LevelBar:max-value property determaxes the maximum value of the interval that can be displayed by the bar.

Parameters:

  • max_value (Float)

Returns:

  • (Float)

    max-value

  • (Float)

    max-value

#min_valueFloat

The Gtk::LevelBar:min-value property determines the minimum value of the interval that can be displayed by the bar.

Returns:

  • (Float)

    min-value

#min_value=(min_value) ⇒ Float

The Gtk::LevelBar:min-value property determines the minimum value of the interval that can be displayed by the bar.

Parameters:

  • min_value (Float)

Returns:

  • (Float)

    min-value

  • (Float)

    min-value

#modeGtk::LevelBarMode

The Gtk::LevelBar:mode property determines the way #GtkLevelBar interprets the value properties to draw the level fill area. Specifically, when the value is #GTK_LEVEL_BAR_MODE_CONTINUOUS, Gtk::LevelBar will draw a single block representing the current value in that area; when the value is #GTK_LEVEL_BAR_MODE_DISCRETE, the widget will draw a succession of separate blocks filling the draw area, with the number of blocks being equal to the units separating the integral roundings of Gtk::LevelBar:min-value and #GtkLevelBar:max-value.

Returns:

#mode=(mode) ⇒ Gtk::LevelBarMode

The Gtk::LevelBar:mode property determines the way #GtkLevelBar interprets the value properties to draw the level fill area. Specifically, when the value is #GTK_LEVEL_BAR_MODE_CONTINUOUS, Gtk::LevelBar will draw a single block representing the current value in that area; when the value is #GTK_LEVEL_BAR_MODE_DISCRETE, the widget will draw a succession of separate blocks filling the draw area, with the number of blocks being equal to the units separating the integral roundings of Gtk::LevelBar:min-value and #GtkLevelBar:max-value.

Parameters:

Returns:

#newGtk::Widget

Creates a new Gtk::LevelBar.

Returns:

#new_for_interval(min_value, max_value) ⇒ Gtk::Widget

Utility constructor that creates a new Gtk::LevelBar for the specified interval.

Parameters:

  • min_value (Float)

    a positive value

  • max_value (Float)

    a positive value

Returns:

#remove_offset_value(name) ⇒ nil

Removes an offset marker previously added with gtk_level_bar_add_offset_value().

Parameters:

  • name (String)

    the name of an offset in the bar

Returns:

  • (nil)

#valueFloat

The Gtk::LevelBar:value property determines the currently filled value of the level bar.

Returns:

  • (Float)

    value

#value=(value) ⇒ Float

The Gtk::LevelBar:value property determines the currently filled value of the level bar.

Parameters:

  • value (Float)

Returns:

  • (Float)

    value

  • (Float)

    value