diff --git a/src/stage/timeline/ruler-track.cpp b/src/stage/timeline/ruler-track.cpp new file mode 100644 index 000000000..b529ff44f --- /dev/null +++ b/src/stage/timeline/ruler-track.cpp @@ -0,0 +1,101 @@ +/* + RulerTrack - track body area to show overview and timecode and markers + + Copyright (C) Lumiera.org + 2018, Hermann Vosseler + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License as + published by the Free Software Foundation; either version 2 of + the License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + +* *****************************************************/ + + +/** @file ruler-track.cpp + ** Implementation details regarding custom drawing of timeline and + ** frame count ticks at the top of the TimelineCanvas. + ** + ** @todo WIP-WIP-WIP as of 12/2016 + ** + */ + + +#include "stage/gtk-base.hpp" +#include "stage/timeline/ruler-track.hpp" + +//#include "stage/ui-bus.hpp" +//#include "lib/format-string.hpp" +//#include "lib/format-cout.hpp" + +//#include "lib/util.hpp" + +//#include +//#include + + + +//using util::_Fmt; +//using util::contains; +//using Gtk::Widget; +//using sigc::mem_fun; +//using sigc::ptr_fun; +//using std::cout; +//using std::endl; + + +namespace stage { +namespace timeline { + + namespace { + uint TIMERULER_SCALE_HEIGHT_px = 20; + uint TIMERULER_LARGE_TICK_WEIGHT_px = 2; + uint TIMERULER_SMALL_TICK_WEIGHT_px = 2; + } + + + + + RulerTrack::RulerTrack() + : scales_{} + { } + + + RulerTrack::~RulerTrack() + { + TODO ("detach from parent; store a functor or backreference"); + } + + + void + RulerTrack::setTrackName (cuString& trackName) + { + TODO ("is the track name of any relevance for the TrackBody widget?"); + } + + + /** + * recursively calculate the height in pixels to display this track, + * including all nested sub-tracks + */ + uint + RulerTrack::calcHeight() + { + uint heightSum = overviewHeight_ + contentHeight_; + for (TrackBody* subTrack : subTracks_) + heightSum += subTrack->calcHeight(); + return heightSum; + } + + + +}}// namespace stage::timeline diff --git a/src/stage/timeline/ruler-track.hpp b/src/stage/timeline/ruler-track.hpp new file mode 100644 index 000000000..17c559511 --- /dev/null +++ b/src/stage/timeline/ruler-track.hpp @@ -0,0 +1,100 @@ +/* + RULER-TRACK.hpp - track body area to show overview and timecode and markers + + Copyright (C) Lumiera.org + 2018, Hermann Vosseler + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License as + published by the Free Software Foundation; either version 2 of + the License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + +*/ + + +/** @file ruler-track.hpp + ** Timeline presentation helper to organise drawing of the time overview ruler. + ** The scrollable body part of the timeline display relies on custom drawing onto + ** a ["widget canvas"](\ref TimelineCanvas) for the nested track content; above + ** this area we build a horizontal ruler to show the timecode and frame count + ** references plus any markers, ranges and locators. Since these need to be + ** aligned precisely with the content, we employ custom drawing for this + ** part as well. The TimelineRuler helper -- like any parts of the coordinated + ** TimelineLayout, are referred to from and used by the BodyCanvasWidget for + ** offloading specific parts of the drawing routines. + ** Actually, this space is just a working area and created by custom + ** drawing on the [timeline canvas](\ref timeline::BodyCanvasWidget); + ** yet for coordination of a globally consistent timeline layout, each + ** track display is coordinated by a TrackPresenter, which corresponds + ** to a session::Fork and directly controls the respective display elements + ** in the [header pane](\ref timeline::HeaderPaneWidget) and the display of the + ** timeline body, which is actually a canvas for custom drawing. + ** + ** @todo WIP-WIP-WIP as of 12/2018 + ** + */ + + +#ifndef STAGE_TIMELINE_RULER_TRACK_H +#define STAGE_TIMELINE_RULER_TRACK_H + +#include "stage/gtk-base.hpp" + +//#include "lib/util.hpp" + +//#include +#include + + + +namespace stage { +namespace timeline { + + struct RulerScale + { + + }; + + + /** + * Helper to organise and draw the time overview ruler at the top of the + * timeline BodyCanvasWidget. Support custom drawing onto the TimelineCanvas + * to show the timecode or frame count ticks plus any markers, ranges and locators... + * TrackBody units work together with the TimelineCanvas, which arranges all + * elements placed into the tracks and performs custom drawing to mark the + * working space available for placing those elements (Clips, Effects, Markers). + * A given TrackBody works with coordinates relative to its vertical starting point; + * coordinates on the TimelineCanvas operate from top downwards. The fundamental + * task of a TrackBody is to find out about its own overall height, including the + * overall height required by all its nested children. Moreover, the height of + * the content area needs to be negotiated with the actual content elements. + * @todo WIP-WIP as of 10/2018 + */ + class RulerTrack + { + using Scales = std::vector; + + Scales scales_; + + public: + RulerTrack(); + ~RulerTrack(); + + uint calcHeight(); + + private:/* ===== Internals ===== */ + + }; + + +}}// namespace stage::timeline +#endif /*STAGE_TIMELINE_RULER_TRACK_H*/ diff --git a/src/stage/timeline/track-body.cpp b/src/stage/timeline/track-body.cpp index e2241240b..7774ecd92 100644 --- a/src/stage/timeline/track-body.cpp +++ b/src/stage/timeline/track-body.cpp @@ -35,7 +35,6 @@ //#include "stage/ui-bus.hpp" //#include "lib/format-string.hpp" -//#include "lib/format-cout.hpp" //#include "lib/util.hpp" diff --git a/src/stage/timeline/track-body.hpp b/src/stage/timeline/track-body.hpp index 1bb2bddad..cade5a7b9 100644 --- a/src/stage/timeline/track-body.hpp +++ b/src/stage/timeline/track-body.hpp @@ -41,7 +41,6 @@ #define STAGE_TIMELINE_TRACK_BODY_H #include "stage/gtk-base.hpp" -#include "stage/ctrl/bus-term.hpp" //#include "lib/util.hpp" @@ -53,8 +52,6 @@ namespace stage { namespace timeline { - using ID = ctrl::BusTerm::ID; - /** * Helper to organise and draw the space allocated for a fork of sub-tracks. diff --git a/wiki/thinkPad.ichthyo.mm b/wiki/thinkPad.ichthyo.mm index 0ca780a1c..407aa9bad 100644 --- a/wiki/thinkPad.ichthyo.mm +++ b/wiki/thinkPad.ichthyo.mm @@ -134,8 +134,7 @@ - - + @@ -160,8 +159,7 @@ Ganz anders Model::Tangible: dieses registriert sich bei der Konstruktion

