enum
UI::DesignTokens::AppleSemantic
Overview
Apple semantic material role. Maps 1:1 to NSVisualEffectMaterial
integers on macOS; iOS uses an approximation table (UIKit does not
expose semantic materials — UIBlurEffectStyle is thickness-like).
SystemResolved is the sentinel value — when a widget declares it,
the renderer emits NO setMaterial: / setEffect: call and lets
Apple defaults apply. This is the HIG-canonical choice for widgets
whose chrome is system-drawn (Alert, TabView's bar background,
Toolbar's bar background).
Defined in:
ui/design_tokens/material.crEnum Members
-
Menu =
0 -
Popover =
1 -
Sidebar =
2 -
Sheet =
3 -
HeaderView =
4 -
WindowBackground =
5 -
HUDWindow =
6 -
Titlebar =
7 -
SystemResolved =
8
Constructors
-
.from_key(key : String | Nil) : AppleSemantic
Parse a stringified form (e.g.
Instance Method Summary
-
#header_view?
Returns
trueif this enum value equalsHeaderView -
#hud_window?
Returns
trueif this enum value equalsHUDWindow -
#menu?
Returns
trueif this enum value equalsMenu -
#popover?
Returns
trueif this enum value equalsPopover -
#sheet?
Returns
trueif this enum value equalsSheet -
#sidebar?
Returns
trueif this enum value equalsSidebar -
#system_resolved?
Returns
trueif this enum value equalsSystemResolved -
#titlebar?
Returns
trueif this enum value equalsTitlebar -
#to_key : String
Canonical lowercase snake_case key (round-trips through
.from_key). -
#window_background?
Returns
trueif this enum value equalsWindowBackground
Constructor Detail
Parse a stringified form (e.g. "menu", "popover", "system_resolved",
also accepts the Crystal to_s variants like "Menu"). Returns
SystemResolved for nil / unknown values rather than raising — the
populator path uses this in production code where an invalid string
is a soft-failure (just use system defaults).