Lumiera 0.pre.04~rc.1
»edit your freedom«
Loading...
Searching...
No Matches
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)
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
24#include "stage/gtk-base.hpp"
27
28//#include "stage/ui-bus.hpp"
29//#include "lib/format-string.hpp"
30//#include "lib/format-cout.hpp"
31
32//#include "lib/util.hpp"
33
34//#include <algorithm>
35//#include <vector>
36
37
38
39//using util::_Fmt;
41//using util::contains;
42//using Gtk::Widget;
43//using sigc::mem_fun;
44//using sigc::ptr_fun;
45//using std::cout;
46//using std::endl;
47
48
49namespace stage {
50namespace timeline {
51
52
53
54
55
57 : model::Widget{identity, nexus}
58 , ElementBoxWidget(widget::MARK, widget::Type::LABEL)
59 , kind_{MARK}
60 , name_{identity.getSym()} // ID symbol as name fallback
61 {
62 UNIMPLEMENTED ("how to attach the Marker, depending on the actual context");
63 }
64
65
69
70
71
72
73 void
75 {
76 buffer.emplace(
78 .change(ATTR_name, [&](string val)
79 {
80 name_ = val;
81 })
82 .change(META_kind, [&](string val)
83 {
84 if (val == "LOOP") kind_ = LOOP;
85 else kind_ = MARK;
86 }));
87 }
88
96 void
98 {
99 UNIMPLEMENTED ("how to re-attach the Marker, depending on the actual context");
100 }
101
102
103
104
105}}// namespace stage::timeline
A handle to allow for safe »remote implantation« of an unknown subclass into a given opaque InPlaceBu...
SUB & emplace(SUB &&implementation)
move-construct an instance of a subclass into the opaque buffer
Customisable intermediary to abstract mutating operations on arbitrary, hierarchical object-like data...
static Builder< TreeMutator > build()
DSL: start building a custom adapted tree mutator, where the operations are tied by closures or wrapp...
connection point at the UI-Bus.
Definition bus-term.hpp:98
ctrl::BusTerm::ID ID
Definition tangible.hpp:162
MarkerWidget(ID identity, ctrl::BusTerm &nexus)
void relink()
update and re-attach the presentation widget into its presentation context.
virtual void buildMutator(lib::diff::TreeMutator::Handle) override
set up a binding to respond to mutation messages via UiBus
A set of basic GTK includes for the UI.
Widget to show a marker at various places.
Lumiera GTK UI implementation root.
Definition guifacade.cpp:37
const Symbol ATTR_name
const Symbol META_kind
#define Type(_EXPR_)
Hard wired key constants and basic definitions for communication with the GUI.