From: John L. <jr...@us...> - 2007-02-09 05:17:13
|
Update of /cvsroot/wxlua/wxLua/modules/wxbind/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv14412/wxLua/modules/wxbind/src Modified Files: windows.cpp wx_bind.cpp Log Message: derive wxWindowList from wxList and add comment to show how to use it Index: windows.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/src/windows.cpp,v retrieving revision 1.35 retrieving revision 1.36 diff -C2 -d -r1.35 -r1.36 *** windows.cpp 7 Feb 2007 18:39:11 -0000 1.35 --- windows.cpp 9 Feb 2007 05:17:09 -0000 1.36 *************** *** 3838,3901 **** int s_wxluatag_wxWindowList = -1; - // void Clear() - static int LUACALL wxLua_wxWindowList_Clear(lua_State *L) - { - wxLuaState wxlState(L); - // get this - wxWindowList * self = (wxWindowList *)wxlState.GetUserDataType(1, s_wxluatag_wxWindowList); - // call Clear - self->Clear(); - - return 0; - } - - static wxLuaArgTag s_wxluatagArray_wxLua_wxWindowList_DeleteContents[] = { &s_wxluaarg_Boolean, 0 }; - // void DeleteContents(bool destroy) - static int LUACALL wxLua_wxWindowList_DeleteContents(lua_State *L) - { - wxLuaState wxlState(L); - // bool destroy - bool destroy = wxlState.GetBooleanType(2); - // get this - wxWindowList * self = (wxWindowList *)wxlState.GetUserDataType(1, s_wxluatag_wxWindowList); - // call DeleteContents - self->DeleteContents(destroy); - - return 0; - } - - static wxLuaArgTag s_wxluatagArray_wxLua_wxWindowList_DeleteObject[] = { &s_wxluatag_wxWindow, 0 }; - // bool DeleteObject(wxWindow *pMenuItem) - static int LUACALL wxLua_wxWindowList_DeleteObject(lua_State *L) - { - wxLuaState wxlState(L); - bool returns; - // wxWindow pMenuItem - wxWindow * pMenuItem = (wxWindow *)wxlState.GetUserDataType(2, s_wxluatag_wxWindow); - // get this - wxWindowList * self = (wxWindowList *)wxlState.GetUserDataType(1, s_wxluatag_wxWindowList); - // call DeleteObject - returns = self->DeleteObject(pMenuItem); - // push the result flag - lua_pushboolean(L, returns); - - return 1; - } - - // int GetCount() const - static int LUACALL wxLua_wxWindowList_GetCount(lua_State *L) - { - wxLuaState wxlState(L); - int returns; - // get this - wxWindowList * self = (wxWindowList *)wxlState.GetUserDataType(1, s_wxluatag_wxWindowList); - // call GetCount - returns = self->GetCount(); - // push the result number - lua_pushnumber(L, returns); - - return 1; - } - static int LUACALL wxLua_wxWindowList_destructor(lua_State *) { --- 3838,3841 ---- *************** *** 3907,3915 **** // Map Lua Class Methods to C Binding Functions WXLUAMETHOD wxWindowList_methods[] = { - { LuaMethod, "Clear", wxLua_wxWindowList_Clear, 0, 0, s_wxluaargArray_None }, - { LuaMethod, "DeleteContents", wxLua_wxWindowList_DeleteContents, 1, 1, s_wxluatagArray_wxLua_wxWindowList_DeleteContents }, - { LuaMethod, "DeleteObject", wxLua_wxWindowList_DeleteObject, 1, 1, s_wxluatagArray_wxLua_wxWindowList_DeleteObject }, - { LuaMethod, "GetCount", wxLua_wxWindowList_GetCount, 0, 0, s_wxluaargArray_None }, - { LuaGetProp, "Count", wxLua_wxWindowList_GetCount, 0, 0, s_wxluaargArray_None }, { LuaDelete, "wxWindowList", wxLua_wxWindowList_destructor, 0, 0, s_wxluaargArray_None }, }; --- 3847,3850 ---- Index: wx_bind.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/src/wx_bind.cpp,v retrieving revision 1.73 retrieving revision 1.74 diff -C2 -d -r1.73 -r1.74 *** wx_bind.cpp 7 Feb 2007 18:39:11 -0000 1.73 --- wx_bind.cpp 9 Feb 2007 05:17:10 -0000 1.74 *************** *** 6222,6226 **** #if wxLUA_USE_wxWindowList ! { "wxWindowList", wxWindowList_methods, wxWindowList_methodCount, -1, NULL, &s_wxluatag_wxWindowList, NULL }, #endif // wxLUA_USE_wxWindowList --- 6222,6226 ---- #if wxLUA_USE_wxWindowList ! { "wxWindowList", wxWindowList_methods, wxWindowList_methodCount, -1, NULL, &s_wxluatag_wxWindowList, "wxList" }, #endif // wxLUA_USE_wxWindowList |