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).
Members
TYPEto_refglyph_propertymirrored_when_right_to_left_propertyconstructnewglyphset_glyphmirrored_when_right_to_leftset_mirrored_when_right_to_left
TYPE
const TYPE: &'static $crate::TypeInfo
The runtime type of this class.
to_ref
fn to_ref(self: &Self) -> $crate::Ref<FontIcon>
Returns a strong reference to this object.
glyph_property
fn glyph_property() -> &'static StyledProperty<String>
Defines the Glyph property: the text drawn with the icon font, one glyph or more.
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.
construct
fn construct() -> Self
Creates the class data; see ferroui_base::FerroObject::construct.
new
fn new() -> Ref<Self>
glyph
fn glyph(self: &Self) -> String
Gets the text drawn with the icon font.
set_glyph
fn set_glyph(self: &Self, value: impl Into<String>)
Sets the text drawn with the icon font.
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.
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.
Trait implementations
SendSyncFreezeUnsafeUnpinUnpinUnwindSafeRefUnwindSafeTemplatedControlImplExtControlImplExtBorrow<T>BorrowMut<T>Into<U>From<T>TryInto<U>TryFrom<U>ReceiverAnyInputElementImplExtInteractiveImplExtLayoutableImplExtFerroObjectImplExtStyledElementImplExtClassDefaultsVisualImplExtErasedDestructorIntoEitherDerefUpcast<T>Upcast<FontIcon>StaticTypeObjectTypeSubclassable<T>DefaultConstructibleStyledElementImplLayoutableImplInteractiveImplInputElementImplControlImplFerroObjectImplVisualImplTemplatedControlImpl
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.