yaze 0.3.2
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
yaze::editor::layout_designer Namespace Reference

Namespaces

namespace  anonymous_namespace{layout_designer_window.cc}
 
namespace  anonymous_namespace{layout_serialization.cc}
 

Classes

struct  DockNode
 Represents a dock node in the layout tree. More...
 
struct  LayoutDefinition
 Complete layout definition with metadata. More...
 
class  LayoutDesignerWindow
 Main window for the WYSIWYG layout designer. More...
 
struct  LayoutPanel
 Represents a single panel in a layout. More...
 
class  LayoutSerializer
 Handles JSON serialization and deserialization of layouts. More...
 
struct  PanelDesign
 Complete design definition for a panel's internal layout. More...
 
struct  ThemeProperties
 Encapsulates ImGui style properties for visual design. More...
 
class  ThemePropertiesPanel
 UI panel for editing theme properties in the layout designer. More...
 
class  WidgetCodeGenerator
 Generates C++ ImGui code from widget definitions. More...
 
struct  WidgetDefinition
 Defines a widget instance in a panel layout. More...
 
struct  WidgetProperty
 Represents a configurable property of a widget. More...
 

Enumerations

enum class  DockNodeType { Root , Split , Leaf }
 Type of dock node in the layout tree. More...
 
enum class  DesignMode { PanelLayout , WidgetDesign }
 Design mode for the layout designer. More...
 
enum class  WidgetType {
  Text , TextWrapped , TextColored , Button ,
  SmallButton , Checkbox , RadioButton , InputText ,
  InputInt , InputFloat , SliderInt , SliderFloat ,
  ColorEdit , ColorPicker , Separator , SameLine ,
  Spacing , Dummy , NewLine , Indent ,
  Unindent , BeginGroup , EndGroup , BeginChild ,
  EndChild , CollapsingHeader , TreeNode , TabBar ,
  TabItem , BeginTable , EndTable , TableNextRow ,
  TableNextColumn , TableSetupColumn , Canvas , Image ,
  ImageButton , ProgressBar , BulletText , BeginMenu ,
  EndMenu , MenuItem , BeginCombo , EndCombo ,
  Selectable , ListBox
}
 Types of ImGui widgets available in the designer. More...
 
enum class  YazeWidgetType {
  ThemedButton , PrimaryButton , DangerButton , ThemedIconButton ,
  TransparentIconButton , BeginField , EndField , PropertyTable ,
  PropertyRow , SectionHeader , PaddedPanel , TableWithTheming ,
  CanvasPanel , AutoInputField , AutoButton , AutoCheckbox ,
  AutoInputText , PaletteColorButton , PanelHeader
}
 Extended widget types using yaze GUI abstractions. More...
 

Functions

const char * GetWidgetTypeName (WidgetType type)
 Get human-readable name for widget type.
 
const char * GetWidgetTypeIcon (WidgetType type)
 Get icon 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.
 
std::vector< WidgetPropertyGetDefaultProperties (WidgetType type)
 Get default properties for a widget type.
 
const char * GetYazeWidgetTypeName (YazeWidgetType type)
 Get human-readable name for yaze widget type.
 
const char * GetYazeWidgetTypeIcon (YazeWidgetType type)
 Get icon for yaze widget type.
 
std::string GenerateYazeWidgetCode (YazeWidgetType yaze_type, const WidgetDefinition &widget, int indent_level=0)
 Generate code for yaze widget (uses yaze abstractions)
 
std::vector< std::string > GetRequiredIncludes (YazeWidgetType type)
 Check if yaze widget requires specific includes.
 
std::vector< WidgetPropertyGetYazeDefaultProperties (YazeWidgetType type)
 Get default properties for yaze widget type.
 
WidgetType ToWidgetType (YazeWidgetType type)
 Convert YazeWidgetType to WidgetType (for base widget system)
 

Enumeration Type Documentation

◆ DockNodeType

