FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    FontIcon

    struct · ferroui-controls · v0.5.0

    struct FontIcon
    

    Represents an icon that uses a glyph of a font as its content (WinUI's FontIcon).

    The template of the theme draws glyph in its text part PART_Text with the font family, size, style, weight and foreground of the icon. The size is 20 by default, as in WinUI; the font family is the theme resource SymbolThemeFontFamily (Segoe Fluent Icons in the WinUI theme), set by the theme, where WinUI takes it from the default font of a font icon. The font is not bundled: off Windows an application supplies a symbol font and sets SymbolThemeFontFamily or the icon's FontFamily (docs/porting/winui-controls.md, section 5.2). The WinUI theme has the template; the Fluent and Simple themes have none.

    Missing (docs/porting/winui-controls.md, FontIcon): IsTextScaleFactorEnabled (FerroUI has no text scale factor).

    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<FontIcon>
    

    Returns a strong reference to this object.

    Source

    glyph_property

    fn glyph_property() -> &'static StyledProperty<String>
    

    Defines the Glyph property: the text drawn with the icon font, one glyph or more.

    Source

    mirrored_when_right_to_left_property

    fn mirrored_when_right_to_left_property() -> &'static StyledProperty<bool>
    

    Defines the MirroredWhenRightToLeft property: whether the glyph is mirrored when the flow direction is right to left. false by default.

    Source

    construct

    fn construct() -> Self
    

    Creates the class data; see ferroui_base::FerroObject::construct.

    Source

    new

    fn new() -> Ref<Self>
    

    Source

    glyph

    fn glyph(self: &Self) -> String
    

    Gets the text drawn with the icon font.

    Source

    set_glyph

    fn set_glyph(self: &Self, value: impl Into<String>)
    

    Sets the text drawn with the icon font.

    Source

    mirrored_when_right_to_left

    fn mirrored_when_right_to_left(self: &Self) -> bool
    

    Gets whether the glyph is mirrored when the flow direction is right to left.

    Source

    set_mirrored_when_right_to_left

    fn set_mirrored_when_right_to_left(self: &Self, value: bool)
    

    Sets whether the glyph is mirrored when the flow direction is right to left.

    Source

    Trait implementations

    Availability

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