#include <layout_designer_panel.h>


Classes | |
| struct | ActiveDrag |
Public Member Functions | |
| LayoutDesignerPanel () | |
| std::string | GetId () const override |
| Unique identifier for this panel. | |
| std::string | GetDisplayName () const override |
| Human-readable name shown in menus and title bars. | |
| std::string | GetIcon () const override |
| Material Design icon for this panel. | |
| std::string | GetEditorCategory () const override |
| Editor category this panel belongs to. | |
| WindowLifecycle | GetWindowLifecycle () const override |
| Get the lifecycle category for this window. | |
| void | Draw (bool *p_open) override |
| Draw the panel content. | |
| void | ReplaceTree (DockTree new_tree) |
| const DockTree & | tree_for_test () const |
| DockNodeId | selected_id_for_test () const |
| bool | has_active_drag_for_test () const |
| const TreeUndoStack & | undo_for_test () const |
| void | set_selected_id_for_test (DockNodeId id) |
| void | set_drag_id_for_test (DockNodeId id) |
Public Member Functions inherited from yaze::editor::WindowContent | |
| virtual | ~WindowContent ()=default |
| virtual void | OnFirstDraw () |
| Called once before the first Draw() in a session. | |
| virtual bool | RequiresLazyInit () const |
| Whether this panel uses lazy initialization. | |
| void | InvalidateLazyInit () |
| Reset lazy init state so OnFirstDraw() runs again. | |
| virtual void | OnOpen () |
| Called when panel becomes visible. | |
| virtual void | OnClose () |
| Called when panel is hidden. | |
| virtual void | OnFocus () |
| Called when panel receives focus. | |
| virtual WindowContextScope | GetContextScope () const |
| Optional context binding for this window (room/selection/etc) | |
| virtual WindowScope | GetScope () const |
| Get the registration scope for this window. | |
| virtual bool | IsEnabled () const |
| Check if this panel is currently enabled. | |
| virtual std::string | GetDisabledTooltip () const |
| Get tooltip text when panel is disabled. | |
| virtual std::string | GetShortcutHint () const |
| Get keyboard shortcut hint for display. | |
| virtual int | GetPriority () const |
| Get display priority for menu ordering. | |
| virtual std::string | GetWorkflowGroup () const |
| Optional workflow group for hack-centric actions. | |
| virtual std::string | GetWorkflowLabel () const |
| Optional workflow label for menus/command palette. | |
| virtual std::string | GetWorkflowDescription () const |
| Optional workflow description for menus/command palette. | |
| virtual int | GetWorkflowPriority () const |
| Optional workflow ordering priority (lower sorts first). | |
| virtual float | GetPreferredWidth () const |
| Get preferred width for this panel (optional) | |
| virtual float | GetPreferredHeight () const |
| Get preferred height for this panel (optional) | |
| virtual bool | PreferAutoHideTabBar () const |
| Whether the dock node hosting this panel should auto-hide its tab bar. | |
| virtual bool | IsVisibleByDefault () const |
| Whether this panel should be visible by default. | |
| virtual std::string | GetParentPanelId () const |
| Get parent panel ID for cascade behavior. | |
| virtual bool | CascadeCloseChildren () const |
| Whether closing this panel should close child panels. | |
| void | DrawWithLazyInit (bool *p_open) |
| Execute lazy initialization if needed, then call Draw() | |
Private Member Functions | |
| void | PushUndoSnapshot () |
| void | DrawPropertiesColumn () |
| void | DrawFileRow () |
| void | DrawOpenPopup () |
| void | DrawSaveAsPopup () |
| void | SaveCurrentTreeToNamedLayouts () |
| void | LoadNamedLayoutIntoTree (const std::string &name) |
| void | ApplyCurrentTreeToLiveDockspace () |
| void | SaveOrSaveAs () |
Private Attributes | |
| DockTree | tree_ |
| DockNodeId | selected_id_ = kInvalidDockNodeId |
| ActiveDrag | drag_ |
| std::string | palette_query_ |
| TreeUndoStack | undo_ |
| bool | open_popup_requested_ = false |
| bool | save_as_popup_requested_ = false |
| std::string | save_as_buffer_ |
| std::string | open_selection_ |
| std::string | status_message_ |
| bool | status_is_error_ = false |
Additional Inherited Members | |
Protected Member Functions inherited from yaze::editor::WindowContent | |
| void | InvalidateCache () |
| Invalidate all cached computations. | |
| template<typename T > | |
| T & | GetCached (const std::string &key, std::function< T()> compute) |
| Get or compute a cached value. | |
| bool | IsCacheValid () const |
| Check if cache has been invalidated. | |
| void | ClearCache () |
| Clear all cached values (more aggressive than InvalidateCache) | |
Definition at line 21 of file layout_designer_panel.h.
| yaze::editor::layout_designer::LayoutDesignerPanel::LayoutDesignerPanel | ( | ) |
Definition at line 66 of file layout_designer_panel.cc.
|
inlineoverridevirtual |
Unique identifier for this panel.
IDs should be:
Implements yaze::editor::WindowContent.
Definition at line 25 of file layout_designer_panel.h.
Referenced by Draw().
|
inlineoverridevirtual |
Human-readable name shown in menus and title bars.
Implements yaze::editor::WindowContent.
Definition at line 26 of file layout_designer_panel.h.
|
inlineoverridevirtual |
Material Design icon for this panel.
Implements yaze::editor::WindowContent.
Definition at line 27 of file layout_designer_panel.h.
References ICON_MD_DASHBOARD_CUSTOMIZE.
|
inlineoverridevirtual |
Editor category this panel belongs to.
Implements yaze::editor::WindowContent.
Definition at line 33 of file layout_designer_panel.h.
|
inlineoverridevirtual |
Get the lifecycle category for this window.
Default is EditorBound (hidden when switching editors).
Reimplemented from yaze::editor::WindowContent.
Definition at line 35 of file layout_designer_panel.h.
References yaze::editor::CrossEditor.
|
overridevirtual |
Draw the panel content.
| p_open | Pointer to visibility flag (nullptr if not closable) |
Called by WorkspaceWindowManager when the panel is visible. Do NOT call ImGui::Begin/End - the PanelWindow wrapper handles that. Just draw your content directly.
Implements yaze::editor::WindowContent.
Definition at line 352 of file layout_designer_panel.cc.
References yaze::gui::AcceptPanelDropWithinTarget(), yaze::editor::layout_designer::ApplyDropSuggestion(), yaze::editor::layout_designer::CollectPaletteEntries(), yaze::editor::layout_designer::ComputeDraggedSplitRatio(), yaze::editor::layout_designer::ComputeDropPreviewRect(), yaze::editor::layout_designer::ComputeLayout(), yaze::editor::layout_designer::PanelEntry::display_name, drag_, DrawFileRow(), DrawOpenPopup(), yaze::editor::layout_designer::DrawPanelPalette(), DrawPropertiesColumn(), DrawSaveAsPopup(), yaze::editor::layout_designer::DockTree::FindNode(), yaze::editor::ContentRegistry::Panels::Get(), GetId(), yaze::editor::layout_designer::HitTestNode(), yaze::editor::layout_designer::HitTestSplitBoundary(), yaze::editor::layout_designer::SplitBoundaryHit::horizontal, yaze::editor::layout_designer::PanelEntry::icon, yaze::editor::layout_designer::DockNode::id, yaze::editor::layout_designer::kInvalidDockNodeId, yaze::editor::layout_designer::DockNode::kLeaf, yaze::editor::layout_designer::kMinCellSize, yaze::editor::layout_designer::DockTree::name, yaze::editor::layout_designer::DockTreeLayout::node_rects, open_popup_requested_, palette_query_, yaze::editor::layout_designer::PanelEntry::panel_id, yaze::gui::PanelDragPayload::panel_id, yaze::editor::layout_designer::TreeUndoStack::PopLastPush(), PushUndoSnapshot(), yaze::editor::layout_designer::TreeUndoStack::Redo(), yaze::editor::layout_designer::TreeUndoStack::RedoDepth(), yaze::editor::layout_designer::RenderDockTree(), save_as_popup_requested_, SaveOrSaveAs(), selected_id_, yaze::editor::layout_designer::DockNode::split_direction, yaze::editor::layout_designer::LayoutDesignerPanel::ActiveDrag::split_id, yaze::editor::layout_designer::SplitBoundaryHit::split_node, yaze::editor::layout_designer::DockNode::split_ratio, yaze::editor::layout_designer::LayoutDesignerPanel::ActiveDrag::start_mouse, yaze::editor::layout_designer::LayoutDesignerPanel::ActiveDrag::start_ratio, yaze::editor::layout_designer::LayoutDesignerPanel::ActiveDrag::start_rect, status_is_error_, status_message_, yaze::editor::layout_designer::SuggestDrop(), tree_, yaze::editor::layout_designer::DockNode::type, yaze::editor::layout_designer::TreeUndoStack::Undo(), undo_, and yaze::editor::layout_designer::TreeUndoStack::UndoDepth().
| void yaze::editor::layout_designer::LayoutDesignerPanel::ReplaceTree | ( | DockTree | new_tree | ) |
Definition at line 72 of file layout_designer_panel.cc.
References yaze::editor::layout_designer::TreeUndoStack::Clear(), drag_, yaze::editor::layout_designer::kInvalidDockNodeId, selected_id_, tree_, and undo_.
Referenced by DrawFileRow(), and LoadNamedLayoutIntoTree().

