Nix (Dev) 3.5.10
dev - 3.5.10 - 1af9301
Loading...
Searching...
No Matches
structs.hpp
Go to the documentation of this file.
1#ifndef IV_SRC_UI_GUI_SHEETS_STRUCTS_HPP_
2#define IV_SRC_UI_GUI_SHEETS_STRUCTS_HPP_
3
4#include "core/types.hpp"
5
6#include <cstdint>
7#include <map>
8#include <string>
9#include <tuple>
10#include <unordered_map>
11
13
15{
16
18{
19 bool m_hasWidget {true};// flag to know whether a cell has a widget attached or not.
21};
22
24{
25 uint32_t columnType; // Column type: Normally an enum (CEnumParameter)
26 uint32_t columnSubType;// Column type sub: Normally language
27
28 bool operator==(const ColumnId &other) const = default;
29 bool operator<(const ColumnId &other) const
30 {
31 return std::tie(columnType, columnSubType) < std::tie(other.columnType, other.columnSubType);
32 };
33};
34
48
49struct RowId
50{
51 // TODO: Change rowId to rowSection and rowSubId to itemId
52 uint32_t rowId; // Column type: Normally it's ID, but for channels it's the unit ID
53 uint16_t rowSubId;// Column type sub: Normally null, but for channels it's the channel order
54
55 bool operator==(const RowId &other) const = default;
56 bool operator<(const RowId &other) const
57 {
58 return std::tie(rowId, rowSubId) < std::tie(other.rowId, other.rowSubId);
59 };
60};
61
68
70{
71 static inline const int32_t kWidth = 160;
72 static inline const int32_t kHeight = 33;
73
74 std::string m_CSS;
76};
77
79{
81 std::map<iv::gui::sheets::ColumnId, iv::gui::sheets::CellDefinition> m_cellDefinitions;
82};
83
84typedef std::map<ColumnId, ColumnDefinition> ColumnsDefinitions;
85typedef std::map<RowId, RowDefinition> RowsDefinitions;
86typedef std::map<RowId, RowCells> RowsCells;
87
88}// namespace iv::gui::sheets
89
90#endif//IV_SRC_UI_GUI_SHEETS_STRUCTS_HPP_
Definition AbstractComponentGUI.hpp:30
Definition structs.hpp:15
std::map< ColumnId, ColumnDefinition > ColumnsDefinitions
Definition structs.hpp:84
std::map< RowId, RowDefinition > RowsDefinitions
Definition structs.hpp:85
std::map< RowId, RowCells > RowsCells
Definition structs.hpp:86
uint64_t order
Definition types.hpp:90
Definition structs.hpp:18
AbstractComponentGUI * m_component
Definition structs.hpp:20
bool m_hasWidget
Definition structs.hpp:19
Definition structs.hpp:36
iv::gui::sheets::ColumnId m_columnId
Definition structs.hpp:39
uint16_t m_columnWidth
Definition structs.hpp:44
bool m_isVisible
Definition structs.hpp:46
iv::types::order m_columnPosition
Definition structs.hpp:41
std::string m_columnTooltip
Definition structs.hpp:43
static const uint16_t kMinimumWidth
Definition structs.hpp:37
std::string m_columnTitle
Definition structs.hpp:42
Definition structs.hpp:24
uint32_t columnType
Definition structs.hpp:25
bool operator<(const ColumnId &other) const
Definition structs.hpp:29
bool operator==(const ColumnId &other) const =default
uint32_t columnSubType
Definition structs.hpp:26
Definition structs.hpp:79
iv::gui::sheets::RowTitleCellDefinition m_rowTitleCellDefinition
Definition structs.hpp:80
std::map< iv::gui::sheets::ColumnId, iv::gui::sheets::CellDefinition > m_cellDefinitions
Definition structs.hpp:81
Definition structs.hpp:63
iv::types::order m_rowPosition
Definition structs.hpp:65
iv::gui::sheets::RowId m_rowId
Definition structs.hpp:64
bool m_isVisible
Definition structs.hpp:66
Definition structs.hpp:50
uint16_t rowSubId
Definition structs.hpp:53
bool operator<(const RowId &other) const
Definition structs.hpp:56
bool operator==(const RowId &other) const =default
uint32_t rowId
Definition structs.hpp:52
static const int32_t kHeight
Definition structs.hpp:72
std::string m_CSS
Definition structs.hpp:74
iv::gui::sheets::CellDefinition m_cellDefinition
Definition structs.hpp:75
static const int32_t kWidth
Definition structs.hpp:71