FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    WindowDrawnDecorations

    struct · ferroui-controls · v0.5.0

    struct WindowDrawnDecorations
    

    Manages client-side window decorations (app-drawn window frame).

    This is a logical element that holds the decorations template and properties. The host of the top-level extracts the overlay, underlay and popover visuals from the template content and inserts them into its own visual tree.

    Pseudo-classes: :normal, :maximized, :fullscreen, :has-shadow, :has-border, :has-titlebar, :has-maximize, :has-fullscreen, :has-minimize, :has-close, :has-title.

    View source

    Members

    TYPE

    const TYPE: &'static $crate::TypeInfo
    

    The runtime type of this class.

    Source

    to_ref

    fn to_ref(self: &Self) -> $crate::Ref<WindowDrawnDecorations>
    

    Returns a strong reference to this object.

    Source

    PC_NORMAL

    const PC_NORMAL: &'static str
    

    Source

    PC_MAXIMIZED

    const PC_MAXIMIZED: &'static str
    

    Source

    PC_FULLSCREEN

    const PC_FULLSCREEN: &'static str
    

    Source

    PC_HAS_SHADOW

    const PC_HAS_SHADOW: &'static str
    

    Source

    PC_HAS_BORDER

    const PC_HAS_BORDER: &'static str
    

    Source

    PC_HAS_TITLEBAR

    const PC_HAS_TITLEBAR: &'static str
    

    Source

    PC_HAS_MAXIMIZE

    const PC_HAS_MAXIMIZE: &'static str
    

    Source

    PC_HAS_FULLSCREEN

    const PC_HAS_FULLSCREEN: &'static str
    

    Source

    PC_HAS_MINIMIZE

    const PC_HAS_MINIMIZE: &'static str
    

    Source

    PC_HAS_CLOSE

    const PC_HAS_CLOSE: &'static str
    

    Source

    PC_HAS_TITLE

    const PC_HAS_TITLE: &'static str
    

    Source

    PART_CLOSE_BUTTON

    const PART_CLOSE_BUTTON: &'static str
    

    Source

    PART_MINIMIZE_BUTTON

    const PART_MINIMIZE_BUTTON: &'static str
    

    Source

    PART_MAXIMIZE_BUTTON

    const PART_MAXIMIZE_BUTTON: &'static str
    

    Source

    PART_FULL_SCREEN_BUTTON

    const PART_FULL_SCREEN_BUTTON: &'static str
    

    Source

    PART_POPOVER_CLOSE_BUTTON

    const PART_POPOVER_CLOSE_BUTTON: &'static str
    

    Source

    PART_POPOVER_FULL_SCREEN_BUTTON

    const PART_POPOVER_FULL_SCREEN_BUTTON: &'static str
    

    Source

    PART_TITLE_BAR

    const PART_TITLE_BAR: &'static str
    

    Source

    template_property

    fn template_property() -> &'static StyledProperty<Option<Rc<dyn IWindowDrawnDecorationsTemplate>>>
    

    Defines the Template property.

    Source

    default_title_bar_height_property

    fn default_title_bar_height_property() -> &'static StyledProperty<f64>
    

    Defines the DefaultTitleBarHeight property.

    Source

    default_frame_thickness_property

    fn default_frame_thickness_property() -> &'static StyledProperty<Thickness>
    

    Defines the DefaultFrameThickness property.

    Source

    default_shadow_thickness_property

    fn default_shadow_thickness_property() -> &'static StyledProperty<Thickness>
    

    Defines the DefaultShadowThickness property.

    Source

    title_bar_height_property

    fn title_bar_height_property() -> &'static DirectProperty<WindowDrawnDecorations, f64>
    

    Defines the TitleBarHeight property.

    Source

    frame_thickness_property

    fn frame_thickness_property() -> &'static DirectProperty<WindowDrawnDecorations, Thickness>
    

    Defines the FrameThickness property.

    Source

    shadow_thickness_property

    fn shadow_thickness_property() -> &'static DirectProperty<WindowDrawnDecorations, Thickness>
    

    Defines the ShadowThickness property.

    Source

    has_shadow_property

    fn has_shadow_property() -> &'static DirectProperty<WindowDrawnDecorations, bool>
    

    Defines the HasShadow property.

    Source

    has_border_property

    fn has_border_property() -> &'static DirectProperty<WindowDrawnDecorations, bool>
    

    Defines the HasBorder property.

    Source

    has_title_bar_property

    fn has_title_bar_property() -> &'static DirectProperty<WindowDrawnDecorations, bool>
    

    Defines the HasTitleBar property.

    Source

    title_property

    fn title_property() -> &'static StyledProperty<Option<String>>
    

    Defines the Title property.

    Source

    title_bar_decorations_property

    fn title_bar_decorations_property() -> &'static AttachedProperty<TitleBarDecorations>
    

    Defines the TitleBarDecorations attached property.

    Source

    construct

    fn construct() -> Self
    

    Field initialisation only.

    Source

    new

    fn new() -> Ref<Self>
    

    Source

    render_scaling

    fn render_scaling(self: &Self) -> f64
    

    The current render scaling factor used for pixel-aligning decoration geometry (title bar height, frame/shadow thickness).

    Source

    set_render_scaling

    fn set_render_scaling(self: &Self, value: f64)
    

    Source

    template

    fn template(self: &Self) -> Option<Rc<dyn IWindowDrawnDecorationsTemplate>>
    

    The decorations template.

    Source

    set_template

    fn set_template(self: &Self, value: Option<Rc<dyn IWindowDrawnDecorationsTemplate>>)
    

    Source

    default_title_bar_height

    fn default_title_bar_height(self: &Self) -> f64
    

    The theme-set default titlebar height.

    Source

    set_default_title_bar_height

    fn set_default_title_bar_height(self: &Self, value: f64)
    

    Source

    default_frame_thickness

    fn default_frame_thickness(self: &Self) -> Thickness
    

    The theme-set default frame thickness.

    Source

    set_default_frame_thickness

    fn set_default_frame_thickness(self: &Self, value: Thickness)
    

    Source

    default_shadow_thickness

    fn default_shadow_thickness(self: &Self) -> Thickness
    

    The theme-set default shadow thickness.

    Source

    set_default_shadow_thickness

    fn set_default_shadow_thickness(self: &Self, value: Thickness)
    

    Source

    title_bar_height_override

    fn title_bar_height_override(self: &Self) -> f64
    

    The titlebar height override. When -1, falls back to default_title_bar_height.

    Source

    set_title_bar_height_override

    fn set_title_bar_height_override(self: &Self, value: f64)
    

    Source

    frame_thickness_override

    fn frame_thickness_override(self: &Self) -> Option<Thickness>
    

    The frame thickness override. When set, takes precedence over default_frame_thickness.

    Source

    set_frame_thickness_override

    fn set_frame_thickness_override(self: &Self, value: Option<Thickness>)
    

    Source

    shadow_thickness_override

    fn shadow_thickness_override(self: &Self) -> Option<Thickness>
    

    The shadow thickness override. When set, takes precedence over default_shadow_thickness.

    Source

    set_shadow_thickness_override

    fn set_shadow_thickness_override(self: &Self, value: Option<Thickness>)
    

    Source

    title

    fn title(self: &Self) -> Option<String>
    

    The window title displayed in the decorations. Mirrors the value set on the host window.

    Source

    set_title

    fn set_title(self: &Self, value: Option<String>)
    

    Source

    get_title_bar_decorations

    fn get_title_bar_decorations(element: &StyledElement) -> TitleBarDecorations
    

    Gets which title bar elements to display.

    Source

    set_title_bar_decorations

    fn set_title_bar_decorations(element: &StyledElement, value: TitleBarDecorations)
    

    Sets which title bar elements to display.

    Set this property on a window to control the elements displayed in its drawn title bar.

    Source

    title_bar_decorations

    fn title_bar_decorations(self: &Self) -> TitleBarDecorations
    

    Which title bar elements are requested to be displayed. Mirrors the value set on the host window.

    Source

    set_own_title_bar_decorations

    fn set_own_title_bar_decorations(self: &Self, value: TitleBarDecorations)
    

    Sets which title bar elements are requested to be displayed on these decorations (the instance property; the associated function set_title_bar_decorations is the attached property setter).

    Source

    caption_buttons_width

    fn caption_buttons_width(self: &Self) -> f64
    

    The built template content. The width the visible caption buttons (minimize, maximize, full screen, close) take at the right of the title bar, from the left edge of the leftmost of them to the right edge of the decorations; 0 without a visible caption button. Not in upstream: the caption-button inset of a TitleBar drawn in the title bar of the window (WinUI's AppWindowTitleBar.RightInset).

    Source

    content

    fn content(self: &Self) -> Option<Ref<WindowDrawnDecorationsContent>>
    

    Source

    title_bar_height

    fn title_bar_height(self: &Self) -> f64
    

    The effective titlebar height, resolving a -1 override to the default. 0 if the titlebar part is disabled.

    Source

    frame_thickness

    fn frame_thickness(self: &Self) -> Thickness
    

    The effective frame thickness: the override if explicitly set, otherwise the default. Zero if the border part is disabled.

    Source

    shadow_thickness

    fn shadow_thickness(self: &Self) -> Thickness
    

    The effective shadow thickness: the override if explicitly set, otherwise the default. Zero if the shadow part is disabled.

    Source

    has_shadow

    fn has_shadow(self: &Self) -> bool
    

    Whether the shadow decoration part is enabled.

    Source

    has_border

    fn has_border(self: &Self) -> bool
    

    Whether the border decoration part is enabled.

    Source

    has_title_bar

    fn has_title_bar(self: &Self) -> bool
    

    Whether the title bar decoration part is enabled.

    Source

    Trait implementations

    Availability

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