Lumiera  0.pre.03
»edityourfreedom«
body-canvas-widget.hpp File Reference

Go to the source code of this file.

Description

Widget to render the body of timeline display, by custom drawing into a canvas control.

The body part of the timeline display can not be sensibly implemented with automatic layout by the UI toolkit set. Rather, we need to control a precise temporal display grid, and we need to limit the actual widgets added for display, since a given timeline may easily hold several hundred up to thousands of elements. To ease such tasks, a canvas control – here implemented on top of Gtk::Layout, allows to combine custom drawing with the placement of embedded child widgets, where the latter's layout is again managed automatically by the toolkit set. This approach allows us to circumvent some of the perils of custom drawing, where we might forfeit several of the benefits of using a toolkit unintentionally, and create an UI which feels foreign and brittle in comparison to standard software.

Layout management

To create a consistent layout of the timeline, header pane and body need to react to the same scrolling adjustments, and use the same vertical size allocations for each embedded track. Such a consistent global layout needs to be built up in a display evaluation pass, carried out collaboratively between the building blocks of the timeline. To this end, the TrackPresenter and ClipPresenter elements act as (view) model entities, visited by the timeline::LayoutManager to establish coherent display parameters. From within this evaluation pass, the individual presenters communicate with their slave widgets, which are inserted into the display context of the track header pane or this body widget respectively. As a result, some new widgets may be injected, existing widgets may be removed or hidden, and other widgets may be relocated to different virtual canvas coordinates.

Todo:
WIP-WIP-WIP as of 12/2016

Definition in file body-canvas-widget.hpp.

#include "gui/gtk-base.hpp"

Classes

class  BodyCanvasWidget
 

Namespaces

 gui
 Lumiera GTK UI implementation root.
 
 gui::timeline
 The timeline display and editing operations.