Lumiera 0.pre.04
»edit your freedom«
Loading...
Searching...
No Matches
track-head-widget.hpp
Go to the documentation of this file.
1/*
2 TRACK-HEAD-WIDGET.hpp - display of track heads within the timeline
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
37#ifndef STAGE_TIMELINE_TRACK_HEAD_WIDGET_H
38#define STAGE_TIMELINE_TRACK_HEAD_WIDGET_H
39
40#include "stage/gtk-base.hpp"
45
46
47
48
49namespace stage {
50namespace timeline {
51
53
55 : public Gtk::Grid
56 {
57 Gtk::Label ctrlTODO_;
58
59 public:
62 };
63
72 : public Gtk::Grid
73 , public model::ViewHook<TrackHeadWidget>
74 {
77 Gtk::Box padding_;
79
81
82 /* ==== Interface: ViewHook ===== */
83
84 void hook (TrackHeadWidget&) override;
85 void remove (TrackHeadWidget&) override;
86 void rehook (TrackHeadWidget&) noexcept override;
87
88 public:
91
92 void setTrackName (cuString&);
93
94 uint getContentHeight() const;
95 uint getOverallHeight() const;
96
100
101 private:/* ===== Internals ===== */
102
104 void attachSubFork (TrackHeadWidget& subForkHead);
105 void detachSubFork (TrackHeadWidget& subForkHead);
106
108 void clearFork();
109
111
113 uint getHeightAt (int left, int top) const;
114 void enforceHeightAt(int left, int top, uint height);
115
116 uint getExpansionHeight() const { return getHeightAt (0,1); };
117 uint getSyncPadHeight() const { return getHeightAt (1,2); };
118 uint getLabelHeight() const { return getHeightAt (0,0); };
119
123 };
124
125
128 inline uint
130 {
131 return getHeightAt (1,1);
132 }
133
134
135}}// namespace stage::timeline
136#endif /*STAGE_TIMELINE_TRACK_HEAD_WIDGET_H*/
Attachment point to the UI-Bus.
EntryID const & ID
Definition bus-term.hpp:107
Interface to represent _"some presentation layout entity",_ with the ability to attach widgets (manag...
Definition view-hook.hpp:76
Helper widget to handle display of the structure of track nesting in the timeline header pane.
Header pane control area corresponding to a Track with nested child Tracks.
void detachSubFork(TrackHeadWidget &subForkHead)
void remove(TrackHeadWidget &) override
void linkSubTrackPositions(uint)
Coordinate the exact positions of sub-Track start during DisplayEvaluaton.
uint getHeightAt(int left, int top) const
get the height allocated at cell(x,y)
void syncSubtrackStartHeight(uint)
The first part of each track's display relates to the direct content; below that area,...
widget::ElementBoxWidget trackName_
void attachSubFork(TrackHeadWidget &subForkHead)
Integrate the control area for a nested sub track fork.
void enforceHeightAt(int left, int top, uint height)
void rehook(TrackHeadWidget &) noexcept override
void hook(TrackHeadWidget &) override
void clearFork()
Discard all nested sub track display widgets.
A basic building block of the Lumiera UI.
Widget to render an ID label with associated icon.
A set of basic GTK includes for the UI.
unsigned int uint
Definition integral.hpp:29
ctrl::BusTerm::ID ID
Lumiera GTK UI implementation root.
Definition guifacade.cpp:37
const uString cuString
Definition gtk-base.hpp:93
Widget to group tracks visually in the Timeline presentation.
Allow widgets to connect to a common shared presentation context.