|
inline |
Definition at line 56 of file layout_designer_panel.h.
References tree_.
|
inline |
Definition at line 57 of file layout_designer_panel.h.
References selected_id_.
|
inline |
Definition at line 58 of file layout_designer_panel.h.
References drag_, yaze::editor::layout_designer::kInvalidDockNodeId, and yaze::editor::layout_designer::LayoutDesignerPanel::ActiveDrag::split_id.
|
inline |
Definition at line 61 of file layout_designer_panel.h.
References undo_.
|
inline |
Definition at line 65 of file layout_designer_panel.h.
References selected_id_.
|
inline |
Definition at line 66 of file layout_designer_panel.h.
References drag_, and yaze::editor::layout_designer::LayoutDesignerPanel::ActiveDrag::split_id.
|
private |
Definition at line 68 of file layout_designer_panel.cc.
References yaze::editor::layout_designer::TreeUndoStack::Push(), tree_, and undo_.
Referenced by Draw(), and DrawPropertiesColumn().

|
private |
Definition at line 555 of file layout_designer_panel.cc.
References yaze::editor::layout_designer::DockNode::active_tab_index, yaze::editor::layout_designer::DockTree::description, yaze::editor::layout_designer::DockTree::FindNode(), yaze::editor::layout_designer::kMaxSplitRatio, yaze::editor::layout_designer::kMinSplitRatio, yaze::editor::layout_designer::DockNode::kSplit, yaze::editor::layout_designer::DockTree::name, yaze::editor::layout_designer::DockNode::panels, PushUndoSnapshot(), selected_id_, yaze::editor::layout_designer::DockNode::split_direction, yaze::editor::layout_designer::DockNode::split_ratio, tree_, and yaze::editor::layout_designer::DockNode::type.
Referenced by Draw().

