Skip to main content

StyleBasic

Trait StyleBasic 

Source
pub trait StyleBasic {
Show 16 methods // Provided methods fn focus_ring(&self, _ui: &mut Ui, _r: [i32; 4], _radius_dip: i32) { ... } fn drop_highlight(&self, ui: &mut Ui, r: [i32; 4]) { ... } fn button_size(&self, _ui: &mut Ui, _sp: &mut Sp<'_>) -> (i32, i32) { ... } fn button(&self, _ui: &mut Ui, _sp: &Sp<'_>) { ... } fn checkbox_size(&self, _ui: &mut Ui, _sp: &mut Sp<'_>) -> (i32, i32) { ... } fn checkbox(&self, _ui: &mut Ui, _sp: &Sp<'_>) { ... } fn radio_size(&self, _ui: &mut Ui, _sp: &mut Sp<'_>) -> (i32, i32) { ... } fn radio(&self, _ui: &mut Ui, _sp: &Sp<'_>) { ... } fn switch_size(&self, _ui: &mut Ui, _sp: &mut Sp<'_>) -> (i32, i32) { ... } fn switch(&self, _ui: &mut Ui, _sp: &Sp<'_>) { ... } fn slider_size(&self, _ui: &mut Ui, _sp: &mut Sp<'_>) -> (i32, i32) { ... } fn slider(&self, _ui: &mut Ui, _sp: &Sp<'_>) { ... } fn progress_size(&self, _ui: &mut Ui, _sp: &mut Sp<'_>) -> (i32, i32) { ... } fn progress(&self, _ui: &mut Ui, _sp: &Sp<'_>) { ... } fn separator_size(&self, _ui: &mut Ui, _sp: &mut Sp<'_>) -> i32 { ... } fn separator(&self, _ui: &mut Ui, _sp: &Sp<'_>) { ... }
}
Expand description

buttons, check boxes, radios, switches, sliders, progress, separators (basic.s)

Provided Methods§

Source

fn focus_ring(&self, _ui: &mut Ui, _r: [i32; 4], _radius_dip: i32)

focus visual around rectangle r (px) of a control with that corner radius (DIP)

Source

fn drop_highlight(&self, ui: &mut Ui, r: [i32; 4])

a drop target with a matching drag over it (rectangle r, px; drop_target): by default a 2 DIP accent frame over a light accent tint

Source

fn button_size(&self, _ui: &mut Ui, _sp: &mut Sp<'_>) -> (i32, i32)

buttons (ST_ACCENT, ST_SUBTLE, ST_CHECKED, ST_LARGE, ST_COMPACT, ST_ICON_ONLY)

Source

fn button(&self, _ui: &mut Ui, _sp: &Sp<'_>)

Source

fn checkbox_size(&self, _ui: &mut Ui, _sp: &mut Sp<'_>) -> (i32, i32)

value 0 / 1 / 2 (indeterminate)

Source

fn checkbox(&self, _ui: &mut Ui, _sp: &Sp<'_>)

Source

fn radio_size(&self, _ui: &mut Ui, _sp: &mut Sp<'_>) -> (i32, i32)

value 1 = selected

Source

fn radio(&self, _ui: &mut Ui, _sp: &Sp<'_>)

Source

fn switch_size(&self, _ui: &mut Ui, _sp: &mut Sp<'_>) -> (i32, i32)

value 0 / 1, value2 knob position 0 .. 256 (animated)

Source

fn switch(&self, _ui: &mut Ui, _sp: &Sp<'_>)

Source

fn slider_size(&self, _ui: &mut Ui, _sp: &mut Sp<'_>) -> (i32, i32)

size: value 1 = vertical; must set s[0] = thumb px along the axis; paint: value thumb offset, value2 track length (px)

Source

fn slider(&self, _ui: &mut Ui, _sp: &Sp<'_>)

Source

fn progress_size(&self, _ui: &mut Ui, _sp: &mut Sp<'_>) -> (i32, i32)

value, value2 maximum

Source

fn progress(&self, _ui: &mut Ui, _sp: &Sp<'_>)

Source

fn separator_size(&self, _ui: &mut Ui, _sp: &mut Sp<'_>) -> i32

thickness incl. margins; paint: value 1 = horizontal line (in a vertical box)

Source

fn separator(&self, _ui: &mut Ui, _sp: &Sp<'_>)

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§