Repository navigation
API turboframe.ui.icons
Source: turboframe/ui/icons.py. Generated from the code of TurboFrame 0.3.0 by tools/wiki_api.py.
File marks for a file tree: one ASCII character, coloured by type.
A Turbo Vision screen is a grid of cells: a character the terminal draws two cells wide shifts the rest of its line and breaks the frames. So every mark is plain ASCII, the same width in every terminal, font and platform, and it goes in the blank cell files already have where folders show their ► ▼: the tree keeps its width. The plain style (PLAIN) leaves that cell blank.
A mark's colour is a slot (lightcyan...), so it follows the theme. The tables hold the kinds every application shares; an application adds its own with BY_EXTENSION.update({...}) and BY_NAME.update({...}).
BY_EXTENSION, BY_NAME, FILE, MARKS, MODES, PLAIN, mark_for
dict (12 entries)
{'.gitignore': ('!', 'lightred'), 'LICENSE': ('c', 'lightgray')}
('-', 'lightgray')
'marks'
('plain', 'marks')
'plain'
def mark_for(path: Path, palette: themes.Palette | None = None) -> tuple[str, str](mark, colour) of a file, by its name, else its extension; the colour is the slot's #RRGGBB in the palette (the current one by default).
TurboFrame · part of Divengine · GPL-3.0-or-later · report an issue
Tutorial
Examples
The desktop
- The Desktop
- Application Mixins
- Windows and Lists
- Dialogs
- Histories
- Progress
- Themes and Colors
- Glyphs
- Settings and Recent Files
- Command Palette
Editing
Tasks
Languages
Running
Reference
Links