merged AI doc, some new pages
This commit is contained in:
42
doc/pages/console.md
Normal file
42
doc/pages/console.md
Normal file
@@ -0,0 +1,42 @@
|
||||
\~english \page console Tiling console (PIScreen)
|
||||
\~russian \page console Тайлинговая консоль (PIScreen)
|
||||
|
||||
\~english
|
||||
|
||||
\a PIScreen is the console screen manager: it runs a drawing thread, hosts **tiles** (layout regions), and routes keyboard and optionally mouse input to the focused tile. Tiles can contain widgets: text rows, scroll bars, lists, buttons, button groups, check boxes, progress bars, \a PICout output, text input, etc.
|
||||
|
||||
# Basic use
|
||||
|
||||
Create a \a PIScreen (optionally with \c startNow = false and a key callback). Call \a enableExitCapture() so that a key (e.g. 'Q') triggers \a waitForFinish(). Add tiles and attach widgets to them; set focus and layout as needed. \a PIScreen inherits \a PIThread and runs the redraw loop; start it before \a waitForFinish() if you did not use \c startNow.
|
||||
|
||||
# Tiles and layout
|
||||
|
||||
Tiles (\a PIScreenTile) are attached to the screen and arranged in a layout. Each tile can hold widgets. Focus determines which tile receives keyboard input. See \a piscreentile.h, \a piscreentiles.h for composed tile widgets and layout types.
|
||||
|
||||
# Widgets
|
||||
|
||||
Widget types are declared in the console headers: list, button, buttons group, check box, progress bar, text input, terminal (PICout output), etc. Add them to a tile; they draw and react to input within the tile. Details and behavior per widget: \a piscreenconsole.h, \a piscreentiles.h, \a piterminal.h, \a piscreendrawer.h.
|
||||
|
||||
# Notes
|
||||
|
||||
Some widget options or behaviors may be refined in the implementation; when in doubt, check the header and example usage.
|
||||
|
||||
\~russian
|
||||
|
||||
\a PIScreen — менеджер консольного экрана: поток отрисовки, **тайлы** (области раскладки), маршрутизация клавиатуры и при необходимости мыши в активный тайл. В тайлах размещают виджеты: строки текста, скроллбары, списки, кнопки, группы кнопок, галочки, прогрессбары, вывод \a PICout, текстовый ввод и др.
|
||||
|
||||
# Базовое использование
|
||||
|
||||
Создать \a PIScreen (при необходимости \c startNow = false и callback клавиш). Вызвать \a enableExitCapture(), чтобы клавиша (например 'Q') вызывала \a waitForFinish(). Добавлять тайлы и виджеты, настраивать фокус и раскладку. \a PIScreen наследует \a PIThread и выполняет цикл перерисовки; запустить до \a waitForFinish(), если не использовали \c startNow.
|
||||
|
||||
# Тайлы и раскладка
|
||||
|
||||
Тайлы (\a PIScreenTile) присоединяются к экрану и располагаются в раскладке. В каждом тайле — виджеты. Фокус определяет получателя ввода с клавиатуры. Составные виджеты и типы раскладки: \a piscreentile.h, \a piscreentiles.h.
|
||||
|
||||
# Виджеты
|
||||
|
||||
Типы виджетов объявлены в заголовках консоли: список, кнопка, группа кнопок, галочка, прогрессбар, текстовый ввод, терминал (вывод PICout) и др. Их добавляют в тайл; отрисовка и реакция на ввод — внутри тайла. Подробности по виджетам: \a piscreenconsole.h, \a piscreentiles.h, \a piterminal.h, \a piscreendrawer.h.
|
||||
|
||||
# Замечания
|
||||
|
||||
Часть опций или поведения виджетов может уточняться в реализации; при сомнениях смотрите заголовки и примеры.
|
||||
Reference in New Issue
Block a user