![]() |
Lumiera 0.pre.04~rc.1
»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 73 of file canvas-hook.hpp.
Public Member Functions | |
| virtual | ~DisplayMetric () |
| this is an interface | |
| virtual TimeSpan | coveredTime () const =0 |
| the overall time Duration covered by this timeline canvas | |
| virtual int | translateTimeToPixels (TimeValue) const =0 |
| extension point for time axis zoom management. | |
| 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 | |
|
inlinevirtual |
this is an interface
Definition at line 76 of file canvas-hook.hpp.
|
pure virtual |
the overall time Duration covered by this timeline canvas
Referenced by DisplayManager::getPixSpan().
Here is the caller graph for this function:
|
pure virtual |
extension point for time axis zoom management.
Referenced by DisplayManager::getPixSpan().
Here is the caller graph for this function:
|
pure virtual |
translate a temporal offset into a pixel Δ
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 ClipPresenter::DragRelocateObserver::updateOffset().
Here is the caller graph for this function:
Inheritance diagram for DisplayMetric:
Collaboration diagram for DisplayMetric: