struct
Opal::GlyphSet
- Opal::GlyphSet
- Struct
- Value
- Object
Overview
Set of configurable UI glyphs and character symbols for controls. Enables global and per-theme character swapping (e.g., retro ASCII vs modern Unicode).
Defined in:
opal/style/glyph_set.crConstructors
-
.ascii : GlyphSet
Predefined ASCII-only glyph set for high-portability terminals
- .new(window_close : String = "[x]", window_maximize : String = "[^]", window_minimize : String = "[-]", window_resize : Char = '◢', cursor : String = "▶ ", checkbox_checked : String = "[x]", checkbox_unchecked : String = "[ ]", radio_checked : String = "(•)", radio_unchecked : String = "( )", dropdown_arrow : String = "▼", dropdown_arrow_up : String = "▲", scrollbar_thumb : Char = '█', scrollbar_track : Char = '░', scrollbar_arrow_up : Char = '▲', scrollbar_arrow_down : Char = '▼', scrollbar_arrow_left : Char = '◄', scrollbar_arrow_right : Char = '►', table_junction : Char = '┼', table_horizontal : Char = '─', table_vertical : Char = '│', table_top_junction : Char = '┬', table_bottom_junction : Char = '┴', table_left_junction : Char = '├', table_right_junction : Char = '┤')
-
.unicode : GlyphSet
Predefined Unicode glyph set
Instance Method Summary
- #checkbox_checked : String
- #checkbox_checked=(checkbox_checked : String)
- #checkbox_unchecked : String
- #checkbox_unchecked=(checkbox_unchecked : String)
- #cursor : String
- #cursor=(cursor : String)
- #dropdown_arrow : String
- #dropdown_arrow=(dropdown_arrow : String)
- #dropdown_arrow_up : String
- #dropdown_arrow_up=(dropdown_arrow_up : String)
- #radio_checked : String
- #radio_checked=(radio_checked : String)
- #radio_unchecked : String
- #radio_unchecked=(radio_unchecked : String)
- #scrollbar_arrow_down : Char
- #scrollbar_arrow_down=(scrollbar_arrow_down : Char)
- #scrollbar_arrow_left : Char
- #scrollbar_arrow_left=(scrollbar_arrow_left : Char)
- #scrollbar_arrow_right : Char
- #scrollbar_arrow_right=(scrollbar_arrow_right : Char)
- #scrollbar_arrow_up : Char
- #scrollbar_arrow_up=(scrollbar_arrow_up : Char)
- #scrollbar_thumb : Char
- #scrollbar_thumb=(scrollbar_thumb : Char)
- #scrollbar_track : Char
- #scrollbar_track=(scrollbar_track : Char)
-
#swap(window_close : String | Nil = nil, window_maximize : String | Nil = nil, window_minimize : String | Nil = nil, window_resize : Char | Nil = nil, cursor : String | Nil = nil, checkbox_checked : String | Nil = nil, checkbox_unchecked : String | Nil = nil, radio_checked : String | Nil = nil, radio_unchecked : String | Nil = nil, dropdown_arrow : String | Nil = nil, dropdown_arrow_up : String | Nil = nil, scrollbar_thumb : Char | Nil = nil, scrollbar_track : Char | Nil = nil, scrollbar_arrow_up : Char | Nil = nil, scrollbar_arrow_down : Char | Nil = nil, scrollbar_arrow_left : Char | Nil = nil, scrollbar_arrow_right : Char | Nil = nil, table_junction : Char | Nil = nil, table_horizontal : Char | Nil = nil, table_vertical : Char | Nil = nil, table_top_junction : Char | Nil = nil, table_bottom_junction : Char | Nil = nil, table_left_junction : Char | Nil = nil, table_right_junction : Char | Nil = nil) : GlyphSet
Returns a modified copy with selective character swaps
- #table_bottom_junction : Char
- #table_bottom_junction=(table_bottom_junction : Char)
- #table_horizontal : Char
- #table_horizontal=(table_horizontal : Char)
- #table_junction : Char
- #table_junction=(table_junction : Char)
- #table_left_junction : Char
- #table_left_junction=(table_left_junction : Char)
- #table_right_junction : Char
- #table_right_junction=(table_right_junction : Char)
- #table_top_junction : Char
- #table_top_junction=(table_top_junction : Char)
- #table_vertical : Char
- #table_vertical=(table_vertical : Char)
- #window_close : String
- #window_close=(window_close : String)
- #window_maximize : String
- #window_maximize=(window_maximize : String)
- #window_minimize : String
- #window_minimize=(window_minimize : String)
- #window_resize : Char
- #window_resize=(window_resize : Char)
Constructor Detail
Predefined ASCII-only glyph set for high-portability terminals
def self.new(window_close : String = "[x]", window_maximize : String = "[^]", window_minimize : String = "[-]", window_resize : Char = '◢', cursor : String = "▶ ", checkbox_checked : String = "[x]", checkbox_unchecked : String = "[ ]", radio_checked : String = "(•)", radio_unchecked : String = "( )", dropdown_arrow : String = "▼", dropdown_arrow_up : String = "▲", scrollbar_thumb : Char = '█', scrollbar_track : Char = '░', scrollbar_arrow_up : Char = '▲', scrollbar_arrow_down : Char = '▼', scrollbar_arrow_left : Char = '◄', scrollbar_arrow_right : Char = '►', table_junction : Char = '┼', table_horizontal : Char = '─', table_vertical : Char = '│', table_top_junction : Char = '┬', table_bottom_junction : Char = '┴', table_left_junction : Char = '├', table_right_junction : Char = '┤')
#
Instance Method Detail
def swap(window_close : String | Nil = nil, window_maximize : String | Nil = nil, window_minimize : String | Nil = nil, window_resize : Char | Nil = nil, cursor : String | Nil = nil, checkbox_checked : String | Nil = nil, checkbox_unchecked : String | Nil = nil, radio_checked : String | Nil = nil, radio_unchecked : String | Nil = nil, dropdown_arrow : String | Nil = nil, dropdown_arrow_up : String | Nil = nil, scrollbar_thumb : Char | Nil = nil, scrollbar_track : Char | Nil = nil, scrollbar_arrow_up : Char | Nil = nil, scrollbar_arrow_down : Char | Nil = nil, scrollbar_arrow_left : Char | Nil = nil, scrollbar_arrow_right : Char | Nil = nil, table_junction : Char | Nil = nil, table_horizontal : Char | Nil = nil, table_vertical : Char | Nil = nil, table_top_junction : Char | Nil = nil, table_bottom_junction : Char | Nil = nil, table_left_junction : Char | Nil = nil, table_right_junction : Char | Nil = nil) : GlyphSet
#
Returns a modified copy with selective character swaps