Class: Gtk::Scale
- Inherits:
-
Object
- Object
- Gtk::Scale
- Defined in:
- (unknown)
Instance Method Summary collapse
-
#add_mark(value, position, markup) ⇒ nil
Adds a mark at value.
-
#clear_marks ⇒ nil
Removes any marks that have been added with gtk_scale_add_mark().
-
#digits ⇒ Integer
Digits.
- #digits=(digits) ⇒ Integer
-
#draw_value ⇒ TrueClass
Returns whether the current value is displayed as a string next to the slider.
- #draw_value=(draw_value) ⇒ TrueClass
-
#draw_value? ⇒ TrueClass
Draw-value.
-
#get_layout_offsets(x, y) ⇒ nil
Obtains the coordinates where the scale will draw the Pango::Layout representing the text in the scale.
-
#has_origin ⇒ TrueClass
Returns whether the scale has an origin.
- #has_origin=(has_origin) ⇒ TrueClass
-
#has_origin? ⇒ TrueClass
Has-origin.
-
#layout ⇒ Pango::Layout
Gets the Pango::Layout used to display the scale.
-
#new(orientation, adjustment) ⇒ Gtk::Widget
Creates a new Gtk::Scale.
-
#new_with_range(orientation, min, max, step) ⇒ Gtk::Widget
Creates a new scale widget with the given orientation that lets the user input a number between min and max (including min and max) with the increment step.
-
#value_pos ⇒ Gtk::PositionType
Value-pos.
- #value_pos=(value_pos) ⇒ Gtk::PositionType
Instance Method Details
#add_mark(value, position, markup) ⇒ nil
Adds a mark at value.
A mark is indicated visually by drawing a tick mark next to the scale, and GTK+ makes it easy for the user to position the scale exactly at the marks value.
If markup is not nil, text is shown next to the tick mark.
To remove marks from a scale, use gtk_scale_clear_marks().
#clear_marks ⇒ nil
Removes any marks that have been added with gtk_scale_add_mark().
#digits ⇒ Integer
Returns digits.
#digits=(digits) ⇒ Integer
#draw_value ⇒ TrueClass
Returns whether the current value is displayed as a string next to the slider.
#draw_value=(draw_value) ⇒ TrueClass
#draw_value? ⇒ TrueClass
Returns draw-value.
#get_layout_offsets(x, y) ⇒ nil
Obtains the coordinates where the scale will draw the Pango::Layout representing the text in the scale. Remember when using the Pango::Layout function you need to convert to and from pixels using PANGO_PIXELS() or #PANGO_SCALE.
If the Gtk::Scale:draw-value property is false, the return values are undefined.
#has_origin ⇒ TrueClass
Returns whether the scale has an origin.
#has_origin=(has_origin) ⇒ TrueClass
#has_origin? ⇒ TrueClass
Returns has-origin.
#layout ⇒ Pango::Layout
Gets the Pango::Layout used to display the scale. The returned object is owned by the scale so does not need to be freed by the caller.
#new(orientation, adjustment) ⇒ Gtk::Widget
Creates a new Gtk::Scale.
#new_with_range(orientation, min, max, step) ⇒ Gtk::Widget
Creates a new scale widget with the given orientation that lets the user input a number between min and max (including min and max) with the increment step. step must be nonzero; it’s the distance the slider moves when using the arrow keys to adjust the scale value.
Note that the way in which the precision is derived works best if step is a power of ten. If the resulting precision is not suitable for your needs, use gtk_scale_set_digits() to correct it.
#value_pos ⇒ Gtk::PositionType
Returns value-pos.