From 7fe47a9d5b1727a61dc724523b530762f6d6ba19 Mon Sep 17 00:00:00 2001 From: rtk0c Date: Thu, 30 Jun 2022 21:38:53 -0700 Subject: Restructure project --- app/source/Cplt/UI/UI.hpp | 48 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 app/source/Cplt/UI/UI.hpp (limited to 'app/source/Cplt/UI/UI.hpp') diff --git a/app/source/Cplt/UI/UI.hpp b/app/source/Cplt/UI/UI.hpp new file mode 100644 index 0000000..0a80b4c --- /dev/null +++ b/app/source/Cplt/UI/UI.hpp @@ -0,0 +1,48 @@ +#pragma once + +#include + +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 -- cgit v1.2.3-70-g09d2