Namespaces | |
| namespace | anonymous_namespace{dock_tree.cc} |
| namespace | anonymous_namespace{dock_tree_json.cc} |
| namespace | anonymous_namespace{dock_tree_renderer.cc} |
| namespace | anonymous_namespace{layout_designer_panel.cc} |
| namespace | anonymous_namespace{layout_designer_window.cc} |
| namespace | anonymous_namespace{layout_serialization.cc} |
| namespace | anonymous_namespace{split_boundary_drag.cc} |
| namespace | internal |
| namespace | panel_palette_internal |
Classes | |
| struct | DockNode |
| Represents a dock node in the layout tree. More... | |
| struct | DockTree |
| struct | DockTreeLayout |
| struct | DropSuggestion |
| struct | LayoutDefinition |
| Complete layout definition with metadata. More... | |
| class | LayoutDesignerPanel |
| 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 | PanelEntry |
| struct | PanelPaletteEntry |
| struct | SplitBoundaryHit |
| struct | ThemeProperties |
| Encapsulates ImGui style properties for visual design. More... | |
| class | ThemePropertiesPanel |
| UI panel for editing theme properties in the layout designer. More... | |
| class | TreeUndoStack |
| 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... | |
Typedefs | |
| using | DockNodeId = std::uint64_t |
Functions | |
| DockTree | MakeEmptyTree (std::string name) |
| const DockNode * | HitTestNode (const DockTreeLayout &layout, ImVec2 mouse) |
| nlohmann::json | DockTreeToJson (const DockTree &tree) |
| absl::StatusOr< DockTree > | DockTreeFromJson (const nlohmann::json &j) |
| DockTreeLayout | ComputeLayout (const DockTree &tree, const ImRect &viewport) |
| void | RenderDockTree (const DockTree &tree, const DockTreeLayout &layout, const DockNode *selected, ImDrawList *dl) |
| DropSuggestion | SuggestDrop (const ImRect &leaf_rect, ImVec2 mouse) |
| ImRect | ComputeDropPreviewRect (const ImRect &leaf_rect, const DropSuggestion &suggestion) |
| DockNode * | ApplyDropSuggestion (DockTree *tree, DockNode *leaf, const DropSuggestion &suggestion, PanelEntry panel) |
| REGISTER_PANEL (LayoutDesignerPanel) | |
| std::vector< PanelPaletteEntry > | CollectPaletteEntries (const std::string &exclude_panel_id) |
| void | DrawPanelPalette (const std::vector< PanelPaletteEntry > &entries, std::string *query) |
| SplitBoundaryHit | HitTestSplitBoundary (const DockTree &tree, const DockTreeLayout &layout, ImVec2 mouse, float tolerance) |
| float | ComputeDraggedSplitRatio (float start_ratio, float axis_delta_px, float axis_size_px) |
| 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< WidgetProperty > | GetDefaultProperties (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< WidgetProperty > | GetYazeDefaultProperties (YazeWidgetType type) |
| Get default properties for yaze widget type. | |
| WidgetType | ToWidgetType (YazeWidgetType type) |
| Convert YazeWidgetType to WidgetType (for base widget system) | |
Variables | |
| constexpr DockNodeId | kInvalidDockNodeId = 0 |
| constexpr float | kMinCellSize = 20.0f |
| constexpr float | kDropEdgeFraction = 0.3f |
| constexpr float | kDropSplitRatio = 0.3f |
| constexpr float | kMinSplitRatio = 0.05f |
| constexpr float | kMaxSplitRatio = 0.95f |
| constexpr float | kSplitBoundaryTolerance = 4.0f |
| using yaze::editor::layout_designer::DockNodeId = std::uint64_t |
Definition at line 21 of file dock_tree.h.
|
strong |
| Enumerator | |
|---|---|
| kLeft | |
| kRight | |
| kUp | |
| kDown | |
Definition at line 41 of file dock_tree.h.
|
strong |
Type of dock node in the layout tree.
| Enumerator | |
|---|---|
| Root | |
| Split | |
| Leaf | |
Definition at line 20 of file layout_definition.h.
|
strong |
Design mode for the layout designer.
| Enumerator | |
|---|---|
| PanelLayout | |
| WidgetDesign | |
Definition at line 27 of file layout_designer_window.h.
|
strong |
Types of ImGui widgets available in the designer.
Definition at line 19 of file widget_definition.h.
|
strong |
Extended widget types using yaze GUI abstractions.
Definition at line 14 of file yaze_widgets.h.
| DockTree yaze::editor::layout_designer::MakeEmptyTree | ( | std::string | name | ) |
Definition at line 262 of file dock_tree.cc.
Referenced by yaze::editor::layout_designer::LayoutDesignerPanel::DrawFileRow().
| const DockNode * yaze::editor::layout_designer::HitTestNode | ( | const DockTreeLayout & | layout, |
| ImVec2 | mouse ) |
Definition at line 7 of file dock_tree_hit_test.cc.
References yaze::editor::layout_designer::DockTreeLayout::node_rects.
Referenced by yaze::editor::layout_designer::LayoutDesignerPanel::Draw().
| nlohmann::json yaze::editor::layout_designer::DockTreeToJson | ( | const DockTree & | tree | ) |
Definition at line 170 of file dock_tree_json.cc.
References yaze::editor::layout_designer::DockTree::description, yaze::editor::layout_designer::DockTree::name, and yaze::editor::layout_designer::DockTree::root.
Referenced by yaze::editor::UserSettings::ApplyPanelLayoutDefaultsRevision(), and yaze::editor::layout_designer::LayoutDesignerPanel::SaveCurrentTreeToNamedLayouts().
| absl::StatusOr< DockTree > yaze::editor::layout_designer::DockTreeFromJson | ( | const nlohmann::json & | j | ) |
Definition at line 186 of file dock_tree_json.cc.
References yaze::editor::layout_designer::DockTree::description, yaze::editor::layout_designer::DockTree::name, yaze::editor::layout_designer::DockTree::root, and yaze::editor::layout_designer::DockTree::schema_version.
Referenced by yaze::editor::SettingsPanel::ApplyNamedLayoutToDockspace(), and yaze::editor::layout_designer::LayoutDesignerPanel::LoadNamedLayoutIntoTree().
| DockTreeLayout yaze::editor::layout_designer::ComputeLayout | ( | const DockTree & | tree, |
| const ImRect & | viewport ) |
Definition at line 59 of file dock_tree_renderer.cc.
References yaze::editor::layout_designer::DockTree::root.
Referenced by yaze::editor::layout_designer::LayoutDesignerPanel::Draw().
| void yaze::editor::layout_designer::RenderDockTree | ( | const DockTree & | tree, |
| const DockTreeLayout & | layout, | ||
| const DockNode * | selected, | ||
| ImDrawList * | dl ) |
Definition at line 65 of file dock_tree_renderer.cc.
References yaze::gui::GetAccentColor(), yaze::editor::layout_designer::DockNode::kLeaf, yaze::editor::layout_designer::DockNode::kSplit, yaze::editor::layout_designer::DockTreeLayout::node_rects, and yaze::editor::layout_designer::DockTree::root.
Referenced by yaze::editor::layout_designer::LayoutDesignerPanel::Draw().

| DropSuggestion yaze::editor::layout_designer::SuggestDrop | ( | const ImRect & | leaf_rect, |
| ImVec2 | mouse ) |
Definition at line 10 of file drop_zone_suggester.cc.
References kDropEdgeFraction, yaze::editor::layout_designer::DropSuggestion::kind, yaze::editor::layout_designer::DropSuggestion::kSplitBottom, yaze::editor::layout_designer::DropSuggestion::kSplitLeft, yaze::editor::layout_designer::DropSuggestion::kSplitRight, yaze::editor::layout_designer::DropSuggestion::kSplitTop, and yaze::editor::layout_designer::DropSuggestion::kTab.
Referenced by yaze::editor::layout_designer::LayoutDesignerPanel::Draw().
| ImRect yaze::editor::layout_designer::ComputeDropPreviewRect | ( | const ImRect & | leaf_rect, |
| const DropSuggestion & | suggestion ) |
Definition at line 44 of file drop_zone_suggester.cc.
References kDropSplitRatio, yaze::editor::layout_designer::DropSuggestion::kind, yaze::editor::layout_designer::DropSuggestion::kNone, yaze::editor::layout_designer::DropSuggestion::kSplitBottom, yaze::editor::layout_designer::DropSuggestion::kSplitLeft, yaze::editor::layout_designer::DropSuggestion::kSplitRight, yaze::editor::layout_designer::DropSuggestion::kSplitTop, and yaze::editor::layout_designer::DropSuggestion::kTab.
Referenced by yaze::editor::layout_designer::LayoutDesignerPanel::Draw().
| DockNode * yaze::editor::layout_designer::ApplyDropSuggestion | ( | DockTree * | tree, |
| DockNode * | leaf, | ||
| const DropSuggestion & | suggestion, | ||
| PanelEntry | panel ) |
Definition at line 75 of file drop_zone_suggester.cc.
References yaze::editor::layout_designer::DockNode::active_tab_index, yaze::editor::layout_designer::DockNode::child_a, yaze::editor::layout_designer::DockNode::child_b, kDown, kDropSplitRatio, yaze::editor::layout_designer::DropSuggestion::kind, yaze::editor::layout_designer::DockNode::kLeaf, kLeft, yaze::editor::layout_designer::DropSuggestion::kNone, kRight, yaze::editor::layout_designer::DropSuggestion::kSplitBottom, yaze::editor::layout_designer::DropSuggestion::kSplitLeft, yaze::editor::layout_designer::DropSuggestion::kSplitRight, yaze::editor::layout_designer::DropSuggestion::kSplitTop, yaze::editor::layout_designer::DropSuggestion::kTab, kUp, yaze::editor::layout_designer::DockNode::MakeLeaf(), yaze::editor::layout_designer::PanelEntry::panel_id, yaze::editor::layout_designer::DockNode::panels, yaze::editor::layout_designer::DockTree::root, yaze::editor::layout_designer::DockNode::SplitInPlace(), and yaze::editor::layout_designer::DockNode::type.
Referenced by yaze::editor::layout_designer::LayoutDesignerPanel::Draw().

| yaze::editor::layout_designer::REGISTER_PANEL | ( | LayoutDesignerPanel | ) |
| std::vector< PanelPaletteEntry > yaze::editor::layout_designer::CollectPaletteEntries | ( | const std::string & | exclude_panel_id | ) |
Definition at line 51 of file panel_palette.cc.
References yaze::editor::layout_designer::PanelPaletteEntry::category, yaze::editor::layout_designer::PanelPaletteEntry::display_name, yaze::editor::ContentRegistry::Panels::GetAll(), yaze::editor::layout_designer::PanelPaletteEntry::icon, and yaze::editor::layout_designer::PanelPaletteEntry::panel_id.
Referenced by yaze::editor::layout_designer::LayoutDesignerPanel::Draw().

| void yaze::editor::layout_designer::DrawPanelPalette | ( | const std::vector< PanelPaletteEntry > & | entries, |
| std::string * | query ) |
Definition at line 76 of file panel_palette.cc.
References yaze::gui::BeginPanelDragSource(), and yaze::editor::layout_designer::panel_palette_internal::MatchesQuery().
Referenced by yaze::editor::layout_designer::LayoutDesignerPanel::Draw().

| SplitBoundaryHit yaze::editor::layout_designer::HitTestSplitBoundary | ( | const DockTree & | tree, |
| const DockTreeLayout & | layout, | ||
| ImVec2 | mouse, | ||
| float | tolerance ) |
Definition at line 18 of file split_boundary_drag.cc.
References yaze::editor::layout_designer::DockNode::child_a, yaze::editor::layout_designer::DockNode::child_b, yaze::editor::layout_designer::SplitBoundaryHit::horizontal, yaze::editor::layout_designer::DockNode::kSplit, yaze::editor::layout_designer::DockTreeLayout::node_rects, yaze::editor::layout_designer::DockTree::root, and yaze::editor::layout_designer::SplitBoundaryHit::split_node.
Referenced by yaze::editor::layout_designer::LayoutDesignerPanel::Draw().
| float yaze::editor::layout_designer::ComputeDraggedSplitRatio | ( | float | start_ratio, |
| float | axis_delta_px, | ||
| float | axis_size_px ) |
Definition at line 84 of file split_boundary_drag.cc.
References kMaxSplitRatio, and kMinSplitRatio.
Referenced by yaze::editor::layout_designer::LayoutDesignerPanel::Draw().
| const char * yaze::editor::layout_designer::GetWidgetTypeName | ( | WidgetType | type | ) |
Get human-readable name for widget type.
Definition at line 129 of file widget_definition.cc.
References BeginChild, BeginCombo, BeginGroup, BeginMenu, BeginTable, BulletText, Button, Canvas, Checkbox, CollapsingHeader, ColorEdit, ColorPicker, Dummy, EndChild, EndCombo, EndGroup, EndMenu, EndTable, Image, ImageButton, Indent, InputFloat, InputInt, InputText, ListBox, MenuItem, NewLine, ProgressBar, RadioButton, SameLine, Selectable, Separator, SliderFloat, SliderInt, SmallButton, Spacing, TabBar, TabItem, TableNextColumn, TableNextRow, TableSetupColumn, Text, TextColored, TextWrapped, TreeNode, and Unindent.
Referenced by yaze::editor::layout_designer::LayoutDesignerWindow::DrawWidgetCanvas(), yaze::editor::layout_designer::LayoutDesignerWindow::DrawWidgetPalette(), yaze::editor::layout_designer::LayoutDesignerWindow::DrawWidgetProperties(), yaze::editor::layout_designer::WidgetCodeGenerator::GenerateContainerCode(), and yaze::editor::layout_designer::WidgetCodeGenerator::GenerateWidgetCode().
| const char * yaze::editor::layout_designer::GetWidgetTypeIcon | ( | WidgetType | type | ) |
Get icon for widget type.
Definition at line 181 of file widget_definition.cc.
References BeginCombo, BeginMenu, BeginTable, BulletText, Button, Canvas, Checkbox, CollapsingHeader, ColorEdit, ColorPicker, EndCombo, EndMenu, EndTable, ICON_MD_ACCOUNT_TREE, ICON_MD_ARROW_DROP_DOWN, ICON_MD_CHECK_BOX, ICON_MD_CHECK_CIRCLE, ICON_MD_DRAW, ICON_MD_HORIZONTAL_RULE, ICON_MD_IMAGE, ICON_MD_INPUT, ICON_MD_LINEAR_SCALE, ICON_MD_MENU, ICON_MD_PALETTE, ICON_MD_RADIO_BUTTON_CHECKED, ICON_MD_SMART_BUTTON, ICON_MD_TAB, ICON_MD_TABLE_CHART, ICON_MD_TEXT_FIELDS, ICON_MD_TUNE, ICON_MD_WIDGETS, Image, ImageButton, InputFloat, InputInt, InputText, ListBox, MenuItem, ProgressBar, RadioButton, Selectable, Separator, SliderFloat, SliderInt, SmallButton, TabBar, TabItem, Text, TextColored, TextWrapped, and TreeNode.
Referenced by yaze::editor::layout_designer::LayoutDesignerWindow::DrawWidgetCanvas(), yaze::editor::layout_designer::LayoutDesignerWindow::DrawWidgetPalette(), and yaze::editor::layout_designer::LayoutDesignerWindow::DrawWidgetTree().
| bool yaze::editor::layout_designer::IsContainerWidget | ( | WidgetType | type | ) |
Check if widget type is a container.
Definition at line 255 of file widget_definition.cc.
References BeginChild, BeginCombo, BeginGroup, BeginMenu, BeginTable, CollapsingHeader, TabBar, TabItem, and TreeNode.
Referenced by yaze::editor::layout_designer::WidgetDefinition::CanHaveChildren(), and yaze::editor::layout_designer::WidgetDefinition::IsContainer().
| 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().
| std::vector< WidgetProperty > yaze::editor::layout_designer::GetDefaultProperties | ( | WidgetType | type | ) |
Get default properties for a widget type.
Definition at line 287 of file widget_definition.cc.
References BeginTable, yaze::editor::layout_designer::WidgetProperty::Bool, yaze::editor::layout_designer::WidgetProperty::bool_value, BulletText, Button, Canvas, Checkbox, yaze::editor::layout_designer::WidgetProperty::Color, yaze::editor::layout_designer::WidgetProperty::color_value, yaze::editor::layout_designer::WidgetProperty::Flags, yaze::editor::layout_designer::WidgetProperty::flags_value, InputText, yaze::editor::layout_designer::WidgetProperty::Int, yaze::editor::layout_designer::WidgetProperty::int_value, yaze::editor::layout_designer::WidgetProperty::name, SliderInt, SmallButton, yaze::editor::layout_designer::WidgetProperty::String, yaze::editor::layout_designer::WidgetProperty::string_value, Text, TextWrapped, yaze::editor::layout_designer::WidgetProperty::type, yaze::editor::layout_designer::WidgetProperty::Vec2, and yaze::editor::layout_designer::WidgetProperty::vec2_value.
Referenced by yaze::editor::layout_designer::LayoutDesignerWindow::DrawWidgetCanvas().
| const char * yaze::editor::layout_designer::GetYazeWidgetTypeName | ( | YazeWidgetType | type | ) |
Get human-readable name for yaze widget type.
Definition at line 10 of file yaze_widgets.cc.
References AutoButton, AutoCheckbox, AutoInputField, AutoInputText, BeginField, CanvasPanel, DangerButton, EndField, PaddedPanel, PaletteColorButton, PanelHeader, PrimaryButton, PropertyRow, PropertyTable, SectionHeader, TableWithTheming, ThemedButton, ThemedIconButton, and TransparentIconButton.
Referenced by GenerateYazeWidgetCode().
| const char * yaze::editor::layout_designer::GetYazeWidgetTypeIcon | ( | YazeWidgetType | type | ) |
Get icon for yaze widget type.
Definition at line 55 of file yaze_widgets.cc.
References AutoButton, AutoInputField, AutoInputText, BeginField, CanvasPanel, DangerButton, EndField, ICON_MD_DRAW, ICON_MD_INPUT, ICON_MD_PALETTE, ICON_MD_RADIO_BUTTON_UNCHECKED, ICON_MD_SMART_BUTTON, ICON_MD_TABLE_CHART, ICON_MD_TITLE, ICON_MD_WIDGETS, PaletteColorButton, PanelHeader, PrimaryButton, PropertyRow, PropertyTable, SectionHeader, TableWithTheming, ThemedButton, ThemedIconButton, and TransparentIconButton.
| 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)
| yaze_type | The yaze widget type |
| widget | The widget definition (for properties) |
| indent_level | Indentation level |
Definition at line 93 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.

