CPGen
C++ project generator
Loading...
Searching...
No Matches
Classes
Component.hpp File Reference

Abstract base class for all TUI components. More...

#include "Misc/Defs.hpp"
#include <string>
Include dependency graph for Component.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  Component
 Abstract base for all TUI widgets. More...
 

Detailed Description

Abstract base class for all TUI components.

Author
Darleanow

Every interactive element displayed by the TUI (checkboxes, text inputs, groups, …) inherits from Component and implements the three virtual methods: render, handleInput, and optionally setFocused.

Ownership model

Components are exclusively owned via std::unique_ptr. The non-copyable, non-movable constraint enforced by the deleted special members reflects this: once a component is constructed and transferred to its owner (e.g. a ComponentGroup or View), it must not be copied or moved.