Repository navigation
API turboframe.ui.localmenu
Source: turboframe/ui/localmenu.py. Generated from the code of TurboFrame 0.3.0 by tools/wiki_api.py.
Borland's local menu: Alt+F10 (or a right click) on a view opens a menu of what can be done with what is under its bar, at that place on the screen.
LocalMenu(menu, at) is a modal screen with a MenuBox at the screen position at (moved to stay on the
screen: above the place when there is no room below). It dismisses with the command of the item chosen, or None
when the menu is closed (Esc, a click outside it). From a worker:
command = await pop_local_menu(app, Menu([MenuItem("~O~pen", CM_OPEN, "Enter")]), (x, y))LocalMenu, menu_commands, pop_local_menu
class LocalMenu(ModalScreen)
LocalMenu(menu: Menu, at: tuple[int, int])A MenuBox at a screen position; dismisses with the chosen command (or None).
def menu_commands(menu: Menu) -> set[int]The commands of menu's enabled items (not of its separators, disabled items or submenus).
async def pop_local_menu(app, menu: Menu, at: tuple[int, int]) -> int | NoneShow menu at at and return the command chosen (None: closed). Call from a worker.
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