Type of dock node in the layout tree.

Enumerator
Root 
Split 
Leaf 

Definition at line 20 of file layout_definition.h.

◆ DesignMode

Design mode for the layout designer.

Enumerator
PanelLayout 
WidgetDesign 

Definition at line 27 of file layout_designer_window.h.

◆ WidgetType

Types of ImGui widgets available in the designer.

Enumerator
Text 
TextWrapped 
TextColored 
Button 
SmallButton 
Checkbox 
RadioButton 
InputText 
InputInt 
InputFloat 
SliderInt 
SliderFloat 
ColorEdit 
ColorPicker 
Separator 
SameLine 
Spacing 
Dummy 
NewLine 
Indent 
Unindent 
BeginGroup 
EndGroup 
BeginChild 
EndChild 
CollapsingHeader 
TreeNode 
TabBar 
TabItem 
BeginTable 
EndTable 
TableNextRow 
TableNextColumn 
TableSetupColumn 
Canvas 
Image 
ImageButton 
ProgressBar 
BulletText 
BeginMenu 
EndMenu 
MenuItem 
BeginCombo 
EndCombo 
Selectable 
ListBox 

Definition at line 19 of file widget_definition.h.

◆ YazeWidgetType

Extended widget types using yaze GUI abstractions.

Enumerator
ThemedButton 
PrimaryButton 
DangerButton 
ThemedIconButton 
TransparentIconButton 
BeginField 
EndField 
PropertyTable 
PropertyRow 
SectionHeader 
PaddedPanel 
TableWithTheming 
CanvasPanel 
AutoInputField 
AutoButton 
AutoCheckbox 
AutoInputText 
PaletteColorButton 
PanelHeader 

Definition at line 14 of file yaze_widgets.h.

Function Documentation

◆ GetWidgetTypeName()

◆ GetWidgetTypeIcon()

◆ IsContainerWidget()

bool yaze::editor::layout_designer::IsContainerWidget ( WidgetType type)

◆ RequiresEndCall()

bool yaze::editor::layout_designer::RequiresEndCall ( WidgetType type)

Check if widget type requires an End*() call.

Definition at line 272 of file widget_definition.cc.

References BeginChild, BeginCombo, BeginGroup, BeginMenu, BeginTable, TabBar, and TreeNode.

Referenced by yaze::editor::layout_designer::WidgetDefinition::RequiresEnd().

◆ GetDefaultProperties()

◆ GetYazeWidgetTypeName()

const char * yaze::editor::layout_designer::GetYazeWidgetTypeName ( YazeWidgetType type)

◆ GetYazeWidgetTypeIcon()

◆ GenerateYazeWidgetCode()

std::string yaze::editor::layout_designer::GenerateYazeWidgetCode ( YazeWidgetType yaze_type,
const WidgetDefinition & widget,
int indent_level = 0 )

Generate code for yaze widget (uses yaze abstractions)

Parameters
yaze_typeThe yaze widget type
widgetThe widget definition (for properties)
indent_levelIndentation level
Returns
Generated C++ code using yaze helpers

Definition at line 73 of file yaze_widgets.cc.

References AutoButton, yaze::editor::layout_designer::WidgetDefinition::callback_name, CanvasPanel, DangerButton, GetYazeWidgetTypeName(), ICON_MD_LABEL, ICON_MD_WINDOW, PanelHeader, PrimaryButton, PropertyRow, PropertyTable, SectionHeader, TableWithTheming, and ThemedButton.

Here is the call graph for this function:

◆ GetRequiredIncludes()

std::vector< std::string > yaze::editor::layout_designer::GetRequiredIncludes ( YazeWidgetType type)

◆ GetYazeDefaultProperties()

◆ ToWidgetType()

WidgetType yaze::editor::layout_designer::ToWidgetType ( YazeWidgetType type)

Convert YazeWidgetType to WidgetType (for base widget system)