43#ifndef STAGE_MODEL_CANVAS_HOOK_H
44#define STAGE_MODEL_CANVAS_HOOK_H
114 virtual void hook (WID& widget,
int xPos,
int yPos) =0;
115 virtual void move (WID& widget,
int xPos,
int yPos) =0;
137 return Pos{
this, x,y};
177 template<
class WID,
class BASE =WID>
189 template<
typename...ARGS>
191 : WID{
std::forward<ARGS>(args)...}
192 ,
view_{attachmentPos.view}
194 getCanvas().hook (*
this, attachmentPos.x, attachmentPos.y);
201 view_->remove (*
this);
Offset measures a distance in time.
A time interval anchored at a specific point in time.
basic constant internal time value.
Lumiera's internal time value datatype.
Interface to represent _"some presentation layout entity",_ with the ability to place widgets (manage...
virtual ~CanvasHook()
this is an interface
virtual void move(WID &widget, int xPos, int yPos)=0
virtual void hook(WID &widget, int xPos, int yPos)=0
Pos hookedAt(Time start, int downshift=0)
build the "construction hook" for a CanvasHooked element, which is to be attached to some timeline ca...
virtual CanvasHook< WID > & getAnchorHook() noexcept
Anchor point to build chains of related View Hooks.
virtual void remove(WID &widget)=0
virtual DisplayMetric & getMetric() const =0
access the component to handle layout metric
Pos hookedAt(int x, int y)
A widget attached onto a display canvas or similar central presentation context.
CanvasHooked(typename Canvas::Pos attachmentPos, ARGS &&...args)
Canvas & getCanvas() const
CanvasHook< BASE > Canvas
void moveTo(int xPos, int yPos)
Mix-in interface to allow for concrete CanvasHooked widgets to adapt themselves to the metric current...
virtual TimeSpan coveredTime() const =0
the overall time Duration covered by this timeline canvas
virtual int translateScreenDelta(Offset) const =0
translate a temporal offset into a pixel Δ
virtual TimeValue applyScreenDelta(Time anchor, double deltaPx) const =0
translate an offset in pixel coordinates into a temporal position
virtual int translateTimeToPixels(TimeValue) const =0
extension point for time axis zoom management.
virtual ~DisplayMetric()
this is an interface
Any copy and copy construction prohibited.
#define ERROR_LOG_AND_IGNORE(_FLAG_, _OP_DESCR_)
convenience shortcut for a sequence of catch blocks just logging and consuming an error.
Lumiera GTK UI implementation root.
Mix-Ins to allow or prohibit various degrees of copying and cloning.
a family of time value like entities and their relationships.
Tiny helper functions and shortcuts to be used everywhere Consider this header to be effectively incl...