[Lumiera] [PATCH] Timeline Zoom Scale Control Widget

Ichthyostega prg at ichthyostega.de
Fri Oct 7 04:44:57 CEST 2011

Hello Michael,

just reviewed your contribution. Basically all fine -- I've added it to the
current gui branch (which is quite close to master at the moment).

This brought some issues to my attention -- and these issues aren't your fault,
but rather due to a somewhat mixed state in the relation of some GUI objects.

As you've probably noticed, GUI development is somewhat stalled, since our
dedicated "master of the GUI", Joel Holdsworth left. Thus, the GUI, as it
stands now, is in no way finished; rather it's stalled in a state where
it was just about to be fleshed out in more detail.

Anyway, the TimelineWidget maintains a TimelineState, which in turn
owns the TimelineViewWindow. The latter is kind of "the current Zoom state"
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.

 - how can we manage to be notified from that switch?

 - more specifically, the 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 and where 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 ) ?

Currently, when we interact with the new zoom scale widget, the
notification is passed on as follows:

slider -> Adjustment -> TimelineZoomScale::on_zoom ->
	zoomSignal -> TimelinePanel::on_zoom() ->
	TimelineWidget::zoom_view() -> TimelineState.get_view_window().zoom_view
 	-> TimelineViewWindow::set_time_scale() -> changedSignal ->
        (and besides that also to TimelineBody and TimelineRuler)

Now, how can we sensibly include in this chain an additional signal connection,
which causes the slider to be updated when the TimelineWidget is switched
to use a different TimelineState?

I mean, given that highly convoluted signal path outlined above, how
to add this without creating signal loops?

Maybe we should consider to introduce some central entity, which mediates
any zoom / scroll changes? What do you think?

Hermann V.

More information about the Lumiera mailing list