62 [[nodiscard]]
virtual std::string
render()
const = 0;
Shared type definitions for the TUI input system.
Abstract base for all TUI widgets.
Definition Component.hpp:38
bool m_is_focused
Current focus state, managed by setFocused.
Definition Component.hpp:91
Component(Component &&)=delete
Non-movable.
virtual std::string render() const =0
Produce the full ANSI-formatted rendering of this component.
virtual bool handleInput(Defs::Key key)=0
Process a single key event.
Component & operator=(Component &&)=delete
Non-movable.
virtual void setFocused(bool focused)
Change the focus state of this component.
Definition Component.hpp:82
virtual ~Component()=default
Virtual destructor — components are always owned via base-class pointer.
bool isFocused() const
Return whether this component currently has keyboard focus.
Definition Component.hpp:88
Component & operator=(const Component &)=delete
Non-copyable (unique ownership).
Component(const Component &)=delete
Non-copyable (unique ownership).
std::variant< char, Special > Key
A single keypress from stdin, represented as either a printable character or a Special control key.
Definition Defs.hpp:45