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

Complete layout definition with metadata. More...

#include <layout_definition.h>

Public Member Functions

std::unique_ptr< LayoutDefinitionClone () const
 Clone the layout definition.
 
LayoutPanelFindPanel (const std::string &panel_id) const
 Find a panel by ID anywhere in the layout.
 
std::vector< LayoutPanel * > GetAllPanels () const
 Get all panels in the layout.
 
bool Validate (std::string *error_message=nullptr) const
 Validate the layout structure.
 
void Touch ()
 Update the modified timestamp to current time.
 

Static Public Member Functions

static LayoutDefinition CreateEmpty (const std::string &name)
 Create a default empty layout.
 

Public Attributes

std::string name
 
std::string description
 
EditorType editor_type = EditorType::kUnknown
 
std::unique_ptr< DockNoderoot
 
ImVec2 canvas_size = ImVec2(1920, 1080)
 
std::string author
 
std::string version = "1.0.0"
 
int64_t created_timestamp = 0
 
int64_t modified_timestamp = 0
 

Detailed Description

Complete layout definition with metadata.

Represents a full workspace layout that can be saved, loaded, and applied to the editor. Includes the dock tree and metadata.

Definition at line 114 of file layout_definition.h.

Member Function Documentation

◆ CreateEmpty()

LayoutDefinition yaze::editor::layout_designer::LayoutDefinition::CreateEmpty ( const std::string & name)
static

Create a default empty layout.

Definition at line 105 of file layout_definition.cc.

References created_timestamp, description, modified_timestamp, name, yaze::editor::layout_designer::Root, and root.

◆ Clone()

std::unique_ptr< LayoutDefinition > yaze::editor::layout_designer::LayoutDefinition::Clone ( ) const

Clone the layout definition.

Definition at line 120 of file layout_definition.cc.

References author, canvas_size, created_timestamp, description, editor_type, modified_timestamp, name, root, and version.

◆ FindPanel()

LayoutPanel * yaze::editor::layout_designer::LayoutDefinition::FindPanel ( const std::string & panel_id) const

Find a panel by ID anywhere in the layout.

Definition at line 138 of file layout_definition.cc.

References root.

◆ GetAllPanels()

std::vector< LayoutPanel * > yaze::editor::layout_designer::LayoutDefinition::GetAllPanels ( ) const

Get all panels in the layout.

Definition at line 145 of file layout_definition.cc.

References yaze::editor::layout_designer::Leaf, and root.

◆ Validate()

bool yaze::editor::layout_designer::LayoutDefinition::Validate ( std::string * error_message = nullptr) const

Validate the layout structure.

Returns
true if layout is valid

Definition at line 170 of file layout_definition.cc.

References name, root, and yaze::editor::layout_designer::Split.

◆ Touch()

void yaze::editor::layout_designer::LayoutDefinition::Touch ( )

Update the modified timestamp to current time.

Definition at line 224 of file layout_definition.cc.

References modified_timestamp.

Member Data Documentation

◆ name

std::string yaze::editor::layout_designer::LayoutDefinition::name

◆ description

std::string yaze::editor::layout_designer::LayoutDefinition::description

◆ editor_type

EditorType yaze::editor::layout_designer::LayoutDefinition::editor_type = EditorType::kUnknown

Definition at line 118 of file layout_definition.h.

Referenced by Clone().

◆ root

◆ canvas_size

ImVec2 yaze::editor::layout_designer::LayoutDefinition::canvas_size = ImVec2(1920, 1080)

◆ author

std::string yaze::editor::layout_designer::LayoutDefinition::author

◆ version

std::string yaze::editor::layout_designer::LayoutDefinition::version = "1.0.0"

◆ created_timestamp

int64_t yaze::editor::layout_designer::LayoutDefinition::created_timestamp = 0

◆ modified_timestamp

int64_t yaze::editor::layout_designer::LayoutDefinition::modified_timestamp = 0

The documentation for this struct was generated from the following files: