From: John L. <jr...@us...> - 2006-05-26 20:22:25
|
Update of /cvsroot/wxlua/wxLua/bindings/wxwidgets In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv10865/wxLua/bindings/wxwidgets Modified Files: controls.i data.i override.hpp wx_datatypes.lua Log Message: add wxArrayTreeItemIds and hack for wxTreeItemIdValue Index: wx_datatypes.lua =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxwidgets/wx_datatypes.lua,v retrieving revision 1.33 retrieving revision 1.34 diff -C2 -d -r1.33 -r1.34 *** wx_datatypes.lua 25 May 2006 22:50:05 -0000 1.33 --- wx_datatypes.lua 26 May 2006 20:22:09 -0000 1.34 *************** *** 223,226 **** --- 223,232 ---- Name = "wxArrayString_FromLuaTable", }, + wxArrayTreeItemIds = { + Condition = "wxLUA_USE_wxTreeCtrl", + DefType = "class", + Intrinsic = false, + Name = "wxArrayTreeItemIds", + }, wxArtProvider = { BaseClass = "wxObject", *************** *** 2916,2922 **** }, wxTreeItemIdValue = { ! Condition = "(wxCHECK_VERSION(2,5,0)) && (wxLUA_USE_wxTreeCtrl)", ! DefType = "class", ! Intrinsic = false, Name = "wxTreeItemIdValue", }, --- 2922,2928 ---- }, wxTreeItemIdValue = { ! Condition = "wxLUA_USE_wxTreeCtrl", ! DefType = "enum", ! Intrinsic = true, Name = "wxTreeItemIdValue", }, Index: data.i =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxwidgets/data.i,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** data.i 26 May 2006 03:19:51 -0000 1.17 --- data.i 26 May 2006 20:22:09 -0000 1.18 *************** *** 248,255 **** --- 248,257 ---- //%class %noclassinfo wxArray // // no constructor since this class doesn't exist + // void Add(T &item, size_t copies = 1) // void Alloc(size_t count) // void Clear() // void Empty() // int GetCount() const + // void Insert(T &item, size_t n, size_t copies = 1) // bool IsEmpty() const // void RemoveAt(size_t index, size_t count = 1) Index: override.hpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxwidgets/override.hpp,v retrieving revision 1.48 retrieving revision 1.49 diff -C2 -d -r1.48 -r1.49 *** override.hpp 26 May 2006 03:19:51 -0000 1.48 --- override.hpp 26 May 2006 20:22:09 -0000 1.49 *************** *** 858,862 **** wxlState.PushUserDataType(s_wxluatag_wxTreeItemId, returns); #if wxCHECK_VERSION(2, 5, 0) ! wxlState.PushUserDataType(s_wxluatag_wxTreeItemIdValue, cookie); #else // push the cookie --- 858,862 ---- wxlState.PushUserDataType(s_wxluatag_wxTreeItemId, returns); #if wxCHECK_VERSION(2, 5, 0) ! lua_pushnumber(L, (long)cookie); // wxTreeItemIdValue is void* #else // push the cookie *************** *** 876,880 **** #if wxCHECK_VERSION(2, 5, 0) ! wxTreeItemIdValue cookie = (wxTreeItemIdValue *)wxlState.GetUserDataType(1, s_wxluatag_wxTreeItemIdValue); #else // long& cookie --- 876,880 ---- #if wxCHECK_VERSION(2, 5, 0) ! wxTreeItemIdValue cookie = (wxTreeItemIdValue)(long)wxlState.GetNumberType(3); #else // long& cookie *************** *** 893,897 **** wxlState.PushUserDataType(s_wxluatag_wxTreeItemId, returns); #if wxCHECK_VERSION(2, 5, 0) ! wxlState.PushUserDataType(s_wxluatag_wxTreeItemIdValue, cookie); #else // push the cookie --- 893,897 ---- wxlState.PushUserDataType(s_wxluatag_wxTreeItemId, returns); #if wxCHECK_VERSION(2, 5, 0) ! lua_pushnumber(L, (long)cookie); #else // push the cookie Index: controls.i =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxwidgets/controls.i,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** controls.i 26 May 2006 03:19:51 -0000 1.21 --- controls.i 26 May 2006 20:22:09 -0000 1.22 *************** *** 1178,1189 **** // wxTreeItemIdValue - wxTreeCtrl ! %if %wxchkver25 ! %class %noclassinfo wxTreeItemIdValue ! %endclass ! %endif //----------------------------------------------------------------------------- // wxTreeItemId - wxTreeCtrl %class %delete %noclassinfo %encapsulate wxTreeItemId %overload wxTreeItemId() --- 1178,1194 ---- // wxTreeItemIdValue - wxTreeCtrl ! //%if %wxchkver25 ! //%class %noclassinfo wxTreeItemIdValue ! //%endclass ! //%endif //----------------------------------------------------------------------------- // wxTreeItemId - wxTreeCtrl + %enum wxTreeItemIdValue + // FAKE enum, actually typedef void* wxTreeItemIdValue + // but lua only uses double. This gets around compiler errors/warnings + %endenum + %class %delete %noclassinfo %encapsulate wxTreeItemId %overload wxTreeItemId() *************** *** 1191,1195 **** bool IsOk() ! long GetValue() const // get a pointer to the internal data to use as a reference in a lua table %operator wxTreeItemId& operator=(const wxTreeItemId& otherId) --- 1196,1200 ---- bool IsOk() ! wxTreeItemIdValue GetValue() const // get a pointer to the internal data to use as a reference in a lua table %operator wxTreeItemId& operator=(const wxTreeItemId& otherId) *************** *** 1200,1203 **** --- 1205,1237 ---- //----------------------------------------------------------------------------- + // wxArrayTreeItemIds - wxTreeCtrl + // Note: This is actually an array of the internal wxTreeItemIdValue data + // which is a void* pointer. This is why we use long. + // See wxLua's wxTreeItemId::GetValue() function + + %class %delete %noclassinfo %encapsulate wxArrayTreeItemIds + %overload wxArrayTreeItemIds() + %overload %constructor wxArrayTreeItemIdsCopy(const wxArrayTreeItemIds& array) + //%overload %constructor wxArrayStringFromTable(const wxArrayString_FromLuaTable& array) + + // %override [lua table] wxArrayString::ToLuaTable() const + //int ToLuaTable() const + + void Add(const wxTreeItemId& id) + void Alloc(size_t nCount) + void Clear() + void Empty() + int GetCount() const + int Index(wxTreeItemIdValue treeItemIdValue, bool bFromEnd = false) + //void Insert(wxTreeItemId& str, int nIndex, size_t copies = 1) + bool IsEmpty() + wxTreeItemId Item(size_t nIndex) const + wxTreeItemId Last() + void Remove(wxTreeItemIdValue treeItemIdValue) + void RemoveAt(size_t nIndex, size_t count = 1) + void Shrink() + %endclass + + //----------------------------------------------------------------------------- // wxTreeItemData - wxTreeCtrl, see also wxLuaTreeItemData |