Skip to content

API turboframe.ui.history

rafageist edited this page Dec 4, 2026 · 4 revisions

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.

Contents

MAX_ENTRIES, MAX_SHOWN, HistoryArrow, HistoryInput, HistoryList, MemoryStore, add, entries, set_store

MAX_ENTRIES

20

MAX_SHOWN

8

class HistoryArrow

class HistoryArrow(Widget)

The ▐↓▌ at the right of the line: black on green, its sides green on the dialog.

class HistoryInput

class HistoryInput(Group)
HistoryInput(line: InputLine, history_id: str, offer=None, **kwargs)

line with its history: ▐↓▌ at the right, Down to open it.

  • remember() -> None
  • toggle() -> None
  • open() -> None
  • close() -> None
  • pick(text: str | None) -> None

class HistoryList

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

class MemoryStore
MemoryStore()

The store until the application gives its own: a dict, for the session.

  • load() -> dict
  • save(data: dict) -> None

add

def add(history_id: str, text: str) -> None

text 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.

entries

def entries(history_id: str) -> list[str]

set_store

def set_store(store) -> None

Keep the histories in store: store.load() returns a dict, store.save(data) keeps it.

Clone this wiki locally