pub struct SettingsEditor(/* private fields */);
Expand description
W
Settings editor widget.
Implementations§
Source§impl SettingsEditor
impl SettingsEditor
Sourcepub fn category_item_fn(&self, wgt_fn: impl IntoVar<WidgetFn<CategoryItemArgs>>)
pub fn category_item_fn(&self, wgt_fn: impl IntoVar<WidgetFn<CategoryItemArgs>>)
P
Widget function that converts CategoryItemArgs
to a category item on a category list.
Sets the CATEGORY_ITEM_FN_VAR
.
Source§impl SettingsEditor
impl SettingsEditor
Sourcepub fn categories_list_fn(
&self,
wgt_fn: impl IntoVar<WidgetFn<CategoriesListArgs>>,
)
pub fn categories_list_fn( &self, wgt_fn: impl IntoVar<WidgetFn<CategoriesListArgs>>, )
P
Widget function that converts CategoriesListArgs
to a category list.
Sets the CATEGORIES_LIST_FN_VAR
.
Source§impl SettingsEditor
impl SettingsEditor
Sourcepub fn category_header_fn(
&self,
wgt_fn: impl IntoVar<WidgetFn<CategoryHeaderArgs>>,
)
pub fn category_header_fn( &self, wgt_fn: impl IntoVar<WidgetFn<CategoryHeaderArgs>>, )
P
Widget function that converts CategoryHeaderArgs
to a category settings header.
Sets the CATEGORY_HEADER_FN_VAR
.
Source§impl SettingsEditor
impl SettingsEditor
Sourcepub fn setting_fn(&self, wgt_fn: impl IntoVar<WidgetFn<SettingArgs>>)
pub fn setting_fn(&self, wgt_fn: impl IntoVar<WidgetFn<SettingArgs>>)
P
Widget function that converts SettingArgs
to a setting editor entry on a settings list.
Note that the widget must set setting
or some features will not work.
Sets the SETTING_FN_VAR
.
Source§impl SettingsEditor
impl SettingsEditor
Sourcepub fn settings_fn(&self, wgt_fn: impl IntoVar<WidgetFn<SettingsArgs>>)
pub fn settings_fn(&self, wgt_fn: impl IntoVar<WidgetFn<SettingsArgs>>)
P
Widget function that converts SettingsArgs
to a settings list.
Sets the SETTINGS_FN_VAR
.
Source§impl SettingsEditor
impl SettingsEditor
Sourcepub fn settings_search_fn(
&self,
wgt_fn: impl IntoVar<WidgetFn<SettingsSearchArgs>>,
)
pub fn settings_search_fn( &self, wgt_fn: impl IntoVar<WidgetFn<SettingsSearchArgs>>, )
P
Widget function that converts SettingsSearchArgs
to a search box.
Sets the SETTINGS_SEARCH_FN_VAR
.
Source§impl SettingsEditor
impl SettingsEditor
Sourcepub fn widget_new() -> Self
pub fn widget_new() -> Self
Start building a new instance.
Sourcepub fn widget_type() -> WidgetType
pub fn widget_type() -> WidgetType
Gets the widget type info.
Source§impl SettingsEditor
impl SettingsEditor
Sourcepub fn save_state(&self, enabled: impl IntoValue<SaveState>)
pub fn save_state(&self, enabled: impl IntoValue<SaveState>)
P
Save and restore settings search and selected category.
This property is enabled by default in the SettingsEditor!
widget, without a key. Note that without a config key
this feature only actually enables if the settings widget ID has a name.
Methods from Deref<Target = WidgetBase>§
Sourcepub fn widget_builder(&mut self) -> &mut WidgetBuilder
pub fn widget_builder(&mut self) -> &mut WidgetBuilder
Returns a mutable reference to the widget builder.
Sourcepub fn widget_when(&mut self) -> Option<&mut WhenInfo>
pub fn widget_when(&mut self) -> Option<&mut WhenInfo>
Returns a mutable reference to the when
block if called inside a when block.
Sourcepub fn widget_take(&mut self) -> WidgetBuilder
pub fn widget_take(&mut self) -> WidgetBuilder
Takes the widget builder, finishing the widget macro build.
After this call trying to set a property using self
will panic,
the returned builder can still be manipulated directly.
Sourcepub fn widget_build(&mut self) -> impl UiNode
pub fn widget_build(&mut self) -> impl UiNode
Build the widget.
After this call trying to set a property will panic.
Sourcepub fn widget_importance(&mut self) -> &mut Importance
pub fn widget_importance(&mut self) -> &mut Importance
Returns a mutable reference to the importance of the next property assigns, unsets or when blocks.
Note that during the widget_intrinsic
call this is Importance::WIDGET
and after it is Importance::INSTANCE
.
Sourcepub fn start_when_block(
&mut self,
inputs: Box<[WhenInput]>,
state: Box<dyn VarBoxed<bool>>,
expr: &'static str,
location: SourceLocation,
)
pub fn start_when_block( &mut self, inputs: Box<[WhenInput]>, state: Box<dyn VarBoxed<bool>>, expr: &'static str, location: SourceLocation, )
Start building a when
block, all properties set after this call are pushed in the when block.
Sourcepub fn end_when_block(&mut self)
pub fn end_when_block(&mut self)
End the current when
block, all properties set after this call are pushed in the widget.
Trait Implementations§
Source§impl Deref for SettingsEditor
impl Deref for SettingsEditor
Auto Trait Implementations§
impl !Freeze for SettingsEditor
impl !RefUnwindSafe for SettingsEditor
impl Send for SettingsEditor
impl !Sync for SettingsEditor
impl Unpin for SettingsEditor
impl !UnwindSafe for SettingsEditor
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more