aboutsummaryrefslogtreecommitdiff
path: root/app/source/Cplt/UI/UI.hpp
blob: 64f1f9e1f2b4d02bf280eae5dbc0a58645978d8c (plain)
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
#pragma once

#include <imgui.h>

namespace ImGui {

void SetNextWindowSizeRelScreen(float xPercent, float yPercent, ImGuiCond cond = ImGuiCond_None);
void SetNextWindowCentered(ImGuiCond cond = ImGuiCond_None);

void PushDisabled();
void PopDisabled();

bool Button(const char* label, bool disabled);
bool Button(const char* label, const ImVec2& sizeArg, bool disabled);

void ErrorIcon();
void ErrorMessage(const char* fmt, ...);
void WarningIcon();
void WarningMessage(const char* fmt, ...);

enum class IconType {
	Flow,
	Circle,
	Square,
	Grid,
	RoundSquare,
	Diamond,
};

void DrawIcon(ImDrawList* drawList, const ImVec2& a, const ImVec2& b, IconType type, bool filled, ImU32 color, ImU32 innerColor);
void Icon(const ImVec2& size, IconType type, bool filled, const ImVec4& color = ImVec4(1, 1, 1, 1), const ImVec4& innerColor = ImVec4(0, 0, 0, 0));

bool Splitter(bool splitVertically, float thickness, float* size1, float* size2, float minSize1, float minSize2, float splitterLongAxisSize = -1.0f);

} // namespace ImGui

namespace UI {

void MainWindow();

void SettingsTab();
void DatabaseViewTab();
void ItemsTab();
void WorkflowsTab();
void TemplatesTab();

} // namespace UI