pub struct Grid<'a, 'ctx> { /* private fields */ }Expand description
A grid container for arranging elements in columns.
Implementations§
Source§impl<'a, 'ctx> Grid<'a, 'ctx>
impl<'a, 'ctx> Grid<'a, 'ctx>
Sourcepub fn slider(
&mut self,
label: &str,
value: &mut f32,
range: RangeInclusive<f32>,
)
pub fn slider( &mut self, label: &str, value: &mut f32, range: RangeInclusive<f32>, )
A floating-point slider.
Sourcepub fn slider_int(
&mut self,
label: &str,
value: &mut i32,
range: RangeInclusive<i32>,
)
pub fn slider_int( &mut self, label: &str, value: &mut i32, range: RangeInclusive<i32>, )
An integer slider.
Sourcepub fn color_picker(&mut self, label: &str, value: &mut [f32; 3])
pub fn color_picker(&mut self, label: &str, value: &mut [f32; 3])
An RGB color picker.
Sourcepub fn color_picker4(&mut self, label: &str, value: &mut [f32; 4])
pub fn color_picker4(&mut self, label: &str, value: &mut [f32; 4])
An RGBA color picker.
Sourcepub fn text_input(&mut self, label: &str, value: &mut String)
pub fn text_input(&mut self, label: &str, value: &mut String)
A text input field.
Sourcepub fn dropdown(&mut self, label: &str, selected: &mut usize, options: &[&str])
pub fn dropdown(&mut self, label: &str, selected: &mut usize, options: &[&str])
A dropdown selector.
A button. Returns true for one frame when clicked.
Sourcepub fn progress_bar(&mut self, label: &str, value: f64, accent: AccentColor)
pub fn progress_bar(&mut self, label: &str, value: f64, accent: AccentColor)
A progress bar (value from 0.0 to 1.0).
Sourcepub fn progress_bar_with_subtitle(
&mut self,
label: &str,
value: f64,
accent: AccentColor,
subtitle: &str,
)
pub fn progress_bar_with_subtitle( &mut self, label: &str, value: f64, accent: AccentColor, subtitle: &str, )
A progress bar with subtitle text.
Sourcepub fn stat(
&mut self,
label: &str,
value: &str,
subvalue: Option<&str>,
accent: AccentColor,
)
pub fn stat( &mut self, label: &str, value: &str, subvalue: Option<&str>, accent: AccentColor, )
A stat card.
Sourcepub fn status(
&mut self,
label: &str,
active: bool,
active_text: Option<&str>,
inactive_text: Option<&str>,
active_color: AccentColor,
inactive_color: AccentColor,
)
pub fn status( &mut self, label: &str, active: bool, active_text: Option<&str>, inactive_text: Option<&str>, active_color: AccentColor, inactive_color: AccentColor, )
A status indicator.
Sourcepub fn mini_chart(
&mut self,
label: &str,
values: &[f32],
unit: Option<&str>,
accent: AccentColor,
)
pub fn mini_chart( &mut self, label: &str, values: &[f32], unit: Option<&str>, accent: AccentColor, )
A mini sparkline chart.
Auto Trait Implementations§
impl<'a, 'ctx> Freeze for Grid<'a, 'ctx>
impl<'a, 'ctx> !RefUnwindSafe for Grid<'a, 'ctx>
impl<'a, 'ctx> Send for Grid<'a, 'ctx>
impl<'a, 'ctx> !Sync for Grid<'a, 'ctx>
impl<'a, 'ctx> Unpin for Grid<'a, 'ctx>
impl<'a, 'ctx> UnsafeUnpin for Grid<'a, 'ctx>
impl<'a, 'ctx> !UnwindSafe for Grid<'a, 'ctx>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more