[][src]Trait gtk::SpinButtonExt

pub trait SpinButtonExt: 'static {
    fn configure<P: IsA<Adjustment>>(
        &self,
        adjustment: Option<&P>,
        climb_rate: f64,
        digits: u32
    );
fn get_adjustment(&self) -> Adjustment;
fn get_digits(&self) -> u32;
fn get_increments(&self) -> (f64, f64);
fn get_numeric(&self) -> bool;
fn get_range(&self) -> (f64, f64);
fn get_snap_to_ticks(&self) -> bool;
fn get_update_policy(&self) -> SpinButtonUpdatePolicy;
fn get_value(&self) -> f64;
fn get_value_as_int(&self) -> i32;
fn get_wrap(&self) -> bool;
fn set_adjustment<P: IsA<Adjustment>>(&self, adjustment: &P);
fn set_digits(&self, digits: u32);
fn set_increments(&self, step: f64, page: f64);
fn set_numeric(&self, numeric: bool);
fn set_range(&self, min: f64, max: f64);
fn set_snap_to_ticks(&self, snap_to_ticks: bool);
fn set_update_policy(&self, policy: SpinButtonUpdatePolicy);
fn set_value(&self, value: f64);
fn set_wrap(&self, wrap: bool);
fn spin(&self, direction: SpinType, increment: f64);
fn update(&self);
fn get_property_climb_rate(&self) -> f64;
fn set_property_climb_rate(&self, climb_rate: f64);
fn connect_property_adjustment_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId;
fn connect_property_climb_rate_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId;
fn connect_property_digits_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId;
fn connect_property_numeric_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId;
fn connect_property_snap_to_ticks_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId;
fn connect_property_update_policy_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId;
fn connect_property_value_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId;
fn connect_property_wrap_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId; }

Trait containing all SpinButton methods.

Implementors

SpinButton

Required methods

fn configure<P: IsA<Adjustment>>(
    &self,
    adjustment: Option<&P>,
    climb_rate: f64,
    digits: u32
)

Changes the properties of an existing spin button. The adjustment, climb rate, and number of decimal places are updated accordingly.

adjustment

a Adjustment to replace the spin button’s existing adjustment, or None to leave its current adjustment unchanged

climb_rate

the new climb rate

digits

the number of decimal places to display in the spin button

fn get_adjustment(&self) -> Adjustment

Get the adjustment associated with a SpinButton

Returns

the Adjustment of self

fn get_digits(&self) -> u32

Fetches the precision of self. See SpinButtonExt::set_digits.

Returns

the current precision

fn get_increments(&self) -> (f64, f64)

Gets the current step and page the increments used by self. See SpinButtonExt::set_increments.

step

location to store step increment, or None

page

location to store page increment, or None

fn get_numeric(&self) -> bool

Returns whether non-numeric text can be typed into the spin button. See SpinButtonExt::set_numeric.

Returns

true if only numeric text can be entered

fn get_range(&self) -> (f64, f64)

Gets the range allowed for self. See SpinButtonExt::set_range.

min

location to store minimum allowed value, or None

max

location to store maximum allowed value, or None

fn get_snap_to_ticks(&self) -> bool

Returns whether the values are corrected to the nearest step. See SpinButtonExt::set_snap_to_ticks.

Returns

true if values are snapped to the nearest step

fn get_update_policy(&self) -> SpinButtonUpdatePolicy

Gets the update behavior of a spin button. See SpinButtonExt::set_update_policy.

Returns

the current update policy

fn get_value(&self) -> f64

Get the value in the self.

Returns

the value of self

fn get_value_as_int(&self) -> i32

Get the value self represented as an integer.

Returns

the value of self

fn get_wrap(&self) -> bool

Returns whether the spin button’s value wraps around to the opposite limit when the upper or lower limit of the range is exceeded. See SpinButtonExt::set_wrap.

Returns

true if the spin button wraps around

fn set_adjustment<P: IsA<Adjustment>>(&self, adjustment: &P)

Replaces the Adjustment associated with self.

adjustment

a Adjustment to replace the existing adjustment

fn set_digits(&self, digits: u32)

Set the precision to be displayed by self. Up to 20 digit precision is allowed.

digits

the number of digits after the decimal point to be displayed for the spin button’s value

fn set_increments(&self, step: f64, page: f64)

Sets the step and page increments for spin_button. This affects how quickly the value changes when the spin button’s arrows are activated.

step

increment applied for a button 1 press.

page

increment applied for a button 2 press.

fn set_numeric(&self, numeric: bool)

Sets the flag that determines if non-numeric text can be typed into the spin button.

numeric

flag indicating if only numeric entry is allowed

fn set_range(&self, min: f64, max: f64)

Sets the minimum and maximum allowable values for self.

If the current value is outside this range, it will be adjusted to fit within the range, otherwise it will remain unchanged.

min

minimum allowable value

max

maximum allowable value

fn set_snap_to_ticks(&self, snap_to_ticks: bool)

Sets the policy as to whether values are corrected to the nearest step increment when a spin button is activated after providing an invalid value.

snap_to_ticks

a flag indicating if invalid values should be corrected

fn set_update_policy(&self, policy: SpinButtonUpdatePolicy)

Sets the update behavior of a spin button. This determines whether the spin button is always updated or only when a valid value is set.

policy

a SpinButtonUpdatePolicy value

fn set_value(&self, value: f64)

Sets the value of self.

value

the new value

fn set_wrap(&self, wrap: bool)

Sets the flag that determines if a spin button value wraps around to the opposite limit when the upper or lower limit of the range is exceeded.

wrap

a flag indicating if wrapping behavior is performed

fn spin(&self, direction: SpinType, increment: f64)

Increment or decrement a spin button’s value in a specified direction by a specified amount.

direction

a SpinType indicating the direction to spin

increment

step increment to apply in the specified direction

fn update(&self)

Manually force an update of the spin button.

fn get_property_climb_rate(&self) -> f64

fn set_property_climb_rate(&self, climb_rate: f64)

fn connect_property_adjustment_notify<F: Fn(&Self) + 'static>(
    &self,
    f: F
) -> SignalHandlerId

fn connect_property_climb_rate_notify<F: Fn(&Self) + 'static>(
    &self,
    f: F
) -> SignalHandlerId

fn connect_property_digits_notify<F: Fn(&Self) + 'static>(
    &self,
    f: F
) -> SignalHandlerId

fn connect_property_numeric_notify<F: Fn(&Self) + 'static>(
    &self,
    f: F
) -> SignalHandlerId

fn connect_property_snap_to_ticks_notify<F: Fn(&Self) + 'static>(
    &self,
    f: F
) -> SignalHandlerId

fn connect_property_update_policy_notify<F: Fn(&Self) + 'static>(
    &self,
    f: F
) -> SignalHandlerId

fn connect_property_value_notify<F: Fn(&Self) + 'static>(
    &self,
    f: F
) -> SignalHandlerId

fn connect_property_wrap_notify<F: Fn(&Self) + 'static>(
    &self,
    f: F
) -> SignalHandlerId

Loading content...

Implementors

impl<O: IsA<SpinButton>> SpinButtonExt for O[src]

Loading content...