Theme-aware sizing helpers for consistent UI layout. More...
#include <layout_helpers.h>
Classes | |
| struct | SafeAreaInsets |
| struct | WindowClampResult |
Static Public Member Functions | |
| static float | GetStandardWidgetHeight () |
| static float | GetStandardSpacing () |
| static float | GetToolbarHeight () |
| static float | GetPanelPadding () |
| static float | GetStandardInputWidth () |
| static float | GetHexInputWidth () |
| static float | GetComboWidth () |
| static float | GetSliderWidth () |
| static float | GetCompactInputWidth () |
| 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 | BeginContentChild (const char *id, const ImVec2 &min_size, bool border=false, ImGuiWindowFlags flags=0) |
| static void | EndContentChild () |
| 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 SafeAreaInsets | GetSafeAreaInsets () |
| static float | GetTopInset () |
| static bool | IsTouchDevice () |
| static float | GetMinTouchTarget () |
| static float | GetTouchSafeWidgetHeight () |
| static WindowClampResult | ClampWindowToRect (const ImVec2 &pos, const ImVec2 &size, const ImVec2 &rect_pos, const ImVec2 &rect_size, float min_visible=32.0f) |
| static const Theme & | 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 26 of file layout_helpers.cc.
References GetBaseFontSize(), and GetTheme().
Referenced by yaze::editor::DungeonWorkbenchToolbar::Draw(), yaze::editor::ActivityBar::DrawPanelBrowser(), yaze::editor::ActivityBar::DrawSidePanel(), and GetTouchSafeWidgetHeight().

|
static |
Definition at line 32 of file layout_helpers.cc.
References GetBaseFontSize(), and GetTheme().
Referenced by yaze::gui::plotting::anonymous_namespace{implot_support.cc}::BuildBaseStyle(), yaze::editor::DungeonCanvasViewer::DrawCompactLayerToggles(), yaze::editor::MapPropertiesSystem::DrawGraphicsPopup(), yaze::editor::MapPropertiesSystem::DrawPalettesPopup(), yaze::editor::MapPropertiesSystem::DrawPropertiesPopup(), yaze::editor::MapPropertiesSystem::DrawQuickAccessPopup(), yaze::editor::ActivityBar::DrawSidePanel(), yaze::editor::MapPropertiesSystem::DrawViewPopup(), yaze::gui::plotting::anonymous_namespace{implot_support.cc}::ScaledSpacing(), and ToolbarSeparator().

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

|
static |
Definition at line 44 of file layout_helpers.cc.
References GetBaseFontSize(), and GetTheme().
Referenced by BeginPaddedPanel(), and EndPaddedPanel().

|
static |
Definition at line 50 of file layout_helpers.cc.
References GetBaseFontSize(), and GetTheme().
Referenced by AutoSizedInputField(), AutoSizedInputFloat(), AutoSizedInputInt(), BeginPropertyGrid(), yaze::editor::PolyhedralEditorPanel::Draw(), yaze::editor::PaletteControlsPanel::DrawPaletteGroupSelector(), yaze::editor::PaletteGroupPanel::DrawPaletteSelector(), yaze::editor::PolyhedralEditorPanel::DrawVertexList(), InputToolbarField(), and yaze::editor::PolyhedralEditorPanel::Update().

|
static |
Definition at line 56 of file layout_helpers.cc.
References yaze::gui::Theme::compact_factor, GetBaseFontSize(), and GetTheme().
Referenced by yaze::editor::GfxGroupEditor::DrawPaletteControls(), yaze::editor::SheetBrowserPanel::DrawSearchBar(), InputHexRow(), and InputHexRow().

|
static |
Definition at line 60 of file layout_helpers.cc.
References yaze::gui::Theme::compact_factor, GetBaseFontSize(), GetTheme(), and yaze::gui::Theme::input_width_multiplier.
Referenced by yaze::editor::GfxGroupEditor::DrawPaletteControls(), yaze::editor::PaletteControlsPanel::DrawPaletteGroupSelector(), yaze::editor::LinkSpritePanel::DrawPaletteSelector(), and yaze::editor::PolyhedralEditorPanel::DrawPreview().

