Theme-aware sizing helpers for consistent UI layout. More...
#include <layout_helpers.h>
Static Public Member Functions | |
| static float | GetStandardWidgetHeight () |
| static float | GetStandardSpacing () |
| static float | GetToolbarHeight () |
| static float | GetPanelPadding () |
| static float | GetStandardInputWidth () |
| static float | GetButtonPadding () |
| static float | GetTableRowHeight () |
| static float | GetCanvasToolbarHeight () |
| static void | BeginPaddedPanel (const char *label, float padding=-1.0f) |
| static void | EndPaddedPanel () |
| static bool | BeginTableWithTheming (const char *str_id, int columns, ImGuiTableFlags flags=0, const ImVec2 &outer_size=ImVec2(0, 0), float inner_width=0.0f) |
| static void | EndTableWithTheming () |
| static void | EndTable () |
| static void | BeginCanvasPanel (const char *label, ImVec2 *canvas_size=nullptr) |
| static void | EndCanvasPanel () |
| static bool | AutoSizedInputField (const char *label, char *buf, size_t buf_size, ImGuiInputTextFlags flags=0) |
| static bool | AutoSizedInputInt (const char *label, int *v, int step=1, int step_fast=100, ImGuiInputTextFlags flags=0) |
| static bool | AutoSizedInputFloat (const char *label, float *v, float step=0.0f, float step_fast=0.0f, const char *format="%.3f", ImGuiInputTextFlags flags=0) |
| static bool | InputHexRow (const char *label, uint8_t *data) |
| static bool | InputHexRow (const char *label, uint16_t *data) |
| static void | BeginPropertyGrid (const char *label) |
| static void | EndPropertyGrid () |
| static bool | InputToolbarField (const char *label, char *buf, size_t buf_size) |
| static void | BeginToolbar (const char *label) |
| static void | EndToolbar () |
| static void | ToolbarSeparator () |
| static bool | ToolbarButton (const char *label, const ImVec2 &size=ImVec2(0, 0)) |
| static void | PropertyRow (const char *label, std::function< void()> widget_callback) |
| static void | SectionHeader (const char *label) |
| static void | HelpMarker (const char *desc) |
| static const EnhancedTheme & | GetTheme () |
Static Private Member Functions | |
| static float | GetBaseFontSize () |
| static float | ApplyCompactFactor (float base_value) |
Theme-aware sizing helpers for consistent UI layout.
All sizing functions respect the current theme's compact_factor and semantic multipliers, ensuring layouts are consistent but customizable.
Definition at line 19 of file layout_helpers.h.
|
static |
Definition at line 16 of file layout_helpers.cc.
References GetBaseFontSize(), and GetTheme().
Referenced by yaze::gui::ThemedIconButton().

|
static |
Definition at line 21 of file layout_helpers.cc.
References GetBaseFontSize(), and GetTheme().
Referenced by yaze::editor::MapPropertiesSystem::DrawGraphicsPopup(), yaze::editor::MapPropertiesSystem::DrawPalettesPopup(), yaze::editor::MapPropertiesSystem::DrawPropertiesPopup(), yaze::editor::MapPropertiesSystem::DrawQuickAccessPopup(), yaze::editor::MapPropertiesSystem::DrawViewPopup(), and ToolbarSeparator().

|
static |
Definition at line 26 of file layout_helpers.cc.
References GetBaseFontSize(), and GetTheme().
Referenced by BeginToolbar().

|
static |
Definition at line 31 of file layout_helpers.cc.
References GetBaseFontSize(), and GetTheme().
Referenced by BeginPaddedPanel(), yaze::gui::BeginThemedPanel(), and EndPaddedPanel().

|
static |
Definition at line 36 of file layout_helpers.cc.
References GetBaseFontSize(), and GetTheme().
Referenced by AutoSizedInputField(), AutoSizedInputFloat(), AutoSizedInputInt(), BeginPropertyGrid(), yaze::editor::PaletteGroupCard::DrawPaletteSelector(), InputHexRow(), InputHexRow(), InputToolbarField(), yaze::gui::ThemedCombo(), yaze::gui::ThemedInputFloat(), yaze::gui::ThemedInputInt(), and yaze::gui::ThemedInputText().

