Module: Atk::Value
- Defined in:
- (unknown)
Overview
The ATK interface implemented by valuators and components which display or select a value from a bounded range of values.
Atk::Value should be implemented for components which either display a value from a bounded range, or which allow the user to specify a value from a bounded range, or both. For instance, most sliders and range controls, as well as dials, should have Atk::Object representations which implement Atk::Value on the component's behalf. At::KValues may be read-only, in which case attempts to alter the value return would fail.
A level bar whose value changes to reflect the battery charge. The color remains the same regardless of the charge and there is no on-screen text reflecting the fullness of the battery. In this case, because the position within the bar is the only indication the user has of the current charge, value text should not be provided by the implementor.
Instance Method Summary collapse
-
#current_value=(value) ⇒ Boolean
Sets the value of this object.
- #get_current_value(obj, value) ⇒ nil
-
#get_increment(obj) ⇒ Float
object may be changed.
- #get_maximum_value(obj, value) ⇒ nil
- #get_minimum_increment(obj, value) ⇒ nil
- #get_minimum_value(obj, value) ⇒ nil
-
#get_range(obj) ⇒ Atk::Range
that represents the minimum, maximum and descriptor (if available) of obj.
-
#get_sub_ranges(obj) ⇒ GLib::SList<Atk::Range>
Atk::Range which each of the subranges defined for this object.
-
#get_value_and_text(obj, value, text) ⇒ nil
readable text alternative for value.
-
#increment ⇒ Float
Gets the minimum increment by which the value of this object may be changed.
-
#range ⇒ Atk::Range
Gets the range of this object.
-
#set_current_value(obj, value) ⇒ Boolean
True if new value is successfully set, false otherwise.
- #set_value(obj, new_value) ⇒ nil
-
#sub_ranges ⇒ GLib::SList<Atk::Range>
Gets the list of subranges defined for this object.
-
#value=(new_value) ⇒ nil
Sets the value of this object.
Instance Method Details
#current_value=(value) ⇒ Boolean
Sets the value of this object.
#get_current_value(obj, value) ⇒ nil
#get_increment(obj) ⇒ Float
object may be changed. zero if undefined.
#get_maximum_value(obj, value) ⇒ nil
#get_minimum_increment(obj, value) ⇒ nil
#get_minimum_value(obj, value) ⇒ nil
#get_range(obj) ⇒ Atk::Range
that represents the minimum, maximum and descriptor (if available) of obj. NULL if that range is not defined.
#get_sub_ranges(obj) ⇒ GLib::SList<Atk::Range>
Atk::Range which each of the subranges defined for this object. Free the returns list with g_slist_free().
#get_value_and_text(obj, value, text) ⇒ nil
readable text alternative for value
#increment ⇒ Float
Gets the minimum increment by which the value of this object may be changed. If zero, the minimum increment is undefined, which may mean that it is limited only by the floating point precision of the platform. object may be changed. zero if undefined.
#range ⇒ Atk::Range
Gets the range of this object. that represents the minimum, maximum and descriptor (if available) of obj. NULL if that range is not defined.
#set_current_value(obj, value) ⇒ Boolean
Returns true if new value is successfully set, false otherwise.
#set_value(obj, new_value) ⇒ nil
#sub_ranges ⇒ GLib::SList<Atk::Range>
Gets the list of subranges defined for this object. See Atk::Value introduction for examples of subranges and when to expose them. Atk::Range which each of the subranges defined for this object. Free the returns list with g_slist_free().
#value=(new_value) ⇒ nil
Sets the value of this object.
This method is intended to provide a way to change the value of the object. In any case, it is possible that the value can't be modified (ie: a read-only component). If the value changes due this call, it is possible that the text could change, and will trigger an Atk::Value::value-changed signal emission.
Note for implementors: the deprecated atk_value_set_current_value() method returned TRUE or FALSE depending if the value was assigned or not. In the practice several implementors were not able to decide it, and returned TRUE in any case. For that reason it is not required anymore to return if the value was properly assigned or not.