|
private |
Definition at line 208 of file layout_designer_panel.cc.
References ApplyCurrentTreeToLiveDockspace(), yaze::editor::layout_designer::TreeUndoStack::CanRedo(), yaze::editor::layout_designer::TreeUndoStack::CanUndo(), drag_, yaze::editor::ContentRegistry::Context::layout_manager(), yaze::editor::layout_designer::MakeEmptyTree(), yaze::editor::layout_designer::DockTree::name, yaze::editor::UserSettings::Preferences::named_layouts, open_popup_requested_, yaze::editor::UserSettings::prefs(), yaze::editor::layout_designer::TreeUndoStack::Redo(), ReplaceTree(), save_as_buffer_, save_as_popup_requested_, SaveOrSaveAs(), status_is_error_, status_message_, tree_, yaze::editor::layout_designer::TreeUndoStack::Undo(), undo_, and yaze::editor::ContentRegistry::Context::user_settings().
Referenced by Draw().
|
private |
Definition at line 273 of file layout_designer_panel.cc.
References LoadNamedLayoutIntoTree(), yaze::editor::UserSettings::Preferences::named_layouts, open_selection_, yaze::editor::UserSettings::prefs(), and yaze::editor::ContentRegistry::Context::user_settings().
Referenced by Draw().

|
private |
Definition at line 325 of file layout_designer_panel.cc.
References yaze::editor::layout_designer::DockTree::name, save_as_buffer_, SaveCurrentTreeToNamedLayouts(), and tree_.
Referenced by Draw().