| std::vector< std::string > yaze::editor::layout_designer::GetRequiredIncludes | ( | YazeWidgetType | type | ) |
Check if yaze widget requires specific includes.
Definition at line 210 of file yaze_widgets.cc.
References AutoButton, AutoCheckbox, AutoInputField, AutoInputText, BeginField, CanvasPanel, DangerButton, EndField, PaddedPanel, PaletteColorButton, PanelHeader, PrimaryButton, PropertyRow, PropertyTable, SectionHeader, TableWithTheming, ThemedButton, ThemedIconButton, and TransparentIconButton.
| std::vector< WidgetProperty > yaze::editor::layout_designer::GetYazeDefaultProperties | ( | YazeWidgetType | type | ) |
Get default properties for yaze widget type.
Definition at line 252 of file yaze_widgets.cc.
References AutoButton, DangerButton, ICON_MD_LABEL, yaze::editor::layout_designer::WidgetProperty::Int, yaze::editor::layout_designer::WidgetProperty::int_value, yaze::editor::layout_designer::WidgetProperty::name, PrimaryButton, PropertyRow, PropertyTable, SectionHeader, yaze::editor::layout_designer::WidgetProperty::String, yaze::editor::layout_designer::WidgetProperty::string_value, ThemedButton, and yaze::editor::layout_designer::WidgetProperty::type.
| WidgetType yaze::editor::layout_designer::ToWidgetType | ( | YazeWidgetType | type | ) |
Convert YazeWidgetType to WidgetType (for base widget system)
|
inlineconstexpr |
Definition at line 22 of file dock_tree.h.
Referenced by yaze::editor::layout_designer::LayoutDesignerPanel::Draw(), yaze::editor::layout_designer::DockTree::FindNode(), yaze::editor::layout_designer::LayoutDesignerPanel::has_active_drag_for_test(), yaze::editor::layout_designer::anonymous_namespace{dock_tree_json.cc}::NodeToJson(), yaze::editor::layout_designer::internal::ObserveDockNodeId(), yaze::editor::layout_designer::LayoutDesignerPanel::ReplaceTree(), yaze::editor::layout_designer::anonymous_namespace{dock_tree_json.cc}::ResolveNodeId(), and yaze::editor::layout_designer::anonymous_namespace{dock_tree.cc}::ValidateNode().
|
constexpr |
Definition at line 17 of file dock_tree_renderer.h.
Referenced by yaze::editor::layout_designer::LayoutDesignerPanel::Draw(), and yaze::editor::layout_designer::anonymous_namespace{dock_tree_renderer.cc}::LayoutNodeRecursive().
|
constexpr |
Definition at line 31 of file drop_zone_suggester.h.
Referenced by SuggestDrop().
|
constexpr |
Definition at line 36 of file drop_zone_suggester.h.
Referenced by ApplyDropSuggestion(), and ComputeDropPreviewRect().
|
constexpr |
Definition at line 14 of file split_boundary_drag.h.
Referenced by ComputeDraggedSplitRatio(), and yaze::editor::layout_designer::LayoutDesignerPanel::DrawPropertiesColumn().
|
constexpr |
Definition at line 15 of file split_boundary_drag.h.
Referenced by ComputeDraggedSplitRatio(), and yaze::editor::layout_designer::LayoutDesignerPanel::DrawPropertiesColumn().
|
constexpr |
Definition at line 19 of file split_boundary_drag.h.