UI-top-level: setup wiring of interacton control core components

This commit is contained in:
Fischlurch 2017-02-19 03:46:00 +01:00
parent 4784605771
commit 4f1def6366
11 changed files with 67 additions and 20 deletions

View file

@ -29,6 +29,7 @@
//#include "gui/gtk-lumiera.hpp"
#include "gui/ctrl/ui-state.hpp"
#include "gui/interact/focus-tracker.hpp"
//#include "gui/ctrl/global-ctx.hpp"
//#include "lib/util.hpp"
@ -39,6 +40,7 @@
namespace gui {
namespace ctrl {
using interact::FocusTracker;
// emit nested dtor code here...
@ -47,10 +49,11 @@ namespace ctrl {
/**
* Initialise the blah
* Initialise storage for global interface state
* @see ctrl::CoreService
*/
UiState::UiState()
UiState::UiState (FocusTracker& focusTracker)
: tracker_{focusTracker}
{ }

View file

@ -62,6 +62,7 @@
namespace gui {
namespace interact { class FocusTracker; }
namespace ctrl {
// using std::unique_ptr;
@ -82,9 +83,10 @@ namespace ctrl {
class UiState
: boost::noncopyable
{
interact::FocusTracker& tracker_;
public:
UiState();
UiState (interact::FocusTracker&);
~UiState();
private:

View file

@ -93,6 +93,9 @@ namespace gui {
* in the works, and it is clear by now that we won't use proxy objects,
* but rather a generic bus-like connection and symbolic IDs to designate
* the model elements
* @todo: and as of 2/2017 the new structure is basically set, but we need actually
* to implement a new timeline display in accordance to this reworked design.
* After this is done, most of the model elements in this packare are obsolete.
*/
namespace model {}
@ -105,15 +108,18 @@ namespace gui {
/** Docking panel classes. */
namespace panel {}
/** Lumiera custom widgets. */
namespace widget {}
/** The workspace window and it's helper classes. */
namespace workspace {}
/** The asset management, configuration and project settings. */
namespace setting {}
/** The timeline display and editing operations. */
namespace timeline {}
/** The global workspace with top-level windows. */
namespace workspace {}
/** Lumiera custom widgets. */
namespace widget {}
/** GUI helpers, utility functions and classes. */
namespace util {}

View file

@ -31,6 +31,7 @@
//#include "gui/gtk-lumiera.hpp"
#include "gui/interact/focus-tracker.hpp"
#include "gui/interact/navigator.hpp"
//#include "gui/ctrl/global-ctx.hpp"
//#include "lib/util.hpp"
@ -48,7 +49,8 @@ namespace interact {
{ }
FocusTracker::FocusTracker()
FocusTracker::FocusTracker (Navigator& navigator)
: navigator_{navigator}
{ }

View file

@ -68,6 +68,7 @@ namespace interact {
// using std::string;
// class GlobalCtx;
class Navigator;
@ -82,10 +83,11 @@ namespace interact {
class FocusTracker
: boost::noncopyable
{
Navigator& navigator_;
public:
FocusTracker();
~FocusTracker();
FocusTracker (Navigator&);
~FocusTracker ();
private:

View file

@ -27,10 +27,16 @@
#include "gui/gtk-base.hpp"
#include "gui/ctrl/global-ctx.hpp"
#include "gui/interact/interaction-director.hpp"
#include "gui/ui-bus.hpp"
#include "gui/ctrl/bus-term.hpp"
#include "gui/ctrl/global-ctx.hpp"
#include "gui/interact/interaction-director.hpp"
#include "gui/interact/spot-locator.hpp"
#include "gui/interact/navigator.hpp"
#include "gui/interact/focus-tracker.hpp"
#include "gui/ctrl/ui-state.hpp"
#include "gui/setting/asset-controller.hpp"
#include "gui/timeline/timeline-controller.hpp"
#include "proc/mobject/session/root.hpp"
#include "lib/diff/tree-mutator.hpp"
//#include "gui/ui-bus.hpp"
@ -48,18 +54,31 @@ using lib::diff::TreeMutator;
namespace gui {
namespace interact {
namespace session = proc::mobject::session;
using ctrl::GlobalCtx;
using ctrl::UiState;
using setting::AssetController;
using timeline::TimelineController;
// emit VTables here...
// emit dtors of children here...
InteractionDirector::~InteractionDirector()
{ }
InteractionDirector::InteractionDirector (GlobalCtx& globals)
: model::Controller(proc::mobject::session::Root::getID(), globals.uiBus_.getAccessPoint())
: model::Controller(session::Root::getID(), globals.uiBus_.getAccessPoint())
, globalCtx_(globals)
{ }
, spotLocator_{new SpotLocator}
, navigator_{new Navigator{*spotLocator_}}
, tracker_{new FocusTracker{*navigator_}}
, uiState_{new UiState{*tracker_}}
, assets_{new AssetController{session::Root::getAssetID(), this->uiBus_}}
, timelines_{}
{
}
void

View file

@ -74,7 +74,7 @@ namespace ctrl {
namespace setting {
class AssetController;
}
namespace timleine {
namespace timeline {
class TimelineController;
}
namespace interact {

View file

@ -30,6 +30,7 @@
//#include "gui/gtk-lumiera.hpp"
#include "gui/interact/navigator.hpp"
#include "gui/interact/spot-locator.hpp"
//#include "gui/ctrl/global-ctx.hpp"
//#include "lib/util.hpp"
@ -47,7 +48,8 @@ namespace interact {
{ }
Navigator::Navigator()
Navigator::Navigator (SpotLocator& spotLocator)
: spotLocator_{spotLocator}
{ }

View file

@ -52,6 +52,7 @@ namespace interact {
// using std::string;
// class GlobalCtx;
class SpotLocator;
@ -63,10 +64,11 @@ namespace interact {
class Navigator
: boost::noncopyable
{
SpotLocator& spotLocator_;
public:
Navigator();
~Navigator();
Navigator (SpotLocator&);
~Navigator ();
private:

View file

@ -54,6 +54,13 @@ namespace session {
}
lib::idi::EntryID<Root>
Root::getAssetID()
{
return EntryID<Root>("assets");
}
/** @todo validity self-check of the model root
* should do substantial checks; the idea is
* to perform a complete sanity check by delegating

View file

@ -72,6 +72,8 @@ namespace session {
Root (lumiera::query::DefsManager&);
static lib::idi::EntryID<Root> getID();
static lib::idi::EntryID<Root> getAssetID();
DEFINE_PROCESSABLE_BY (builder::BuilderTool);