1#ifndef YAZE_APP_EDITOR_LAYOUT_DESIGNER_WIDGET_DEFINITION_H_
2#define YAZE_APP_EDITOR_LAYOUT_DESIGNER_WIDGET_DEFINITION_H_
9#include "imgui/imgui.h"
13namespace layout_designer {
122 std::vector<std::unique_ptr<WidgetDefinition>>
children;
136 void AddChild(std::unique_ptr<WidgetDefinition> child);
154 std::vector<std::unique_ptr<WidgetDefinition>>
widgets;
163 void AddWidget(std::unique_ptr<WidgetDefinition> widget);
166 bool Validate(std::string* error_message =
nullptr)
const;
std::vector< WidgetProperty > GetDefaultProperties(WidgetType type)
Get default properties for a widget type.
WidgetType
Types of ImGui widgets available in the designer.
const char * GetWidgetTypeName(WidgetType type)
Get human-readable name for widget type.
bool IsContainerWidget(WidgetType type)
Check if widget type is a container.
bool RequiresEndCall(WidgetType type)
Check if widget type requires an End*() call.
const char * GetWidgetTypeIcon(WidgetType type)
Get icon for widget type.
Complete design definition for a panel's internal layout.
void AddWidget(std::unique_ptr< WidgetDefinition > widget)
std::vector< std::unique_ptr< WidgetDefinition > > widgets
bool Validate(std::string *error_message=nullptr) const
std::vector< WidgetDefinition * > GetAllWidgets()
int64_t modified_timestamp
int64_t created_timestamp
WidgetDefinition * FindWidget(const std::string &id)