Chesto
0.9
A declarative and element-based library for creating GUIs on homebrew'd consoles
Loading...
Searching...
No Matches
src
Grid.hpp
1
#pragma once
2
3
#include "Element.hpp"
4
#include <vector>
5
6
namespace
Chesto {
7
8
class
Grid
:
public
Element
9
{
10
public
:
11
Grid
(
int
columns,
int
width,
int
cellPadding = 0,
int
rowPadding = 0);
12
14
void
refresh
();
15
bool
process
(
InputEvents
* event)
override
;
16
17
int
columns;
18
int
width;
19
int
cellPadding;
20
int
rowPadding;
21
23
int
highlighted
= -1;
// Ccrrently highlighted element index (-1 = none)
24
bool
touchMode =
true
;
// whether we're in touch or cursor mode
25
};
26
27
}
// namespace Chesto
Chesto::Element
Definition
Element.hpp:29
Chesto::Grid
Definition
Grid.hpp:9
Chesto::Grid::highlighted
int highlighted
Cursor state.
Definition
Grid.hpp:23
Chesto::Grid::process
bool process(InputEvents *event) override
process any input that is received for this element
Definition
Grid.cpp:72
Chesto::Grid::refresh
void refresh()
Recalculate positions for all child elements.
Definition
Grid.cpp:24
Chesto::InputEvents
Definition
InputEvents.hpp:78
Generated by
1.9.8