diff --git a/src/stage/lumiera-light-theme-complement.css b/src/stage/lumiera-light-theme-complement.css
index 1539e5609..06010cc4c 100644
--- a/src/stage/lumiera-light-theme-complement.css
+++ b/src/stage/lumiera-light-theme-complement.css
@@ -31,3 +31,16 @@
.indication_flash text {
border: 4px solid red;
}
+
+/* profile structure of the track fork...
+ * within the timeline body display (right side)
+ *
+ * margin is used for padding above / below
+ * border is used to paint the slopes to nested scopes
+ * background is used within the track scopes
+ */
+ .timeline-page > .timeline-body fork.timeline {
+ margin: 2ex 0;
+ border: 5px inset;
+ background-color: lime;
+}
diff --git a/src/stage/timeline/body-canvas-widget.cpp b/src/stage/timeline/body-canvas-widget.cpp
index 96b24164b..95e0cb34a 100644
--- a/src/stage/timeline/body-canvas-widget.cpp
+++ b/src/stage/timeline/body-canvas-widget.cpp
@@ -83,14 +83,28 @@ namespace timeline {
StyleC style_;
PixSpan visible_;
+ /** the current "water level".
+ * To be updated while drawing top-down */
+ int line_ = 0;
+
/** paint the top of the track body area
* @param f number of consecutive track elements
- * to keep pinned (always visible) at top */
+ * to keep pinned (always visible) at top
+ * @todo argument doesn't belong here
+ */
void
- prelude (uint f) override
+ prelude (uint) override
{
- UNIMPLEMENTED ("draw timeline top");
+ int topMargin = style_->get_margin().get_top();
+ style_->render_background (cox_
+ ,visible_.b // left start of the rectangle
+ ,line_ // top of the rectangle
+ ,visible_.delta() // width of the area
+ ,topMargin // height to fill
+ );
+ line_ += topMargin;
+ line_ += 5; //////////////////////////////////////////////////////////////////TODO: visual debugging
}
/** finish painting the track body area
@@ -98,7 +112,14 @@ namespace timeline {
void
coda (uint pad) override
{
- UNIMPLEMENTED ("draw bottom");
+ int bottomPad = pad + style_->get_margin().get_bottom();
+ style_->render_background (cox_
+ ,visible_.b // left start of the rectangle
+ ,line_ // top of the rectangle
+ ,visible_.delta() // width of the area
+ ,bottomPad // height to fill
+ );
+ line_ += bottomPad;
}
/** draw grounding of an overview/ruler track
@@ -121,7 +142,14 @@ namespace timeline {
void
content (uint h) override
{
- UNIMPLEMENTED ("paint background of content area");
+ style_->render_background (cox_
+ ,visible_.b // left start of the rectangle
+ ,line_ // top of the rectangle
+ ,visible_.delta() // width of the area
+ ,h // height to fill
+ );
+ line_ += h;
+ line_ += 8; //////////////////////////////////////////////////////////////////TODO: visual debugging
}
/** paint opening slope to enter nested sub tracks
@@ -155,16 +183,22 @@ namespace timeline {
: public ProfileInterpreter
{
CairoC cox_;
+ StyleC style_;
PixSpan visible_;
+ int line_ = 0;
+
/** overlays to show at top of the track body area
* @param f number of consecutive track elements
- * to keep pinned (always visible) at top */
+ * to keep pinned (always visible) at top
+ * @todo argument doesn't belong here
+ */
void
- prelude (uint f) override
+ prelude (uint) override
{
- UNIMPLEMENTED ("overlays for timeline top");
+ /* nothing to paint */
+ line_ += style_->get_margin().get_top();
}
/** finish painting overlays a the bottom of the track body area
@@ -172,7 +206,8 @@ namespace timeline {
void
coda (uint pad) override
{
- UNIMPLEMENTED ("overlays for bottom");
+ /* nothing to paint */
+ line_ += pad + style_->get_margin().get_bottom();
}
/** draw overlays on top of overview/ruler track
@@ -196,7 +231,8 @@ namespace timeline {
void
content (uint h) override
{
- UNIMPLEMENTED ("overlays for content area");
+ /* nothing to paint */
+ line_ += h;
}
/** render overlays covering the opening slope towards nested tracks */
@@ -217,6 +253,7 @@ namespace timeline {
public:
TrackOverlayRenderer (CairoC currentDrawContext, DisplayManager& layout)
: cox_{currentDrawContext}
+ , style_{trackBodyStyle.getAdvice()}
, visible_{layout.getPixSpan()}
{ }
};
diff --git a/src/stage/timeline/display-manager.hpp b/src/stage/timeline/display-manager.hpp
index b33c77d12..f61e959ac 100644
--- a/src/stage/timeline/display-manager.hpp
+++ b/src/stage/timeline/display-manager.hpp
@@ -91,6 +91,12 @@ namespace timeline {
{
return e <= b;
}
+
+ int
+ delta() const
+ {
+ return e - b;
+ }
};
/**
diff --git a/src/stage/timeline/track-profile.hpp b/src/stage/timeline/track-profile.hpp
index f2baea533..2115c58e6 100644
--- a/src/stage/timeline/track-profile.hpp
+++ b/src/stage/timeline/track-profile.hpp
@@ -68,7 +68,7 @@ namespace timeline {
virtual void content(uint h) =0; ///< represent a content area with the given vertical extension
virtual void open() =0; ///< indicate entering a nested structure, typically as 3D inset
virtual void close(uint n) =0; ///< indicate the end of `n` nested structures, typically by ascending back `n` levels
- virtual void prelude(uint f) =0; ///< start track presentation at top of the timeline, with `f` pinned (always visible) elements
+ virtual void prelude(uint f) =0; ///< start track presentation at top of the timeline, with `f` pinned (always visible) elements @todo argument doesn't belong here
virtual void coda(uint pad) =0; ///< the closing part of the timeline at the bottom of the track display, with `pad` additional padding
static const size_t MAX_ARG_SIZE = sizeof(size_t);
@@ -82,6 +82,7 @@ namespace timeline {
* To decouple the drawing code -- thus allowing for later customisations --
* we let the individual TrackBody elements just emit these structure description.
* @todo WIP-WIP as of 4/2019
+ * @todo the number of pinned elements should be a member field, instead of sneaking it into the prelude element...
*/
struct TrackProfile
{
diff --git a/src/steam/mobject/session/dummy-session-connection.cpp b/src/steam/mobject/session/dummy-session-connection.cpp
index 1b47fc950..9b91dad6b 100644
--- a/src/steam/mobject/session/dummy-session-connection.cpp
+++ b/src/steam/mobject/session/dummy-session-connection.cpp
@@ -31,7 +31,7 @@
**
** @todo WIP as of 10/2018 ///////////////////////TICKET #1042
**
- ** @see DummySessionConnection_test
+ ** @see [corresponding UI](\ref stage::dialog::TestControl)
**
*/
@@ -109,10 +109,9 @@ namespace session {
DummySessionConnection::fabricateSeq1 (string baseID)
{
const RandID forkRootID{stage::ATTR_fork};
- const GenNode timeline = emptyTimeline (baseID, forkRootID)
- , rootTrackName = GenNode{string{stage::ATTR_name}, "Track-"+baseID}
- , forkRoot = MakeRec().genNode(forkRootID)
- ;
+ const GenNode timeline = emptyTimeline (baseID, forkRootID);
+ const GenNode rootTrackName = GenNode{string{stage::ATTR_name}, "Track-"+baseID};
+ const GenNode forkRoot = MakeRec().genNode(forkRootID);
return MutationMessage{ ins (timeline)
, mut (timeline)
diff --git a/src/steam/mobject/session/dummy-session-connection.hpp b/src/steam/mobject/session/dummy-session-connection.hpp
index 18dce8545..8bd0c757d 100644
--- a/src/steam/mobject/session/dummy-session-connection.hpp
+++ b/src/steam/mobject/session/dummy-session-connection.hpp
@@ -83,7 +83,6 @@ namespace session {
* Stage-Layer and Steam-Layer, so the software gains some tangible functionality...
* @note readily-available singleton to enact prototypical behaviour as appropriate.
*
- * @see DummySessionConnection_test
* @see stage::interact::InteractionDirector::buildMutator
* @see stage::interact::InteractionDirector::injectTimeline
* @see stage::timeline::TimelineController
diff --git a/tests/43session.tests b/tests/43session.tests
index a8885dc2b..9713a2cc3 100644
--- a/tests/43session.tests
+++ b/tests/43session.tests
@@ -33,11 +33,6 @@ return: 0
END
-PLANNED "Scaffolding to develop the UI-Session connection" DummySessionConnection_test <