![]() |
PIP 5.6.1
Platform-Independent Primitives
|
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, PICout output, text input, etc.
Create a PIScreen (optionally with startNow = false and a key callback). Call enableExitCapture() so that a key (e.g. 'Q') triggers waitForFinish(). Add tiles and attach widgets to them; set focus and layout as needed. PIScreen inherits PIThread and runs the redraw loop; start it before waitForFinish() if you did not use startNow.
Tiles (PIScreenTile) are attached to the screen and arranged in a layout. Each tile can hold widgets. Focus determines which tile receives keyboard input. See piscreentile.h, piscreentiles.h for composed tile widgets and layout types.
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: piscreenconsole.h, piscreentiles.h, piterminal.h, piscreendrawer.h.
Some widget options or behaviors may be refined in the implementation; when in doubt, check the header and example usage.