Lumiera  0.pre.03
»edit your freedom«
marker-widget.cpp
Go to the documentation of this file.
1 /*
2  MarkerWidget - display of a marker in timeline or within clips
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"
34 #include "include/ui-protocol.hpp"
36 
37 //#include "stage/ui-bus.hpp"
38 //#include "lib/format-string.hpp"
39 //#include "lib/format-cout.hpp"
40 
41 //#include "lib/util.hpp"
42 
43 //#include <algorithm>
44 //#include <vector>
45 
46 
47 
48 //using util::_Fmt;
50 //using util::contains;
51 //using Gtk::Widget;
52 //using sigc::mem_fun;
53 //using sigc::ptr_fun;
54 //using std::cout;
55 //using std::endl;
56 
57 
58 namespace stage {
59 namespace timeline {
60 
61 
62 
63 
64 
66  : model::Widget{identity, nexus}
68  , kind_{MARK}
69  , name_{identity.getSym()} // ID symbol as name fallback
70  {
71  UNIMPLEMENTED ("how to attach the Marker, depending on the actual context");
72  }
73 
74 
75  MarkerWidget::~MarkerWidget()
76  {
77  }
78 
79 
80 
81 
82  void
84  {
85  buffer.emplace(
87  .change(ATTR_name, [&](string val)
88  {
89  name_ = val;
90  })
91  .change(META_kind, [&](string val)
92  {
93  if (val == "LOOP") kind_ = LOOP;
94  else kind_ = MARK;
95  }));
96  }
97 
105  void
107  {
108  UNIMPLEMENTED ("how to re-attach the Marker, depending on the actual context");
109  }
110 
111 
112 
113 
114 }}// namespace stage::timeline
Hard wired key constants and basic definitions for communication with the GUI.
Widget to show a marker at various places.
connection point at the UI-Bus.
Definition: bus-term.hpp:105
ElementBoxWidget(Kind kind, Type type, QS ...qualifiers)
setup an ElementBoxWidget with suitable presentation style.
void relink()
update and re-attach the presentation widget into its presentation context.
MarkerWidget(ID identity, ctrl::BusTerm &nexus)
static Builder< TreeMutator > build()
DSL: start building a custom adapted tree mutator, where the operations are tied by closures or wrapp...
SUB & emplace(SUB &&implementation)
move-construct an instance of a subclass into the opaque buffer
A handle to allow for safe »remote implantation« of an unknown subclass into a given opaque InPlaceBu...
Definition: record.hpp:113
Lumiera GTK UI implementation root.
Definition: guifacade.cpp:46
Widget is a pin or marks a position.
virtual void buildMutator(lib::diff::TreeMutator::Handle) override
set up a binding to respond to mutation messages via UiBus
represents a label or descriptor
A set of basic GTK includes for the UI.
Customisable intermediary to abstract mutating operations on arbitrary, hierarchical object-like data...