Lumiera 0.pre.04
»edit your freedom«
Loading...
Searching...
No Matches
RelativeCanvasHook< WID > Class Template Referenceabstract

#include "stage/timeline/track-presenter.hpp"

Description

template<class WID>
class stage::timeline::RelativeCanvasHook< WID >

Special CanvasHook decorator to apply a (dynamic) offset when attaching or moving Widgets on the shared canvas.

Note
the ctor uses getAnchorHook, thus effectively, for a chain of RelativeCanvasHook instances, the refHook_ holds the top level anchor.
Remarks
avoiding this 2-step indirect dispatch is possibly, bug likely not of any significance, given the overhead of drawing.
Todo:
investigate real-live performance ////////////////////////////////////////////////////////////////TICKET #1254 : investigate impact of indirection

Definition at line 138 of file track-presenter.hpp.

Public Member Functions

 RelativeCanvasHook (model::CanvasHook< WID > &baseHook)
 
- Public Member Functions inherited from CanvasHook< WID >
virtual ~CanvasHook ()
 this is an interface
 
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.
 

Protected Member Functions

virtual int hookAdjX (int xPos)=0
 
virtual int hookAdjY (int yPos)=0
 
model::DisplayMetricgetMetric () const override
 delegating layout metric to the root canvas
 

Private Member Functions

void hook (WID &widget, int xPos=0, int yPos=0) override
 
void move (WID &widget, int xPos, int yPos) override
 
void remove (WID &widget) override
 
model::CanvasHook< WID > & getAnchorHook () noexcept override
 allow to build a derived relative hook with different offset
 

Private Attributes

model::CanvasHook< WID > & refHook_
 

Constructor & Destructor Documentation

◆ RelativeCanvasHook()

template<class WID >
RelativeCanvasHook ( model::CanvasHook< WID > &  baseHook)
inline

Definition at line 183 of file track-presenter.hpp.

Member Function Documentation

◆ hook()

template<class WID >
void hook ( WID &  widget,
int  xPos = 0,
int  yPos = 0 
)
inlineoverrideprivatevirtual

Implements CanvasHook< WID >.

Definition at line 147 of file track-presenter.hpp.

References RelativeCanvasHook< WID >::hookAdjX(), RelativeCanvasHook< WID >::hookAdjY(), and RelativeCanvasHook< WID >::refHook_.

+ Here is the call graph for this function:

◆ move()

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

Implements CanvasHook< WID >.

Definition at line 153 of file track-presenter.hpp.

References RelativeCanvasHook< WID >::hookAdjX(), RelativeCanvasHook< WID >::hookAdjY(), and RelativeCanvasHook< WID >::refHook_.

+ Here is the call graph for this function:

◆ remove()

template<class WID >
void remove ( WID &  widget)
inlineoverrideprivatevirtual

Implements CanvasHook< WID >.

Definition at line 159 of file track-presenter.hpp.

References RelativeCanvasHook< WID >::refHook_.

◆ getAnchorHook()

template<class WID >
model::CanvasHook< WID > & getAnchorHook ( )
inlineoverrideprivatevirtualnoexcept

allow to build a derived relative hook with different offset

Reimplemented from CanvasHook< WID >.

Definition at line 166 of file track-presenter.hpp.

References RelativeCanvasHook< WID >::refHook_.

◆ hookAdjX()

template<class WID >
virtual int hookAdjX ( int  xPos)
protectedpure virtual

Implemented in DisplayFrame.

Referenced by RelativeCanvasHook< WID >::hook(), and RelativeCanvasHook< WID >::move().

+ Here is the caller graph for this function:

◆ hookAdjY()

template<class WID >
virtual int hookAdjY ( int  yPos)
protectedpure virtual

Implemented in DisplayFrame.

Referenced by RelativeCanvasHook< WID >::hook(), and RelativeCanvasHook< WID >::move().

+ Here is the caller graph for this function:

◆ getMetric()

template<class WID >
model::DisplayMetric & getMetric ( ) const
inlineoverrideprotectedvirtual

delegating layout metric to the root canvas

Implements CanvasHook< WID >.

Definition at line 177 of file track-presenter.hpp.

References RelativeCanvasHook< WID >::refHook_.

Member Data Documentation

◆ refHook_

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

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