|
static |
Definition at line 65 of file layout_helpers.cc.
References yaze::gui::Theme::compact_factor, GetBaseFontSize(), GetTheme(), and yaze::gui::Theme::input_width_multiplier.
Referenced by yaze::editor::SheetBrowserPanel::DrawBatchOperations(), yaze::editor::GfxGroupEditor::DrawBlocksetViewer(), yaze::editor::GfxGroupEditor::DrawPaletteControls(), yaze::editor::PolyhedralEditorPanel::DrawPreview(), yaze::editor::LinkSpritePanel::DrawPreviewCanvas(), yaze::editor::GfxGroupEditor::DrawRoomsetViewer(), and yaze::editor::GfxGroupEditor::DrawSpritesetViewer().

|
static |
Definition at line 70 of file layout_helpers.cc.
References yaze::gui::Theme::compact_factor, GetBaseFontSize(), and GetTheme().
Referenced by yaze::editor::PolyhedralEditorPanel::DrawFaceList(), and yaze::editor::SheetBrowserPanel::DrawSearchBar().

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

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

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

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

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

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

|
static |
Definition at line 206 of file layout_helpers.cc.
Referenced by yaze::editor::UICoordinator::DrawCommandPalette().
|
inlinestatic |
Definition at line 56 of file layout_helpers.h.
|
static |
Definition at line 214 of file layout_helpers.cc.
References yaze::gui::ConvertColorToImVec4(), and GetTheme().

|
static |
Definition at line 229 of file layout_helpers.cc.
|
static |
Definition at line 235 of file layout_helpers.cc.
References yaze::gui::GetContentRegionAvailClamped().
Referenced by yaze::editor::RightPanelManager::Draw(), yaze::editor::DungeonWorkbenchPanel::Draw(), yaze::editor::RightPanelManager::DrawNotificationsPanel(), yaze::editor::DungeonObjectSelector::DrawObjectRenderer(), yaze::editor::ActivityBar::DrawSidePanel(), yaze::editor::DungeonWorkbenchPanel::DrawSplitView(), and yaze::editor::DungeonObjectSelector::DrawTileSelector().

|
inlinestatic |
Definition at line 66 of file layout_helpers.h.
Referenced by yaze::editor::RightPanelManager::Draw(), yaze::editor::DungeonWorkbenchPanel::Draw(), yaze::editor::RightPanelManager::DrawNotificationsPanel(), yaze::editor::DungeonObjectSelector::DrawObjectRenderer(), yaze::editor::ActivityBar::DrawSidePanel(), yaze::editor::DungeonWorkbenchPanel::DrawSplitView(), and yaze::editor::DungeonObjectSelector::DrawTileSelector().
|
static |
Definition at line 242 of file layout_helpers.cc.
References GetStandardInputWidth().

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

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

|
static |
Definition at line 264 of file layout_helpers.cc.
References GetHexInputWidth().

|
static |
Definition at line 291 of file layout_helpers.cc.
References GetHexInputWidth().

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

|
static |
Definition at line 331 of file layout_helpers.cc.
|
static |
Definition at line 335 of file layout_helpers.cc.
References yaze::gui::Theme::compact_factor, GetStandardInputWidth(), and GetTheme().

|
static |
Definition at line 347 of file layout_helpers.cc.
References yaze::gui::ConvertColorToImVec4(), GetButtonPadding(), GetTheme(), GetToolbarHeight(), and GetTouchSafeWidgetHeight().
|
static |
Definition at line 366 of file layout_helpers.cc.
|
static |
Definition at line 386 of file layout_helpers.cc.
References GetStandardSpacing().

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

|
static |
Definition at line 411 of file layout_helpers.cc.
Referenced by yaze::editor::DungeonWorkbenchPanel::DrawInspectorShelfRoom(), and yaze::editor::DungeonWorkbenchPanel::DrawInspectorShelfSelection().
|
static |
Definition at line 422 of file layout_helpers.cc.
References yaze::gui::ConvertColorToImVec4(), and GetTheme().

