forked from HACKERALERT/imgui-go
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Table.cpp
57 lines (41 loc) · 1.77 KB
/
Table.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
#include "imguiWrappedHeader.h"
#include "Table.h"
#include "WrapperConverter.h"
IggBool iggBeginTable(const char *str_id, int column, int flags,
IggVec2 const *outer_size, float inner_width) {
Vec2Wrapper outerSizeArg(outer_size);
return ImGui::BeginTable(str_id, column, flags, *outerSizeArg, inner_width) ? 1 : 0;
}
void iggEndTable() { ImGui::EndTable(); }
void iggTableNextRow(int row_flags, float min_row_height) {
ImGui::TableNextRow(row_flags, min_row_height);
}
IggBool iggTableNextColumn() { return ImGui::TableNextColumn() ? 1 : 0; }
IggBool iggTableSetColumnIndex(int column_n) {
return ImGui::TableSetColumnIndex(column_n) ? 1 : 0;
}
void iggTableSetupColumn(const char *label, int flags,
float init_width_or_weight, unsigned int user_id) {
ImGui::TableSetupColumn(label, flags, init_width_or_weight, user_id);
}
void iggTableSetupScrollFreeze(int cols, int rows) {
ImGui::TableSetupScrollFreeze(cols, rows);
}
void iggTableHeadersRow() { ImGui::TableHeadersRow(); }
void iggTableHeader(const char *label) { ImGui::TableHeader(label); }
IggImGuiTableSortSpecs *iggTableGetSortSpecs() {
ImGuiTableSortSpecs *specs = ImGui::TableGetSortSpecs();
return reinterpret_cast<IggImGuiTableSortSpecs *>(specs);
}
int iggTableGetColumnCount() { return ImGui::TableGetColumnCount(); }
int iggTableGetColumnIndex() { return ImGui::TableGetColumnIndex(); }
int iggTableGetRowIndex() { return ImGui::TableGetRowIndex(); }
const char *iggTableGetColumnName(int column_n) {
return ImGui::TableGetColumnName(column_n);
}
void iggTableSetBgColor(int target, unsigned int color, int column_n) {
ImGui::TableSetBgColor(target, color, column_n);
}
int iggTableGetColumnFlags(int column_n) {
return ImGui::TableGetColumnFlags(column_n);
}