/* Tangible - common implementation base of all relevant interface elements Copyright (C) Lumiera.org 2015, Hermann Vosseler 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 tangible.cpp ** Common base implementation of all tangible and connected interface elements. ** ** @see abstract-tangible-test.cpp ** */ //#include "lib/util.hpp" //#include "lib/symbol.hpp" //#include "include/logging.h" #include "gui/model/tangible.hpp" //#include //#include //#include //using std::map; //using std::string; //using util::contains; //using util::isnil; namespace gui { namespace model { namespace { // internal details } // internal details Tangible::~Tangible() { } // Emit VTables here... /** * Prepare a command or action for actual invocation, once the execution context * has been established. The action is not executed right away, but it is now ready * and bound to the concrete arguments supplied with the [record][lib::diff::Rec]. * @param prototype handle to a command instantiation, to be readied for invocation * @param arguments suitable tuple of values, to be used to outfit the prototype */ void Tangible::prepareCommand (InvocationTrail const& prototype, Rec&& arguments) { TODO ("invoke some hook for instrumentation?"); uiBus_.act (prototype.bind(std::forward(arguments))); } /** * Actually trigger execution of an action or command. * @param preparedAction handle pointing to a command definition, * which needs to be outfitted with arguments and ready for invocation. */ void Tangible::issueCommand (InvocationTrail const& preparedAction) { TODO ("invoke some hook for instrumentation?"); uiBus_.act (prototype.bang()); } }} // namespace gui::model