Lumiera  0.pre.03
»edit your freedom«
DisplayMetric Class Referenceabstract

#include "stage/model/canvas-hook.hpp"

Description

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 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...
 

Member Function Documentation

◆ translateTimeToPixels()

virtual int translateTimeToPixels ( TimeValue  ) const
pure virtual

extension point for time axis zoom management.

Referenced by CanvasHook< Gtk::Widget >::hookedAt(), and DisplayMetric::~DisplayMetric().

+ Here is the caller graph for this function:

◆ applyScreenDelta()

virtual TimeValue applyScreenDelta ( Time  anchor,
double  deltaPx 
) const
pure virtual

translate an offset in pixel coordinates into a temporal position

Parameters
anchorthe start point on the time axis where to apply the delta
deltaPxa delta given as canvas pixel displacement
Returns
resulting TimeValue when applying the offset within current metric

Referenced by DisplayMetric::~DisplayMetric().

+ Here is the caller graph for this function:
+ Inheritance diagram for DisplayMetric:
+ Collaboration diagram for DisplayMetric:

The documentation for this class was generated from the following file: