Lumiera  0.pre.03
»edit your freedom«
timeline-widget.cpp
Go to the documentation of this file.
1 /*
2  TimelineWidget - custom widget for timeline display of the project
3 
4  Copyright (C) Lumiera.org
5  2016, Hermann Vosseler <Ichthyostega@web.de>
6 
7  This program is free software; you can redistribute it and/or
8  modify it under the terms of the GNU General Public License as
9  published by the Free Software Foundation; either version 2 of
10  the License, or (at your option) any later version.
11 
12  This program is distributed in the hope that it will be useful,
13  but WITHOUT ANY WARRANTY; without even the implied warranty of
14  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  GNU General Public License for more details.
16 
17  You should have received a copy of the GNU General Public License
18  along with this program; if not, write to the Free Software
19  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
20 
21 * *****************************************************/
22 
23 
33 #include "stage/gtk-base.hpp"
37 #include "stage/style-scheme.hpp"
38 
39 //#include "stage/workspace/workspace-window.hpp"
40 //#include "stage/ui-bus.hpp"
41 //#include "lib/format-string.hpp"
42 //#include "lib/format-cout.hpp"
43 
44 //#include "lib/util.hpp"
45 //#include <algorithm>
46 //#include <cstdlib>
47 
48 
49 
50 //using util::_Fmt;
51 //using std::shared_ptr;
52 //using std::weak_ptr;
53 //using util::contains;
54 //using Gtk::Widget;
55 //using sigc::mem_fun;
56 //using sigc::ptr_fun;
57 //using std::cout;
58 //using std::endl;
59 
60 
61 namespace stage {
62 namespace timeline {
63 
64 //const int TimelineWidget::TrackPadding = 1;
65 //const int TimelineWidget::HeaderWidth = 150;
66 //const int TimelineWidget::HeaderIndentWidth = 10;
67 
68 
69 
70 
71  TimelineWidget::TimelineWidget (BusTerm::ID identity, BusTerm::ID trackID, BusTerm& nexus)
72  : TimelinePage{}
73  , layout_{new TimelineLayout{*this}}
74  , control_{new TimelineController{identity, trackID, nexus, *layout_}}
75  {
76  get_style_context()->add_class(CLASS_timeline);
77  get_style_context()->add_class(CLASS_timeline_page);
78  show_all();
79  }
80 
81  TimelineWidget::~TimelineWidget() { }
82 
83 
84  void
86  {
87  control_->buildMutator (buff);
88  }
89 
90 
91  cuString
92  TimelineWidget::getLabel() const
93  {
94  return control_->getName();
95  }
96 
97  Gtk::WidgetPath
98  TimelineWidget::getBodyWidgetPath() const
99  {
100  return layout_->getBodyWidgetPath();
101  }
102 
103 
104 
105 
106 }}// namespace stage::timeline
Interface: GUI page holding a timeline display.
connection point at the UI-Bus.
Definition: bus-term.hpp:105
Top-level anchor point for the timeline display (widgets).
Controller to supervise operation of timeline display in the UI.
A core service of the timeline UI to ensure consistent display and layout of all components within th...
A handle to allow for safe »remote implantation« of an unknown subclass into a given opaque InPlaceBu...
Definition: record.hpp:113
void buildMutator(lib::diff::TreeMutator::Handle)
allow for diff mutation (delegated to TimelineController
Lumiera GTK UI implementation root.
Definition: guifacade.cpp:46
Controller to supervise the timeline display.
Definition of access keys for uniform UI styling.
A set of basic GTK includes for the UI.
TimelineWidget(BusTerm::ID identity, BusTerm::ID trackID, BusTerm &nexus)
build a new timeline display and attach it to the UI-Bus.
This file defines the core component of the Lumiera GUI.