]> git.rm.cloudns.org Git - xonotic/netradiant.git/commitdiff
Callback: remove fixed-arity wrappers
authorTimePath <andrew.hardaker1995@gmail.com>
Mon, 1 Jan 2018 01:18:56 +0000 (12:18 +1100)
committerTimePath <andrew.hardaker1995@gmail.com>
Mon, 1 Jan 2018 01:18:56 +0000 (12:18 +1100)
126 files changed:
contrib/bobtoolz/DBobView.h
contrib/bobtoolz/DBrush.cpp
contrib/bobtoolz/DEntity.cpp
contrib/bobtoolz/DTreePlanter.h
contrib/shaderplug/shaderplug.cpp
include/ibrush.h
include/icamera.h
include/ientity.h
include/ifilesystem.h
include/irender.h
include/iselection.h
include/ishaders.h
include/mapfile.h
include/modelskin.h
include/nameable.h
include/namespace.h
include/preferencesystem.cpp
include/preferencesystem.h
include/selectable.h
libs/entitylib.h
libs/generic/callback.cpp
libs/generic/callback.h
libs/generic/functional.h
libs/gtkutil/accelerator.cpp
libs/gtkutil/accelerator.h
libs/gtkutil/button.cpp
libs/gtkutil/button.h
libs/gtkutil/closure.h
libs/gtkutil/dialog.cpp
libs/gtkutil/dialog.h
libs/gtkutil/idledraw.h
libs/gtkutil/menu.cpp
libs/gtkutil/menu.h
libs/gtkutil/nonmodal.h
libs/gtkutil/toolbar.cpp
libs/gtkutil/toolbar.h
libs/gtkutil/widget.h
libs/gtkutil/window.h
libs/instancelib.h
libs/maplib.h
libs/scenelib.h
libs/selectionlib.h
libs/signal/isignal.h
libs/signal/signal.cpp
libs/stringio.h
libs/transformlib.h
libs/typesystem.h
libs/undolib.h
plugins/entity/angle.h
plugins/entity/angles.h
plugins/entity/colour.h
plugins/entity/curve.h
plugins/entity/doom3group.cpp
plugins/entity/eclassmodel.cpp
plugins/entity/entity.cpp
plugins/entity/filters.h
plugins/entity/generic.cpp
plugins/entity/group.cpp
plugins/entity/light.cpp
plugins/entity/miscmodel.cpp
plugins/entity/model.h
plugins/entity/modelskinkey.h
plugins/entity/namedentity.h
plugins/entity/namekeys.h
plugins/entity/origin.h
plugins/entity/rotation.h
plugins/entity/scale.h
plugins/entity/skincache.cpp
plugins/entity/targetable.h
plugins/md3model/model.h
plugins/model/model.cpp
plugins/shaders/shaders.cpp
radiant/autosave.cpp
radiant/brush.h
radiant/brushmanip.cpp
radiant/brushmanip.h
radiant/brushmodule.cpp
radiant/build.cpp
radiant/camwindow.cpp
radiant/commands.cpp
radiant/commands.h
radiant/csg.cpp
radiant/dialog.cpp
radiant/dialog.h
radiant/eclass_doom3.cpp
radiant/entity.cpp
radiant/entityinspector.cpp
radiant/entitylist.cpp
radiant/filters.cpp
radiant/findtexturedialog.cpp
radiant/grid.cpp
radiant/groupdialog.cpp
radiant/groupdialog.h
radiant/help.cpp
radiant/main.cpp
radiant/mainframe.cpp
radiant/mainframe.h
radiant/map.cpp
radiant/map.h
radiant/mru.cpp
radiant/multimon.cpp
radiant/patch.h
radiant/patchdialog.cpp
radiant/patchmanip.cpp
radiant/pluginmenu.cpp
radiant/points.cpp
radiant/preferencedictionary.h
radiant/preferences.cpp
radiant/preferences.h
radiant/referencecache.cpp
radiant/renderer.h
radiant/renderstate.cpp
radiant/select.cpp
radiant/selection.cpp
radiant/selection.h
radiant/surfacedialog.cpp
radiant/textureentry.h
radiant/textures.cpp
radiant/textures.h
radiant/texwindow.cpp
radiant/texwindow.h
radiant/treemodel.cpp
radiant/undo.cpp
radiant/watchbsp.cpp
radiant/xywindow.cpp
radiant/xywindow.h

index fe3d8dc3b85c0da41e26915c9fddb978b56c0ede..b20ef141417d3c6e4dbcca32f9f5f4c8d3279974 100644 (file)
@@ -78,7 +78,7 @@ void destroyShaders();
 void valueChanged( const char* value ){
        UpdatePath();
 }
-typedef MemberCaller1<DBobView, const char*, &DBobView::valueChanged> ValueChangedCaller;
+typedef MemberCaller<DBobView, void(const char*), &DBobView::valueChanged> ValueChangedCaller;
 void insert( const char* key, EntityKeyValue& value ){
        value.attach( ValueChangedCaller( *this ) );
 }
index 6e650807bd331294b745b8fae462e326b1512102..a0d97699c3411818f17ecf69c4cc0d822a78a263 100644 (file)
@@ -128,12 +128,12 @@ int DBrush::BuildPoints(){
 void DBrush_addFace( DBrush& brush, const _QERFaceData& faceData ){
        brush.AddFace( vector3_to_array( faceData.m_p0 ), vector3_to_array( faceData.m_p1 ), vector3_to_array( faceData.m_p2 ), 0 );
 }
-typedef ReferenceCaller1<DBrush, const _QERFaceData&, DBrush_addFace> DBrushAddFaceCaller;
+typedef ReferenceCaller<DBrush, void(const _QERFaceData&), DBrush_addFace> DBrushAddFaceCaller;
 
 void DBrush_addFaceTextured( DBrush& brush, const _QERFaceData& faceData ){
        brush.AddFace( vector3_to_array( faceData.m_p0 ), vector3_to_array( faceData.m_p1 ), vector3_to_array( faceData.m_p2 ), &faceData );
 }
-typedef ReferenceCaller1<DBrush, const _QERFaceData&, DBrush_addFaceTextured> DBrushAddFaceTexturedCaller;
+typedef ReferenceCaller<DBrush, void(const _QERFaceData&), DBrush_addFaceTextured> DBrushAddFaceTexturedCaller;
 
 void DBrush::LoadFromBrush( scene::Instance& brush, bool textured ){
        ClearFaces();
index 9fccf6b7637926061b85daa4eee35d3768daa265..22aa05a18a64de40d516d217c5621238a6527f6c 100644 (file)
@@ -244,7 +244,7 @@ void DEntity_loadBrush( DEntity& entity, scene::Instance& brush ){
        DBrush* loadBrush = entity.NewBrush( static_cast<int>( entity.brushList.size() ) );
        loadBrush->LoadFromBrush( brush, true );
 }
-typedef ReferenceCaller1<DEntity, scene::Instance&, DEntity_loadBrush> DEntityLoadBrushCaller;
+typedef ReferenceCaller<DEntity, void(scene::Instance&), DEntity_loadBrush> DEntityLoadBrushCaller;
 
 void DEntity::LoadSelectedBrushes(){
        ClearBrushes();
@@ -277,7 +277,7 @@ void DEntity_loadPatch( DEntity& entity, scene::Instance& patch ){
        DPatch* loadPatch = entity.NewPatch();
        loadPatch->LoadFromPatch( patch );
 }
-typedef ReferenceCaller1<DEntity, scene::Instance&, DEntity_loadPatch> DEntityLoadPatchCaller;
+typedef ReferenceCaller<DEntity, void(scene::Instance&), DEntity_loadPatch> DEntityLoadPatchCaller;
 
 void DEntity::LoadSelectedPatches(){
        ClearPatches();
index b7bc42003f5d4a79695894bb8bfc81dfb4db94a9..102976d8d416d85f0d2d8f0970e4eff389b8ff44 100644 (file)
@@ -42,12 +42,12 @@ MouseEventHandlerId m_mouseDown;
 SignalHandlerId m_destroyed;
 public:
 SignalHandlerResult mouseDown( const WindowVector& position, ButtonIdentifier button, ModifierFlags modifiers );
-typedef Member3<DTreePlanter, const WindowVector&, ButtonIdentifier, ModifierFlags, SignalHandlerResult, &DTreePlanter::mouseDown> MouseDownCaller;
+typedef Member<DTreePlanter, SignalHandlerResult(const WindowVector&, ButtonIdentifier, ModifierFlags), &DTreePlanter::mouseDown> MouseDownCaller;
 void destroyed(){
        m_mouseDown = MouseEventHandlerId();
        m_destroyed = SignalHandlerId();
 }
-typedef Member<DTreePlanter, void, &DTreePlanter::destroyed> DestroyedCaller;
+typedef Member<DTreePlanter, void(), &DTreePlanter::destroyed> DestroyedCaller;
 
 DTreePlanter() {
        m_numModels =   0;
index 6f272509777e503d6ceb7ae83314a63dc7acbac4..7bc9814ab3e96a011c4dd6d785acda9f2929e4a6 100644 (file)
@@ -96,7 +96,7 @@ void loadArchiveFile( const char* filename ){
        archives.push_back( filename );
 }
 
-typedef FreeCaller1<const char*, loadArchiveFile> LoadArchiveFileCaller;
+typedef FreeCaller<void(const char*), loadArchiveFile> LoadArchiveFileCaller;
 
 void LoadTextureFile( const char* filename ){
        std::string s_filename = filename;
@@ -116,7 +116,7 @@ void LoadTextureFile( const char* filename ){
        }
 }
 
-typedef FreeCaller1<const char*, LoadTextureFile> LoadTextureFileCaller;
+typedef FreeCaller<void(const char*), LoadTextureFile> LoadTextureFileCaller;
 
 void GetTextures( const char* extension ){
        GlobalFileSystem().forEachFile( "textures/", extension, LoadTextureFileCaller(), 0 );
@@ -128,7 +128,7 @@ void LoadShaderList( const char* filename ){
        }
 }
 
-typedef FreeCaller1<const char*, LoadShaderList> LoadShaderListCaller;
+typedef FreeCaller<void(const char*), LoadShaderList> LoadShaderListCaller;
 
 void GetAllShaders(){
        GlobalShaderSystem().foreachShaderName( LoadShaderListCaller() );
index 1171f8a7199980cada591c7fbe0a1597737465b5..93dc17e7bef4abe48427f8e3f9ed4aaafda0068f 100644 (file)
@@ -95,7 +95,7 @@ int flags;
 int value;
 };
 
-typedef Callback1<const _QERFaceData&> BrushFaceDataCallback;
+typedef Callback<void(const _QERFaceData&)> BrushFaceDataCallback;
 
 class BrushCreator
 {
index 36cc24f11f0dce22b4158cd419ff1e8190ed1e62..1ba28e2ae67972cf0960a91a3bdfc19fbeb51438 100644 (file)
@@ -44,7 +44,7 @@ class CameraModel
 {
 public:
 STRING_CONSTANT( Name, "CameraModel" );
-virtual void setCameraView( CameraView* view, const Callback& disconnect ) = 0;
+virtual void setCameraView( CameraView* view, const Callback<void()>& disconnect ) = 0;
 };
 
 template<typename Element> class BasicVector3;
index db47ff498296b8c16278c41d57c630794a86df5e..0ea6e25d3c3b7e780b180461e427e0eade897410 100644 (file)
@@ -29,7 +29,7 @@
 
 class EntityClass;
 
-typedef Callback1<const char*> KeyObserver;
+typedef Callback<void(const char*)> KeyObserver;
 
 class EntityKeyValue
 {
index 605aba29810eb9d5c522ad65e8ed4e27c6bac0c7..d7e128e6e1791a83f40dcc81102a01acbfb26fc3 100644 (file)
@@ -26,8 +26,8 @@
 #include "generic/constant.h"
 #include "generic/callback.h"
 
-typedef Callback1<const char*> ArchiveNameCallback;
-typedef Callback1<const char*> FileNameCallback;
+typedef Callback<void(const char*)> ArchiveNameCallback;
+typedef Callback<void(const char*)> FileNameCallback;
 
 class ArchiveFile;
 class ArchiveTextFile;
index fbba51db007a51c3284bb47ae6188b10218cffc4..169d881a9c59e0c1cadcc8f85d291edb64e5fc16 100644 (file)
@@ -88,9 +88,9 @@ virtual void clearLights(){
 };
 
 class Renderable;
-typedef Callback1<const Renderable&> RenderableCallback;
+typedef Callback<void(const Renderable&)> RenderableCallback;
 
-typedef Callback1<const RendererLight&> RendererLightCallback;
+typedef Callback<void(const RendererLight&)> RendererLightCallback;
 
 class LightList
 {
index 898a9aa1cf2daf464344db52819d327770567312..9207271e1c4c52a6bc8f8557ab03cb7bb2ef3c96 100644 (file)
@@ -57,7 +57,7 @@ typedef BasicVector4<float> Vector4;
 class Matrix4;
 typedef Vector4 Quaternion;
 
-typedef Callback1<const Selectable&> SelectionChangeCallback;
+typedef Callback<void(const Selectable&)> SelectionChangeCallback;
 typedef SignalHandler1<const Selectable&> SelectionChangeHandler;
 
 class SelectionSystem
index e66c9c7be887cb34cbc8cf0feb4693682a454358..f88c8ce78e206e426f233cc6ff7bf113c898f6cb 100644 (file)
@@ -78,7 +78,7 @@ virtual bool clampToBorder() const = 0;
 virtual float alphaTest() const = 0;
 };
 
-typedef Callback1<const ShaderLayer&> ShaderLayerCallback;
+typedef Callback<void(const ShaderLayer&)> ShaderLayerCallback;
 
 
 class IShader
@@ -132,7 +132,7 @@ virtual qtexture_t* lightFalloffImage() const = 0;
 };
 
 typedef struct _GSList GSList;
-typedef Callback1<const char*> ShaderNameCallback;
+typedef Callback<void(const char*)> ShaderNameCallback;
 
 class ModuleObserver;
 
@@ -159,7 +159,7 @@ virtual bool endActiveShadersIterator() = 0;
 virtual IShader* dereferenceActiveShadersIterator() = 0;
 virtual void incrementActiveShadersIterator() = 0;
 
-virtual void setActiveShadersChangedNotify( const Callback& notify ) = 0;
+virtual void setActiveShadersChangedNotify( const Callback<void()>& notify ) = 0;
 
 virtual void attach( ModuleObserver& observer ) = 0;
 virtual void detach( ModuleObserver& observer ) = 0;
index 7d61f6ed7e5472ba7e1d31129413df1eb563c5a8..02cd360e8bd0dee938a79415389eea9f1ba9130d 100644 (file)
@@ -37,7 +37,7 @@ STRING_CONSTANT( Name, "MapFile" );
 virtual void save() = 0;
 virtual bool saved() const = 0;
 virtual void changed() = 0;
-virtual void setChangedCallback( const Callback& changed ) = 0;
+virtual void setChangedCallback( const Callback<void()>& changed ) = 0;
 virtual std::size_t changes() const = 0;
 };
 
index 90fef9452a7d387a54272c7a627f18ec17eb87c8..b070cc778255c021d716d2b6114cde9e624cf691 100644 (file)
@@ -34,7 +34,7 @@ SkinRemap( const char* from, const char* to ) : m_from( from ), m_to( to ){
 }
 };
 
-typedef Callback1<SkinRemap> SkinRemapCallback;
+typedef Callback<void(SkinRemap)> SkinRemapCallback;
 class ModuleObserver;
 
 class ModelSkin
index e295e5c66c322768de6dd41c35206dfe7ca6a5b6..ceb7aabb450a999c995f3fc591c89e3bee8b8a22 100644 (file)
@@ -25,7 +25,7 @@
 #include "generic/constant.h"
 #include "generic/callback.h"
 
-typedef Callback1<const char*> NameCallback;
+typedef Callback<void(const char*)> NameCallback;
 
 class Nameable
 {
index f87a2e0604c720cf8b4cdafe3beaebe7ee90e8c7..0b24059f879f8859ffc73f992ccaa87d60de38ea 100644 (file)
@@ -25,8 +25,8 @@
 #include "generic/constant.h"
 #include "generic/callback.h"
 
-typedef Callback1<const char*> NameCallback;
-typedef Callback1<const NameCallback&> NameCallbackCallback;
+typedef Callback<void(const char*)> NameCallback;
+typedef Callback<void(const NameCallback&)> NameCallbackCallback;
 
 class Namespace
 {
index 6152cb14865140d173ff2daf6df1eb9daaf34436..1786f50bf3d67dd859d007ef4a54841807c80f46 100644 (file)
@@ -75,11 +75,11 @@ void importString( const char* value ){
        m_string = value;
        m_observer.onChanged();
 }
-typedef MemberCaller1<StringPreference, const char*, &StringPreference::importString> ImportStringCaller;
+typedef MemberCaller<StringPreference, void(const char*), &StringPreference::importString> ImportStringCaller;
 void exportString( StringImportCallback& importer ){
        importer( m_string.c_str() );
 }
-typedef MemberCaller1<StringPreference, StringImportCallback&, &StringPreference::exportString> ExportStringCaller;
+typedef MemberCaller<StringPreference, void(StringImportCallback&), &StringPreference::exportString> ExportStringCaller;
 };
 
 inline void int_export( int i, StringImportCallback& importer ){
@@ -113,11 +113,11 @@ void importString( const char* value ){
        m_int = int_import( value );
        m_observer.onChanged();
 }
-typedef MemberCaller1<IntPreference, const char*, &IntPreference::importString> ImportStringCaller;
+typedef MemberCaller<IntPreference, void(const char*), &IntPreference::importString> ImportStringCaller;
 void exportString( StringImportCallback& importer ){
        int_export( m_int, importer );
 }
-typedef MemberCaller1<IntPreference, StringImportCallback&, &IntPreference::exportString> ExportStringCaller;
+typedef MemberCaller<IntPreference, void(StringImportCallback&), &IntPreference::exportString> ExportStringCaller;
 };
 
 class IntPreferenceImporter
index bbc838ad11d5ae55f984ec5190ee9c7b4af61375..4ecbfc857e8e9c4f38fa4ec55a99cb5b417db06b 100644 (file)
@@ -25,8 +25,8 @@
 #include "generic/constant.h"
 #include "generic/callback.h"
 
-typedef Callback1<const char*> StringImportCallback;
-typedef Callback1<const StringImportCallback&> StringExportCallback;
+typedef Callback<void(const char*)> StringImportCallback;
+typedef Callback<void(const StringImportCallback&)> StringExportCallback;
 
 class PreferenceSystem
 {
index 1cea909f1a1cf4cdac6e6548d497b46daee79158..cb6f04c4522c254384e1c63ab4b4f88bdbab3935 100644 (file)
@@ -250,7 +250,7 @@ inline SelectionTestable* Instance_getSelectionTestable( scene::Instance& instan
 
 
 class Plane3;
-typedef Callback1<const Plane3&> PlaneCallback;
+typedef Callback<void(const Plane3&)> PlaneCallback;
 
 class SelectedPlanes
 {
index 7f1bb0c1c355163e625124aeaaa04ee458b880fe..83f35f02ea959b758f4f9afbfa0cc587aee44fa2 100644 (file)
@@ -366,7 +366,7 @@ void importState( const CopiedString& string ){
 
        notify();
 }
-typedef MemberCaller1<KeyValue, const CopiedString&, &KeyValue::importState> UndoImportCaller;
+typedef MemberCaller<KeyValue, void(const CopiedString&), &KeyValue::importState> UndoImportCaller;
 };
 
 /// \brief An unsorted list of key/value pairs.
@@ -524,7 +524,7 @@ public:
 
                m_entityKeyValueChanged();
        }
-       typedef MemberCaller1<EntityKeyValues, const KeyValues&, &EntityKeyValues::importState> UndoImportCaller;
+       typedef MemberCaller<EntityKeyValues, void(const KeyValues&), &EntityKeyValues::importState> UndoImportCaller;
 
        void attach( Observer& observer ){
                ASSERT_MESSAGE( !m_observerMutex, "observer cannot be attached during iteration" );
index 74fe6ee03cacb459232a8b770994dcfb7c484b22..4776f57589e37db97bc786817b37c25ed030db80 100644 (file)
@@ -40,14 +40,14 @@ void setValue(){
        value = 3;
 }
 // a typedef to make things more readable
-typedef MemberCaller<Integer, &Integer::setValue> SetValueCaller;
+typedef MemberCaller<Integer, void(), &Integer::setValue> SetValueCaller;
 };
 
 void example(){
        Integer foo = { 0 };
 
        {
-               Callback bar = ConstMemberCaller<Integer, &Integer::printValue>( foo );
+               Callback<void()> bar = ConstMemberCaller<Integer, void(), &Integer::printValue>( foo );
 
                // invoke the callback
                bar(); // foo.printValue()
@@ -56,7 +56,7 @@ void example(){
 
        {
                // use the typedef to improve readability
-               Callback bar = Integer::SetValueCaller( foo );
+               Callback<void()> bar = Integer::SetValueCaller( foo );
 
                // invoke the callback
                bar(); // foo.setValue()
@@ -77,13 +77,13 @@ void Int_setValue( int& value ){
 }
 
 // a typedef to make things more readable
-typedef ReferenceCaller<int, Int_setValue> IntSetValueCaller;
+typedef ReferenceCaller<int, void(), Int_setValue> IntSetValueCaller;
 
 void example(){
        int foo = 0;
 
        {
-               Callback bar = ConstReferenceCaller<int, Int_printValue>( foo );
+               Callback<void()> bar = ConstReferenceCaller<int, void(), Int_printValue>( foo );
 
                // invoke the callback
                bar(); // Int_printValue(foo)
@@ -92,7 +92,7 @@ void example(){
 
        {
                // use the typedef to improve readability
-               Callback bar = IntSetValueCaller( foo );
+               Callback<void()> bar = IntSetValueCaller( foo );
 
                // invoke the callback
                bar(); // Int_setValue(foo)
@@ -123,97 +123,97 @@ class Test
 public:
 void test0(){
 }
-typedef Member<Test, void, &Test::test0> Test0;
-typedef MemberCaller<Test, &Test::test0> Test0Caller;
+typedef Member<Test, void(), &Test::test0> Test0;
+typedef MemberCaller<Test, void(), &Test::test0> Test0Caller;
 void test0const() const {
 }
-typedef ConstMember<Test, void, &Test::test0const> Test0Const;
-typedef ConstMemberCaller<Test, &Test::test0const> Test0ConstCaller;
+typedef ConstMember<Test, void(), &Test::test0const> Test0Const;
+typedef ConstMemberCaller<Test, void(), &Test::test0const> Test0ConstCaller;
 void test1( A1 ){
 }
-typedef Member1<Test, A1, void, &Test::test1> Test1;
-typedef MemberCaller1<Test, A1, &Test::test1> Test1Caller;
+typedef Member<Test, void(A1), &Test::test1> Test1;
+typedef MemberCaller<Test, void(A1), &Test::test1> Test1Caller;
 void test1const( A1 ) const {
 }
-typedef ConstMember1<Test, A1, void, &Test::test1const> Test1Const;
-typedef ConstMemberCaller1<Test, A1, &Test::test1const> Test1ConstCaller;
+typedef ConstMember<Test, void(A1), &Test::test1const> Test1Const;
+typedef ConstMemberCaller<Test, void(A1), &Test::test1const> Test1ConstCaller;
 void test2( A1, A2 ){
 }
-typedef Member2<Test, A1, A2, void, &Test::test2> Test2;
+typedef Member<Test, void(A1, A2), &Test::test2> Test2;
 void test2const( A1, A2 ) const {
 }
-typedef ConstMember2<Test, A1, A2, void, &Test::test2const> Test2Const;
+typedef ConstMember<Test, void(A1, A2), &Test::test2const> Test2Const;
 void test3( A1, A2, A3 ){
 }
-typedef Member3<Test, A1, A2, A3, void, &Test::test3> Test3;
+typedef Member<Test, void(A1, A2, A3), &Test::test3> Test3;
 void test3const( A1, A2, A3 ) const {
 }
-typedef ConstMember3<Test, A1, A2, A3, void, &Test::test3const> Test3Const;
+typedef ConstMember<Test, void(A1, A2, A3), &Test::test3const> Test3Const;
 };
 
 void test0free(){
 }
-typedef FreeCaller<&test0free> Test0FreeCaller;
+typedef FreeCaller<void(), &test0free> Test0FreeCaller;
 void test1free( A1 ){
 }
-typedef FreeCaller1<A1, &test1free> Test1FreeCaller;
+typedef FreeCaller<void(A1), &test1free> Test1FreeCaller;
 void test2free( A1, A2 ){
 }
-typedef Function2<A1, A2, void, &test2free> Test2Free;
+typedef Function<void(A1, A2), &test2free> Test2Free;
 void test3free( A1, A2, A3 ){
 }
-typedef Function3<A1, A2, A3, void, &test3free> Test3Free;
+typedef Function<void(A1, A2, A3), &test3free> Test3Free;
 
 
 void test0( Test& test ){
 }
-typedef ReferenceCaller<Test, &test0> Test0Caller;
+typedef ReferenceCaller<Test, void(), &test0> Test0Caller;
 
 void test0const( const Test& test ){
 }
-typedef ConstReferenceCaller<Test, &test0const> Test0ConstCaller;
+typedef ConstReferenceCaller<Test, void(), &test0const> Test0ConstCaller;
 
 void test0p( Test* test ){
 }
-typedef PointerCaller<Test, &test0p> Test0PCaller;
+typedef PointerCaller<Test, void(), &test0p> Test0PCaller;
 
 void test0constp( const Test* test ){
 }
-typedef ConstPointerCaller<Test, &test0constp> Test0ConstPCaller;
+typedef ConstPointerCaller<Test, void(), &test0constp> Test0ConstPCaller;
 
 void test1( Test& test, A1 ){
 }
-typedef ReferenceCaller1<Test, A1, &test1> Test1Caller;
+typedef ReferenceCaller<Test, void(A1), &test1> Test1Caller;
 
 void test1const( const Test& test, A1 ){
 }
-typedef ConstReferenceCaller1<Test, A1, &test1const> Test1ConstCaller;
+typedef ConstReferenceCaller<Test, void(A1), &test1const> Test1ConstCaller;
 
 void test1p( Test* test, A1 ){
 }
-typedef PointerCaller1<Test, A1, &test1p> Test1PCaller;
+typedef PointerCaller<Test, void(A1), &test1p> Test1PCaller;
 
 void test1constp( const Test* test, A1 ){
 }
-typedef ConstPointerCaller1<Test, A1, &test1constp> Test1ConstPCaller;
+typedef ConstPointerCaller<Test, void(A1), &test1constp> Test1ConstPCaller;
 
 void test2( Test& test, A1, A2 ){
 }
-typedef Function3<Test&, A1, A2, void, &test2> Test2;
+typedef Function<void(Test&, A1, A2), &test2> Test2;
 
 void test3( Test& test, A1, A2, A3 ){
 }
-typedef Function4<Test&, A1, A2, A3, void, &test3> Test3;
+typedef Function<void(Test&, A1, A2, A3), &test3> Test3;
 
 void instantiate(){
        Test test;
        const Test& testconst = test;
        {
-               Callback a = Test0FreeCaller();
-               Callback b = Test::Test0Caller( test );
-               b = makeCallback0( Test::Test0(), test );
-               Callback c = Test::Test0ConstCaller( testconst );
-               c = makeCallback0( Test::Test0Const(), test );
+               Callback<void()> a = Test0FreeCaller();
+               Callback<void()> b = Test::Test0Caller( test );
+               b = makeCallback( Test::Test0(), test );
+               Callback<void()> c = Test::Test0ConstCaller( testconst );
+               c = makeCallback( Test::Test0Const(), test );
                Test0Caller{ test };
                Test0ConstCaller{ testconst };
                Test0PCaller{ &test };
@@ -222,12 +222,12 @@ void instantiate(){
                bool u = a != b;
        }
        {
-               typedef Callback1<A1> TestCallback1;
+               typedef Callback<void(A1)> TestCallback1;
                TestCallback1 a = Test1FreeCaller();
                TestCallback1 b = Test::Test1Caller( test );
-               b = makeCallback1( Test::Test1(), test );
+               b = makeCallback( Test::Test1(), test );
                TestCallback1 c = Test::Test1ConstCaller( testconst );
-               c = makeCallback1( Test::Test1Const(), test );
+               c = makeCallback( Test::Test1Const(), test );
                Test1Caller{ test };
                Test1ConstCaller{ testconst };
                Test1PCaller{ &test };
@@ -236,20 +236,20 @@ void instantiate(){
                bool u = a != b;
        }
        {
-               typedef Callback2<A1, A2> TestCallback2;
-               TestCallback2 a = makeStatelessCallback2( Test2Free() );
-               TestCallback2 b = makeCallback2( Test2(), test );
-               makeCallback2( Test::Test2(), test );
-               makeCallback2( Test::Test2Const(), test );
+               typedef Callback<void(A1, A2)> TestCallback2;
+               TestCallback2 a = makeStatelessCallback( Test2Free() );
+               TestCallback2 b = makeCallback( Test2(), test );
+               makeCallback( Test::Test2(), test );
+               makeCallback( Test::Test2Const(), test );
                a( A1(), A2() );
                bool u = a != b;
        }
        {
-               typedef Callback3<A1, A2, A3> TestCallback3;
-               TestCallback3 a = makeStatelessCallback3( Test3Free() );
-               TestCallback3 b = makeCallback3( Test3(), test );
-               makeCallback3( Test::Test3(), test );
-               makeCallback3( Test::Test3Const(), test );
+               typedef Callback<void(A1, A2, A3)> TestCallback3;
+               TestCallback3 a = makeStatelessCallback( Test3Free() );
+               TestCallback3 b = makeCallback( Test3(), test );
+               makeCallback( Test::Test3(), test );
+               makeCallback( Test::Test3Const(), test );
                a( A1(), A2(), A3() );
                bool u = a != b;
        }
index 1e8cd46d5be4a944e39218d2df10adcb37be7ac5..9a1c9b1718aa262dbb0a2ae706cbecddceb69168 100644 (file)
@@ -151,12 +151,12 @@ using BindFirstOpaque = BindFirstOpaqueN<Caller, get_func<Caller>>;
 
 /// \brief Combines a void pointer with a pointer to a function which operates on a void pointer.
 ///
-/// Use with the callback constructors MemberCaller, ConstMemberCaller, ReferenceCaller, ConstReferenceCaller, PointerCaller, ConstPointerCaller and FreeCaller.
+/// Use with the callback constructors MemberCaller0, ConstMemberCaller0, ReferenceCaller0, ConstReferenceCaller0, PointerCaller0, ConstPointerCaller0 and FreeCaller0.
 template<class F>
-class CallbackN;
+class Callback;
 
 template<class R, class... Ts>
-class CallbackN<R(Ts...)> : public CallbackBase<R(*)(void *, Ts...)> {
+class Callback<R(Ts...)> : public CallbackBase<R(*)(void *, Ts...)> {
        using Base = CallbackBase<R (*)(void *, Ts...)>;
 
        static R nullThunk(void *, Ts...) {
@@ -165,14 +165,14 @@ class CallbackN<R(Ts...)> : public CallbackBase<R(*)(void *, Ts...)> {
 public:
        using func = R(Ts...);
 
-       CallbackN() : Base(0, nullThunk) {
+       Callback() : Base(0, nullThunk) {
        }
 
        template<typename Caller>
-       CallbackN(const BindFirstOpaque<Caller> &caller) : Base(caller.getEnvironment(), BindFirstOpaque<Caller>::thunk) {
+       Callback(const BindFirstOpaque<Caller> &caller) : Base(caller.getEnvironment(), BindFirstOpaque<Caller>::thunk) {
        }
 
-       CallbackN(void *environment, typename Base::Thunk function) : Base(environment, function) {
+       Callback(void *environment, typename Base::Thunk function) : Base(environment, function) {
        }
 
        R operator()(Ts... args) const {
@@ -204,81 +204,64 @@ namespace detail {
 }
 
 template<typename Caller>
-inline CallbackN<typename detail::Arglist<get_func<Caller>>::shift::type> makeCallbackN(const Caller &caller, get_argument<Caller, 0> callee) {
-       return CallbackN<typename detail::Arglist<get_func<Caller>>::shift::type>(BindFirstOpaque<Caller>(callee));
+inline Callback<typename detail::Arglist<get_func<Caller>>::shift::type> makeCallback(const Caller &caller, get_argument<Caller, 0> callee) {
+       return Callback<typename detail::Arglist<get_func<Caller>>::shift::type>(BindFirstOpaque<Caller>(callee));
 }
 
 template<typename Caller>
-inline CallbackN<get_func<Caller>> makeStatelessCallbackN(const Caller &caller) {
-       return makeCallbackN(CallerShiftFirst<Caller, typename detail::Arglist<get_func<Caller>>::template unshift<void *>::type>(), nullptr);
+inline Callback<get_func<Caller>> makeStatelessCallback(const Caller &caller) {
+       return makeCallback(CallerShiftFirst<Caller, typename detail::Arglist<get_func<Caller>>::template unshift<void *>::type>(), nullptr);
 }
 
-namespace detail {
-       template<class Object, class F>
-       struct MemberFunction;
-
-       template<class Object, class R, class... Ts>
-       struct MemberFunction<Object, R(Ts...)> {
-               using type = R(Object::*)(Ts...);
-               using type_const = R(Object::*)(Ts...) const;
-       };
-}
-
-template<class Object, class F>
-using MemberFunction = typename detail::MemberFunction<Object, F>::type;
-
-template<class Object, class F>
-using ConstMemberFunction = typename detail::MemberFunction<Object, F>::type_const;
-
 /// \brief Forms a Callback from a non-const Environment reference and a non-const Environment member-function.
 ///
 /// \dontinclude generic/callback.cpp
-/// \skipline MemberCaller example
+/// \skipline MemberCaller0 example
 /// \until end example
 
 template<class Environment, class F, MemberFunction<Environment, F> member>
-using MemberCallerN = BindFirstOpaque<typename MemberN<Environment, F>::template instance<member>>;
+using MemberCaller = BindFirstOpaque<typename MemberN<Environment, F>::template instance<member>>;
 
 /// \brief Forms a Callback from a const Environment reference and a const Environment member-function.
 ///
 /// \dontinclude generic/callback.cpp
-/// \skipline MemberCaller example
+/// \skipline MemberCaller0 example
 /// \until end example
 template<class Environment, class F, ConstMemberFunction<Environment, F> member>
-using ConstMemberCallerN = BindFirstOpaque<typename ConstMemberN<Environment, F>::template instance<member>>;
+using ConstMemberCaller = BindFirstOpaque<typename ConstMemberN<Environment, F>::template instance<member>>;
 
 /// \brief Forms a Callback from a non-const Environment reference and a free function which operates on a non-const Environment reference.
 ///
 /// \dontinclude generic/callback.cpp
-/// \skipline ReferenceCaller example
+/// \skipline ReferenceCaller0 example
 /// \until end example
 template<class Environment, class F, typename detail::Arglist<F>::template unshift<Environment &>::type *func>
-using ReferenceCallerN = BindFirstOpaque<typename FunctionN<typename detail::Arglist<F>::template unshift<Environment &>::type>::template instance<func>>;
+using ReferenceCaller = BindFirstOpaque<typename FunctionN<typename detail::Arglist<F>::template unshift<Environment &>::type>::template instance<func>>;
 
 /// \brief Forms a Callback from a const Environment reference and a free function which operates on a const Environment reference.
 ///
 /// \dontinclude generic/callback.cpp
-/// \skipline ReferenceCaller example
+/// \skipline ReferenceCaller0 example
 /// \until end example
 template<class Environment, class F, typename detail::Arglist<F>::template unshift<const Environment &>::type *func>
-using ConstReferenceCallerN = BindFirstOpaque<typename FunctionN<typename detail::Arglist<F>::template unshift<const Environment &>::type>::template instance<func>>;
+using ConstReferenceCaller = BindFirstOpaque<typename FunctionN<typename detail::Arglist<F>::template unshift<const Environment &>::type>::template instance<func>>;
 
 /// \brief Forms a Callback from a non-const Environment pointer and a free function which operates on a non-const Environment pointer.
 template<class Environment, class F, typename detail::Arglist<F>::template unshift<Environment *>::type *func>
-using PointerCallerN = BindFirstOpaque<typename FunctionN<typename detail::Arglist<F>::template unshift<Environment *>::type>::template instance<func>>;
+using PointerCaller = BindFirstOpaque<typename FunctionN<typename detail::Arglist<F>::template unshift<Environment *>::type>::template instance<func>>;
 
 /// \brief Forms a Callback from a const Environment pointer and a free function which operates on a const Environment pointer.
 template<class Environment, class F, typename detail::Arglist<F>::template unshift<const Environment *>::type *func>
-using ConstPointerCallerN = BindFirstOpaque<typename FunctionN<typename detail::Arglist<F>::template unshift<const Environment *>::type>::template instance<func>>;
+using ConstPointerCaller = BindFirstOpaque<typename FunctionN<typename detail::Arglist<F>::template unshift<const Environment *>::type>::template instance<func>>;
 
 /// \brief Forms a Callback from a free function
 template<class F, F *func>
-class FreeCallerN : public BindFirstOpaque<CallerShiftFirst<
+class FreeCaller : public BindFirstOpaque<CallerShiftFirst<
         typename FunctionN<F>::template instance<func>,
         typename detail::Arglist<F>::template unshift<void *>::type
 >> {
 public:
-    FreeCallerN()
+    FreeCaller()
             : BindFirstOpaque<CallerShiftFirst<
             typename FunctionN<F>::template instance<func>,
             typename detail::Arglist<F>::template unshift<void *>::type
@@ -290,109 +273,31 @@ public:
 ///
 /// \param Functor Must define \c first_argument_type and \c operator()(first_argument_type).
 template<typename Functor>
-inline CallbackN<get_func<Functor>> makeCallbackN(Functor &functor) {
-       return CallbackN<get_func<Functor>>(MemberCallerN<Functor, get_func<Functor>, &Functor::operator()>(functor));
+inline Callback<get_func<Functor>> makeCallback(Functor &functor) {
+       return Callback<get_func<Functor>>(MemberCaller<Functor, get_func<Functor>, &Functor::operator()>(functor));
 }
 
 /// \brief  Constructs a Callback1 from a const \p functor
 ///
 /// \param Functor Must define \c first_argument_type and const \c operator()(first_argument_type).
 template<typename Functor>
-inline CallbackN<get_func<Functor>> makeCallbackN(const Functor &functor) {
-       return CallbackN<get_func<Functor>>(ConstMemberCallerN<Functor, get_func<Functor>, &Functor::operator()>(functor));
+inline Callback<get_func<Functor>> makeCallback(const Functor &functor) {
+       return Callback<get_func<Functor>>(ConstMemberCaller<Functor, get_func<Functor>, &Functor::operator()>(functor));
 }
 
-// todo: inline
-
-#define makeCallback makeCallbackN
-
-using Callback = CallbackN<void()>;
-
-template<class Result>
-using Callback0 = CallbackN<Result()>;
-
-template<class FirstArgument, class Result = void>
-using Callback1 = CallbackN<Result(FirstArgument)>;
-
-template<typename FirstArgument, typename SecondArgument, typename Result = void>
-using Callback2 = CallbackN<Result(FirstArgument, SecondArgument)>;
-
-template<typename FirstArgument, typename SecondArgument, typename ThirdArgument, typename Result = void>
-using Callback3 = CallbackN<Result(FirstArgument, SecondArgument, ThirdArgument)>;
-
-#define makeCallback0 makeCallbackN
-#define makeStatelessCallback0 makeStatelessCallbackN
-
-#define makeCallback1 makeCallbackN
-#define makeStatelessCallback1 makeStatelessCallbackN
-
-#define makeCallback2 makeCallbackN
-#define makeStatelessCallback2 makeStatelessCallbackN
-
-#define makeCallback3 makeCallbackN
-#define makeStatelessCallback3 makeStatelessCallbackN
-
-template<class Environment, void(Environment::*member)()>
-using MemberCaller = MemberCallerN<Environment, void(), member>;
-
-template<class Environment, void(Environment::*member)() const>
-using ConstMemberCaller = ConstMemberCallerN<Environment, void(), member>;
-
-template<class Environment, class FirstArgument, void(Environment::*member)(FirstArgument)>
-using MemberCaller1 = MemberCallerN<Environment, void(FirstArgument), member>;
-
-template<class Environment, class FirstArgument, void(Environment::*member)(FirstArgument) const>
-using ConstMemberCaller1 = ConstMemberCallerN<Environment, void(FirstArgument), member>;
-
-template<class Environment, void(*func)(Environment &)>
-using ReferenceCaller = ReferenceCallerN<Environment, void(), func>;
-
-template<class Environment, void(*func)(const Environment &)>
-using ConstReferenceCaller = ConstReferenceCallerN<Environment, void(), func>;
-
-/// \brief Forms a Callback from a non-const Environment reference and a free function which operates on a non-const Environment reference and one other argument.
-template<class Environment, class FirstArgument, void(*func)(Environment &, FirstArgument)>
-using ReferenceCaller1 = ReferenceCallerN<Environment, void(FirstArgument), func>;
-
-/// \brief Forms a Callback from a const Environment reference and a free function which operates on a const Environment reference and one other argument.
-template<class Environment, class FirstArgument, void(*func)(const Environment &, FirstArgument)>
-using ConstReferenceCaller1 = ConstReferenceCallerN<Environment, void(FirstArgument), func>;
-
-/// \brief Forms a Callback from a non-const Environment pointer and a free function which operates on a non-const Environment pointer.
-template<class Environment, void(*func)(Environment *)>
-using PointerCaller = PointerCallerN<Environment, void(), func>;
-
-/// \brief Forms a Callback from a const Environment pointer and a free function which operates on a const Environment pointer.
-template<class Environment, void(*func)(const Environment *)>
-using ConstPointerCaller = ConstPointerCallerN<Environment, void(), func>;
-
-/// \brief Forms a Callback from a non-const Environment pointer and a free function which operates on a non-const Environment pointer and one other argument.
-template<class Environment, class FirstArgument, void(*func)(Environment *, FirstArgument)>
-using PointerCaller1 = PointerCallerN<Environment, void(FirstArgument), func>;
-
-/// \brief Forms a Callback from a const Environment pointer and a free function which operates on a const Environment pointer and one other argument.
-template<class Environment, class FirstArgument, void(*func)(const Environment *, FirstArgument)>
-using ConstPointerCaller1 = ConstPointerCallerN<Environment, void(FirstArgument), func>;
-
-template<void(*func)()>
-using FreeCaller = FreeCallerN<void(), func>;
-
-template<class FirstArgument, void(*func)(FirstArgument)>
-using FreeCaller1 = FreeCallerN<void(FirstArgument), func>;
-
-typedef Callback1<bool> BoolImportCallback;
-typedef Callback1<const BoolImportCallback&> BoolExportCallback;
+using BoolImportCallback = Callback<void(bool)>;
+using BoolExportCallback = Callback<void(const BoolImportCallback&)>;
 
-typedef Callback1<int> IntImportCallback;
-typedef Callback1<const IntImportCallback&> IntExportCallback;
+using IntImportCallback = Callback<void(int)>;
+using IntExportCallback = Callback<void(const IntImportCallback&)>;
 
-typedef Callback1<float> FloatImportCallback;
-typedef Callback1<const FloatImportCallback&> FloatExportCallback;
+using FloatImportCallback = Callback<void(float)>;
+using FloatExportCallback = Callback<void(const FloatImportCallback&)>;
 
-typedef Callback1<const char*> StringImportCallback;
-typedef Callback1<const StringImportCallback&> StringExportCallback;
+using StringImportCallback = Callback<void(const char*)>;
+using StringExportCallback = Callback<void(const StringImportCallback&)>;
 
-typedef Callback1<std::size_t> SizeImportCallback;
-typedef Callback1<const SizeImportCallback&> SizeExportCallback;
+using SizeImportCallback = Callback<void(std::size_t)>;
+using SizeExportCallback = Callback<void(const SizeImportCallback&)>;
 
 #endif
index ecbf6c7d938e285d93169b061a46db4c12fcc755..67161ffdcb12eea617bfe83242842e8f6719a3e0 100644 (file)
@@ -72,6 +72,23 @@ using get_result_type = typename detail::Fn<get_func<Caller>>::result_type;
 template<class Caller, int N>
 using get_argument = typename detail::Fn<get_func<Caller>>::template get<N>;
 
+namespace detail {
+    template<class Object, class F>
+    struct MemberFunction;
+
+    template<class Object, class R, class... Ts>
+    struct MemberFunction<Object, R(Ts...)> {
+        using type = R(Object::*)(Ts...);
+        using type_const = R(Object::*)(Ts...) const;
+    };
+}
+
+template<class Object, class F>
+using MemberFunction = typename detail::MemberFunction<Object, F>::type;
+
+template<class Object, class F>
+using ConstMemberFunction = typename detail::MemberFunction<Object, F>::type_const;
+
 template<class Object, class F>
 class MemberN;
 
@@ -89,6 +106,9 @@ public:
     };
 };
 
+template<class Object, class F, MemberFunction<Object, F> func>
+using Member = typename MemberN<Object, F>::template instance<func>;
+
 template<class Object, class F>
 class ConstMemberN;
 
@@ -106,6 +126,9 @@ public:
     };
 };
 
+template<class Object, class F, ConstMemberFunction<Object, F> func>
+using ConstMember = typename ConstMemberN<Object, F>::template instance<func>;
+
 template<class F>
 class FunctionN;
 
@@ -123,6 +146,9 @@ public:
     };
 };
 
+template<class F, F *func>
+using Function = typename FunctionN<F>::template instance<func>;
+
 template<class Caller, class F>
 class CallerShiftFirst;
 
@@ -184,45 +210,4 @@ public:
 template<class Functor>
 using FunctorInvoke = FunctorNInvoke<Functor, get_func<Functor>>;
 
-// todo: inline
-
-template<class Object, class R, R(Object::*member)()>
-using Member = typename MemberN<Object, R()>::template instance<member>;
-
-template<class Object, class R, R(Object::*member)() const>
-using ConstMember = typename ConstMemberN<Object, R()>::template instance<member>;
-
-template<class Object, class A1, class R, R(Object::*member)(A1)>
-using Member1 = typename MemberN<Object, R(A1)>::template instance<member>;
-
-template<class Object, class A1, class R, R(Object::*member)(A1) const>
-using ConstMember1 = typename ConstMemberN<Object, R(A1)>::template instance<member>;
-
-template<class Object, class A1, class A2, class R, R(Object::*member)(A1, A2)>
-using Member2 = typename MemberN<Object, R(A1, A2)>::template instance<member>;
-
-template<class Object, class A1, class A2, class R, R(Object::*member)(A1, A2) const>
-using ConstMember2 = typename ConstMemberN<Object, R(A1, A2)>::template instance<member>;
-
-template<class Object, class A1, class A2, class A3, class R, R(Object::*member)(A1, A2, A3)>
-using Member3 = typename MemberN<Object, R(A1, A2, A3)>::template instance<member>;
-
-template<class Object, class A1, class A2, class A3, class R, R(Object::*member)(A1, A2, A3) const>
-using ConstMember3 = typename ConstMemberN<Object, R(A1, A2, A3)>::template instance<member>;
-
-template<class R, R(*func)()>
-using Function0 = typename FunctionN<R()>::template instance<func>;
-
-template<class A1, class R, R(*func)(A1)>
-using Function1 = typename FunctionN<R(A1)>::template instance<func>;
-
-template<class A1, class A2, class R, R(*func)(A1, A2)>
-using Function2 = typename FunctionN<R(A1, A2)>::template instance<func>;
-
-template<class A1, class A2, class A3, class R, R(*func)(A1, A2, A3)>
-using Function3 = typename FunctionN<R(A1, A2, A3)>::template instance<func>;
-
-template<class A1, class A2, class A3, class A4, class R, R(*func)(A1, A2, A3, A4)>
-using Function4 = typename FunctionN<R(A1, A2, A3, A4)>::template instance<func>;
-
 #endif
index 67d917bfa45a2a599bc4dfa32bcf05a0f2bf5eba..6b66288fd74ed30defc5e4975105bf8feb855d2b 100644 (file)
@@ -86,10 +86,10 @@ void accelerator_write( const Accelerator& accelerator, TextOutputStream& ostrea
        ostream << gtk_accelerator_get_label( accelerator.key, accelerator.modifiers );
 }
 
-typedef std::map<Accelerator, Callback> AcceleratorMap;
+typedef std::map<Accelerator, Callback<void()>> AcceleratorMap;
 typedef std::set<Accelerator> AcceleratorSet;
 
-bool accelerator_map_insert( AcceleratorMap& acceleratorMap, Accelerator accelerator, const Callback& callback ){
+bool accelerator_map_insert( AcceleratorMap& acceleratorMap, Accelerator accelerator, const Callback<void()>& callback ){
        if ( accelerator.key != 0 ) {
                return acceleratorMap.insert( AcceleratorMap::value_type( accelerator, callback ) ).second;
        }
@@ -186,13 +186,13 @@ bool global_accel_enabled(){
 }
 
 
-GClosure* accel_group_add_accelerator( GtkAccelGroup* group, Accelerator accelerator, const Callback& callback );
+GClosure* accel_group_add_accelerator( GtkAccelGroup* group, Accelerator accelerator, const Callback<void()>& callback );
 void accel_group_remove_accelerator( GtkAccelGroup* group, Accelerator accelerator );
 
 AcceleratorMap g_queuedAcceleratorsAdd;
 AcceleratorSet g_queuedAcceleratorsRemove;
 
-void globalQueuedAccelerators_add( Accelerator accelerator, const Callback& callback ){
+void globalQueuedAccelerators_add( Accelerator accelerator, const Callback<void()>& callback ){
        if ( !g_queuedAcceleratorsAdd.insert( AcceleratorMap::value_type( accelerator, callback ) ).second ) {
                globalErrorStream() << "globalQueuedAccelerators_add: accelerator already queued: " << accelerator << "\n";
        }
@@ -398,7 +398,7 @@ void GlobalPressedKeys_disconnect( ui::Window window ){
 
 
 
-void special_accelerators_add( Accelerator accelerator, const Callback& callback ){
+void special_accelerators_add( Accelerator accelerator, const Callback<void()>& callback ){
        //globalOutputStream() << "special_accelerators_add: " << makeQuoted(accelerator) << "\n";
        if ( !accelerator_map_insert( g_special_accelerators, accelerator, callback ) ) {
                globalErrorStream() << "special_accelerators_add: already exists: " << makeQuoted( accelerator ) << "\n";
@@ -411,7 +411,7 @@ void special_accelerators_remove( Accelerator accelerator ){
        }
 }
 
-void keydown_accelerators_add( Accelerator accelerator, const Callback& callback ){
+void keydown_accelerators_add( Accelerator accelerator, const Callback<void()>& callback ){
        //globalOutputStream() << "keydown_accelerators_add: " << makeQuoted(accelerator) << "\n";
        if ( !accelerator_map_insert( g_keydown_accelerators, accelerator, callback ) ) {
                globalErrorStream() << "keydown_accelerators_add: already exists: " << makeQuoted( accelerator ) << "\n";
@@ -424,7 +424,7 @@ void keydown_accelerators_remove( Accelerator accelerator ){
        }
 }
 
-void keyup_accelerators_add( Accelerator accelerator, const Callback& callback ){
+void keyup_accelerators_add( Accelerator accelerator, const Callback<void()>& callback ){
        //globalOutputStream() << "keyup_accelerators_add: " << makeQuoted(accelerator) << "\n";
        if ( !accelerator_map_insert( g_keyup_accelerators, accelerator, callback ) ) {
                globalErrorStream() << "keyup_accelerators_add: already exists: " << makeQuoted( accelerator ) << "\n";
@@ -439,11 +439,11 @@ void keyup_accelerators_remove( Accelerator accelerator ){
 
 
 gboolean accel_closure_callback( GtkAccelGroup* group, GtkWidget* widget, guint key, GdkModifierType modifiers, gpointer data ){
-       ( *reinterpret_cast<Callback*>( data ) )( );
+       ( *reinterpret_cast<Callback<void()>*>( data ) )( );
        return TRUE;
 }
 
-GClosure* accel_group_add_accelerator( GtkAccelGroup* group, Accelerator accelerator, const Callback& callback ){
+GClosure* accel_group_add_accelerator( GtkAccelGroup* group, Accelerator accelerator, const Callback<void()>& callback ){
        if ( accelerator.key != 0 && gtk_accelerator_valid( accelerator.key, accelerator.modifiers ) ) {
                //globalOutputStream() << "global_accel_connect: " << makeQuoted(accelerator) << "\n";
                GClosure* closure = create_cclosure( G_CALLBACK( accel_closure_callback ), callback );
@@ -470,7 +470,7 @@ void accel_group_remove_accelerator( GtkAccelGroup* group, Accelerator accelerat
 
 ui::AccelGroup global_accel{ui::New};
 
-GClosure* global_accel_group_add_accelerator( Accelerator accelerator, const Callback& callback ){
+GClosure* global_accel_group_add_accelerator( Accelerator accelerator, const Callback<void()>& callback ){
        if ( !global_accel_enabled() ) {
                // workaround: cannot add to GtkAccelGroup while it is disabled
                //globalOutputStream() << "queued for add: " << accelerator << "\n";
@@ -542,13 +542,13 @@ GClosure* global_accel_group_find( Accelerator accelerator ){
        return 0;
 }
 
-void global_accel_group_connect( const Accelerator& accelerator, const Callback& callback ){
+void global_accel_group_connect( const Accelerator& accelerator, const Callback<void()>& callback ){
        if ( accelerator.key != 0 ) {
                global_accel_group_add_accelerator( accelerator, callback );
        }
 }
 
-void global_accel_group_disconnect( const Accelerator& accelerator, const Callback& callback ){
+void global_accel_group_disconnect( const Accelerator& accelerator, const Callback<void()>& callback ){
        if ( accelerator.key != 0 ) {
                global_accel_group_remove_accelerator( accelerator );
        }
index 821830f41312bce910bb1cd3c43c718e18c4fb74..4cbc55f4bcae20e89206a7b33308e230d2528767 100644 (file)
@@ -80,9 +80,9 @@ TextOutputStreamType& ostream_write( TextOutputStreamType& ostream, const Accele
        return ostream;
 }
 
-void keydown_accelerators_add( Accelerator accelerator, const Callback& callback );
+void keydown_accelerators_add( Accelerator accelerator, const Callback<void()>& callback );
 void keydown_accelerators_remove( Accelerator accelerator );
-void keyup_accelerators_add( Accelerator accelerator, const Callback& callback );
+void keyup_accelerators_add( Accelerator accelerator, const Callback<void()>& callback );
 void keyup_accelerators_remove( Accelerator accelerator );
 
 void global_accel_connect_window( ui::Window window );
@@ -94,16 +94,16 @@ extern ui::AccelGroup global_accel;
 
 GClosure* global_accel_group_find( Accelerator accelerator );
 
-void global_accel_group_connect( const Accelerator& accelerator, const Callback& callback );
-void global_accel_group_disconnect( const Accelerator& accelerator, const Callback& callback );
+void global_accel_group_connect( const Accelerator& accelerator, const Callback<void()>& callback );
+void global_accel_group_disconnect( const Accelerator& accelerator, const Callback<void()>& callback );
 
 
 class Command
 {
 public:
-Callback m_callback;
+Callback<void()> m_callback;
 const Accelerator& m_accelerator;
-Command( const Callback& callback, const Accelerator& accelerator ) : m_callback( callback ), m_accelerator( accelerator ){
+Command( const Callback<void()>& callback, const Accelerator& accelerator ) : m_callback( callback ), m_accelerator( accelerator ){
 }
 };
 
@@ -112,7 +112,7 @@ class Toggle
 public:
 Command m_command;
 BoolExportCallback m_exportCallback;
-Toggle( const Callback& callback, const Accelerator& accelerator, const BoolExportCallback& exportCallback ) : m_command( callback, accelerator ), m_exportCallback( exportCallback ){
+Toggle( const Callback<void()>& callback, const Accelerator& accelerator, const BoolExportCallback& exportCallback ) : m_command( callback, accelerator ), m_exportCallback( exportCallback ){
 }
 };
 
@@ -120,9 +120,9 @@ class KeyEvent
 {
 public:
 const Accelerator& m_accelerator;
-Callback m_keyDown;
-Callback m_keyUp;
-KeyEvent( const Accelerator& accelerator, const Callback& keyDown, const Callback& keyUp ) : m_accelerator( accelerator ), m_keyDown( keyDown ), m_keyUp( keyUp ){
+Callback<void()> m_keyDown;
+Callback<void()> m_keyUp;
+KeyEvent( const Accelerator& accelerator, const Callback<void()>& keyDown, const Callback<void()>& keyUp ) : m_accelerator( accelerator ), m_keyDown( keyDown ), m_keyUp( keyUp ){
 }
 };
 
index af19ef3521719737d946e6cf2de43b26738d7a6a..929a62a016341a195bfb1905f138df1982905e64 100644 (file)
 #include "pointer.h"
 
 void clicked_closure_callback( ui::Widget widget, gpointer data ){
-       ( *reinterpret_cast<Callback*>( data ) )( );
+       ( *reinterpret_cast<Callback<void()>*>( data ) )( );
 }
 
-void button_connect_callback( ui::Button button, const Callback& callback ){
+void button_connect_callback( ui::Button button, const Callback<void()>& callback ){
 #if 1
        g_signal_connect_swapped( G_OBJECT( button ), "clicked", G_CALLBACK( callback.getThunk() ), callback.getEnvironment() );
 #else
@@ -42,7 +42,7 @@ void button_connect_callback( ui::Button button, const Callback& callback ){
 #endif
 }
 
-void button_connect_callback( ui::ToolButton button, const Callback& callback ){
+void button_connect_callback( ui::ToolButton button, const Callback<void()>& callback ){
 #if 1
        g_signal_connect_swapped( G_OBJECT( button ), "clicked", G_CALLBACK( callback.getThunk() ), callback.getEnvironment() );
 #else
@@ -50,7 +50,7 @@ void button_connect_callback( ui::ToolButton button, const Callback& callback ){
 #endif
 }
 
-guint toggle_button_connect_callback( ui::ToggleButton button, const Callback& callback ){
+guint toggle_button_connect_callback( ui::ToggleButton button, const Callback<void()>& callback ){
 #if 1
        guint handler = g_signal_connect_swapped( G_OBJECT( button ), "toggled", G_CALLBACK( callback.getThunk() ), callback.getEnvironment() );
 #else
@@ -60,7 +60,7 @@ guint toggle_button_connect_callback( ui::ToggleButton button, const Callback& c
        return handler;
 }
 
-guint toggle_button_connect_callback( ui::ToggleToolButton button, const Callback& callback ){
+guint toggle_button_connect_callback( ui::ToggleToolButton button, const Callback<void()>& callback ){
 #if 1
        guint handler = g_signal_connect_swapped( G_OBJECT( button ), "toggled", G_CALLBACK( callback.getThunk() ), callback.getEnvironment() );
 #else
index cec03b2fd719a0a82b3aa75c6f430e6ba8bbf827..238b207c7a98e821ffdc336b449355612506fb3f 100644 (file)
@@ -29,10 +29,10 @@ typedef int gint;
 typedef gint gboolean;
 typedef unsigned int guint;
 
-void button_connect_callback( ui::Button button, const Callback& callback );
-void button_connect_callback( ui::ToolButton button, const Callback& callback );
-guint toggle_button_connect_callback( ui::ToggleButton button, const Callback& callback );
-guint toggle_button_connect_callback( ui::ToggleToolButton button, const Callback& callback );
+void button_connect_callback( ui::Button button, const Callback<void()>& callback );
+void button_connect_callback( ui::ToolButton button, const Callback<void()>& callback );
+guint toggle_button_connect_callback( ui::ToggleButton button, const Callback<void()>& callback );
+guint toggle_button_connect_callback( ui::ToggleToolButton button, const Callback<void()>& callback );
 
 void button_set_icon( ui::Button button, const char* icon );
 void toggle_button_set_active_no_signal( ui::ToggleButton item, gboolean active );
index 9696464a649ae6d3fce5230693a9ebe3911afc3a..39945827b78c8fa4a33c6fe3f5c5b9ef2aae58b0 100644 (file)
 #include "generic/callback.h"
 
 inline void closure_destroy( gpointer data, GClosure* closure ){
-       delete reinterpret_cast<Callback*>( data );
+       delete reinterpret_cast<Callback<void()>*>( data );
 }
 
-inline GClosure* create_cclosure( GCallback func, const Callback& callback ){
-       return g_cclosure_new( func, new Callback( callback ), closure_destroy );
+inline GClosure* create_cclosure( GCallback func, const Callback<void()>& callback ){
+       return g_cclosure_new( func, new Callback<void()>( callback ), closure_destroy );
 }
 
 inline GValue GValue_default(){
index 6200ba64e62c7c6ce057086c182f188b8d411e8d..baee2f69a125673d994e02cc9c3894eb2e430c19 100644 (file)
@@ -222,7 +222,7 @@ PathEntry PathEntry_new(){
 void PathEntry_setPath( PathEntry& self, const char* path ){
        gtk_entry_set_text( self.m_entry, path );
 }
-typedef ReferenceCaller1<PathEntry, const char*, PathEntry_setPath> PathEntrySetPathCaller;
+typedef ReferenceCaller<PathEntry, void(const char*), PathEntry_setPath> PathEntrySetPathCaller;
 
 void BrowsedPathEntry_clicked( ui::Widget widget, BrowsedPathEntry* self ){
        self->m_browse( PathEntrySetPathCaller( self->m_entry ) );
index b4367e5cfb9acb87c596a3bd8269c487d4641a49..79330143679b85a05e49fdfb3574294c3a1a9990 100644 (file)
@@ -107,8 +107,8 @@ PathEntry PathEntry_new();
 class BrowsedPathEntry
 {
 public:
-typedef Callback1<const char*> SetPathCallback;
-typedef Callback1<const SetPathCallback&> BrowseCallback;
+typedef Callback<void(const char*)> SetPathCallback;
+typedef Callback<void(const SetPathCallback&)> BrowseCallback;
 
 PathEntry m_entry;
 BrowseCallback m_browse;
index 6267951d755b34a1219c3c17906c0d9bdadbfa0c..97791023c2ba181cdc4269cbf4dae444f1e3b9f5 100644 (file)
@@ -28,7 +28,7 @@
 
 class IdleDraw
 {
-Callback m_draw;
+Callback<void()> m_draw;
 unsigned int m_handler;
 static gboolean draw( gpointer data ){
        reinterpret_cast<IdleDraw*>( data )->m_draw();
@@ -36,7 +36,7 @@ static gboolean draw( gpointer data ){
        return FALSE;
 }
 public:
-IdleDraw( const Callback& draw ) : m_draw( draw ), m_handler( 0 ){
+IdleDraw( const Callback<void()>& draw ) : m_draw( draw ), m_handler( 0 ){
 }
 ~IdleDraw(){
        if ( m_handler != 0 ) {
@@ -48,7 +48,7 @@ void queueDraw(){
                m_handler = g_idle_add( &draw, this );
        }
 }
-typedef MemberCaller<IdleDraw, &IdleDraw::queueDraw> QueueDrawCaller;
+typedef MemberCaller<IdleDraw, void(), &IdleDraw::queueDraw> QueueDrawCaller;
 
 void flush(){
        if ( m_handler != 0 ) {
index 93638e342e5b7a6a4d842ecab1d1213898e39d61..9d47642ec7855d7190b431831de1ce1dbfdb5f74 100644 (file)
@@ -78,10 +78,10 @@ ui::Menu create_sub_menu_with_mnemonic( ui::Menu parent, const char* mnemonic ){
 }
 
 void activate_closure_callback( ui::Widget widget, gpointer data ){
-       ( *reinterpret_cast<Callback*>( data ) )( );
+       ( *reinterpret_cast<Callback<void()>*>( data ) )( );
 }
 
-guint menu_item_connect_callback( ui::MenuItem item, const Callback& callback ){
+guint menu_item_connect_callback( ui::MenuItem item, const Callback<void()>& callback ){
 #if 1
        return g_signal_connect_swapped( G_OBJECT( item ), "activate", G_CALLBACK( callback.getThunk() ), callback.getEnvironment() );
 #else
@@ -89,7 +89,7 @@ guint menu_item_connect_callback( ui::MenuItem item, const Callback& callback ){
 #endif
 }
 
-guint check_menu_item_connect_callback( ui::CheckMenuItem item, const Callback& callback ){
+guint check_menu_item_connect_callback( ui::CheckMenuItem item, const Callback<void()>& callback ){
 #if 1
        guint handler = g_signal_connect_swapped( G_OBJECT( item ), "toggled", G_CALLBACK( callback.getThunk() ), callback.getEnvironment() );
 #else
@@ -99,33 +99,33 @@ guint check_menu_item_connect_callback( ui::CheckMenuItem item, const Callback&
        return handler;
 }
 
-ui::MenuItem new_menu_item_with_mnemonic( const char *mnemonic, const Callback& callback ){
+ui::MenuItem new_menu_item_with_mnemonic( const char *mnemonic, const Callback<void()>& callback ){
        auto item = ui::MenuItem( mnemonic, true );
        item.show();
        menu_item_connect_callback( item, callback );
        return item;
 }
 
-ui::MenuItem create_menu_item_with_mnemonic( ui::Menu menu, const char *mnemonic, const Callback& callback ){
+ui::MenuItem create_menu_item_with_mnemonic( ui::Menu menu, const char *mnemonic, const Callback<void()>& callback ){
        auto item = new_menu_item_with_mnemonic( mnemonic, callback );
        menu.add(item);
        return item;
 }
 
-ui::CheckMenuItem new_check_menu_item_with_mnemonic( const char* mnemonic, const Callback& callback ){
+ui::CheckMenuItem new_check_menu_item_with_mnemonic( const char* mnemonic, const Callback<void()>& callback ){
        auto item = ui::CheckMenuItem(GTK_CHECK_MENU_ITEM( gtk_check_menu_item_new_with_mnemonic( mnemonic ) ));
        item.show();
        check_menu_item_connect_callback( item, callback );
        return item;
 }
 
-ui::CheckMenuItem create_check_menu_item_with_mnemonic( ui::Menu menu, const char* mnemonic, const Callback& callback ){
+ui::CheckMenuItem create_check_menu_item_with_mnemonic( ui::Menu menu, const char* mnemonic, const Callback<void()>& callback ){
        auto item = new_check_menu_item_with_mnemonic( mnemonic, callback );
        menu.add(item);
        return item;
 }
 
-ui::RadioMenuItem new_radio_menu_item_with_mnemonic( GSList** group, const char* mnemonic, const Callback& callback ){
+ui::RadioMenuItem new_radio_menu_item_with_mnemonic( GSList** group, const char* mnemonic, const Callback<void()>& callback ){
        auto item = ui::RadioMenuItem(GTK_RADIO_MENU_ITEM( gtk_radio_menu_item_new_with_mnemonic( *group, mnemonic ) ));
        if ( *group == 0 ) {
                gtk_check_menu_item_set_active( GTK_CHECK_MENU_ITEM( item ), TRUE );
@@ -136,7 +136,7 @@ ui::RadioMenuItem new_radio_menu_item_with_mnemonic( GSList** group, const char*
        return item;
 }
 
-ui::RadioMenuItem create_radio_menu_item_with_mnemonic( ui::Menu menu, GSList** group, const char* mnemonic, const Callback& callback ){
+ui::RadioMenuItem create_radio_menu_item_with_mnemonic( ui::Menu menu, GSList** group, const char* mnemonic, const Callback<void()>& callback ){
        auto item = new_radio_menu_item_with_mnemonic( group, mnemonic, callback );
        menu.add(item);
        return item;
@@ -241,7 +241,7 @@ ui::MenuItem create_menu_item_with_mnemonic( ui::Menu menu, const char* mnemonic
 void check_menu_item_set_active_callback( GtkCheckMenuItem &item, bool enabled ){
        check_menu_item_set_active_no_signal( ui::CheckMenuItem(&item), enabled );
 }
-typedef ReferenceCaller1<GtkCheckMenuItem, bool, check_menu_item_set_active_callback> CheckMenuItemSetActiveCaller;
+typedef ReferenceCaller<GtkCheckMenuItem, void(bool), check_menu_item_set_active_callback> CheckMenuItemSetActiveCaller;
 
 ui::CheckMenuItem create_check_menu_item_with_mnemonic( ui::Menu menu, const char* mnemonic, const Toggle& toggle ){
        auto item = create_check_menu_item_with_mnemonic( menu, mnemonic, toggle.m_command.m_callback );
index 5d361f298c09923fb314d1fc26266beab06c96de..2ff78f89e58a4384f74b649e5a523db7e11bc5a1 100644 (file)
@@ -35,9 +35,9 @@ ui::TearoffMenuItem menu_tearoff( ui::Menu menu );
 ui::MenuItem new_sub_menu_item_with_mnemonic( const char* mnemonic );
 ui::Menu create_sub_menu_with_mnemonic( ui::MenuBar bar, const char* mnemonic );
 ui::Menu create_sub_menu_with_mnemonic( ui::Menu parent, const char* mnemonic );
-ui::MenuItem create_menu_item_with_mnemonic( ui::Menu menu, const char* mnemonic, const Callback& callback );
-ui::CheckMenuItem create_check_menu_item_with_mnemonic( ui::Menu menu, const char* mnemonic, const Callback& callback );
-ui::RadioMenuItem create_radio_menu_item_with_mnemonic( ui::Menu menu, GSList** group, const char* mnemonic, const Callback& callback );
+ui::MenuItem create_menu_item_with_mnemonic( ui::Menu menu, const char* mnemonic, const Callback<void()>& callback );
+ui::CheckMenuItem create_check_menu_item_with_mnemonic( ui::Menu menu, const char* mnemonic, const Callback<void()>& callback );
+ui::RadioMenuItem create_radio_menu_item_with_mnemonic( ui::Menu menu, GSList** group, const char* mnemonic, const Callback<void()>& callback );
 
 class Command;
 ui::MenuItem create_menu_item_with_mnemonic( ui::Menu menu, const char* mnemonic, const Command& command );
index 6fc043c7efbb3929d72577d622e8ba6f5b3bf627..53318679a4ca51150994da1e08587d7b603bca03 100644 (file)
@@ -34,8 +34,8 @@ void widget_connect_escape_clear_focus_widget(ui::Widget widget);
 
 class NonModalEntry {
     bool m_editing;
-    Callback m_apply;
-    Callback m_cancel;
+    Callback<void()> m_apply;
+    Callback<void()> m_cancel;
 
     static gboolean focus_in(ui::Entry entry, GdkEventFocus *event, NonModalEntry *self);
 
@@ -48,7 +48,7 @@ class NonModalEntry {
     static gboolean escape(ui::Entry entry, GdkEventKey *event, NonModalEntry *self);
 
 public:
-    NonModalEntry(const Callback &apply, const Callback &cancel) : m_editing(false), m_apply(apply), m_cancel(cancel)
+    NonModalEntry(const Callback<void()> &apply, const Callback<void()> &cancel) : m_editing(false), m_apply(apply), m_cancel(cancel)
     {
     }
 
@@ -57,8 +57,8 @@ public:
 
 
 class NonModalSpinner {
-    Callback m_apply;
-    Callback m_cancel;
+    Callback<void()> m_apply;
+    Callback<void()> m_cancel;
 
     static gboolean changed(ui::SpinButton spin, NonModalSpinner *self);
 
@@ -67,7 +67,7 @@ class NonModalSpinner {
     static gboolean escape(ui::SpinButton spin, GdkEventKey *event, NonModalSpinner *self);
 
 public:
-    NonModalSpinner(const Callback &apply, const Callback &cancel) : m_apply(apply), m_cancel(cancel)
+    NonModalSpinner(const Callback<void()> &apply, const Callback<void()> &cancel) : m_apply(apply), m_cancel(cancel)
     {
     }
 
@@ -76,10 +76,10 @@ public:
 
 
 class NonModalRadio {
-    Callback m_changed;
+    Callback<void()> m_changed;
 
 public:
-    NonModalRadio(const Callback &changed) : m_changed(changed)
+    NonModalRadio(const Callback<void()> &changed) : m_changed(changed)
     {
     }
 
index d2ab45a76e0598e68ec69c3d4d2e591af8389c53..87651466b6dd596ebb86817cb5cabd59e3dc49c3 100644 (file)
@@ -37,14 +37,14 @@ void toolbar_append( ui::Toolbar toolbar, ui::ToolItem button, const char* descr
        toolbar.add(button);
 }
 
-ui::ToolButton toolbar_append_button( ui::Toolbar toolbar, const char* description, const char* icon, const Callback& callback ){
+ui::ToolButton toolbar_append_button( ui::Toolbar toolbar, const char* description, const char* icon, const Callback<void()>& callback ){
        auto button = ui::ToolButton(GTK_TOOL_BUTTON(gtk_tool_button_new(new_local_image(icon), nullptr)));
        button_connect_callback(button, callback);
        toolbar_append(toolbar, button, description);
        return button;
 }
 
-ui::ToggleToolButton toolbar_append_toggle_button( ui::Toolbar toolbar, const char* description, const char* icon, const Callback& callback ){
+ui::ToggleToolButton toolbar_append_toggle_button( ui::Toolbar toolbar, const char* description, const char* icon, const Callback<void()>& callback ){
        auto button = ui::ToggleToolButton(GTK_TOGGLE_TOOL_BUTTON(gtk_toggle_tool_button_new()));
        toggle_button_connect_callback(button, callback);
        gtk_tool_button_set_icon_widget(GTK_TOOL_BUTTON(button), new_local_image(icon));
@@ -60,7 +60,7 @@ ui::ToolButton toolbar_append_button( ui::Toolbar toolbar, const char* descripti
 void toggle_button_set_active_callback( GtkToggleToolButton& button, bool active ){
        toggle_button_set_active_no_signal( ui::ToggleToolButton(&button), active );
 }
-using ToggleButtonSetActiveCaller = ReferenceCaller1<GtkToggleToolButton, bool, toggle_button_set_active_callback>;
+using ToggleButtonSetActiveCaller = ReferenceCaller<GtkToggleToolButton, void(bool), toggle_button_set_active_callback>;
 
 ui::ToggleToolButton toolbar_append_toggle_button( ui::Toolbar toolbar, const char* description, const char* icon, const Toggle& toggle ){
        auto button = toolbar_append_toggle_button( toolbar, description, icon, toggle.m_command.m_callback );
index 60515019e876a13fc12220bb0495291ade0c9b76..f3481783028943c680be1f49d4522905f802f7fd 100644 (file)
@@ -28,9 +28,9 @@
 class Command;
 class Toggle;
 
-ui::ToolButton toolbar_append_button( ui::Toolbar toolbar, const char* description, const char* icon, const Callback& callback );
+ui::ToolButton toolbar_append_button( ui::Toolbar toolbar, const char* description, const char* icon, const Callback<void()>& callback );
 ui::ToolButton toolbar_append_button( ui::Toolbar toolbar, const char* description, const char* icon, const Command& command );
-ui::ToggleToolButton toolbar_append_toggle_button( ui::Toolbar toolbar, const char* description, const char* icon, const Callback& callback );
+ui::ToggleToolButton toolbar_append_toggle_button( ui::Toolbar toolbar, const char* description, const char* icon, const Callback<void()>& callback );
 ui::ToggleToolButton toolbar_append_toggle_button( ui::Toolbar toolbar, const char* description, const char* icon, const Toggle& toggle );
 
 #endif
index 76b318dc3906fa8b3694f79813859f81b0a2547a..9592b4953f58c923410ec8c13973e97b4b2cef50 100644 (file)
@@ -51,7 +51,7 @@ public:
         m_exportCallback(callback);
     }
 
-    typedef MemberCaller1<ToggleItem, const BoolImportCallback &, &ToggleItem::addCallback> AddCallbackCaller;
+    typedef MemberCaller<ToggleItem, void(const BoolImportCallback &), &ToggleItem::addCallback> AddCallbackCaller;
 };
 
 class ToggleShown {
@@ -79,13 +79,13 @@ public:
 
     void exportActive(const BoolImportCallback &importCallback);
 
-    typedef MemberCaller1<ToggleShown, const BoolImportCallback &, &ToggleShown::exportActive> ActiveCaller;
+    typedef MemberCaller<ToggleShown, void(const BoolImportCallback &), &ToggleShown::exportActive> ActiveCaller;
 
     void set(bool shown);
 
     void toggle();
 
-    typedef MemberCaller<ToggleShown, &ToggleShown::toggle> ToggleCaller;
+    typedef MemberCaller<ToggleShown, void(), &ToggleShown::toggle> ToggleCaller;
 
     void connect(ui::Widget widget);
 };
@@ -93,7 +93,7 @@ public:
 
 void widget_queue_draw(ui::Widget &widget);
 
-typedef ReferenceCaller<ui::Widget, widget_queue_draw> WidgetQueueDrawCaller;
+typedef ReferenceCaller<ui::Widget, void(), widget_queue_draw> WidgetQueueDrawCaller;
 
 
 void widget_make_default(ui::Widget widget);
index 5a24a72903fae10525abb1a54ef0874afc6aa45f..cc2a7f628865efe2497740b256b1f4a51a73da22 100644 (file)
@@ -68,11 +68,11 @@ void window_set_position(ui::Window window, const WindowPosition &position);
 
 void WindowPosition_Parse(WindowPosition &position, const char *value);
 
-typedef ReferenceCaller1<WindowPosition, const char *, WindowPosition_Parse> WindowPositionImportStringCaller;
+typedef ReferenceCaller<WindowPosition, void(const char *), WindowPosition_Parse> WindowPositionImportStringCaller;
 
 void WindowPosition_Write(const WindowPosition &position, const StringImportCallback &importCallback);
 
-typedef ConstReferenceCaller1<WindowPosition, const StringImportCallback &, WindowPosition_Write> WindowPositionExportStringCaller;
+typedef ConstReferenceCaller<WindowPosition, void(const StringImportCallback &), WindowPosition_Write> WindowPositionExportStringCaller;
 
 
 class WindowPositionTracker {
@@ -99,11 +99,11 @@ public:
 
 void WindowPositionTracker_importString(WindowPositionTracker &self, const char *value);
 
-typedef ReferenceCaller1<WindowPositionTracker, const char *, WindowPositionTracker_importString> WindowPositionTrackerImportStringCaller;
+typedef ReferenceCaller<WindowPositionTracker, void(const char *), WindowPositionTracker_importString> WindowPositionTrackerImportStringCaller;
 
 void WindowPositionTracker_exportString(const WindowPositionTracker &self, const StringImportCallback &importer);
 
-typedef ConstReferenceCaller1<WindowPositionTracker, const StringImportCallback &, WindowPositionTracker_exportString> WindowPositionTrackerExportStringCaller;
+typedef ConstReferenceCaller<WindowPositionTracker, void(const StringImportCallback &), WindowPositionTracker_exportString> WindowPositionTrackerExportStringCaller;
 
 
 #endif
index eeb95e23579860c11f73088ff9e2bcde3b40c610..af9dd2bba31a181f3eb6b4e7c24f7e4c93cf8ed1 100644 (file)
@@ -135,14 +135,14 @@ void transformChanged(){
                ( *i ).second->transformChanged();
        }
 }
-typedef MemberCaller<InstanceSet, &InstanceSet::transformChanged> TransformChangedCaller;
+typedef MemberCaller<InstanceSet, void(), &InstanceSet::transformChanged> TransformChangedCaller;
 void boundsChanged(){
        for ( InstanceMap::iterator i = m_instances.begin(); i != m_instances.end(); ++i )
        {
                ( *i ).second->boundsChanged();
        }
 }
-typedef MemberCaller<InstanceSet, &InstanceSet::boundsChanged> BoundsChangedCaller;
+typedef MemberCaller<InstanceSet, void(), &InstanceSet::boundsChanged> BoundsChangedCaller;
 };
 
 template<typename Functor>
@@ -162,7 +162,7 @@ static void apply( InstanceSet& instances ){
                InstanceTypeCast<Type>::cast(instance)->evaluateTransform();
        });
 }
-typedef ReferenceCaller<InstanceSet, &InstanceSetEvaluateTransform<Type>::apply> Caller;
+typedef ReferenceCaller<InstanceSet, void(), &InstanceSetEvaluateTransform<Type>::apply> Caller;
 };
 
 #endif
index 07da39dcf7466e8c402df287ed48479ee46d5720..474ce4b4fb667835051cf2eed9eb0a9305a46928 100644 (file)
@@ -58,7 +58,7 @@ std::size_t m_size;
 std::size_t m_saved;
 typedef void ( UndoFileChangeTracker::*Pending )();
 Pending m_pending;
-Callback m_changed;
+Callback<void()> m_changed;
 
 public:
 UndoFileChangeTracker() : m_size( 0 ), m_saved( MAPFILE_MAX_CHANGES ), m_pending( 0 ){
@@ -114,7 +114,7 @@ bool saved() const {
        return m_saved == m_size;
 }
 
-void setChangedCallback( const Callback& changed ){
+void setChangedCallback( const Callback<void()>& changed ){
        m_changed = changed;
        m_changed();
 }
index 7488186d80da8b9c3653165986adfe2b9e967486..e1c05d464d8ba5ee096c55f6f08c2a122db47e9e 100644 (file)
@@ -107,7 +107,7 @@ NodeType() : m_typeId( NODETYPEID_NONE ){
 void initialise(){
        m_typeId = GlobalSceneGraph().getNodeTypeId( Name() );
 }
-typedef MemberCaller<NodeType<Type>, &NodeType<Type>::initialise> InitialiseCaller;
+typedef MemberCaller<NodeType<Type>, void(), &NodeType<Type>::initialise> InitialiseCaller;
 TypeId getTypeId(){
 #if GDEF_DEBUG
        ASSERT_MESSAGE( m_typeId != NODETYPEID_NONE, "node-type " << makeQuoted( Name() ) << " used before being initialised" );
@@ -442,7 +442,7 @@ InstanceType() : m_typeId( INSTANCETYPEID_NONE ){
 void initialise(){
        m_typeId = GlobalSceneGraph().getInstanceTypeId( Name() );
 }
-typedef MemberCaller<InstanceType<Type>, &InstanceType<Type>::initialise> InitialiseCaller;
+typedef MemberCaller<InstanceType<Type>, void(), &InstanceType<Type>::initialise> InitialiseCaller;
 TypeId getTypeId(){
 #if GDEF_DEBUG
        ASSERT_MESSAGE( m_typeId != INSTANCETYPEID_NONE, "instance-type " << makeQuoted( Name() ) << " used before being initialised" );
@@ -575,8 +575,8 @@ mutable bool m_childSelected;
 mutable bool m_childSelectedChanged;
 mutable bool m_parentSelected;
 mutable bool m_parentSelectedChanged;
-Callback m_childSelectedChangedCallback;
-Callback m_transformChangedCallback;
+Callback<void()> m_childSelectedChangedCallback;
+Callback<void()> m_transformChangedCallback;
 
 
 void evaluateTransform() const {
@@ -674,7 +674,7 @@ void transformChanged(){
        GlobalSceneGraph().traverse_subgraph( TransformChangedWalker(), m_path );
        boundsChanged();
 }
-void setTransformChangedCallback( const Callback& callback ){
+void setTransformChangedCallback( const Callback<void()>& callback ){
        m_transformChangedCallback = callback;
 }
 
@@ -711,7 +711,7 @@ bool childSelected() const {
        return m_childSelected;
 }
 
-void setChildSelectedChangedCallback( const Callback& callback ){
+void setChildSelectedChangedCallback( const Callback<void()>& callback ){
        m_childSelectedChangedCallback = callback;
 }
 void selectedChanged(){
@@ -934,10 +934,10 @@ virtual void decrement() = 0;
 
 class SimpleCounter : public Counter
 {
-Callback m_countChanged;
+Callback<void()> m_countChanged;
 std::size_t m_count;
 public:
-void setCountChangedCallback( const Callback& countChanged ){
+void setCountChangedCallback( const Callback<void()>& countChanged ){
        m_countChanged = countChanged;
 }
 void increment(){
index cb0e43e5171cd1135b91840d0195ad1aba420a71..06a905c74a2440c071e4eaf2da00e79010e5e19f 100644 (file)
@@ -114,7 +114,7 @@ void selectedChanged( const Selectable& selectable ){
 
        Instance::selectedChanged();
 }
-typedef MemberCaller1<SelectableInstance, const Selectable&, &SelectableInstance::selectedChanged> SelectedChangedCaller;
+typedef MemberCaller<SelectableInstance, void(const Selectable&), &SelectableInstance::selectedChanged> SelectedChangedCaller;
 };
 
 
index 9eaa9d0b2b49e262e5a06b914beb922056a5e3a8..a8dcdfc9711bf5bf60b0a63c94a185f7cdd683c3 100644 (file)
@@ -77,8 +77,8 @@ public:
     }
 };
 
-class SignalHandler : public SignalHandlerN<Callback0<SignalHandlerResult>, SignalHandlerCaller1> {
-    using SignalHandlerN<Callback0<SignalHandlerResult>, SignalHandlerCaller1>::SignalHandlerN;
+class SignalHandler : public SignalHandlerN<Callback<SignalHandlerResult()>, SignalHandlerCaller1> {
+    using SignalHandlerN<Callback<SignalHandlerResult()>, SignalHandlerCaller1>::SignalHandlerN;
 };
 
 template<typename Caller>
@@ -91,8 +91,8 @@ inline SignalHandler makeSignalHandler(const Caller &caller, get_argument<Caller
 }
 
 template<typename FirstArgument>
-class SignalHandler1 : public SignalHandlerN<Callback1<FirstArgument, SignalHandlerResult>, SignalHandlerCaller2> {
-    using SignalHandlerN<Callback1<FirstArgument, SignalHandlerResult>, SignalHandlerCaller2>::SignalHandlerN;
+class SignalHandler1 : public SignalHandlerN<Callback<SignalHandlerResult(FirstArgument)>, SignalHandlerCaller2> {
+    using SignalHandlerN<Callback<SignalHandlerResult(FirstArgument)>, SignalHandlerCaller2>::SignalHandlerN;
 };
 
 template<typename Caller>
@@ -107,8 +107,8 @@ makeSignalHandler1(const Caller &caller, get_argument<Caller, 0> callee) {
 
 template<typename FirstArgument, typename SecondArgument>
 class SignalHandler2
-        : public SignalHandlerN<Callback2<FirstArgument, SecondArgument, SignalHandlerResult>, SignalHandlerCaller3> {
-    using SignalHandlerN<Callback2<FirstArgument, SecondArgument, SignalHandlerResult>, SignalHandlerCaller3>::SignalHandlerN;
+        : public SignalHandlerN<Callback<SignalHandlerResult(FirstArgument, SecondArgument)>, SignalHandlerCaller3> {
+    using SignalHandlerN<Callback<SignalHandlerResult(FirstArgument, SecondArgument)>, SignalHandlerCaller3>::SignalHandlerN;
 };
 
 template<typename Caller>
@@ -134,8 +134,8 @@ inline SignalHandler2<
 
 template<typename FirstArgument, typename SecondArgument, typename ThirdArgument>
 class SignalHandler3
-        : public SignalHandlerN<Callback3<FirstArgument, SecondArgument, ThirdArgument, SignalHandlerResult>, SignalHandlerCaller4> {
-    using SignalHandlerN<Callback3<FirstArgument, SecondArgument, ThirdArgument, SignalHandlerResult>, SignalHandlerCaller4>::SignalHandlerN;
+        : public SignalHandlerN<Callback<SignalHandlerResult(FirstArgument, SecondArgument, ThirdArgument)>, SignalHandlerCaller4> {
+    using SignalHandlerN<Callback<SignalHandlerResult(FirstArgument, SecondArgument, ThirdArgument)>, SignalHandlerCaller4>::SignalHandlerN;
 };
 
 template<typename Caller>
index 6c64cf8856afc7271caa6151b288c35e84ffab55..caade86b928ecdce01e397357f2f947688ffb9f6 100644 (file)
@@ -21,39 +21,39 @@ class A3
 SignalHandlerResult handler0( Test& ){
        return SIGNAL_CONTINUE_EMISSION;
 }
-typedef Function1<Test&, SignalHandlerResult, handler0> TestHandler0;
+typedef Function<SignalHandlerResult(Test&), handler0> TestHandler0;
 
 int function0( Test& ){
        return 7;
 }
-typedef Function1<Test&, int, function0> TestFunction0;
+typedef Function<int(Test&), function0> TestFunction0;
 
 SignalHandlerResult handler1( Test&, A1 ){
        return SIGNAL_CONTINUE_EMISSION;
 }
-typedef Function2<Test&, A1, SignalHandlerResult, handler1> TestHandler1;
+typedef Function<SignalHandlerResult(Test&, A1), handler1> TestHandler1;
 
 void function1( Test&, A1 ){
 }
-typedef ReferenceCaller1<Test, A1, function1> TestFunction1;
+typedef ReferenceCaller<Test, void(A1), function1> TestFunction1;
 
 SignalHandlerResult handler2( Test&, A1, A2 ){
        return SIGNAL_CONTINUE_EMISSION;
 }
-typedef Function3<Test&, A1, A2, SignalHandlerResult, handler2> TestHandler2;
+typedef Function<SignalHandlerResult(Test&, A1, A2), handler2> TestHandler2;
 
 void function2( Test&, A1, A2 ){
 }
-typedef Function3<Test&, A1, A2, void, function2> TestFunction2;
+typedef Function<void(Test&, A1, A2), function2> TestFunction2;
 
 SignalHandlerResult handler3( Test&, A1, A2, A3 ){
        return SIGNAL_CONTINUE_EMISSION;
 }
-typedef Function4<Test&, A1, A2, A3, SignalHandlerResult, handler3> TestHandler3;
+typedef Function<SignalHandlerResult(Test&, A1, A2, A3), handler3> TestHandler3;
 
 void function3( Test&, A1, A2, A3 ){
 }
-typedef Function4<Test&, A1, A2, A3, void, function3> TestFunction3;
+typedef Function<void(Test&, A1, A2, A3), function3> TestFunction3;
 
 void testSignals(){
        Test test;
index ef8085992f8a0a193afaf276730d03ec4f4a9314..caf93865a0dfba9349584b98a4e7e85d5fe42bf4 100644 (file)
@@ -292,33 +292,33 @@ inline TextOutputStreamType& ostream_write( TextOutputStreamType& outputStream,
 inline void CopiedString_importString( CopiedString& self, const char* string ){
        self = string;
 }
-typedef ReferenceCaller1<CopiedString, const char*, CopiedString_importString> CopiedStringImportStringCaller;
+typedef ReferenceCaller<CopiedString, void(const char*), CopiedString_importString> CopiedStringImportStringCaller;
 inline void CopiedString_exportString( const CopiedString& self, const StringImportCallback& importer ){
        importer( self.c_str() );
 }
-typedef ConstReferenceCaller1<CopiedString, const StringImportCallback&, CopiedString_exportString> CopiedStringExportStringCaller;
+typedef ConstReferenceCaller<CopiedString, void(const StringImportCallback&), CopiedString_exportString> CopiedStringExportStringCaller;
 
 inline void Bool_importString( bool& self, const char* string ){
        self = string_equal( string, "true" );
 }
-typedef ReferenceCaller1<bool, const char*, Bool_importString> BoolImportStringCaller;
+typedef ReferenceCaller<bool, void(const char*), Bool_importString> BoolImportStringCaller;
 inline void Bool_exportString( const bool& self, const StringImportCallback& importer ){
        importer( self ? "true" : "false" );
 }
-typedef ConstReferenceCaller1<bool, const StringImportCallback&, Bool_exportString> BoolExportStringCaller;
+typedef ConstReferenceCaller<bool, void(const StringImportCallback&), Bool_exportString> BoolExportStringCaller;
 
 inline void Int_importString( int& self, const char* string ){
        if ( !string_parse_int( string, self ) ) {
                self = 0;
        }
 }
-typedef ReferenceCaller1<int, const char*, Int_importString> IntImportStringCaller;
+typedef ReferenceCaller<int, void(const char*), Int_importString> IntImportStringCaller;
 inline void Int_exportString( const int& self, const StringImportCallback& importer ){
        char buffer[16];
        sprintf( buffer, "%d", self );
        importer( buffer );
 }
-typedef ConstReferenceCaller1<int, const StringImportCallback&, Int_exportString> IntExportStringCaller;
+typedef ConstReferenceCaller<int, void(const StringImportCallback&), Int_exportString> IntExportStringCaller;
 
 inline void Size_importString( std::size_t& self, const char* string ){
        int i;
@@ -330,39 +330,39 @@ inline void Size_importString( std::size_t& self, const char* string ){
                self = 0;
        }
 }
-typedef ReferenceCaller1<std::size_t, const char*, Size_importString> SizeImportStringCaller;
+typedef ReferenceCaller<std::size_t, void(const char*), Size_importString> SizeImportStringCaller;
 inline void Size_exportString( const std::size_t& self, const StringImportCallback& importer ){
        char buffer[16];
        sprintf( buffer, "%u", Unsigned( self ) );
        importer( buffer );
 }
-typedef ConstReferenceCaller1<std::size_t, const StringImportCallback&, Size_exportString> SizeExportStringCaller;
+typedef ConstReferenceCaller<std::size_t, void(const StringImportCallback&), Size_exportString> SizeExportStringCaller;
 
 inline void Float_importString( float& self, const char* string ){
        if ( !string_parse_float( string, self ) ) {
                self = 0;
        }
 }
-typedef ReferenceCaller1<float, const char*, Float_importString> FloatImportStringCaller;
+typedef ReferenceCaller<float, void(const char*), Float_importString> FloatImportStringCaller;
 inline void Float_exportString( const float& self, const StringImportCallback& importer ){
        char buffer[16];
        sprintf( buffer, "%g", self );
        importer( buffer );
 }
-typedef ConstReferenceCaller1<float, const StringImportCallback&, Float_exportString> FloatExportStringCaller;
+typedef ConstReferenceCaller<float, void(const StringImportCallback&), Float_exportString> FloatExportStringCaller;
 
 inline void Vector3_importString( Vector3& self, const char* string ){
        if ( !string_parse_vector3( string, self ) ) {
                self = Vector3( 0, 0, 0 );
        }
 }
-typedef ReferenceCaller1<Vector3, const char*, Vector3_importString> Vector3ImportStringCaller;
+typedef ReferenceCaller<Vector3, void(const char*), Vector3_importString> Vector3ImportStringCaller;
 inline void Vector3_exportString( const Vector3& self, const StringImportCallback& importer ){
        char buffer[64];
        sprintf( buffer, "%g %g %g", self[0], self[1], self[2] );
        importer( buffer );
 }
-typedef ConstReferenceCaller1<Vector3, const StringImportCallback&, Vector3_exportString> Vector3ExportStringCaller;
+typedef ConstReferenceCaller<Vector3, void(const StringImportCallback&), Vector3_exportString> Vector3ExportStringCaller;
 
 
 
@@ -392,7 +392,7 @@ operator bool() const
 inline void Bool_toString( const StringImportCallback& self, bool value ){
        Bool_exportString( value, self );
 }
-typedef ConstReferenceCaller1<StringImportCallback, bool, Bool_toString> BoolToString;
+typedef ConstReferenceCaller<StringImportCallback, void(bool), Bool_toString> BoolToString;
 
 
 template<typename Caller>
@@ -422,7 +422,7 @@ operator int() const
 inline void Int_toString( const StringImportCallback& self, int value ){
        Int_exportString( value, self );
 }
-typedef ConstReferenceCaller1<StringImportCallback, int, Int_toString> IntToString;
+typedef ConstReferenceCaller<StringImportCallback, void(int), Int_toString> IntToString;
 
 
 template<typename Caller>
@@ -453,7 +453,7 @@ operator std::size_t() const
 inline void Size_toString( const StringImportCallback& self, std::size_t value ){
        Size_exportString( value, self );
 }
-typedef ConstReferenceCaller1<StringImportCallback, std::size_t, Size_toString> SizeToString;
+typedef ConstReferenceCaller<StringImportCallback, void(std::size_t), Size_toString> SizeToString;
 
 
 template<typename Caller>
index 91c8cb25b4652ce9d341f87eb06f0e9c3e488910..2974979729fc10921025249fbd1acf6eaa2f78df 100644 (file)
@@ -116,12 +116,12 @@ class TransformModifier : public Transformable
 Translation m_translation;
 Rotation m_rotation;
 Scale m_scale;
-Callback m_changed;
-Callback m_apply;
+Callback<void()> m_changed;
+Callback<void()> m_apply;
 TransformModifierType m_type;
 public:
 
-TransformModifier( const Callback& changed, const Callback& apply ) :
+TransformModifier( const Callback<void()>& changed, const Callback<void()>& apply ) :
        m_translation( c_translation_identity ),
        m_rotation( c_quaternion_identity ),
        m_scale( c_scale_identity ),
index b789c5c48877dd3436f390758e3f0fb221613427..4ceca552e23a936ea11cd8ea40cd2ab01539b9cc 100644 (file)
 
 class InitialiserList
 {
-typedef std::list<Callback> Initialisers;
+typedef std::list<Callback<void()>> Initialisers;
 Initialisers m_initialisers;
 mutable bool m_initialised;
 public:
 InitialiserList() : m_initialised( false ){
 }
-void addInitialiser( const Callback& callback ){
+void addInitialiser( const Callback<void()>& callback ){
        m_initialisers.push_back( callback );
 }
 void initialise() const {
index 4fc441193975a9fb47428021882354df94a0cd53..06d474bf56b13fcaa5d546d3acaa6f1ba72cb0a2 100644 (file)
@@ -49,7 +49,7 @@ const Copyable& get() const {
 template<typename Copyable>
 class ObservedUndoableObject : public Undoable
 {
-typedef Callback1<const Copyable&> ImportCallback;
+typedef Callback<void(const Copyable&)> ImportCallback;
 
 Copyable& m_object;
 ImportCallback m_importCallback;
index 3e2da58b3d3bc64bebf774e541da56b04581a16a..a73c5332c779bd93ede5ecd2f4d5539e97ef8ae5 100644 (file)
@@ -59,12 +59,12 @@ inline void write_angle( float angle, Entity* entity ){
 
 class AngleKey
 {
-Callback m_angleChanged;
+Callback<void()> m_angleChanged;
 public:
 float m_angle;
 
 
-AngleKey( const Callback& angleChanged )
+AngleKey( const Callback<void()>& angleChanged )
        : m_angleChanged( angleChanged ), m_angle( ANGLEKEY_IDENTITY ){
 }
 
@@ -72,7 +72,7 @@ void angleChanged( const char* value ){
        read_angle( m_angle, value );
        m_angleChanged();
 }
-typedef MemberCaller1<AngleKey, const char*, &AngleKey::angleChanged> AngleChangedCaller;
+typedef MemberCaller<AngleKey, void(const char*), &AngleKey::angleChanged> AngleChangedCaller;
 
 void write( Entity* entity ) const {
        write_angle( m_angle, entity );
index 85f08aa8c2bed3f33c53df0df5e1841c0c8c8674..54f51f9bfe939efdbdd64f6e9ceafc63b64ea827 100644 (file)
@@ -96,12 +96,12 @@ inline Vector3 angles_rotated( const Vector3& angles, const Quaternion& rotation
 
 class AnglesKey
 {
-Callback m_anglesChanged;
+Callback<void()> m_anglesChanged;
 public:
 Vector3 m_angles;
 
 
-AnglesKey( const Callback& anglesChanged )
+AnglesKey( const Callback<void()>& anglesChanged )
        : m_anglesChanged( anglesChanged ), m_angles( ANGLESKEY_IDENTITY ){
 }
 
@@ -109,13 +109,13 @@ void angleChanged( const char* value ){
        read_angle( m_angles, value );
        m_anglesChanged();
 }
-typedef MemberCaller1<AnglesKey, const char*, &AnglesKey::angleChanged> AngleChangedCaller;
+typedef MemberCaller<AnglesKey, void(const char*), &AnglesKey::angleChanged> AngleChangedCaller;
 
 void anglesChanged( const char* value ){
        read_angles( m_angles, value );
        m_anglesChanged();
 }
-typedef MemberCaller1<AnglesKey, const char*, &AnglesKey::anglesChanged> AnglesChangedCaller;
+typedef MemberCaller<AnglesKey, void(const char*), &AnglesKey::anglesChanged> AnglesChangedCaller;
 
 void write( Entity* entity ) const {
        write_angles( m_angles, entity );
index e0b42ad7e7b6a8cfb3ad51dab05a39ad5d5102e3..86e0deb60037900f6e2c863a239dc3c1946135d9 100644 (file)
@@ -47,7 +47,7 @@ inline void write_colour( const Vector3& colour, Entity* entity ){
 
 class Colour
 {
-Callback m_colourChanged;
+Callback<void()> m_colourChanged;
 Shader* m_state;
 
 void capture_state(){
@@ -60,7 +60,7 @@ void release_state(){
 public:
 Vector3 m_colour;
 
-Colour( const Callback& colourChanged )
+Colour( const Callback<void()>& colourChanged )
        : m_colourChanged( colourChanged ){
        default_colour( m_colour );
        capture_state();
@@ -76,7 +76,7 @@ void colourChanged( const char* value ){
 
        m_colourChanged();
 }
-typedef MemberCaller1<Colour, const char*, &Colour::colourChanged> ColourChangedCaller;
+typedef MemberCaller<Colour, void(const char*), &Colour::colourChanged> ColourChangedCaller;
 
 
 void write( Entity* entity ) const {
index cefad32a2c5d1ce90d67f0a65722b472814e1367..c22a51aa899cb043602b3405c82cddfda6049057 100644 (file)
@@ -253,7 +253,7 @@ void curveChanged(){
 
        m_selectedRender.reserve( m_controlPoints.size() );
 }
-typedef MemberCaller<CurveEdit, &CurveEdit::curveChanged> CurveChangedCaller;
+typedef MemberCaller<CurveEdit, void(), &CurveEdit::curveChanged> CurveChangedCaller;
 };
 
 
@@ -263,7 +263,7 @@ const int NURBS_degree = 3;
 class NURBSCurve
 {
 Signal0 m_curveChanged;
-Callback m_boundsChanged;
+Callback<void()> m_boundsChanged;
 public:
 ControlPoints m_controlPoints;
 ControlPoints m_controlPointsTransformed;
@@ -272,7 +272,7 @@ Knots m_knots;
 RenderableCurve m_renderCurve;
 AABB m_bounds;
 
-NURBSCurve( const Callback& boundsChanged ) : m_boundsChanged( boundsChanged ){
+NURBSCurve( const Callback<void()>& boundsChanged ) : m_boundsChanged( boundsChanged ){
 }
 
 SignalHandlerId connect( const SignalHandler& curveChanged ){
@@ -343,20 +343,20 @@ void curveChanged( const char* value ){
        m_controlPointsTransformed = m_controlPoints;
        curveChanged();
 }
-typedef MemberCaller1<NURBSCurve, const char*, &NURBSCurve::curveChanged> CurveChangedCaller;
+typedef MemberCaller<NURBSCurve, void(const char*), &NURBSCurve::curveChanged> CurveChangedCaller;
 };
 
 class CatmullRomSpline
 {
 Signal0 m_curveChanged;
-Callback m_boundsChanged;
+Callback<void()> m_boundsChanged;
 public:
 ControlPoints m_controlPoints;
 ControlPoints m_controlPointsTransformed;
 RenderableCurve m_renderCurve;
 AABB m_bounds;
 
-CatmullRomSpline( const Callback& boundsChanged ) : m_boundsChanged( boundsChanged ){
+CatmullRomSpline( const Callback<void()>& boundsChanged ) : m_boundsChanged( boundsChanged ){
 }
 
 SignalHandlerId connect( const SignalHandler& curveChanged ){
@@ -411,7 +411,7 @@ void curveChanged( const char* value ){
        m_controlPointsTransformed = m_controlPoints;
        curveChanged();
 }
-typedef MemberCaller1<CatmullRomSpline, const char*, &CatmullRomSpline::curveChanged> CurveChangedCaller;
+typedef MemberCaller<CatmullRomSpline, void(const char*), &CatmullRomSpline::curveChanged> CurveChangedCaller;
 };
 
 const char* const curve_Nurbs = "curve_Nurbs";
index bab1bbe813010bee85dc0910b613653bb749773e..ceb19b0b876055350f306b2989fcf0efe567bcac 100644 (file)
@@ -103,8 +103,8 @@ SignalHandlerId m_curveCatmullRomChanged;
 private:
 mutable AABB m_curveBounds;
 
-Callback m_transformChanged;
-Callback m_evaluateTransform;
+Callback<void()> m_transformChanged;
+Callback<void()> m_evaluateTransform;
 
 CopiedString m_name;
 CopiedString m_modelKey;
@@ -199,7 +199,7 @@ void nameChanged( const char* value ){
        m_name = value;
        updateIsModel();
 }
-typedef MemberCaller1<Doom3Group, const char*, &Doom3Group::nameChanged> NameChangedCaller;
+typedef MemberCaller<Doom3Group, void(const char*), &Doom3Group::nameChanged> NameChangedCaller;
 
 void modelChanged( const char* value ){
        m_modelKey = value;
@@ -212,7 +212,7 @@ void modelChanged( const char* value ){
                m_model.modelChanged( "" );
        }
 }
-typedef MemberCaller1<Doom3Group, const char*, &Doom3Group::modelChanged> ModelChangedCaller;
+typedef MemberCaller<Doom3Group, void(const char*), &Doom3Group::modelChanged> ModelChangedCaller;
 
 void updateTransform(){
        m_transform.localToParent() = g_matrix4_identity;
@@ -225,19 +225,19 @@ void updateTransform(){
                m_funcStaticOrigin.originChanged();
        }
 }
-typedef MemberCaller<Doom3Group, &Doom3Group::updateTransform> UpdateTransformCaller;
+typedef MemberCaller<Doom3Group, void(), &Doom3Group::updateTransform> UpdateTransformCaller;
 
 void originChanged(){
        m_origin = m_originKey.m_origin;
        updateTransform();
 }
-typedef MemberCaller<Doom3Group, &Doom3Group::originChanged> OriginChangedCaller;
+typedef MemberCaller<Doom3Group, void(), &Doom3Group::originChanged> OriginChangedCaller;
 
 void rotationChanged(){
        rotation_assign( m_rotation, m_rotationKey.m_rotation );
        updateTransform();
 }
-typedef MemberCaller<Doom3Group, &Doom3Group::rotationChanged> RotationChangedCaller;
+typedef MemberCaller<Doom3Group, void(), &Doom3Group::rotationChanged> RotationChangedCaller;
 
 void skinChanged(){
        if ( isModel() ) {
@@ -247,10 +247,10 @@ void skinChanged(){
                }
        }
 }
-typedef MemberCaller<Doom3Group, &Doom3Group::skinChanged> SkinChangedCaller;
+typedef MemberCaller<Doom3Group, void(), &Doom3Group::skinChanged> SkinChangedCaller;
 
 public:
-Doom3Group( EntityClass* eclass, scene::Node& node, const Callback& transformChanged, const Callback& boundsChanged, const Callback& evaluateTransform ) :
+Doom3Group( EntityClass* eclass, scene::Node& node, const Callback<void()>& transformChanged, const Callback<void()>& boundsChanged, const Callback<void()>& evaluateTransform ) :
        m_entity( eclass ),
        m_originKey( OriginChangedCaller( *this ) ),
        m_origin( ORIGINKEY_IDENTITY ),
@@ -269,7 +269,7 @@ Doom3Group( EntityClass* eclass, scene::Node& node, const Callback& transformCha
        m_traversable( 0 ){
        construct();
 }
-Doom3Group( const Doom3Group& other, scene::Node& node, const Callback& transformChanged, const Callback& boundsChanged, const Callback& evaluateTransform ) :
+Doom3Group( const Doom3Group& other, scene::Node& node, const Callback<void()>& transformChanged, const Callback<void()>& boundsChanged, const Callback<void()>& evaluateTransform ) :
        m_entity( other.m_entity ),
        m_originKey( OriginChangedCaller( *this ) ),
        m_origin( ORIGINKEY_IDENTITY ),
@@ -420,7 +420,7 @@ void transformChanged(){
        m_curveNURBS.curveChanged();
        m_curveCatmullRom.curveChanged();
 }
-typedef MemberCaller<Doom3Group, &Doom3Group::transformChanged> TransformChangedCaller;
+typedef MemberCaller<Doom3Group, void(), &Doom3Group::transformChanged> TransformChangedCaller;
 };
 
 class Doom3GroupInstance :
@@ -579,13 +579,13 @@ void applyTransform(){
        evaluateTransform();
        m_contained.freezeTransform();
 }
-typedef MemberCaller<Doom3GroupInstance, &Doom3GroupInstance::applyTransform> ApplyTransformCaller;
+typedef MemberCaller<Doom3GroupInstance, void(), &Doom3GroupInstance::applyTransform> ApplyTransformCaller;
 
 void selectionChangedComponent( const Selectable& selectable ){
        GlobalSelectionSystem().getObserver ( SelectionSystem::eComponent )( selectable );
        GlobalSelectionSystem().onComponentSelection( *this, selectable );
 }
-typedef MemberCaller1<Doom3GroupInstance, const Selectable&, &Doom3GroupInstance::selectionChangedComponent> SelectionChangedComponentCaller;
+typedef MemberCaller<Doom3GroupInstance, void(const Selectable&), &Doom3GroupInstance::selectionChangedComponent> SelectionChangedComponentCaller;
 };
 
 class Doom3GroupNode :
index 855fc9230467e7a394d225f48646d719ccaa86a5..3b91eeb0d33ca0d4699a4f70aaad3823d9b6e528 100644 (file)
@@ -76,8 +76,8 @@ RenderablePivot m_renderOrigin;
 RenderableNamedEntity m_renderName;
 ModelSkinKey m_skin;
 
-Callback m_transformChanged;
-Callback m_evaluateTransform;
+Callback<void()> m_transformChanged;
+Callback<void()> m_evaluateTransform;
 
 void construct(){
        default_rotation( m_rotation );
@@ -114,23 +114,23 @@ void updateTransform(){
 
        m_transformChanged();
 }
-typedef MemberCaller<EclassModel, &EclassModel::updateTransform> UpdateTransformCaller;
+typedef MemberCaller<EclassModel, void(), &EclassModel::updateTransform> UpdateTransformCaller;
 
 void originChanged(){
        m_origin = m_originKey.m_origin;
        updateTransform();
 }
-typedef MemberCaller<EclassModel, &EclassModel::originChanged> OriginChangedCaller;
+typedef MemberCaller<EclassModel, void(), &EclassModel::originChanged> OriginChangedCaller;
 void angleChanged(){
        m_angle = m_angleKey.m_angle;
        updateTransform();
 }
-typedef MemberCaller<EclassModel, &EclassModel::angleChanged> AngleChangedCaller;
+typedef MemberCaller<EclassModel, void(), &EclassModel::angleChanged> AngleChangedCaller;
 void rotationChanged(){
        rotation_assign( m_rotation, m_rotationKey.m_rotation );
        updateTransform();
 }
-typedef MemberCaller<EclassModel, &EclassModel::rotationChanged> RotationChangedCaller;
+typedef MemberCaller<EclassModel, void(), &EclassModel::rotationChanged> RotationChangedCaller;
 
 void skinChanged(){
        scene::Node* node = m_model.getNode();
@@ -138,11 +138,11 @@ void skinChanged(){
                Node_modelSkinChanged( *node );
        }
 }
-typedef MemberCaller<EclassModel, &EclassModel::skinChanged> SkinChangedCaller;
+typedef MemberCaller<EclassModel, void(), &EclassModel::skinChanged> SkinChangedCaller;
 
 public:
 
-EclassModel( EntityClass* eclass, scene::Node& node, const Callback& transformChanged, const Callback& evaluateTransform ) :
+EclassModel( EntityClass* eclass, scene::Node& node, const Callback<void()>& transformChanged, const Callback<void()>& evaluateTransform ) :
        m_entity( eclass ),
        m_originKey( OriginChangedCaller( *this ) ),
        m_origin( ORIGINKEY_IDENTITY ),
@@ -158,7 +158,7 @@ EclassModel( EntityClass* eclass, scene::Node& node, const Callback& transformCh
        m_evaluateTransform( evaluateTransform ){
        construct();
 }
-EclassModel( const EclassModel& other, scene::Node& node, const Callback& transformChanged, const Callback& evaluateTransform ) :
+EclassModel( const EclassModel& other, scene::Node& node, const Callback<void()>& transformChanged, const Callback<void()>& evaluateTransform ) :
        m_entity( other.m_entity ),
        m_originKey( OriginChangedCaller( *this ) ),
        m_origin( ORIGINKEY_IDENTITY ),
@@ -283,7 +283,7 @@ void transformChanged(){
        m_evaluateTransform();
        updateTransform();
 }
-typedef MemberCaller<EclassModel, &EclassModel::transformChanged> TransformChangedCaller;
+typedef MemberCaller<EclassModel, void(), &EclassModel::transformChanged> TransformChangedCaller;
 };
 
 class EclassModelInstance : public TargetableInstance, public TransformModifier, public Renderable
@@ -340,7 +340,7 @@ void applyTransform(){
        evaluateTransform();
        m_contained.freezeTransform();
 }
-typedef MemberCaller<EclassModelInstance, &EclassModelInstance::applyTransform> ApplyTransformCaller;
+typedef MemberCaller<EclassModelInstance, void(), &EclassModelInstance::applyTransform> ApplyTransformCaller;
 };
 
 class EclassModelNode :
index 745fad07119dffc7572a71a0ecd0b646a97c5813..1f286e05512481bf4abeba7ddbc073de58072bf9 100644 (file)
@@ -78,7 +78,7 @@ inline scene::Node& entity_for_eclass( EntityClass* eclass ){
 void Entity_setName( Entity& entity, const char* name ){
        entity.setKeyValue( "name", name );
 }
-typedef ReferenceCaller1<Entity, const char*, Entity_setName> EntitySetNameCaller;
+typedef ReferenceCaller<Entity, void(const char*), Entity_setName> EntitySetNameCaller;
 
 inline Namespaced* Node_getNamespaced( scene::Node& node ){
        return NodeTypeCast<Namespaced>::cast( node );
@@ -138,7 +138,7 @@ void connect( const char* name ){
        m_e1->setKeyValue( keyname(), name );
        m_e2->setKeyValue( "targetname", name );
 }
-typedef MemberCaller1<ConnectEntities, const char*, &ConnectEntities::connect> ConnectCaller;
+typedef MemberCaller<ConnectEntities, void(const char*), &ConnectEntities::connect> ConnectCaller;
 };
 
 inline Entity* ScenePath_getEntity( const scene::Path& path ){
index d903e28c0d1ce32e026b5b15c2c852de654cd34d..219d6de93c2cdc8b79cd680f340320e3886789c7 100644 (file)
@@ -69,7 +69,7 @@ void updateFiltered(){
 void classnameChanged( const char* value ){
        updateFiltered();
 }
-typedef MemberCaller1<ClassnameFilter, const char*, &ClassnameFilter::classnameChanged> ClassnameChangedCaller;
+typedef MemberCaller<ClassnameFilter, void(const char*), &ClassnameFilter::classnameChanged> ClassnameChangedCaller;
 };
 
 #endif
index bfdd22e89e158a595bd4f721ee78d8cb6da0c3ea..b80ae8300a1bb14cabb0fd0af830dee6b30afd93 100644 (file)
@@ -97,8 +97,8 @@ RenderableSolidAABB m_aabb_solid;
 RenderableWireframeAABB m_aabb_wire;
 RenderableNamedEntity m_renderName;
 
-Callback m_transformChanged;
-Callback m_evaluateTransform;
+Callback<void()> m_transformChanged;
+Callback<void()> m_evaluateTransform;
 
 void construct(){
        read_aabb( m_aabb_local, m_entity.getEntityClass() );
@@ -120,20 +120,20 @@ void updateTransform(){
        matrix4_translate_by_vec3( m_transform.localToParent(), m_origin );
        m_transformChanged();
 }
-typedef MemberCaller<GenericEntity, &GenericEntity::updateTransform> UpdateTransformCaller;
+typedef MemberCaller<GenericEntity, void(), &GenericEntity::updateTransform> UpdateTransformCaller;
 void originChanged(){
        m_origin = m_originKey.m_origin;
        updateTransform();
 }
-typedef MemberCaller<GenericEntity, &GenericEntity::originChanged> OriginChangedCaller;
+typedef MemberCaller<GenericEntity, void(), &GenericEntity::originChanged> OriginChangedCaller;
 void anglesChanged(){
        m_angles = m_anglesKey.m_angles;
        updateTransform();
 }
-typedef MemberCaller<GenericEntity, &GenericEntity::anglesChanged> AnglesChangedCaller;
+typedef MemberCaller<GenericEntity, void(), &GenericEntity::anglesChanged> AnglesChangedCaller;
 public:
 
-GenericEntity( EntityClass* eclass, scene::Node& node, const Callback& transformChanged, const Callback& evaluateTransform ) :
+GenericEntity( EntityClass* eclass, scene::Node& node, const Callback<void()>& transformChanged, const Callback<void()>& evaluateTransform ) :
        m_entity( eclass ),
        m_originKey( OriginChangedCaller( *this ) ),
        m_origin( ORIGINKEY_IDENTITY ),
@@ -150,7 +150,7 @@ GenericEntity( EntityClass* eclass, scene::Node& node, const Callback& transform
        m_evaluateTransform( evaluateTransform ){
        construct();
 }
-GenericEntity( const GenericEntity& other, scene::Node& node, const Callback& transformChanged, const Callback& evaluateTransform ) :
+GenericEntity( const GenericEntity& other, scene::Node& node, const Callback<void()>& transformChanged, const Callback<void()>& evaluateTransform ) :
        m_entity( other.m_entity ),
        m_originKey( OriginChangedCaller( *this ) ),
        m_origin( ORIGINKEY_IDENTITY ),
@@ -264,7 +264,7 @@ void transformChanged(){
        m_evaluateTransform();
        updateTransform();
 }
-typedef MemberCaller<GenericEntity, &GenericEntity::transformChanged> TransformChangedCaller;
+typedef MemberCaller<GenericEntity, void(), &GenericEntity::transformChanged> TransformChangedCaller;
 };
 
 class GenericEntityInstance :
@@ -342,7 +342,7 @@ void applyTransform(){
        evaluateTransform();
        m_contained.freezeTransform();
 }
-typedef MemberCaller<GenericEntityInstance, &GenericEntityInstance::applyTransform> ApplyTransformCaller;
+typedef MemberCaller<GenericEntityInstance, void(), &GenericEntityInstance::applyTransform> ApplyTransformCaller;
 };
 
 class GenericEntityNode :
index 8e308c4c37ab8184508597e4539974fa4c6a70c5..bad7fc54e793b102a8bcd2caae1f6bd896497b9d 100644 (file)
@@ -66,8 +66,8 @@ Vector3 m_origin;
 RenderableNamedEntity m_renderName;
 mutable Vector3 m_name_origin;
 
-Callback m_transformChanged;
-Callback m_evaluateTransform;
+Callback<void()> m_transformChanged;
+Callback<void()> m_evaluateTransform;
 
 void construct(){
        m_keyObservers.insert( "classname", ClassnameFilter::ClassnameChangedCaller( m_filter ) );
@@ -76,7 +76,7 @@ void construct(){
 }
 
 public:
-Group( EntityClass* eclass, scene::Node& node, const Callback& transformChanged, const Callback& evaluateTransform ) :
+Group( EntityClass* eclass, scene::Node& node, const Callback<void()>& transformChanged, const Callback<void()>& evaluateTransform ) :
        m_entity( eclass ),
        m_filter( m_entity, node ),
        m_named( m_entity ),
@@ -89,7 +89,7 @@ Group( EntityClass* eclass, scene::Node& node, const Callback& transformChanged,
        m_evaluateTransform( evaluateTransform ){
        construct();
 }
-Group( const Group& other, scene::Node& node, const Callback& transformChanged, const Callback& evaluateTransform ) :
+Group( const Group& other, scene::Node& node, const Callback<void()>& transformChanged, const Callback<void()>& evaluateTransform ) :
        m_entity( other.m_entity ),
        m_filter( m_entity, node ),
        m_named( m_entity ),
@@ -172,12 +172,12 @@ void updateTransform(){
        matrix4_translate_by_vec3( m_transform.localToParent(), m_origin );
        m_transformChanged();
 }
-typedef MemberCaller<Group, &Group::updateTransform> UpdateTransformCaller;
+typedef MemberCaller<Group, void(), &Group::updateTransform> UpdateTransformCaller;
 void originChanged(){
        m_origin = m_originKey.m_origin;
        updateTransform();
 }
-typedef MemberCaller<Group, &Group::originChanged> OriginChangedCaller;
+typedef MemberCaller<Group, void(), &Group::originChanged> OriginChangedCaller;
 
 void translate( const Vector3& translation ){
        m_origin = origin_translated( m_origin, translation );
@@ -195,7 +195,7 @@ void transformChanged(){
        m_evaluateTransform();
        updateTransform();
 }
-typedef MemberCaller<Group, &Group::transformChanged> TransformChangedCaller;
+typedef MemberCaller<Group, void(), &Group::transformChanged> TransformChangedCaller;
 };
 
 #if 0
@@ -337,7 +337,7 @@ void applyTransform(){
        evaluateTransform();
        m_contained.freezeTransform();
 }
-typedef MemberCaller<GroupInstance, &GroupInstance::applyTransform> ApplyTransformCaller;
+typedef MemberCaller<GroupInstance, void(), &GroupInstance::applyTransform> ApplyTransformCaller;
 };
 
 class GroupNode :
index 0e89e92118079f6a530f858a4e811b61d653eebc..9d8b92472c5f3165f546dc4c62beb109da1246e7 100644 (file)
@@ -491,12 +491,12 @@ void primaryIntensityChanged( const char* value ){
        m_primaryIntensity = string_read_float( value );
        calculateRadii();
 }
-typedef MemberCaller1<LightRadii, const char*, &LightRadii::primaryIntensityChanged> PrimaryIntensityChangedCaller;
+typedef MemberCaller<LightRadii, void(const char*), &LightRadii::primaryIntensityChanged> PrimaryIntensityChangedCaller;
 void secondaryIntensityChanged( const char* value ){
        m_secondaryIntensity = string_read_float( value );
        calculateRadii();
 }
-typedef MemberCaller1<LightRadii, const char*, &LightRadii::secondaryIntensityChanged> SecondaryIntensityChangedCaller;
+typedef MemberCaller<LightRadii, void(const char*), &LightRadii::secondaryIntensityChanged> SecondaryIntensityChangedCaller;
 void scaleChanged( const char* value ){
        m_scale = string_read_float( value );
        if ( m_scale <= 0.0f ) {
@@ -504,7 +504,7 @@ void scaleChanged( const char* value ){
        }
        calculateRadii();
 }
-typedef MemberCaller1<LightRadii, const char*, &LightRadii::scaleChanged> ScaleChangedCaller;
+typedef MemberCaller<LightRadii, void(const char*), &LightRadii::scaleChanged> ScaleChangedCaller;
 void fadeChanged( const char* value ){
        m_fade = string_read_float( value );
        if ( m_fade <= 0.0f ) {
@@ -512,12 +512,12 @@ void fadeChanged( const char* value ){
        }
        calculateRadii();
 }
-typedef MemberCaller1<LightRadii, const char*, &LightRadii::fadeChanged> FadeChangedCaller;
+typedef MemberCaller<LightRadii, void(const char*), &LightRadii::fadeChanged> FadeChangedCaller;
 void flagsChanged( const char* value ){
        m_flags = string_read_int( value );
        calculateRadii();
 }
-typedef MemberCaller1<LightRadii, const char*, &LightRadii::flagsChanged> FlagsChangedCaller;
+typedef MemberCaller<LightRadii, void(const char*), &LightRadii::flagsChanged> FlagsChangedCaller;
 };
 
 class Doom3LightRadius
@@ -527,7 +527,7 @@ Vector3 m_defaultRadius;
 Vector3 m_radius;
 Vector3 m_radiusTransformed;
 Vector3 m_center;
-Callback m_changed;
+Callback<void()> m_changed;
 bool m_useCenterKey;
 
 Doom3LightRadius( const char* defaultRadius ) : m_defaultRadius( 300, 300, 300 ), m_center( 0, 0, 0 ), m_useCenterKey( false ){
@@ -545,7 +545,7 @@ void lightRadiusChanged( const char* value ){
        m_changed();
        SceneChangeNotify();
 }
-typedef MemberCaller1<Doom3LightRadius, const char*, &Doom3LightRadius::lightRadiusChanged> LightRadiusChangedCaller;
+typedef MemberCaller<Doom3LightRadius, void(const char*), &Doom3LightRadius::lightRadiusChanged> LightRadiusChangedCaller;
 
 void lightCenterChanged( const char* value ){
        m_useCenterKey = string_parse_vector3( value, m_center );
@@ -554,7 +554,7 @@ void lightCenterChanged( const char* value ){
        }
        SceneChangeNotify();
 }
-typedef MemberCaller1<Doom3LightRadius, const char*, &Doom3LightRadius::lightCenterChanged> LightCenterChangedCaller;
+typedef MemberCaller<Doom3LightRadius, void(const char*), &Doom3LightRadius::lightCenterChanged> LightCenterChangedCaller;
 };
 
 class RenderLightRadiiWire : public OpenGLRenderable
@@ -707,7 +707,7 @@ void valueChanged( const char* value ){
        }
        SceneChangeNotify();
 }
-typedef MemberCaller1<LightShader, const char*, &LightShader::valueChanged> ValueChangedCaller;
+typedef MemberCaller<LightShader, void(const char*), &LightShader::valueChanged> ValueChangedCaller;
 
 Shader* get() const {
        return m_shader.get();
@@ -805,9 +805,9 @@ LightShader m_shader;
 
 AABB m_aabb_light;
 
-Callback m_transformChanged;
-Callback m_boundsChanged;
-Callback m_evaluateTransform;
+Callback<void()> m_transformChanged;
+Callback<void()> m_boundsChanged;
+Callback<void()> m_evaluateTransform;
 
 void construct(){
        default_rotation( m_rotation );
@@ -876,7 +876,7 @@ void originChanged(){
        m_aabb_light.origin = m_useLightOrigin ? m_lightOrigin : m_originKey.m_origin;
        updateOrigin();
 }
-typedef MemberCaller<Light, &Light::originChanged> OriginChangedCaller;
+typedef MemberCaller<Light, void(), &Light::originChanged> OriginChangedCaller;
 
 void lightOriginChanged( const char* value ){
        m_useLightOrigin = !string_empty( value );
@@ -885,7 +885,7 @@ void lightOriginChanged( const char* value ){
        }
        originChanged();
 }
-typedef MemberCaller1<Light, const char*, &Light::lightOriginChanged> LightOriginChangedCaller;
+typedef MemberCaller<Light, void(const char*), &Light::lightOriginChanged> LightOriginChangedCaller;
 
 void lightTargetChanged( const char* value ){
        m_useLightTarget = !string_empty( value );
@@ -894,7 +894,7 @@ void lightTargetChanged( const char* value ){
        }
        projectionChanged();
 }
-typedef MemberCaller1<Light, const char*, &Light::lightTargetChanged> LightTargetChangedCaller;
+typedef MemberCaller<Light, void(const char*), &Light::lightTargetChanged> LightTargetChangedCaller;
 void lightUpChanged( const char* value ){
        m_useLightUp = !string_empty( value );
        if ( m_useLightUp ) {
@@ -902,7 +902,7 @@ void lightUpChanged( const char* value ){
        }
        projectionChanged();
 }
-typedef MemberCaller1<Light, const char*, &Light::lightUpChanged> LightUpChangedCaller;
+typedef MemberCaller<Light, void(const char*), &Light::lightUpChanged> LightUpChangedCaller;
 void lightRightChanged( const char* value ){
        m_useLightRight = !string_empty( value );
        if ( m_useLightRight ) {
@@ -910,7 +910,7 @@ void lightRightChanged( const char* value ){
        }
        projectionChanged();
 }
-typedef MemberCaller1<Light, const char*, &Light::lightRightChanged> LightRightChangedCaller;
+typedef MemberCaller<Light, void(const char*), &Light::lightRightChanged> LightRightChangedCaller;
 void lightStartChanged( const char* value ){
        m_useLightStart = !string_empty( value );
        if ( m_useLightStart ) {
@@ -918,7 +918,7 @@ void lightStartChanged( const char* value ){
        }
        projectionChanged();
 }
-typedef MemberCaller1<Light, const char*, &Light::lightStartChanged> LightStartChangedCaller;
+typedef MemberCaller<Light, void(const char*), &Light::lightStartChanged> LightStartChangedCaller;
 void lightEndChanged( const char* value ){
        m_useLightEnd = !string_empty( value );
        if ( m_useLightEnd ) {
@@ -926,7 +926,7 @@ void lightEndChanged( const char* value ){
        }
        projectionChanged();
 }
-typedef MemberCaller1<Light, const char*, &Light::lightEndChanged> LightEndChangedCaller;
+typedef MemberCaller<Light, void(const char*), &Light::lightEndChanged> LightEndChangedCaller;
 
 void writeLightOrigin(){
        write_origin( m_lightOrigin, &m_entity, "light_origin" );
@@ -957,7 +957,7 @@ void rotationChanged(){
        rotation_assign( m_rotation, m_useLightRotation ? m_lightRotation : m_rotationKey.m_rotation );
        GlobalSelectionSystem().pivotChanged();
 }
-typedef MemberCaller<Light, &Light::rotationChanged> RotationChangedCaller;
+typedef MemberCaller<Light, void(), &Light::rotationChanged> RotationChangedCaller;
 
 void lightRotationChanged( const char* value ){
        m_useLightRotation = !string_empty( value );
@@ -966,15 +966,15 @@ void lightRotationChanged( const char* value ){
        }
        rotationChanged();
 }
-typedef MemberCaller1<Light, const char*, &Light::lightRotationChanged> LightRotationChangedCaller;
+typedef MemberCaller<Light, void(const char*), &Light::lightRotationChanged> LightRotationChangedCaller;
 
 public:
 
-Light( EntityClass* eclass, scene::Node& node, const Callback& transformChanged, const Callback& boundsChanged, const Callback& evaluateTransform ) :
+Light( EntityClass* eclass, scene::Node& node, const Callback<void()>& transformChanged, const Callback<void()>& boundsChanged, const Callback<void()>& evaluateTransform ) :
        m_entity( eclass ),
        m_originKey( OriginChangedCaller( *this ) ),
        m_rotationKey( RotationChangedCaller( *this ) ),
-       m_colour( Callback() ),
+       m_colour( Callback<void()>() ),
        m_filter( m_entity, node ),
        m_named( m_entity ),
        m_nameKeys( m_entity ),
@@ -993,11 +993,11 @@ Light( EntityClass* eclass, scene::Node& node, const Callback& transformChanged,
        m_evaluateTransform( evaluateTransform ){
        construct();
 }
-Light( const Light& other, scene::Node& node, const Callback& transformChanged, const Callback& boundsChanged, const Callback& evaluateTransform ) :
+Light( const Light& other, scene::Node& node, const Callback<void()>& transformChanged, const Callback<void()>& boundsChanged, const Callback<void()>& evaluateTransform ) :
        m_entity( other.m_entity ),
        m_originKey( OriginChangedCaller( *this ) ),
        m_rotationKey( RotationChangedCaller( *this ) ),
-       m_colour( Callback() ),
+       m_colour( Callback<void()>() ),
        m_filter( m_entity, node ),
        m_named( m_entity ),
        m_nameKeys( m_entity ),
@@ -1229,7 +1229,7 @@ void transformChanged(){
        m_evaluateTransform();
        updateOrigin();
 }
-typedef MemberCaller<Light, &Light::transformChanged> TransformChangedCaller;
+typedef MemberCaller<Light, void(), &Light::transformChanged> TransformChangedCaller;
 
 mutable Matrix4 m_localPivot;
 const Matrix4& getLocalPivot() const {
@@ -1238,7 +1238,7 @@ const Matrix4& getLocalPivot() const {
        return m_localPivot;
 }
 
-void setLightChangedCallback( const Callback& callback ){
+void setLightChangedCallback( const Callback<void()>& callback ){
        m_doom3Radius.m_changed = callback;
 }
 
@@ -1486,7 +1486,7 @@ LightInstance( const scene::Path& path, scene::Instance* parent, Light& containe
        StaticRenderableConnectionLines::instance().detach( *this );
 
        if ( g_lightType == LIGHTTYPE_DOOM3 ) {
-               m_contained.setLightChangedCallback( Callback() );
+               m_contained.setLightChangedCallback( Callback<void()>() );
                GlobalShaderCache().detach( *this );
        }
 
@@ -1525,7 +1525,7 @@ void selectedChangedComponent( const Selectable& selectable ){
        GlobalSelectionSystem().getObserver ( SelectionSystem::eComponent )( selectable );
        GlobalSelectionSystem().onComponentSelection( *this, selectable );
 }
-typedef MemberCaller1<LightInstance, const Selectable&, &LightInstance::selectedChangedComponent> SelectedChangedComponentCaller;
+typedef MemberCaller<LightInstance, void(const Selectable&), &LightInstance::selectedChangedComponent> SelectedChangedComponentCaller;
 
 void evaluateTransform(){
        if ( getType() == TRANSFORM_PRIMITIVE ) {
@@ -1545,12 +1545,12 @@ void applyTransform(){
        evaluateTransform();
        m_contained.freezeTransform();
 }
-typedef MemberCaller<LightInstance, &LightInstance::applyTransform> ApplyTransformCaller;
+typedef MemberCaller<LightInstance, void(), &LightInstance::applyTransform> ApplyTransformCaller;
 
 void lightChanged(){
        GlobalShaderCache().changed( *this );
 }
-typedef MemberCaller<LightInstance, &LightInstance::lightChanged> LightChangedCaller;
+typedef MemberCaller<LightInstance, void(), &LightInstance::lightChanged> LightChangedCaller;
 
 Shader* getShader() const {
        return m_contained.getShader();
index e6197d099e43e323fecc08594e6b3bc4cac4d927..ac541a6f34f270ca6ab3e1d2ef6056712802e188 100644 (file)
@@ -72,8 +72,8 @@ NameKeys m_nameKeys;
 RenderablePivot m_renderOrigin;
 RenderableNamedEntity m_renderName;
 
-Callback m_transformChanged;
-Callback m_evaluateTransform;
+Callback<void()> m_transformChanged;
+Callback<void()> m_evaluateTransform;
 
 void construct(){
        m_keyObservers.insert( "classname", ClassnameFilter::ClassnameChangedCaller( m_filter ) );
@@ -101,20 +101,20 @@ void originChanged(){
        m_origin = m_originKey.m_origin;
        updateTransform();
 }
-typedef MemberCaller<MiscModel, &MiscModel::originChanged> OriginChangedCaller;
+typedef MemberCaller<MiscModel, void(), &MiscModel::originChanged> OriginChangedCaller;
 void anglesChanged(){
        m_angles = m_anglesKey.m_angles;
        updateTransform();
 }
-typedef MemberCaller<MiscModel, &MiscModel::anglesChanged> AnglesChangedCaller;
+typedef MemberCaller<MiscModel, void(), &MiscModel::anglesChanged> AnglesChangedCaller;
 void scaleChanged(){
        m_scale = m_scaleKey.m_scale;
        updateTransform();
 }
-typedef MemberCaller<MiscModel, &MiscModel::scaleChanged> ScaleChangedCaller;
+typedef MemberCaller<MiscModel, void(), &MiscModel::scaleChanged> ScaleChangedCaller;
 public:
 
-MiscModel( EntityClass* eclass, scene::Node& node, const Callback& transformChanged, const Callback& evaluateTransform ) :
+MiscModel( EntityClass* eclass, scene::Node& node, const Callback<void()>& transformChanged, const Callback<void()>& evaluateTransform ) :
        m_entity( eclass ),
        m_originKey( OriginChangedCaller( *this ) ),
        m_origin( ORIGINKEY_IDENTITY ),
@@ -130,7 +130,7 @@ MiscModel( EntityClass* eclass, scene::Node& node, const Callback& transformChan
        m_evaluateTransform( evaluateTransform ){
        construct();
 }
-MiscModel( const MiscModel& other, scene::Node& node, const Callback& transformChanged, const Callback& evaluateTransform ) :
+MiscModel( const MiscModel& other, scene::Node& node, const Callback<void()>& transformChanged, const Callback<void()>& evaluateTransform ) :
        m_entity( other.m_entity ),
        m_originKey( OriginChangedCaller( *this ) ),
        m_origin( ORIGINKEY_IDENTITY ),
@@ -235,7 +235,7 @@ void transformChanged(){
        m_evaluateTransform();
        updateTransform();
 }
-typedef MemberCaller<MiscModel, &MiscModel::transformChanged> TransformChangedCaller;
+typedef MemberCaller<MiscModel, void(), &MiscModel::transformChanged> TransformChangedCaller;
 };
 
 class MiscModelInstance : public TargetableInstance, public TransformModifier, public Renderable
@@ -290,7 +290,7 @@ void applyTransform(){
        evaluateTransform();
        m_contained.freezeTransform();
 }
-typedef MemberCaller<MiscModelInstance, &MiscModelInstance::applyTransform> ApplyTransformCaller;
+typedef MemberCaller<MiscModelInstance, void(), &MiscModelInstance::applyTransform> ApplyTransformCaller;
 };
 
 class MiscModelNode :
index a7b395ff21def1d2e25aaa5cac8524e115404344..75e442f1af068ff97241e9b27d59980ab3c44f5e 100644 (file)
@@ -34,10 +34,10 @@ class EModel : public ModuleObserver
 ResourceReference m_resource;
 scene::Traversable& m_traverse;
 scene::Node* m_node;
-Callback m_modelChanged;
+Callback<void()> m_modelChanged;
 
 public:
-EModel( scene::Traversable& traversable, const Callback& modelChanged )
+EModel( scene::Traversable& traversable, const Callback<void()>& modelChanged )
        : m_resource( "" ), m_traverse( traversable ), m_node( 0 ), m_modelChanged( modelChanged ){
        m_resource.attach( *this );
 }
@@ -66,7 +66,7 @@ void modelChanged( const char* value ){
        m_resource.attach( *this );
        m_modelChanged();
 }
-typedef MemberCaller1<EModel, const char*, &EModel::modelChanged> ModelChangedCaller;
+typedef MemberCaller<EModel, void(const char*), &EModel::modelChanged> ModelChangedCaller;
 
 const char* getName() const {
        return m_resource.getName();
@@ -82,7 +82,7 @@ TraversableNode m_traverse;
 EModel m_model;
 public:
 SingletonModel()
-       : m_model( m_traverse, Callback() ){
+       : m_model( m_traverse, Callback<void()>() ){
 }
 
 void attach( scene::Traversable::Observer* observer ){
@@ -99,7 +99,7 @@ scene::Traversable& getTraversable(){
 void modelChanged( const char* value ){
        m_model.modelChanged( value );
 }
-typedef MemberCaller1<SingletonModel, const char*, &SingletonModel::modelChanged> ModelChangedCaller;
+typedef MemberCaller<SingletonModel, void(const char*), &SingletonModel::modelChanged> ModelChangedCaller;
 
 scene::Node* getNode() const {
        return m_model.getNode();
index 34d9111201a79cc2c1f5aa554d50cf0985cf87d2..963640158ade832546e4b4bdfdc03460a54fa9b4 100644 (file)
@@ -40,7 +40,7 @@ class ModelSkinKey : public ModuleObserver
 {
 CopiedString m_name;
 ModelSkin* m_skin;
-Callback m_skinChangedCallback;
+Callback<void()> m_skinChangedCallback;
 
 ModelSkinKey( const ModelSkinKey& );
 ModelSkinKey operator=( const ModelSkinKey& );
@@ -55,7 +55,7 @@ void destroy(){
 }
 
 public:
-ModelSkinKey( const Callback& skinChangedCallback ) : m_skinChangedCallback( skinChangedCallback ){
+ModelSkinKey( const Callback<void()>& skinChangedCallback ) : m_skinChangedCallback( skinChangedCallback ){
        construct();
 }
 ~ModelSkinKey(){
@@ -69,7 +69,7 @@ void skinChanged( const char* value ){
        parseTextureName( m_name, value );
        construct();
 }
-typedef MemberCaller1<ModelSkinKey, const char*, &ModelSkinKey::skinChanged> SkinChangedCaller;
+typedef MemberCaller<ModelSkinKey, void(const char*), &ModelSkinKey::skinChanged> SkinChangedCaller;
 
 void realise(){
        m_skinChangedCallback();
index 29170d9e795bd112c78e4bc6d461191f6f90c8b5..857b10b44a5e41a0066da12e01fc5fc8feb0a08a 100644 (file)
@@ -79,7 +79,7 @@ void identifierChanged( const char* value ){
        }
        m_name = value;
 }
-typedef MemberCaller1<NamedEntity, const char*, &NamedEntity::identifierChanged> IdentifierChangedCaller;
+typedef MemberCaller<NamedEntity, void(const char*), &NamedEntity::identifierChanged> IdentifierChangedCaller;
 };
 
 class RenderableNamedEntity : public OpenGLRenderable
index 0e2d88b3b48bdedf96a69f101ac2d81656a76432..45943f1f336c66f0d247ba2c18c9c5048728c42b 100644 (file)
@@ -46,9 +46,9 @@ KeyIsName(){
 };
 
 
-typedef MemberCaller1<EntityKeyValue, const char*, &EntityKeyValue::assign> KeyValueAssignCaller;
-typedef MemberCaller1<EntityKeyValue, const KeyObserver&, &EntityKeyValue::attach> KeyValueAttachCaller;
-typedef MemberCaller1<EntityKeyValue, const KeyObserver&, &EntityKeyValue::detach> KeyValueDetachCaller;
+typedef MemberCaller<EntityKeyValue, void(const char*), &EntityKeyValue::assign> KeyValueAssignCaller;
+typedef MemberCaller<EntityKeyValue, void(const KeyObserver&), &EntityKeyValue::attach> KeyValueAttachCaller;
+typedef MemberCaller<EntityKeyValue, void(const KeyObserver&), &EntityKeyValue::detach> KeyValueDetachCaller;
 
 class NameKeys : public Entity::Observer, public Namespaced
 {
index 8628c3cf6e5316e1fc2192d3fdc737498f4e7707..84bb74621fd5cf2dde3b1d959e7cfe8dbbdff4be 100644 (file)
@@ -59,12 +59,12 @@ inline Vector3 origin_snapped( const Vector3& origin, float snap ){
 
 class OriginKey
 {
-Callback m_originChanged;
+Callback<void()> m_originChanged;
 public:
 Vector3 m_origin;
 
 
-OriginKey( const Callback& originChanged )
+OriginKey( const Callback<void()>& originChanged )
        : m_originChanged( originChanged ), m_origin( ORIGINKEY_IDENTITY ){
 }
 
@@ -72,7 +72,7 @@ void originChanged( const char* value ){
        read_origin( m_origin, value );
        m_originChanged();
 }
-typedef MemberCaller1<OriginKey, const char*, &OriginKey::originChanged> OriginChangedCaller;
+typedef MemberCaller<OriginKey, void(const char*), &OriginKey::originChanged> OriginChangedCaller;
 
 
 void write( Entity* entity ) const {
index fc2c9fbe4434d82011d7e967bec1a83446b48efc..4c566d96f420dd5264a6f509b3920160543c791f 100644 (file)
@@ -144,12 +144,12 @@ inline void read_angle( Float9 rotation, const char* value ){
 
 class RotationKey
 {
-Callback m_rotationChanged;
+Callback<void()> m_rotationChanged;
 public:
 Float9 m_rotation;
 
 
-RotationKey( const Callback& rotationChanged )
+RotationKey( const Callback<void()>& rotationChanged )
        : m_rotationChanged( rotationChanged ){
        default_rotation( m_rotation );
 }
@@ -158,13 +158,13 @@ void angleChanged( const char* value ){
        read_angle( m_rotation, value );
        m_rotationChanged();
 }
-typedef MemberCaller1<RotationKey, const char*, &RotationKey::angleChanged> AngleChangedCaller;
+typedef MemberCaller<RotationKey, void(const char*), &RotationKey::angleChanged> AngleChangedCaller;
 
 void rotationChanged( const char* value ){
        read_rotation( m_rotation, value );
        m_rotationChanged();
 }
-typedef MemberCaller1<RotationKey, const char*, &RotationKey::rotationChanged> RotationChangedCaller;
+typedef MemberCaller<RotationKey, void(const char*), &RotationKey::rotationChanged> RotationChangedCaller;
 
 void write( Entity* entity ) const {
        Vector3 euler = matrix4_get_rotation_euler_xyz_degrees( rotation_toMatrix( m_rotation ) );
index f4cb726cff85fd7f3a7fa539221049985f93b610..dfb2884a3c1ae7a72183c71945c661093bd632c7 100644 (file)
@@ -87,12 +87,12 @@ inline Vector3 scale_scaled( const Vector3& scale, const Vector3& scaling ){
 
 class ScaleKey
 {
-Callback m_scaleChanged;
+Callback<void()> m_scaleChanged;
 public:
 Vector3 m_scale;
 
 
-ScaleKey( const Callback& scaleChanged )
+ScaleKey( const Callback<void()>& scaleChanged )
        : m_scaleChanged( scaleChanged ), m_scale( SCALEKEY_IDENTITY ){
 }
 
@@ -100,13 +100,13 @@ void uniformScaleChanged( const char* value ){
        read_scale( m_scale, value );
        m_scaleChanged();
 }
-typedef MemberCaller1<ScaleKey, const char*, &ScaleKey::uniformScaleChanged> UniformScaleChangedCaller;
+typedef MemberCaller<ScaleKey, void(const char*), &ScaleKey::uniformScaleChanged> UniformScaleChangedCaller;
 
 void scaleChanged( const char* value ){
        read_scalevec( m_scale, value );
        m_scaleChanged();
 }
-typedef MemberCaller1<ScaleKey, const char*, &ScaleKey::scaleChanged> ScaleChangedCaller;
+typedef MemberCaller<ScaleKey, void(const char*), &ScaleKey::scaleChanged> ScaleChangedCaller;
 
 void write( Entity* entity ) const {
        write_scale( m_scale, entity );
index fce3c1a14f4547ea29df520d0e278ae2d54ae34b..645e8a2875ff0cf65f6bb9ab2aa36f1f8e2cf12f 100644 (file)
@@ -156,7 +156,7 @@ void parseFile( const char* name ){
        }
 }
 
-typedef MemberCaller1<GlobalSkins, const char*, &GlobalSkins::parseFile> ParseFileCaller;
+typedef MemberCaller<GlobalSkins, void(const char*), &GlobalSkins::parseFile> ParseFileCaller;
 
 void construct(){
        GlobalFileSystem().forEachFile( "skins/", "skin", ParseFileCaller( *this ) );
index 6de382cfabd63b90558e1ffea7016a30d676f233..99046a508f2af58aa491ce95f59d2ba70437ccd9 100644 (file)
@@ -113,7 +113,7 @@ void targetnameChanged( const char* name ){
        m_targets = getTargetables( name );
        construct();
 }
-typedef MemberCaller1<TargetedEntity, const char*, &TargetedEntity::targetnameChanged> TargetnameChangedCaller;
+typedef MemberCaller<TargetedEntity, void(const char*), &TargetedEntity::targetnameChanged> TargetnameChangedCaller;
 };
 
 
@@ -127,7 +127,7 @@ TargetingEntity() :
 void targetChanged( const char* target ){
        m_targets = getTargetables( target );
 }
-typedef MemberCaller1<TargetingEntity, const char*, &TargetingEntity::targetChanged> TargetChangedCaller;
+typedef MemberCaller<TargetingEntity, void(const char*), &TargetingEntity::targetChanged> TargetChangedCaller;
 
 typedef targetables_t::iterator iterator;
 
@@ -194,7 +194,7 @@ void operator()( const Vector3& worldPosition ) const {
 class TargetKeys : public Entity::Observer
 {
 TargetingEntities m_targetingEntities;
-Callback m_targetsChanged;
+Callback<void()> m_targetsChanged;
 
 bool readTargetKey( const char* key, std::size_t& index ){
        if ( string_equal_n( key, "target", 6 ) ) {
@@ -210,7 +210,7 @@ bool readTargetKey( const char* key, std::size_t& index ){
        return false;
 }
 public:
-void setTargetsChanged( const Callback& targetsChanged ){
+void setTargetsChanged( const Callback<void()>& targetsChanged ){
        m_targetsChanged = targetsChanged;
 }
 void targetsChanged(){
@@ -323,7 +323,7 @@ TargetableInstance(
        m_entity.detach( *this );
 }
 
-void setTargetsChanged( const Callback& targetsChanged ){
+void setTargetsChanged( const Callback<void()>& targetsChanged ){
        m_targeting.setTargetsChanged( targetsChanged );
 }
 void targetsChanged(){
index 946ee198ebd3da766ece72effeea5cc999330d75..5f03d73495b83dd278527ca4fa5cf45f77089d4b 100644 (file)
@@ -236,7 +236,7 @@ surfaces_t m_surfaces;
 
 AABB m_aabb_local;
 public:
-Callback m_lightsChanged;
+Callback<void()> m_lightsChanged;
 
 ~Model(){
        for ( surfaces_t::iterator i = m_surfaces.begin(); i != m_surfaces.end(); ++i )
@@ -346,7 +346,7 @@ Cullable& get( NullType<Cullable>){
 void lightsChanged(){
        m_lightList->lightsChanged();
 }
-typedef MemberCaller<ModelInstance, &ModelInstance::lightsChanged> LightsChangedCaller;
+typedef MemberCaller<ModelInstance, void(), &ModelInstance::lightsChanged> LightsChangedCaller;
 
 void constructRemaps(){
        ModelSkin* skin = NodeTypeCast<ModelSkin>::cast( path().parent() );
@@ -397,9 +397,9 @@ ModelInstance( const scene::Path& path, scene::Instance* parent, Model& model )
 ~ModelInstance(){
        destroyRemaps();
 
-       Instance::setTransformChangedCallback( Callback() );
+       Instance::setTransformChangedCallback( Callback<void()>() );
 
-       m_model.m_lightsChanged = Callback();
+       m_model.m_lightsChanged = Callback<void()>();
        GlobalShaderCache().detach( *this );
 }
 
index aad851cf1082c89cfc5bb0443ef25df146a6defe..5811af6fe1ab30c731b3ff2962c1d41360c33e64 100644 (file)
@@ -323,7 +323,7 @@ surfaces_t m_surfaces;
 
 AABB m_aabb_local;
 public:
-Callback m_lightsChanged;
+Callback<void()> m_lightsChanged;
 
 PicoModel(){
        constructNull();
@@ -472,7 +472,7 @@ Cullable& get( NullType<Cullable>){
 void lightsChanged(){
        m_lightList->lightsChanged();
 }
-typedef MemberCaller<PicoModelInstance, &PicoModelInstance::lightsChanged> LightsChangedCaller;
+typedef MemberCaller<PicoModelInstance, void(), &PicoModelInstance::lightsChanged> LightsChangedCaller;
 
 void constructRemaps(){
        ASSERT_MESSAGE( m_skins.size() == m_picomodel.size(), "ERROR" );
@@ -524,9 +524,9 @@ PicoModelInstance( const scene::Path& path, scene::Instance* parent, PicoModel&
 ~PicoModelInstance(){
        destroyRemaps();
 
-       Instance::setTransformChangedCallback( Callback() );
+       Instance::setTransformChangedCallback( Callback<void()>() );
 
-       m_picomodel.m_lightsChanged = Callback();
+       m_picomodel.m_lightsChanged = Callback<void()>();
        GlobalShaderCache().detach( *this );
 }
 
index 656c1d8404cb85eab959046c87d4f27d16800ea8..6a1ec968851081dcf0f4a8033e737c865b700d72 100644 (file)
@@ -82,7 +82,7 @@ void ActiveShaders_IteratorBegin();
 bool ActiveShaders_IteratorAtEnd();
 IShader *ActiveShaders_IteratorCurrent();
 void ActiveShaders_IteratorIncrement();
-Callback g_ActiveShadersChangedNotify;
+Callback<void()> g_ActiveShadersChangedNotify;
 
 void FreeShaders();
 void LoadShaderFile( const char *filename );
@@ -1442,7 +1442,7 @@ void LoadShaderFile( const char* filename ){
        }
 }
 
-typedef FreeCaller1<const char*, LoadShaderFile> LoadShaderFileCaller;
+typedef FreeCaller<void(const char*), LoadShaderFile> LoadShaderFileCaller;
 
 
 void loadGuideFile( const char* filename ){
@@ -1466,7 +1466,7 @@ void loadGuideFile( const char* filename ){
        }
 }
 
-typedef FreeCaller1<const char*, loadGuideFile> LoadGuideFileCaller;
+typedef FreeCaller<void(const char*), loadGuideFile> LoadGuideFileCaller;
 
 
 CShader* Try_Shader_ForName( const char* name ){
@@ -1543,7 +1543,7 @@ void IfFound_dumpUnreferencedShader( bool& bFound, const char* filename ){
                globalOutputStream() << "\t" << filename << "\n";
        }
 }
-typedef ReferenceCaller1<bool, const char*, IfFound_dumpUnreferencedShader> IfFoundDumpUnreferencedShaderCaller;
+typedef ReferenceCaller<bool, void(const char*), IfFound_dumpUnreferencedShader> IfFoundDumpUnreferencedShaderCaller;
 
 void DumpUnreferencedShaders(){
        bool bFound = false;
@@ -1567,7 +1567,7 @@ void ShaderList_addShaderFile( const char* dirstring ){
        }
 }
 
-typedef FreeCaller1<const char*, ShaderList_addShaderFile> AddShaderFileCaller;
+typedef FreeCaller<void(const char*), ShaderList_addShaderFile> AddShaderFileCaller;
 
 
 /*
@@ -1624,7 +1624,7 @@ void ShaderList_addFromArchive( const char *archivename ){
        }
 }
 
-typedef FreeCaller1<const char *, ShaderList_addFromArchive> AddShaderListFromArchiveCaller;
+typedef FreeCaller<void(const char *), ShaderList_addFromArchive> AddShaderListFromArchiveCaller;
 
 #include "stream/filestream.h"
 
@@ -1763,7 +1763,7 @@ IShader* dereferenceActiveShadersIterator(){
 void incrementActiveShadersIterator(){
        ActiveShaders_IteratorIncrement();
 }
-void setActiveShadersChangedNotify( const Callback& notify ){
+void setActiveShadersChangedNotify( const Callback<void()>& notify ){
        g_ActiveShadersChangedNotify = notify;
 }
 
index 8b3de4f765eb54f29c8005e01035304c04c9e319..5cb91ea84113d2b27ab9b70c8a827d8421de48d4 100644 (file)
@@ -186,7 +186,7 @@ void Autosave_constructPage( PreferenceGroup& group ){
        Autosave_constructPreferences( page );
 }
 void Autosave_registerPreferencesPage(){
-       PreferencesDialog_addSettingsPage( FreeCaller1<PreferenceGroup&, Autosave_constructPage>() );
+       PreferencesDialog_addSettingsPage( FreeCaller<void(PreferenceGroup&), Autosave_constructPage>() );
 }
 
 
index 4508591c73926700f56b5643a298f8198264c82e..c338e5f614b2919ebaf213bd612d78adf6e5ecc2 100644 (file)
@@ -1498,8 +1498,8 @@ Array<EdgeFaces> m_edge_faces;
 AABB m_aabb_local;
 // ----
 
-Callback m_evaluateTransform;
-Callback m_boundsChanged;
+Callback<void()> m_evaluateTransform;
+Callback<void()> m_boundsChanged;
 
 mutable bool m_planeChanged;   // b-rep evaluation required
 mutable bool m_transformChanged;   // transform evaluation required
@@ -1508,7 +1508,7 @@ mutable bool m_transformChanged;   // transform evaluation required
 public:
 STRING_CONSTANT( Name, "Brush" );
 
-Callback m_lightsChanged;
+Callback<void()> m_lightsChanged;
 
 // static data
 static Shader* m_state_point;
@@ -1517,7 +1517,7 @@ static Shader* m_state_point;
 static EBrushType m_type;
 static double m_maxWorldCoord;
 
-Brush( scene::Node& node, const Callback& evaluateTransform, const Callback& boundsChanged ) :
+Brush( scene::Node& node, const Callback<void()>& evaluateTransform, const Callback<void()>& boundsChanged ) :
        m_node( &node ),
        m_undoable_observer( 0 ),
        m_map( 0 ),
@@ -1530,7 +1530,7 @@ Brush( scene::Node& node, const Callback& evaluateTransform, const Callback& bou
        m_transformChanged( false ){
        planeChanged();
 }
-Brush( const Brush& other, scene::Node& node, const Callback& evaluateTransform, const Callback& boundsChanged ) :
+Brush( const Brush& other, scene::Node& node, const Callback<void()>& evaluateTransform, const Callback<void()>& boundsChanged ) :
        m_node( &node ),
        m_undoable_observer( 0 ),
        m_map( 0 ),
@@ -1690,7 +1690,7 @@ void transformChanged(){
        m_transformChanged = true;
        planeChanged();
 }
-typedef MemberCaller<Brush, &Brush::transformChanged> TransformChangedCaller;
+typedef MemberCaller<Brush, void(), &Brush::transformChanged> TransformChangedCaller;
 
 void evaluateTransform(){
        if ( m_transformChanged ) {
@@ -2460,7 +2460,7 @@ void selectedChanged( const Selectable& selectable ){
        }
        m_selectionChanged( selectable );
 }
-typedef MemberCaller1<FaceInstance, const Selectable&, &FaceInstance::selectedChanged> SelectedChangedCaller;
+typedef MemberCaller<FaceInstance, void(const Selectable&), &FaceInstance::selectedChanged> SelectedChangedCaller;
 
 bool selectedVertices() const {
        return !m_vertexSelection.empty();
@@ -3052,7 +3052,7 @@ typedef LazyStatic<TypeCasts> StaticTypeCasts;
 void lightsChanged(){
        m_lightList->lightsChanged();
 }
-typedef MemberCaller<BrushInstance, &BrushInstance::lightsChanged> LightsChangedCaller;
+typedef MemberCaller<BrushInstance, void(), &BrushInstance::lightsChanged> LightsChangedCaller;
 
 STRING_CONSTANT( Name, "BrushInstance" );
 
@@ -3074,9 +3074,9 @@ BrushInstance( const scene::Path& path, scene::Instance* parent, Brush& brush )
        Instance::setTransformChangedCallback( LightsChangedCaller( *this ) );
 }
 ~BrushInstance(){
-       Instance::setTransformChangedCallback( Callback() );
+       Instance::setTransformChangedCallback( Callback<void()>() );
 
-       m_brush.m_lightsChanged = Callback();
+       m_brush.m_lightsChanged = Callback<void()>();
        GlobalShaderCache().detach( *this );
 
        m_counter->decrement();
@@ -3107,13 +3107,13 @@ void selectedChanged( const Selectable& selectable ){
 
        Instance::selectedChanged();
 }
-typedef MemberCaller1<BrushInstance, const Selectable&, &BrushInstance::selectedChanged> SelectedChangedCaller;
+typedef MemberCaller<BrushInstance, void(const Selectable&), &BrushInstance::selectedChanged> SelectedChangedCaller;
 
 void selectedChangedComponent( const Selectable& selectable ){
        GlobalSelectionSystem().getObserver ( SelectionSystem::eComponent )( selectable );
        GlobalSelectionSystem().onComponentSelection( *this, selectable );
 }
-typedef MemberCaller1<BrushInstance, const Selectable&, &BrushInstance::selectedChangedComponent> SelectedChangedComponentCaller;
+typedef MemberCaller<BrushInstance, void(const Selectable&), &BrushInstance::selectedChangedComponent> SelectedChangedComponentCaller;
 
 const BrushInstanceVisitor& forEachFaceInstance( const BrushInstanceVisitor& visitor ){
        for ( FaceInstances::iterator i = m_faceInstances.begin(); i != m_faceInstances.end(); ++i )
@@ -3440,7 +3440,7 @@ void applyTransform(){
        evaluateTransform();
        m_brush.freezeTransform();
 }
-typedef MemberCaller<BrushInstance, &BrushInstance::applyTransform> ApplyTransformCaller;
+typedef MemberCaller<BrushInstance, void(), &BrushInstance::applyTransform> ApplyTransformCaller;
 
 void setClipPlane( const Plane3& plane ){
        m_clipPlane.setPlane( m_brush, plane );
index dd22446afa5788035c882e8a91c14a3f728f88d0..528341d92399f92aa5b50c43eeac52afa49cdb73 100644 (file)
@@ -1131,7 +1131,7 @@ BrushMakeSided( std::size_t count )
 void set(){
        Scene_BrushConstructPrefab( GlobalSceneGraph(), eBrushPrism, m_count, TextureBrowser_GetSelectedShader( GlobalTextureBrowser() ) );
 }
-typedef MemberCaller<BrushMakeSided, &BrushMakeSided::set> SetCaller;
+typedef MemberCaller<BrushMakeSided, void(), &BrushMakeSided::set> SetCaller;
 };
 
 
@@ -1166,7 +1166,7 @@ BrushPrefab( EBrushPrefab type )
 void set(){
        DoSides( m_type, axis_for_viewtype( GetViewAxis() ) );
 }
-typedef MemberCaller<BrushPrefab, &BrushPrefab::set> SetCaller;
+typedef MemberCaller<BrushPrefab, void(), &BrushPrefab::set> SetCaller;
 };
 
 BrushPrefab g_brushprism( eBrushPrism );
@@ -1201,7 +1201,7 @@ void FlipClipper(){
 }
 
 
-Callback g_texture_lock_status_changed;
+Callback<void()> g_texture_lock_status_changed;
 BoolExportCaller g_texdef_movelock_caller( g_brush_texturelock_enabled );
 ToggleItem g_texdef_movelock_item( g_texdef_movelock_caller );
 
@@ -1216,7 +1216,7 @@ void Texdef_ToggleMoveLock(){
 
 
 void Brush_registerCommands(){
-       GlobalToggles_insert( "TogTexLock", FreeCaller<Texdef_ToggleMoveLock>(), ToggleItem::AddCallbackCaller( g_texdef_movelock_item ), Accelerator( 'T', (GdkModifierType)GDK_SHIFT_MASK ) );
+       GlobalToggles_insert( "TogTexLock", FreeCaller<void(), Texdef_ToggleMoveLock>(), ToggleItem::AddCallbackCaller( g_texdef_movelock_item ), Accelerator( 'T', (GdkModifierType)GDK_SHIFT_MASK ) );
 
        GlobalCommands_insert( "BrushPrism", BrushPrefab::SetCaller( g_brushprism ) );
        GlobalCommands_insert( "BrushCone", BrushPrefab::SetCaller( g_brushcone ) );
@@ -1231,12 +1231,12 @@ void Brush_registerCommands(){
        GlobalCommands_insert( "Brush8Sided", BrushMakeSided::SetCaller( g_brushmakesided8 ), Accelerator( '8', (GdkModifierType)GDK_CONTROL_MASK ) );
        GlobalCommands_insert( "Brush9Sided", BrushMakeSided::SetCaller( g_brushmakesided9 ), Accelerator( '9', (GdkModifierType)GDK_CONTROL_MASK ) );
 
-       GlobalCommands_insert( "ClipSelected", FreeCaller<ClipSelected>(), Accelerator( GDK_KEY_Return ) );
-       GlobalCommands_insert( "SplitSelected", FreeCaller<SplitSelected>(), Accelerator( GDK_KEY_Return, (GdkModifierType)GDK_SHIFT_MASK ) );
-       GlobalCommands_insert( "FlipClip", FreeCaller<FlipClipper>(), Accelerator( GDK_KEY_Return, (GdkModifierType)GDK_CONTROL_MASK ) );
+       GlobalCommands_insert( "ClipSelected", FreeCaller<void(), ClipSelected>(), Accelerator( GDK_KEY_Return ) );
+       GlobalCommands_insert( "SplitSelected", FreeCaller<void(), SplitSelected>(), Accelerator( GDK_KEY_Return, (GdkModifierType)GDK_SHIFT_MASK ) );
+       GlobalCommands_insert( "FlipClip", FreeCaller<void(), FlipClipper>(), Accelerator( GDK_KEY_Return, (GdkModifierType)GDK_CONTROL_MASK ) );
 
-       GlobalCommands_insert( "MakeDetail", FreeCaller<Select_MakeDetail>(), Accelerator( 'M', (GdkModifierType)GDK_CONTROL_MASK ) );
-       GlobalCommands_insert( "MakeStructural", FreeCaller<Select_MakeStructural>(), Accelerator( 'S', (GdkModifierType)( GDK_SHIFT_MASK | GDK_CONTROL_MASK ) ) );
+       GlobalCommands_insert( "MakeDetail", FreeCaller<void(), Select_MakeDetail>(), Accelerator( 'M', (GdkModifierType)GDK_CONTROL_MASK ) );
+       GlobalCommands_insert( "MakeStructural", FreeCaller<void(), Select_MakeStructural>(), Accelerator( 'S', (GdkModifierType)( GDK_SHIFT_MASK | GDK_CONTROL_MASK ) ) );
 }
 
 void Brush_constructMenu( ui::Menu menu ){
index 0654fd89d815e6d44b03410295883b55cdc63509..5a1f62b00cd060894501d61753ecafb602427d5e 100644 (file)
@@ -74,7 +74,7 @@ void Scene_BrushFitTexture_Component_Selected( scene::Graph& graph, float s_repe
 
 void Brush_constructMenu( ui::Menu menu );
 
-extern Callback g_texture_lock_status_changed;
+extern Callback<void()> g_texture_lock_status_changed;
 
 void BrushFilters_construct();
 void Brush_registerCommands();
index bc9c18ef67671262fa6cf553bd90cec4b1e54c9b..bd51cf55530d12711db32878643c4163ec47eed0 100644 (file)
@@ -45,12 +45,12 @@ bool getTextureLockEnabled(){
 void Face_importSnapPlanes( bool value ){
        Face::m_quantise = value ? quantiseInteger : quantiseFloating;
 }
-typedef FreeCaller1<bool, Face_importSnapPlanes> FaceImportSnapPlanesCaller;
+typedef FreeCaller<void(bool), Face_importSnapPlanes> FaceImportSnapPlanesCaller;
 
 void Face_exportSnapPlanes( const BoolImportCallback& importer ){
        importer( Face::m_quantise == quantiseInteger );
 }
-typedef FreeCaller1<const BoolImportCallback&, Face_exportSnapPlanes> FaceExportSnapPlanesCaller;
+typedef FreeCaller<void(const BoolImportCallback&), Face_exportSnapPlanes> FaceExportSnapPlanesCaller;
 
 void Brush_constructPreferences( PreferencesPage& page ){
        page.appendCheckBox(
@@ -80,7 +80,7 @@ void Brush_constructPage( PreferenceGroup& group ){
        Brush_constructPreferences( page );
 }
 void Brush_registerPreferencesPage(){
-       PreferencesDialog_addSettingsPage( FreeCaller1<PreferenceGroup&, Brush_constructPage>() );
+       PreferencesDialog_addSettingsPage( FreeCaller<void(PreferenceGroup&), Brush_constructPage>() );
 }
 
 void Brush_unlatchPreferences(){
@@ -159,7 +159,7 @@ void Brush_Construct( EBrushType type ){
        GlobalPreferenceSystem().registerPreference( "TexdefDefaultScale", FloatImportStringCaller( g_texdef_default_scale ), FloatExportStringCaller( g_texdef_default_scale ) );
 
        GridStatus_getTextureLockEnabled = getTextureLockEnabled;
-       g_texture_lock_status_changed = FreeCaller<GridStatus_onTextureLockEnabledChanged>();
+       g_texture_lock_status_changed = FreeCaller<void(), GridStatus_onTextureLockEnabledChanged>();
 }
 
 void Brush_Destroy(){
@@ -188,8 +188,8 @@ void BrushFaceData_fromFace( const BrushFaceDataCallback& callback, Face& face )
        faceData.value = face.getShader().m_flags.m_value;
        callback( faceData );
 }
-typedef ConstReferenceCaller1<BrushFaceDataCallback, Face&, BrushFaceData_fromFace> BrushFaceDataFromFaceCaller;
-typedef Callback1<Face&> FaceCallback;
+typedef ConstReferenceCaller<BrushFaceDataCallback, void(Face&), BrushFaceData_fromFace> BrushFaceDataFromFaceCaller;
+typedef Callback<void(Face&)> FaceCallback;
 
 class Quake3BrushCreator : public BrushCreator
 {
index 722d46fba30f512c235734a50c2e6343654d34ca..a1eab6c36a392a395b814816bc45c7eaa002c087 100644 (file)
@@ -961,7 +961,7 @@ BuildMenuItem( const char* name, ui::MenuItem item )
 void run(){
        RunBSP( m_name );
 }
-typedef MemberCaller<BuildMenuItem, &BuildMenuItem::run> RunCaller;
+typedef MemberCaller<BuildMenuItem, void(), &BuildMenuItem::run> RunCaller;
 };
 
 typedef std::list<BuildMenuItem> BuildMenuItems;
index 8d42b71540a3bde3e19e1c27f7b474052b6af224..c505b1befbdabc358046ae065d203d7bf982f42e 100644 (file)
@@ -160,11 +160,11 @@ struct camera_t
        }
 
        View* m_view;
-       Callback m_update;
+       Callback<void()> m_update;
 
        static camera_draw_mode draw_mode;
 
-       camera_t( View* view, const Callback& update )
+       camera_t( View* view, const Callback<void()>& update )
                : width( 0 ),
                height( 0 ),
                timing( false ),
@@ -513,18 +513,18 @@ void Camera_PitchDown_KeyUp( camera_t& camera ){
 }
 
 
-typedef ReferenceCaller<camera_t, &Camera_MoveForward_KeyDown> FreeMoveCameraMoveForwardKeyDownCaller;
-typedef ReferenceCaller<camera_t, &Camera_MoveForward_KeyUp> FreeMoveCameraMoveForwardKeyUpCaller;
-typedef ReferenceCaller<camera_t, &Camera_MoveBack_KeyDown> FreeMoveCameraMoveBackKeyDownCaller;
-typedef ReferenceCaller<camera_t, &Camera_MoveBack_KeyUp> FreeMoveCameraMoveBackKeyUpCaller;
-typedef ReferenceCaller<camera_t, &Camera_MoveLeft_KeyDown> FreeMoveCameraMoveLeftKeyDownCaller;
-typedef ReferenceCaller<camera_t, &Camera_MoveLeft_KeyUp> FreeMoveCameraMoveLeftKeyUpCaller;
-typedef ReferenceCaller<camera_t, &Camera_MoveRight_KeyDown> FreeMoveCameraMoveRightKeyDownCaller;
-typedef ReferenceCaller<camera_t, &Camera_MoveRight_KeyUp> FreeMoveCameraMoveRightKeyUpCaller;
-typedef ReferenceCaller<camera_t, &Camera_MoveUp_KeyDown> FreeMoveCameraMoveUpKeyDownCaller;
-typedef ReferenceCaller<camera_t, &Camera_MoveUp_KeyUp> FreeMoveCameraMoveUpKeyUpCaller;
-typedef ReferenceCaller<camera_t, &Camera_MoveDown_KeyDown> FreeMoveCameraMoveDownKeyDownCaller;
-typedef ReferenceCaller<camera_t, &Camera_MoveDown_KeyUp> FreeMoveCameraMoveDownKeyUpCaller;
+typedef ReferenceCaller<camera_t, void(), &Camera_MoveForward_KeyDown> FreeMoveCameraMoveForwardKeyDownCaller;
+typedef ReferenceCaller<camera_t, void(), &Camera_MoveForward_KeyUp> FreeMoveCameraMoveForwardKeyUpCaller;
+typedef ReferenceCaller<camera_t, void(), &Camera_MoveBack_KeyDown> FreeMoveCameraMoveBackKeyDownCaller;
+typedef ReferenceCaller<camera_t, void(), &Camera_MoveBack_KeyUp> FreeMoveCameraMoveBackKeyUpCaller;
+typedef ReferenceCaller<camera_t, void(), &Camera_MoveLeft_KeyDown> FreeMoveCameraMoveLeftKeyDownCaller;
+typedef ReferenceCaller<camera_t, void(), &Camera_MoveLeft_KeyUp> FreeMoveCameraMoveLeftKeyUpCaller;
+typedef ReferenceCaller<camera_t, void(), &Camera_MoveRight_KeyDown> FreeMoveCameraMoveRightKeyDownCaller;
+typedef ReferenceCaller<camera_t, void(), &Camera_MoveRight_KeyUp> FreeMoveCameraMoveRightKeyUpCaller;
+typedef ReferenceCaller<camera_t, void(), &Camera_MoveUp_KeyDown> FreeMoveCameraMoveUpKeyDownCaller;
+typedef ReferenceCaller<camera_t, void(), &Camera_MoveUp_KeyUp> FreeMoveCameraMoveUpKeyUpCaller;
+typedef ReferenceCaller<camera_t, void(), &Camera_MoveDown_KeyDown> FreeMoveCameraMoveDownKeyDownCaller;
+typedef ReferenceCaller<camera_t, void(), &Camera_MoveDown_KeyUp> FreeMoveCameraMoveDownKeyUpCaller;
 
 
 const float SPEED_MOVE = 32;
@@ -595,9 +595,9 @@ class RadiantCameraView : public CameraView
 {
 camera_t& m_camera;
 View* m_view;
-Callback m_update;
+Callback<void()> m_update;
 public:
-RadiantCameraView( camera_t& camera, View* view, const Callback& update ) : m_camera( camera ), m_view( view ), m_update( update ){
+RadiantCameraView( camera_t& camera, View* view, const Callback<void()>& update ) : m_camera( camera ), m_view( view ), m_update( update ){
 }
 void update(){
        m_view->Construct( m_camera.projection, m_camera.modelview, m_camera.width, m_camera.height );
@@ -723,7 +723,7 @@ private:
 void Cam_Draw();
 };
 
-typedef MemberCaller<CamWnd, &CamWnd::queue_draw> CamWndQueueDraw;
+typedef MemberCaller<CamWnd, void(), &CamWnd::queue_draw> CamWndQueueDraw;
 
 Shader* CamWnd::m_state_select1 = 0;
 Shader* CamWnd::m_state_select2 = 0;
@@ -909,44 +909,44 @@ void KeyEvent_disconnect( const char* name ){
 
 void CamWnd_registerCommands( CamWnd& camwnd ){
        GlobalKeyEvents_insert( "CameraForward", Accelerator( GDK_KEY_Up ),
-                                                       ReferenceCaller<camera_t, Camera_MoveForward_KeyDown>( camwnd.getCamera() ),
-                                                       ReferenceCaller<camera_t, Camera_MoveForward_KeyUp>( camwnd.getCamera() )
+                                                       ReferenceCaller<camera_t, void(), Camera_MoveForward_KeyDown>( camwnd.getCamera() ),
+                                                       ReferenceCaller<camera_t, void(), Camera_MoveForward_KeyUp>( camwnd.getCamera() )
                                                        );
        GlobalKeyEvents_insert( "CameraBack", Accelerator( GDK_KEY_Down ),
-                                                       ReferenceCaller<camera_t, Camera_MoveBack_KeyDown>( camwnd.getCamera() ),
-                                                       ReferenceCaller<camera_t, Camera_MoveBack_KeyUp>( camwnd.getCamera() )
+                                                       ReferenceCaller<camera_t, void(), Camera_MoveBack_KeyDown>( camwnd.getCamera() ),
+                                                       ReferenceCaller<camera_t, void(), Camera_MoveBack_KeyUp>( camwnd.getCamera() )
                                                        );
        GlobalKeyEvents_insert( "CameraLeft", Accelerator( GDK_KEY_Left ),
-                                                       ReferenceCaller<camera_t, Camera_RotateLeft_KeyDown>( camwnd.getCamera() ),
-                                                       ReferenceCaller<camera_t, Camera_RotateLeft_KeyUp>( camwnd.getCamera() )
+                                                       ReferenceCaller<camera_t, void(), Camera_RotateLeft_KeyDown>( camwnd.getCamera() ),
+                                                       ReferenceCaller<camera_t, void(), Camera_RotateLeft_KeyUp>( camwnd.getCamera() )
                                                        );
        GlobalKeyEvents_insert( "CameraRight", Accelerator( GDK_KEY_Right ),
-                                                       ReferenceCaller<camera_t, Camera_RotateRight_KeyDown>( camwnd.getCamera() ),
-                                                       ReferenceCaller<camera_t, Camera_RotateRight_KeyUp>( camwnd.getCamera() )
+                                                       ReferenceCaller<camera_t, void(), Camera_RotateRight_KeyDown>( camwnd.getCamera() ),
+                                                       ReferenceCaller<camera_t, void(), Camera_RotateRight_KeyUp>( camwnd.getCamera() )
                                                        );
        GlobalKeyEvents_insert( "CameraStrafeRight", Accelerator( GDK_KEY_period ),
-                                                       ReferenceCaller<camera_t, Camera_MoveRight_KeyDown>( camwnd.getCamera() ),
-                                                       ReferenceCaller<camera_t, Camera_MoveRight_KeyUp>( camwnd.getCamera() )
+                                                       ReferenceCaller<camera_t, void(), Camera_MoveRight_KeyDown>( camwnd.getCamera() ),
+                                                       ReferenceCaller<camera_t, void(), Camera_MoveRight_KeyUp>( camwnd.getCamera() )
                                                        );
        GlobalKeyEvents_insert( "CameraStrafeLeft", Accelerator( GDK_KEY_comma ),
-                                                       ReferenceCaller<camera_t, Camera_MoveLeft_KeyDown>( camwnd.getCamera() ),
-                                                       ReferenceCaller<camera_t, Camera_MoveLeft_KeyUp>( camwnd.getCamera() )
+                                                       ReferenceCaller<camera_t, void(), Camera_MoveLeft_KeyDown>( camwnd.getCamera() ),
+                                                       ReferenceCaller<camera_t, void(), Camera_MoveLeft_KeyUp>( camwnd.getCamera() )
                                                        );
        GlobalKeyEvents_insert( "CameraUp", Accelerator( 'D' ),
-                                                       ReferenceCaller<camera_t, Camera_MoveUp_KeyDown>( camwnd.getCamera() ),
-                                                       ReferenceCaller<camera_t, Camera_MoveUp_KeyUp>( camwnd.getCamera() )
+                                                       ReferenceCaller<camera_t, void(), Camera_MoveUp_KeyDown>( camwnd.getCamera() ),
+                                                       ReferenceCaller<camera_t, void(), Camera_MoveUp_KeyUp>( camwnd.getCamera() )
                                                        );
        GlobalKeyEvents_insert( "CameraDown", Accelerator( 'C' ),
-                                                       ReferenceCaller<camera_t, Camera_MoveDown_KeyDown>( camwnd.getCamera() ),
-                                                       ReferenceCaller<camera_t, Camera_MoveDown_KeyUp>( camwnd.getCamera() )
+                                                       ReferenceCaller<camera_t, void(), Camera_MoveDown_KeyDown>( camwnd.getCamera() ),
+                                                       ReferenceCaller<camera_t, void(), Camera_MoveDown_KeyUp>( camwnd.getCamera() )
                                                        );
        GlobalKeyEvents_insert( "CameraAngleDown", Accelerator( 'A' ),
-                                                       ReferenceCaller<camera_t, Camera_PitchDown_KeyDown>( camwnd.getCamera() ),
-                                                       ReferenceCaller<camera_t, Camera_PitchDown_KeyUp>( camwnd.getCamera() )
+                                                       ReferenceCaller<camera_t, void(), Camera_PitchDown_KeyDown>( camwnd.getCamera() ),
+                                                       ReferenceCaller<camera_t, void(), Camera_PitchDown_KeyUp>( camwnd.getCamera() )
                                                        );
        GlobalKeyEvents_insert( "CameraAngleUp", Accelerator( 'Z' ),
-                                                       ReferenceCaller<camera_t, Camera_PitchUp_KeyDown>( camwnd.getCamera() ),
-                                                       ReferenceCaller<camera_t, Camera_PitchUp_KeyUp>( camwnd.getCamera() )
+                                                       ReferenceCaller<camera_t, void(), Camera_PitchUp_KeyDown>( camwnd.getCamera() ),
+                                                       ReferenceCaller<camera_t, void(), Camera_PitchUp_KeyUp>( camwnd.getCamera() )
                                                        );
 
        GlobalKeyEvents_insert( "CameraFreeMoveForward", Accelerator( GDK_KEY_Up ),
@@ -974,17 +974,17 @@ void CamWnd_registerCommands( CamWnd& camwnd ){
                                                        FreeMoveCameraMoveDownKeyUpCaller( camwnd.getCamera() )
                                                        );
 
-       GlobalCommands_insert( "CameraForward", ReferenceCaller<camera_t, Camera_MoveForward_Discrete>( camwnd.getCamera() ), Accelerator( GDK_KEY_Up ) );
-       GlobalCommands_insert( "CameraBack", ReferenceCaller<camera_t, Camera_MoveBack_Discrete>( camwnd.getCamera() ), Accelerator( GDK_KEY_Down ) );
-       GlobalCommands_insert( "CameraLeft", ReferenceCaller<camera_t, Camera_RotateLeft_Discrete>( camwnd.getCamera() ), Accelerator( GDK_KEY_Left ) );
-       GlobalCommands_insert( "CameraRight", ReferenceCaller<camera_t, Camera_RotateRight_Discrete>( camwnd.getCamera() ), Accelerator( GDK_KEY_Right ) );
-       GlobalCommands_insert( "CameraStrafeRight", ReferenceCaller<camera_t, Camera_MoveRight_Discrete>( camwnd.getCamera() ), Accelerator( GDK_KEY_period ) );
-       GlobalCommands_insert( "CameraStrafeLeft", ReferenceCaller<camera_t, Camera_MoveLeft_Discrete>( camwnd.getCamera() ), Accelerator( GDK_KEY_comma ) );
+       GlobalCommands_insert( "CameraForward", ReferenceCaller<camera_t, void(), Camera_MoveForward_Discrete>( camwnd.getCamera() ), Accelerator( GDK_KEY_Up ) );
+       GlobalCommands_insert( "CameraBack", ReferenceCaller<camera_t, void(), Camera_MoveBack_Discrete>( camwnd.getCamera() ), Accelerator( GDK_KEY_Down ) );
+       GlobalCommands_insert( "CameraLeft", ReferenceCaller<camera_t, void(), Camera_RotateLeft_Discrete>( camwnd.getCamera() ), Accelerator( GDK_KEY_Left ) );
+       GlobalCommands_insert( "CameraRight", ReferenceCaller<camera_t, void(), Camera_RotateRight_Discrete>( camwnd.getCamera() ), Accelerator( GDK_KEY_Right ) );
+       GlobalCommands_insert( "CameraStrafeRight", ReferenceCaller<camera_t, void(), Camera_MoveRight_Discrete>( camwnd.getCamera() ), Accelerator( GDK_KEY_period ) );
+       GlobalCommands_insert( "CameraStrafeLeft", ReferenceCaller<camera_t, void(), Camera_MoveLeft_Discrete>( camwnd.getCamera() ), Accelerator( GDK_KEY_comma ) );
 
-       GlobalCommands_insert( "CameraUp", ReferenceCaller<camera_t, Camera_MoveUp_Discrete>( camwnd.getCamera() ), Accelerator( 'D' ) );
-       GlobalCommands_insert( "CameraDown", ReferenceCaller<camera_t, Camera_MoveDown_Discrete>( camwnd.getCamera() ), Accelerator( 'C' ) );
-       GlobalCommands_insert( "CameraAngleUp", ReferenceCaller<camera_t, Camera_PitchUp_Discrete>( camwnd.getCamera() ), Accelerator( 'A' ) );
-       GlobalCommands_insert( "CameraAngleDown", ReferenceCaller<camera_t, Camera_PitchDown_Discrete>( camwnd.getCamera() ), Accelerator( 'Z' ) );
+       GlobalCommands_insert( "CameraUp", ReferenceCaller<camera_t, void(), Camera_MoveUp_Discrete>( camwnd.getCamera() ), Accelerator( 'D' ) );
+       GlobalCommands_insert( "CameraDown", ReferenceCaller<camera_t, void(), Camera_MoveDown_Discrete>( camwnd.getCamera() ), Accelerator( 'C' ) );
+       GlobalCommands_insert( "CameraAngleUp", ReferenceCaller<camera_t, void(), Camera_PitchUp_Discrete>( camwnd.getCamera() ), Accelerator( 'A' ) );
+       GlobalCommands_insert( "CameraAngleDown", ReferenceCaller<camera_t, void(), Camera_PitchDown_Discrete>( camwnd.getCamera() ), Accelerator( 'Z' ) );
 }
 
 void CamWnd_Move_Enable( CamWnd& camwnd ){
@@ -1136,7 +1136,7 @@ void CamWnd_Remove_Handlers_FreeMove( CamWnd& camwnd ){
 CamWnd::CamWnd() :
        m_view( true ),
        m_Camera( &m_view, CamWndQueueDraw( *this ) ),
-       m_cameraview( m_Camera, &m_view, ReferenceCaller<CamWnd, CamWnd_Update>( *this ) ),
+       m_cameraview( m_Camera, &m_view, ReferenceCaller<CamWnd, void(), CamWnd_Update>( *this ) ),
        m_gl_widget( glwidget_new( TRUE ) ),
        m_window_observer( NewWindowObserver() ),
        m_XORRectangle( m_gl_widget ),
@@ -1152,7 +1152,7 @@ CamWnd::CamWnd() :
        GlobalWindowObservers_add( m_window_observer );
        GlobalWindowObservers_connectWidget( m_gl_widget );
 
-       m_window_observer->setRectangleDrawCallback( ReferenceCaller1<CamWnd, rect_t, camwnd_update_xor_rectangle>( *this ) );
+       m_window_observer->setRectangleDrawCallback( ReferenceCaller<CamWnd, void(rect_t), camwnd_update_xor_rectangle>( *this ) );
        m_window_observer->setView( m_view );
 
        g_object_ref( m_gl_widget._handle );
@@ -1171,7 +1171,7 @@ CamWnd::CamWnd() :
 
        m_gl_widget.connect( "scroll_event", G_CALLBACK( wheelmove_scroll ), this );
 
-       AddSceneChangeCallback( ReferenceCaller<CamWnd, CamWnd_Update>( *this ) );
+       AddSceneChangeCallback( ReferenceCaller<CamWnd, void(), CamWnd_Update>( *this ) );
 
        PressedButtons_connect( g_pressedButtons, m_gl_widget );
 }
@@ -1391,12 +1391,12 @@ void render( const Matrix4& modelview, const Matrix4& projection ){
 void ShowStatsToggle(){
        g_camwindow_globals_private.m_showStats ^= 1;
 }
-typedef FreeCaller<ShowStatsToggle> ShowStatsToggleCaller;
+typedef FreeCaller<void(), ShowStatsToggle> ShowStatsToggleCaller;
 
 void ShowStatsExport( const BoolImportCallback& importer ){
        importer( g_camwindow_globals_private.m_showStats );
 }
-typedef FreeCaller1<const BoolImportCallback&, ShowStatsExport> ShowStatsExportCaller;
+typedef FreeCaller<void(const BoolImportCallback&), ShowStatsExport> ShowStatsExportCaller;
 
 ShowStatsExportCaller g_show_stats_caller;
 BoolExportCallback g_show_stats_callback( g_show_stats_caller );
@@ -1711,7 +1711,7 @@ CameraModel* g_camera_model = 0;
 void CamWnd_LookThroughCamera( CamWnd& camwnd ){
        if ( g_camera_model != 0 ) {
                CamWnd_Add_Handlers_Move( camwnd );
-               g_camera_model->setCameraView( 0, Callback() );
+               g_camera_model->setCameraView( 0, Callback<void()>() );
                g_camera_model = 0;
                Camera_updateModelview( camwnd.getCamera() );
                Camera_updateProjection( camwnd.getCamera() );
@@ -1734,7 +1734,7 @@ void CamWnd_LookThroughSelected( CamWnd& camwnd ){
                if ( cameraModel != 0 ) {
                        CamWnd_Remove_Handlers_Move( camwnd );
                        g_camera_model = cameraModel;
-                       g_camera_model->setCameraView( &camwnd.getCameraView(), ReferenceCaller<CamWnd, CamWnd_LookThroughCamera>( camwnd ) );
+                       g_camera_model->setCameraView( &camwnd.getCameraView(), ReferenceCaller<CamWnd, void(), CamWnd_LookThroughCamera>( camwnd ) );
                }
        }
 }
@@ -1767,7 +1767,7 @@ void RenderModeImport( int value ){
                CamWnd_SetMode( cd_texture );
        }
 }
-typedef FreeCaller1<int, RenderModeImport> RenderModeImportCaller;
+typedef FreeCaller<void(int), RenderModeImport> RenderModeImportCaller;
 
 void RenderModeExport( const IntImportCallback& importer ){
        switch ( CamWnd_GetMode() )
@@ -1786,7 +1786,7 @@ void RenderModeExport( const IntImportCallback& importer ){
                break;
        }
 }
-typedef FreeCaller1<const IntImportCallback&, RenderModeExport> RenderModeExportCaller;
+typedef FreeCaller<void(const IntImportCallback&), RenderModeExport> RenderModeExportCaller;
 
 void Camera_constructPreferences( PreferencesPage& page ){
        page.appendSlider( "Movement Speed", g_camwindow_globals_private.m_nMoveSpeed, TRUE, 0, 0, 100, MIN_CAM_SPEED, MAX_CAM_SPEED, 1, 10 );
@@ -1795,12 +1795,12 @@ void Camera_constructPreferences( PreferencesPage& page ){
        page.appendCheckBox( "", "Invert mouse vertical axis", g_camwindow_globals_private.m_bCamInverseMouse );
        page.appendCheckBox(
                "", "Discrete movement",
-               FreeCaller1<bool, CamWnd_Move_Discrete_Import>(),
+               FreeCaller<void(bool), CamWnd_Move_Discrete_Import>(),
                BoolExportCaller( g_camwindow_globals_private.m_bCamDiscrete )
                );
        page.appendCheckBox(
                "", "Enable far-clip plane",
-               FreeCaller1<bool, Camera_SetFarClip>(),
+               FreeCaller<void(bool), Camera_SetFarClip>(),
                BoolExportCaller( g_camwindow_globals_private.m_bCubicClipping )
                );
 
@@ -1839,14 +1839,14 @@ void Camera_constructPage( PreferenceGroup& group ){
        Camera_constructPreferences( page );
 }
 void Camera_registerPreferencesPage(){
-       PreferencesDialog_addSettingsPage( FreeCaller1<PreferenceGroup&, Camera_constructPage>() );
+       PreferencesDialog_addSettingsPage( FreeCaller<void(PreferenceGroup&), Camera_constructPage>() );
 }
 
 #include "preferencesystem.h"
 #include "stringio.h"
 #include "dialog.h"
 
-typedef FreeCaller1<bool, CamWnd_Move_Discrete_Import> CamWndMoveDiscreteImportCaller;
+typedef FreeCaller<void(bool), CamWnd_Move_Discrete_Import> CamWndMoveDiscreteImportCaller;
 
 void CameraSpeed_increase(){
        if ( g_camwindow_globals_private.m_nMoveSpeed <= ( MAX_CAM_SPEED - CAM_SPEED_STEP - 10 ) ) {
@@ -1868,25 +1868,25 @@ void CameraSpeed_decrease(){
 
 /// \brief Initialisation for things that have the same lifespan as this module.
 void CamWnd_Construct(){
-       GlobalCommands_insert( "CenterView", FreeCaller<GlobalCamera_ResetAngles>(), Accelerator( GDK_KEY_End ) );
+       GlobalCommands_insert( "CenterView", FreeCaller<void(), GlobalCamera_ResetAngles>(), Accelerator( GDK_KEY_End ) );
 
-       GlobalToggles_insert( "ToggleCubicClip", FreeCaller<Camera_ToggleFarClip>(), ToggleItem::AddCallbackCaller( g_getfarclip_item ), Accelerator( '\\', (GdkModifierType)GDK_CONTROL_MASK ) );
-       GlobalCommands_insert( "CubicClipZoomIn", FreeCaller<Camera_CubeIn>(), Accelerator( '[', (GdkModifierType)GDK_CONTROL_MASK ) );
-       GlobalCommands_insert( "CubicClipZoomOut", FreeCaller<Camera_CubeOut>(), Accelerator( ']', (GdkModifierType)GDK_CONTROL_MASK ) );
+       GlobalToggles_insert( "ToggleCubicClip", FreeCaller<void(), Camera_ToggleFarClip>(), ToggleItem::AddCallbackCaller( g_getfarclip_item ), Accelerator( '\\', (GdkModifierType)GDK_CONTROL_MASK ) );
+       GlobalCommands_insert( "CubicClipZoomIn", FreeCaller<void(), Camera_CubeIn>(), Accelerator( '[', (GdkModifierType)GDK_CONTROL_MASK ) );
+       GlobalCommands_insert( "CubicClipZoomOut", FreeCaller<void(), Camera_CubeOut>(), Accelerator( ']', (GdkModifierType)GDK_CONTROL_MASK ) );
 
-       GlobalCommands_insert( "UpFloor", FreeCaller<Camera_ChangeFloorUp>(), Accelerator( GDK_KEY_Prior ) );
-       GlobalCommands_insert( "DownFloor", FreeCaller<Camera_ChangeFloorDown>(), Accelerator( GDK_KEY_Next ) );
+       GlobalCommands_insert( "UpFloor", FreeCaller<void(), Camera_ChangeFloorUp>(), Accelerator( GDK_KEY_Prior ) );
+       GlobalCommands_insert( "DownFloor", FreeCaller<void(), Camera_ChangeFloorDown>(), Accelerator( GDK_KEY_Next ) );
 
        GlobalToggles_insert( "ToggleCamera", ToggleShown::ToggleCaller( g_camera_shown ), ToggleItem::AddCallbackCaller( g_camera_shown.m_item ), Accelerator( 'C', (GdkModifierType)( GDK_SHIFT_MASK | GDK_CONTROL_MASK ) ) );
-       GlobalCommands_insert( "LookThroughSelected", FreeCaller<GlobalCamera_LookThroughSelected>() );
-       GlobalCommands_insert( "LookThroughCamera", FreeCaller<GlobalCamera_LookThroughCamera>() );
+       GlobalCommands_insert( "LookThroughSelected", FreeCaller<void(), GlobalCamera_LookThroughSelected>() );
+       GlobalCommands_insert( "LookThroughCamera", FreeCaller<void(), GlobalCamera_LookThroughCamera>() );
 
        if ( g_pGameDescription->mGameType == "doom3" ) {
-               GlobalCommands_insert( "TogglePreview", FreeCaller<CamWnd_TogglePreview>(), Accelerator( GDK_KEY_F3 ) );
+               GlobalCommands_insert( "TogglePreview", FreeCaller<void(), CamWnd_TogglePreview>(), Accelerator( GDK_KEY_F3 ) );
        }
 
-       GlobalCommands_insert( "CameraSpeedInc", FreeCaller<CameraSpeed_increase>(), Accelerator( GDK_KEY_KP_Add, (GdkModifierType)GDK_SHIFT_MASK ) );
-       GlobalCommands_insert( "CameraSpeedDec", FreeCaller<CameraSpeed_decrease>(), Accelerator( GDK_KEY_KP_Subtract, (GdkModifierType)GDK_SHIFT_MASK ) );
+       GlobalCommands_insert( "CameraSpeedInc", FreeCaller<void(), CameraSpeed_increase>(), Accelerator( GDK_KEY_KP_Add, (GdkModifierType)GDK_SHIFT_MASK ) );
+       GlobalCommands_insert( "CameraSpeedDec", FreeCaller<void(), CameraSpeed_decrease>(), Accelerator( GDK_KEY_KP_Subtract, (GdkModifierType)GDK_SHIFT_MASK ) );
 
        GlobalShortcuts_insert( "CameraForward", Accelerator( GDK_KEY_Up ) );
        GlobalShortcuts_insert( "CameraBack", Accelerator( GDK_KEY_Down ) );
index 7ebc4f25666c62fe68005130c6acfed711695313..1fab3bdcb67b7c178682b3287c33c5dffc382e80 100644 (file)
@@ -71,7 +71,7 @@ typedef std::map<CopiedString, Command> Commands;
 
 Commands g_commands;
 
-void GlobalCommands_insert( const char* name, const Callback& callback, const Accelerator& accelerator ){
+void GlobalCommands_insert( const char* name, const Callback<void()>& callback, const Accelerator& accelerator ){
        bool added = g_commands.insert( Commands::value_type( name, Command( callback, GlobalShortcuts_insert( name, accelerator ) ) ) ).second;
        ASSERT_MESSAGE( added, "command already registered: " << makeQuoted( name ) );
 }
@@ -87,7 +87,7 @@ typedef std::map<CopiedString, Toggle> Toggles;
 
 Toggles g_toggles;
 
-void GlobalToggles_insert( const char* name, const Callback& callback, const BoolExportCallback& exportCallback, const Accelerator& accelerator ){
+void GlobalToggles_insert( const char* name, const Callback<void()>& callback, const BoolExportCallback& exportCallback, const Accelerator& accelerator ){
        bool added = g_toggles.insert( Toggles::value_type( name, Toggle( callback, GlobalShortcuts_insert( name, accelerator ), exportCallback ) ) ).second;
        ASSERT_MESSAGE( added, "toggle already registered: " << makeQuoted( name ) );
 }
@@ -102,7 +102,7 @@ typedef std::map<CopiedString, KeyEvent> KeyEvents;
 
 KeyEvents g_keyEvents;
 
-void GlobalKeyEvents_insert( const char* name, const Accelerator& accelerator, const Callback& keyDown, const Callback& keyUp ){
+void GlobalKeyEvents_insert( const char* name, const Accelerator& accelerator, const Callback<void()>& keyDown, const Callback<void()>& keyUp ){
        bool added = g_keyEvents.insert( KeyEvents::value_type( name, KeyEvent( GlobalShortcuts_insert( name, accelerator ), keyDown, keyUp ) ) ).second;
        ASSERT_MESSAGE( added, "command already registered: " << makeQuoted( name ) );
 }
index ea5a6f33db68f61c10d15218d105f3fee3f1774e..ec10e1d8fd30325dd5c8bad562229e575336fe9f 100644 (file)
@@ -35,13 +35,13 @@ public:
 virtual void visit( const char* name, Accelerator& accelerator ) = 0;
 };
 
-void GlobalCommands_insert( const char* name, const Callback& callback, const Accelerator& accelerator = accelerator_null() );
+void GlobalCommands_insert( const char* name, const Callback<void()>& callback, const Accelerator& accelerator = accelerator_null() );
 const Command& GlobalCommands_find( const char* name );
 
-void GlobalToggles_insert( const char* name, const Callback& callback, const BoolExportCallback& exportCallback, const Accelerator& accelerator = accelerator_null() );
+void GlobalToggles_insert( const char* name, const Callback<void()>& callback, const BoolExportCallback& exportCallback, const Accelerator& accelerator = accelerator_null() );
 const Toggle& GlobalToggles_find( const char* name );
 
-void GlobalKeyEvents_insert( const char* name, const Accelerator& accelerator, const Callback& keyDown, const Callback& keyUp );
+void GlobalKeyEvents_insert( const char* name, const Accelerator& accelerator, const Callback<void()>& keyDown, const Callback<void()>& keyUp );
 const KeyEvent& GlobalKeyEvents_find( const char* name );
 
 
index cc5de460285bf609eb4a832c6ddc3b07c54a085e..2abfb1b36e9efdbeda1743585a872efc08ec83c7 100644 (file)
@@ -213,7 +213,7 @@ BindArguments2<Caller> bindArguments( const Caller& caller, FirstBound firstBoun
 inline bool Face_testPlane( const Face& face, const Plane3& plane, bool flipped ){
        return face.contributes() && !Winding_TestPlane( face.getWinding(), plane, flipped );
 }
-typedef Function3<const Face&, const Plane3&, bool, bool, Face_testPlane> FaceTestPlane;
+typedef Function<bool(const Face&, const Plane3&, bool), Face_testPlane> FaceTestPlane;
 
 
 
index 99d6d79b22bdd5d349b6a885a670a3a6afed3984..bb8705f2446191bbf78b4a431c9bf6586d471938 100644 (file)
@@ -112,7 +112,7 @@ template<
        typename Type_,
        typename Other_,
        void( *Import ) ( Type_&, Other_ ),
-       void( *Export ) ( Type_&, const Callback1<Other_>& )
+       void( *Export ) ( Type_&, const Callback<void(Other_)>& )
        >
 class ImportExport
 {
@@ -120,8 +120,8 @@ public:
 typedef Type_ Type;
 typedef Other_ Other;
 
-typedef ReferenceCaller1<Type, Other, Import> ImportCaller;
-typedef ReferenceCaller1<Type, const Callback1<Other>&, Export> ExportCaller;
+typedef ReferenceCaller<Type, void(Other), Import> ImportCaller;
+typedef ReferenceCaller<Type, void(const Callback<void(Other)>&), Export> ExportCaller;
 };
 
 typedef ImportExport<bool, bool, BoolImport, BoolExport> BoolImportExport;
@@ -229,8 +229,8 @@ template<typename FirstArgument>
 class CallbackDialogData : public DLG_DATA
 {
 public:
-typedef Callback1<FirstArgument> ImportCallback;
-typedef Callback1<const ImportCallback&> ExportCallback;
+typedef Callback<void(FirstArgument)> ImportCallback;
+typedef Callback<void(const ImportCallback&)> ExportCallback;
 
 private:
 ImportCallback m_importWidget;
@@ -281,8 +281,8 @@ AddCustomData( DialogDataList& data ) : m_data( data ){
 }
 void apply(
        typename Widget::Type& widget,
-       const Callback1<typename Widget::Other>& importViewer,
-       const Callback1<const Callback1<typename Widget::Other>&>& exportViewer
+       const Callback<void(typename Widget::Other)>& importViewer,
+       const Callback<void(const Callback<void(typename Widget::Other)>&)>& exportViewer
        ) const {
        m_data.push_back(
                new CallbackDialogData<typename Widget::Other>(
index 13ff605cd35fd8ab785558dd41e3496500d3027e..d9424809335022f5ba93906705424cd6563d5306 100644 (file)
 inline void BoolImport( bool& self, bool value ){
        self = value;
 }
-typedef ReferenceCaller1<bool, bool, BoolImport> BoolImportCaller;
+typedef ReferenceCaller<bool, void(bool), BoolImport> BoolImportCaller;
 
 inline void BoolExport( bool& self, const BoolImportCallback& importCallback ){
        importCallback( self );
 }
-typedef ReferenceCaller1<bool, const BoolImportCallback&, BoolExport> BoolExportCaller;
+typedef ReferenceCaller<bool, void(const BoolImportCallback&), BoolExport> BoolExportCaller;
 
 
 inline void IntImport( int& self, int value ){
        self = value;
 }
-typedef ReferenceCaller1<int, int, IntImport> IntImportCaller;
+typedef ReferenceCaller<int, void(int), IntImport> IntImportCaller;
 
 inline void IntExport( int& self, const IntImportCallback& importCallback ){
        importCallback( self );
 }
-typedef ReferenceCaller1<int, const IntImportCallback&, IntExport> IntExportCaller;
+typedef ReferenceCaller<int, void(const IntImportCallback&), IntExport> IntExportCaller;
 
 
 inline void SizeImport( std::size_t& self, std::size_t value ){
        self = value;
 }
-typedef ReferenceCaller1<std::size_t, std::size_t, SizeImport> SizeImportCaller;
+typedef ReferenceCaller<std::size_t, void(std::size_t), SizeImport> SizeImportCaller;
 
 inline void SizeExport( std::size_t& self, const SizeImportCallback& importCallback ){
        importCallback( self );
 }
-typedef ReferenceCaller1<std::size_t, const SizeImportCallback&, SizeExport> SizeExportCaller;
+typedef ReferenceCaller<std::size_t, void(const SizeImportCallback&), SizeExport> SizeExportCaller;
 
 
 inline void FloatImport( float& self, float value ){
        self = value;
 }
-typedef ReferenceCaller1<float, float, FloatImport> FloatImportCaller;
+typedef ReferenceCaller<float, void(float), FloatImport> FloatImportCaller;
 
 inline void FloatExport( float& self, const FloatImportCallback& importCallback ){
        importCallback( self );
 }
-typedef ReferenceCaller1<float, const FloatImportCallback&, FloatExport> FloatExportCaller;
+typedef ReferenceCaller<float, void(const FloatImportCallback&), FloatExport> FloatExportCaller;
 
 
 inline void StringImport( CopiedString& self, const char* value ){
        self = value;
 }
-typedef ReferenceCaller1<CopiedString, const char*, StringImport> StringImportCaller;
+typedef ReferenceCaller<CopiedString, void(const char*), StringImport> StringImportCaller;
 inline void StringExport( CopiedString& self, const StringImportCallback& importCallback ){
        importCallback( self.c_str() );
 }
-typedef ReferenceCaller1<CopiedString, const StringImportCallback&, StringExport> StringExportCaller;
+typedef ReferenceCaller<CopiedString, void(const StringImportCallback&), StringExport> StringExportCaller;
 
 
 struct DLG_DATA
index 2fde638181ef36f32b459dcb2b5402721167630e..7a7da47298c802c1caf6e45bd0ed44225da61a27 100644 (file)
@@ -689,7 +689,7 @@ EntityClassDoom3() : m_unrealised( 2 ){
 void realise(){
        if ( --m_unrealised == 0 ) {
                globalOutputStream() << "searching vfs directory " << makeQuoted( "def" ) << " for *.def\n";
-               GlobalFileSystem().forEachFile( "def/", "def", FreeCaller1<const char*, EntityClassDoom3_loadFile>() );
+               GlobalFileSystem().forEachFile( "def/", "def", FreeCaller<void(const char*), EntityClassDoom3_loadFile>() );
 
                {
                        for ( Models::iterator i = g_models.begin(); i != g_models.end(); ++i )
index fbb268fb0f06689ceabd18833ca4cae8f7b6f273..f480a2231e1856002e04360bb9e47267dc97734e 100644 (file)
@@ -545,12 +545,12 @@ const char* misc_model_dialog( ui::Widget parent ){
 void LightRadiiImport( EntityCreator& self, bool value ){
        self.setLightRadii( value );
 }
-typedef ReferenceCaller1<EntityCreator, bool, LightRadiiImport> LightRadiiImportCaller;
+typedef ReferenceCaller<EntityCreator, void(bool), LightRadiiImport> LightRadiiImportCaller;
 
 void LightRadiiExport( EntityCreator& self, const BoolImportCallback& importer ){
        importer( self.getLightRadii() );
 }
-typedef ReferenceCaller1<EntityCreator, const BoolImportCallback&, LightRadiiExport> LightRadiiExportCaller;
+typedef ReferenceCaller<EntityCreator, void(const BoolImportCallback&), LightRadiiExport> LightRadiiExportCaller;
 
 void Entity_constructPreferences( PreferencesPage& page ){
        page.appendCheckBox(
@@ -564,7 +564,7 @@ void Entity_constructPage( PreferenceGroup& group ){
        Entity_constructPreferences( page );
 }
 void Entity_registerPreferencesPage(){
-       PreferencesDialog_addDisplayPage( FreeCaller1<PreferenceGroup&, Entity_constructPage>() );
+       PreferencesDialog_addDisplayPage( FreeCaller<void(PreferenceGroup&), Entity_constructPage>() );
 }
 
 
@@ -584,12 +584,12 @@ void Entity_constructMenu( ui::Menu menu ){
 #include "stringio.h"
 
 void Entity_Construct(){
-       GlobalCommands_insert( "EntityColor", FreeCaller<Entity_setColour>(), Accelerator( 'K' ) );
-       GlobalCommands_insert( "NormalizeColor", FreeCaller<Entity_normalizeColor>() );
-       GlobalCommands_insert( "ConnectSelection", FreeCaller<Entity_connectSelected>(), Accelerator( 'K', (GdkModifierType)GDK_CONTROL_MASK ) );
-       GlobalCommands_insert( "KillConnectSelection", FreeCaller<Entity_killconnectSelected>(), Accelerator( 'K', (GdkModifierType)( GDK_SHIFT_MASK ) ) );
-       GlobalCommands_insert( "GroupSelection", FreeCaller<Entity_groupSelected>() );
-       GlobalCommands_insert( "UngroupSelection", FreeCaller<Entity_ungroupSelected>() );
+       GlobalCommands_insert( "EntityColor", FreeCaller<void(), Entity_setColour>(), Accelerator( 'K' ) );
+       GlobalCommands_insert( "NormalizeColor", FreeCaller<void(), Entity_normalizeColor>() );
+       GlobalCommands_insert( "ConnectSelection", FreeCaller<void(), Entity_connectSelected>(), Accelerator( 'K', (GdkModifierType)GDK_CONTROL_MASK ) );
+       GlobalCommands_insert( "KillConnectSelection", FreeCaller<void(), Entity_killconnectSelected>(), Accelerator( 'K', (GdkModifierType)( GDK_SHIFT_MASK ) ) );
+       GlobalCommands_insert( "GroupSelection", FreeCaller<void(), Entity_groupSelected>() );
+       GlobalCommands_insert( "UngroupSelection", FreeCaller<void(), Entity_ungroupSelected>() );
 
        GlobalPreferenceSystem().registerPreference( "SI_Colors5", Vector3ImportStringCaller( g_entity_globals.color_entity ), Vector3ExportStringCaller( g_entity_globals.color_entity ) );
        GlobalPreferenceSystem().registerPreference( "LastLightIntensity", IntImportStringCaller( g_iLastLightIntensity ), IntExportStringCaller( g_iLastLightIntensity ) );
index ccdbc111ce1b8e2d4263d2845aecbe226246d06d..852b763929d5ec57929a4739c92ec6a5d425c569 100644 (file)
@@ -142,7 +142,7 @@ void release(){
 void apply(){
        Scene_EntitySetKeyValue_Selected_Undoable( m_key.c_str(), m_check.active() ? "1" : "0" );
 }
-typedef MemberCaller<BooleanAttribute, &BooleanAttribute::apply> ApplyCaller;
+typedef MemberCaller<BooleanAttribute, void(), &BooleanAttribute::apply> ApplyCaller;
 
 void update(){
        const char* value = SelectedEntity_getValueForKey( m_key.c_str() );
@@ -154,7 +154,7 @@ void update(){
                toggle_button_set_active_no_signal( m_check, false );
        }
 }
-typedef MemberCaller<BooleanAttribute, &BooleanAttribute::update> UpdateCaller;
+typedef MemberCaller<BooleanAttribute, void(), &BooleanAttribute::update> UpdateCaller;
 };
 
 
@@ -190,14 +190,14 @@ void apply(){
        value << m_entry.text();
        Scene_EntitySetKeyValue_Selected_Undoable( m_key.c_str(), value.c_str() );
 }
-typedef MemberCaller<StringAttribute, &StringAttribute::apply> ApplyCaller;
+typedef MemberCaller<StringAttribute, void(), &StringAttribute::apply> ApplyCaller;
 
 void update(){
        StringOutputStream value( 64 );
        value << SelectedEntity_getValueForKey( m_key.c_str() );
        m_entry.text(value.c_str());
 }
-typedef MemberCaller<StringAttribute, &StringAttribute::update> UpdateCaller;
+typedef MemberCaller<StringAttribute, void(), &StringAttribute::update> UpdateCaller;
 };
 
 class ShaderAttribute : public StringAttribute
@@ -232,13 +232,13 @@ void apply(){
        value << m_entry.m_entry.m_entry.text();
        Scene_EntitySetKeyValue_Selected_Undoable( m_key.c_str(), value.c_str() );
 }
-typedef MemberCaller<ModelAttribute, &ModelAttribute::apply> ApplyCaller;
+typedef MemberCaller<ModelAttribute, void(), &ModelAttribute::apply> ApplyCaller;
 void update(){
        StringOutputStream value( 64 );
        value << SelectedEntity_getValueForKey( m_key.c_str() );
        m_entry.m_entry.m_entry.text(value.c_str());
 }
-typedef MemberCaller<ModelAttribute, &ModelAttribute::update> UpdateCaller;
+typedef MemberCaller<ModelAttribute, void(), &ModelAttribute::update> UpdateCaller;
 void browse( const BrowsedPathEntry::SetPathCallback& setPath ){
        const char *filename = misc_model_dialog( m_entry.m_entry.m_frame.window() );
 
@@ -247,7 +247,7 @@ void browse( const BrowsedPathEntry::SetPathCallback& setPath ){
                apply();
        }
 }
-typedef MemberCaller1<ModelAttribute, const BrowsedPathEntry::SetPathCallback&, &ModelAttribute::browse> BrowseCaller;
+typedef MemberCaller<ModelAttribute, void(const BrowsedPathEntry::SetPathCallback&), &ModelAttribute::browse> BrowseCaller;
 };
 
 const char* browse_sound( ui::Widget parent ){
@@ -295,13 +295,13 @@ void apply(){
        value << m_entry.m_entry.m_entry.text();
        Scene_EntitySetKeyValue_Selected_Undoable( m_key.c_str(), value.c_str() );
 }
-typedef MemberCaller<SoundAttribute, &SoundAttribute::apply> ApplyCaller;
+typedef MemberCaller<SoundAttribute, void(), &SoundAttribute::apply> ApplyCaller;
 void update(){
        StringOutputStream value( 64 );
        value << SelectedEntity_getValueForKey( m_key.c_str() );
        m_entry.m_entry.m_entry.text(value.c_str());
 }
-typedef MemberCaller<SoundAttribute, &SoundAttribute::update> UpdateCaller;
+typedef MemberCaller<SoundAttribute, void(), &SoundAttribute::update> UpdateCaller;
 void browse( const BrowsedPathEntry::SetPathCallback& setPath ){
        const char *filename = browse_sound( m_entry.m_entry.m_frame.window() );
 
@@ -310,7 +310,7 @@ void browse( const BrowsedPathEntry::SetPathCallback& setPath ){
                apply();
        }
 }
-typedef MemberCaller1<SoundAttribute, const BrowsedPathEntry::SetPathCallback&, &SoundAttribute::browse> BrowseCaller;
+typedef MemberCaller<SoundAttribute, void(const BrowsedPathEntry::SetPathCallback&), &SoundAttribute::browse> BrowseCaller;
 };
 
 inline double angle_normalised( double angle ){
@@ -342,7 +342,7 @@ void apply(){
        angle << angle_normalised( entry_get_float( m_entry ) );
        Scene_EntitySetKeyValue_Selected_Undoable( m_key.c_str(), angle.c_str() );
 }
-typedef MemberCaller<AngleAttribute, &AngleAttribute::apply> ApplyCaller;
+typedef MemberCaller<AngleAttribute, void(), &AngleAttribute::apply> ApplyCaller;
 
 void update(){
        const char* value = SelectedEntity_getValueForKey( m_key.c_str() );
@@ -356,7 +356,7 @@ void update(){
                m_entry.text("0");
        }
 }
-typedef MemberCaller<AngleAttribute, &AngleAttribute::update> UpdateCaller;
+typedef MemberCaller<AngleAttribute, void(), &AngleAttribute::update> UpdateCaller;
 };
 
 namespace
@@ -403,7 +403,7 @@ void apply(){
        angle << angle_normalised( entry_get_float( m_entry ) );
        Scene_EntitySetKeyValue_Selected_Undoable( m_key.c_str(), angle.c_str() );
 }
-typedef MemberCaller<DirectionAttribute, &DirectionAttribute::apply> ApplyCaller;
+typedef MemberCaller<DirectionAttribute, void(), &DirectionAttribute::apply> ApplyCaller;
 
 void update(){
        const char* value = SelectedEntity_getValueForKey( m_key.c_str() );
@@ -433,7 +433,7 @@ void update(){
                m_entry.text("0");
        }
 }
-typedef MemberCaller<DirectionAttribute, &DirectionAttribute::update> UpdateCaller;
+typedef MemberCaller<DirectionAttribute, void(), &DirectionAttribute::update> UpdateCaller;
 
 void applyRadio(){
        int index = radio_button_get_active( m_radio.m_radio );
@@ -447,7 +447,7 @@ void applyRadio(){
                apply();
        }
 }
-typedef MemberCaller<DirectionAttribute, &DirectionAttribute::applyRadio> ApplyRadioCaller;
+typedef MemberCaller<DirectionAttribute, void(), &DirectionAttribute::applyRadio> ApplyRadioCaller;
 };
 
 
@@ -508,7 +508,7 @@ void apply(){
                   << " " << angle_normalised( entry_get_float( m_angles.m_roll ) );
        Scene_EntitySetKeyValue_Selected_Undoable( m_key.c_str(), angles.c_str() );
 }
-typedef MemberCaller<AnglesAttribute, &AnglesAttribute::apply> ApplyCaller;
+typedef MemberCaller<AnglesAttribute, void(), &AnglesAttribute::apply> ApplyCaller;
 
 void update(){
        StringOutputStream angle( 32 );
@@ -538,7 +538,7 @@ void update(){
                m_angles.m_roll.text("0");
        }
 }
-typedef MemberCaller<AnglesAttribute, &AnglesAttribute::update> UpdateCaller;
+typedef MemberCaller<AnglesAttribute, void(), &AnglesAttribute::update> UpdateCaller;
 };
 
 class Vector3Entry
@@ -595,7 +595,7 @@ void apply(){
                        << " " << entry_get_float( m_vector3.m_z );
        Scene_EntitySetKeyValue_Selected_Undoable( m_key.c_str(), vector3.c_str() );
 }
-typedef MemberCaller<Vector3Attribute, &Vector3Attribute::apply> ApplyCaller;
+typedef MemberCaller<Vector3Attribute, void(), &Vector3Attribute::apply> ApplyCaller;
 
 void update(){
        StringOutputStream buffer( 32 );
@@ -625,12 +625,12 @@ void update(){
                m_vector3.m_z.text("0");
        }
 }
-typedef MemberCaller<Vector3Attribute, &Vector3Attribute::update> UpdateCaller;
+typedef MemberCaller<Vector3Attribute, void(), &Vector3Attribute::update> UpdateCaller;
 };
 
 class NonModalComboBox
 {
-Callback m_changed;
+Callback<void()> m_changed;
 guint m_changedHandler;
 
 static gboolean changed( ui::ComboBox widget, NonModalComboBox* self ){
@@ -639,7 +639,7 @@ static gboolean changed( ui::ComboBox widget, NonModalComboBox* self ){
 }
 
 public:
-NonModalComboBox( const Callback& changed ) : m_changed( changed ), m_changedHandler( 0 ){
+NonModalComboBox( const Callback<void()>& changed ) : m_changed( changed ), m_changedHandler( 0 ){
 }
 void connect( ui::ComboBox combo ){
        m_changedHandler = combo.connect( "changed", G_CALLBACK( changed ), this );
@@ -684,7 +684,7 @@ ui::Widget getWidget() const {
 void apply(){
        Scene_EntitySetKeyValue_Selected_Undoable( m_key.c_str(), m_type[gtk_combo_box_get_active( m_combo )].second.c_str() );
 }
-typedef MemberCaller<ListAttribute, &ListAttribute::apply> ApplyCaller;
+typedef MemberCaller<ListAttribute, void(), &ListAttribute::apply> ApplyCaller;
 
 void update(){
        const char* value = SelectedEntity_getValueForKey( m_key.c_str() );
@@ -697,7 +697,7 @@ void update(){
                m_nonModal.setActive( m_combo, 0 );
        }
 }
-typedef MemberCaller<ListAttribute, &ListAttribute::update> UpdateCaller;
+typedef MemberCaller<ListAttribute, void(), &ListAttribute::update> UpdateCaller;
 };
 
 
@@ -1063,7 +1063,7 @@ class EntityInspectorDraw
 {
 IdleDraw m_idleDraw;
 public:
-EntityInspectorDraw() : m_idleDraw( FreeCaller<EntityInspector_updateKeyValues>( ) ){
+EntityInspectorDraw() : m_idleDraw( FreeCaller<void(), EntityInspector_updateKeyValues>( ) ){
 }
 void queueDraw(){
        m_idleDraw.queueDraw();
@@ -1532,7 +1532,7 @@ ui::Widget EntityInspector_constructWindow( ui::Window toplevel ){
        g_entityInspector_windowConstructed = true;
        EntityClassList_fill();
 
-       typedef FreeCaller1<const Selectable&, EntityInspector_selectionChanged> EntityInspectorSelectionChangedCaller;
+       typedef FreeCaller<void(const Selectable&), EntityInspector_selectionChanged> EntityInspectorSelectionChangedCaller;
        GlobalSelectionSystem().addSelectionChangeCallback( EntityInspectorSelectionChangedCaller() );
        GlobalEntityCreator().setKeyValueChangedFunc( EntityInspector_keyValueChanged );
 
index 290f8bac0e1c7bb11a3d13075a6745ca32df0bdd..9218027d51d3b67c2b85ece9c203bb0e2e8f4de6 100644 (file)
@@ -41,7 +41,7 @@
 #include "treemodel.h"
 
 void RedrawEntityList();
-typedef FreeCaller<RedrawEntityList> RedrawEntityListCaller;
+typedef FreeCaller<void(), RedrawEntityList> RedrawEntityListCaller;
 
 
 class EntityList
@@ -377,7 +377,7 @@ void EntityList_Construct(){
 
        GlobalPreferenceSystem().registerPreference( "EntityInfoDlg", WindowPositionTrackerImportStringCaller( getEntityList().m_positionTracker ), WindowPositionTrackerExportStringCaller( getEntityList().m_positionTracker ) );
 
-       typedef FreeCaller1<const Selectable&, EntityList_SelectionChanged> EntityListSelectionChangedCaller;
+       typedef FreeCaller<void(const Selectable&), EntityList_SelectionChanged> EntityListSelectionChangedCaller;
        GlobalSelectionSystem().addSelectionChangeCallback( EntityListSelectionChangedCaller() );
 }
 void EntityList_Destroy(){
index 14eec0cdb4e0ff81a86e6c4f94085e8fee5160dc..be7576c3346edb0212a1b396b470bcbdb0321185 100644 (file)
@@ -130,7 +130,7 @@ ToggleFilterFlag( const ToggleFilterFlag& other ) : m_mask( other.m_mask ), m_it
 void active( const BoolImportCallback& importCallback ){
        importCallback( ( g_filters_globals.exclude & m_mask ) != 0 );
 }
-typedef MemberCaller1<ToggleFilterFlag, const BoolImportCallback&, &ToggleFilterFlag::active> ActiveCaller;
+typedef MemberCaller<ToggleFilterFlag, void(const BoolImportCallback&), &ToggleFilterFlag::active> ActiveCaller;
 void toggle(){
        g_filters_globals.exclude ^= m_mask;
        m_item.update();
@@ -141,7 +141,7 @@ void reset(){
        m_item.update();
        PerformFiltering();
 }
-typedef MemberCaller<ToggleFilterFlag, &ToggleFilterFlag::toggle> ToggleCaller;
+typedef MemberCaller<ToggleFilterFlag, void(), &ToggleFilterFlag::toggle> ToggleCaller;
 };
 
 
@@ -218,8 +218,8 @@ void Filters_constructMenu( ui::Menu menu_in_menu ){
 void ConstructFilters(){
        GlobalPreferenceSystem().registerPreference( "SI_Exclude", SizeImportStringCaller( g_filters_globals.exclude ), SizeExportStringCaller( g_filters_globals.exclude ) );
 
-       GlobalCommands_insert( "InvertFilters", FreeCaller<InvertFilters>() );
-       GlobalCommands_insert( "ResetFilters", FreeCaller<ResetFilters>() );
+       GlobalCommands_insert( "InvertFilters", FreeCaller<void(), InvertFilters>() );
+       GlobalCommands_insert( "ResetFilters", FreeCaller<void(), ResetFilters>() );
 
        add_filter_command( EXCLUDE_WORLD, "FilterWorldBrushes", Accelerator( '1', (GdkModifierType)GDK_MOD1_MASK ) );
        add_filter_command( EXCLUDE_ENT, "FilterEntities", Accelerator( '2', (GdkModifierType)GDK_MOD1_MASK ) );
index 48c564c4c40d18b80b5301ade53dd4a4ed3a9db7..a511cb1c387f83a84698bbb7d6fb43a34e161b35 100644 (file)
@@ -50,7 +50,7 @@ static void setReplaceStr( const char* name );
 static void setFindStr( const char* name );
 static bool isOpen();
 static void show();
-typedef FreeCaller<&FindTextureDialog::show> ShowCaller;
+typedef FreeCaller<void(), &FindTextureDialog::show> ShowCaller;
 static void updateTextures( const char* name );
 
 FindTextureDialog();
index 8ede1a221bbd530becdcf0403830f575d7338916..08b9bb86c6bd7971d2a23a5e42a0624a18553d20 100644 (file)
@@ -133,11 +133,11 @@ void set(){
        m_item.update();
        setGridPower( m_id );
 }
-typedef MemberCaller<GridMenuItem, &GridMenuItem::set> SetCaller;
+typedef MemberCaller<GridMenuItem, void(), &GridMenuItem::set> SetCaller;
 void active( const BoolImportCallback& importCallback ){
        importCallback( g_grid_power == m_id );
 }
-typedef MemberCaller1<GridMenuItem, const BoolImportCallback&, &GridMenuItem::active> ExportCaller;
+typedef MemberCaller<GridMenuItem, void(const BoolImportCallback&), &GridMenuItem::active> ExportCaller;
 };
 
 GridMenuItem g_gridMenu0125( GRIDPOWER_0125 );
@@ -192,10 +192,10 @@ void ToggleGridSnap(){
 }
 
 void Grid_registerCommands(){
-       GlobalCommands_insert( "GridDown", FreeCaller<GridPrev>(), Accelerator( '[' ) );
-       GlobalCommands_insert( "GridUp", FreeCaller<GridNext>(), Accelerator( ']' ) );
+       GlobalCommands_insert( "GridDown", FreeCaller<void(), GridPrev>(), Accelerator( '[' ) );
+       GlobalCommands_insert( "GridUp", FreeCaller<void(), GridNext>(), Accelerator( ']' ) );
 
-       GlobalCommands_insert( "ToggleGridSnap", FreeCaller<ToggleGridSnap>() );
+       GlobalCommands_insert( "ToggleGridSnap", FreeCaller<void(), ToggleGridSnap>() );
 
        GlobalToggles_insert( "SetGrid0.125", GridMenuItem::SetCaller( g_gridMenu0125 ), ToggleItem::AddCallbackCaller( g_gridMenu0125.m_item ) );
        GlobalToggles_insert( "SetGrid0.25", GridMenuItem::SetCaller( g_gridMenu025 ), ToggleItem::AddCallbackCaller( g_gridMenu025.m_item ) );
@@ -246,7 +246,7 @@ void Grid_constructPage( PreferenceGroup& group ){
        Grid_constructPreferences( page );
 }
 void Grid_registerPreferencesPage(){
-       PreferencesDialog_addSettingsPage( FreeCaller1<PreferenceGroup&, Grid_constructPage>() );
+       PreferencesDialog_addSettingsPage( FreeCaller<void(PreferenceGroup&), Grid_constructPage>() );
 }
 
 void Grid_construct(){
index 780339310da8337febc983bfd12563b879e23dc4..f175bc514c4cba810d0925829d2150cca3196015 100644 (file)
@@ -76,7 +76,7 @@ std::vector<StringExportCallback> g_pages;
 
 void GroupDialog_updatePageTitle( ui::Window window, std::size_t pageIndex ){
        if ( pageIndex < g_pages.size() ) {
-               g_pages[pageIndex]( PointerCaller1<GtkWindow, const char*, gtk_window_set_title>( window ) );
+               g_pages[pageIndex]( PointerCaller<GtkWindow, void(const char*), gtk_window_set_title>( window ) );
        }
 }
 
@@ -197,7 +197,7 @@ void GroupDialog_updatePageTitle( ui::Widget page ){
 void GroupDialog_Construct(){
        GlobalPreferenceSystem().registerPreference( "EntityWnd", WindowPositionTrackerImportStringCaller( g_GroupDlg.m_position_tracker ), WindowPositionTrackerExportStringCaller( g_GroupDlg.m_position_tracker ) );
 
-       GlobalCommands_insert( "ViewEntityInfo", FreeCaller<GroupDialog_ToggleShow>(), Accelerator( 'N' ) );
+       GlobalCommands_insert( "ViewEntityInfo", FreeCaller<void(), GroupDialog_ToggleShow>(), Accelerator( 'N' ) );
 }
 void GroupDialog_Destroy(){
 }
index 50e880b4c6f9725dcddfbfdcb6650c5222464753..f1a2e86b07efc76a132bfdc52162a0b23277fe3a 100644 (file)
@@ -36,7 +36,7 @@ void GroupDialog_show();
 inline void RawStringExport( const char* string, const StringImportCallback& importer ){
        importer( string );
 }
-typedef ConstPointerCaller1<char, const StringImportCallback&, RawStringExport> RawStringExportCaller;
+typedef ConstPointerCaller<char, void(const StringImportCallback&), RawStringExport> RawStringExportCaller;
 ui::Widget GroupDialog_addPage( const char* tabLabel, ui::Widget widget, const StringExportCallback& title );
 
 void GroupDialog_showPage( ui::Widget page );
index 82e5f6671d3866d2e6b975687e4d5594fb5b6048..b11743d69319a9af587cf71b2302ec9330e4fb7e 100644 (file)
@@ -94,7 +94,7 @@ void process_xlink( const char* filename, const char *menu_name, const char *bas
 
                                                prop = xmlGetProp( pNode, reinterpret_cast<const xmlChar*>( "name" ) );
                                                ASSERT_NOTNULL( prop );
-                                               create_menu_item_with_mnemonic( menu_in_menu, reinterpret_cast<const char*>( prop ), ReferenceCaller<CopiedString, HandleHelpCommand>( mHelpURLs.back() ) );
+                                               create_menu_item_with_mnemonic( menu_in_menu, reinterpret_cast<const char*>( prop ), ReferenceCaller<CopiedString, void(), HandleHelpCommand>( mHelpURLs.back() ) );
                                                xmlFree( prop );
                                        }
                                        pNode = pNode->next;
index fd4515242549d951b1dbe59c50311b96f5490d6e..bad501209f8fe39ae0f2af1e1f657299c3099c4f 100644 (file)
@@ -49,7 +49,7 @@
    \link math/plane.h math/plane.h \endlink - Planes \n
    \link math/aabb.h math/aabb.h \endlink - AABBs \n
 
-   Callback MemberCaller FunctionCaller - callbacks similar to using boost::function with boost::bind \n
+   Callback MemberCaller0 FunctionCaller - callbacks similar to using boost::function with boost::bind \n
    SmartPointer SmartReference - smart-pointer and smart-reference similar to Loki's SmartPtr \n
 
    \link generic/bitfield.h generic/bitfield.h \endlink - Type-safe bitfield \n
index 433767d547c705bb2a04d0b521a9a4db820aa493..64298050e3ac40d52ae10454df0bba4f1145b1c8 100644 (file)
@@ -417,7 +417,7 @@ const char* GameToolsPath_get(){
 void EnginePathImport( CopiedString& self, const char* value ){
        setEnginePath( value );
 }
-typedef ReferenceCaller1<CopiedString, const char*, EnginePathImport> EnginePathImportCaller;
+typedef ReferenceCaller<CopiedString, void(const char*), EnginePathImport> EnginePathImportCaller;
 
 void Paths_constructPreferences( PreferencesPage& page ){
        page.appendPathEntry( "Engine Path", true,
@@ -430,7 +430,7 @@ void Paths_constructPage( PreferenceGroup& group ){
        Paths_constructPreferences( page );
 }
 void Paths_registerPreferencesPage(){
-       PreferencesDialog_addSettingsPage( FreeCaller1<PreferenceGroup&, Paths_constructPage>() );
+       PreferencesDialog_addSettingsPage( FreeCaller<void(PreferenceGroup&), Paths_constructPage>() );
 }
 
 
@@ -790,8 +790,8 @@ void ColorScheme_Ydnar(){
        XY_UpdateAllWindows();
 }
 
-typedef Callback1<Vector3&> GetColourCallback;
-typedef Callback1<const Vector3&> SetColourCallback;
+typedef Callback<void(Vector3&)> GetColourCallback;
+typedef Callback<void(const Vector3&)> SetColourCallback;
 
 class ChooseColour
 {
@@ -814,37 +814,37 @@ void operator()(){
 void Colour_get( const Vector3& colour, Vector3& other ){
        other = colour;
 }
-typedef ConstReferenceCaller1<Vector3, Vector3&, Colour_get> ColourGetCaller;
+typedef ConstReferenceCaller<Vector3, void(Vector3&), Colour_get> ColourGetCaller;
 
 void Colour_set( Vector3& colour, const Vector3& other ){
        colour = other;
        SceneChangeNotify();
 }
-typedef ReferenceCaller1<Vector3, const Vector3&, Colour_set> ColourSetCaller;
+typedef ReferenceCaller<Vector3, void(const Vector3&), Colour_set> ColourSetCaller;
 
 void BrushColour_set( const Vector3& other ){
        g_xywindow_globals.color_brushes = other;
        SetWorldspawnColour( g_xywindow_globals.color_brushes );
        SceneChangeNotify();
 }
-typedef FreeCaller1<const Vector3&, BrushColour_set> BrushColourSetCaller;
+typedef FreeCaller<void(const Vector3&), BrushColour_set> BrushColourSetCaller;
 
 void ClipperColour_set( const Vector3& other ){
        g_xywindow_globals.color_clipper = other;
        Brush_clipperColourChanged();
        SceneChangeNotify();
 }
-typedef FreeCaller1<const Vector3&, ClipperColour_set> ClipperColourSetCaller;
+typedef FreeCaller<void(const Vector3&), ClipperColour_set> ClipperColourSetCaller;
 
 void TextureBrowserColour_get( Vector3& other ){
        other = TextureBrowser_getBackgroundColour( GlobalTextureBrowser() );
 }
-typedef FreeCaller1<Vector3&, TextureBrowserColour_get> TextureBrowserColourGetCaller;
+typedef FreeCaller<void(Vector3&), TextureBrowserColour_get> TextureBrowserColourGetCaller;
 
 void TextureBrowserColour_set( const Vector3& other ){
        TextureBrowser_setBackgroundColour( GlobalTextureBrowser(), other );
 }
-typedef FreeCaller1<const Vector3&, TextureBrowserColour_set> TextureBrowserColourSetCaller;
+typedef FreeCaller<void(const Vector3&), TextureBrowserColour_set> TextureBrowserColourSetCaller;
 
 
 class ColoursMenu
@@ -1004,17 +1004,17 @@ static void apply( const BoolImportCallback& importCallback ){
 }
 };
 
-typedef FreeCaller1<const BoolImportCallback&, &BoolFunctionExport<EdgeMode>::apply> EdgeModeApplyCaller;
+typedef FreeCaller<void(const BoolImportCallback&), &BoolFunctionExport<EdgeMode>::apply> EdgeModeApplyCaller;
 EdgeModeApplyCaller g_edgeMode_button_caller;
 BoolExportCallback g_edgeMode_button_callback( g_edgeMode_button_caller );
 ToggleItem g_edgeMode_button( g_edgeMode_button_callback );
 
-typedef FreeCaller1<const BoolImportCallback&, &BoolFunctionExport<VertexMode>::apply> VertexModeApplyCaller;
+typedef FreeCaller<void(const BoolImportCallback&), &BoolFunctionExport<VertexMode>::apply> VertexModeApplyCaller;
 VertexModeApplyCaller g_vertexMode_button_caller;
 BoolExportCallback g_vertexMode_button_callback( g_vertexMode_button_caller );
 ToggleItem g_vertexMode_button( g_vertexMode_button_callback );
 
-typedef FreeCaller1<const BoolImportCallback&, &BoolFunctionExport<FaceMode>::apply> FaceModeApplyCaller;
+typedef FreeCaller<void(const BoolImportCallback&), &BoolFunctionExport<FaceMode>::apply> FaceModeApplyCaller;
 FaceModeApplyCaller g_faceMode_button_caller;
 BoolExportCallback g_faceMode_button_callback( g_faceMode_button_caller );
 ToggleItem g_faceMode_button( g_faceMode_button_callback );
@@ -1310,23 +1310,23 @@ void ClipperToolExport( const BoolImportCallback& importCallback ){
        importCallback( GlobalSelectionSystem().ManipulatorMode() == SelectionSystem::eClip );
 }
 
-FreeCaller1<const BoolImportCallback&, TranslateToolExport> g_translatemode_button_caller;
+FreeCaller<void(const BoolImportCallback&), TranslateToolExport> g_translatemode_button_caller;
 BoolExportCallback g_translatemode_button_callback( g_translatemode_button_caller );
 ToggleItem g_translatemode_button( g_translatemode_button_callback );
 
-FreeCaller1<const BoolImportCallback&, RotateToolExport> g_rotatemode_button_caller;
+FreeCaller<void(const BoolImportCallback&), RotateToolExport> g_rotatemode_button_caller;
 BoolExportCallback g_rotatemode_button_callback( g_rotatemode_button_caller );
 ToggleItem g_rotatemode_button( g_rotatemode_button_callback );
 
-FreeCaller1<const BoolImportCallback&, ScaleToolExport> g_scalemode_button_caller;
+FreeCaller<void(const BoolImportCallback&), ScaleToolExport> g_scalemode_button_caller;
 BoolExportCallback g_scalemode_button_callback( g_scalemode_button_caller );
 ToggleItem g_scalemode_button( g_scalemode_button_callback );
 
-FreeCaller1<const BoolImportCallback&, DragToolExport> g_dragmode_button_caller;
+FreeCaller<void(const BoolImportCallback&), DragToolExport> g_dragmode_button_caller;
 BoolExportCallback g_dragmode_button_callback( g_dragmode_button_caller );
 ToggleItem g_dragmode_button( g_dragmode_button_callback );
 
-FreeCaller1<const BoolImportCallback&, ClipperToolExport> g_clipper_button_caller;
+FreeCaller<void(const BoolImportCallback&), ClipperToolExport> g_clipper_button_caller;
 BoolExportCallback g_clipper_button_callback( g_clipper_button_caller );
 ToggleItem g_clipper_button( g_clipper_button_callback );
 
@@ -2085,15 +2085,15 @@ ui::MenuItem create_misc_menu(){
        }
 
 #if 0
-       create_menu_item_with_mnemonic( menu, "_Benchmark", FreeCaller<GlobalCamera_Benchmark>() );
+       create_menu_item_with_mnemonic( menu, "_Benchmark", FreeCaller<void(), GlobalCamera_Benchmark>() );
 #endif
     menu.add(create_colours_menu());
 
        create_menu_item_with_mnemonic( menu, "Find brush...", "FindBrush" );
        create_menu_item_with_mnemonic( menu, "Map Info...", "MapInfo" );
        // http://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=394
-//  create_menu_item_with_mnemonic(menu, "_Print XY View", FreeCaller<WXY_Print>());
-       create_menu_item_with_mnemonic( menu, "_Background select", FreeCaller<WXY_BackgroundSelect>() );
+//  create_menu_item_with_mnemonic(menu, "_Print XY View", FreeCaller<void(), WXY_Print>());
+       create_menu_item_with_mnemonic( menu, "_Background select", FreeCaller<void(), WXY_BackgroundSelect>() );
        return misc_menu_item;
 }
 
@@ -2150,9 +2150,9 @@ ui::MenuItem create_help_menu(){
        // it will take care of hooking the Sys_OpenURL calls etc.
        create_game_help_menu( menu );
 
-       create_menu_item_with_mnemonic( menu, "Bug report", FreeCaller<OpenBugReportURL>() );
-       create_menu_item_with_mnemonic( menu, "Shortcuts list", FreeCaller<DoCommandListDlg>() );
-       create_menu_item_with_mnemonic( menu, "_About", FreeCaller<DoAbout>() );
+       create_menu_item_with_mnemonic( menu, "Bug report", FreeCaller<void(), OpenBugReportURL>() );
+       create_menu_item_with_mnemonic( menu, "Shortcuts list", FreeCaller<void(), DoCommandListDlg>() );
+       create_menu_item_with_mnemonic( menu, "_About", FreeCaller<void(), DoAbout>() );
 
        return help_menu_item;
 }
@@ -2971,7 +2971,7 @@ void MainFrame::Create(){
        SetActiveXY( m_pXYWnd );
 
        AddGridChangeCallback( SetGridStatusCaller( *this ) );
-       AddGridChangeCallback( ReferenceCaller<MainFrame, XY_UpdateAllWindows>( *this ) );
+       AddGridChangeCallback( ReferenceCaller<MainFrame, void(), XY_UpdateAllWindows>( *this ) );
 
        g_defaultToolMode = DragMode;
        g_defaultToolMode();
@@ -3155,7 +3155,7 @@ void Layout_constructPage( PreferenceGroup& group ){
 }
 
 void Layout_registerPreferencesPage(){
-       PreferencesDialog_addInterfacePage( FreeCaller1<PreferenceGroup&, Layout_constructPage>() );
+       PreferencesDialog_addInterfacePage( FreeCaller<void(PreferenceGroup&), Layout_constructPage>() );
 }
 
 
@@ -3163,75 +3163,75 @@ void Layout_registerPreferencesPage(){
 #include "stringio.h"
 
 void MainFrame_Construct(){
-       GlobalCommands_insert( "OpenManual", FreeCaller<OpenHelpURL>(), Accelerator( GDK_KEY_F1 ) );
-
-       GlobalCommands_insert( "Sleep", FreeCaller<thunk_OnSleep>(), Accelerator( 'P', (GdkModifierType)( GDK_SHIFT_MASK | GDK_CONTROL_MASK ) ) );
-       GlobalCommands_insert( "NewMap", FreeCaller<NewMap>() );
-       GlobalCommands_insert( "OpenMap", FreeCaller<OpenMap>(), Accelerator( 'O', (GdkModifierType)GDK_CONTROL_MASK ) );
-       GlobalCommands_insert( "ImportMap", FreeCaller<ImportMap>() );
-       GlobalCommands_insert( "SaveMap", FreeCaller<SaveMap>(), Accelerator( 'S', (GdkModifierType)GDK_CONTROL_MASK ) );
-       GlobalCommands_insert( "SaveMapAs", FreeCaller<SaveMapAs>() );
-       GlobalCommands_insert( "ExportSelected", FreeCaller<ExportMap>() );
-       GlobalCommands_insert( "SaveRegion", FreeCaller<SaveRegion>() );
-       GlobalCommands_insert( "RefreshReferences", FreeCaller<VFS_Refresh>() );
-       GlobalCommands_insert( "ProjectSettings", FreeCaller<DoProjectSettings>() );
-       GlobalCommands_insert( "Exit", FreeCaller<Exit>() );
-
-       GlobalCommands_insert( "Undo", FreeCaller<Undo>(), Accelerator( 'Z', (GdkModifierType)GDK_CONTROL_MASK ) );
-       GlobalCommands_insert( "Redo", FreeCaller<Redo>(), Accelerator( 'Y', (GdkModifierType)GDK_CONTROL_MASK ) );
-       GlobalCommands_insert( "Copy", FreeCaller<Copy>(), Accelerator( 'C', (GdkModifierType)GDK_CONTROL_MASK ) );
-       GlobalCommands_insert( "Paste", FreeCaller<Paste>(), Accelerator( 'V', (GdkModifierType)GDK_CONTROL_MASK ) );
-       GlobalCommands_insert( "PasteToCamera", FreeCaller<PasteToCamera>(), Accelerator( 'V', (GdkModifierType)GDK_MOD1_MASK ) );
-       GlobalCommands_insert( "CloneSelection", FreeCaller<Selection_Clone>(), Accelerator( GDK_KEY_space ) );
-       GlobalCommands_insert( "CloneSelectionAndMakeUnique", FreeCaller<Selection_Clone_MakeUnique>(), Accelerator( GDK_KEY_space, (GdkModifierType)GDK_SHIFT_MASK ) );
-       GlobalCommands_insert( "DeleteSelection", FreeCaller<deleteSelection>(), Accelerator( GDK_KEY_BackSpace ) );
-       GlobalCommands_insert( "ParentSelection", FreeCaller<Scene_parentSelected>() );
-       GlobalCommands_insert( "UnSelectSelection", FreeCaller<Selection_Deselect>(), Accelerator( GDK_KEY_Escape ) );
-       GlobalCommands_insert( "InvertSelection", FreeCaller<Select_Invert>(), Accelerator( 'I' ) );
-       GlobalCommands_insert( "SelectInside", FreeCaller<Select_Inside>() );
-       GlobalCommands_insert( "SelectTouching", FreeCaller<Select_Touching>() );
-       GlobalCommands_insert( "ExpandSelectionToEntities", FreeCaller<Scene_ExpandSelectionToEntities>(), Accelerator( 'E', (GdkModifierType)( GDK_MOD1_MASK | GDK_CONTROL_MASK ) ) );
-       GlobalCommands_insert( "Preferences", FreeCaller<PreferencesDialog_showDialog>(), Accelerator( 'P' ) );
-
-       GlobalCommands_insert( "ToggleConsole", FreeCaller<Console_ToggleShow>(), Accelerator( 'O' ) );
-       GlobalCommands_insert( "ToggleEntityInspector", FreeCaller<EntityInspector_ToggleShow>(), Accelerator( 'N' ) );
-       GlobalCommands_insert( "EntityList", FreeCaller<EntityList_toggleShown>(), Accelerator( 'L' ) );
-
-       GlobalCommands_insert( "ShowHidden", FreeCaller<Select_ShowAllHidden>(), Accelerator( 'H', (GdkModifierType)GDK_SHIFT_MASK ) );
-       GlobalCommands_insert( "HideSelected", FreeCaller<HideSelected>(), Accelerator( 'H' ) );
-
-       GlobalToggles_insert( "DragVertices", FreeCaller<SelectVertexMode>(), ToggleItem::AddCallbackCaller( g_vertexMode_button ), Accelerator( 'V' ) );
-       GlobalToggles_insert( "DragEdges", FreeCaller<SelectEdgeMode>(), ToggleItem::AddCallbackCaller( g_edgeMode_button ), Accelerator( 'E' ) );
-       GlobalToggles_insert( "DragFaces", FreeCaller<SelectFaceMode>(), ToggleItem::AddCallbackCaller( g_faceMode_button ), Accelerator( 'F' ) );
-
-       GlobalCommands_insert( "MirrorSelectionX", FreeCaller<Selection_Flipx>() );
-       GlobalCommands_insert( "RotateSelectionX", FreeCaller<Selection_Rotatex>() );
-       GlobalCommands_insert( "MirrorSelectionY", FreeCaller<Selection_Flipy>() );
-       GlobalCommands_insert( "RotateSelectionY", FreeCaller<Selection_Rotatey>() );
-       GlobalCommands_insert( "MirrorSelectionZ", FreeCaller<Selection_Flipz>() );
-       GlobalCommands_insert( "RotateSelectionZ", FreeCaller<Selection_Rotatez>() );
-
-       GlobalCommands_insert( "ArbitraryRotation", FreeCaller<DoRotateDlg>() );
-       GlobalCommands_insert( "ArbitraryScale", FreeCaller<DoScaleDlg>() );
-
-       GlobalCommands_insert( "BuildMenuCustomize", FreeCaller<DoBuildMenu>() );
-
-       GlobalCommands_insert( "FindBrush", FreeCaller<DoFind>() );
-
-       GlobalCommands_insert( "MapInfo", FreeCaller<DoMapInfo>(), Accelerator( 'M' ) );
-
-
-       GlobalToggles_insert( "ToggleClipper", FreeCaller<ClipperMode>(), ToggleItem::AddCallbackCaller( g_clipper_button ), Accelerator( 'X' ) );
-
-       GlobalToggles_insert( "MouseTranslate", FreeCaller<TranslateMode>(), ToggleItem::AddCallbackCaller( g_translatemode_button ), Accelerator( 'W' ) );
-       GlobalToggles_insert( "MouseRotate", FreeCaller<RotateMode>(), ToggleItem::AddCallbackCaller( g_rotatemode_button ), Accelerator( 'R' ) );
-       GlobalToggles_insert( "MouseScale", FreeCaller<ScaleMode>(), ToggleItem::AddCallbackCaller( g_scalemode_button ) );
-       GlobalToggles_insert( "MouseDrag", FreeCaller<DragMode>(), ToggleItem::AddCallbackCaller( g_dragmode_button ), Accelerator( 'Q' ) );
-
-       GlobalCommands_insert( "ColorSchemeOriginal", FreeCaller<ColorScheme_Original>() );
-       GlobalCommands_insert( "ColorSchemeQER", FreeCaller<ColorScheme_QER>() );
-       GlobalCommands_insert( "ColorSchemeBlackAndGreen", FreeCaller<ColorScheme_Black>() );
-       GlobalCommands_insert( "ColorSchemeYdnar", FreeCaller<ColorScheme_Ydnar>() );
+       GlobalCommands_insert( "OpenManual", FreeCaller<void(), OpenHelpURL>(), Accelerator( GDK_KEY_F1 ) );
+
+       GlobalCommands_insert( "Sleep", FreeCaller<void(), thunk_OnSleep>(), Accelerator( 'P', (GdkModifierType)( GDK_SHIFT_MASK | GDK_CONTROL_MASK ) ) );
+       GlobalCommands_insert( "NewMap", FreeCaller<void(), NewMap>() );
+       GlobalCommands_insert( "OpenMap", FreeCaller<void(), OpenMap>(), Accelerator( 'O', (GdkModifierType)GDK_CONTROL_MASK ) );
+       GlobalCommands_insert( "ImportMap", FreeCaller<void(), ImportMap>() );
+       GlobalCommands_insert( "SaveMap", FreeCaller<void(), SaveMap>(), Accelerator( 'S', (GdkModifierType)GDK_CONTROL_MASK ) );
+       GlobalCommands_insert( "SaveMapAs", FreeCaller<void(), SaveMapAs>() );
+       GlobalCommands_insert( "ExportSelected", FreeCaller<void(), ExportMap>() );
+       GlobalCommands_insert( "SaveRegion", FreeCaller<void(), SaveRegion>() );
+       GlobalCommands_insert( "RefreshReferences", FreeCaller<void(), VFS_Refresh>() );
+       GlobalCommands_insert( "ProjectSettings", FreeCaller<void(), DoProjectSettings>() );
+       GlobalCommands_insert( "Exit", FreeCaller<void(), Exit>() );
+
+       GlobalCommands_insert( "Undo", FreeCaller<void(), Undo>(), Accelerator( 'Z', (GdkModifierType)GDK_CONTROL_MASK ) );
+       GlobalCommands_insert( "Redo", FreeCaller<void(), Redo>(), Accelerator( 'Y', (GdkModifierType)GDK_CONTROL_MASK ) );
+       GlobalCommands_insert( "Copy", FreeCaller<void(), Copy>(), Accelerator( 'C', (GdkModifierType)GDK_CONTROL_MASK ) );
+       GlobalCommands_insert( "Paste", FreeCaller<void(), Paste>(), Accelerator( 'V', (GdkModifierType)GDK_CONTROL_MASK ) );
+       GlobalCommands_insert( "PasteToCamera", FreeCaller<void(), PasteToCamera>(), Accelerator( 'V', (GdkModifierType)GDK_MOD1_MASK ) );
+       GlobalCommands_insert( "CloneSelection", FreeCaller<void(), Selection_Clone>(), Accelerator( GDK_KEY_space ) );
+       GlobalCommands_insert( "CloneSelectionAndMakeUnique", FreeCaller<void(), Selection_Clone_MakeUnique>(), Accelerator( GDK_KEY_space, (GdkModifierType)GDK_SHIFT_MASK ) );
+       GlobalCommands_insert( "DeleteSelection", FreeCaller<void(), deleteSelection>(), Accelerator( GDK_KEY_BackSpace ) );
+       GlobalCommands_insert( "ParentSelection", FreeCaller<void(), Scene_parentSelected>() );
+       GlobalCommands_insert( "UnSelectSelection", FreeCaller<void(), Selection_Deselect>(), Accelerator( GDK_KEY_Escape ) );
+       GlobalCommands_insert( "InvertSelection", FreeCaller<void(), Select_Invert>(), Accelerator( 'I' ) );
+       GlobalCommands_insert( "SelectInside", FreeCaller<void(), Select_Inside>() );
+       GlobalCommands_insert( "SelectTouching", FreeCaller<void(), Select_Touching>() );
+       GlobalCommands_insert( "ExpandSelectionToEntities", FreeCaller<void(), Scene_ExpandSelectionToEntities>(), Accelerator( 'E', (GdkModifierType)( GDK_MOD1_MASK | GDK_CONTROL_MASK ) ) );
+       GlobalCommands_insert( "Preferences", FreeCaller<void(), PreferencesDialog_showDialog>(), Accelerator( 'P' ) );
+
+       GlobalCommands_insert( "ToggleConsole", FreeCaller<void(), Console_ToggleShow>(), Accelerator( 'O' ) );
+       GlobalCommands_insert( "ToggleEntityInspector", FreeCaller<void(), EntityInspector_ToggleShow>(), Accelerator( 'N' ) );
+       GlobalCommands_insert( "EntityList", FreeCaller<void(), EntityList_toggleShown>(), Accelerator( 'L' ) );
+
+       GlobalCommands_insert( "ShowHidden", FreeCaller<void(), Select_ShowAllHidden>(), Accelerator( 'H', (GdkModifierType)GDK_SHIFT_MASK ) );
+       GlobalCommands_insert( "HideSelected", FreeCaller<void(), HideSelected>(), Accelerator( 'H' ) );
+
+       GlobalToggles_insert( "DragVertices", FreeCaller<void(), SelectVertexMode>(), ToggleItem::AddCallbackCaller( g_vertexMode_button ), Accelerator( 'V' ) );
+       GlobalToggles_insert( "DragEdges", FreeCaller<void(), SelectEdgeMode>(), ToggleItem::AddCallbackCaller( g_edgeMode_button ), Accelerator( 'E' ) );
+       GlobalToggles_insert( "DragFaces", FreeCaller<void(), SelectFaceMode>(), ToggleItem::AddCallbackCaller( g_faceMode_button ), Accelerator( 'F' ) );
+
+       GlobalCommands_insert( "MirrorSelectionX", FreeCaller<void(), Selection_Flipx>() );
+       GlobalCommands_insert( "RotateSelectionX", FreeCaller<void(), Selection_Rotatex>() );
+       GlobalCommands_insert( "MirrorSelectionY", FreeCaller<void(), Selection_Flipy>() );
+       GlobalCommands_insert( "RotateSelectionY", FreeCaller<void(), Selection_Rotatey>() );
+       GlobalCommands_insert( "MirrorSelectionZ", FreeCaller<void(), Selection_Flipz>() );
+       GlobalCommands_insert( "RotateSelectionZ", FreeCaller<void(), Selection_Rotatez>() );
+
+       GlobalCommands_insert( "ArbitraryRotation", FreeCaller<void(), DoRotateDlg>() );
+       GlobalCommands_insert( "ArbitraryScale", FreeCaller<void(), DoScaleDlg>() );
+
+       GlobalCommands_insert( "BuildMenuCustomize", FreeCaller<void(), DoBuildMenu>() );
+
+       GlobalCommands_insert( "FindBrush", FreeCaller<void(), DoFind>() );
+
+       GlobalCommands_insert( "MapInfo", FreeCaller<void(), DoMapInfo>(), Accelerator( 'M' ) );
+
+
+       GlobalToggles_insert( "ToggleClipper", FreeCaller<void(), ClipperMode>(), ToggleItem::AddCallbackCaller( g_clipper_button ), Accelerator( 'X' ) );
+
+       GlobalToggles_insert( "MouseTranslate", FreeCaller<void(), TranslateMode>(), ToggleItem::AddCallbackCaller( g_translatemode_button ), Accelerator( 'W' ) );
+       GlobalToggles_insert( "MouseRotate", FreeCaller<void(), RotateMode>(), ToggleItem::AddCallbackCaller( g_rotatemode_button ), Accelerator( 'R' ) );
+       GlobalToggles_insert( "MouseScale", FreeCaller<void(), ScaleMode>(), ToggleItem::AddCallbackCaller( g_scalemode_button ) );
+       GlobalToggles_insert( "MouseDrag", FreeCaller<void(), DragMode>(), ToggleItem::AddCallbackCaller( g_dragmode_button ), Accelerator( 'Q' ) );
+
+       GlobalCommands_insert( "ColorSchemeOriginal", FreeCaller<void(), ColorScheme_Original>() );
+       GlobalCommands_insert( "ColorSchemeQER", FreeCaller<void(), ColorScheme_QER>() );
+       GlobalCommands_insert( "ColorSchemeBlackAndGreen", FreeCaller<void(), ColorScheme_Black>() );
+       GlobalCommands_insert( "ColorSchemeYdnar", FreeCaller<void(), ColorScheme_Ydnar>() );
        GlobalCommands_insert( "ChooseTextureBackgroundColor", makeCallback( g_ColoursMenu.m_textureback ) );
        GlobalCommands_insert( "ChooseGridBackgroundColor", makeCallback( g_ColoursMenu.m_xyback ) );
        GlobalCommands_insert( "ChooseGridMajorColor", makeCallback( g_ColoursMenu.m_gridmajor ) );
@@ -3248,39 +3248,39 @@ void MainFrame_Construct(){
        GlobalCommands_insert( "ChooseOrthoViewNameColor", makeCallback( g_ColoursMenu.m_viewname ) );
 
 
-       GlobalCommands_insert( "CSGSubtract", FreeCaller<CSG_Subtract>(), Accelerator( 'U', (GdkModifierType)GDK_SHIFT_MASK ) );
-       GlobalCommands_insert( "CSGMerge", FreeCaller<CSG_Merge>(), Accelerator( 'U', (GdkModifierType)GDK_CONTROL_MASK ) );
-       GlobalCommands_insert( "CSGHollow", FreeCaller<CSG_MakeHollow>() );
+       GlobalCommands_insert( "CSGSubtract", FreeCaller<void(), CSG_Subtract>(), Accelerator( 'U', (GdkModifierType)GDK_SHIFT_MASK ) );
+       GlobalCommands_insert( "CSGMerge", FreeCaller<void(), CSG_Merge>(), Accelerator( 'U', (GdkModifierType)GDK_CONTROL_MASK ) );
+       GlobalCommands_insert( "CSGHollow", FreeCaller<void(), CSG_MakeHollow>() );
 
        Grid_registerCommands();
 
-       GlobalCommands_insert( "SnapToGrid", FreeCaller<Selection_SnapToGrid>(), Accelerator( 'G', (GdkModifierType)GDK_CONTROL_MASK ) );
+       GlobalCommands_insert( "SnapToGrid", FreeCaller<void(), Selection_SnapToGrid>(), Accelerator( 'G', (GdkModifierType)GDK_CONTROL_MASK ) );
 
-       GlobalCommands_insert( "SelectAllOfType", FreeCaller<Select_AllOfType>(), Accelerator( 'A', (GdkModifierType)GDK_SHIFT_MASK ) );
+       GlobalCommands_insert( "SelectAllOfType", FreeCaller<void(), Select_AllOfType>(), Accelerator( 'A', (GdkModifierType)GDK_SHIFT_MASK ) );
 
-       GlobalCommands_insert( "TexRotateClock", FreeCaller<Texdef_RotateClockwise>(), Accelerator( GDK_KEY_Next, (GdkModifierType)GDK_SHIFT_MASK ) );
-       GlobalCommands_insert( "TexRotateCounter", FreeCaller<Texdef_RotateAntiClockwise>(), Accelerator( GDK_KEY_Prior, (GdkModifierType)GDK_SHIFT_MASK ) );
-       GlobalCommands_insert( "TexScaleUp", FreeCaller<Texdef_ScaleUp>(), Accelerator( GDK_KEY_Up, (GdkModifierType)GDK_CONTROL_MASK ) );
-       GlobalCommands_insert( "TexScaleDown", FreeCaller<Texdef_ScaleDown>(), Accelerator( GDK_KEY_Down, (GdkModifierType)GDK_CONTROL_MASK ) );
-       GlobalCommands_insert( "TexScaleLeft", FreeCaller<Texdef_ScaleLeft>(), Accelerator( GDK_KEY_Left, (GdkModifierType)GDK_CONTROL_MASK ) );
-       GlobalCommands_insert( "TexScaleRight", FreeCaller<Texdef_ScaleRight>(), Accelerator( GDK_KEY_Right, (GdkModifierType)GDK_CONTROL_MASK ) );
-       GlobalCommands_insert( "TexShiftUp", FreeCaller<Texdef_ShiftUp>(), Accelerator( GDK_KEY_Up, (GdkModifierType)GDK_SHIFT_MASK ) );
-       GlobalCommands_insert( "TexShiftDown", FreeCaller<Texdef_ShiftDown>(), Accelerator( GDK_KEY_Down, (GdkModifierType)GDK_SHIFT_MASK ) );
-       GlobalCommands_insert( "TexShiftLeft", FreeCaller<Texdef_ShiftLeft>(), Accelerator( GDK_KEY_Left, (GdkModifierType)GDK_SHIFT_MASK ) );
-       GlobalCommands_insert( "TexShiftRight", FreeCaller<Texdef_ShiftRight>(), Accelerator( GDK_KEY_Right, (GdkModifierType)GDK_SHIFT_MASK ) );
+       GlobalCommands_insert( "TexRotateClock", FreeCaller<void(), Texdef_RotateClockwise>(), Accelerator( GDK_KEY_Next, (GdkModifierType)GDK_SHIFT_MASK ) );
+       GlobalCommands_insert( "TexRotateCounter", FreeCaller<void(), Texdef_RotateAntiClockwise>(), Accelerator( GDK_KEY_Prior, (GdkModifierType)GDK_SHIFT_MASK ) );
+       GlobalCommands_insert( "TexScaleUp", FreeCaller<void(), Texdef_ScaleUp>(), Accelerator( GDK_KEY_Up, (GdkModifierType)GDK_CONTROL_MASK ) );
+       GlobalCommands_insert( "TexScaleDown", FreeCaller<void(), Texdef_ScaleDown>(), Accelerator( GDK_KEY_Down, (GdkModifierType)GDK_CONTROL_MASK ) );
+       GlobalCommands_insert( "TexScaleLeft", FreeCaller<void(), Texdef_ScaleLeft>(), Accelerator( GDK_KEY_Left, (GdkModifierType)GDK_CONTROL_MASK ) );
+       GlobalCommands_insert( "TexScaleRight", FreeCaller<void(), Texdef_ScaleRight>(), Accelerator( GDK_KEY_Right, (GdkModifierType)GDK_CONTROL_MASK ) );
+       GlobalCommands_insert( "TexShiftUp", FreeCaller<void(), Texdef_ShiftUp>(), Accelerator( GDK_KEY_Up, (GdkModifierType)GDK_SHIFT_MASK ) );
+       GlobalCommands_insert( "TexShiftDown", FreeCaller<void(), Texdef_ShiftDown>(), Accelerator( GDK_KEY_Down, (GdkModifierType)GDK_SHIFT_MASK ) );
+       GlobalCommands_insert( "TexShiftLeft", FreeCaller<void(), Texdef_ShiftLeft>(), Accelerator( GDK_KEY_Left, (GdkModifierType)GDK_SHIFT_MASK ) );
+       GlobalCommands_insert( "TexShiftRight", FreeCaller<void(), Texdef_ShiftRight>(), Accelerator( GDK_KEY_Right, (GdkModifierType)GDK_SHIFT_MASK ) );
 
-       GlobalCommands_insert( "MoveSelectionDOWN", FreeCaller<Selection_MoveDown>(), Accelerator( GDK_KEY_KP_Subtract ) );
-       GlobalCommands_insert( "MoveSelectionUP", FreeCaller<Selection_MoveUp>(), Accelerator( GDK_KEY_KP_Add ) );
+       GlobalCommands_insert( "MoveSelectionDOWN", FreeCaller<void(), Selection_MoveDown>(), Accelerator( GDK_KEY_KP_Subtract ) );
+       GlobalCommands_insert( "MoveSelectionUP", FreeCaller<void(), Selection_MoveUp>(), Accelerator( GDK_KEY_KP_Add ) );
 
-       GlobalCommands_insert( "SelectNudgeLeft", FreeCaller<Selection_NudgeLeft>(), Accelerator( GDK_KEY_Left, (GdkModifierType)GDK_MOD1_MASK ) );
-       GlobalCommands_insert( "SelectNudgeRight", FreeCaller<Selection_NudgeRight>(), Accelerator( GDK_KEY_Right, (GdkModifierType)GDK_MOD1_MASK ) );
-       GlobalCommands_insert( "SelectNudgeUp", FreeCaller<Selection_NudgeUp>(), Accelerator( GDK_KEY_Up, (GdkModifierType)GDK_MOD1_MASK ) );
-       GlobalCommands_insert( "SelectNudgeDown", FreeCaller<Selection_NudgeDown>(), Accelerator( GDK_KEY_Down, (GdkModifierType)GDK_MOD1_MASK ) );
+       GlobalCommands_insert( "SelectNudgeLeft", FreeCaller<void(), Selection_NudgeLeft>(), Accelerator( GDK_KEY_Left, (GdkModifierType)GDK_MOD1_MASK ) );
+       GlobalCommands_insert( "SelectNudgeRight", FreeCaller<void(), Selection_NudgeRight>(), Accelerator( GDK_KEY_Right, (GdkModifierType)GDK_MOD1_MASK ) );
+       GlobalCommands_insert( "SelectNudgeUp", FreeCaller<void(), Selection_NudgeUp>(), Accelerator( GDK_KEY_Up, (GdkModifierType)GDK_MOD1_MASK ) );
+       GlobalCommands_insert( "SelectNudgeDown", FreeCaller<void(), Selection_NudgeDown>(), Accelerator( GDK_KEY_Down, (GdkModifierType)GDK_MOD1_MASK ) );
 
        Patch_registerCommands();
        XYShow_registerCommands();
 
-       typedef FreeCaller1<const Selectable&, ComponentMode_SelectionChanged> ComponentModeSelectionChangedCaller;
+       typedef FreeCaller<void(const Selectable&), ComponentMode_SelectionChanged> ComponentModeSelectionChangedCaller;
        GlobalSelectionSystem().addSelectionChangeCallback( ComponentModeSelectionChangedCaller() );
 
        GlobalPreferenceSystem().registerPreference( "DetachableMenus", BoolImportStringCaller( g_Layout_enableDetachableMenus.m_latched ), BoolExportStringCaller( g_Layout_enableDetachableMenus.m_latched ) );
@@ -3330,8 +3330,8 @@ void MainFrame_Construct(){
        Layout_registerPreferencesPage();
        Paths_registerPreferencesPage();
 
-       g_brushCount.setCountChangedCallback( FreeCaller<QE_brushCountChanged>() );
-       g_entityCount.setCountChangedCallback( FreeCaller<QE_entityCountChanged>() );
+       g_brushCount.setCountChangedCallback( FreeCaller<void(), QE_brushCountChanged>() );
+       g_entityCount.setCountChangedCallback( FreeCaller<void(), QE_entityCountChanged>() );
        GlobalEntityCreator().setCounter( &g_entityCount );
 
        GLWidget_sharedContextCreated = GlobalGL_sharedContextCreated;
@@ -3344,8 +3344,8 @@ void MainFrame_Destroy(){
        GlobalEntityClassManager().detach( g_WorldspawnColourEntityClassObserver );
 
        GlobalEntityCreator().setCounter( 0 );
-       g_entityCount.setCountChangedCallback( Callback() );
-       g_brushCount.setCountChangedCallback( Callback() );
+       g_entityCount.setCountChangedCallback( Callback<void()>() );
+       g_brushCount.setCountChangedCallback( Callback<void()>() );
 }
 
 
index 2c003af46ad9f3b2cb3167c330fcac30d737f039..f271ad9e7c0f7b2302b7ea2bee89c90ab827711f 100644 (file)
@@ -103,10 +103,10 @@ void OnSleep();
 void SetStatusText( CopiedString& status_text, const char* pText );
 void UpdateStatusText();
 void RedrawStatusText();
-typedef MemberCaller<MainFrame, &MainFrame::RedrawStatusText> RedrawStatusTextCaller;
+typedef MemberCaller<MainFrame, void(), &MainFrame::RedrawStatusText> RedrawStatusTextCaller;
 
 void SetGridStatus();
-typedef MemberCaller<MainFrame, &MainFrame::SetGridStatus> SetGridStatusCaller;
+typedef MemberCaller<MainFrame, void(), &MainFrame::SetGridStatus> SetGridStatusCaller;
 
 void SetActiveXY( XYWnd* p );
 XYWnd* ActiveXY(){
index bbc3d57a967283803cc7e2859c0f4598d06fe2ad..5523f431c60a114de44e52e5e372a9fb8fe04d04 100644 (file)
@@ -124,7 +124,7 @@ void nameChanged( const char* name ){
        m_name = name;
        construct();
 }
-typedef MemberCaller1<NameObserver, const char*, &NameObserver::nameChanged> NameChangedCaller;
+typedef MemberCaller<NameObserver, void(const char*), &NameObserver::nameChanged> NameChangedCaller;
 };
 
 class BasicNamespace : public Namespace
@@ -2161,16 +2161,16 @@ CopiedString g_strLastMap;
 bool g_bLoadLastMap = false;
 
 void Map_Construct(){
-       GlobalCommands_insert( "RegionOff", FreeCaller<RegionOff>() );
-       GlobalCommands_insert( "RegionSetXY", FreeCaller<RegionXY>() );
-       GlobalCommands_insert( "RegionSetBrush", FreeCaller<RegionBrush>() );
-       GlobalCommands_insert( "RegionSetSelection", FreeCaller<RegionSelected>(), Accelerator( 'R', (GdkModifierType)( GDK_SHIFT_MASK | GDK_CONTROL_MASK ) ) );
+       GlobalCommands_insert( "RegionOff", FreeCaller<void(), RegionOff>() );
+       GlobalCommands_insert( "RegionSetXY", FreeCaller<void(), RegionXY>() );
+       GlobalCommands_insert( "RegionSetBrush", FreeCaller<void(), RegionBrush>() );
+       GlobalCommands_insert( "RegionSetSelection", FreeCaller<void(), RegionSelected>(), Accelerator( 'R', (GdkModifierType)( GDK_SHIFT_MASK | GDK_CONTROL_MASK ) ) );
 
        GlobalPreferenceSystem().registerPreference( "LastMap", CopiedStringImportStringCaller( g_strLastMap ), CopiedStringExportStringCaller( g_strLastMap ) );
        GlobalPreferenceSystem().registerPreference( "LoadLastMap", BoolImportStringCaller( g_bLoadLastMap ), BoolExportStringCaller( g_bLoadLastMap ) );
        GlobalPreferenceSystem().registerPreference( "MapInfoDlg", WindowPositionImportStringCaller( g_posMapInfoWnd ), WindowPositionExportStringCaller( g_posMapInfoWnd ) );
 
-       PreferencesDialog_addSettingsPreferences( FreeCaller1<PreferencesPage&, Map_constructPreferences>() );
+       PreferencesDialog_addSettingsPreferences( FreeCaller<void(PreferencesPage&), Map_constructPreferences>() );
 
        GlobalEntityClassManager().attach( g_MapEntityClasses );
        Radiant_attachHomePathsObserver( g_MapModuleObserver );
index a359d46159a676405df4523b4961573c41f1d10a..c68b02751e270df0790012a283216e01dd98ccca 100644 (file)
@@ -37,11 +37,11 @@ bool Map_Valid( const Map& map );
 
 class DeferredDraw
 {
-Callback m_draw;
+Callback<void()> m_draw;
 bool m_defer;
 bool m_deferred;
 public:
-DeferredDraw( const Callback& draw ) : m_draw( draw ), m_defer( false ), m_deferred( false ){
+DeferredDraw( const Callback<void()>& draw ) : m_draw( draw ), m_defer( false ), m_deferred( false ){
 }
 void defer(){
        m_defer = true;
@@ -73,7 +73,7 @@ inline void DeferredDraw_onMapValidChanged( DeferredDraw& self ){
                self.defer();
        }
 }
-typedef ReferenceCaller<DeferredDraw, DeferredDraw_onMapValidChanged> DeferredDrawOnMapValidChangedCaller;
+typedef ReferenceCaller<DeferredDraw, void(), DeferredDraw_onMapValidChanged> DeferredDrawOnMapValidChangedCaller;
 
 
 
index ab3220f001910101c82f447da1e19e90abdbcba8..aef04cbc033abc058386914643ecec571868f458 100644 (file)
@@ -185,7 +185,7 @@ void load(){
 }
 };
 
-typedef MemberCaller<LoadMRU, &LoadMRU::load> LoadMRUCaller;
+typedef MemberCaller<LoadMRU, void(), &LoadMRU::load> LoadMRUCaller;
 
 LoadMRU g_load_mru1( 1 );
 LoadMRU g_load_mru2( 2 );
index 6fd4100372c20ea39bbaf7b04c38878dce46a1d2..91385739239e7df3c7aa6d158c34a447c85ed5fc 100644 (file)
@@ -92,7 +92,7 @@ void MultiMon_Construct(){
 
        g_Multimon_enableSysMenuPopups.useLatched();
 
-       PreferencesDialog_addInterfacePreferences( FreeCaller1<PreferencesPage&, MultiMonitor_constructPreferences>() );
+       PreferencesDialog_addInterfacePreferences( FreeCaller<void(PreferencesPage&), MultiMonitor_constructPreferences>() );
 }
 void MultiMon_Destroy(){
 }
index 96c9b76e081c7cab192a73f7911d59bba19e8123..6e8742b0daf0c588b7d12aaa8c0c9387841fc389 100644 (file)
@@ -447,8 +447,8 @@ RenderableIndexBuffer m_render_lattice;
 bool m_bOverlay;
 
 bool m_transformChanged;
-Callback m_evaluateTransform;
-Callback m_boundsChanged;
+Callback<void()> m_evaluateTransform;
+Callback<void()> m_boundsChanged;
 
 void construct(){
        m_bOverlay = false;
@@ -465,14 +465,14 @@ void construct(){
 }
 
 public:
-Callback m_lightsChanged;
+Callback<void()> m_lightsChanged;
 
 static int m_CycleCapIndex;  // = 0;
 static EPatchType m_type;
 
 STRING_CONSTANT( Name, "Patch" );
 
-Patch( scene::Node& node, const Callback& evaluateTransform, const Callback& boundsChanged ) :
+Patch( scene::Node& node, const Callback<void()>& evaluateTransform, const Callback<void()>& boundsChanged ) :
        m_node( &node ),
        m_shader( texdef_name_default() ),
        m_state( 0 ),
@@ -488,7 +488,7 @@ Patch( scene::Node& node, const Callback& evaluateTransform, const Callback& bou
        m_boundsChanged( boundsChanged ){
        construct();
 }
-Patch( const Patch& other, scene::Node& node, const Callback& evaluateTransform, const Callback& boundsChanged ) :
+Patch( const Patch& other, scene::Node& node, const Callback<void()>& evaluateTransform, const Callback<void()>& boundsChanged ) :
        m_node( &node ),
        m_shader( texdef_name_default() ),
        m_state( 0 ),
@@ -674,7 +674,7 @@ void transformChanged(){
        m_lightsChanged();
        SceneChangeNotify();
 }
-typedef MemberCaller<Patch, &Patch::transformChanged> TransformChangedCaller;
+typedef MemberCaller<Patch, void(), &Patch::transformChanged> TransformChangedCaller;
 
 void evaluateTransform(){
        if ( m_transformChanged ) {
@@ -1338,7 +1338,7 @@ typedef LazyStatic<TypeCasts> StaticTypeCasts;
 void lightsChanged(){
        m_lightList->lightsChanged();
 }
-typedef MemberCaller<PatchInstance, &PatchInstance::lightsChanged> LightsChangedCaller;
+typedef MemberCaller<PatchInstance, void(), &PatchInstance::lightsChanged> LightsChangedCaller;
 
 STRING_CONSTANT( Name, "PatchInstance" );
 
@@ -1358,9 +1358,9 @@ PatchInstance( const scene::Path& path, scene::Instance* parent, Patch& patch )
        Instance::setTransformChangedCallback( LightsChangedCaller( *this ) );
 }
 ~PatchInstance(){
-       Instance::setTransformChangedCallback( Callback() );
+       Instance::setTransformChangedCallback( Callback<void()>() );
 
-       m_patch.m_lightsChanged = Callback();
+       m_patch.m_lightsChanged = Callback<void()>();
        GlobalShaderCache().detach( *this );
 
        m_patch.detach( this );
@@ -1373,13 +1373,13 @@ void selectedChanged( const Selectable& selectable ){
 
        Instance::selectedChanged();
 }
-typedef MemberCaller1<PatchInstance, const Selectable&, &PatchInstance::selectedChanged> SelectedChangedCaller;
+typedef MemberCaller<PatchInstance, void(const Selectable&), &PatchInstance::selectedChanged> SelectedChangedCaller;
 
 void selectedChangedComponent( const Selectable& selectable ){
        GlobalSelectionSystem().getObserver ( SelectionSystem::eComponent )( selectable );
        GlobalSelectionSystem().onComponentSelection( *this, selectable );
 }
-typedef MemberCaller1<PatchInstance, const Selectable&, &PatchInstance::selectedChangedComponent> SelectedChangedComponentCaller;
+typedef MemberCaller<PatchInstance, void(const Selectable&), &PatchInstance::selectedChangedComponent> SelectedChangedComponentCaller;
 
 Patch& getPatch(){
        return m_patch;
@@ -1612,7 +1612,7 @@ void applyTransform(){
        evaluateTransform();
        m_patch.freezeTransform();
 }
-typedef MemberCaller<PatchInstance, &PatchInstance::applyTransform> ApplyTransformCaller;
+typedef MemberCaller<PatchInstance, void(), &PatchInstance::applyTransform> ApplyTransformCaller;
 
 
 bool testLight( const RendererLight& light ) const {
index 0b85ea2d1f0a1c6ae46328dd1b0db91f1a18c9df..310d1331980206bd3a020b8fe9099e105d1ed8ca 100644 (file)
@@ -176,7 +176,7 @@ void update(){
 void cancel(){
        update();
 }
-typedef MemberCaller<Subdivisions, &Subdivisions::cancel> CancelCaller;
+typedef MemberCaller<Subdivisions, void(), &Subdivisions::cancel> CancelCaller;
 void apply(){
        Scene_PatchSetFixedSubdivisions(
                PatchFixedSubdivisions(
@@ -186,7 +186,7 @@ void apply(){
                        )
                );
 }
-typedef MemberCaller<Subdivisions, &Subdivisions::apply> ApplyCaller;
+typedef MemberCaller<Subdivisions, void(), &Subdivisions::apply> ApplyCaller;
 static void applyGtk( ui::ToggleButton toggle, Subdivisions* self ){
        self->apply();
 }
@@ -230,7 +230,7 @@ bool m_bListenChanged;
 PatchInspector() :
        m_horizontalSubdivisionsEntry( Subdivisions::ApplyCaller( m_subdivisions ), Subdivisions::CancelCaller( m_subdivisions ) ),
        m_verticalSubdivisionsEntry( Subdivisions::ApplyCaller( m_subdivisions ), Subdivisions::CancelCaller( m_subdivisions ) ),
-       m_idleDraw( MemberCaller<PatchInspector, &PatchInspector::GetPatchInfo>( *this ) ){
+       m_idleDraw( MemberCaller<PatchInspector, void(), &PatchInspector::GetPatchInfo>( *this ) ){
        m_fS = 0.0f;
        m_fT = 0.0f;
        m_fX = 0.0f;
@@ -1033,7 +1033,7 @@ void PatchInspector_SelectionChanged( const Selectable& selectable ){
 
 
 void PatchInspector_Construct(){
-       GlobalCommands_insert( "PatchInspector", FreeCaller<PatchInspector_toggleShown>(), Accelerator( 'S', (GdkModifierType)GDK_SHIFT_MASK ) );
+       GlobalCommands_insert( "PatchInspector", FreeCaller<void(), PatchInspector_toggleShown>(), Accelerator( 'S', (GdkModifierType)GDK_SHIFT_MASK ) );
 
        GlobalPreferenceSystem().registerPreference( "PatchWnd", WindowPositionTrackerImportStringCaller( g_PatchInspector.m_position_tracker ), WindowPositionTrackerExportStringCaller( g_PatchInspector.m_position_tracker ) );
        GlobalPreferenceSystem().registerPreference( "SI_PatchTexdef_Scale1", FloatImportStringCaller( g_pi_globals.scale[0] ), FloatExportStringCaller( g_pi_globals.scale[0] ) );
@@ -1042,9 +1042,9 @@ void PatchInspector_Construct(){
        GlobalPreferenceSystem().registerPreference( "SI_PatchTexdef_Shift2", FloatImportStringCaller( g_pi_globals.shift[1] ), FloatExportStringCaller( g_pi_globals.shift[1] ) );
        GlobalPreferenceSystem().registerPreference( "SI_PatchTexdef_Rotate", FloatImportStringCaller( g_pi_globals.rotate ), FloatExportStringCaller( g_pi_globals.rotate ) );
 
-       typedef FreeCaller1<const Selectable&, PatchInspector_SelectionChanged> PatchInspectorSelectionChangedCaller;
+       typedef FreeCaller<void(const Selectable&), PatchInspector_SelectionChanged> PatchInspectorSelectionChangedCaller;
        GlobalSelectionSystem().addSelectionChangeCallback( PatchInspectorSelectionChangedCaller() );
-       typedef FreeCaller<PatchInspector_queueDraw> PatchInspectorQueueDrawCaller;
+       typedef FreeCaller<void(), PatchInspector_queueDraw> PatchInspectorQueueDrawCaller;
        Patch_addTextureChangedCallback( PatchInspectorQueueDrawCaller() );
 }
 void PatchInspector_Destroy(){
index 4c1336b8fc313d05107b4bc2638d969d1cee2def..ceca948de79954d58c3141c1f2bdc64359a6c50d 100644 (file)
@@ -600,7 +600,7 @@ void Patch_constructPage( PreferenceGroup& group ){
        Patch_constructPreferences( page );
 }
 void Patch_registerPreferencesPage(){
-       PreferencesDialog_addDisplayPage( FreeCaller1<PreferenceGroup&, Patch_constructPage>() );
+       PreferencesDialog_addDisplayPage( FreeCaller<void(PreferenceGroup&), Patch_constructPage>() );
 }
 
 
@@ -614,41 +614,41 @@ void PatchPreferences_construct(){
 #include "generic/callback.h"
 
 void Patch_registerCommands(){
-       GlobalCommands_insert( "InvertCurveTextureX", FreeCaller<Patch_FlipTextureX>(), Accelerator( 'I', (GdkModifierType)( GDK_SHIFT_MASK | GDK_CONTROL_MASK ) ) );
-       GlobalCommands_insert( "InvertCurveTextureY", FreeCaller<Patch_FlipTextureY>(), Accelerator( 'I', (GdkModifierType)GDK_SHIFT_MASK ) );
-       GlobalCommands_insert( "NaturalizePatch", FreeCaller<Patch_NaturalTexture>(), Accelerator( 'N', (GdkModifierType)GDK_CONTROL_MASK ) );
-       GlobalCommands_insert( "PatchCylinder", FreeCaller<Patch_Cylinder>() );
-       GlobalCommands_insert( "PatchDenseCylinder", FreeCaller<Patch_DenseCylinder>() );
-       GlobalCommands_insert( "PatchVeryDenseCylinder", FreeCaller<Patch_VeryDenseCylinder>() );
-       GlobalCommands_insert( "PatchSquareCylinder", FreeCaller<Patch_SquareCylinder>() );
-       GlobalCommands_insert( "PatchXactCylinder", FreeCaller<Patch_XactCylinder>() );
-       GlobalCommands_insert( "PatchXactSphere", FreeCaller<Patch_XactSphere>() );
-       GlobalCommands_insert( "PatchXactCone", FreeCaller<Patch_XactCone>() );
-       GlobalCommands_insert( "PatchEndCap", FreeCaller<Patch_Endcap>() );
-       GlobalCommands_insert( "PatchBevel", FreeCaller<Patch_Bevel>() );
-       GlobalCommands_insert( "PatchSquareBevel", FreeCaller<Patch_SquareBevel>() );
-       GlobalCommands_insert( "PatchSquareEndcap", FreeCaller<Patch_SquareEndcap>() );
-       GlobalCommands_insert( "PatchCone", FreeCaller<Patch_Cone>() );
-       GlobalCommands_insert( "PatchSphere", FreeCaller<Patch_Sphere>() );
-       GlobalCommands_insert( "SimplePatchMesh", FreeCaller<Patch_Plane>(), Accelerator( 'P', (GdkModifierType)GDK_SHIFT_MASK ) );
-       GlobalCommands_insert( "PatchInsertInsertColumn", FreeCaller<Patch_InsertInsertColumn>(), Accelerator( GDK_KEY_KP_Add, (GdkModifierType)( GDK_SHIFT_MASK | GDK_CONTROL_MASK ) ) );
-       GlobalCommands_insert( "PatchInsertAddColumn", FreeCaller<Patch_InsertAddColumn>() );
-       GlobalCommands_insert( "PatchInsertInsertRow", FreeCaller<Patch_InsertInsertRow>(), Accelerator( GDK_KEY_KP_Add, (GdkModifierType)GDK_CONTROL_MASK ) );
-       GlobalCommands_insert( "PatchInsertAddRow", FreeCaller<Patch_InsertAddRow>() );
-       GlobalCommands_insert( "PatchDeleteFirstColumn", FreeCaller<Patch_DeleteFirstColumn>() );
-       GlobalCommands_insert( "PatchDeleteLastColumn", FreeCaller<Patch_DeleteLastColumn>(), Accelerator( GDK_KEY_KP_Subtract, (GdkModifierType)( GDK_SHIFT_MASK | GDK_CONTROL_MASK ) ) );
-       GlobalCommands_insert( "PatchDeleteFirstRow", FreeCaller<Patch_DeleteFirstRow>(), Accelerator( GDK_KEY_KP_Subtract, (GdkModifierType)GDK_CONTROL_MASK ) );
-       GlobalCommands_insert( "PatchDeleteLastRow", FreeCaller<Patch_DeleteLastRow>() );
-       GlobalCommands_insert( "InvertCurve", FreeCaller<Patch_Invert>(), Accelerator( 'I', (GdkModifierType)GDK_CONTROL_MASK ) );
-       GlobalCommands_insert( "RedisperseRows", FreeCaller<Patch_RedisperseRows>(), Accelerator( 'E', (GdkModifierType)GDK_CONTROL_MASK ) );
-       GlobalCommands_insert( "RedisperseCols", FreeCaller<Patch_RedisperseCols>(), Accelerator( 'E', (GdkModifierType)( GDK_SHIFT_MASK | GDK_CONTROL_MASK ) ) );
-       GlobalCommands_insert( "SmoothRows", FreeCaller<Patch_SmoothRows>(), Accelerator( 'W', (GdkModifierType)GDK_CONTROL_MASK ) );
-       GlobalCommands_insert( "SmoothCols", FreeCaller<Patch_SmoothCols>(), Accelerator( 'W', (GdkModifierType)( GDK_SHIFT_MASK | GDK_CONTROL_MASK ) ) );
-       GlobalCommands_insert( "MatrixTranspose", FreeCaller<Patch_Transpose>(), Accelerator( 'M', (GdkModifierType)( GDK_SHIFT_MASK | GDK_CONTROL_MASK ) ) );
-       GlobalCommands_insert( "CapCurrentCurve", FreeCaller<Patch_Cap>(), Accelerator( 'C', (GdkModifierType)GDK_SHIFT_MASK ) );
-       GlobalCommands_insert( "CycleCapTexturePatch", FreeCaller<Patch_CycleProjection>(), Accelerator( 'N', (GdkModifierType)( GDK_SHIFT_MASK | GDK_CONTROL_MASK ) ) );
-       GlobalCommands_insert( "MakeOverlayPatch", FreeCaller<Patch_OverlayOn>(), Accelerator( 'Y' ) );
-       GlobalCommands_insert( "ClearPatchOverlays", FreeCaller<Patch_OverlayOff>(), Accelerator( 'L', (GdkModifierType)GDK_CONTROL_MASK ) );
+       GlobalCommands_insert( "InvertCurveTextureX", FreeCaller<void(), Patch_FlipTextureX>(), Accelerator( 'I', (GdkModifierType)( GDK_SHIFT_MASK | GDK_CONTROL_MASK ) ) );
+       GlobalCommands_insert( "InvertCurveTextureY", FreeCaller<void(), Patch_FlipTextureY>(), Accelerator( 'I', (GdkModifierType)GDK_SHIFT_MASK ) );
+       GlobalCommands_insert( "NaturalizePatch", FreeCaller<void(), Patch_NaturalTexture>(), Accelerator( 'N', (GdkModifierType)GDK_CONTROL_MASK ) );
+       GlobalCommands_insert( "PatchCylinder", FreeCaller<void(), Patch_Cylinder>() );
+       GlobalCommands_insert( "PatchDenseCylinder", FreeCaller<void(), Patch_DenseCylinder>() );
+       GlobalCommands_insert( "PatchVeryDenseCylinder", FreeCaller<void(), Patch_VeryDenseCylinder>() );
+       GlobalCommands_insert( "PatchSquareCylinder", FreeCaller<void(), Patch_SquareCylinder>() );
+       GlobalCommands_insert( "PatchXactCylinder", FreeCaller<void(), Patch_XactCylinder>() );
+       GlobalCommands_insert( "PatchXactSphere", FreeCaller<void(), Patch_XactSphere>() );
+       GlobalCommands_insert( "PatchXactCone", FreeCaller<void(), Patch_XactCone>() );
+       GlobalCommands_insert( "PatchEndCap", FreeCaller<void(), Patch_Endcap>() );
+       GlobalCommands_insert( "PatchBevel", FreeCaller<void(), Patch_Bevel>() );
+       GlobalCommands_insert( "PatchSquareBevel", FreeCaller<void(), Patch_SquareBevel>() );
+       GlobalCommands_insert( "PatchSquareEndcap", FreeCaller<void(), Patch_SquareEndcap>() );
+       GlobalCommands_insert( "PatchCone", FreeCaller<void(), Patch_Cone>() );
+       GlobalCommands_insert( "PatchSphere", FreeCaller<void(), Patch_Sphere>() );
+       GlobalCommands_insert( "SimplePatchMesh", FreeCaller<void(), Patch_Plane>(), Accelerator( 'P', (GdkModifierType)GDK_SHIFT_MASK ) );
+       GlobalCommands_insert( "PatchInsertInsertColumn", FreeCaller<void(), Patch_InsertInsertColumn>(), Accelerator( GDK_KEY_KP_Add, (GdkModifierType)( GDK_SHIFT_MASK | GDK_CONTROL_MASK ) ) );
+       GlobalCommands_insert( "PatchInsertAddColumn", FreeCaller<void(), Patch_InsertAddColumn>() );
+       GlobalCommands_insert( "PatchInsertInsertRow", FreeCaller<void(), Patch_InsertInsertRow>(), Accelerator( GDK_KEY_KP_Add, (GdkModifierType)GDK_CONTROL_MASK ) );
+       GlobalCommands_insert( "PatchInsertAddRow", FreeCaller<void(), Patch_InsertAddRow>() );
+       GlobalCommands_insert( "PatchDeleteFirstColumn", FreeCaller<void(), Patch_DeleteFirstColumn>() );
+       GlobalCommands_insert( "PatchDeleteLastColumn", FreeCaller<void(), Patch_DeleteLastColumn>(), Accelerator( GDK_KEY_KP_Subtract, (GdkModifierType)( GDK_SHIFT_MASK | GDK_CONTROL_MASK ) ) );
+       GlobalCommands_insert( "PatchDeleteFirstRow", FreeCaller<void(), Patch_DeleteFirstRow>(), Accelerator( GDK_KEY_KP_Subtract, (GdkModifierType)GDK_CONTROL_MASK ) );
+       GlobalCommands_insert( "PatchDeleteLastRow", FreeCaller<void(), Patch_DeleteLastRow>() );
+       GlobalCommands_insert( "InvertCurve", FreeCaller<void(), Patch_Invert>(), Accelerator( 'I', (GdkModifierType)GDK_CONTROL_MASK ) );
+       GlobalCommands_insert( "RedisperseRows", FreeCaller<void(), Patch_RedisperseRows>(), Accelerator( 'E', (GdkModifierType)GDK_CONTROL_MASK ) );
+       GlobalCommands_insert( "RedisperseCols", FreeCaller<void(), Patch_RedisperseCols>(), Accelerator( 'E', (GdkModifierType)( GDK_SHIFT_MASK | GDK_CONTROL_MASK ) ) );
+       GlobalCommands_insert( "SmoothRows", FreeCaller<void(), Patch_SmoothRows>(), Accelerator( 'W', (GdkModifierType)GDK_CONTROL_MASK ) );
+       GlobalCommands_insert( "SmoothCols", FreeCaller<void(), Patch_SmoothCols>(), Accelerator( 'W', (GdkModifierType)( GDK_SHIFT_MASK | GDK_CONTROL_MASK ) ) );
+       GlobalCommands_insert( "MatrixTranspose", FreeCaller<void(), Patch_Transpose>(), Accelerator( 'M', (GdkModifierType)( GDK_SHIFT_MASK | GDK_CONTROL_MASK ) ) );
+       GlobalCommands_insert( "CapCurrentCurve", FreeCaller<void(), Patch_Cap>(), Accelerator( 'C', (GdkModifierType)GDK_SHIFT_MASK ) );
+       GlobalCommands_insert( "CycleCapTexturePatch", FreeCaller<void(), Patch_CycleProjection>(), Accelerator( 'N', (GdkModifierType)( GDK_SHIFT_MASK | GDK_CONTROL_MASK ) ) );
+       GlobalCommands_insert( "MakeOverlayPatch", FreeCaller<void(), Patch_OverlayOn>(), Accelerator( 'Y' ) );
+       GlobalCommands_insert( "ClearPatchOverlays", FreeCaller<void(), Patch_OverlayOff>(), Accelerator( 'L', (GdkModifierType)GDK_CONTROL_MASK ) );
 }
 
 void Patch_constructToolbar( ui::Toolbar toolbar ){
index 8c1653603ae2782e585e469bb9f2a791d307ab92..1134d8a1302fa2ee3028e03d4f2692120b052b37 100644 (file)
@@ -166,7 +166,7 @@ ui::MenuItem create_plugins_menu(){
 
        //TODO: some modules/plugins do not yet support refresh
 #if 0
-       create_menu_item_with_mnemonic( menu, "Refresh", FreeCaller<Restart>() );
+       create_menu_item_with_mnemonic( menu, "Refresh", FreeCaller<void(), Restart>() );
 
        // NOTE: the seperator is used when doing a refresh of the list, everything past the seperator is removed
        g_plugins_menu_separator = menu_separator( menu );
index 342c5be0fc09ed999fb3b4437574499d1831734b..cc5ca5f5772127943df8d8591001a22d5f5f39aa 100644 (file)
@@ -330,9 +330,9 @@ void Pointfile_Construct(){
 
        GlobalShaderCache().attachRenderable( s_pointfile );
 
-       GlobalCommands_insert( "TogglePointfile", FreeCaller<Pointfile_Toggle>() );
-       GlobalCommands_insert( "NextLeakSpot", FreeCaller<Pointfile_Next>(), Accelerator( 'K', (GdkModifierType)( GDK_SHIFT_MASK | GDK_CONTROL_MASK ) ) );
-       GlobalCommands_insert( "PrevLeakSpot", FreeCaller<Pointfile_Prev>(), Accelerator( 'L', (GdkModifierType)( GDK_SHIFT_MASK | GDK_CONTROL_MASK ) ) );
+       GlobalCommands_insert( "TogglePointfile", FreeCaller<void(), Pointfile_Toggle>() );
+       GlobalCommands_insert( "NextLeakSpot", FreeCaller<void(), Pointfile_Next>(), Accelerator( 'K', (GdkModifierType)( GDK_SHIFT_MASK | GDK_CONTROL_MASK ) ) );
+       GlobalCommands_insert( "PrevLeakSpot", FreeCaller<void(), Pointfile_Prev>(), Accelerator( 'L', (GdkModifierType)( GDK_SHIFT_MASK | GDK_CONTROL_MASK ) ) );
 }
 
 void Pointfile_Destroy(){
index ce3f768685b40ff5d696fe5c5381434fc24a9a31..5d2dbc071cba0711a72d306a18b7b56441952b21 100644 (file)
@@ -91,7 +91,7 @@ void importPref( const char* name, const char* value ){
 inline void XMLPreference_importString( XMLImporter& importer, const char* value ){
        importer.write( value, string_length( value ) );
 }
-typedef ReferenceCaller1<XMLImporter, const char*, XMLPreference_importString> XMLPreferenceImportStringCaller;
+typedef ReferenceCaller<XMLImporter, void(const char*), XMLPreference_importString> XMLPreferenceImportStringCaller;
 
 class XMLPreferenceDictionaryExporter : public XMLExporter
 {
index 0fee7ef9377e3ef9c83dd36857429de7dcc20bb1..f3efd8db35267cc68ebf047af4cd2dcd6d4ad7a8 100644 (file)
@@ -81,7 +81,7 @@ void Mouse_constructPage( PreferenceGroup& group ){
        Mouse_constructPreferences( page );
 }
 void Mouse_registerPreferencesPage(){
-       PreferencesDialog_addInterfacePage( FreeCaller1<PreferenceGroup&, Mouse_constructPage>() );
+       PreferencesDialog_addInterfacePage( FreeCaller<void(PreferenceGroup&), Mouse_constructPage>() );
 }
 
 
@@ -221,7 +221,7 @@ void LogConsole_importString( const char* string ){
        g_Console_enableLogging = string_equal( string, "true" );
        Sys_LogFile( g_Console_enableLogging );
 }
-typedef FreeCaller1<const char*, LogConsole_importString> LogConsoleImportStringCaller;
+typedef FreeCaller<void(const char*), LogConsole_importString> LogConsoleImportStringCaller;
 
 
 void RegisterGlobalPreferences( PreferenceSystem& preferences ){
@@ -313,8 +313,8 @@ void CGameDialog::CreateGlobalFrame( PreferencesPage& page ){
        page.appendCombo(
                "Select the game",
                StringArrayRange( &( *games.begin() ), &( *games.end() ) ),
-               ReferenceCaller1<CGameDialog, int, CGameDialog_GameFileImport>( *this ),
-               ReferenceCaller1<CGameDialog, const IntImportCallback&, CGameDialog_GameFileExport>( *this )
+               ReferenceCaller<CGameDialog, void(int), CGameDialog_GameFileImport>( *this ),
+               ReferenceCaller<CGameDialog, void(const IntImportCallback&), CGameDialog_GameFileExport>( *this )
                );
        page.appendCheckBox( "Startup", "Show Global Preferences", m_bGamePrompt );
 }
@@ -668,7 +668,7 @@ PreferencesPage createPage( const char* treeName, const char* frameName ){
 };
 
 ui::Window PrefsDlg::BuildDialog(){
-       PreferencesDialog_addInterfacePreferences( FreeCaller1<PreferencesPage&, Interface_constructPreferences>() );
+       PreferencesDialog_addInterfacePreferences( FreeCaller<void(PreferencesPage&), Interface_constructPreferences>() );
        Mouse_registerPreferencesPage();
 
        ui::Window dialog = ui::Window(create_floating_window( "NetRadiant Preferences", m_parent ));
@@ -921,20 +921,20 @@ void PreferencesDialog_showDialog(){
 void GameName_importString( const char* value ){
        gamename_set( value );
 }
-typedef FreeCaller1<const char*, GameName_importString> GameNameImportStringCaller;
+typedef FreeCaller<void(const char*), GameName_importString> GameNameImportStringCaller;
 void GameName_exportString( const StringImportCallback& importer ){
        importer( gamename_get() );
 }
-typedef FreeCaller1<const StringImportCallback&, GameName_exportString> GameNameExportStringCaller;
+typedef FreeCaller<void(const StringImportCallback&), GameName_exportString> GameNameExportStringCaller;
 
 void GameMode_importString( const char* value ){
        gamemode_set( value );
 }
-typedef FreeCaller1<const char*, GameMode_importString> GameModeImportStringCaller;
+typedef FreeCaller<void(const char*), GameMode_importString> GameModeImportStringCaller;
 void GameMode_exportString( const StringImportCallback& importer ){
        importer( gamemode_get() );
 }
-typedef FreeCaller1<const StringImportCallback&, GameMode_exportString> GameModeExportStringCaller;
+typedef FreeCaller<void(const StringImportCallback&), GameMode_exportString> GameModeExportStringCaller;
 
 
 void RegisterPreferences( PreferenceSystem& preferences ){
index c959ad3ec65e4a008ca6ceb5be0e90bf04d3039c..0aae24c761058a73e18f2b47e4e919154d85e161 100644 (file)
@@ -105,7 +105,7 @@ ui::SpinButton appendSpinner( const char* name, double value, double lower, doub
 }
 };
 
-typedef Callback1<PreferencesPage&> PreferencesPageCallback;
+typedef Callback<void(PreferencesPage&)> PreferencesPageCallback;
 
 class PreferenceGroup
 {
@@ -113,7 +113,7 @@ public:
 virtual PreferencesPage createPage( const char* treeName, const char* frameName ) = 0;
 };
 
-typedef Callback1<PreferenceGroup&> PreferenceGroupCallback;
+typedef Callback<void(PreferenceGroup&)> PreferenceGroupCallback;
 
 void PreferencesDialog_addInterfacePreferences( const PreferencesPageCallback& callback );
 void PreferencesDialog_addInterfacePage( const PreferenceGroupCallback& callback );
@@ -146,10 +146,10 @@ void import( Value value ){
 };
 
 typedef LatchedValue<bool> LatchedBool;
-typedef MemberCaller1<LatchedBool, bool, &LatchedBool::import> LatchedBoolImportCaller;
+typedef MemberCaller<LatchedBool, void(bool), &LatchedBool::import> LatchedBoolImportCaller;
 
 typedef LatchedValue<int> LatchedInt;
-typedef MemberCaller1<LatchedInt, int, &LatchedInt::import> LatchedIntImportCaller;
+typedef MemberCaller<LatchedInt, void(int), &LatchedInt::import> LatchedIntImportCaller;
 
 /*!
    holds information for a given game
index 8cd9eb2001d93a7fab6490fe838848b493f32a57..91e0645bf393e339a1baaf19bcb28d0e6e628f69 100644 (file)
@@ -471,7 +471,7 @@ struct ModelResource : public Resource
        void connectMap(){
                MapFile* map = Node_getMapFile( m_model );
                if ( map != 0 ) {
-                       map->setChangedCallback( FreeCaller<MapChanged>() );
+                       map->setChangedCallback( FreeCaller<void(), MapChanged>() );
                }
        }
        std::time_t modified() const {
index 62674d4624c739ac5a8d53b53d91c835b317443c..c67cf0ea1cee2362e052af06d95a9316dfcf83df 100644 (file)
@@ -130,7 +130,7 @@ void render( const Renderable& renderable ) const {
                break;
        }
 }
-typedef ConstMemberCaller1<RenderHighlighted, const Renderable&, &RenderHighlighted::render> RenderCaller;
+typedef ConstMemberCaller<RenderHighlighted, void(const Renderable&), &RenderHighlighted::render> RenderCaller;
 
 bool pre( const scene::Path& path, scene::Instance& instance, VolumeIntersectionValue parentVisible ) const {
        m_renderer.PushState();
index b906f2cdad4bf27cb4675b4b5a70d55b85586de2..9dc8e2de0a2136076eea4e0789036b1e2b437d78 100644 (file)
@@ -979,7 +979,7 @@ void addRenderable( const OpenGLRenderable& renderable, const Matrix4& modelview
                if ( ( ( *i )->state().m_state & RENDER_BUMP ) != 0 ) {
                        if ( lights != 0 ) {
                                OpenGLStateBucketAdd add( *( *i ), renderable, modelview );
-                               lights->forEachLight( makeCallback1( add ) );
+                               lights->forEachLight(makeCallback( add ) );
                        }
                }
                else
@@ -1071,13 +1071,13 @@ class LinearLightList : public LightList
 {
 LightCullable& m_cullable;
 RendererLights& m_allLights;
-Callback m_evaluateChanged;
+Callback<void()> m_evaluateChanged;
 
 typedef std::list<RendererLight*> Lights;
 mutable Lights m_lights;
 mutable bool m_lightsChanged;
 public:
-LinearLightList( LightCullable& cullable, RendererLights& lights, const Callback& evaluateChanged ) :
+LinearLightList( LightCullable& cullable, RendererLights& lights, const Callback<void()>& evaluateChanged ) :
        m_cullable( cullable ), m_allLights( lights ), m_evaluateChanged( evaluateChanged ){
        m_lightsChanged = true;
 }
@@ -1463,7 +1463,7 @@ void evaluateChanged(){
                }
        }
 }
-typedef MemberCaller<OpenGLShaderCache, &OpenGLShaderCache::evaluateChanged> EvaluateChangedCaller;
+typedef MemberCaller<OpenGLShaderCache, void(), &OpenGLShaderCache::evaluateChanged> EvaluateChangedCaller;
 
 typedef std::set<const Renderable*> Renderables;
 Renderables m_renderables;
index d9850e44002d89c1d0a80d42d0e8f729f4780f75..7a40bb35eeab2035df480d91d5de2f9454ae423b 100644 (file)
@@ -357,7 +357,7 @@ void Selection_UpdateWorkzone(){
                Select_GetBounds( g_select_workzone.d_work_min, g_select_workzone.d_work_max );
        }
 }
-typedef FreeCaller<Selection_UpdateWorkzone> SelectionUpdateWorkzoneCaller;
+typedef FreeCaller<void(), Selection_UpdateWorkzone> SelectionUpdateWorkzoneCaller;
 
 IdleDraw g_idleWorkzone = IdleDraw( SelectionUpdateWorkzoneCaller() );
 }
@@ -818,11 +818,11 @@ void SceneSelectionChange( const Selectable& selectable ){
 SignalHandlerId Selection_boundsChanged;
 
 void Selection_construct(){
-       typedef FreeCaller1<const Selectable&, SceneSelectionChange> SceneSelectionChangeCaller;
+       typedef FreeCaller<void(const Selectable&), SceneSelectionChange> SceneSelectionChangeCaller;
        GlobalSelectionSystem().addSelectionChangeCallback( SceneSelectionChangeCaller() );
-       typedef FreeCaller1<const Selectable&, UpdateWorkzone_ForSelectionChanged> UpdateWorkzoneForSelectionChangedCaller;
+       typedef FreeCaller<void(const Selectable&), UpdateWorkzone_ForSelectionChanged> UpdateWorkzoneForSelectionChangedCaller;
        GlobalSelectionSystem().addSelectionChangeCallback( UpdateWorkzoneForSelectionChangedCaller() );
-       typedef FreeCaller<UpdateWorkzone_ForSelection> UpdateWorkzoneForSelectionCaller;
+       typedef FreeCaller<void(), UpdateWorkzone_ForSelection> UpdateWorkzoneForSelectionCaller;
        Selection_boundsChanged = GlobalSceneGraph().addBoundsChangedCallback( UpdateWorkzoneForSelectionCaller() );
 }
 
index 830937e7001460eff385937bb5fa44d8c547e859..df18daa9c5ef23a908cc40e83b84b62eb09617c9 100644 (file)
@@ -1723,7 +1723,7 @@ void insert( const Plane3& plane ){
 bool contains( const Plane3& plane ) const {
        return PlaneSet_contains( m_selectedPlanes, plane );
 }
-typedef MemberCaller1<SelectedPlaneSet, const Plane3&, &SelectedPlaneSet::insert> InsertCaller;
+typedef MemberCaller<SelectedPlaneSet, void(const Plane3&), &SelectedPlaneSet::insert> InsertCaller;
 };
 
 
@@ -2601,11 +2601,11 @@ void pivotChanged() const {
        m_pivotChanged = true;
        SceneChangeNotify();
 }
-typedef ConstMemberCaller<RadiantSelectionSystem, &RadiantSelectionSystem::pivotChanged> PivotChangedCaller;
+typedef ConstMemberCaller<RadiantSelectionSystem, void(), &RadiantSelectionSystem::pivotChanged> PivotChangedCaller;
 void pivotChangedSelection( const Selectable& selectable ){
        pivotChanged();
 }
-typedef MemberCaller1<RadiantSelectionSystem, const Selectable&, &RadiantSelectionSystem::pivotChangedSelection> PivotChangedSelectionCaller;
+typedef MemberCaller<RadiantSelectionSystem, void(const Selectable&), &RadiantSelectionSystem::pivotChangedSelection> PivotChangedSelectionCaller;
 
 void SetMode( EMode mode ){
        if ( m_mode != mode ) {
@@ -2640,11 +2640,11 @@ EManipulatorMode ManipulatorMode() const {
 
 SelectionChangeCallback getObserver( EMode mode ){
        if ( mode == ePrimitive ) {
-               return makeCallback1( m_count_primitive );
+               return makeCallback( m_count_primitive );
        }
        else
        {
-               return makeCallback1( m_count_component );
+               return makeCallback( m_count_component );
        }
 }
 std::size_t countSelected() const {
@@ -2717,7 +2717,7 @@ void addSelectionChangeCallback( const SelectionChangeHandler& handler ){
 void selectionChanged( const Selectable& selectable ){
        m_selectionChanged_callbacks( selectable );
 }
-typedef MemberCaller1<RadiantSelectionSystem, const Selectable&, &RadiantSelectionSystem::selectionChanged> SelectionChangedCaller;
+typedef MemberCaller<RadiantSelectionSystem, void(const Selectable&), &RadiantSelectionSystem::selectionChanged> SelectionChangedCaller;
 
 
 void startMove(){
@@ -3398,7 +3398,7 @@ void SelectionSystem_Construct(){
 
        g_RadiantSelectionSystem = new RadiantSelectionSystem;
 
-       SelectionSystem_boundsChanged = GlobalSceneGraph().addBoundsChangedCallback( FreeCaller<SelectionSystem_OnBoundsChanged>() );
+       SelectionSystem_boundsChanged = GlobalSceneGraph().addBoundsChangedCallback( FreeCaller<void(), SelectionSystem_OnBoundsChanged>() );
 
        GlobalShaderCache().attachRenderable( getSelectionSystem() );
 }
@@ -3442,7 +3442,7 @@ inline WindowVector window_constrained( WindowVector window, std::size_t x, std:
        return WindowVector( window_constrained( window.x(), x, width ), window_constrained( window.y(), y, height ) );
 }
 
-typedef Callback1<DeviceVector> MouseEventCallback;
+typedef Callback<void(DeviceVector)> MouseEventCallback;
 
 Single<MouseEventCallback> g_mouseMovedCallback;
 Single<MouseEventCallback> g_mouseUpCallback;
@@ -3561,7 +3561,7 @@ void mouseMoved( DeviceVector position ){
        m_current = device_constrained( position );
        draw_area();
 }
-typedef MemberCaller1<Selector_, DeviceVector, &Selector_::mouseMoved> MouseMovedCaller;
+typedef MemberCaller<Selector_, void(DeviceVector), &Selector_::mouseMoved> MouseMovedCaller;
 
 void mouseUp( DeviceVector position ){
        testSelect( device_constrained( position ) );
@@ -3569,7 +3569,7 @@ void mouseUp( DeviceVector position ){
        g_mouseMovedCallback.clear();
        g_mouseUpCallback.clear();
 }
-typedef MemberCaller1<Selector_, DeviceVector, &Selector_::mouseUp> MouseUpCaller;
+typedef MemberCaller<Selector_, void(DeviceVector), &Selector_::mouseUp> MouseUpCaller;
 };
 
 
@@ -3586,14 +3586,14 @@ bool mouseDown( DeviceVector position ){
 void mouseMoved( DeviceVector position ){
        getSelectionSystem().MoveSelected( *m_view, &position[0] );
 }
-typedef MemberCaller1<Manipulator_, DeviceVector, &Manipulator_::mouseMoved> MouseMovedCaller;
+typedef MemberCaller<Manipulator_, void(DeviceVector), &Manipulator_::mouseMoved> MouseMovedCaller;
 
 void mouseUp( DeviceVector position ){
        getSelectionSystem().endMove();
        g_mouseMovedCallback.clear();
        g_mouseUpCallback.clear();
 }
-typedef MemberCaller1<Manipulator_, DeviceVector, &Manipulator_::mouseUp> MouseUpCaller;
+typedef MemberCaller<Manipulator_, void(DeviceVector), &Manipulator_::mouseUp> MouseUpCaller;
 };
 
 void Scene_copyClosestTexture( SelectionTest& test );
index b8f4fcfbf4c6c8420e9986292eab6f0375d5fc70..99846fed6a61bda0686667f3cfc2f5f8bbd75445 100644 (file)
@@ -31,7 +31,7 @@ struct rect_t
        float max[2];
 };
 
-typedef Callback1<rect_t> RectangleCallback;
+typedef Callback<void(rect_t)> RectangleCallback;
 
 class View;
 
index 498182d60aa1fd45f0b177bc544466bad635ff9b..5bfb45f4b7a0397ce3e57bc40e68081f2e220e1c 100644 (file)
@@ -127,12 +127,12 @@ Increment( float& f ) : m_f( f ), m_spin( 0 ), m_entry( ui::null ){
 void cancel(){
        entry_set_float( m_entry, m_f );
 }
-typedef MemberCaller<Increment, &Increment::cancel> CancelCaller;
+typedef MemberCaller<Increment, void(), &Increment::cancel> CancelCaller;
 void apply(){
        m_f = static_cast<float>( entry_get_float( m_entry ) );
        spin_button_set_step( m_spin, m_f );
 }
-typedef MemberCaller<Increment, &Increment::apply> ApplyCaller;
+typedef MemberCaller<Increment, void(), &Increment::apply> ApplyCaller;
 };
 
 void SurfaceInspector_GridChange();
@@ -205,7 +205,7 @@ SurfaceInspector() :
 void constructWindow( ui::Window main_window ){
        m_parent = main_window;
        Create();
-       AddGridChangeCallback( FreeCaller<SurfaceInspector_GridChange>() );
+       AddGridChangeCallback( FreeCaller<void(), SurfaceInspector_GridChange>() );
 }
 void destroyWindow(){
        Destroy();
@@ -220,13 +220,13 @@ void queueDraw(){
 }
 
 void Update();
-typedef MemberCaller<SurfaceInspector, &SurfaceInspector::Update> UpdateCaller;
+typedef MemberCaller<SurfaceInspector, void(), &SurfaceInspector::Update> UpdateCaller;
 void ApplyShader();
-typedef MemberCaller<SurfaceInspector, &SurfaceInspector::ApplyShader> ApplyShaderCaller;
+typedef MemberCaller<SurfaceInspector, void(), &SurfaceInspector::ApplyShader> ApplyShaderCaller;
 void ApplyTexdef();
-typedef MemberCaller<SurfaceInspector, &SurfaceInspector::ApplyTexdef> ApplyTexdefCaller;
+typedef MemberCaller<SurfaceInspector, void(), &SurfaceInspector::ApplyTexdef> ApplyTexdefCaller;
 void ApplyFlags();
-typedef MemberCaller<SurfaceInspector, &SurfaceInspector::ApplyFlags> ApplyFlagsCaller;
+typedef MemberCaller<SurfaceInspector, void(), &SurfaceInspector::ApplyFlags> ApplyFlagsCaller;
 };
 
 namespace
@@ -577,7 +577,7 @@ const char* getContentFlagName( std::size_t bit ){
 // =============================================================================
 // SurfaceInspector class
 
-guint togglebutton_connect_toggled( ui::ToggleButton button, const Callback& callback ){
+guint togglebutton_connect_toggled( ui::ToggleButton button, const Callback<void()>& callback ){
        return g_signal_connect_swapped( G_OBJECT( button ), "toggled", G_CALLBACK( callback.getThunk() ), callback.getEnvironment() );
 }
 
@@ -1183,14 +1183,14 @@ void Face_getTexture( Face& face, CopiedString& shader, TextureProjection& proje
        face.GetTexdef( projection );
        flags = face.getShader().m_flags;
 }
-typedef Function4<Face&, CopiedString&, TextureProjection&, ContentsFlagsValue&, void, Face_getTexture> FaceGetTexture;
+typedef Function<void(Face&, CopiedString&, TextureProjection&, ContentsFlagsValue&), Face_getTexture> FaceGetTexture;
 
 void Face_setTexture( Face& face, const char* shader, const TextureProjection& projection, const ContentsFlagsValue& flags ){
        face.SetShader( shader );
        face.SetTexdef( projection );
        face.SetFlags( flags );
 }
-typedef Function4<Face&, const char*, const TextureProjection&, const ContentsFlagsValue&, void, Face_setTexture> FaceSetTexture;
+typedef Function<void(Face&, const char*, const TextureProjection&, const ContentsFlagsValue&), Face_setTexture> FaceSetTexture;
 
 
 void Patch_getTexture( Patch& patch, CopiedString& shader, TextureProjection& projection, ContentsFlagsValue& flags ){
@@ -1198,16 +1198,16 @@ void Patch_getTexture( Patch& patch, CopiedString& shader, TextureProjection& pr
        projection = TextureProjection( texdef_t(), brushprimit_texdef_t(), Vector3( 0, 0, 0 ), Vector3( 0, 0, 0 ) );
        flags = ContentsFlagsValue( 0, 0, 0, false );
 }
-typedef Function4<Patch&, CopiedString&, TextureProjection&, ContentsFlagsValue&, void, Patch_getTexture> PatchGetTexture;
+typedef Function<void(Patch&, CopiedString&, TextureProjection&, ContentsFlagsValue&), Patch_getTexture> PatchGetTexture;
 
 void Patch_setTexture( Patch& patch, const char* shader, const TextureProjection& projection, const ContentsFlagsValue& flags ){
        patch.SetShader( shader );
 }
-typedef Function4<Patch&, const char*, const TextureProjection&, const ContentsFlagsValue&, void, Patch_setTexture> PatchSetTexture;
+typedef Function<void(Patch&, const char*, const TextureProjection&, const ContentsFlagsValue&), Patch_setTexture> PatchSetTexture;
 
 
-typedef Callback3<CopiedString&, TextureProjection&, ContentsFlagsValue&> GetTextureCallback;
-typedef Callback3<const char*, const TextureProjection&, const ContentsFlagsValue&> SetTextureCallback;
+typedef Callback<void(CopiedString&, TextureProjection&, ContentsFlagsValue&)> GetTextureCallback;
+typedef Callback<void(const char*, const TextureProjection&, const ContentsFlagsValue&)> SetTextureCallback;
 
 struct Texturable
 {
@@ -1222,8 +1222,8 @@ void Face_getClosest( Face& face, SelectionTest& test, SelectionIntersection& be
        if ( intersection.valid()
                 && SelectionIntersection_closer( intersection, bestIntersection ) ) {
                bestIntersection = intersection;
-               texturable.setTexture = makeCallback3( FaceSetTexture(), face );
-               texturable.getTexture = makeCallback3( FaceGetTexture(), face );
+               texturable.setTexture = makeCallback( FaceSetTexture(), face );
+               texturable.getTexture = makeCallback( FaceGetTexture(), face );
        }
 }
 
@@ -1277,8 +1277,8 @@ bool pre( const scene::Path& path, scene::Instance& instance ) const {
                                if ( occluded ) {
                                        Patch* patch = Node_getPatch( path.top() );
                                        if ( patch != 0 ) {
-                                               m_texturable.setTexture = makeCallback3( PatchSetTexture(), *patch );
-                                               m_texturable.getTexture = makeCallback3( PatchGetTexture(), *patch );
+                                               m_texturable.setTexture = makeCallback( PatchSetTexture(), *patch );
+                                               m_texturable.getTexture = makeCallback( PatchGetTexture(), *patch );
                                        }
                                        else
                                        {
@@ -1393,15 +1393,15 @@ void SurfaceInspector_constructPage( PreferenceGroup& group ){
        SurfaceInspector_constructPreferences( page );
 }
 void SurfaceInspector_registerPreferencesPage(){
-       PreferencesDialog_addSettingsPage( FreeCaller1<PreferenceGroup&, SurfaceInspector_constructPage>() );
+       PreferencesDialog_addSettingsPage( FreeCaller<void(PreferenceGroup&), SurfaceInspector_constructPage>() );
 }
 
 void SurfaceInspector_registerCommands(){
-       GlobalCommands_insert( "FitTexture", FreeCaller<SurfaceInspector_FitTexture>(), Accelerator( 'B', (GdkModifierType)GDK_SHIFT_MASK ) );
-       GlobalCommands_insert( "SurfaceInspector", FreeCaller<SurfaceInspector_toggleShown>(), Accelerator( 'S' ) );
+       GlobalCommands_insert( "FitTexture", FreeCaller<void(), SurfaceInspector_FitTexture>(), Accelerator( 'B', (GdkModifierType)GDK_SHIFT_MASK ) );
+       GlobalCommands_insert( "SurfaceInspector", FreeCaller<void(), SurfaceInspector_toggleShown>(), Accelerator( 'S' ) );
 
-       GlobalCommands_insert( "FaceCopyTexture", FreeCaller<SelectedFaces_copyTexture>() );
-       GlobalCommands_insert( "FacePasteTexture", FreeCaller<SelectedFaces_pasteTexture>() );
+       GlobalCommands_insert( "FaceCopyTexture", FreeCaller<void(), SelectedFaces_copyTexture>() );
+       GlobalCommands_insert( "FacePasteTexture", FreeCaller<void(), SelectedFaces_pasteTexture>() );
 }
 
 
@@ -1423,9 +1423,9 @@ void SurfaceInspector_Construct(){
        GlobalPreferenceSystem().registerPreference( "SI_SurfaceTexdef_Rotate", FloatImportStringCaller( g_si_globals.rotate ), FloatExportStringCaller( g_si_globals.rotate ) );
        GlobalPreferenceSystem().registerPreference( "SnapTToGrid", BoolImportStringCaller( g_si_globals.m_bSnapTToGrid ), BoolExportStringCaller( g_si_globals.m_bSnapTToGrid ) );
 
-       typedef FreeCaller1<const Selectable&, SurfaceInspector_SelectionChanged> SurfaceInspectorSelectionChangedCaller;
+       typedef FreeCaller<void(const Selectable&), SurfaceInspector_SelectionChanged> SurfaceInspectorSelectionChangedCaller;
        GlobalSelectionSystem().addSelectionChangeCallback( SurfaceInspectorSelectionChangedCaller() );
-       typedef FreeCaller<SurfaceInspector_updateSelection> SurfaceInspectorUpdateSelectionCaller;
+       typedef FreeCaller<void(), SurfaceInspector_updateSelection> SurfaceInspectorUpdateSelectionCaller;
        Brush_addTextureChangedCallback( SurfaceInspectorUpdateSelectionCaller() );
        Patch_addTextureChangedCallback( SurfaceInspectorUpdateSelectionCaller() );
 
index d36aff6b36dc97be59cabd784c89bceb1ebb2867..a09ae15453a477b0b00e86d75c17191577647855 100644 (file)
@@ -43,7 +43,7 @@ public:
 
     void append(const char *string);
 
-    using AppendCaller = MemberCaller1<EntryCompletion, const char *, &EntryCompletion::append>;
+    using AppendCaller = MemberCaller<EntryCompletion, void(const char *), &EntryCompletion::append>;
 
     void fill();
 
@@ -51,7 +51,7 @@ public:
 
     void update();
 
-    using UpdateCaller = MemberCaller<EntryCompletion, &EntryCompletion::update>;
+    using UpdateCaller = MemberCaller<EntryCompletion, void(), &EntryCompletion::update>;
 };
 
 class TextureNameList {
index 93ce42a8cdbec549f21f9b64926896c5f357d650..55f00b7e07b413a1d289ce1e46b367368512aac4 100644 (file)
@@ -549,9 +549,9 @@ void Textures_Unrealise(){
 }
 
 
-Callback g_texturesModeChangedNotify;
+Callback<void()> g_texturesModeChangedNotify;
 
-void Textures_setModeChangedNotify( const Callback& notify ){
+void Textures_setModeChangedNotify( const Callback<void()>& notify ){
        g_texturesModeChangedNotify = notify;
 }
 
@@ -647,7 +647,7 @@ void TextureCompressionImport( TextureCompressionFormat& self, int value ){
        }
        Textures_UpdateTextureCompressionFormat();
 }
-typedef ReferenceCaller1<TextureCompressionFormat, int, TextureCompressionImport> TextureCompressionImportCaller;
+typedef ReferenceCaller<TextureCompressionFormat, void(int), TextureCompressionImport> TextureCompressionImportCaller;
 
 void TextureGammaImport( float& self, float value ){
        if ( self != value ) {
@@ -656,7 +656,7 @@ void TextureGammaImport( float& self, float value ){
                Textures_Realise();
        }
 }
-typedef ReferenceCaller1<float, float, TextureGammaImport> TextureGammaImportCaller;
+typedef ReferenceCaller<float, void(float), TextureGammaImport> TextureGammaImportCaller;
 
 void TextureModeImport( ETexturesMode& self, int value ){
        switch ( value )
@@ -683,7 +683,7 @@ void TextureModeImport( ETexturesMode& self, int value ){
                Textures_SetMode( eTextures_MAX_ANISOTROPY );
        }
 }
-typedef ReferenceCaller1<ETexturesMode, int, TextureModeImport> TextureModeImportCaller;
+typedef ReferenceCaller<ETexturesMode, void(int), TextureModeImport> TextureModeImportCaller;
 
 void TextureModeExport( ETexturesMode& self, const IntImportCallback& importer ){
        switch ( self )
@@ -713,7 +713,7 @@ void TextureModeExport( ETexturesMode& self, const IntImportCallback& importer )
                importer( 4 );
        }
 }
-typedef ReferenceCaller1<ETexturesMode, const IntImportCallback&, TextureModeExport> TextureModeExportCaller;
+typedef ReferenceCaller<ETexturesMode, void(const IntImportCallback&), TextureModeExport> TextureModeExportCaller;
 
 void Textures_constructPreferences( PreferencesPage& page ){
        {
@@ -769,14 +769,14 @@ void Textures_constructPage( PreferenceGroup& group ){
        Textures_constructPreferences( page );
 }
 void Textures_registerPreferencesPage(){
-       PreferencesDialog_addDisplayPage( FreeCaller1<PreferenceGroup&, Textures_constructPage>() );
+       PreferencesDialog_addDisplayPage( FreeCaller<void(PreferenceGroup&), Textures_constructPage>() );
 }
 
 void TextureCompression_importString( const char* string ){
        g_texture_globals.m_nTextureCompressionFormat = static_cast<TextureCompressionFormat>( atoi( string ) );
        Textures_UpdateTextureCompressionFormat();
 }
-typedef FreeCaller1<const char*, TextureCompression_importString> TextureCompressionImportStringCaller;
+typedef FreeCaller<void(const char*), TextureCompression_importString> TextureCompressionImportStringCaller;
 
 
 void Textures_Construct(){
index cdd1a9b1e8f114ff11fd885ac4c3228495de40c9..3176ce6db44a3f5779752cf479ec6de55c14d7b5 100644 (file)
@@ -28,6 +28,6 @@ void Textures_Realise();
 void Textures_Unrealise();
 void Textures_sharedContextDestroyed();
 
-void Textures_setModeChangedNotify( const Callback& notify );
+void Textures_setModeChangedNotify( const Callback<void()>& notify );
 
 #endif
index 639dd498ee87c7a7ba6702ada1d4400d342cfa0e..09c7fc73d5a8f2520057fc27987ce4df60ffd022 100644 (file)
@@ -111,7 +111,7 @@ void TextureGroups_addWad( TextureGroups& groups, const char* archive ){
 #endif
        }
 }
-typedef ReferenceCaller1<TextureGroups, const char*, TextureGroups_addWad> TextureGroupsAddWadCaller;
+typedef ReferenceCaller<TextureGroups, void(const char*), TextureGroups_addWad> TextureGroupsAddWadCaller;
 
 namespace
 {
@@ -167,12 +167,12 @@ void TextureGroups_addShader( TextureGroups& groups, const char* shaderName ){
                }
        }
 }
-typedef ReferenceCaller1<TextureGroups, const char*, TextureGroups_addShader> TextureGroupsAddShaderCaller;
+typedef ReferenceCaller<TextureGroups, void(const char*), TextureGroups_addShader> TextureGroupsAddShaderCaller;
 
 void TextureGroups_addDirectory( TextureGroups& groups, const char* directory ){
        groups.insert( directory );
 }
-typedef ReferenceCaller1<TextureGroups, const char*, TextureGroups_addDirectory> TextureGroupsAddDirectoryCaller;
+typedef ReferenceCaller<TextureGroups, void(const char*), TextureGroups_addDirectory> TextureGroupsAddDirectoryCaller;
 
 class DeferredAdjustment
 {
@@ -215,7 +215,7 @@ static void adjustment_value_changed( GtkAdjustment *adjustment, DeferredAdjustm
 
 class TextureBrowser;
 
-typedef ReferenceCaller<TextureBrowser, TextureBrowser_queueDraw> TextureBrowserQueueDrawCaller;
+typedef ReferenceCaller<TextureBrowser, void(), TextureBrowser_queueDraw> TextureBrowserQueueDrawCaller;
 
 void TextureBrowser_scrollChanged( void* data, gdouble value );
 
@@ -227,25 +227,25 @@ enum StartupShaders
 };
 
 void TextureBrowser_hideUnusedExport( const BoolImportCallback& importer );
-typedef FreeCaller1<const BoolImportCallback&, TextureBrowser_hideUnusedExport> TextureBrowserHideUnusedExport;
+typedef FreeCaller<void(const BoolImportCallback&), TextureBrowser_hideUnusedExport> TextureBrowserHideUnusedExport;
 
 void TextureBrowser_showShadersExport( const BoolImportCallback& importer );
-typedef FreeCaller1<const BoolImportCallback&, TextureBrowser_showShadersExport> TextureBrowserShowShadersExport;
+typedef FreeCaller<void(const BoolImportCallback&), TextureBrowser_showShadersExport> TextureBrowserShowShadersExport;
 
 void TextureBrowser_showShaderlistOnly( const BoolImportCallback& importer );
-typedef FreeCaller1<const BoolImportCallback&, TextureBrowser_showShaderlistOnly> TextureBrowserShowShaderlistOnlyExport;
+typedef FreeCaller<void(const BoolImportCallback&), TextureBrowser_showShaderlistOnly> TextureBrowserShowShaderlistOnlyExport;
 
 void TextureBrowser_fixedSize( const BoolImportCallback& importer );
-typedef FreeCaller1<const BoolImportCallback&, TextureBrowser_fixedSize> TextureBrowserFixedSizeExport;
+typedef FreeCaller<void(const BoolImportCallback&), TextureBrowser_fixedSize> TextureBrowserFixedSizeExport;
 
 void TextureBrowser_filterMissing( const BoolImportCallback& importer );
-typedef FreeCaller1<const BoolImportCallback&, TextureBrowser_filterMissing> TextureBrowserFilterMissingExport;
+typedef FreeCaller<void(const BoolImportCallback&), TextureBrowser_filterMissing> TextureBrowserFilterMissingExport;
 
 void TextureBrowser_filterFallback( const BoolImportCallback& importer );
-typedef FreeCaller1<const BoolImportCallback&, TextureBrowser_filterFallback> TextureBrowserFilterFallbackExport;
+typedef FreeCaller<void(const BoolImportCallback&), TextureBrowser_filterFallback> TextureBrowserFilterFallbackExport;
 
 void TextureBrowser_enableAlpha( const BoolImportCallback& importer );
-typedef FreeCaller1<const BoolImportCallback&, TextureBrowser_enableAlpha> TextureBrowserEnableAlphaExport;
+typedef FreeCaller<void(const BoolImportCallback&), TextureBrowser_enableAlpha> TextureBrowserEnableAlphaExport;
 
 class TextureBrowser
 {
@@ -678,7 +678,7 @@ void TextureBrowser_importShowScrollbar( TextureBrowser& textureBrowser, bool va
                TextureBrowser_updateScroll( textureBrowser );
        }
 }
-typedef ReferenceCaller1<TextureBrowser, bool, TextureBrowser_importShowScrollbar> TextureBrowserImportShowScrollbarCaller;
+typedef ReferenceCaller<TextureBrowser, void(bool), TextureBrowser_importShowScrollbar> TextureBrowserImportShowScrollbarCaller;
 
 
 /*
@@ -791,7 +791,7 @@ void TextureDirectory_loadTexture( const char* directory, const char* texture ){
        IShader* shader = QERApp_Shader_ForName( name.c_str() );
        shader->DecRef();
 }
-typedef ConstPointerCaller1<char, const char*, TextureDirectory_loadTexture> TextureDirectoryLoadTextureCaller;
+typedef ConstPointerCaller<char, void(const char*), TextureDirectory_loadTexture> TextureDirectoryLoadTextureCaller;
 
 class LoadTexturesByTypeVisitor : public ImageModules::Visitor
 {
@@ -818,7 +818,7 @@ void TextureBrowser_ShowDirectory( TextureBrowser& textureBrowser, const char* d
                TextureBrowser_heightChanged( textureBrowser );
 
                std::size_t shaders_count;
-               GlobalShaderSystem().foreachShaderName( makeCallback1( TextureCategoryLoadShader( directory, shaders_count ) ) );
+               GlobalShaderSystem().foreachShaderName(makeCallback( TextureCategoryLoadShader( directory, shaders_count ) ) );
                globalOutputStream() << "Showing " << Unsigned( shaders_count ) << " shaders.\n";
 
                if ( g_pGameDescription->mGameType != "doom3" ) {
@@ -842,7 +842,7 @@ void TextureBrowser_ShowTagSearchResult( TextureBrowser& textureBrowser, const c
        TextureBrowser_heightChanged( textureBrowser );
 
        std::size_t shaders_count;
-       GlobalShaderSystem().foreachShaderName( makeCallback1( TextureCategoryLoadShader( directory, shaders_count ) ) );
+       GlobalShaderSystem().foreachShaderName(makeCallback( TextureCategoryLoadShader( directory, shaders_count ) ) );
        globalOutputStream() << "Showing " << Unsigned( shaders_count ) << " shaders.\n";
 
        if ( g_pGameDescription->mGameType != "doom3" ) {
@@ -866,37 +866,37 @@ bool TextureBrowser_hideUnused();
 void TextureBrowser_hideUnusedExport( const BoolImportCallback& importer ){
        importer( TextureBrowser_hideUnused() );
 }
-typedef FreeCaller1<const BoolImportCallback&, TextureBrowser_hideUnusedExport> TextureBrowserHideUnusedExport;
+typedef FreeCaller<void(const BoolImportCallback&), TextureBrowser_hideUnusedExport> TextureBrowserHideUnusedExport;
 
 void TextureBrowser_showShadersExport( const BoolImportCallback& importer ){
        importer( GlobalTextureBrowser().m_showShaders );
 }
-typedef FreeCaller1<const BoolImportCallback&, TextureBrowser_showShadersExport> TextureBrowserShowShadersExport;
+typedef FreeCaller<void(const BoolImportCallback&), TextureBrowser_showShadersExport> TextureBrowserShowShadersExport;
 
 void TextureBrowser_showShaderlistOnly( const BoolImportCallback& importer ){
        importer( g_TextureBrowser_shaderlistOnly );
 }
-typedef FreeCaller1<const BoolImportCallback&, TextureBrowser_showShaderlistOnly> TextureBrowserShowShaderlistOnlyExport;
+typedef FreeCaller<void(const BoolImportCallback&), TextureBrowser_showShaderlistOnly> TextureBrowserShowShaderlistOnlyExport;
 
 void TextureBrowser_fixedSize( const BoolImportCallback& importer ){
        importer( g_TextureBrowser_fixedSize );
 }
-typedef FreeCaller1<const BoolImportCallback&, TextureBrowser_fixedSize> TextureBrowser_FixedSizeExport;
+typedef FreeCaller<void(const BoolImportCallback&), TextureBrowser_fixedSize> TextureBrowser_FixedSizeExport;
 
 void TextureBrowser_filterMissing( const BoolImportCallback& importer ){
        importer( g_TextureBrowser_filterMissing );
 }
-typedef FreeCaller1<const BoolImportCallback&, TextureBrowser_filterMissing> TextureBrowser_filterMissingExport;
+typedef FreeCaller<void(const BoolImportCallback&), TextureBrowser_filterMissing> TextureBrowser_filterMissingExport;
 
 void TextureBrowser_filterFallback( const BoolImportCallback& importer ){
        importer( g_TextureBrowser_filterFallback );
 }
-typedef FreeCaller1<const BoolImportCallback&, TextureBrowser_filterFallback> TextureBrowser_filterFallbackExport;
+typedef FreeCaller<void(const BoolImportCallback&), TextureBrowser_filterFallback> TextureBrowser_filterFallbackExport;
 
 void TextureBrowser_enableAlpha( const BoolImportCallback& importer ){
        importer( g_TextureBrowser_enableAlpha );
 }
-typedef FreeCaller1<const BoolImportCallback&, TextureBrowser_enableAlpha> TextureBrowser_enableAlphaExport;
+typedef FreeCaller<void(const BoolImportCallback&), TextureBrowser_enableAlpha> TextureBrowser_enableAlphaExport;
 
 void TextureBrowser_SetHideUnused( TextureBrowser& textureBrowser, bool hideUnused ){
        if ( hideUnused ) {
@@ -1994,7 +1994,7 @@ ui::Widget TextureBrowser_constructWindow( ui::Window toplevel ){
        TextureBrowser_checkTagFile();
        TextureBrowser_SetNotex();
 
-       GlobalShaderSystem().setActiveShadersChangedNotify( ReferenceCaller<TextureBrowser, TextureBrowser_activeShadersChanged>( g_TextureBrowser ) );
+       GlobalShaderSystem().setActiveShadersChangedNotify( ReferenceCaller<TextureBrowser, void(), TextureBrowser_activeShadersChanged>( g_TextureBrowser ) );
 
        g_TextureBrowser.m_parent = toplevel;
 
@@ -2218,7 +2218,7 @@ ui::Widget TextureBrowser_constructWindow( ui::Window toplevel ){
 }
 
 void TextureBrowser_destroyWindow(){
-       GlobalShaderSystem().setActiveShadersChangedNotify( Callback() );
+       GlobalShaderSystem().setActiveShadersChangedNotify( Callback<void()>() );
 
        g_signal_handler_disconnect( G_OBJECT( g_TextureBrowser.m_gl_widget ), g_TextureBrowser.m_sizeHandler );
        g_signal_handler_disconnect( G_OBJECT( g_TextureBrowser.m_gl_widget ), g_TextureBrowser.m_exposeHandler );
@@ -2534,7 +2534,7 @@ void TextureScaleImport( TextureBrowser& textureBrowser, int value ){
                break;
        }
 }
-typedef ReferenceCaller1<TextureBrowser, int, TextureScaleImport> TextureScaleImportCaller;
+typedef ReferenceCaller<TextureBrowser, void(int), TextureScaleImport> TextureScaleImportCaller;
 
 void TextureScaleExport( TextureBrowser& textureBrowser, const IntImportCallback& importer ){
        switch ( textureBrowser.m_textureScale )
@@ -2556,7 +2556,7 @@ void TextureScaleExport( TextureBrowser& textureBrowser, const IntImportCallback
                break;
        }
 }
-typedef ReferenceCaller1<TextureBrowser, const IntImportCallback&, TextureScaleExport> TextureScaleExportCaller;
+typedef ReferenceCaller<TextureBrowser, void(const IntImportCallback&), TextureScaleExport> TextureScaleExportCaller;
 
 
 void UniformTextureSizeImport( TextureBrowser& textureBrowser, int value ){
@@ -2564,7 +2564,7 @@ void UniformTextureSizeImport( TextureBrowser& textureBrowser, int value ){
        if ( value > 16 )
                TextureBrowser_setUniformSize( textureBrowser, value );
 }
-typedef ReferenceCaller1<TextureBrowser, int, UniformTextureSizeImport> UniformTextureSizeImportCaller;
+typedef ReferenceCaller<TextureBrowser, void(int), UniformTextureSizeImport> UniformTextureSizeImportCaller;
 
 void TextureBrowser_constructPreferences( PreferencesPage& page ){
        page.appendCheckBox(
@@ -2598,37 +2598,37 @@ void TextureBrowser_constructPage( PreferenceGroup& group ){
        TextureBrowser_constructPreferences( page );
 }
 void TextureBrowser_registerPreferencesPage(){
-       PreferencesDialog_addSettingsPage( FreeCaller1<PreferenceGroup&, TextureBrowser_constructPage>() );
+       PreferencesDialog_addSettingsPage( FreeCaller<void(PreferenceGroup&), TextureBrowser_constructPage>() );
 }
 
 
 #include "preferencesystem.h"
 #include "stringio.h"
 
-typedef ReferenceCaller1<TextureBrowser, std::size_t, TextureBrowser_setScale> TextureBrowserSetScaleCaller;
+typedef ReferenceCaller<TextureBrowser, void(std::size_t), TextureBrowser_setScale> TextureBrowserSetScaleCaller;
 
 
 
 void TextureClipboard_textureSelected( const char* shader );
 
 void TextureBrowser_Construct(){
-       GlobalCommands_insert( "ShaderInfo", FreeCaller<TextureBrowser_shaderInfo>() );
-       GlobalCommands_insert( "ShowUntagged", FreeCaller<TextureBrowser_showUntagged>() );
-       GlobalCommands_insert( "AddTag", FreeCaller<TextureBrowser_addTag>() );
-       GlobalCommands_insert( "RenameTag", FreeCaller<TextureBrowser_renameTag>() );
-       GlobalCommands_insert( "DeleteTag", FreeCaller<TextureBrowser_deleteTag>() );
-       GlobalCommands_insert( "CopyTag", FreeCaller<TextureBrowser_copyTag>() );
-       GlobalCommands_insert( "PasteTag", FreeCaller<TextureBrowser_pasteTag>() );
-       GlobalCommands_insert( "RefreshShaders", FreeCaller<VFS_Refresh>() );
-       GlobalToggles_insert( "ShowInUse", FreeCaller<TextureBrowser_ToggleHideUnused>(), ToggleItem::AddCallbackCaller( g_TextureBrowser.m_hideunused_item ), Accelerator( 'U' ) );
-       GlobalCommands_insert( "ShowAllTextures", FreeCaller<TextureBrowser_showAll>(), Accelerator( 'A', (GdkModifierType)GDK_CONTROL_MASK ) );
-       GlobalCommands_insert( "ToggleTextures", FreeCaller<TextureBrowser_toggleShow>(), Accelerator( 'T' ) );
-       GlobalToggles_insert( "ToggleShowShaders", FreeCaller<TextureBrowser_ToggleShowShaders>(), ToggleItem::AddCallbackCaller( g_TextureBrowser.m_showshaders_item ) );
-       GlobalToggles_insert( "ToggleShowShaderlistOnly", FreeCaller<TextureBrowser_ToggleShowShaderListOnly>(), ToggleItem::AddCallbackCaller( g_TextureBrowser.m_showshaderlistonly_item ) );
-       GlobalToggles_insert( "FixedSize", FreeCaller<TextureBrowser_FixedSize>(), ToggleItem::AddCallbackCaller( g_TextureBrowser.m_fixedsize_item ) );
-       GlobalToggles_insert( "FilterMissing", FreeCaller<TextureBrowser_FilterMissing>(), ToggleItem::AddCallbackCaller( g_TextureBrowser.m_filternotex_item ) );
-       GlobalToggles_insert( "FilterFallback", FreeCaller<TextureBrowser_FilterFallback>(), ToggleItem::AddCallbackCaller( g_TextureBrowser.m_hidenotex_item ) );
-       GlobalToggles_insert( "EnableAlpha", FreeCaller<TextureBrowser_EnableAlpha>(), ToggleItem::AddCallbackCaller( g_TextureBrowser.m_enablealpha_item ) );
+       GlobalCommands_insert( "ShaderInfo", FreeCaller<void(), TextureBrowser_shaderInfo>() );
+       GlobalCommands_insert( "ShowUntagged", FreeCaller<void(), TextureBrowser_showUntagged>() );
+       GlobalCommands_insert( "AddTag", FreeCaller<void(), TextureBrowser_addTag>() );
+       GlobalCommands_insert( "RenameTag", FreeCaller<void(), TextureBrowser_renameTag>() );
+       GlobalCommands_insert( "DeleteTag", FreeCaller<void(), TextureBrowser_deleteTag>() );
+       GlobalCommands_insert( "CopyTag", FreeCaller<void(), TextureBrowser_copyTag>() );
+       GlobalCommands_insert( "PasteTag", FreeCaller<void(), TextureBrowser_pasteTag>() );
+       GlobalCommands_insert( "RefreshShaders", FreeCaller<void(), VFS_Refresh>() );
+       GlobalToggles_insert( "ShowInUse", FreeCaller<void(), TextureBrowser_ToggleHideUnused>(), ToggleItem::AddCallbackCaller( g_TextureBrowser.m_hideunused_item ), Accelerator( 'U' ) );
+       GlobalCommands_insert( "ShowAllTextures", FreeCaller<void(), TextureBrowser_showAll>(), Accelerator( 'A', (GdkModifierType)GDK_CONTROL_MASK ) );
+       GlobalCommands_insert( "ToggleTextures", FreeCaller<void(), TextureBrowser_toggleShow>(), Accelerator( 'T' ) );
+       GlobalToggles_insert( "ToggleShowShaders", FreeCaller<void(), TextureBrowser_ToggleShowShaders>(), ToggleItem::AddCallbackCaller( g_TextureBrowser.m_showshaders_item ) );
+       GlobalToggles_insert( "ToggleShowShaderlistOnly", FreeCaller<void(), TextureBrowser_ToggleShowShaderListOnly>(), ToggleItem::AddCallbackCaller( g_TextureBrowser.m_showshaderlistonly_item ) );
+       GlobalToggles_insert( "FixedSize", FreeCaller<void(), TextureBrowser_FixedSize>(), ToggleItem::AddCallbackCaller( g_TextureBrowser.m_fixedsize_item ) );
+       GlobalToggles_insert( "FilterMissing", FreeCaller<void(), TextureBrowser_FilterMissing>(), ToggleItem::AddCallbackCaller( g_TextureBrowser.m_filternotex_item ) );
+       GlobalToggles_insert( "FilterFallback", FreeCaller<void(), TextureBrowser_FilterFallback>(), ToggleItem::AddCallbackCaller( g_TextureBrowser.m_hidenotex_item ) );
+       GlobalToggles_insert( "EnableAlpha", FreeCaller<void(), TextureBrowser_EnableAlpha>(), ToggleItem::AddCallbackCaller( g_TextureBrowser.m_enablealpha_item ) );
 
        GlobalPreferenceSystem().registerPreference( "TextureScale",
                                                                                                 makeSizeStringImportCallback( TextureBrowserSetScaleCaller( g_TextureBrowser ) ),
@@ -2652,7 +2652,7 @@ void TextureBrowser_Construct(){
 
        g_TextureBrowser.shader = texdef_name_default();
 
-       Textures_setModeChangedNotify( ReferenceCaller<TextureBrowser, TextureBrowser_queueDraw>( g_TextureBrowser ) );
+       Textures_setModeChangedNotify( ReferenceCaller<TextureBrowser, void(), TextureBrowser_queueDraw>( g_TextureBrowser ) );
 
        TextureBrowser_registerPreferencesPage();
 
@@ -2663,5 +2663,5 @@ void TextureBrowser_Construct(){
 void TextureBrowser_Destroy(){
        GlobalShaderSystem().detach( g_ShadersObserver );
 
-       Textures_setModeChangedNotify( Callback() );
+       Textures_setModeChangedNotify( Callback<void()>() );
 }
index 9a153c44802ca3ca371678b30902701a7b66d176..2debcceaa8d2486f20719e49c0947fd799e416b9 100644 (file)
@@ -43,11 +43,11 @@ const char* TextureBrowser_GetSelectedShader( TextureBrowser& textureBrower );
 void TextureBrowser_Construct();
 void TextureBrowser_Destroy();
 
-typedef Callback1<const char*> StringImportCallback;
+typedef Callback<void(const char*)> StringImportCallback;
 
 extern ui::Widget g_page_textures;
 void TextureBrowser_exportTitle( const StringImportCallback& importer );
-typedef FreeCaller1<const StringImportCallback&, TextureBrowser_exportTitle> TextureBrowserExportTitleCaller;
+typedef FreeCaller<void(const StringImportCallback&), TextureBrowser_exportTitle> TextureBrowserExportTitleCaller;
 
 const Vector3& TextureBrowser_getBackgroundColour( TextureBrowser& textureBrowser );
 void TextureBrowser_setBackgroundColour( TextureBrowser& textureBrowser, const Vector3& colour );
index aa6d227ae6ffbd8f332a8f998688d5d4f4df49be..12441f0e7ee0f5523f005c79dc8c8c1642902011 100644 (file)
@@ -110,7 +110,7 @@ bool graph_tree_model_find_parent( GraphTreeModel* model, const scene::Path& pat
        return true;
 }
 
-void node_attach_name_changed_callback( scene::Node& node, const Callback& callback ){
+void node_attach_name_changed_callback( scene::Node& node, const Callback<void()>& callback ){
        if ( node != 0 ) {
                Nameable* nameable = Node_getNameable( node );
                if ( nameable != 0 ) {
@@ -118,7 +118,7 @@ void node_attach_name_changed_callback( scene::Node& node, const Callback& callb
                }
        }
 }
-void node_detach_name_changed_callback( scene::Node& node, const Callback& callback ){
+void node_detach_name_changed_callback( scene::Node& node, const Callback<void()>& callback ){
        if ( node != 0 ) {
                Nameable* nameable = Node_getNameable( node );
                if ( nameable != 0 ) {
@@ -153,14 +153,14 @@ void graph_tree_model_row_inserted( GraphTreeModel* model, const scene::Instance
        gtk_tree_store_append( GTK_TREE_STORE( model ), &child, parent_pointer );
        gtk_tree_store_set( GTK_TREE_STORE( model ), &child, 0, node, 1, selectable, -1 );
 
-       node_attach_name_changed_callback( instance.path().top(), ConstReferenceCaller<scene::Instance, graph_tree_model_row_changed>( instance ) );
+       node_attach_name_changed_callback( instance.path().top(), ConstReferenceCaller<scene::Instance, void(), graph_tree_model_row_changed>( instance ) );
 }
 
 void graph_tree_model_row_deleted( GraphTreeModel* model, const scene::Instance& instance ){
        GtkTreeIter child;
        ASSERT_MESSAGE( graph_tree_model_find_top( model, instance.path(), child ), "RUNTIME ERROR" );
 
-       node_detach_name_changed_callback( instance.path().top(), ConstReferenceCaller<scene::Instance, graph_tree_model_row_changed>( instance ) );
+       node_detach_name_changed_callback( instance.path().top(), ConstReferenceCaller<scene::Instance, void(), graph_tree_model_row_changed>( instance ) );
 
        gtk_tree_store_remove( GTK_TREE_STORE( model ), &child );
 }
@@ -724,11 +724,11 @@ void graph_tree_model_insert( GraphTreeModel* model, const scene::Instance& inst
 
        graph_tree_model_row_inserted( model, i );
 
-       node_attach_name_changed_callback( instance.path().top(), ConstReferenceCaller1<scene::Instance, const char*, graph_tree_model_set_name>( instance ) );
+       node_attach_name_changed_callback( instance.path().top(), ConstReferenceCaller<scene::Instance, void(const char*), graph_tree_model_set_name>( instance ) );
 }
 
 void graph_tree_model_erase( GraphTreeModel* model, const scene::Instance& instance ){
-       node_detach_name_changed_callback( instance.path().top(), ConstReferenceCaller1<scene::Instance, const char*, graph_tree_model_set_name>( instance ) );
+       node_detach_name_changed_callback( instance.path().top(), ConstReferenceCaller<scene::Instance, void(const char*), graph_tree_model_set_name>( instance ) );
 
        graph_type::iterator i = model->graph->find( PathConstReference( instance.path() ) );
        ASSERT_MESSAGE( i != model->graph->end(), "ERROR" );
@@ -760,7 +760,7 @@ GraphTreeNode( scene::Instance& instance ) : m_instance( instance ), m_parent( 0
        m_instance.get().setChildSelectedChangedCallback( RowChangedCaller( *this ) );
 }
 ~GraphTreeNode(){
-       m_instance.get().setChildSelectedChangedCallback( Callback() );
+       m_instance.get().setChildSelectedChangedCallback( Callback<void()>() );
        ASSERT_MESSAGE( empty(), "GraphTreeNode::~GraphTreeNode: memory leak" );
 }
 
@@ -799,7 +799,7 @@ void swap( GraphTreeNode& other ){
 void rowChanged(){
        graph_tree_model_row_changed( *this );
 }
-typedef MemberCaller<GraphTreeNode, &GraphTreeNode::rowChanged> RowChangedCaller;
+typedef MemberCaller<GraphTreeNode, void(), &GraphTreeNode::rowChanged> RowChangedCaller;
 };
 
 struct GraphTreeModel
@@ -1169,7 +1169,7 @@ void node_detach_name_changed_callback( scene::Node& node, const NameCallback& c
 
 GraphTreeModel* scene_graph_get_tree_model(); // temp hack
 
-void graph_tree_node_foreach_pre( GraphTreeNode::iterator root, const Callback1<GraphTreeNode::iterator>& callback ){
+void graph_tree_node_foreach_pre( GraphTreeNode::iterator root, const Callback<void(GraphTreeNode::iterator)>& callback ){
        callback( root );
        for ( GraphTreeNode::iterator i = ( *root ).second->begin(); i != ( *root ).second->end(); ++i )
        {
@@ -1177,7 +1177,7 @@ void graph_tree_node_foreach_pre( GraphTreeNode::iterator root, const Callback1<
        }
 }
 
-void graph_tree_node_foreach_post( GraphTreeNode::iterator root, const Callback1<GraphTreeNode::iterator>& callback ){
+void graph_tree_node_foreach_post( GraphTreeNode::iterator root, const Callback<void(GraphTreeNode::iterator)>& callback ){
        for ( GraphTreeNode::iterator i = ( *root ).second->begin(); i != ( *root ).second->end(); ++i )
        {
                graph_tree_node_foreach_post( i, callback );
@@ -1199,12 +1199,12 @@ void graph_tree_model_set_name( const scene::Instance& instance, const char* nam
        GraphTreeNode* parent = graph_tree_model_find_parent( model, instance.path() );
 
        GraphTreeNode::iterator oldNode = parent->find( GraphTreeNode::key_type( node_get_name_safe( instance.path().top().get() ), instance.path().top().get_pointer() ) );
-       graph_tree_node_foreach_post( oldNode, ReferenceCaller1<GraphTreeModel, GraphTreeNode::iterator, graph_tree_model_row_deleted>( *model ) );
+       graph_tree_node_foreach_post( oldNode, ReferenceCaller<GraphTreeModel, void(GraphTreeNode::iterator), graph_tree_model_row_deleted>( *model ) );
        GraphTreeNode* node( ( *oldNode ).second );
        parent->erase( oldNode );
 
        GraphTreeNode::iterator newNode = parent->insert( GraphTreeNode::value_type( GraphTreeNode::key_type( name, &instance.path().top().get() ), node ) );
-       graph_tree_node_foreach_pre( newNode, ReferenceCaller1<GraphTreeModel, GraphTreeNode::iterator, graph_tree_model_row_inserted>( *model ) );
+       graph_tree_node_foreach_pre( newNode, ReferenceCaller<GraphTreeModel, void(GraphTreeNode::iterator), graph_tree_model_row_inserted>( *model ) );
 }
 
 void graph_tree_model_insert( GraphTreeModel* model, const scene::Instance& instance ){
@@ -1214,11 +1214,11 @@ void graph_tree_model_insert( GraphTreeModel* model, const scene::Instance& inst
 
        graph_tree_model_row_inserted( model, i );
 
-       node_attach_name_changed_callback( instance.path().top(), ConstReferenceCaller1<scene::Instance, const char*, graph_tree_model_set_name>( instance ) );
+       node_attach_name_changed_callback( instance.path().top(), ConstReferenceCaller<scene::Instance, void(const char*), graph_tree_model_set_name>( instance ) );
 }
 
 void graph_tree_model_erase( GraphTreeModel* model, const scene::Instance& instance ){
-       node_detach_name_changed_callback( instance.path().top(), ConstReferenceCaller1<scene::Instance, const char*, graph_tree_model_set_name>( instance ) );
+       node_detach_name_changed_callback( instance.path().top(), ConstReferenceCaller<scene::Instance, void(const char*), graph_tree_model_set_name>( instance ) );
 
        GraphTreeNode* parent = graph_tree_model_find_parent( model, instance.path() );
 
index eb536d8879e7e9b8954ff09e03f67d6965033749..8277c70e4ef91bec9e41fc21f3341656bf3ebcc0 100644 (file)
@@ -380,22 +380,22 @@ void UndoLevels_importString( RadiantUndoSystem& undo, const char* value ){
        Int_importString( levels, value );
        undo.setLevels( levels );
 }
-typedef ReferenceCaller1<RadiantUndoSystem, const char*, UndoLevels_importString> UndoLevelsImportStringCaller;
+typedef ReferenceCaller<RadiantUndoSystem, void(const char*), UndoLevels_importString> UndoLevelsImportStringCaller;
 void UndoLevels_exportString( const RadiantUndoSystem& undo, const StringImportCallback& importer ){
        Int_exportString( static_cast<int>( undo.getLevels() ), importer );
 }
-typedef ConstReferenceCaller1<RadiantUndoSystem, const StringImportCallback&, UndoLevels_exportString> UndoLevelsExportStringCaller;
+typedef ConstReferenceCaller<RadiantUndoSystem, void(const StringImportCallback&), UndoLevels_exportString> UndoLevelsExportStringCaller;
 
 #include "generic/callback.h"
 
 void UndoLevelsImport( RadiantUndoSystem& self, int value ){
        self.setLevels( value );
 }
-typedef ReferenceCaller1<RadiantUndoSystem, int, UndoLevelsImport> UndoLevelsImportCaller;
+typedef ReferenceCaller<RadiantUndoSystem, void(int), UndoLevelsImport> UndoLevelsImportCaller;
 void UndoLevelsExport( const RadiantUndoSystem& self, const IntImportCallback& importCallback ){
        importCallback( static_cast<int>( self.getLevels() ) );
 }
-typedef ConstReferenceCaller1<RadiantUndoSystem, const IntImportCallback&, UndoLevelsExport> UndoLevelsExportCaller;
+typedef ConstReferenceCaller<RadiantUndoSystem, void(const IntImportCallback&), UndoLevelsExport> UndoLevelsExportCaller;
 
 
 void Undo_constructPreferences( RadiantUndoSystem& undo, PreferencesPage& page ){
@@ -406,7 +406,7 @@ void Undo_constructPage( RadiantUndoSystem& undo, PreferenceGroup& group ){
        Undo_constructPreferences( undo, page );
 }
 void Undo_registerPreferencesPage( RadiantUndoSystem& undo ){
-       PreferencesDialog_addSettingsPage( ReferenceCaller1<RadiantUndoSystem, PreferenceGroup&, Undo_constructPage>( undo ) );
+       PreferencesDialog_addSettingsPage( ReferenceCaller<RadiantUndoSystem, void(PreferenceGroup&), Undo_constructPage>( undo ) );
 }
 
 class UndoSystemDependencies : public GlobalPreferenceSystemModuleRef
index ada5eb435b0c32bff74537c08f6b32d595c54ae4..d36738a1c29976c329382ddb985f8889ff2d030c 100644 (file)
@@ -190,7 +190,7 @@ void Build_constructPage( PreferenceGroup& group ){
        Build_constructPreferences( page );
 }
 void Build_registerPreferencesPage(){
-       PreferencesDialog_addSettingsPage( FreeCaller1<PreferenceGroup&, Build_constructPage>() );
+       PreferencesDialog_addSettingsPage( FreeCaller<void(PreferenceGroup&), Build_constructPage>() );
 }
 
 #include "preferencesystem.h"
index 2365df8c5a0ae5e01aa132beb3a1e39beead3f14..9e296f42554b6ae3a77eabfa6a0f50e724b1dbcc 100644 (file)
@@ -826,7 +826,7 @@ XYWnd::XYWnd() :
        GlobalWindowObservers_add( m_window_observer );
        GlobalWindowObservers_connectWidget( m_gl_widget );
 
-       m_window_observer->setRectangleDrawCallback( ReferenceCaller1<XYWnd, rect_t, xy_update_xor_rectangle>( *this ) );
+       m_window_observer->setRectangleDrawCallback( ReferenceCaller<XYWnd, void(rect_t), xy_update_xor_rectangle>( *this ) );
        m_window_observer->setView( m_view );
 
        g_object_ref( m_gl_widget._handle );
@@ -849,8 +849,8 @@ XYWnd::XYWnd() :
        updateProjection();
        updateModelview();
 
-       AddSceneChangeCallback( ReferenceCaller<XYWnd, &XYWnd_Update>( *this ) );
-       AddCameraMovedCallback( ReferenceCaller<XYWnd, &XYWnd_CameraMoved>( *this ) );
+       AddSceneChangeCallback( ReferenceCaller<XYWnd, void(), &XYWnd_Update>( *this ) );
+       AddCameraMovedCallback( ReferenceCaller<XYWnd, void(), &XYWnd_CameraMoved>( *this ) );
 
        PressedButtons_connect( g_pressedButtons, m_gl_widget );
 
@@ -2586,71 +2586,71 @@ void ShowNamesToggle(){
        GlobalEntityCreator().setShowNames( !GlobalEntityCreator().getShowNames() );
        XY_UpdateAllWindows();
 }
-typedef FreeCaller<ShowNamesToggle> ShowNamesToggleCaller;
+typedef FreeCaller<void(), ShowNamesToggle> ShowNamesToggleCaller;
 void ShowNamesExport( const BoolImportCallback& importer ){
        importer( GlobalEntityCreator().getShowNames() );
 }
-typedef FreeCaller1<const BoolImportCallback&, ShowNamesExport> ShowNamesExportCaller;
+typedef FreeCaller<void(const BoolImportCallback&), ShowNamesExport> ShowNamesExportCaller;
 
 void ShowAnglesToggle(){
        GlobalEntityCreator().setShowAngles( !GlobalEntityCreator().getShowAngles() );
        XY_UpdateAllWindows();
 }
-typedef FreeCaller<ShowAnglesToggle> ShowAnglesToggleCaller;
+typedef FreeCaller<void(), ShowAnglesToggle> ShowAnglesToggleCaller;
 void ShowAnglesExport( const BoolImportCallback& importer ){
        importer( GlobalEntityCreator().getShowAngles() );
 }
-typedef FreeCaller1<const BoolImportCallback&, ShowAnglesExport> ShowAnglesExportCaller;
+typedef FreeCaller<void(const BoolImportCallback&), ShowAnglesExport> ShowAnglesExportCaller;
 
 void ShowBlocksToggle(){
        g_xywindow_globals_private.show_blocks ^= 1;
        XY_UpdateAllWindows();
 }
-typedef FreeCaller<ShowBlocksToggle> ShowBlocksToggleCaller;
+typedef FreeCaller<void(), ShowBlocksToggle> ShowBlocksToggleCaller;
 void ShowBlocksExport( const BoolImportCallback& importer ){
        importer( g_xywindow_globals_private.show_blocks );
 }
-typedef FreeCaller1<const BoolImportCallback&, ShowBlocksExport> ShowBlocksExportCaller;
+typedef FreeCaller<void(const BoolImportCallback&), ShowBlocksExport> ShowBlocksExportCaller;
 
 void ShowCoordinatesToggle(){
        g_xywindow_globals_private.show_coordinates ^= 1;
        XY_UpdateAllWindows();
 }
-typedef FreeCaller<ShowCoordinatesToggle> ShowCoordinatesToggleCaller;
+typedef FreeCaller<void(), ShowCoordinatesToggle> ShowCoordinatesToggleCaller;
 void ShowCoordinatesExport( const BoolImportCallback& importer ){
        importer( g_xywindow_globals_private.show_coordinates );
 }
-typedef FreeCaller1<const BoolImportCallback&, ShowCoordinatesExport> ShowCoordinatesExportCaller;
+typedef FreeCaller<void(const BoolImportCallback&), ShowCoordinatesExport> ShowCoordinatesExportCaller;
 
 void ShowOutlineToggle(){
        g_xywindow_globals_private.show_outline ^= 1;
        XY_UpdateAllWindows();
 }
-typedef FreeCaller<ShowOutlineToggle> ShowOutlineToggleCaller;
+typedef FreeCaller<void(), ShowOutlineToggle> ShowOutlineToggleCaller;
 void ShowOutlineExport( const BoolImportCallback& importer ){
        importer( g_xywindow_globals_private.show_outline );
 }
-typedef FreeCaller1<const BoolImportCallback&, ShowOutlineExport> ShowOutlineExportCaller;
+typedef FreeCaller<void(const BoolImportCallback&), ShowOutlineExport> ShowOutlineExportCaller;
 
 void ShowAxesToggle(){
        g_xywindow_globals_private.show_axis ^= 1;
        XY_UpdateAllWindows();
 }
-typedef FreeCaller<ShowAxesToggle> ShowAxesToggleCaller;
+typedef FreeCaller<void(), ShowAxesToggle> ShowAxesToggleCaller;
 void ShowAxesExport( const BoolImportCallback& importer ){
        importer( g_xywindow_globals_private.show_axis );
 }
-typedef FreeCaller1<const BoolImportCallback&, ShowAxesExport> ShowAxesExportCaller;
+typedef FreeCaller<void(const BoolImportCallback&), ShowAxesExport> ShowAxesExportCaller;
 
 void ShowWorkzoneToggle(){
        g_xywindow_globals_private.d_show_work ^= 1;
        XY_UpdateAllWindows();
 }
-typedef FreeCaller<ShowWorkzoneToggle> ShowWorkzoneToggleCaller;
+typedef FreeCaller<void(), ShowWorkzoneToggle> ShowWorkzoneToggleCaller;
 void ShowWorkzoneExport( const BoolImportCallback& importer ){
        importer( g_xywindow_globals_private.d_show_work );
 }
-typedef FreeCaller1<const BoolImportCallback&, ShowWorkzoneExport> ShowWorkzoneExportCaller;
+typedef FreeCaller<void(const BoolImportCallback&), ShowWorkzoneExport> ShowWorkzoneExportCaller;
 
 ShowNamesExportCaller g_show_names_caller;
 BoolExportCallback g_show_names_callback( g_show_names_caller );
@@ -2708,7 +2708,7 @@ void Orthographic_constructPage( PreferenceGroup& group ){
        Orthographic_constructPreferences( page );
 }
 void Orthographic_registerPreferencesPage(){
-       PreferencesDialog_addSettingsPage( FreeCaller1<PreferenceGroup&, Orthographic_constructPage>() );
+       PreferencesDialog_addSettingsPage( FreeCaller<void(PreferenceGroup&), Orthographic_constructPage>() );
 }
 
 void Clipper_constructPreferences( PreferencesPage& page ){
@@ -2719,7 +2719,7 @@ void Clipper_constructPage( PreferenceGroup& group ){
        Clipper_constructPreferences( page );
 }
 void Clipper_registerPreferencesPage(){
-       PreferencesDialog_addSettingsPage( FreeCaller1<PreferenceGroup&, Clipper_constructPage>() );
+       PreferencesDialog_addSettingsPage( FreeCaller<void(PreferenceGroup&), Clipper_constructPage>() );
 }
 
 
@@ -2732,29 +2732,29 @@ void Clipper_registerPreferencesPage(){
 void ToggleShown_importBool( ToggleShown& self, bool value ){
        self.set( value );
 }
-typedef ReferenceCaller1<ToggleShown, bool, ToggleShown_importBool> ToggleShownImportBoolCaller;
+typedef ReferenceCaller<ToggleShown, void(bool), ToggleShown_importBool> ToggleShownImportBoolCaller;
 void ToggleShown_exportBool( const ToggleShown& self, const BoolImportCallback& importer ){
        importer( self.active() );
 }
-typedef ConstReferenceCaller1<ToggleShown, const BoolImportCallback&, ToggleShown_exportBool> ToggleShownExportBoolCaller;
+typedef ConstReferenceCaller<ToggleShown, void(const BoolImportCallback&), ToggleShown_exportBool> ToggleShownExportBoolCaller;
 
 
 void XYWindow_Construct(){
-       GlobalCommands_insert( "ToggleCrosshairs", FreeCaller<ToggleShowCrosshair>(), Accelerator( 'X', (GdkModifierType)GDK_SHIFT_MASK ) );
-       GlobalCommands_insert( "ToggleSizePaint", FreeCaller<ToggleShowSizeInfo>(), Accelerator( 'J' ) );
-       GlobalCommands_insert( "ToggleGrid", FreeCaller<ToggleShowGrid>(), Accelerator( '0' ) );
+       GlobalCommands_insert( "ToggleCrosshairs", FreeCaller<void(), ToggleShowCrosshair>(), Accelerator( 'X', (GdkModifierType)GDK_SHIFT_MASK ) );
+       GlobalCommands_insert( "ToggleSizePaint", FreeCaller<void(), ToggleShowSizeInfo>(), Accelerator( 'J' ) );
+       GlobalCommands_insert( "ToggleGrid", FreeCaller<void(), ToggleShowGrid>(), Accelerator( '0' ) );
 
        GlobalToggles_insert( "ToggleView", ToggleShown::ToggleCaller( g_xy_top_shown ), ToggleItem::AddCallbackCaller( g_xy_top_shown.m_item ), Accelerator( 'V', (GdkModifierType)( GDK_SHIFT_MASK | GDK_CONTROL_MASK ) ) );
        GlobalToggles_insert( "ToggleSideView", ToggleShown::ToggleCaller( g_yz_side_shown ), ToggleItem::AddCallbackCaller( g_yz_side_shown.m_item ) );
        GlobalToggles_insert( "ToggleFrontView", ToggleShown::ToggleCaller( g_xz_front_shown ), ToggleItem::AddCallbackCaller( g_xz_front_shown.m_item ) );
-       GlobalCommands_insert( "NextView", FreeCaller<XY_Next>(), Accelerator( GDK_KEY_Tab, (GdkModifierType)GDK_CONTROL_MASK ) ); // fixme: doesn't show its shortcut
-       GlobalCommands_insert( "ZoomIn", FreeCaller<XY_ZoomIn>(), Accelerator( GDK_KEY_Delete ) );
-       GlobalCommands_insert( "ZoomOut", FreeCaller<XY_ZoomOut>(), Accelerator( GDK_KEY_Insert ) );
-       GlobalCommands_insert( "ViewTop", FreeCaller<XY_Top>(), Accelerator( GDK_KEY_KP_Home ) );
-       GlobalCommands_insert( "ViewSide", FreeCaller<XY_Side>(), Accelerator( GDK_KEY_KP_Page_Down ) );
-       GlobalCommands_insert( "ViewFront", FreeCaller<XY_Front>(), Accelerator( GDK_KEY_KP_End ) );
-       GlobalCommands_insert( "Zoom100", FreeCaller<XY_Zoom100>() );
-       GlobalCommands_insert( "CenterXYView", FreeCaller<XY_Focus>(), Accelerator( GDK_KEY_Tab, (GdkModifierType)( GDK_SHIFT_MASK | GDK_CONTROL_MASK ) ) );
+       GlobalCommands_insert( "NextView", FreeCaller<void(), XY_Next>(), Accelerator( GDK_KEY_Tab, (GdkModifierType)GDK_CONTROL_MASK ) ); // fixme: doesn't show its shortcut
+       GlobalCommands_insert( "ZoomIn", FreeCaller<void(), XY_ZoomIn>(), Accelerator( GDK_KEY_Delete ) );
+       GlobalCommands_insert( "ZoomOut", FreeCaller<void(), XY_ZoomOut>(), Accelerator( GDK_KEY_Insert ) );
+       GlobalCommands_insert( "ViewTop", FreeCaller<void(), XY_Top>(), Accelerator( GDK_KEY_KP_Home ) );
+       GlobalCommands_insert( "ViewSide", FreeCaller<void(), XY_Side>(), Accelerator( GDK_KEY_KP_Page_Down ) );
+       GlobalCommands_insert( "ViewFront", FreeCaller<void(), XY_Front>(), Accelerator( GDK_KEY_KP_End ) );
+       GlobalCommands_insert( "Zoom100", FreeCaller<void(), XY_Zoom100>() );
+       GlobalCommands_insert( "CenterXYView", FreeCaller<void(), XY_Focus>(), Accelerator( GDK_KEY_Tab, (GdkModifierType)( GDK_SHIFT_MASK | GDK_CONTROL_MASK ) ) );
 
        GlobalPreferenceSystem().registerPreference( "ClipCaulk", BoolImportStringCaller( g_clip_useCaulk ), BoolExportStringCaller( g_clip_useCaulk ) );
 
index cfe8f036c11f8f1bef8a20c84a3342ff87dcae8a..0b762d45a8daeca7d0d802a382c52f7f6296351c 100644 (file)
@@ -224,7 +224,7 @@ int Height(){
 Signal0 onDestroyed;
 Signal3<const WindowVector&, ButtonIdentifier, ModifierFlags> onMouseDown;
 void mouseDown( const WindowVector& position, ButtonIdentifier button, ModifierFlags modifiers );
-typedef Member3<XYWnd, const WindowVector&, ButtonIdentifier, ModifierFlags, void, &XYWnd::mouseDown> MouseDownCaller;
+typedef Member<XYWnd, void(const WindowVector&, ButtonIdentifier, ModifierFlags), &XYWnd::mouseDown> MouseDownCaller;
 };
 
 inline void XYWnd_Update( XYWnd& xywnd ){