Lumiera  0.pre.03
»edit your freedom«
display-evaluation.hpp
Go to the documentation of this file.
1 /*
2  DISPLAY-EVALUATION.hpp - recursive interwoven timeline layout allocation
3 
4  Copyright (C) Lumiera.org
5  2020, 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 
70 #ifndef STAGE_TIMELINE_DISPLAY_EVALUATION_H
71 #define STAGE_TIMELINE_DISPLAY_EVALUATION_H
72 
73 
74 #include "lib/error.hpp"
75 #include "lib/nocopy.hpp"
76 //#include "lib/util.hpp"
77 
78 //#include <sigc++/signal.h>
79 #include <vector>
80 
81 
82 
83 namespace stage {
84 namespace timeline {
85 
86 //using util::max;
87 
88 //using model::ViewHooked;
89 //class TrackHeadWidget;
90 //class TrackBody;
91  class DisplayEvaluation;
92 
93 
96  {
97  public:
98  virtual ~LayoutElement();
99 
100  virtual void establishLayout (DisplayEvaluation&) =0;
101  virtual void completeLayout (DisplayEvaluation&) =0;
102  };
103 
104 
111  {
112  std::vector<LayoutElement*> elms_;
113 
114  bool collectLayout_{true};
115 
116  public:
117  void attach(LayoutElement& e) { elms_.push_back(&e); }
118  void perform();
119 
120  bool isCollectPhase() const { return this->collectLayout_; }
121 
122  private:/* ===== Internals ===== */
123  void reset();
124  };
125 
126 
127 }}// namespace stage::timeline
128 #endif /*STAGE_TIMELINE_DISPLAY_EVALUATION_H*/
Any copy and copy construction prohibited.
Definition: nocopy.hpp:46
Visitor and state holder for a collaborative layout adjustment pass.
Mix-Ins to allow or prohibit various degrees of copying and cloning.
virtual ~LayoutElement()
this is an interface
Lumiera GTK UI implementation root.
Definition: guifacade.cpp:46
Lumiera error handling (C++ interface).