[−][src]Trait atk::ValueExt
Required methods
fn get_current_value(&self) -> Value
Gets the value of this object.
Deprecated
Since 2.12. Use Value::get_value_and_text
instead.
value
a gobject::Value representing the current accessible value
fn get_increment(&self) -> f64
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.
Returns
the minimum increment by which the value of this object may be changed. zero if undefined.
fn get_maximum_value(&self) -> Value
Gets the maximum value of this object.
Deprecated
Since 2.12. Use Value::get_range instead.
value
a gobject::Value representing the maximum accessible value
fn get_minimum_increment(&self) -> Value
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.
Deprecated
Since 2.12. Use Value::get_increment instead.
value
a gobject::Value representing the minimum increment by which the accessible value may be changed
fn get_minimum_value(&self) -> Value
Gets the minimum value of this object.
Deprecated
Since 2.12. Use Value::get_range instead.
value
a gobject::Value representing the minimum accessible value
fn get_range(&self) -> Option<Range>
Gets the range of this object.
Returns
a newly allocated Range
that represents the minimum, maximum and descriptor (if available)
of self. NULL if that range is not defined.
fn get_sub_ranges(&self) -> Vec<Range>
Gets the list of subranges defined for this object. See Value
introduction for examples of subranges and when to expose them.
Returns
an glib::SList of
Range which each of the subranges defined for this object. Free
the returns list with glib::SList::free.
fn get_value_and_text(&self) -> (f64, GString)
Gets the current value and the human readable text alternative of
self. text is a newly created string, that must be freed by the
caller. Can be NULL if no descriptor is available.
value
address of gdouble to put the current value of self
text
address of gchar to put the human
readable text alternative for value
fn set_current_value(&self, value: &Value) -> bool
Sets the value of this object.
Deprecated
Since 2.12. Use Value::set_value instead.
value
a gobject::Value which is the desired new accessible value.
Returns
true if new value is successfully set, false otherwise.
fn set_value(&self, new_value: f64)
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 Value::value-changed signal emission.
Note for implementors: the deprecated 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.
new_value
a double which is the desired new accessible value.
fn connect_value_changed<F: Fn(&Self, f64, &str) + 'static>(
&self,
f: F
) -> SignalHandlerId
&self,
f: F
) -> SignalHandlerId
The 'value-changed' signal is emitted when the current value
that represent the object changes. value is the numerical
representation of this new value. text is the human
readable text alternative of value, and can be NULL if it is
not available. Note that if there is a textual description
associated with the new numeric value, that description
should be included regardless of whether or not it has also
changed.
Example: a password meter whose value changes as the user types their new password. Appropiate value text would be "weak", "acceptable" and "strong".
value
the new value in a numerical form.
text
human readable text alternative (also called description) of this object. NULL if not available.
Implementors
impl<O: IsA<Value>> ValueExt for O[src]
fn get_current_value(&self) -> Value[src]
fn get_increment(&self) -> f64[src]
fn get_maximum_value(&self) -> Value[src]
fn get_minimum_increment(&self) -> Value[src]
fn get_minimum_value(&self) -> Value[src]
fn get_range(&self) -> Option<Range>[src]
fn get_sub_ranges(&self) -> Vec<Range>[src]
fn get_value_and_text(&self) -> (f64, GString)[src]
fn set_current_value(&self, value: &Value) -> bool[src]
fn set_value(&self, new_value: f64)[src]
fn connect_value_changed<F: Fn(&Self, f64, &str) + 'static>(
&self,
f: F
) -> SignalHandlerId[src]
&self,
f: F
) -> SignalHandlerId