Lumiera 0.pre.04~rc.1
»edit your freedom«
Loading...
Searching...
No Matches
clip-widget.hpp
Go to the documentation of this file.
1/*
2 CLIP-WIDGET.hpp - display of a clip in timeline or media bin view
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
110#ifndef STAGE_TIMELINE_CLIP_WIDGET_H
111#define STAGE_TIMELINE_CLIP_WIDGET_H
112
113#include "stage/gtk-base.hpp"
115#include "lib/time/timevalue.hpp"
116
117//#include "lib/util.hpp"
118
119#include <optional>
120#include <memory>
121#include <string>
122//#include <vector>
123
124
125
126namespace stage {
127namespace timeline {
128
129 using std::string;
130 using std::nullopt;
131 using std::optional;
132 using lib::time::Time;
133 using lib::time::TimeVar;
136
138
139 class ClipDelegate;
140 using PDelegate = std::unique_ptr<ClipDelegate>;
141
142
147 {
149
150 public:
151 virtual ~ClipDelegate();
152 ClipDelegate();
153
154
157
158
160 static const int defaultOffsetY;
161
163 static const string defaultName;
164
166 virtual Appearance currentAppearance() const =0;
167
171
173 virtual cuString getClipName() const =0;
174 virtual void setClipName (cuString&) =0;
175
177 virtual TimeVar& accessDuration() =0;
178
179 virtual uint getVerticalOffset() const =0;
180
181 virtual WidgetHook& getCanvas() const =0;
182 virtual void updatePosition() =0;
183
184 virtual uint calcRequiredHeight() const =0;
185
186
192 WidgetHook::Pos establishHookPoint (WidgetHook* newView);
193
194
219 static Appearance selectAppearance (PDelegate& existing,
220 Appearance desired =PENDING,
221 WidgetHook* newView =nullptr,
222 optional<TimeSpan> const& timing =nullopt);
223
231 static Gtk::Widget& expect_and_expose_Widget (PDelegate& manager);
232
233
234 private:/* ===== Internals ===== */
235
236 };
237
238
239}}// namespace stage::timeline
240#endif /*STAGE_TIMELINE_CLIP_WIDGET_H*/
Specialised (abstracted) presentation context with positioning by coordinates.
Duration is the internal Lumiera time metric.
A time interval anchored at a specific point in time.
a mutable time value, behaving like a plain number, allowing copy and re-accessing
Lumiera's internal time value datatype.
Appearance
desired appearance style for the clip
virtual Appearance changeAppearance(Appearance desired)=0
alter appearance style, to the degree possible for this delegate.
WidgetHook::Pos establishHookPoint(WidgetHook *newView)
(re)establish current canvas attachment coordinates, thereby possibly switching to a new canvas imple...
virtual TimeVar & accessStartTime()=0
virtual Appearance currentAppearance() const =0
presentation mode and style currently employed
static Gtk::Widget & expect_and_expose_Widget(PDelegate &manager)
Wrapper to safely expose the actual clip implementation widget.
static const string defaultName
placeholder name – typically overridden from the model
virtual void updatePosition()=0
virtual TimeVar & accessDuration()=0
virtual cuString getClipName() const =0
human readable rendering of the clip's name or identity
static Appearance selectAppearance(PDelegate &existing, Appearance desired=PENDING, WidgetHook *newView=nullptr, optional< TimeSpan > const &timing=nullopt)
request to change the clip delegate's appearance style, if possible.
virtual uint getVerticalOffset() const =0
virtual uint calcRequiredHeight() const =0
virtual ~ClipDelegate()
this is an interface
static const int defaultOffsetY
vertical offset below the track start
virtual WidgetHook & getCanvas() const =0
virtual void setClipName(cuString &)=0
A set of basic GTK includes for the UI.
unsigned int uint
Definition integral.hpp:29
std::unique_ptr< ClipDelegate > PDelegate
Lumiera GTK UI implementation root.
Definition guifacade.cpp:37
const uString cuString
Definition gtk-base.hpp:93
a family of time value like entities and their relationships.