Complete layout definition with metadata. More...
#include <layout_definition.h>
Public Member Functions | |
| std::unique_ptr< LayoutDefinition > | Clone () const |
| Clone the layout definition. | |
| LayoutPanel * | FindPanel (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< DockNode > | root |
| 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 |
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.
|
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.
| 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.
| 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.
| 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.
| bool yaze::editor::layout_designer::LayoutDefinition::Validate | ( | std::string * | error_message = nullptr | ) | const |
Validate the layout structure.
Definition at line 170 of file layout_definition.cc.
References name, root, and yaze::editor::layout_designer::Split.
| 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.
| std::string yaze::editor::layout_designer::LayoutDefinition::name |
Definition at line 116 of file layout_definition.h.
Referenced by Clone(), CreateEmpty(), yaze::editor::layout_designer::LayoutSerializer::ToJson(), and Validate().
| std::string yaze::editor::layout_designer::LayoutDefinition::description |
Definition at line 117 of file layout_definition.h.
Referenced by Clone(), CreateEmpty(), and yaze::editor::layout_designer::LayoutSerializer::ToJson().
| EditorType yaze::editor::layout_designer::LayoutDefinition::editor_type = EditorType::kUnknown |
Definition at line 118 of file layout_definition.h.
Referenced by Clone().
| std::unique_ptr<DockNode> yaze::editor::layout_designer::LayoutDefinition::root |
Definition at line 121 of file layout_definition.h.
Referenced by yaze::editor::layout_designer::anonymous_namespace{layout_designer_window.cc}::ApplyLayoutToDockspace(), Clone(), CreateEmpty(), FindPanel(), GetAllPanels(), yaze::editor::layout_designer::LayoutSerializer::ToJson(), and Validate().
| ImVec2 yaze::editor::layout_designer::LayoutDefinition::canvas_size = ImVec2(1920, 1080) |
Definition at line 122 of file layout_definition.h.
Referenced by Clone(), and yaze::editor::layout_designer::LayoutSerializer::ToJson().
| std::string yaze::editor::layout_designer::LayoutDefinition::author |
Definition at line 125 of file layout_definition.h.
Referenced by Clone(), and yaze::editor::layout_designer::LayoutSerializer::ToJson().
| std::string yaze::editor::layout_designer::LayoutDefinition::version = "1.0.0" |
Definition at line 126 of file layout_definition.h.
Referenced by Clone(), and yaze::editor::layout_designer::LayoutSerializer::ToJson().
| int64_t yaze::editor::layout_designer::LayoutDefinition::created_timestamp = 0 |
Definition at line 127 of file layout_definition.h.
Referenced by Clone(), CreateEmpty(), and yaze::editor::layout_designer::LayoutSerializer::ToJson().
| int64_t yaze::editor::layout_designer::LayoutDefinition::modified_timestamp = 0 |
Definition at line 128 of file layout_definition.h.
Referenced by Clone(), CreateEmpty(), yaze::editor::layout_designer::LayoutSerializer::ToJson(), and Touch().