Lumiera  0.pre.03
»edit your freedom«
timeline-layout.hpp
Go to the documentation of this file.
1 /*
2  TIMELINE-LAYOUT.hpp - global timeline layout management and display control
3 
4  Copyright (C)
5  2016, Hermann Vosseler <Ichthyostega@web.de>
6 
7   **Lumiera** is free software; you can redistribute it and/or modify it
8   under the terms of the GNU General Public License as published by the
9   Free Software Foundation; either version 2 of the License, or (at your
10   option) any later version. See the file COPYING for further details.
11 
12 */
13 
14 
70 #ifndef STAGE_TIMELINE_TIMELINE_LAYOUT_H
71 #define STAGE_TIMELINE_TIMELINE_LAYOUT_H
72 
73 #include "stage/gtk-base.hpp"
81 #include "lib/time/timevalue.hpp"
82 
83 
84 
85 
86 namespace stage {
87 namespace timeline {
88 
89  using lib::time::Time;
90 
91  class TrackHeadWidget;
92  class TrackBody;
93 
94 
101  : public model::ZoomMetric<DisplayManager>
102  , protected model::ViewHook<TrackHeadWidget>
103  , protected model::ViewHook<TrackBody>
104  , public LayoutElement
105  {
106  Glib::PropertyProxy<int> paneSplitPosition_;
107 
108  BodyCanvasWidget bodyCanvas_;
109  HeaderPaneWidget headerPane_;
110 
111  DisplayEvaluation displayEvaluation_;
112 
113  public:
114  TimelineLayout (Gtk::Paned&);
115  ~TimelineLayout();
116 
120 
121  Gtk::WidgetPath getBodyWidgetPath() const;
122 
123 
124  protected: /* ==== Interface: LayoutManager ===== */
125 
126  void triggerDisplayEvaluation() override;
127 
128  protected: /* ==== Interface: LayoutElement ===== */
129 
130  void establishLayout (DisplayEvaluation&) override;
131  void completeLayout (DisplayEvaluation&) override;
132 
133 
134  protected: /* ==== Interface: DisplayViewHooks===== */
135 
136  model::ViewHook<TrackHeadWidget>& getHeadHook() override { return *this; };
137  model::ViewHook<TrackBody>& getBodyHook() override { return *this; };
138  model::CanvasHook<Gtk::Widget>& getClipHook() override { return bodyCanvas_; };
139 
140  protected: /* ==== Interface: ViewHook ===== */
141 
142  void hook (TrackHeadWidget&) override;
143  void remove (TrackHeadWidget&) override;
144  void rehook (TrackHeadWidget&) noexcept override;
145 
146  void hook (TrackBody&) override;
147  void remove (TrackBody&) override;
148  void rehook (TrackBody&) noexcept override;
149 
150  private:/* ===== Internals ===== */
151  void syncZoomWindow (PAdjustment);
152  void sizeZoomWindow (Gtk::Allocation&);
153  };
154 
155 
156 }}// namespace stage::timeline
157 #endif /*STAGE_TIMELINE_TIMELINE_LAYOUT_H*/
Header pane control area corresponding to a Track with nested child Tracks.
void establishLayout(DisplayEvaluation &) override
TimelineLayout also participates itself in the DisplayEvaluation, notably to set up the basic paramet...
Top-level anchor point for the timeline display (widgets).
Widget to render the body of timeline display, by custom drawing into a canvas control.
Mix-In to implement the DisplayMetric interface on top of a ZoomWindow component, directly embedded h...
Definition: zoom-metric.hpp:64
Interface to represent _"some presentation layout entity",_ with the ability to attach widgets (manag...
Definition: view-hook.hpp:75
void setupStructure(LayoutElement &)
Allow widgets to connect to a common shared presentation context.
Lumiera&#39;s internal time value datatype.
Definition: timevalue.hpp:299
void triggerDisplayEvaluation() override
Perform a complete recursive pass over all elements relevant for layout, reestablish size allocation ...
A collaboration to establish a globally coherent timeline display layout.
void sizeZoomWindow(Gtk::Allocation &)
Signal receiver (slot) to react on changes of the window screen space allocation. ...
Visitor and state holder for a collaborative layout adjustment pass.
Abstraction: service for the widgets to translate themselves into screen layout.
Specialised (abstracted) presentation context with positioning by coordinates.
Lumiera GTK UI implementation root.
Definition: guifacade.cpp:37
void syncZoomWindow(PAdjustment)
Signal receiver (slot) to react on scrollbar changes.
void installRootTrack(TrackHeadWidget &, TrackBody &)
This function is invoked once for each new TimelineWidget, in order to build the starting point for t...
Implementation building block to get the DisplayMetric as defined through a ZoomWindow.
Widget to show an always visible track header area within the timeline UI.
Helper to organise and draw the space allocated for a fork of sub-tracks.
Definition: track-body.hpp:86
Presentation of the timeline workspace by custom drawing on a canvas.
a family of time value like entities and their relationships.
A set of basic GTK includes for the UI.