|
static |
Definition at line 41 of file layout_helpers.cc.
References GetBaseFontSize(), and GetTheme().
Referenced by BeginToolbar(), yaze::editor::MapPropertiesSystem::DrawGraphicsPopup(), yaze::editor::MapPropertiesSystem::DrawPalettesPopup(), yaze::editor::MapPropertiesSystem::DrawPropertiesPopup(), yaze::editor::MapPropertiesSystem::DrawQuickAccessPopup(), yaze::editor::MapPropertiesSystem::DrawViewPopup(), and ToolbarButton().

|
static |
Definition at line 46 of file layout_helpers.cc.
References GetBaseFontSize(), and GetTheme().
Referenced by BeginTableWithTheming().

|
static |
Definition at line 51 of file layout_helpers.cc.
References GetBaseFontSize(), and GetTheme().

|
static |
Definition at line 57 of file layout_helpers.cc.
References GetPanelPadding().

|
static |
Definition at line 68 of file layout_helpers.cc.
References GetPanelPadding().

|
static |
Definition at line 76 of file layout_helpers.cc.
References yaze::gui::ConvertColorToImVec4(), GetTableRowHeight(), and GetTheme().
Referenced by yaze::gui::BeginThemedTable(), and yaze::editor::UICoordinator::DrawCommandPalette().

|
static |
Definition at line 98 of file layout_helpers.cc.
Referenced by yaze::editor::UICoordinator::DrawCommandPalette().
|
inlinestatic |
Definition at line 40 of file layout_helpers.h.
Referenced by yaze::gui::EndThemedTable().
|
static |
Definition at line 106 of file layout_helpers.cc.
References yaze::gui::ConvertColorToImVec4(), and GetTheme().

|
static |
Definition at line 120 of file layout_helpers.cc.
|
static |
Definition at line 127 of file layout_helpers.cc.
References GetStandardInputWidth().

|
static |
Definition at line 133 of file layout_helpers.cc.
References GetStandardInputWidth().

|
static |
Definition at line 139 of file layout_helpers.cc.
References GetStandardInputWidth().

|
static |
Definition at line 147 of file layout_helpers.cc.
References GetStandardInputWidth(), and GetTheme().

|
static |
Definition at line 175 of file layout_helpers.cc.
References GetStandardInputWidth(), and GetTheme().

|
static |
Definition at line 203 of file layout_helpers.cc.
References GetStandardInputWidth(), and GetTheme().

|
static |
Definition at line 216 of file layout_helpers.cc.
|
static |
Definition at line 220 of file layout_helpers.cc.
References yaze::gui::EnhancedTheme::compact_factor, GetStandardInputWidth(), and GetTheme().

|
static |
Definition at line 230 of file layout_helpers.cc.
References yaze::gui::ConvertColorToImVec4(), GetButtonPadding(), GetTheme(), and GetToolbarHeight().

|
static |
Definition at line 239 of file layout_helpers.cc.
|
static |
Definition at line 245 of file layout_helpers.cc.
References GetStandardSpacing().

|
static |
Definition at line 255 of file layout_helpers.cc.
References GetButtonPadding(), and GetTheme().

|
static |
Definition at line 265 of file layout_helpers.cc.
|
static |
Definition at line 275 of file layout_helpers.cc.
References yaze::gui::ConvertColorToImVec4(), and GetTheme().
Referenced by yaze::gui::SectionHeader().

|
static |
Definition at line 282 of file layout_helpers.cc.
Referenced by yaze::editor::PaletteGroupCard::DrawColorPicker(), and yaze::gui::ThemedHelpMarker().
|
inlinestatic |
Definition at line 73 of file layout_helpers.h.
References yaze::gui::ThemeManager::Get(), and yaze::gui::ThemeManager::GetCurrentTheme().
Referenced by ApplyCompactFactor(), BeginCanvasPanel(), BeginPropertyGrid(), BeginTableWithTheming(), BeginToolbar(), GetButtonPadding(), GetCanvasToolbarHeight(), GetPanelPadding(), GetStandardInputWidth(), GetStandardSpacing(), GetStandardWidgetHeight(), GetTableRowHeight(), GetToolbarHeight(), InputHexRow(), InputHexRow(), InputToolbarField(), SectionHeader(), and ToolbarButton().

|
inlinestaticprivate |
Definition at line 78 of file layout_helpers.h.
Referenced by GetButtonPadding(), GetCanvasToolbarHeight(), GetPanelPadding(), GetStandardInputWidth(), GetStandardSpacing(), GetStandardWidgetHeight(), GetTableRowHeight(), and GetToolbarHeight().
|
inlinestaticprivate |
Definition at line 79 of file layout_helpers.h.
References yaze::gui::EnhancedTheme::compact_factor, and GetTheme().
