Repository navigation
API turboframe.ui.history
Source: turboframe/ui/history.py. Generated from the code of TurboFrame 0.3.0 by tools/wiki_api.py.
Turbo Vision's THistory: an input line remembers what was written in it.
HistoryInput is the input line with its ▐↓▌ at the right. Down (or a click on the arrow) opens a small list under the line with what was accepted there before, newest first; Enter (or a click) puts one back in the line, Esc closes the list. Each kind of line has its own history (history_id: file names, texts to find, line numbers...).
The histories live in the application's store, under "history": any object with load() -> dict and save(dict) (its config, its preferences), given once with set_store(). Until then they live in memory, for the session. A dialog remembers what its lines hold (HistoryInput.remember()) when it ends with anything but Cancel.
MAX_ENTRIES, MAX_SHOWN, HistoryArrow, HistoryInput, HistoryList, MemoryStore, add, entries, set_store
20
8
class HistoryArrow(Widget)The ▐↓▌ at the right of the line: black on green, its sides green on the dialog.
class HistoryInput(Group)
HistoryInput(line: InputLine, history_id: str, offer=None, **kwargs)line with its history: ▐↓▌ at the right, Down to open it.
remember() -> Nonetoggle() -> Noneopen() -> Noneclose() -> Nonepick(text: str | None) -> None
class HistoryList(WheelList, FilteredList, ListBox)
HistoryList(items: list[str], owner: HistoryInput)The earlier entries, in a small blue window under the line.
-
filter_changed() -> None: The filter in the frame's title: the popup has no room for a line. select_item(item: int) -> None
class MemoryStore
MemoryStore()The store until the application gives its own: a dict, for the session.
load() -> dictsave(data: dict) -> None
def add(history_id: str, text: str) -> Nonetext at the head of the history (once: an earlier copy goes). A store that cannot be written (a read-only or full disk: OSError) keeps nothing, and the dialog goes on, as the other settings do.
def entries(history_id: str) -> list[str]def set_store(store) -> NoneKeep the histories in store: store.load() returns a dict, store.save(data) keeps it.
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