Lumiera  0.pre.03
»edit your freedom«
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 147 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. More...
 

Protected Member Functions

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

Private Member Functions

model::CanvasHook< WID > & getAnchorHook () noexcept override
 allow to build a derived relative hook with different offset
 
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
 

Private Attributes

model::CanvasHook< WID > & refHook_
 
+ Inheritance diagram for RelativeCanvasHook< WID >:
+ Collaboration diagram for RelativeCanvasHook< WID >:

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