yaze 0.3.2
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
themed_widgets.h
Go to the documentation of this file.
1#ifndef YAZE_APP_GUI_THEMED_WIDGETS_H
2#define YAZE_APP_GUI_THEMED_WIDGETS_H
3
7#include "imgui/imgui.h"
8
9namespace yaze {
10namespace gui {
11
34// ============================================================================
35// Buttons
36// ============================================================================
37
41bool ThemedButton(const char* label, const ImVec2& size = ImVec2(0, 0));
42
46bool ThemedIconButton(const char* icon, const char* tooltip = nullptr);
47
51bool PrimaryButton(const char* label, const ImVec2& size = ImVec2(0, 0));
52
56bool DangerButton(const char* label, const ImVec2& size = ImVec2(0, 0));
57
58// ============================================================================
59// Headers & Sections
60// ============================================================================
61
65void SectionHeader(const char* label);
66
70bool ThemedCollapsingHeader(const char* label, ImGuiTreeNodeFlags flags = 0);
71
72// ============================================================================
73// Cards & Panels
74// ============================================================================
75
82void ThemedCard(const char* label, std::function<void()> content,
83 const ImVec2& size = ImVec2(0, 0));
84
88void BeginThemedPanel(const char* label, const ImVec2& size = ImVec2(0, 0));
89
93void EndThemedPanel();
94
95// ============================================================================
96// Inputs
97// ============================================================================
98
102bool ThemedInputText(const char* label, char* buf, size_t buf_size,
103 ImGuiInputTextFlags flags = 0);
104
108bool ThemedInputInt(const char* label, int* v, int step = 1, int step_fast = 100,
109 ImGuiInputTextFlags flags = 0);
110
114bool ThemedInputFloat(const char* label, float* v, float step = 0.0f,
115 float step_fast = 0.0f, const char* format = "%.3f",
116 ImGuiInputTextFlags flags = 0);
117
121bool ThemedCheckbox(const char* label, bool* v);
122
126bool ThemedCombo(const char* label, int* current_item, const char* const items[],
127 int items_count, int popup_max_height_in_items = -1);
128
129// ============================================================================
130// Tables
131// ============================================================================
132
136bool BeginThemedTable(const char* str_id, int columns, ImGuiTableFlags flags = 0,
137 const ImVec2& outer_size = ImVec2(0, 0),
138 float inner_width = 0.0f);
139
143void EndThemedTable();
144
145// ============================================================================
146// Tooltips & Help
147// ============================================================================
148
152void ThemedHelpMarker(const char* desc);
153
157void BeginThemedTooltip();
158
162void EndThemedTooltip();
163
164// ============================================================================
165// Status & Feedback
166// ============================================================================
167
172void ThemedStatusText(const char* text, StatusType type);
173
177void ThemedProgressBar(float fraction, const ImVec2& size = ImVec2(-1, 0),
178 const char* overlay = nullptr);
179
180// ============================================================================
181// Palette Editor Widgets
182// ============================================================================
183
184// NOTE: PaletteColorButton moved to color.h for consistency with other color utilities
185
192void ColorInfoPanel(const yaze::gfx::SnesColor& color,
193 bool show_snes_format = true,
194 bool show_hex_format = true);
195
201void ModifiedBadge(bool is_modified, const char* text = nullptr);
202
203// ============================================================================
204// Utility
205// ============================================================================
206
210inline const EnhancedTheme& GetTheme() {
212}
213
218
223
224} // namespace gui
225} // namespace yaze
226
227#endif // YAZE_APP_GUI_THEMED_WIDGETS_H
SNES Color container.
Definition snes_color.h:109
static ThemeManager & Get()
const EnhancedTheme & GetCurrentTheme() const
void ThemedHelpMarker(const char *desc)
Themed help marker with tooltip.
bool ThemedCheckbox(const char *label, bool *v)
Themed checkbox.
bool ThemedButton(const char *label, const ImVec2 &size)
Theme-aware widget library.
void ThemedCard(const char *label, std::function< void()> content, const ImVec2 &size)
Themed card with rounded corners and shadow.
void ColorInfoPanel(const yaze::gfx::SnesColor &color, bool show_snes_format, bool show_hex_format)
Display color information with copy-to-clipboard functionality.
void BeginThemedPanel(const char *label, const ImVec2 &size)
Begin themed panel (manual version of ThemedCard)
void ModifiedBadge(bool is_modified, const char *text)
Modified indicator badge (displayed as text with icon)
bool BeginThemedTable(const char *str_id, int columns, ImGuiTableFlags flags, const ImVec2 &outer_size, float inner_width)
Begin themed table with automatic styling.
bool ThemedInputFloat(const char *label, float *v, float step, float step_fast, const char *format, ImGuiInputTextFlags flags)
Themed float input.
void ThemedStatusText(const char *text, StatusType type)
Themed status text (success, warning, error, info)
bool DangerButton(const char *label, const ImVec2 &size)
Danger/destructive action button (uses error color)
const EnhancedTheme & GetTheme()
Get current theme (shortcut)
void BeginThemedTooltip()
Begin themed tooltip.
void SectionHeader(const char *icon, const char *label, const ImVec4 &color)
void EndThemedTooltip()
End themed tooltip.
void PushThemedWidgetColors()
Apply theme colors to next widget.
bool PrimaryButton(const char *label, const ImVec2 &size)
Primary action button (uses accent color)
void PopThemedWidgetColors()
Restore previous colors.
bool ThemedCombo(const char *label, int *current_item, const char *const items[], int items_count, int popup_max_height_in_items)
Themed combo box.
bool ThemedInputText(const char *label, char *buf, size_t buf_size, ImGuiInputTextFlags flags)
Themed text input.
void EndThemedPanel()
End themed panel.
void ThemedProgressBar(float fraction, const ImVec2 &size, const char *overlay)
Themed progress bar.
void EndThemedTable()
End themed table.
bool ThemedCollapsingHeader(const char *label, ImGuiTreeNodeFlags flags)
Collapsible section with themed header.
bool ThemedIconButton(const char *icon, const char *tooltip)
Themed button with icon (Material Design Icons)
bool ThemedInputInt(const char *label, int *v, int step, int step_fast, ImGuiInputTextFlags flags)
Themed integer input.
Main namespace for the application.
Definition controller.cc:20
Comprehensive theme structure for YAZE.