|
private |
Definition at line 79 of file layout_designer_panel.cc.
References yaze::editor::layout_designer::DockTreeToJson(), yaze::editor::layout_designer::DockTree::name, yaze::editor::UserSettings::Preferences::named_layouts, yaze::editor::UserSettings::prefs(), yaze::editor::UserSettings::Save(), status_is_error_, status_message_, tree_, and yaze::editor::ContentRegistry::Context::user_settings().
Referenced by DrawSaveAsPopup(), and SaveOrSaveAs().

|
private |
Definition at line 106 of file layout_designer_panel.cc.
References yaze::editor::layout_designer::DockTreeFromJson(), yaze::editor::UserSettings::Preferences::named_layouts, yaze::editor::UserSettings::prefs(), ReplaceTree(), status_is_error_, status_message_, and yaze::editor::ContentRegistry::Context::user_settings().
Referenced by DrawOpenPopup().

|
private |
Definition at line 156 of file layout_designer_panel.cc.
References yaze::editor::LayoutManager::ApplyDockTree(), yaze::editor::LayoutManager::GetMainDockspaceId(), yaze::editor::UserSettings::Preferences::last_applied_layout_name, yaze::editor::ContentRegistry::Context::layout_manager(), yaze::editor::layout_designer::DockTree::name, yaze::editor::UserSettings::prefs(), yaze::editor::UserSettings::Save(), status_is_error_, status_message_, tree_, and yaze::editor::ContentRegistry::Context::user_settings().
Referenced by DrawFileRow().
|
private |
Definition at line 195 of file layout_designer_panel.cc.
References yaze::editor::layout_designer::DockTree::name, save_as_buffer_, save_as_popup_requested_, SaveCurrentTreeToNamedLayouts(), and tree_.
Referenced by Draw(), and DrawFileRow().

|
private |
Definition at line 107 of file layout_designer_panel.h.
Referenced by ApplyCurrentTreeToLiveDockspace(), Draw(), DrawFileRow(), DrawPropertiesColumn(), DrawSaveAsPopup(), PushUndoSnapshot(), ReplaceTree(), SaveCurrentTreeToNamedLayouts(), SaveOrSaveAs(), and tree_for_test().
|
private |
Definition at line 112 of file layout_designer_panel.h.
Referenced by Draw(), DrawPropertiesColumn(), ReplaceTree(), selected_id_for_test(), and set_selected_id_for_test().
|
private |
Definition at line 113 of file layout_designer_panel.h.
Referenced by Draw(), DrawFileRow(), has_active_drag_for_test(), ReplaceTree(), and set_drag_id_for_test().
|
private |
Definition at line 114 of file layout_designer_panel.h.
Referenced by Draw().
|
private |
Definition at line 115 of file layout_designer_panel.h.
Referenced by Draw(), DrawFileRow(), PushUndoSnapshot(), ReplaceTree(), and undo_for_test().
|
private |
Definition at line 119 of file layout_designer_panel.h.
Referenced by Draw(), and DrawFileRow().
|
private |
Definition at line 120 of file layout_designer_panel.h.
Referenced by Draw(), DrawFileRow(), and SaveOrSaveAs().
|
private |
Definition at line 121 of file layout_designer_panel.h.
Referenced by DrawFileRow(), DrawSaveAsPopup(), and SaveOrSaveAs().
|
private |
Definition at line 123 of file layout_designer_panel.h.
Referenced by DrawOpenPopup().
|
private |
Definition at line 125 of file layout_designer_panel.h.
Referenced by ApplyCurrentTreeToLiveDockspace(), Draw(), DrawFileRow(), LoadNamedLayoutIntoTree(), and SaveCurrentTreeToNamedLayouts().
|
private |
Definition at line 126 of file layout_designer_panel.h.
Referenced by ApplyCurrentTreeToLiveDockspace(), Draw(), DrawFileRow(), LoadNamedLayoutIntoTree(), and SaveCurrentTreeToNamedLayouts().