Trait fltk::prelude::ValuatorExt

source ·
pub unsafe trait ValuatorExt: WidgetExt {
Show 15 methods // Required methods fn set_bounds(&mut self, a: f64, b: f64); fn minimum(&self) -> f64; fn set_minimum(&mut self, a: f64); fn maximum(&self) -> f64; fn set_maximum(&mut self, a: f64); fn set_range(&mut self, a: f64, b: f64); fn set_step(&mut self, a: f64, b: i32); fn step(&self) -> f64; fn set_precision(&mut self, digits: i32); fn value(&self) -> f64; fn set_value(&mut self, arg2: f64); fn format(&mut self, arg2: &str) -> Result<(), FltkError>; fn round(&self, arg2: f64) -> f64; fn clamp(&self, arg2: f64) -> f64; fn increment(&mut self, arg2: f64, arg3: i32) -> f64;
}
Expand description

Defines the methods implemented by all valuator widgets More details can be found in the wiki.

§Safety

fltk-rs traits depend on some FLTK internal code

§Warning

fltk-rs traits are non-exhaustive, to avoid future breakage if you try to implement them manually, use the Deref and DerefMut pattern or the widget_extends! macro

Required Methods§

source

fn set_bounds(&mut self, a: f64, b: f64)

Set bounds of a valuator

source

fn minimum(&self) -> f64

Get the minimum bound of a valuator

source

fn set_minimum(&mut self, a: f64)

Set the minimum bound of a valuator

source

fn maximum(&self) -> f64

Get the maximum bound of a valuator

source

fn set_maximum(&mut self, a: f64)

Set the maximum bound of a valuator

source

fn set_range(&mut self, a: f64, b: f64)

Set the range of a valuator

source

fn set_step(&mut self, a: f64, b: i32)

Set change step of a valuator. Rounds to multiples of a/b, or no rounding if a is zero

source

fn step(&self) -> f64

Get change step of a valuator

source

fn set_precision(&mut self, digits: i32)

Set the precision of a valuator

source

fn value(&self) -> f64

Get the value of a valuator

source

fn set_value(&mut self, arg2: f64)

Set the value of a valuator

source

fn format(&mut self, arg2: &str) -> Result<(), FltkError>

Set the format of a valuator

§Errors

Errors on failure to set the format of the widget

source

fn round(&self, arg2: f64) -> f64

Round the valuator

source

fn clamp(&self, arg2: f64) -> f64

Clamp the valuator

source

fn increment(&mut self, arg2: f64, arg3: i32) -> f64

Increment the valuator

Implementors§