- - +
@@ -177,8 +175,7 @@ aber so herum macht es mehr Sinn

- - +
@@ -231,8 +228,7 @@ BusTerm, das damit Nachrichten an den Nexus schicken kann.

- - + @@ -272,8 +268,7 @@ Wartet nur noch auf proof-of-concept (DemoGuiRoundtrip)

- - + @@ -288,8 +283,7 @@ aber nur via einfacher "uplink"-Verbindung

- -
+
@@ -392,8 +386,7 @@ Term-Signal nicht ausgesendet würde.

- - +
@@ -427,8 +420,8 @@ - + @@ -485,8 +478,7 @@ Anmerkung: ein "frestehendes" BusTerm ist valide und zugelassen, es hat halt nur eine uplink-Connection.

- - +
@@ -501,8 +493,7 @@ es muß dazu auch jede Menge Methoden implementieren.

- -
+
@@ -631,8 +622,7 @@ Ein zu früher bzw. zu später Aufruf "fällt einfach hinten runter"

- - +
@@ -701,8 +691,7 @@ dann kann der Shutdown-Prozeß den Start des GUI überholen.

- - + @@ -3947,8 +3936,7 @@ indem wir ein GTK-Signal erzeugen, das das Hauptfenster schließt

- - + @@ -19292,8 +19280,8 @@ - - + + @@ -19380,8 +19368,57 @@ - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -19586,8 +19623,7 @@ ERR: nexus.hpp:189: worker_3: ~Nexus: Some UI components are still connected to the backbone.

- - +
@@ -20273,8 +20309,7 @@ emergency-Shutdown initiieren

- - +
@@ -21309,8 +21344,7 @@ where 1 tick unit depends on the current zoom level

- - +
@@ -21360,8 +21394,7 @@ Theoretisch könnte eine Skala auf einer Seite oder auf beiden Seiten limitiert sein....?

- - + @@ -21478,7 +21511,8 @@ - + + @@ -21706,6 +21740,9 @@ + + + @@ -21729,6 +21766,13 @@ + + + + + + + @@ -31527,7 +31571,7 @@ - + @@ -31540,6 +31584,28 @@ + + + + + + + + + + + + + + + + + + + + + + @@ -36667,8 +36733,7 @@ - - + @@ -36686,8 +36751,7 @@ bisher "GUI"

- - +
@@ -36706,8 +36770,7 @@ bisher "Proc-Layer"

- - +
@@ -36726,8 +36789,7 @@ bisher "Backend"

- - +
@@ -36753,8 +36815,9 @@ - + + @@ -36799,6 +36862,9 @@ + + + @@ -40940,8 +41006,7 @@ - - + @@ -43652,8 +43717,7 @@ env.GuiResource(f) for f in env.Glob('stage/*.css')

- - +
@@ -43670,8 +43734,7 @@ wenn ich doch mal noch komplexere Bäume transportieren muß

- - +
@@ -43683,8 +43746,7 @@ ich mag code-nahe Resourcen lieber beim Code selber

- -
+
@@ -43714,8 +43776,7 @@ - - +
@@ -43735,8 +43796,7 @@ Dann

- - +
@@ -43754,8 +43814,7 @@ nämlich im src/SConscript, wenn es um das GUI geht

- - +
@@ -43768,8 +43827,7 @@ und sie war ohnehin schon so geschrieben worden, daß das Endresultat irgendwie paßt

- - +
@@ -44489,8 +44547,7 @@ verwenden globale Variable oder überhaupt keine Objektfelder

- - +
@@ -44563,8 +44620,7 @@ und dann auf den Deaktiviert-Zustand wartet

- - +
@@ -44585,8 +44641,7 @@ nachdem einmal ein wait mit Timeout verwendet worden war

- - +
@@ -44600,8 +44655,7 @@ aber inChange bleibt true

- - +
@@ -44640,8 +44694,7 @@ obwohl noch der Builder läuft

- - +