Clip: draft state-switching operation
This commit is contained in:
parent
4015a98d23
commit
31116fb079
4 changed files with 75 additions and 10 deletions
|
|
@ -67,7 +67,8 @@ namespace timeline {
|
|||
ClipDelegate::~ClipDelegate() { }
|
||||
|
||||
|
||||
ClipDelegate::ClipDelegate ()
|
||||
ClipDelegate::ClipDelegate(WidgetViewHook& displayAnchor)
|
||||
: display_{&displayAnchor}
|
||||
{
|
||||
}
|
||||
|
||||
|
|
@ -82,11 +83,23 @@ namespace timeline {
|
|||
/* === Interface ClipDelegate === */
|
||||
|
||||
public:
|
||||
ClipWidget() { }
|
||||
ClipWidget(WidgetViewHook& displayAnchor)
|
||||
: ClipDelegate{displayAnchor}
|
||||
{ }
|
||||
};
|
||||
|
||||
}//(End)clip appearance details.
|
||||
|
||||
|
||||
|
||||
/* === Appearance Style state transitions === */
|
||||
|
||||
ClipDelegate::Appearance
|
||||
ClipDelegate::switchAppearance (PDelegate& manager, Appearance desired, WidgetViewHook* newView)
|
||||
{
|
||||
UNIMPLEMENTED ("clip appearance style state management");
|
||||
}
|
||||
|
||||
|
||||
|
||||
}}// namespace stage::timeline
|
||||
|
|
|
|||
|
|
@ -102,10 +102,11 @@
|
|||
#define STAGE_TIMELINE_CLIP_WIDGET_H
|
||||
|
||||
#include "stage/gtk-base.hpp"
|
||||
#include "stage/model/view-hook.hpp"
|
||||
|
||||
//#include "lib/util.hpp"
|
||||
|
||||
//#include <memory>
|
||||
#include <memory>
|
||||
//#include <vector>
|
||||
|
||||
|
||||
|
|
@ -113,19 +114,53 @@
|
|||
namespace stage {
|
||||
namespace timeline {
|
||||
|
||||
using WidgetViewHook = model::ViewHook<Gtk::Widget>;
|
||||
|
||||
class ClipDelegate;
|
||||
using PDelegate = std::unique_ptr<ClipDelegate>;
|
||||
|
||||
|
||||
/**
|
||||
* @todo WIP-WIP as of 3/2020
|
||||
*/
|
||||
class ClipDelegate
|
||||
{
|
||||
public:
|
||||
enum Appearance {PENDING, ABRIDGED, COMPACT, EXPANDED, DEGRADED};
|
||||
WidgetViewHook* display_;
|
||||
|
||||
public:
|
||||
virtual ~ClipDelegate(); ///< this is an interface
|
||||
|
||||
ClipDelegate();
|
||||
|
||||
|
||||
enum Appearance {PENDING, SYMBOLIC, ABRIDGED, COMPACT, EXPANDED, DEGRADED};
|
||||
|
||||
|
||||
ClipDelegate(WidgetViewHook& displayAnchor);
|
||||
|
||||
/** request to change the clip delegate's appearance style, if possible.
|
||||
* @param manager entity to hold and maintain this specific appearance state.
|
||||
* @param desired the intended style of mode to achieve
|
||||
* @param displayAnchor (optionally) a different view to hook up the delegate.
|
||||
* @return the actual mode the presentation was switched to
|
||||
* @remark switching the appearance style is a state transition; sometimes
|
||||
* this change also implies switching the actual implementation of
|
||||
* the delegate. And thus there can be prerequisites for achieving
|
||||
* a specific appearance and presentation mode. Most notably, to
|
||||
* reach any style beyond `SYMBOLIC`, we need to know the temporal
|
||||
* extension of the clip. If such requirements can not be fulfilled,
|
||||
* presentation stays or drops to the most elaborate state possible
|
||||
* with the current configuration.
|
||||
* @note Default and fallback appearance style is `PENDING`, which turns the
|
||||
* delegate into a mere data record without visual representation.
|
||||
* @note whenever a ViewHook (instance) different than the existing one is
|
||||
* given, the existing widget / delegate will be destroyed and
|
||||
* replaced by a suitable copy hooked up into the new display.
|
||||
* The ctor #ClipDelegate(WidgetViewHook) ensures there is
|
||||
* always a display_ (ViewHook) to refer to.
|
||||
*/
|
||||
static Appearance switchAppearance (PDelegate& manager,
|
||||
Appearance desired =PENDING,
|
||||
WidgetViewHook* newView =nullptr);
|
||||
|
||||
private:/* ===== Internals ===== */
|
||||
|
||||
};
|
||||
|
|
|
|||
|
|
@ -84,6 +84,7 @@
|
|||
|
||||
#include "stage/gtk-base.hpp"
|
||||
#include "include/ui-protocol.hpp"
|
||||
#include "stage/model/view-hook.hpp"
|
||||
#include "stage/model/controller.hpp"
|
||||
#include "stage/timeline/display-evaluation.hpp"
|
||||
#include "stage/timeline/marker-widget.hpp"
|
||||
|
|
|
|||
|
|
@ -27762,10 +27762,12 @@
|
|||
</body>
|
||||
</html></richcontent>
|
||||
</node>
|
||||
<node CREATED="1583679368212" ID="ID_1574493569" MODIFIED="1584201569001" TEXT="Einhänge-Mechanismus">
|
||||
<node BACKGROUND_COLOR="#eee5c3" COLOR="#990000" CREATED="1583679368212" ID="ID_1574493569" MODIFIED="1584289385953" TEXT="Einhänge-Mechanismus">
|
||||
<arrowlink COLOR="#4668c0" DESTINATION="ID_1121301646" ENDARROW="Default" ENDINCLINATION="-360;299;" ID="Arrow_ID_1147127867" STARTARROW="None" STARTINCLINATION="466;56;"/>
|
||||
<arrowlink COLOR="#8395a4" DESTINATION="ID_178738138" ENDARROW="Default" ENDINCLINATION="-297;15;" ID="Arrow_ID_1606292545" STARTARROW="None" STARTINCLINATION="269;32;"/>
|
||||
<node CREATED="1584201581597" HGAP="61" ID="ID_1793842194" MODIFIED="1584201599382" TEXT="muß direkt beim Ctor-Aufruf passieren" VSHIFT="19">
|
||||
<icon BUILTIN="pencil"/>
|
||||
<node CREATED="1584201581597" HGAP="61" ID="ID_1793842194" MODIFIED="1584289376633" TEXT="muß direkt beim Ctor-Aufruf passieren" VSHIFT="19">
|
||||
<icon BUILTIN="button_cancel"/>
|
||||
<node CREATED="1584201621519" ID="ID_1861895495" MODIFIED="1584201634905" TEXT="und zwar des demjenigen des tatsächlichen Widget">
|
||||
<node CREATED="1584201671057" ID="ID_1545904786" MODIFIED="1584201682507" TEXT="der aber mit dem des Presenters zusammenfällt..."/>
|
||||
<node CREATED="1584201683192" ID="ID_1482356055" MODIFIED="1584201718557" TEXT="weil man keine aufgedoppelte Referenz auf den ViewHook möchte">
|
||||
|
|
@ -27806,6 +27808,11 @@
|
|||
</html>
|
||||
</richcontent>
|
||||
<icon BUILTIN="messagebox_warning"/>
|
||||
<icon BUILTIN="stop-sign"/>
|
||||
<node CREATED="1584289349339" ID="ID_1202416542" MODIFIED="1584289360503" TEXT="also eben doch nicht gleich beim ctor-Aufruf"/>
|
||||
<node BACKGROUND_COLOR="#eee5c3" COLOR="#990000" CREATED="1584289361215" ID="ID_1687516658" MODIFIED="1584289369023" TEXT="brauche stattdessen einen Diff-Listener">
|
||||
<icon BUILTIN="flag-yellow"/>
|
||||
</node>
|
||||
</node>
|
||||
<node CREATED="1584201751260" ID="ID_1492285349" MODIFIED="1584201760641" TEXT="Problem: initiale Koordinaten">
|
||||
<node CREATED="1584201782842" ID="ID_560620961" MODIFIED="1584201793508" TEXT="sind nicht (zwingend) im Populations-Diff"/>
|
||||
|
|
@ -27857,9 +27864,18 @@
|
|||
<node BACKGROUND_COLOR="#ccb59b" COLOR="#6e2a38" CREATED="1584203074908" HGAP="34" ID="ID_366939108" MODIFIED="1584203089228" TEXT="das führt zu einem State-Pattern" VSHIFT="6">
|
||||
<font ITALIC="true" NAME="SansSerif" SIZE="14"/>
|
||||
<icon BUILTIN="yes"/>
|
||||
<node CREATED="1584203093953" ID="ID_1630684905" MODIFIED="1584203110139" TEXT="das jeweilge Slave-Widgtet repräasntiert auch den Anzeigestil"/>
|
||||
<node CREATED="1584203093953" ID="ID_1630684905" MODIFIED="1584289430184" TEXT="das jeweilge Slave-Widgtet repräsentiert auch den Anzeigestil"/>
|
||||
<node CREATED="1584203184258" ID="ID_465578643" MODIFIED="1584203194792" TEXT="es gibt einen Placeholder für den Fall "unsichtbar""/>
|
||||
<node CREATED="1584203854907" ID="ID_796620475" MODIFIED="1584203870238" TEXT="PImpl + ClipDelegate-Interface"/>
|
||||
<node BACKGROUND_COLOR="#eee5c3" COLOR="#990000" CREATED="1584289439497" ID="ID_1171233423" MODIFIED="1584289445670" TEXT="Zustandswahl">
|
||||
<icon BUILTIN="flag-yellow"/>
|
||||
<node BACKGROUND_COLOR="#eee5c3" COLOR="#990000" CREATED="1584289446828" ID="ID_1852467427" MODIFIED="1584289455699" TEXT="Initial-Zustand errichten">
|
||||
<icon BUILTIN="flag-yellow"/>
|
||||
</node>
|
||||
<node BACKGROUND_COLOR="#eee5c3" COLOR="#990000" CREATED="1584289456539" ID="ID_375798695" MODIFIED="1584289466378" TEXT="Zustands-Wechsel implementieren">
|
||||
<icon BUILTIN="pencil"/>
|
||||
</node>
|
||||
</node>
|
||||
</node>
|
||||
</node>
|
||||
</node>
|
||||
|
|
|
|||
Loading…
Reference in a new issue