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 | 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 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 21 of file layout_helpers.h.
|
static |
Definition at line 41 of file layout_helpers.cc.
References GetBaseFontSize(), and GetTheme().
Referenced by yaze::editor::WindowSidebar::Draw(), yaze::editor::RightDrawerManager::DrawDrawerNavStrip(), GetTouchSafeWidgetHeight(), and yaze::editor::anonymous_namespace{dungeon_workbench_toolbar.cc}::ResolveToolbarLayout().

|
static |
Definition at line 47 of file layout_helpers.cc.
References GetBaseFontSize(), and GetTheme().
Referenced by yaze::gui::plotting::anonymous_namespace{implot_support.cc}::BuildBaseStyle(), yaze::editor::WindowSidebar::Draw(), yaze::editor::RightDrawerManager::DrawDrawerNavStrip(), yaze::gui::plotting::anonymous_namespace{implot_support.cc}::ScaledSpacing(), and ToolbarSeparator().

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

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

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

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

|
static |
Definition at line 75 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::LinkSpritePanel::DrawPaletteSelector(), and yaze::editor::PolyhedralEditorPanel::DrawPreview().

|
static |
Definition at line 80 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::DrawPaletteControls(), yaze::editor::PolyhedralEditorPanel::DrawPreview(), yaze::editor::LinkSpritePanel::DrawPreviewCanvas(), yaze::editor::GfxGroupEditor::DrawSpritesetViewer(), and yaze::editor::anonymous_namespace{gfx_group_editor.cc}::SlotInputsColumnWidth().

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

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

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

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

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

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

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

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

|
static |
Definition at line 251 of file layout_helpers.cc.
|
static |
Definition at line 257 of file layout_helpers.cc.
References yaze::gui::GetContentRegionAvailClamped().
Referenced by yaze::editor::RightDrawerManager::Draw(), yaze::editor::RightDrawerManager::DrawNotificationsPanel(), and yaze::editor::DungeonWorkbenchContent::DrawSplitView().

|
inlinestatic |
Definition at line 70 of file layout_helpers.h.
Referenced by yaze::editor::RightDrawerManager::Draw(), yaze::editor::RightDrawerManager::DrawNotificationsPanel(), and yaze::editor::DungeonWorkbenchContent::DrawSplitView().
|
static |
Definition at line 264 of file layout_helpers.cc.
References GetStandardInputWidth().

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

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

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

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

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

|
static |
Definition at line 352 of file layout_helpers.cc.
References yaze::gui::ConvertColorToImVec4(), GetButtonPadding(), GetTheme(), GetToolbarHeight(), and GetTouchSafeWidgetHeight().
Referenced by yaze::editor::MessageEditor::DrawMessageList().
|
static |
Definition at line 371 of file layout_helpers.cc.
Referenced by yaze::editor::MessageEditor::DrawMessageList().
|
static |
Definition at line 391 of file layout_helpers.cc.
References GetStandardSpacing().

|
static |
Definition at line 401 of file layout_helpers.cc.
References GetButtonPadding(), and GetMinTouchTarget().
Referenced by yaze::editor::MessageEditor::DrawMessageList().

|
static |
Definition at line 416 of file layout_helpers.cc.
Referenced by yaze::editor::DungeonWorkbenchContent::DrawInspectorShelfSelection(), yaze::editor::DungeonWorkbenchContent::DrawObjectPlacementInspector(), and yaze::editor::workbench::DrawObjectSizeControls().
|
static |
Definition at line 427 of file layout_helpers.cc.
References yaze::gui::ConvertColorToImVec4(), and GetTheme().
Referenced by yaze::editor::Tile16Editor::UpdateTile16Edit().

|
static |
Definition at line 434 of file layout_helpers.cc.
|
static |
Definition at line 107 of file layout_helpers.cc.
References yaze::platform::ios::GetSafeAreaInsets().
Referenced by yaze::editor::RightDrawerManager::Draw(), yaze::editor::StatusBar::Draw(), yaze::editor::WindowSidebar::Draw(), yaze::editor::ActivityBar::DrawActivityBarStrip(), and GetTopInset().

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

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

|
static |
Definition at line 140 of file layout_helpers.cc.
References GetMinTouchTarget(), and GetStandardWidgetHeight().
Referenced by BeginToolbar(), yaze::editor::workbench::CalcPaneSegmentHeight(), and yaze::editor::DungeonWorkbenchContent::Draw().

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

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