From: John L. <jr...@us...> - 2007-01-19 04:17:41
|
Update of /cvsroot/wxlua/wxLua/modules/wxbind/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv21977/wxLua/modules/wxbind/src Modified Files: controls.cpp Log Message: add wxControlWithItems GetStringClientObject to get back a wxStringClientData Index: controls.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/src/controls.cpp,v retrieving revision 1.36 retrieving revision 1.37 diff -C2 -d -r1.36 -r1.37 *** controls.cpp 17 Dec 2006 07:47:14 -0000 1.36 --- controls.cpp 19 Jan 2007 04:17:38 -0000 1.37 *************** *** 1001,1004 **** --- 1001,1023 ---- } + static wxLuaArgTag s_wxluatagArray_wxLua_wxControlWithItems_GetStringClientObject[] = { &s_wxluaarg_Number, 0 }; + // %override wxLua_wxControlWithItems_GetStringClientObject + // %rename GetStringClientObject wxStringClientData* GetClientObject(int n) const + static int LUACALL wxLua_wxControlWithItems_GetStringClientObject(lua_State *L) + { + wxLuaState wxlState(L); + wxStringClientData *returns; + // int n + int n = (int)wxlState.GetNumberType(2); + // get this + wxControlWithItems * self = (wxControlWithItems *)wxlState.GetUserDataType(1, s_wxluatag_wxControlWithItems); + // call GetClientObject + returns = (wxStringClientData*)self->GetClientObject(n); + // push the result datatype + wxlState.PushUserDataType(s_wxluatag_wxStringClientData, returns); + + return 1; + } + static wxLuaArgTag s_wxluatagArray_wxLua_wxControlWithItems_GetCount[] = { 0 }; // int GetCount() const *************** *** 1269,1272 **** --- 1288,1292 ---- { LuaMethod, "FindString", wxLua_wxControlWithItems_FindString, 1, 1, s_wxluatagArray_wxLua_wxControlWithItems_FindString }, { LuaMethod, "GetClientObject", wxLua_wxControlWithItems_GetClientObject, 1, 1, s_wxluatagArray_wxLua_wxControlWithItems_GetClientObject }, + { LuaMethod, "GetStringClientObject", wxLua_wxControlWithItems_GetStringClientObject, 1, 1, s_wxluatagArray_wxLua_wxControlWithItems_GetStringClientObject }, { LuaMethod, "GetCount", wxLua_wxControlWithItems_GetCount, 0, 0, s_wxluatagArray_wxLua_wxControlWithItems_GetCount }, { LuaMethod, "GetSelection", wxLua_wxControlWithItems_GetSelection, 0, 0, s_wxluatagArray_wxLua_wxControlWithItems_GetSelection }, |