Lumiera
0.pre.03
»edit your freedom«
|
#include "stage/model/canvas-hook.hpp"
Mix-in interface to allow for concrete CanvasHooked widgets to adapt themselves to the metric currently employed on the canvas.
In some cases, most notably when a timeline canvas is calibrated to precisely represent temporal extension, the widgets (clips, effects) within such a display need to adjust and adapt themselves. A relevant case is when such a widget is dragged — receiving mouse move events in screen coordinates — which then should be translated into a resulting temporal offset or change command to reflect this interaction gesture.
Definition at line 82 of file canvas-hook.hpp.
Public Member Functions | |
virtual | ~DisplayMetric () |
this is an interface | |
virtual TimeValue | applyScreenDelta (Time anchor, double deltaPx) const =0 |
translate an offset in pixel coordinates into a temporal position More... | |
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 int | translateTimeToPixels (TimeValue) const =0 |
extension point for time axis zoom management. More... | |
|
pure virtual |
extension point for time axis zoom management.
Referenced by CanvasHook< Gtk::Widget >::hookedAt(), and DisplayMetric::~DisplayMetric().
translate an offset in pixel coordinates into a temporal position
anchor | the start point on the time axis where to apply the delta |
deltaPx | a delta given as canvas pixel displacement |
Referenced by DisplayMetric::~DisplayMetric().