pub struct TouchStyle(/* private fields */);Expand description
W Touch context menu popup default style.
Implementations§
Source§impl TouchStyle
impl TouchStyle
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.
Methods from Deref<Target = DefaultStyle>§
Methods from Deref<Target = DefaultStyle>§
Sourcepub fn close_delay(&self, delay: impl IntoVar<Duration>)
pub fn close_delay(&self, delay: impl IntoVar<Duration>)
P Delay awaited before actually closing when popup close is requested.
You can use this delay to await a closing animation for example. This property sets is_close_delaying
while awaiting the delay.
Sourcepub fn is_close_delaying(&self, state: impl IntoVar<bool>)
pub fn is_close_delaying(&self, state: impl IntoVar<bool>)
P If close was requested for this layered widget and it is just awaiting for the close_delay.
Methods from Deref<Target = Style>§
Sourcepub fn widget_build(&mut self) -> StyleBuilder
pub fn widget_build(&mut self) -> StyleBuilder
Build the style.
Sourcepub fn replace(&self, replace: impl IntoValue<bool>)
pub fn replace(&self, replace: impl IntoValue<bool>)
B Fully replace the contextual style.
This is not enabled by default, if set to true the contextual style properties are removed.
Sourcepub fn named_style_fn(&self, name: impl IntoValue<NamedStyleVar>)
pub fn named_style_fn(&self, name: impl IntoValue<NamedStyleVar>)
B Set in the default properties of a named style to define the contextual variable for that style.
During widget instantiation, if this is set by default in a style the contextual style is used as the defaults and only the properties set on the style instance replace them.
This property is part of the named styles pattern, see impl_named_style_fn! for more details.
Note that this property expects a ContextVar<StyleFn> as a value, not a variable directly, it will also only work if
set in the default properties of a style type.
Methods from Deref<Target = NonWidgetBase>§
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) -> WidgetBuilder
pub fn widget_build(&mut self) -> WidgetBuilder
Finishes the build.
This is the fallback build that simply returns the builder, inheritors should override this method.
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: Var<bool>,
expr: &'static str,
location: SourceLocation,
)
pub fn start_when_block( &mut self, inputs: Box<[WhenInput]>, state: Var<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 TouchStyle
impl Deref for TouchStyle
Auto Trait Implementations§
impl !Freeze for TouchStyle
impl !RefUnwindSafe for TouchStyle
impl Send for TouchStyle
impl !Sync for TouchStyle
impl !Unpin for TouchStyle
impl !UnwindSafe for TouchStyle
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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