pub struct ComponentTheme { /* private fields */ }Expand description
Theme-derived presentations and shared role styles for common components.
Implementations§
Source§impl ComponentTheme
impl ComponentTheme
Sourcepub fn from_tokens(tokens: &SemanticTokens) -> Self
pub fn from_tokens(tokens: &SemanticTokens) -> Self
Builds the canonical component theme from semantic tokens.
pub fn get_text_style(&self, role: ComponentRole) -> &TextStyle
Sourcepub const fn get_panel(&self) -> &BlockStyle
pub const fn get_panel(&self) -> &BlockStyle
Returns the framed-surface block style.
Sourcepub const fn get_panel_focused(&self) -> &BlockStyle
pub const fn get_panel_focused(&self) -> &BlockStyle
Returns the focused framed-surface block style.
Sourcepub fn get_list_style(&self, role: ListRole) -> &TextStyle
pub fn get_list_style(&self, role: ListRole) -> &TextStyle
Returns the style assigned to one List-specific role.
Sourcepub fn get_tree_style(&self, role: TreeRole) -> &TextStyle
pub fn get_tree_style(&self, role: TreeRole) -> &TextStyle
Returns the style assigned to one Tree-specific role.
Sourcepub fn get_table_style(&self, role: TableRole) -> &BlockStyle
pub fn get_table_style(&self, role: TableRole) -> &BlockStyle
Returns the block style assigned to one Table-specific cell role.
Sourcepub fn get_scrollbar_style(&self, role: ScrollbarRole) -> &TextStyle
pub fn get_scrollbar_style(&self, role: ScrollbarRole) -> &TextStyle
Returns the style assigned to one Scrollbar-specific role.
Sourcepub fn list(&self) -> &ListPresentation
pub fn list(&self) -> &ListPresentation
Returns the default presentation policy for lists.
Sourcepub fn tree(&self) -> &TreePresentation
pub fn tree(&self) -> &TreePresentation
Returns the default presentation policy for trees.
Sourcepub fn table(&self) -> &TablePresentation
pub fn table(&self) -> &TablePresentation
Returns the default presentation policy for tables.
Sourcepub fn scrollbar(&self) -> &ScrollbarPresentation
pub fn scrollbar(&self) -> &ScrollbarPresentation
Returns the default presentation policy for scrollbars.
pub fn text_style(self, role: ComponentRole, style: TextStyle) -> Self
Sourcepub fn panel(self, panel: BlockStyle) -> Self
pub fn panel(self, panel: BlockStyle) -> Self
Replaces the framed-surface block style.
Sourcepub fn panel_focused(self, panel: BlockStyle) -> Self
pub fn panel_focused(self, panel: BlockStyle) -> Self
Replaces the focused framed-surface block style.
Sourcepub fn list_style(self, role: ListRole, style: TextStyle) -> Self
pub fn list_style(self, role: ListRole, style: TextStyle) -> Self
Replaces the style assigned to one List-specific role.
Sourcepub fn tree_style(self, role: TreeRole, style: TextStyle) -> Self
pub fn tree_style(self, role: TreeRole, style: TextStyle) -> Self
Replaces the style assigned to one Tree-specific role.
Sourcepub fn table_style(self, role: TableRole, style: BlockStyle) -> Self
pub fn table_style(self, role: TableRole, style: BlockStyle) -> Self
Replaces the block style assigned to one Table-specific cell role.
Sourcepub fn scrollbar_style(self, role: ScrollbarRole, style: TextStyle) -> Self
pub fn scrollbar_style(self, role: ScrollbarRole, style: TextStyle) -> Self
Replaces the style assigned to one Scrollbar-specific role.
Trait Implementations§
Source§impl Clone for ComponentTheme
impl Clone for ComponentTheme
Source§fn clone(&self) -> ComponentTheme
fn clone(&self) -> ComponentTheme
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ComponentTheme
impl Debug for ComponentTheme
Source§impl PartialEq for ComponentTheme
impl PartialEq for ComponentTheme
Source§fn eq(&self, other: &ComponentTheme) -> bool
fn eq(&self, other: &ComponentTheme) -> bool
self and other values to be equal, and is used by ==.