Lumiera 0.pre.04
»edit your freedom«
Loading...
Searching...
No Matches
track-body.hpp
Go to the documentation of this file.
1/*
2 TRACK-BODY.hpp - track body area within the timeline display canvas
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
31#ifndef STAGE_TIMELINE_TRACK_BODY_H
32#define STAGE_TIMELINE_TRACK_BODY_H
33
34#include "stage/gtk-base.hpp"
38
39
40#include <memory>
41#include <vector>
42#include <array>
43
44
45
46namespace stage {
47namespace timeline {
48
49 class TrackPresenter;
50 class TrackProfile;
51
52
62 {
68
69 using Borders = std::array<uint, 6>;
70 Borders borders{0,0,0,0,0,0};
71 };
72
73
87 : public model::ViewHook<TrackBody>
88 {
92
93 using PRuler = std::unique_ptr<RulerTrack>;
94 using Rulers = std::vector<PRuler>;
95
96 using SubTracks = std::vector<TrackBody*>;
97
100
101 public:
103
104 TrackBody();
105 ~TrackBody();
106
107 void setTrackName (cuString&);
109 void accommodateContentHeight(uint contentExtension);
110
113
114 uint calcHeight() const;
115 uint calcRulerHeight() const;
116 uint calcContentHeight() const;
117 uint calcSubtrackHeight() const;
118
120
121
122 /* ==== Interface: ViewHook ===== */
123
124 void hook (TrackBody&) override;
125 void remove (TrackBody&) override;
126 void rehook (TrackBody&) noexcept override;
127
128 /* ===== Internals ===== */
139 Rulers&
141 {
142 return rulers_;
143 }
144
145 };
146
147
148}}// namespace stage::timeline
149#endif /*STAGE_TIMELINE_TRACK_BODY_H*/
Interface to represent _"some presentation layout entity",_ with the ability to attach widgets (manag...
Definition view-hook.hpp:76
sigc::signal< void > SignalStructureChange
Helper to organise and draw the space allocated for a fork of sub-tracks.
std::vector< TrackBody * > SubTracks
DisplayManager::SignalStructureChange signalStructureChange_
void rehook(TrackBody &) noexcept override
std::vector< PRuler > Rulers
void accommodateContentHeight(uint contentExtension)
ensure content with the given extension can be accommodated within this track's content area
static Decoration decoration
storage for common style/padding settings
void setTrackName(cuString &)
uint establishTrackSpace(TrackProfile &)
recursively establish the screen space allocation for this structure of nested tracks.
uint calcHeight() const
recursively calculate the height in pixels to display this track, including all nested sub-tracks and...
uint calcRulerHeight() const
sum up the vertical extension required by all overview rulers.
std::unique_ptr< RulerTrack > PRuler
void hook(TrackBody &) override
void remove(TrackBody &) override
Description of the structure and arrangement of tracks for display in the UI.
Abstraction: service for the widgets to translate themselves into screen layout.
A set of basic GTK includes for the UI.
unsigned int uint
Definition integral.hpp:29
std::array< uint, 6 > Borders
Borders borders
width of up to 6 levels of combined upward slope borders (defined in CSS)
Configure additional vertical padding for the decorations added through CSS.
Lumiera GTK UI implementation root.
Definition guifacade.cpp:37
const uString cuString
Definition gtk-base.hpp:93
Timeline presentation helper to organise drawing of the overview rulers.
Allow widgets to connect to a common shared presentation context.