SymbolIcon
struct · ferroui-controls · v0.5.0
struct SymbolIcon
Represents an icon that uses a glyph of the symbol font of the theme as its content (WinUI's
SymbolIcon).
The template of the theme draws the glyph of symbol (Symbol::glyph) in
its text part PART_Text, with the font of the theme resource SymbolThemeFontFamily (Segoe
Fluent Icons in the WinUI theme), 20 pixels, normal style and weight; the foreground is the
icon's. The font is not bundled: off Windows an application supplies a symbol font with the
same code points and sets SymbolThemeFontFamily to it (docs/porting/winui-controls.md,
section 5.2). The WinUI theme has the template; the Fluent and Simple themes have none.
Deviation (docs/porting/winui-controls.md, SymbolIcon): WinUI builds the text block in code
(CSymbolIcon::ApplyTemplate) with the font Segoe Fluent Icons written in; here the
template is the theme's and the font its resource.
Members
TYPE
const TYPE: &'static $crate::TypeInfo
The runtime type of this class.
to_ref
fn to_ref(self: &Self) -> $crate::Ref<SymbolIcon>
Returns a strong reference to this object.
symbol_property
fn symbol_property() -> &'static StyledProperty<Symbol>
Defines the Symbol property: the symbol the icon shows. Emoji by default, as in
WinUI (CSymbolIcon::m_nSymbol).
construct
fn construct() -> Self
Creates the class data; see ferroui_base::FerroObject::construct.
new
fn new() -> Ref<Self>
with_symbol
fn with_symbol(symbol: Symbol) -> Ref<Self>
Creates an icon that shows symbol (WinUI's SymbolIcon(Symbol)).
symbol
fn symbol(self: &Self) -> Symbol
Gets the symbol the icon shows.
set_symbol
fn set_symbol(self: &Self, value: Symbol)
Sets the symbol the icon shows.
Trait implementations
SendSyncFreezeUnsafeUnpinUnpinUnwindSafeRefUnwindSafeTemplatedControlImplExtControlImplExtBorrow<T>BorrowMut<T>Into<U>From<T>TryInto<U>TryFrom<U>ReceiverAnyInputElementImplExtInteractiveImplExtLayoutableImplExtFerroObjectImplExtStyledElementImplExtClassDefaultsVisualImplExtErasedDestructorIntoEitherDerefUpcast<T>Upcast<SymbolIcon>StaticTypeObjectTypeSubclassable<T>DefaultConstructibleStyledElementImplLayoutableImplInteractiveImplInputElementImplControlImplFerroObjectImplVisualImplTemplatedControlImpl
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.