1#ifndef YAZE_APP_GUI_LAYOUT_HELPERS_H
2#define YAZE_APP_GUI_LAYOUT_HELPERS_H
6#include "absl/strings/str_format.h"
8#include "imgui/imgui.h"
52 ImGuiTableFlags flags = 0,
53 const ImVec2& outer_size = ImVec2(0, 0),
54 float inner_width = 0.0f);
59 ImVec2* canvas_size =
nullptr);
65 ImGuiWindowFlags flags = 0);
70 ImGuiInputTextFlags flags = 0);
73 ImGuiInputTextFlags flags = 0);
75 float step = 0.0f,
float step_fast = 0.0f,
76 const char* format =
"%.3f",
77 ImGuiInputTextFlags flags = 0);
80 static bool InputHexRow(
const char* label, uint8_t* data);
81 static bool InputHexRow(
const char* label, uint16_t* data);
91 const ImVec2& size = ImVec2(0, 0));
95 std::function<
void()> widget_callback);
111 const ImVec2& rect_pos,
112 const ImVec2& rect_size,
113 float min_visible = 32.0f);
Theme-aware sizing helpers for consistent UI layout.
static float GetHexInputWidth()
static WindowClampResult ClampWindowToRect(const ImVec2 &pos, const ImVec2 &size, const ImVec2 &rect_pos, const ImVec2 &rect_size, float min_visible=32.0f)
static float GetMinTouchTarget()
static float GetSliderWidth()
static void SectionHeader(const char *label)
static float GetPanelPadding()
static float GetTouchSafeWidgetHeight()
static void ToolbarSeparator()
static bool BeginContentChild(const char *id, const ImVec2 &min_size, bool border=false, ImGuiWindowFlags flags=0)
static void BeginToolbar(const char *label)
static float GetCompactInputWidth()
static float GetCanvasToolbarHeight()
static void EndPaddedPanel()
static void EndTableWithTheming()
static void EndContentChild()
static float ApplyCompactFactor(float base_value)
static float GetComboWidth()
static void HelpMarker(const char *desc)
static float GetTableRowHeight()
static const Theme & GetTheme()
static float GetStandardInputWidth()
static void BeginPropertyGrid(const char *label)
static SafeAreaInsets GetSafeAreaInsets()
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 AutoSizedInputInt(const char *label, int *v, int step=1, int step_fast=100, ImGuiInputTextFlags flags=0)
static bool InputToolbarField(const char *label, char *buf, size_t buf_size)
static void BeginCanvasPanel(const char *label, ImVec2 *canvas_size=nullptr)
static void PropertyRow(const char *label, std::function< void()> widget_callback)
static float GetBaseFontSize()
static float GetTopInset()
static float GetButtonPadding()
static float GetToolbarHeight()
static void BeginPaddedPanel(const char *label, float padding=-1.0f)
static bool ToolbarButton(const char *label, const ImVec2 &size=ImVec2(0, 0))
static bool InputHexRow(const char *label, uint8_t *data)
static float GetStandardWidgetHeight()
static float GetStandardSpacing()
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 EndCanvasPanel()
static bool AutoSizedInputField(const char *label, char *buf, size_t buf_size, ImGuiInputTextFlags flags=0)
static void EndPropertyGrid()
static bool IsTouchDevice()
const Theme & GetCurrentTheme() const
static ThemeManager & Get()
Comprehensive theme structure for YAZE.