87 void quit(
int exitCode = 0);
166 bool _running =
false;
167 bool _needsRepaint =
true;
172 using Clock = std::chrono::steady_clock;
173 using TimePoint = Clock::time_point;
174 static constexpr int DoubleClickIntervalMs = 400;
175 TimePoint _lastClickTime{};
ANSI escape code writer backed by an IODevice. Writes ANSI escape sequences and raw text to an IODevi...
Definition ansistream.h:27
Application-wide state for the promeki library.
Definition application.h:47
Per-thread event loop providing event dispatch, timers, and posted callables.
Definition eventloop.h:58
Dynamic array container wrapping std::vector.
Definition list.h:40
Button
Mouse button flags (bit values for combining).
Definition mouseevent.h:29
Low-level terminal I/O abstraction.
Definition terminal.h:28
ColorSupport
Describes the color capability level of the terminal.
Definition terminal.h:54
Application class for TUI programs.
Definition application.h:33
void grabMouse(TuiWidget *widget)
Grabs mouse events for a widget.
Definition application.h:146
Terminal & terminal()
Returns the terminal.
Definition application.h:66
TuiWidget * focusWidget() const
Returns the currently focused widget.
Definition application.h:123
void releaseMouse()
Releases the mouse grab.
Definition application.h:151
void setRootWidget(TuiWidget *widget)
Sets the top-level (root) widget.
void markNeedsRepaint()
Marks the screen as needing a repaint.
Terminal::ColorSupport colorMode() const
Returns the current color mode.
Definition application.h:109
~TuiApplication()
Destructor. Restores terminal state.
void focusNext(bool reverse=false)
Cycles focus to the next focusable widget.
static TuiApplication * instance()
Returns the TuiApplication instance.
Definition application.h:51
int exec()
Runs the TUI application event loop.
void quit(int exitCode=0)
Requests the application to quit.
TuiApplication(int argc, char **argv)
Constructs a TuiApplication.
void setPalette(const TuiPalette &palette)
Sets the palette.
Definition application.h:75
TuiScreen & screen()
Returns the screen.
Definition application.h:63
void setFocusWidget(TuiWidget *widget)
Sets the focused widget.
const TuiPalette & palette() const
Returns the palette.
Definition application.h:69
void setColorMode(Terminal::ColorSupport mode)
Sets the color mode for the TUI screen.
Definition application.h:100
TuiPalette & palette()
Returns the palette for modification.
Definition application.h:72
TuiWidget * rootWidget() const
Returns the root widget.
Definition application.h:60
void updateAll()
Forces a full screen repaint.
Style palette for TUI widgets.
Definition palette.h:35
Double-buffered character cell grid for TUI rendering.
Definition screen.h:60
Terminal::ColorSupport colorMode() const
Returns the current color mode.
Definition screen.h:131
void setColorMode(Terminal::ColorSupport mode)
Sets the color mode used when emitting colors during flush.
Definition screen.h:125
#define PROMEKI_NAMESPACE_BEGIN
Starts a promeki namespace block.
Definition namespace.h:14
#define PROMEKI_NAMESPACE_END
Ends a promeki namespace block.
Definition namespace.h:19