markers can appear at various scopes

need to add them at the respective levels into the structural model
This commit is contained in:
Fischlurch 2016-12-03 22:37:41 +01:00
parent 5d077ae5b4
commit c5eff7f4c5
10 changed files with 39 additions and 39 deletions

View file

@ -31,6 +31,7 @@
#include "gui/gtk-lumiera.hpp"
#include "gui/timeline/clip-presenter.hpp"
#include "gui/timeline/marker-widget.hpp"
//#include "gui/ui-bus.hpp"
//#include "lib/format-string.hpp"

View file

@ -67,7 +67,6 @@ namespace timeline {
using std::vector;
using std::unique_ptr;
using widget::LabelWidget;
class MarkerWidget;

View file

@ -1,5 +1,5 @@
/*
MarkerWidget - presentation control element for a track within the timeline
MarkerWidget - display of a marker in timeline or within clips
Copyright (C) Lumiera.org
2016, Hermann Vosseler <Ichthyostega@web.de>
@ -22,7 +22,7 @@
/** @file marker-widget.cpp
** Implementation details of track presentation management.
** Implementation of marker display.
**
** @todo WIP-WIP-WIP as of 12/2016
**
@ -31,7 +31,6 @@
#include "gui/gtk-lumiera.hpp"
#include "gui/timeline/marker-widget.hpp"
#include "gui/timeline/clip-presenter.hpp"
//#include "gui/ui-bus.hpp"
//#include "lib/format-string.hpp"
@ -62,9 +61,9 @@ namespace timeline {
MarkerWidget::MarkerWidget (ID identity, ctrl::BusTerm& nexus)
: Controller{identity, nexus}
: Widget{identity, nexus}
{
UNIMPLEMENTED ("how to attach the TrackPresenter into the two relevant GTK display contexts");
UNIMPLEMENTED ("how to attach the Marker, depending on the actual context");
}

View file

@ -1,5 +1,5 @@
/*
MARKER-WIDGET.hpp - presentation control element for a track within the timeline
MARKER-WIDGET.hpp - display of a marker in timeline or within clips
Copyright (C) Lumiera.org
2016, Hermann Vosseler <Ichthyostega@web.de>
@ -22,21 +22,12 @@
/** @file marker-widget.hpp
** Presentation control element to model and manage a track within the timeline UI.
** In the Lumiera timeline UI, we are mixing two different scope of concerns: For one,
** we have the globally tangible scope of actual session elements an operations performed
** on those. And then there are more local considerations regarding the "mechanics" of the
** UI elements, their state and immediate feedback to user interactions. The _Presenter_ --
** as known from the [MVP pattern](https://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93presenter) --
** serves as link between both levels. For the global angle of view, it is a model::Tangible and thus
** plays the role of the _View_, while the _Model_ and _Controler_ roles are mediated through the
** gui::UiBus, exchanging command, state and mutation messages. On the other hand, for the local
** angle of view, the _Presenter_ is a structural model element, kind of a _view model_, and corresponds
** to the respective element within the session. In addition, it manages actively the collaborative
** part of layout building, delegating to a mostly passive GTK widget for the actual display.
** This way it becomes possible to manage the actual UI resources on a global level, avoiding to
** represent potentially several thousand individual elements as GTK entities, while at any time
** only several can be visible and active as far as user interaction is concerned.
** Widget to show a marker at various places.
** Markers are attached by placement and serve as a reference point, for navigation,
** for special functions, but also to be referenced by other placements. The display
** of a marker is just a label, typically abridged. But the MarkerWidget itself
** participates in the structural model of the UI and thus is a model::Tangible and
** may receive messages over the UI-Bus.
**
** @todo WIP-WIP-WIP as of 12/2016
**
@ -47,36 +38,30 @@
#define GUI_TIMELINE_MARKER_WIDGET_H
#include "gui/gtk-base.hpp"
#include "gui/model/controller.hpp"
#include "gui/timeline/track-head-widget.hpp"
#include "gui/timeline/track-body.hpp"
#include "gui/model/widget.hpp"
//#include "lib/util.hpp"
//#include <memory>
#include <vector>
//#include <vector>
namespace gui {
namespace timeline {
using std::vector;
using std::unique_ptr;
class ClipPresenter;
/**
* @todo WIP-WIP as of 12/2016
*/
class MarkerWidget
: public model::Controller
: public model::Widget
{
public:
/**
* @param identity used to refer to a corresponding session::Fork in the Session
* @param identity used to refer to a corresponding marker entity in the Session
* @param nexus a way to connect this Controller to the UI-Bus.
*/
MarkerWidget (ID identity, ctrl::BusTerm& nexus);

View file

@ -41,6 +41,7 @@
#include "gui/gtk-lumiera.hpp"
#include "gui/timeline/timeline-controller.hpp"
#include "gui/timeline/track-presenter.hpp"
#include "gui/timeline/marker-widget.hpp"
//#include "gui/workspace/workspace-window.hpp"
//#include "gui/ui-bus.hpp"
@ -77,6 +78,7 @@ namespace timeline {
TimelineController::TimelineController (ID identity, ID trackID, ctrl::BusTerm& nexus)
: Controller{identity, nexus}
, markers_{}
, fork_{new TrackPresenter{trackID, nexus}}
{
UNIMPLEMENTED ("how to make the controller operative...");

View file

@ -59,14 +59,18 @@
#include "lib/time/timevalue.hpp"
#include <memory>
//#include <vector>
#include <vector>
namespace gui {
namespace timeline {
using std::vector;
using std::unique_ptr;
class TrackPresenter;
class MarkerWidget;
/**
@ -80,7 +84,8 @@ namespace timeline {
class TimelineController
: public model::Controller
{
std::unique_ptr<TrackPresenter> fork_;
vector<unique_ptr<MarkerWidget>> markers_;
std::unique_ptr<TrackPresenter> fork_;
public:
/**

View file

@ -32,6 +32,7 @@
#include "gui/gtk-lumiera.hpp"
#include "gui/timeline/track-presenter.hpp"
#include "gui/timeline/clip-presenter.hpp"
#include "gui/timeline/marker-widget.hpp"
//#include "gui/ui-bus.hpp"
//#include "lib/format-string.hpp"
@ -64,6 +65,7 @@ namespace timeline {
TrackPresenter::TrackPresenter (ID identity, ctrl::BusTerm& nexus)
: Controller{identity, nexus}
, subFork_{}
, markers_{}
, clips_{}
, head_{}
, body_{}

View file

@ -65,6 +65,7 @@ namespace timeline {
using std::unique_ptr;
class ClipPresenter;
class MarkerWidget;
/**
* @todo WIP-WIP as of 12/2016
@ -73,6 +74,7 @@ namespace timeline {
: public model::Controller
{
vector<unique_ptr<TrackPresenter>> subFork_;
vector<unique_ptr<MarkerWidget>> markers_;
vector<unique_ptr<ClipPresenter>> clips_;
TrackHeadWidget head_;

View file

@ -2810,7 +2810,7 @@ Now, when invoking an operation on some public interface, the code in the lower
<pre>A specially configured LumieraPlugin, which actually contains or loads the complete code of the (GTK)GUI, and additionally is linked dynamically against the application core lib. During the [[UI startup process|GuiStart]], loading of this Plugin is triggered from {{{main()}}}. Actually this causes spawning of the GTK event thread and execution of the GTK main loop.
</pre>
</div>
<div title="GuiTimelineView" creator="Ichthyostega" modifier="Ichthyostega" created="201410160100" modified="201612021831" tags="GuiPattern design decision draft" changecount="43">
<div title="GuiTimelineView" creator="Ichthyostega" modifier="Ichthyostega" created="201410160100" modified="201612032136" tags="GuiPattern design decision draft" changecount="47">
<pre>Within the Lumieara GUI, the [[Timeline]] structure(s) from the HighLevelModel are arranged and presented according to the following principles and conventions.
Several timeline views may be present at the same time -- and there is not necessarily a relation between them, since »a Timeline« is the top-level concept within the [[Session]]. Obviously, there can also be several //views// based on the same »Timeline« model element, and in this latter case, these //coupled views// behave according to a linked common state. An entity »Timeline« as represented through the GUI, emerges from the combination of several model elements
* a root level [[Binding|BindingMO]] acts as framework
@ -2838,10 +2838,7 @@ The workspace dimension (vertical layout) is more like a ''Fork'', which can be
* Clip-2 has an effect attached, Clip-3 is expanded and also has an effect attached
* the second track has a global effect attached; it shows up in the scope ruler
@@
This collapsed, expanded and possibly nested workspace structure is always exactly paralleled in the header pane.
This collapsed, expanded and possibly nested workspace structure is always exactly paralleled in the header pane. In addition, it allows to configure specific placement properties for each nested scope, which especially means to display faders and some toggles, depending on what kind of placement was added. Of course, this placement configuration needs to be collapsible too. Effects and markers can appear at various different scopes, sometimes requiring an abridged display
!!!lifecycle and instances

View file

@ -600,6 +600,14 @@
<node BACKGROUND_COLOR="#eee5c3" COLOR="#990000" CREATED="1480741524775" ID="ID_661893589" MODIFIED="1480741531814" TEXT="Bindings einrichten">
<icon BUILTIN="flag-yellow"/>
</node>
<node CREATED="1480800574418" ID="ID_791426893" MODIFIED="1480800602219" TEXT="Marker">
<icon BUILTIN="messagebox_warning"/>
<node CREATED="1480800603331" ID="ID_1846937607" MODIFIED="1480800603331" TEXT="treten in diversen Scopes auf"/>
<node CREATED="1480800643953" ID="ID_409762087" MODIFIED="1480800654307" TEXT="sogar global, auf dem TimeRuler">
<icon BUILTIN="idea"/>
</node>
<node CREATED="1480800605150" ID="ID_1156238228" MODIFIED="1480800608682" TEXT="sind stets optional"/>
</node>
</node>
</node>
<node CREATED="1480694550601" ID="ID_391329400" MODIFIED="1480694554372" TEXT="TimelineController">