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