From: John L. <jr...@us...> - 2008-01-25 23:51:27
|
Update of /cvsroot/wxlua/wxLua/apps/wxluacan/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv1159/wxLua/apps/wxluacan/src Modified Files: wxluacan.cpp wxluacan_bind.cpp wxluacan_rules.lua Added Files: wxluacan_bind.h Removed Files: wxluacan.h Log Message: - Removed the wxLuaBinding::PreRegister() and PostRegister() functions and made RegisterBinding() virtual Note: wxLuaBinding::RegisterBinding() now leaves the Lua table that the binding objects were installed into on the stack. You must pop it. * The rules.lua for genwxbind.lua now uses wxLuaBinding_class_declaration and wxLuaBinding_class_implementation to replace wxLuaBinding_preregister and wxLuaBinding_postregister. You may now add whatever you like to the class declaration and implementation source code. Updated to Lua 5.1.3 official --- NEW FILE: wxluacan_bind.h --- // --------------------------------------------------------------------------- // wxluacan.h - headers and tags for wxLua binding // // This file was generated by genwxbind.lua // Any changes made to this file may be lost when file is regenerated // --------------------------------------------------------------------------- #ifndef __HOOK_WXLUA_wxluacan_H__ #define __HOOK_WXLUA_wxluacan_H__ #include "wxbind/include/wxcore_bind.h" #include "wxlua/include/wxlstate.h" #include "wxlua/include/wxlbind.h" // --------------------------------------------------------------------------- // Check if the version of binding generator used to create this is older than // the current version of the bindings. // See 'bindings/genwxbind.lua' and 'modules/wxlua/include/wxldefs.h' #if WXLUA_BINDING_VERSION > 23 # error "The WXLUA_BINDING_VERSION in the bindings is too old, regenerate bindings." #endif //WXLUA_BINDING_VERSION > 23 // --------------------------------------------------------------------------- // binding class class WXLUA_NO_DLLIMPEXP wxLuaBinding_wxluacan : public wxLuaBinding { public: wxLuaBinding_wxluacan(); private: DECLARE_DYNAMIC_CLASS(wxLuaBinding_wxluacan) }; // initialize wxLuaBinding_wxluacan for all wxLuaStates extern WXLUA_NO_DLLIMPEXP bool wxLuaBinding_wxluacan_init(); // --------------------------------------------------------------------------- // Includes // --------------------------------------------------------------------------- #include "cancom.h" #include "canlua.h" #include "cansim.h" #include "wx/gdicmn.h" // --------------------------------------------------------------------------- // Lua Tag Method Values and Tables for each Class // --------------------------------------------------------------------------- extern WXLUA_NO_DLLIMPEXP_DATA(int) wxluatype_wxlCan; extern WXLUA_NO_DLLIMPEXP wxLuaBindMethod wxlCan_methods[]; extern WXLUA_NO_DLLIMPEXP_DATA(int) wxlCan_methodCount; extern WXLUA_NO_DLLIMPEXP_DATA(int) wxluatype_wxlCanObj; extern WXLUA_NO_DLLIMPEXP wxLuaBindMethod wxlCanObj_methods[]; extern WXLUA_NO_DLLIMPEXP_DATA(int) wxlCanObj_methodCount; extern WXLUA_NO_DLLIMPEXP_DATA(int) wxluatype_wxlCanObjAddScript; extern WXLUA_NO_DLLIMPEXP wxLuaBindMethod wxlCanObjAddScript_methods[]; extern WXLUA_NO_DLLIMPEXP_DATA(int) wxlCanObjAddScript_methodCount; extern WXLUA_NO_DLLIMPEXP_DATA(int) wxluatype_wxlCanObjCircle; extern WXLUA_NO_DLLIMPEXP wxLuaBindMethod wxlCanObjCircle_methods[]; extern WXLUA_NO_DLLIMPEXP_DATA(int) wxlCanObjCircle_methodCount; extern WXLUA_NO_DLLIMPEXP_DATA(int) wxluatype_wxlCanObjRect; extern WXLUA_NO_DLLIMPEXP wxLuaBindMethod wxlCanObjRect_methods[]; extern WXLUA_NO_DLLIMPEXP_DATA(int) wxlCanObjRect_methodCount; extern WXLUA_NO_DLLIMPEXP_DATA(int) wxluatype_wxlCanObjScript; extern WXLUA_NO_DLLIMPEXP wxLuaBindMethod wxlCanObjScript_methods[]; extern WXLUA_NO_DLLIMPEXP_DATA(int) wxlCanObjScript_methodCount; extern WXLUA_NO_DLLIMPEXP_DATA(int) wxluatype_wxlLuaCanCmd; extern WXLUA_NO_DLLIMPEXP wxLuaBindMethod wxlLuaCanCmd_methods[]; extern WXLUA_NO_DLLIMPEXP_DATA(int) wxlLuaCanCmd_methodCount; // --------------------------------------------------------------------------- // Encapsulation Declarations - need to be public for other bindings. // --------------------------------------------------------------------------- #endif // __HOOK_WXLUA_wxluacan_H__ --- wxluacan.h DELETED --- Index: wxluacan.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/apps/wxluacan/src/wxluacan.cpp,v retrieving revision 1.39 retrieving revision 1.40 diff -C2 -d -r1.39 -r1.40 *** wxluacan.cpp 23 Jan 2008 06:43:34 -0000 1.39 --- wxluacan.cpp 25 Jan 2008 23:50:45 -0000 1.40 *************** *** 17,21 **** #include "wxlua/include/wxlstate.h" ! #include "wxluacan.h" --- 17,21 ---- #include "wxlua/include/wxlstate.h" ! #include "wxluacan_bind.h" Index: wxluacan_bind.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/apps/wxluacan/src/wxluacan_bind.cpp,v retrieving revision 1.30 retrieving revision 1.31 diff -C2 -d -r1.30 -r1.31 *** wxluacan_bind.cpp 24 Jan 2008 00:18:13 -0000 1.30 --- wxluacan_bind.cpp 25 Jan 2008 23:50:46 -0000 1.31 *************** *** 17,21 **** #include "wxlua/include/wxlstate.h" ! #include "wxluacan.h" --- 17,21 ---- #include "wxlua/include/wxlstate.h" ! #include "wxluacan_bind.h" *************** *** 169,178 **** } ! void wxLuaBinding_wxluacan::PreRegister(const wxLuaState& , int ) ! { ! } ! void wxLuaBinding_wxluacan::PostRegister(const wxLuaState&, int ) ! { ! } // --------------------------------------------------------------------------- --- 169,173 ---- } ! // --------------------------------------------------------------------------- Index: wxluacan_rules.lua =================================================================== RCS file: /cvsroot/wxlua/wxLua/apps/wxluacan/src/wxluacan_rules.lua,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** wxluacan_rules.lua 6 Aug 2007 01:46:32 -0000 1.15 --- wxluacan_rules.lua 25 Jan 2008 23:50:46 -0000 1.16 *************** *** 29,33 **** -- bindings in it. This will be used as #include "hook_cpp_header_filename" in -- the C++ wrapper files, so it must include the proper #include path. ! hook_cpp_header_filename = "wxluacan.h" ------------------------------------------------------------------------------- --- 29,33 ---- -- bindings in it. This will be used as #include "hook_cpp_header_filename" in -- the C++ wrapper files, so it must include the proper #include path. ! hook_cpp_header_filename = hook_cpp_namespace.."_bind.h" ------------------------------------------------------------------------------- *************** *** 108,121 **** --============================================================================= ! -- virtual void wxLuaBinding::PreRegister function body for the ! -- hook_cpp_binding_classname. You can initialize data here. ! -- Typically this is not necessary and you can rem this out. ! -- wxLuaBinding_PreRegister = nothing to do here ! --============================================================================= ! -- virtual void wxLuaBinding::PostRegister function body for the ! -- hook_cpp_binding_classname. You can load any other custom bindings here. ! -- Typically this is not necessary and you can rem this out. ! -- wxLuaBinding_PostRegister = nothing to do here --============================================================================= --- 108,126 ---- --============================================================================= ! -- Declare functions or member variables for the derived wxLuaBinding class ! -- that will be generated for this binding. The string will be copied verbatim ! -- into the body of the hook_cpp_binding_classname class declaration in the ! -- hook_cpp_header_filename header file. May be remmed out to ignore it. ! -- See usage in the wxWidgets wxbase_rules.lua file. ! --wxLuaBinding_class_declaration = nothing to do here ! ! ------------------------------------------------------------------------------- ! -- Implement the functions or member variables for the derived wxLuaBinding ! -- class that you have declared. The string will be copied into the ! -- hook_cpp_binding_filename source file. May be remmed out to ignore it. ! -- See usage in the wxWidgets wxbase_rules.lua file. ! ! --wxLuaBinding_class_implementation = nothing to do here --============================================================================= |