Lumiera  0.pre.03
»edit your freedom«
ruler-track.hpp
Go to the documentation of this file.
1 /*
2  RULER-TRACK.hpp - track body area to show overview and timecode and markers
3 
4  Copyright (C) Lumiera.org
5  2018, 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 
44 #ifndef STAGE_TIMELINE_RULER_TRACK_H
45 #define STAGE_TIMELINE_RULER_TRACK_H
46 
47 #include "stage/gtk-base.hpp"
49 
50 //#include "lib/util.hpp"
51 
52 //#include <memory>
53 #include <vector>
54 
55 
56 
57 namespace stage {
58 namespace timeline {
59 
60  class TrackPresenter;
61 
63  struct RulerScale
64  {
65  uint calcHeight();
66  };
67 
68 
75  class RulerTrack
76  : public model::Controller
77  {
78  using Scales = std::vector<RulerScale>;
79 
80  TrackPresenter& track_;
81  Scales scales_;
83  public:
84  ~RulerTrack();
85 
91  RulerTrack (ID id, ctrl::BusTerm& nexus, TrackPresenter& parent);
92 
93  uint calcHeight();
94  uint getGapHeight();
95 
97  virtual void buildMutator (lib::diff::TreeMutator::Handle) override;
98 
99  private:/* ===== Internals ===== */
100 
101  };
102 
103 
104 }}// namespace stage::timeline
105 #endif /*STAGE_TIMELINE_RULER_TRACK_H*/
Helper to organise and draw the time or content overview ruler at the top of the timeline track displ...
Definition: ruler-track.hpp:75
connection point at the UI-Bus.
Definition: bus-term.hpp:105
uint calcHeight()
get vertical extension of this scale on the time(code) overview ruler
A View-Model entity to represent a timeline track in the UI.
A handle to allow for safe »remote implantation« of an unknown subclass into a given opaque InPlaceBu...
Definition: record.hpp:113
Lumiera GTK UI implementation root.
Definition: guifacade.cpp:46
Common Abstraction of all sub-controller, coordinated by the UI-Bus.
A set of basic GTK includes for the UI.