FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    StyleQuery

    struct · ferroui-base · v0.5.0

    struct StyleQuery
    

    A query in a ContainerQuery.

    Queries are built with the functions of StyleQueries and the chaining methods of this type.

    View source

    Members

    width

    fn width(self: Self, operator: StyleQueryComparisonOperator, value: f64) -> StyleQuery
    

    Returns a query which additionally matches the width of the container.

    Source

    height

    fn height(self: Self, operator: StyleQueryComparisonOperator, value: f64) -> StyleQuery
    

    Returns a query which additionally matches the height of the container.

    Source

    match_

    fn match_(self: &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.

    Source

    to_string_with_owner

    fn to_string_with_owner(self: &Self, owner: Option<&ContainerQuery>) -> String
    

    Gets a string representing the query.

    Source

    Trait implementations

    • Send
    • Sync
    • Freeze
    • UnsafeUnpin
    • Unpin
    • UnwindSafe
    • RefUnwindSafe
    • PropertyValue
    • AnyValue
    • ClassDefaults
    • Borrow<T>
    • BorrowMut<T>
    • CloneToUninit
    • Into<U>
    • From<T>
    • TryInto<U>
    • TryFrom<U>
    • Any
    • ToOwned
    • ToString
    • ErasedDestructor
    • IntoEither
    • Clone
    • PartialEq
    • Display
    • Debug
    • MarkupTyped

    Availability

    Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.