refactored plugin api; refactored callback library; added signals library

git-svn-id: svn://svn.icculus.org/gtkradiant/GtkRadiant/trunk@44 8a3a26a2-13c4-0310-b231-cf6edde360e5
This commit is contained in:
spog
2006-04-09 17:15:13 +00:00
parent ba55f1bbf6
commit 6ee91d153e
127 changed files with 3723 additions and 2092 deletions

View File

@@ -24,14 +24,13 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#include <cstddef>
#include "generic/constant.h"
#include "signal/signalfwd.h"
template<typename value_type>
class Stack;
template<typename Contained>
class Reference;
class Callback;
namespace scene
{
class Instance;
@@ -105,15 +104,15 @@ namespace scene
virtual void sceneChanged() = 0;
/// \brief Add a \p callback to be invoked when the scene changes.
/// \todo Move to a separate class.
virtual void addSceneChangedCallback(const Callback& callback) = 0;
virtual void addSceneChangedCallback(const SignalHandler& handler) = 0;
/// \brief Invokes all bounds-changed callbacks. Called when the bounds of any instance in the scene change.
/// \todo Move to a separate class.
virtual void boundsChanged() = 0;
/// \brief Add a \p callback to be invoked when the bounds of any instance in the scene change.
virtual void addBoundsChangedCallback(const Callback& callback) = 0;
virtual SignalHandlerId addBoundsChangedCallback(const SignalHandler& boundsChanged) = 0;
/// \brief Remove a \p callback to be invoked when the bounds of any instance in the scene change.
virtual void removeBoundsChangedCallback(const Callback& callback) = 0;
virtual void removeBoundsChangedCallback(SignalHandlerId id) = 0;
virtual TypeId getNodeTypeId(const char* name) = 0;
virtual TypeId getInstanceTypeId(const char* name) = 0;
@@ -208,9 +207,9 @@ inline scene::Graph& GlobalSceneGraph()
return GlobalSceneGraphModule::getTable();
}
inline void AddSceneChangeCallback(const Callback& callback)
inline void AddSceneChangeCallback(const SignalHandler& handler)
{
GlobalSceneGraph().addSceneChangedCallback(callback);
GlobalSceneGraph().addSceneChangedCallback(handler);
}
inline void SceneChangeNotify()
{