Trait gtk::prelude::SpinButtonExt[][src]

pub trait SpinButtonExt: 'static {
Show methods fn configure<P: IsA<Adjustment>>(
        &self,
        adjustment: Option<&P>,
        climb_rate: f64,
        digits: u32
    );
fn adjustment(&self) -> Adjustment;
fn digits(&self) -> u32;
fn increments(&self) -> (f64, f64);
fn is_numeric(&self) -> bool;
fn range(&self) -> (f64, f64);
fn snaps_to_ticks(&self) -> bool;
fn update_policy(&self) -> SpinButtonUpdatePolicy;
fn value(&self) -> f64;
fn value_as_int(&self) -> i32;
fn wraps(&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 climb_rate(&self) -> f64;
fn set_climb_rate(&self, climb_rate: f64);
fn connect_adjustment_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId;
fn connect_climb_rate_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId;
fn connect_digits_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId;
fn connect_numeric_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId;
fn connect_snap_to_ticks_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId;
fn connect_update_policy_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId;
fn connect_value_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId;
fn connect_wrap_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId;
}
Expand description

Trait containing all SpinButton methods.

Implementors

SpinButton

Required methods

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

Get the adjustment associated with a SpinButton

Returns

the Adjustment of self

Fetches the precision of self. See set_digits().

Returns

the current precision

Gets the current step and page the increments used by self. See set_increments().

Returns

step

location to store step increment, or None

page

location to store page increment, or None

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

Returns

true if only numeric text can be entered

Gets the range allowed for self. See set_range().

Returns

min

location to store minimum allowed value, or None

max

location to store maximum allowed value, or None

Returns whether the values are corrected to the nearest step. See set_snap_to_ticks().

Returns

true if values are snapped to the nearest step

Gets the update behavior of a spin button. See set_update_policy().

Returns

the current update policy

Get the value in the self.

Returns

the value of self

Get the value self represented as an integer.

Returns

the value of self

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 set_wrap().

Returns

true if the spin button wraps around

Replaces the Adjustment associated with self.

adjustment

a Adjustment to replace the existing adjustment

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

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.

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

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

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

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

Sets the value of self.

value

the new value

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

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

Manually force an update of the spin button.

Implementors