Lumiera 0.pre.04
»edit your freedom«
Loading...
Searching...
No Matches
timeline-gui.cpp
Go to the documentation of this file.
1/*
2 TimelineGui - top-level anchor point and placeholder for "the timeline"
3
4 Copyright (C)
5 2018, 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
27#include "stage/gtk-base.hpp"
30
31#include <utility>
32
34using std::unique_ptr;
35
36
37namespace stage {
38namespace timeline {
39
40
45 TimelineGui::TimelineGui (ID identity, ID trackID)
46 : timelineID_{identity}
47 , rootTrackID_{trackID}
48 { }
49
55 : WLink{r}, util::Cloneable{}
56 , timelineID_{r.timelineID_}
57 , rootTrackID_{r.rootTrackID_}
58 { }
59
61 : WLink{std::move (rr)}
62 , timelineID_{rr.timelineID_}
63 , rootTrackID_{rr.rootTrackID_}
64 { }
65
67 {
68 if (this->isActive())
69 TODO ("cascading destruction of the TimelineWidget");
70 }
71
72
85 unique_ptr<TimelinePage>
87 {
88 TimelineWidget* widget;
89 unique_ptr<TimelinePage> pageHandle {widget = new TimelineWidget{timelineID_, rootTrackID_, nexus}};
90 this->connect (*widget);
91 return pageHandle;
92 }
93
94
101 void
103 {
104 if (this->isActive())
105 operator*().buildMutator (buffer); // delegate to TimelineController
106 else // else when no widget exists...
107 buffer.emplace(
109 .ignoreAllChanges()); // ...consume and ignore diff
110 }
111
112
113}}// 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
smart-Handle as anchor point for "the UI representation" of a timeline.
TimelineGui(ID identity, ID trackID)
Initially, TimelineGui is just an empty placeholder handle.
void buildMutator(lib::diff::TreeMutator::Handle buffer) override
forwarding implementation of the DiffMutable interface, delegating through the referred TimelineWidge...
std::unique_ptr< TimelinePage > buildTimelineWidget(BusTerm &)
actually build a TimelineWidget to enact the role represented by this smart-handle
Core timeline display (custom widget).
A set of basic GTK includes for the UI.
Lumiera GTK UI implementation root.
Definition guifacade.cpp:37
STL namespace.
Anchor point and placeholder for the UI representation of a Timeline from the session.
This file defines the core component of the Lumiera GUI.