Lumiera  0.pre.03
»edit your freedom«
CanvasHook< WID > Class Template Referenceabstract

#include "stage/model/canvas-hook.hpp"

Description

template<class WID>
class stage::model::CanvasHook< WID >

Interface to represent _"some presentation layout entity",_ with the ability to place widgets (managed elsewhere) onto it, as well as to relocate those widgets to another position.

Remarks
the canonical example is a canvas widget, (e.g. Gtk::Layout), allowing to attach child widgets at specific positions, together with custom drawing.
Warning
please ensure the CanvasHook outlives any attached CanvasHooked.
See also
ViewHook embodies the same scheme for widgets just "added" into the presentation without the notion of explicit coordinates.

Definition at line 118 of file canvas-hook.hpp.

Public Member Functions

virtual ~CanvasHook ()
 this is an interface
 
virtual CanvasHook< WID > & getAnchorHook () noexcept
 Anchor point to build chains of related View Hooks.
 
virtual DisplayMetricgetMetric () const =0
 access the component to handle layout metric
 
virtual void hook (WID &widget, int xPos, int yPos)=0
 
Pos hookedAt (int x, int y)
 
Pos hookedAt (Time start, int downshift=0)
 build the "construction hook" for a CanvasHooked element, which is to be attached to some timeline canvas view. More...
 
virtual void move (WID &widget, int xPos, int yPos)=0
 
virtual void remove (WID &widget)=0
 

Classes

struct  Pos
 

Class Documentation

◆ stage::model::CanvasHook::Pos

struct stage::model::CanvasHook::Pos
Class Members
CanvasHook * view
int x
int y
+ Collaboration diagram for CanvasHook< WID >::Pos:

Member Function Documentation

◆ hookedAt()

Pos hookedAt ( Time  start,
int  downshift = 0 
)
inline

build the "construction hook" for a CanvasHooked element, which is to be attached to some timeline canvas view.

Parameters
startanchor point / nominal start point of the element
downshift(optional) vertical shift down from the baseline
Returns
opaque registration argument for the CanvasHooked ctor

Definition at line 155 of file canvas-hook.hpp.

+ Inheritance diagram for CanvasHook< WID >:
+ Collaboration diagram for CanvasHook< WID >:

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