52 #ifndef STAGE_MODEL_CANVAS_HOOK_H 53 #define STAGE_MODEL_CANVAS_HOOK_H 123 virtual void hook (WID& widget,
int xPos,
int yPos) =0;
124 virtual void move (WID& widget,
int xPos,
int yPos) =0;
125 virtual void remove (WID& widget) =0;
144 hookedAt (
int x,
int y)
146 return Pos{
this, x,y};
186 template<
class WID,
class BASE =WID>
195 Canvas& getCanvas()
const {
return *view_; }
198 template<
typename...ARGS>
200 : WID{std::forward<ARGS>(args)...}
201 , view_{attachmentPos.view}
203 getCanvas().hook (*
this, attachmentPos.x, attachmentPos.y);
210 view_->remove (*
this);
216 moveTo (
int xPos,
int yPos)
218 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