pub struct StyleQuery(/* private fields */);Expand description
A query in a ContainerQuery.
Queries are built with the functions of StyleQueries
and the chaining methods of this type.
Implementations§
Source§impl StyleQuery
impl StyleQuery
Sourcepub fn width(
self,
operator: StyleQueryComparisonOperator,
value: f64,
) -> StyleQuery
pub fn width( self, operator: StyleQueryComparisonOperator, value: f64, ) -> StyleQuery
Returns a query which additionally matches the width of the container.
Sourcepub fn height(
self,
operator: StyleQueryComparisonOperator,
value: f64,
) -> StyleQuery
pub fn height( self, operator: StyleQueryComparisonOperator, value: f64, ) -> StyleQuery
Returns a query which additionally matches the height of the container.
Source§impl StyleQuery
impl StyleQuery
Sourcepub fn match_(
&self,
control: &StyledElement,
parent: Option<&StyleBase>,
subscribe: bool,
container_name: Option<&str>,
) -> SelectorMatch
pub fn match_( &self, control: &StyledElement, parent: Option<&StyleBase>, subscribe: bool, container_name: Option<&str>, ) -> SelectorMatch
Tries to match the query with a control.
parent is the parent container, if the container holding the query
is a nested container. With subscribe, a match whose state can
change over time carries an activator that tracks it; without, the
match is only evaluated for the current state. container_name is the
name of the container to query.
Sourcepub fn to_string_with_owner(&self, owner: Option<&ContainerQuery>) -> String
pub fn to_string_with_owner(&self, owner: Option<&ContainerQuery>) -> String
Gets a string representing the query.
Trait Implementations§
Source§impl Clone for StyleQuery
impl Clone for StyleQuery
Source§impl Debug for StyleQuery
impl Debug for StyleQuery
Source§impl Display for StyleQuery
impl Display for StyleQuery
Source§impl MarkupTyped for StyleQuery
impl MarkupTyped for StyleQuery
Source§const MARKUP: &'static MarkupType
const MARKUP: &'static MarkupType
The markup metadata of the type.
Auto Trait Implementations§
impl !RefUnwindSafe for StyleQuery
impl !Send for StyleQuery
impl !Sync for StyleQuery
impl !UnwindSafe for StyleQuery
impl Freeze for StyleQuery
impl Unpin for StyleQuery
impl UnsafeUnpin for StyleQuery
Blanket Implementations§
Source§impl<T> AnyValue for Twhere
T: PartialEq + 'static,
impl<T> AnyValue for Twhere
T: PartialEq + 'static,
fn any_value_as_any(&self) -> &(dyn Any + 'static)
fn any_value_eq(&self, other: &(dyn AnyValue + 'static)) -> bool
fn any_value_type_name(&self) -> &'static str
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
Source§impl<T> ClassDefaults for Twhere
T: ?Sized,
impl<T> ClassDefaults for Twhere
T: ?Sized,
Source§fn static_constructor()
fn static_constructor()
The static constructor of a type: work done once per thread, after
the properties of the type are registered and before its first
instance exists (class handlers,
affects_render, metadata
overrides). Read more