Lumiera  0.pre.03
»edit your freedom«
TimelineZoomScale Class Reference

Description

Definition at line 51 of file timeline-zoom-scale.hpp.

Public Member Functions

 TimelineZoomScale ()
 
void set_value (double val)
 
sigc::signal< void, double > signal_zoom ()
 
void wireTimelineState (shared_ptr< TimelineState > currentState)
 

Private Member Functions

TimelineViewWindowgetViewWindow ()
 access current timeline state
 
void on_timeline_state_changed (shared_ptr< TimelineState > newState)
 Update the slider position when the timeline state is changed.
 
void on_zoom ()
 Event handler for when the adjustment value is changed.
 
void on_zoom_in_clicked ()
 Event handler for when the zoomIn Button is clicked.
 
void on_zoom_out_clicked ()
 Event handler for when the zoomIn Button is clicked.
 

Private Attributes

Glib::RefPtr< Gtk::Adjustment > adjustment
 
const double button_step_size
 
Gtk::HScale slider
 
shared_ptr< TimelineStatetimelineState
 
MiniButton zoomIn
 
MiniButton zoomOut
 
sigc::signal< void, double > zoomSignal
 

Constructor & Destructor Documentation

◆ TimelineZoomScale()

Todo:
The initial adjustment value needs to match what the TimelineViewWindow's actual timeScale Value is.

TimelineViewWindow::get_time_scale() is currently a public method, but will soon be private. Maybe TimelineViewWindow can have a zoom_adjustment that gets passed to this widget's Constructor?

Todo:
actually there is a more involved problem. The TimelineWidget maintains a TimelineState, which in turn owns the TimelineViewWindow. Now, the problem is: when we switch to another Sequence (View), then this TimelineState gets switched too, causing also a entirely different TimelineViewWindow to become effective. Thus
  • how can we managed to be notified from that switch?
  • problem is: TimelineZoomScale widget is owned by the TimelinePannel. Likewise, TimelineWidget is owned by the TimelinePannel. But the state handling/switching logic is embedded within TimelineWidget
  • and finally: how can we translate the actual scale (in time units), as maintained within TimelineViewWindow, back into the adjustment used here (which uses a relative scale 0...1.0 ) S

Definition at line 69 of file timeline-zoom-scale.cpp.

References stage::timeline::anonymous_namespace{stave-bracket-widget.cpp}::connect(), TimelineZoomScale::on_timeline_state_changed(), TimelineZoomScale::on_zoom(), TimelineZoomScale::on_zoom_in_clicked(), and TimelineZoomScale::on_zoom_out_clicked().

+ Here is the call graph for this function:
+ Inheritance diagram for TimelineZoomScale:
+ Collaboration diagram for TimelineZoomScale:

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