Tatooine
imgui.h
Go to the documentation of this file.
1#ifndef TATOOINE_GL_IMGUI_H
2#define TATOOINE_GL_IMGUI_H
3//==============================================================================
7//==============================================================================
8namespace ImGui {
9//==============================================================================
10auto ToggleButton(const char* str_id, bool* v) -> bool;
11DLL_API auto InputDouble2(const char* label, double v[2],
12 const char* format = "%.3lf",
13 ImGuiInputTextFlags flags = 0) -> bool;
14DLL_API auto InputDouble3(const char* label, double v[3],
15 const char* format = "%.3lf",
16 ImGuiInputTextFlags flags = 0) -> bool;
17DLL_API auto InputDouble4(const char* label, double v[4],
18 const char* format = "%.3lf",
19 ImGuiInputTextFlags flags = 0) -> bool;
20DLL_API auto DragSizeT(
21 char const* label, std::size_t* v, std::size_t v_speed = 1,
22 std::size_t v_min = 0,
23 std::size_t v_max = std::numeric_limits<std::size_t>::max()) -> bool;
24DLL_API auto DragDouble(const char* label, double* v, double v_speed = 1.0,
25 double v_min = 0.0, double v_max = 0.0,
26 const char* format = "%.3lf", float power = 1.0)
27 -> bool;
28DLL_API auto DragDouble2(const char* label, double v[2], double v_speed = 1.0,
29 double v_min = 0.0, double v_max = 0.0,
30 const char* format = "%.3lf", float power = 1.0)
31 -> bool;
32DLL_API auto DragDouble3(const char* label, double v[3], double v_speed = 1.0,
33 double v_min = 0.0, double v_max = 0.0,
34 const char* format = "%.3lf", float power = 1.0)
35 -> bool;
36DLL_API auto DragDouble4(const char* label, double v[4], double v_speed = 1.0,
37 double v_min = 0.0, double v_max = 0.0,
38 const char* format = "%.3lf", float power = 1.0)
39 -> bool;
40DLL_API auto BufferingBar(const char* label, float value,
41 const ImVec2& size_arg, const ImU32& bg_col,
42 const ImU32& fg_col) -> bool;
43DLL_API auto Spinner(const char* label, float radius, int thickness,
44 const ImU32& color) -> bool;
48// enum ImGuiLayoutType_ {
49// ImGuiLayoutType_Horizontal = 0,
50// ImGuiLayoutType_Vertical = 1
51// };
52//
53// enum ImGuiLayoutItemType_ {
54// ImGuiLayoutItemType_Item,
55// ImGuiLayoutItemType_Spring
56// };
57// typedef int ImGuiLayoutType; // -> enum ImGuiLayoutType_ //
58// Enum:
59// // Horizontal or vertical
60// typedef int ImGuiLayoutItemType; // -> enum ImGuiLayoutItemType_ // Enum:
61// // Item or Spring
62// struct ImGuiLayoutItem {
63// ImGuiLayoutItemType Type; // Type of an item
64// ImRect MeasuredBounds;
65//
66// float SpringWeight; // Weight of a spring
67// float SpringSpacing; // Spring spacing
68// float SpringSize; // Calculated spring size
69//
70// float CurrentAlign;
71// float CurrentAlignOffset;
72//
73// unsigned int VertexIndexBegin;
74// unsigned int VertexIndexEnd;
75//
76// ImGuiLayoutItem(ImGuiLayoutItemType type) {
77// Type = type;
78// MeasuredBounds = ImRect(
79// 0, 0, 0, 0); // FIXME: @thedmd are you sure the default ImRect value
80// // FLT_MAX,FLT_MAX,-FLT_MAX,-FLT_MAX aren't enough
81// here?
82// SpringWeight = 1.0f;
83// SpringSpacing = -1.0f;
84// SpringSize = 0.0f;
85// CurrentAlign = 0.0f;
86// CurrentAlignOffset = 0.0f;
87// VertexIndexBegin = VertexIndexEnd = (ImDrawIdx)0;
88// }
89// };
90//
91// struct ImGuiLayout {
92// ImGuiID Id;
93// ImGuiLayoutType Type;
94// bool Live;
95// ImVec2 Size; // Size passed to BeginLayout
96// ImVec2 CurrentSize; // Bounds of layout known at the beginning the
97// frame. ImVec2 MinimumSize; // Minimum possible size when springs are
98// collapsed. ImVec2 MeasuredSize; // Measured size with springs expanded.
99//
100// ImVector<ImGuiLayoutItem> Items;
101// int CurrentItemIndex;
102// int ParentItemIndex;
103// ImGuiLayout* Parent;
104// ImGuiLayout* FirstChild;
105// ImGuiLayout* NextSibling;
106// float Align; // Current item alignment.
107// float Indent; // Indent used to align items in vertical layout.
108// ImVec2 StartPos; // Initial cursor position when BeginLayout is called.
109// ImVec2
110// StartCursorMaxPos; // Maximum cursor position when BeginLayout is
111// called.
112//
113// ImGuiLayout(ImGuiID id, ImGuiLayoutType type) {
114// Id = id;
115// Type = type;
116// Live = false;
117// Size = CurrentSize = MinimumSize = MeasuredSize = ImVec2(0, 0);
118// CurrentItemIndex = 0;
119// ParentItemIndex = 0;
120// Parent = FirstChild = NextSibling = NULL;
121// Align = -1.0f;
122// Indent = 0.0f;
123// StartPos = ImVec2(0, 0);
124// StartCursorMaxPos = ImVec2(0, 0);
125// }
126// };
127// DLL_API ImGuiLayout* FindLayout(ImGuiID id, ImGuiLayoutType type);
128// DLL_API ImGuiLayout* CreateNewLayout(ImGuiID id, ImGuiLayoutType type,
129// ImVec2 size);
130// DLL_API void BeginLayout(ImGuiID id, ImGuiLayoutType type, ImVec2
131// size,
132// float align);
133// DLL_API void EndLayout(ImGuiLayoutType type);
134// DLL_API void PushLayout(ImGuiLayout* layout);
135// DLL_API void PopLayout(ImGuiLayout* layout);
136// DLL_API void BalanceLayoutSprings(ImGuiLayout& layout);
137// DLL_API ImVec2 BalanceLayoutItemAlignment(ImGuiLayout& layout,
138// ImGuiLayoutItem& item);
139// DLL_API void BalanceLayoutItemsAlignment(ImGuiLayout& layout);
140// DLL_API void BalanceChildLayouts(ImGuiLayout& layout);
141// DLL_API ImVec2 CalculateLayoutSize(ImGuiLayout& layout, bool
142// collapse_springs); DLL_API ImGuiLayoutItem* GenerateLayoutItem(ImGuiLayout&
143// layout,
144// ImGuiLayoutItemType type);
145// DLL_API float CalculateLayoutItemAlignmentOffset(ImGuiLayout&
146// layout,
147// ImGuiLayoutItem&
148// item);
149// DLL_API void TranslateLayoutItem(ImGuiLayoutItem& item, const ImVec2&
150// offset); DLL_API void BeginLayoutItem(ImGuiLayout& layout); DLL_API void
151// EndLayoutItem(ImGuiLayout& layout); DLL_API void AddLayoutSpring(ImGuiLayout&
152// layout, float weight, float spacing); DLL_API void SignedIndent(float
153// indent);
154//
155// DLL_API void BeginHorizontal(const char* str_id,
156// const ImVec2& size = ImVec2(0, 0),
157// float align = -1.0f);
158// DLL_API void BeginHorizontal(const void* ptr_id,
159// const ImVec2& size = ImVec2(0, 0),
160// float align = -1.0f);
161// DLL_API void BeginHorizontal(int id, const ImVec2& size = ImVec2(0, 0),
162// float align = -1);
163// DLL_API void EndHorizontal();
164// DLL_API void BeginVertical(const char* str_id,
165// const ImVec2& size = ImVec2(0, 0),
166// float align = -1.0f);
167// DLL_API void BeginVertical(const void* ptr_id,
168// const ImVec2& size = ImVec2(0, 0),
169// float align = -1.0f);
170// DLL_API void BeginVertical(int id, const ImVec2& size = ImVec2(0, 0),
171// float align = -1);
172// DLL_API void EndVertical();
173// DLL_API void Spring(float weight = 1.0f, float spacing = -1.0f);
175// inline auto layout_align() -> float& {
176// static float l = 0.5f;
177// return l;
178// }
179// inline auto layout_type() -> auto& {
180// static ImGuiLayoutType LayoutType;
181// return LayoutType;
182// }
183// inline auto parent_layout_type() -> auto& {
184// static ImGuiLayoutType ParentLayoutType;
185// return ParentLayoutType;
186// }
187// inline auto current_layout() -> auto& {
188// static ImGuiLayout* CurrentLayout = nullptr;
189// return CurrentLayout;
190// }
191// inline auto current_layout_item() -> auto& {
192// static ImGuiLayoutItem* CurrentLayoutItem = nullptr;
193// return CurrentLayoutItem;
194// }
195// inline auto layout_stack() -> auto& {
196// static ImVector<ImGuiLayout*> LayoutStack;
197// return LayoutStack;
198// }
199// inline auto layouts() -> auto& {
200// static ImGuiStorage Layouts;
201// return Layouts;
202// }
203//==============================================================================
204} // namespace ImGui
205//==============================================================================
206//#include <tatooine/gl/bezier_widget.h>
209//==============================================================================
210#endif
Definition: bezier_widget.h:13
DLL_API auto DragSizeT(char const *label, std::size_t *v, std::size_t v_speed=1, std::size_t v_min=0, std::size_t v_max=std::numeric_limits< std::size_t >::max()) -> bool
DLL_API auto Spinner(const char *label, float radius, int thickness, const ImU32 &color) -> bool
DLL_API auto DragDouble(const char *label, double *v, double v_speed=1.0, double v_min=0.0, double v_max=0.0, const char *format="%.3lf", float power=1.0) -> bool
DLL_API auto DragDouble2(const char *label, double v[2], double v_speed=1.0, double v_min=0.0, double v_max=0.0, const char *format="%.3lf", float power=1.0) -> bool
DLL_API auto BufferingBar(const char *label, float value, const ImVec2 &size_arg, const ImU32 &bg_col, const ImU32 &fg_col) -> bool
DLL_API auto InputDouble3(const char *label, double v[3], const char *format="%.3lf", ImGuiInputTextFlags flags=0) -> bool
DLL_API auto DragDouble3(const char *label, double v[3], double v_speed=1.0, double v_min=0.0, double v_max=0.0, const char *format="%.3lf", float power=1.0) -> bool
auto ToggleButton(const char *str_id, bool *v) -> bool
DLL_API auto InputDouble2(const char *label, double v[2], const char *format="%.3lf", ImGuiInputTextFlags flags=0) -> bool
DLL_API auto InputDouble4(const char *label, double v[4], const char *format="%.3lf", ImGuiInputTextFlags flags=0) -> bool
DLL_API auto DragDouble4(const char *label, double v[4], double v_speed=1.0, double v_min=0.0, double v_max=0.0, const char *format="%.3lf", float power=1.0) -> bool