Lumiera 0.pre.04
»edit your freedom«
Loading...
Searching...
No Matches
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 109 of file canvas-hook.hpp.

Classes

struct  Pos
 

Public Member Functions

virtual ~CanvasHook ()
 this is an interface
 
virtual void hook (WID &widget, int xPos, int yPos)=0
 
virtual void move (WID &widget, int xPos, int yPos)=0
 
virtual void remove (WID &widget)=0
 
virtual DisplayMetricgetMetric () const =0
 access the component to handle layout metric
 
virtual CanvasHook< WID > & getAnchorHook () noexcept
 Anchor point to build chains of related View Hooks.
 
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.
 

Constructor & Destructor Documentation

◆ ~CanvasHook()

template<class WID >
virtual ~CanvasHook ( )
inlinevirtual

this is an interface

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


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

◆ hook()

template<class WID >
virtual void hook ( WID &  widget,
int  xPos,
int  yPos 
)
pure virtual

◆ move()

template<class WID >
virtual void move ( WID &  widget,
int  xPos,
int  yPos 
)
pure virtual

◆ remove()

template<class WID >
virtual void remove ( WID &  widget)
pure virtual

◆ getMetric()

template<class WID >
virtual DisplayMetric & getMetric ( ) const
pure virtual

access the component to handle layout metric

Implemented in BodyCanvasWidget, RelativeCanvasHook< WID >, RelativeCanvasHook< Gtk::Widget >, and FakeCanvas.

Referenced by CanvasHook< WID >::hookedAt().

+ Here is the caller graph for this function:

◆ getAnchorHook()

template<class WID >
virtual CanvasHook< WID > & getAnchorHook ( )
inlinevirtualnoexcept

Anchor point to build chains of related View Hooks.

Reimplemented in RelativeCanvasHook< WID >, and RelativeCanvasHook< Gtk::Widget >.

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

◆ hookedAt() [1/2]

template<class WID >
Pos hookedAt ( int  x,
int  y 
)
inline

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

Referenced by ClipDelegate::establishHookPoint(), and CanvasHook< WID >::hookedAt().

+ Here is the caller graph for this function:

◆ hookedAt() [2/2]

template<class WID >
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 146 of file canvas-hook.hpp.

References CanvasHook< WID >::getMetric(), and CanvasHook< WID >::hookedAt().

+ Here is the call graph for this function:
+ Inheritance diagram for CanvasHook< WID >:
+ Collaboration diagram for CanvasHook< WID >:

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