Skip to content

API turboframe.ui.desktop

rafageist edited this page Dec 4, 2026 · 4 revisions

turboframe.ui.desktop

Source: turboframe/ui/desktop.py. Generated from the code of TurboFrame 0.3.0 by tools/wiki_api.py.

The desktop and its bars: F10 opens the first menu; the status line shows a hint, or a spinner while something runs in the background (Find in files over a large tree); Window > Tile arranges the windows beside the ones docked at a side (the explorer).

Contents

FRAMEWORK_COMMANDS, SPINNER, DeskTop, DropMenuBar, HintStatusLine, check_commands

FRAMEWORK_COMMANDS

range(10256, 11256)

SPINNER

'|/-\\'

class DeskTop

class DeskTop(DeskTop)

textual-vision's desktop, whose tile() without a region leaves the docked windows uncovered.

A window is docked when it is shown, not tileable (the application keeps it out of tiling: the explorer, ExplorerWindow), not zoomed, and against the desktop's left or right edge. DesktopApp uses this desktop (init_desktop).

  • tile_region() -> Region: The part of the desktop that Window > Tile arranges: all of it, less the docked windows' columns.
  • tile(region: Region | None = None) -> None: Arrange the tileable windows in a grid over region, by default tile_region().

class DropMenuBar

class DropMenuBar(MenuBar)

F10 opens the first menu right away.

textual-vision only highlights the bar, leaving keyboard focus in the editor, which then eats Enter and the arrows. With the drop-down open, focus is in the menu and Left/Right still walk the bar.

  • activate() -> None
  • open_first() -> None
  • tv_handle_key(event: events.Key) -> bool

class HintStatusLine

class HintStatusLine(StatusLine)
HintStatusLine(*args, **kwargs)

Status line with a free-form hint on the right (language / dialect).

While something runs in the background (a render, a language server starting) a spinner and what is running take the hint's place.

  • hint(help_ctx: int) -> str
  • set_hint(text: str) -> None
  • start_busy(label: str) -> int
  • relabel_busy(token: int, label: str) -> None
  • stop_busy(token: int) -> None

check_commands

def check_commands(values) -> None

Raise ValueError when an application command falls in FRAMEWORK_COMMANDS or two are equal.

Clone this wiki locally