|
static |
Definition at line 429 of file layout_helpers.cc.
Referenced by yaze::editor::PaletteGroupPanel::DrawColorPicker().
|
static |
Definition at line 92 of file layout_helpers.cc.
References yaze::platform::ios::GetSafeAreaInsets().
Referenced by yaze::editor::RightPanelManager::Draw(), yaze::editor::StatusBar::Draw(), yaze::editor::ActivityBar::DrawActivityBarStrip(), yaze::editor::ActivityBar::DrawSidePanel(), and GetTopInset().

|
static |
Definition at line 108 of file layout_helpers.cc.
References yaze::platform::ios::GetOverlayTopInset(), GetSafeAreaInsets(), and yaze::gui::LayoutHelpers::SafeAreaInsets::top.
Referenced by yaze::editor::RightPanelManager::Draw(), yaze::editor::ActivityBar::DrawActivityBarStrip(), and yaze::editor::ActivityBar::DrawSidePanel().

|
static |
Definition at line 116 of file layout_helpers.cc.
Referenced by yaze::gui::PanelWindow::Begin(), yaze::editor::StatusBar::Draw(), yaze::editor::PanelManager::DrawAllVisiblePanels(), yaze::gui::Canvas::DrawBackground(), yaze::editor::UICoordinator::DrawPanelFinder(), yaze::editor::DungeonWorkbenchPanel::DrawRecentRoomTabs(), yaze::editor::DungeonRoomSelector::DrawRoomSelector(), yaze::editor::StatusBar::GetHeight(), GetMinTouchTarget(), yaze::editor::DungeonCanvasViewer::HandleTouchLongPressContextMenu(), yaze::editor::DungeonCanvasViewer::RenderPotItems(), and yaze::editor::DungeonCanvasViewer::RenderSprites().
|
static |
Definition at line 121 of file layout_helpers.cc.
References IsTouchDevice().
Referenced by yaze::editor::DungeonWorkbenchPanel::Draw(), yaze::editor::DungeonRoomSelector::DrawRoomSelector(), GetTouchSafeWidgetHeight(), and ToolbarButton().

|
static |
Definition at line 125 of file layout_helpers.cc.
References GetMinTouchTarget(), and GetStandardWidgetHeight().
Referenced by BeginToolbar(), yaze::editor::DungeonWorkbenchPanel::Draw(), and yaze::editor::DungeonWorkbenchToolbar::Draw().

|
static |
Definition at line 129 of file layout_helpers.cc.
Referenced by yaze::gui::PanelWindow::Begin(), and yaze::platform::IOSWindowBackend::RenderImGui().
|
inlinestatic |
Definition at line 116 of file layout_helpers.h.
References yaze::gui::ThemeManager::Get(), and yaze::gui::ThemeManager::GetCurrentTheme().
Referenced by ApplyCompactFactor(), BeginCanvasPanel(), BeginPropertyGrid(), BeginTableWithTheming(), BeginToolbar(), GetButtonPadding(), GetCanvasToolbarHeight(), GetComboWidth(), GetCompactInputWidth(), GetHexInputWidth(), GetPanelPadding(), GetSliderWidth(), GetStandardInputWidth(), GetStandardSpacing(), GetStandardWidgetHeight(), GetTableRowHeight(), GetToolbarHeight(), InputToolbarField(), and SectionHeader().

|
inlinestaticprivate |
Definition at line 121 of file layout_helpers.h.
Referenced by GetButtonPadding(), GetCanvasToolbarHeight(), GetComboWidth(), GetCompactInputWidth(), GetHexInputWidth(), GetPanelPadding(), GetSliderWidth(), GetStandardInputWidth(), GetStandardSpacing(), GetStandardWidgetHeight(), GetTableRowHeight(), and GetToolbarHeight().
|
inlinestaticprivate |
Definition at line 122 of file layout_helpers.h.
References yaze::gui::Theme::compact_factor, and GetTheme().
