2017-02-10 23:10:17 +01:00
|
|
|
/*
|
|
|
|
|
interactionDirector - Global UI Manager
|
|
|
|
|
|
|
|
|
|
Copyright (C) Lumiera.org
|
|
|
|
|
2017, Hermann Vosseler <Ichthyostega@web.de>
|
|
|
|
|
|
|
|
|
|
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 interaction-director.cpp
|
|
|
|
|
** Implementation parts of the top-level controller within the UI.
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
2017-02-10 23:41:47 +01:00
|
|
|
#include "gui/gtk-base.hpp"
|
|
|
|
|
#include "gui/ui-bus.hpp"
|
|
|
|
|
#include "gui/ctrl/bus-term.hpp"
|
2017-02-19 03:46:00 +01:00
|
|
|
#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"
|
2017-02-10 23:41:47 +01:00
|
|
|
#include "proc/mobject/session/root.hpp"
|
|
|
|
|
#include "lib/diff/tree-mutator.hpp"
|
|
|
|
|
//#include "gui/ui-bus.hpp"
|
|
|
|
|
//#include "lib/util.hpp"
|
2017-02-10 23:10:17 +01:00
|
|
|
|
2017-02-10 23:41:47 +01:00
|
|
|
//#include <memory>
|
|
|
|
|
//#include <list>
|
2017-02-10 23:10:17 +01:00
|
|
|
|
2017-02-10 23:41:47 +01:00
|
|
|
//using util::isnil;
|
|
|
|
|
//using std::list;
|
|
|
|
|
//using std::shared_ptr;
|
|
|
|
|
using lib::diff::TreeMutator;
|
2017-02-10 23:10:17 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
namespace gui {
|
2017-02-17 21:16:42 +01:00
|
|
|
namespace interact {
|
|
|
|
|
|
2017-02-19 03:46:00 +01:00
|
|
|
namespace session = proc::mobject::session;
|
|
|
|
|
|
2017-02-17 21:16:42 +01:00
|
|
|
using ctrl::GlobalCtx;
|
2017-02-19 03:46:00 +01:00
|
|
|
using ctrl::UiState;
|
|
|
|
|
using setting::AssetController;
|
|
|
|
|
using timeline::TimelineController;
|
2017-02-10 23:10:17 +01:00
|
|
|
|
|
|
|
|
|
2017-02-19 03:46:00 +01:00
|
|
|
// emit dtors of children here...
|
2017-02-10 23:10:17 +01:00
|
|
|
InteractionDirector::~InteractionDirector()
|
|
|
|
|
{ }
|
|
|
|
|
|
|
|
|
|
|
2017-02-14 03:31:12 +01:00
|
|
|
InteractionDirector::InteractionDirector (GlobalCtx& globals)
|
2017-02-19 03:46:00 +01:00
|
|
|
: model::Controller(session::Root::getID(), globals.uiBus_.getAccessPoint())
|
2017-02-14 03:31:12 +01:00
|
|
|
, globalCtx_(globals)
|
2017-02-19 03:46:00 +01:00
|
|
|
, spotLocator_{new SpotLocator}
|
|
|
|
|
, navigator_{new Navigator{*spotLocator_}}
|
|
|
|
|
, tracker_{new FocusTracker{*navigator_}}
|
2017-02-19 04:46:13 +01:00
|
|
|
, uiState_{new UiState{globals.uiBus_.getStateManager(), *tracker_}}
|
2017-02-19 03:46:00 +01:00
|
|
|
, assets_{new AssetController{session::Root::getAssetID(), this->uiBus_}}
|
|
|
|
|
, timelines_{}
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
}
|
2017-02-10 23:10:17 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
void
|
2017-02-10 23:41:47 +01:00
|
|
|
InteractionDirector::buildMutator (TreeMutator::Handle buffer)
|
2017-02-10 23:10:17 +01:00
|
|
|
{
|
2017-02-10 23:41:47 +01:00
|
|
|
// using Attrib = std::pair<const string,string>;
|
|
|
|
|
// using lib::diff::collection;
|
2017-02-10 23:10:17 +01:00
|
|
|
|
2017-02-10 23:41:47 +01:00
|
|
|
buffer.create (
|
|
|
|
|
TreeMutator::build()
|
|
|
|
|
);
|
|
|
|
|
UNIMPLEMENTED ("create a sensible binding between root-controller and root-model element");
|
2017-02-10 23:10:17 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2017-02-17 21:16:42 +01:00
|
|
|
}}// namespace gui::interact
|