Loading...
Searching...
No Matches
ml::SplitPaneWidget Struct Referenceabstract

Interface for components that fill the left and right sides of a split-pane shell. More...

#include <Malena/Traits/Communication/SplitPaneWidget.h>

Public Member Functions

virtual ~SplitPaneWidget ()=default
virtual void fillLeft (ml::Panel &panel)
virtual void fillRight (ml::Panel &panel)
virtual ml::CoregetLeftPanel ()=0
virtual ml::CoregetRightPanel ()=0

Detailed Description

Interface for components that fill the left and right sides of a split-pane shell.

Inherit SplitPaneWidget alongside Hookable to participate in any shell that manages a split layout. The shell decides how to present and activate the widget (toolbar button, sidebar list, tab, etc.) — this interface only describes how to populate the panels.

Usage

// App-level shell widget with a toolbar label
struct GraphicWidget : public ml::SplitPaneWidget, public ml::Hookable {
virtual std::string getToolbarLabel() = 0;
};
// In registerHooks():
onHook(Hook::GRAPHIC, [this](GraphicWidget& w) {
_toolbar.addButton(w.getToolbarLabel(), [this, &w]() {
_left->clear(); _right->clear();
w.fillLeft(*_left); w.fillRight(*_right);
});
});
Trait that layers a hook system on top of ml::Messenger.
Definition Hookable.h:43
Interface for components that fill the left and right sides of a split-pane shell.
See also
Panel, OverlayWidget, ToolbarWidget

Definition at line 42 of file SplitPaneWidget.h.

Constructor & Destructor Documentation

◆ ~SplitPaneWidget()

virtual ml::SplitPaneWidget::~SplitPaneWidget ( )
virtualdefault

Member Function Documentation

◆ fillLeft()

virtual void ml::SplitPaneWidget::fillLeft ( ml::Panel & panel)
inlinevirtual

Definition at line 47 of file SplitPaneWidget.h.

◆ fillRight()

virtual void ml::SplitPaneWidget::fillRight ( ml::Panel & panel)
inlinevirtual

Definition at line 48 of file SplitPaneWidget.h.

◆ getLeftPanel()

virtual ml::Core & ml::SplitPaneWidget::getLeftPanel ( )
pure virtual

◆ getRightPanel()

virtual ml::Core & ml::SplitPaneWidget::getRightPanel ( )
pure virtual

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