#include <ui.hh>
|
| enum | resizetype { cellx
, celly
, winx
, winy
} |
| |
| using | EventType = std::pair< std::string, std::variant< std::pair< int, int >, std::pair< int, resizetype >, bool > > |
| |
◆ EventType
| using UI::EventType = std::pair< std::string, std::variant< std::pair<int,int>, std::pair<int, resizetype>, bool > > |
The return value of HandleEvents. The first element is text input (string). The second element is one of the following: std::pair<int,int>, expressing new window size in pixels if the window has been resized from GUI.
std::pair<int,resizetype>, expressing the user's wish to perform a change in rendering proportions.
bool, true if the terminal should be terminated; false if none of above happened.
◆ resizetype
◆ UI()
◆ ~UI()
◆ BeepOn()
Issues a short beep, if supported.
◆ GetCellSize()
| std::pair<unsigned,unsigned> UI::GetCellSize |
( |
| ) |
const |
|
inline |
- Returns
- currently configured font cell size
◆ GetWindowSize()
| std::pair<unsigned,unsigned> UI::GetWindowSize |
( |
| ) |
const |
|
inline |
- Returns
- currently configured window size in cells
◆ HandleEvents()
Polls (non-blocking) for UI events.
- See also
- EventType for possible events.
- Parameters
-
| permit_text_input | If this parameter is false, text input from keyboard is not accepted. |
◆ IsHeadless()
| bool UI::IsHeadless |
( |
| ) |
const |
|
inline |
- Returns
- true if the terminal is started in headless mode
◆ PresentGraphics()
| void UI::PresentGraphics |
( |
const std::uint32_t * |
pixels | ) |
|
Updates the graphics within the window to the contents of the supplied buffer.
- Parameters
-
| pixels | RGB pixels. The buffer size must be at least cellx*celly*winx*winy units. |
◆ ResizeTo()
| void UI::ResizeTo |
( |
unsigned |
cellx, |
|
|
unsigned |
celly, |
|
|
unsigned |
width, |
|
|
unsigned |
height |
|
) |
| |
Attempts to resize the terminal window.
- Parameters
-
| cellx | New font cell width |
| celly | New font cell height |
| width | New window width in cells |
| height | New window height in cells |
◆ SetHeadless()
| void UI::SetHeadless |
( |
bool |
state | ) |
|
|
inline |
Change headless state. Note: Once a window has been opened, changing this setting does not close it.
◆ SetIconName()
| void UI::SetIconName |
( |
std::string_view |
str | ) |
|
Changes the icon name. Unimplemented.
- Parameters
-
◆ SetWindowTitle()
| void UI::SetWindowTitle |
( |
std::string_view |
str | ) |
|
Changes the window title to
- Parameters
-
The documentation for this class was generated from the following files: