Lumiera
0.pre.03
»edit your freedom«
|
#include "stage/model/view-hook.hpp"
A widget attached onto a display canvas or similar central presentation context.
This decorator inherits from the widget to be attached, i.e. the widget itself becomes embedded; moreover, the attachment is immediately performed at construction time and managed automatically thereafter. When the ViewHooked
element goes out of scope, it is automatically detached from presentation. With the help of ViewHooked, a widget (or similar entity) may control some aspects of its presentation placement, typically the order or arrangement within a grid or layout, while remaining agnostic regarding the implementation details of the canvas and its placement thereon.
The prominent usage example of ViewHooked` elements is in the stage::timeline::DisplayFrame, maintained by the TrackPresenter within the timeline UI. This connection entity allows to attach TrackHeaderWidget elements into the appropriate part of the patchbay, and to place ClipWidget elements into the appropriate display region for this track, without exposing the actual stage::timeline::BodyCanvasWidget to each and every Clip or Label widget.
WID | type of the embedded widget, which is to be hooked-up into the view/canvas. |
Definition at line 123 of file view-hook.hpp.
Public Member Functions | |
template<typename... ARGS> | |
ViewHooked (View &view, ARGS &&...args) | |
Private Types | |
using | View = ViewHook< BASE > |
Private Attributes | |
View * | view_ |
Additional Inherited Members | |
Private Member Functions inherited from NonCopyable | |
NonCopyable (NonCopyable const &)=delete | |
NonCopyable & | operator= (NonCopyable const &)=delete |