![]() |
Lumiera 0.pre.04~rc.1
»edit your freedom«
|
#include "stage/model/canvas-hook.hpp"
A widget attached onto a display canvas or similar central presentation context.
This decorator is a variation of the ViewHooked decorator, and likewise embodies the widget to be attached; moreover, the attachment is immediately performed at construction time and managed automatically thereafter. When the CanvasHooked element goes out of scope, it is automatically detached from presentation. With the help of the CanvasHooked API, a widget (or similar entity) may control the coordinates of its placement onto some kind of canvas (-> Gtk::Layout), while remaining agnostic regarding any further implementation details of the canvas and its placement thereon.
The canonical example of a CanvasHooked element is the stage::timeline::ClipWidget, as created and managed by the TrackPresenter within the timeline UI. This connection entity allows 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. |
| BASE | generic widget base type, to be used on the associated CanvasHook<BASE> |
Definition at line 178 of file canvas-hook.hpp.
Public Member Functions | |
| template<typename... ARGS> | |
| CanvasHooked (typename Canvas::Pos attachmentPos, ARGS &&...args) | |
| ~CanvasHooked () noexcept | |
| void | moveTo (int xPos, int yPos) |
Protected Member Functions | |
| Canvas & | getCanvas () const |
Private Types | |
| using | Canvas = CanvasHook< BASE > |
Private Attributes | |
| Canvas * | view_ |
Additional Inherited Members | |
Private Member Functions inherited from NonCopyable | |
| ~NonCopyable ()=default | |
| NonCopyable ()=default | |
| NonCopyable (NonCopyable const &)=delete | |
| NonCopyable & | operator= (NonCopyable const &)=delete |
|
inline |
Definition at line 190 of file canvas-hook.hpp.
References CanvasHooked< WID, BASE >::getCanvas().
Here is the call graph for this function:
|
inlinenoexcept |
Definition at line 197 of file canvas-hook.hpp.
References ERROR_LOG_AND_IGNORE, and CanvasHooked< WID, BASE >::view_.
|
private |
Definition at line 182 of file canvas-hook.hpp.
|
inlineprotected |
Definition at line 186 of file canvas-hook.hpp.
References CanvasHooked< WID, BASE >::view_.
Referenced by CanvasHooked< WID, BASE >::CanvasHooked(), and CanvasHooked< WID, BASE >::moveTo().
Here is the caller graph for this function:
|
inline |
Definition at line 207 of file canvas-hook.hpp.
References CanvasHooked< WID, BASE >::getCanvas().
Here is the call graph for this function:
|
private |
Definition at line 183 of file canvas-hook.hpp.
Referenced by CanvasHooked< WID, BASE >::~CanvasHooked(), and CanvasHooked< WID, BASE >::getCanvas().
Inheritance diagram for CanvasHooked< WID, BASE >:
Collaboration diagram for CanvasHooked< WID, BASE >: