Lumiera 0.pre.04~rc.1
»edit your freedom«
Loading...
Searching...
No Matches
display-manager.hpp
Go to the documentation of this file.
1/*
2 DISPLAY-MANAGER.hpp - abstraction to translate model structure and extension into screen layout
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
70#ifndef STAGE_TIMELINE_DISPLAY_MANAGER_H
71#define STAGE_TIMELINE_DISPLAY_MANAGER_H
72
73
74#include "lib/error.hpp"
75#include "lib/nocopy.hpp"
78#include "lib/util.hpp"
79
80#include <sigc++/signal.h>
81
82
83
84namespace stage {
85namespace timeline {
86
87 using util::max;
88
90 class TrackHeadWidget;
91 class TrackBody;
92
93
107 {
108 public:
109 virtual ~DisplayViewHooks() { }
110
114 };
115
116
117
119 struct PixSpan
120 {
121 int b = 0;
122 int e = 0;
123
125 PixSpan(int begin, int end)
126 : b{begin}, e{max (begin,end)}
127 { }
128
129 bool
130 empty() const
131 {
132 return e <= b;
133 }
134
135 int
136 delta() const
137 {
138 return e - b;
139 }
140 };
141
148 , public DisplayViewHooks
149 , public model::DisplayMetric
150 {
151
152
153 public:
154 virtual ~DisplayManager();
155
157 virtual void triggerDisplayEvaluation() =0;
158
159 using SignalStructureChange = sigc::signal<void>;
160
169
170
172 PixSpan
174 {
175 return {translateTimeToPixels (coveredTime().start())
177 };
178 }
179
180
181 private:/* ===== Internals ===== */
182
183 };
184
185
186}}// namespace stage::timeline
187#endif /*STAGE_TIMELINE_DISPLAY_MANAGER_H*/
Specialised (abstracted) presentation context with positioning by coordinates.
basic constant internal time value.
Interface to represent _"some presentation layout entity",_ with the ability to place widgets (manage...
Mix-in interface to allow for concrete CanvasHooked widgets to adapt themselves to the metric current...
virtual TimeSpan coveredTime() const =0
the overall time Duration covered by this timeline canvas
virtual int translateTimeToPixels(TimeValue) const =0
extension point for time axis zoom management.
Interface to represent _"some presentation layout entity",_ with the ability to attach widgets (manag...
Definition view-hook.hpp:76
Interface for coordination of the overall timeline display.
PixSpan getPixSpan()
the overall horizontal pixel span to cover by this timeline
virtual void triggerDisplayEvaluation()=0
cause a re-allocation of the complete layout
virtual ~DisplayManager()
this is an interface
SignalStructureChange signalStructureChange_
signal to be invoked whenever the virtual structure of the corresponding timeline changes,...
sigc::signal< void > SignalStructureChange
Interface: a compound of anchoring facilities.
virtual model::CanvasHook< Gtk::Widget > & getClipHook()=0
virtual model::ViewHook< TrackHeadWidget > & getHeadHook()=0
virtual model::ViewHook< TrackBody > & getBodyHook()=0
virtual ~DisplayViewHooks()
this is an interface
Any copy and copy construction prohibited.
Definition nocopy.hpp:38
Lumiera error handling (C++ interface).
Lumiera GTK UI implementation root.
Definition guifacade.cpp:37
auto max(IT &&elms)
Mix-Ins to allow or prohibit various degrees of copying and cloning.
PixSpan(int begin, int end)
Tiny helper functions and shortcuts to be used everywhere Consider this header to be effectively incl...
Allow widgets to connect to a common shared presentation context.