pub trait DevUiExt {
Show 28 methods
// Required methods
fn dev_button(
&mut self,
id: impl Into<String>,
text: impl Into<WidgetText>,
) -> Response;
fn dev_button_with(
&mut self,
id: impl Into<String>,
text: impl Into<WidgetText>,
options: ButtonOptions,
) -> Response;
fn dev_link(
&mut self,
id: impl Into<String>,
text: impl Into<WidgetText>,
) -> Response;
fn dev_hyperlink(
&mut self,
id: impl Into<String>,
url: impl ToString,
) -> Response;
fn dev_hyperlink_to(
&mut self,
id: impl Into<String>,
label: impl Into<WidgetText>,
url: impl ToString,
) -> Response;
fn dev_image<'a>(
&mut self,
id: impl Into<String>,
description: impl Into<String>,
source: impl Into<ImageSource<'a>>,
) -> Response;
fn dev_label(
&mut self,
id: impl Into<String>,
text: impl Into<WidgetText>,
) -> Response;
fn dev_checkbox(
&mut self,
id: impl Into<String>,
value: &mut bool,
text: impl Into<WidgetText>,
) -> Response;
fn dev_checkbox_with(
&mut self,
id: impl Into<String>,
value: &mut bool,
text: impl Into<WidgetText>,
options: CheckboxOptions,
) -> Response;
fn dev_text_edit(
&mut self,
id: impl Into<String>,
text: &mut String,
) -> Response;
fn dev_text_edit_with(
&mut self,
id: impl Into<String>,
text: &mut String,
options: TextEditOptions,
) -> Response;
fn dev_slider(
&mut self,
id: impl Into<String>,
value: &mut f32,
range: RangeInclusive<f32>,
) -> Response;
fn dev_combo_box<T: ToString>(
&mut self,
id: impl Into<String>,
label: impl Into<String>,
selected: &mut usize,
options: &[T],
) -> Response;
fn dev_drag_value(
&mut self,
id: impl Into<String>,
value: &mut f32,
) -> Response;
fn dev_drag_value_range(
&mut self,
id: impl Into<String>,
value: &mut f32,
range: RangeInclusive<f32>,
) -> Response;
fn dev_drag_value_i32(
&mut self,
id: impl Into<String>,
value: &mut i32,
) -> Response;
fn dev_drag_value_i32_range(
&mut self,
id: impl Into<String>,
value: &mut i32,
range: RangeInclusive<i32>,
) -> Response;
fn dev_text_edit_multiline(
&mut self,
id: impl Into<String>,
text: &mut String,
) -> Response;
fn dev_toggle_value(
&mut self,
id: impl Into<String>,
selected: &mut bool,
text: impl Into<WidgetText>,
) -> Response;
fn dev_radio_value<V: PartialEq + Clone>(
&mut self,
id: impl Into<String>,
current: &mut V,
alternative: V,
text: impl Into<WidgetText>,
) -> Response;
fn dev_selectable_value<V: PartialEq + Clone>(
&mut self,
id: impl Into<String>,
current: &mut V,
alternative: V,
text: impl Into<WidgetText>,
) -> Response;
fn dev_separator(&mut self, id: impl Into<String>) -> Response;
fn dev_spinner(&mut self, id: impl Into<String>) -> Response;
fn dev_progress_bar(
&mut self,
id: impl Into<String>,
progress: f32,
) -> Response;
fn dev_progress_bar_with(
&mut self,
id: impl Into<String>,
progress: f32,
options: ProgressBarOptions,
) -> Response;
fn dev_color_edit(
&mut self,
id: impl Into<String>,
color: &mut Color32,
) -> Response;
fn dev_menu_button<R>(
&mut self,
id: impl Into<String>,
text: impl Into<WidgetText>,
add_contents: impl FnOnce(&mut Ui) -> R,
) -> InnerResponse<Option<R>>;
fn dev_collapsing<R>(
&mut self,
id: impl Into<String>,
open: &mut bool,
heading: impl Into<WidgetText>,
add_contents: impl FnOnce(&mut Ui) -> R,
) -> CollapsingResponse<R>;
}Expand description
Helper extensions for recording common widgets with explicit ids.
Prefer these for standard widgets; they auto-populate role/type/value/label metadata.
Required Methods§
Add a button with an explicit id.
Add a selected-aware button with explicit metadata.
Sourcefn dev_link(
&mut self,
id: impl Into<String>,
text: impl Into<WidgetText>,
) -> Response
fn dev_link( &mut self, id: impl Into<String>, text: impl Into<WidgetText>, ) -> Response
Add a link with an explicit id.
Sourcefn dev_hyperlink(
&mut self,
id: impl Into<String>,
url: impl ToString,
) -> Response
fn dev_hyperlink( &mut self, id: impl Into<String>, url: impl ToString, ) -> Response
Add a hyperlink with an explicit id, using its URL as label and value metadata.
Sourcefn dev_hyperlink_to(
&mut self,
id: impl Into<String>,
label: impl Into<WidgetText>,
url: impl ToString,
) -> Response
fn dev_hyperlink_to( &mut self, id: impl Into<String>, label: impl Into<WidgetText>, url: impl ToString, ) -> Response
Add a hyperlink with an explicit id, label, and URL metadata.
Sourcefn dev_image<'a>(
&mut self,
id: impl Into<String>,
description: impl Into<String>,
source: impl Into<ImageSource<'a>>,
) -> Response
fn dev_image<'a>( &mut self, id: impl Into<String>, description: impl Into<String>, source: impl Into<ImageSource<'a>>, ) -> Response
Add an image with an explicit id and developer-provided description.
Sourcefn dev_label(
&mut self,
id: impl Into<String>,
text: impl Into<WidgetText>,
) -> Response
fn dev_label( &mut self, id: impl Into<String>, text: impl Into<WidgetText>, ) -> Response
Add a label with an explicit id.
Sourcefn dev_checkbox(
&mut self,
id: impl Into<String>,
value: &mut bool,
text: impl Into<WidgetText>,
) -> Response
fn dev_checkbox( &mut self, id: impl Into<String>, value: &mut bool, text: impl Into<WidgetText>, ) -> Response
Add a checkbox with an explicit id.
Sourcefn dev_checkbox_with(
&mut self,
id: impl Into<String>,
value: &mut bool,
text: impl Into<WidgetText>,
options: CheckboxOptions,
) -> Response
fn dev_checkbox_with( &mut self, id: impl Into<String>, value: &mut bool, text: impl Into<WidgetText>, options: CheckboxOptions, ) -> Response
Add an indeterminate-aware checkbox with explicit metadata.
Sourcefn dev_text_edit(
&mut self,
id: impl Into<String>,
text: &mut String,
) -> Response
fn dev_text_edit( &mut self, id: impl Into<String>, text: &mut String, ) -> Response
Add a text edit with an explicit id.
Sourcefn dev_text_edit_with(
&mut self,
id: impl Into<String>,
text: &mut String,
options: TextEditOptions,
) -> Response
fn dev_text_edit_with( &mut self, id: impl Into<String>, text: &mut String, options: TextEditOptions, ) -> Response
Add a text edit with explicit mode metadata.
Sourcefn dev_slider(
&mut self,
id: impl Into<String>,
value: &mut f32,
range: RangeInclusive<f32>,
) -> Response
fn dev_slider( &mut self, id: impl Into<String>, value: &mut f32, range: RangeInclusive<f32>, ) -> Response
Add a slider with an explicit id.
Sourcefn dev_combo_box<T: ToString>(
&mut self,
id: impl Into<String>,
label: impl Into<String>,
selected: &mut usize,
options: &[T],
) -> Response
fn dev_combo_box<T: ToString>( &mut self, id: impl Into<String>, label: impl Into<String>, selected: &mut usize, options: &[T], ) -> Response
Add a combo box with an explicit id.
Sourcefn dev_drag_value(&mut self, id: impl Into<String>, value: &mut f32) -> Response
fn dev_drag_value(&mut self, id: impl Into<String>, value: &mut f32) -> Response
Add a float drag value with an explicit id.
Sourcefn dev_drag_value_range(
&mut self,
id: impl Into<String>,
value: &mut f32,
range: RangeInclusive<f32>,
) -> Response
fn dev_drag_value_range( &mut self, id: impl Into<String>, value: &mut f32, range: RangeInclusive<f32>, ) -> Response
Add a float drag value with an explicit constrained range.
Sourcefn dev_drag_value_i32(
&mut self,
id: impl Into<String>,
value: &mut i32,
) -> Response
fn dev_drag_value_i32( &mut self, id: impl Into<String>, value: &mut i32, ) -> Response
Add an integer drag value with an explicit id.
Sourcefn dev_drag_value_i32_range(
&mut self,
id: impl Into<String>,
value: &mut i32,
range: RangeInclusive<i32>,
) -> Response
fn dev_drag_value_i32_range( &mut self, id: impl Into<String>, value: &mut i32, range: RangeInclusive<i32>, ) -> Response
Add an integer drag value with an explicit constrained range.
Sourcefn dev_text_edit_multiline(
&mut self,
id: impl Into<String>,
text: &mut String,
) -> Response
fn dev_text_edit_multiline( &mut self, id: impl Into<String>, text: &mut String, ) -> Response
Add a multiline text edit with an explicit id.
Sourcefn dev_toggle_value(
&mut self,
id: impl Into<String>,
selected: &mut bool,
text: impl Into<WidgetText>,
) -> Response
fn dev_toggle_value( &mut self, id: impl Into<String>, selected: &mut bool, text: impl Into<WidgetText>, ) -> Response
Add a toggle value with an explicit id.
Sourcefn dev_radio_value<V: PartialEq + Clone>(
&mut self,
id: impl Into<String>,
current: &mut V,
alternative: V,
text: impl Into<WidgetText>,
) -> Response
fn dev_radio_value<V: PartialEq + Clone>( &mut self, id: impl Into<String>, current: &mut V, alternative: V, text: impl Into<WidgetText>, ) -> Response
Add a radio value with an explicit id.
Sourcefn dev_selectable_value<V: PartialEq + Clone>(
&mut self,
id: impl Into<String>,
current: &mut V,
alternative: V,
text: impl Into<WidgetText>,
) -> Response
fn dev_selectable_value<V: PartialEq + Clone>( &mut self, id: impl Into<String>, current: &mut V, alternative: V, text: impl Into<WidgetText>, ) -> Response
Add a selectable value with an explicit id.
Sourcefn dev_separator(&mut self, id: impl Into<String>) -> Response
fn dev_separator(&mut self, id: impl Into<String>) -> Response
Add a separator with an explicit id.
Sourcefn dev_spinner(&mut self, id: impl Into<String>) -> Response
fn dev_spinner(&mut self, id: impl Into<String>) -> Response
Add a spinner with an explicit id.
Sourcefn dev_progress_bar(&mut self, id: impl Into<String>, progress: f32) -> Response
fn dev_progress_bar(&mut self, id: impl Into<String>, progress: f32) -> Response
Add a progress bar with an explicit id.
Sourcefn dev_progress_bar_with(
&mut self,
id: impl Into<String>,
progress: f32,
options: ProgressBarOptions,
) -> Response
fn dev_progress_bar_with( &mut self, id: impl Into<String>, progress: f32, options: ProgressBarOptions, ) -> Response
Add a progress bar with explicit overlay text options.
Sourcefn dev_color_edit(
&mut self,
id: impl Into<String>,
color: &mut Color32,
) -> Response
fn dev_color_edit( &mut self, id: impl Into<String>, color: &mut Color32, ) -> Response
Add a color-edit button with an explicit id.
Add a menu button with an explicit id.
Sourcefn dev_collapsing<R>(
&mut self,
id: impl Into<String>,
open: &mut bool,
heading: impl Into<WidgetText>,
add_contents: impl FnOnce(&mut Ui) -> R,
) -> CollapsingResponse<R>
fn dev_collapsing<R>( &mut self, id: impl Into<String>, open: &mut bool, heading: impl Into<WidgetText>, add_contents: impl FnOnce(&mut Ui) -> R, ) -> CollapsingResponse<R>
Add a collapsing header with an explicit id, bound to app state.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.