From: John L. <jr...@us...> - 2008-12-13 22:35:57
|
Update of /cvsroot/wxlua/wxLua/modules/wxbind/src In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv25876/wxLua/modules/wxbind/src Modified Files: wxadv_bind.cpp Log Message: Fix genwxbind.bat to do wxluacan bindings correctly. Add wxGridCellCoordsArray to bindings and functions for wxGrid to get selected cells. Cleanup bindings.wx.lua to not make you have to click to show overloaded functions, just show them inline. Index: wxadv_bind.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/src/wxadv_bind.cpp,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** wxadv_bind.cpp 29 Oct 2008 04:44:33 -0000 1.15 --- wxadv_bind.cpp 13 Dec 2008 22:35:52 -0000 1.16 *************** *** 10105,10108 **** --- 10105,10124 ---- } + static wxLuaArgType s_wxluatypeArray_wxLua_wxGridCellCoords_op_not[] = { &wxluatype_wxGridCellCoords, NULL }; + static int LUACALL wxLua_wxGridCellCoords_op_not(lua_State *L); + static wxLuaBindCFunc s_wxluafunc_wxLua_wxGridCellCoords_op_not[1] = {{ wxLua_wxGridCellCoords_op_not, WXLUAMETHOD_METHOD, 1, 1, s_wxluatypeArray_wxLua_wxGridCellCoords_op_not }}; + // %operator bool operator!() const + static int LUACALL wxLua_wxGridCellCoords_op_not(lua_State *L) + { + // get this + wxGridCellCoords * self = (wxGridCellCoords *)wxluaT_getuserdatatype(L, 1, wxluatype_wxGridCellCoords); + // call op_not + bool returns = (!(*self)); + // push the result flag + lua_pushboolean(L, returns); + + return 1; + } + static wxLuaArgType s_wxluatypeArray_wxLua_wxGridCellCoords_op_set[] = { &wxluatype_wxGridCellCoords, &wxluatype_wxGridCellCoords, NULL }; static int LUACALL wxLua_wxGridCellCoords_op_set(lua_State *L); *************** *** 10158,10161 **** --- 10174,10178 ---- { "delete", WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, s_wxluafunc_wxLua_wxGridCellCoords_delete, 1, NULL }, { "op_eq", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxGridCellCoords_op_eq, 1, NULL }, + { "op_not", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxGridCellCoords_op_not, 1, NULL }, { "op_set", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxGridCellCoords_op_set, 1, NULL }, { "wxGridCellCoords", WXLUAMETHOD_CONSTRUCTOR, s_wxluafunc_wxLua_wxGridCellCoords_constructor, 1, NULL }, *************** *** 10171,10174 **** --- 10188,10447 ---- #if wxLUA_USE_wxGrid && wxUSE_GRID // --------------------------------------------------------------------------- + // Bind class wxGridCellCoordsArray + // --------------------------------------------------------------------------- + + // Lua MetaTable Tag for Class 'wxGridCellCoordsArray' + int wxluatype_wxGridCellCoordsArray = WXLUA_TUNKNOWN; + + static wxLuaArgType s_wxluatypeArray_wxLua_wxGridCellCoordsArray_Add[] = { &wxluatype_wxGridCellCoordsArray, &wxluatype_wxGridCellCoords, NULL }; + static int LUACALL wxLua_wxGridCellCoordsArray_Add(lua_State *L); + static wxLuaBindCFunc s_wxluafunc_wxLua_wxGridCellCoordsArray_Add[1] = {{ wxLua_wxGridCellCoordsArray_Add, WXLUAMETHOD_METHOD, 2, 2, s_wxluatypeArray_wxLua_wxGridCellCoordsArray_Add }}; + // void Add( const wxGridCellCoords& c ) + static int LUACALL wxLua_wxGridCellCoordsArray_Add(lua_State *L) + { + // const wxGridCellCoords c + const wxGridCellCoords * c = (const wxGridCellCoords *)wxluaT_getuserdatatype(L, 2, wxluatype_wxGridCellCoords); + // get this + wxGridCellCoordsArray * self = (wxGridCellCoordsArray *)wxluaT_getuserdatatype(L, 1, wxluatype_wxGridCellCoordsArray); + // call Add + self->Add(*c); + + return 0; + } + + static wxLuaArgType s_wxluatypeArray_wxLua_wxGridCellCoordsArray_Alloc[] = { &wxluatype_wxGridCellCoordsArray, &wxluatype_TNUMBER, NULL }; + static int LUACALL wxLua_wxGridCellCoordsArray_Alloc(lua_State *L); + static wxLuaBindCFunc s_wxluafunc_wxLua_wxGridCellCoordsArray_Alloc[1] = {{ wxLua_wxGridCellCoordsArray_Alloc, WXLUAMETHOD_METHOD, 2, 2, s_wxluatypeArray_wxLua_wxGridCellCoordsArray_Alloc }}; + // void Alloc(size_t count) + static int LUACALL wxLua_wxGridCellCoordsArray_Alloc(lua_State *L) + { + // size_t count + size_t count = (size_t)wxlua_getnumbertype(L, 2); + // get this + wxGridCellCoordsArray * self = (wxGridCellCoordsArray *)wxluaT_getuserdatatype(L, 1, wxluatype_wxGridCellCoordsArray); + // call Alloc + self->Alloc(count); + + return 0; + } + + static wxLuaArgType s_wxluatypeArray_wxLua_wxGridCellCoordsArray_Clear[] = { &wxluatype_wxGridCellCoordsArray, NULL }; + static int LUACALL wxLua_wxGridCellCoordsArray_Clear(lua_State *L); + static wxLuaBindCFunc s_wxluafunc_wxLua_wxGridCellCoordsArray_Clear[1] = {{ wxLua_wxGridCellCoordsArray_Clear, WXLUAMETHOD_METHOD, 1, 1, s_wxluatypeArray_wxLua_wxGridCellCoordsArray_Clear }}; + // void Clear() + static int LUACALL wxLua_wxGridCellCoordsArray_Clear(lua_State *L) + { + // get this + wxGridCellCoordsArray * self = (wxGridCellCoordsArray *)wxluaT_getuserdatatype(L, 1, wxluatype_wxGridCellCoordsArray); + // call Clear + self->Clear(); + + return 0; + } + + static wxLuaArgType s_wxluatypeArray_wxLua_wxGridCellCoordsArray_GetCount[] = { &wxluatype_wxGridCellCoordsArray, NULL }; + static int LUACALL wxLua_wxGridCellCoordsArray_GetCount(lua_State *L); + static wxLuaBindCFunc s_wxluafunc_wxLua_wxGridCellCoordsArray_GetCount[1] = {{ wxLua_wxGridCellCoordsArray_GetCount, WXLUAMETHOD_METHOD, 1, 1, s_wxluatypeArray_wxLua_wxGridCellCoordsArray_GetCount }}; + // int GetCount() const + static int LUACALL wxLua_wxGridCellCoordsArray_GetCount(lua_State *L) + { + // get this + wxGridCellCoordsArray * self = (wxGridCellCoordsArray *)wxluaT_getuserdatatype(L, 1, wxluatype_wxGridCellCoordsArray); + // call GetCount + int returns = (self->GetCount()); + // push the result number + lua_pushnumber(L, returns); + + return 1; + } + + static wxLuaArgType s_wxluatypeArray_wxLua_wxGridCellCoordsArray_Insert[] = { &wxluatype_wxGridCellCoordsArray, &wxluatype_wxGridCellCoords, &wxluatype_TNUMBER, &wxluatype_TNUMBER, NULL }; + static int LUACALL wxLua_wxGridCellCoordsArray_Insert(lua_State *L); + static wxLuaBindCFunc s_wxluafunc_wxLua_wxGridCellCoordsArray_Insert[1] = {{ wxLua_wxGridCellCoordsArray_Insert, WXLUAMETHOD_METHOD, 3, 4, s_wxluatypeArray_wxLua_wxGridCellCoordsArray_Insert }}; + // void Insert( const wxGridCellCoords& c, int n, int copies = 1 ) + static int LUACALL wxLua_wxGridCellCoordsArray_Insert(lua_State *L) + { + // get number of arguments + int argCount = lua_gettop(L); + // int copies = 1 + int copies = (argCount >= 4 ? (int)wxlua_getnumbertype(L, 4) : 1); + // int n + int n = (int)wxlua_getnumbertype(L, 3); + // const wxGridCellCoords c + const wxGridCellCoords * c = (const wxGridCellCoords *)wxluaT_getuserdatatype(L, 2, wxluatype_wxGridCellCoords); + // get this + wxGridCellCoordsArray * self = (wxGridCellCoordsArray *)wxluaT_getuserdatatype(L, 1, wxluatype_wxGridCellCoordsArray); + // call Insert + self->Insert(*c, n, copies); + + return 0; + } + + static wxLuaArgType s_wxluatypeArray_wxLua_wxGridCellCoordsArray_IsEmpty[] = { &wxluatype_wxGridCellCoordsArray, NULL }; + static int LUACALL wxLua_wxGridCellCoordsArray_IsEmpty(lua_State *L); + static wxLuaBindCFunc s_wxluafunc_wxLua_wxGridCellCoordsArray_IsEmpty[1] = {{ wxLua_wxGridCellCoordsArray_IsEmpty, WXLUAMETHOD_METHOD, 1, 1, s_wxluatypeArray_wxLua_wxGridCellCoordsArray_IsEmpty }}; + // bool IsEmpty() const + static int LUACALL wxLua_wxGridCellCoordsArray_IsEmpty(lua_State *L) + { + // get this + wxGridCellCoordsArray * self = (wxGridCellCoordsArray *)wxluaT_getuserdatatype(L, 1, wxluatype_wxGridCellCoordsArray); + // call IsEmpty + bool returns = (self->IsEmpty()); + // push the result flag + lua_pushboolean(L, returns); + + return 1; + } + + static wxLuaArgType s_wxluatypeArray_wxLua_wxGridCellCoordsArray_Item[] = { &wxluatype_wxGridCellCoordsArray, &wxluatype_TNUMBER, NULL }; + static int LUACALL wxLua_wxGridCellCoordsArray_Item(lua_State *L); + static wxLuaBindCFunc s_wxluafunc_wxLua_wxGridCellCoordsArray_Item[1] = {{ wxLua_wxGridCellCoordsArray_Item, WXLUAMETHOD_METHOD, 2, 2, s_wxluatypeArray_wxLua_wxGridCellCoordsArray_Item }}; + // wxGridCellCoords Item( int n ) + static int LUACALL wxLua_wxGridCellCoordsArray_Item(lua_State *L) + { + // int n + int n = (int)wxlua_getnumbertype(L, 2); + // get this + wxGridCellCoordsArray * self = (wxGridCellCoordsArray *)wxluaT_getuserdatatype(L, 1, wxluatype_wxGridCellCoordsArray); + // call Item + // allocate a new object using the copy constructor + wxGridCellCoords* returns = new wxGridCellCoords(self->Item(n)); + // add the new object to the tracked memory list + wxluaO_addgcobject(L, (void*)returns, new wxLua_wxObject_wxGridCellCoords((wxGridCellCoords*)returns)); + // push the result datatype + wxluaT_pushuserdatatype(L, returns, wxluatype_wxGridCellCoords); + + return 1; + } + + static wxLuaArgType s_wxluatypeArray_wxLua_wxGridCellCoordsArray_RemoveAt[] = { &wxluatype_wxGridCellCoordsArray, &wxluatype_TNUMBER, NULL }; + static int LUACALL wxLua_wxGridCellCoordsArray_RemoveAt(lua_State *L); + static wxLuaBindCFunc s_wxluafunc_wxLua_wxGridCellCoordsArray_RemoveAt[1] = {{ wxLua_wxGridCellCoordsArray_RemoveAt, WXLUAMETHOD_METHOD, 2, 2, s_wxluatypeArray_wxLua_wxGridCellCoordsArray_RemoveAt }}; + // void RemoveAt(size_t index) + static int LUACALL wxLua_wxGridCellCoordsArray_RemoveAt(lua_State *L) + { + // size_t index + size_t index = (size_t)wxlua_getnumbertype(L, 2); + // get this + wxGridCellCoordsArray * self = (wxGridCellCoordsArray *)wxluaT_getuserdatatype(L, 1, wxluatype_wxGridCellCoordsArray); + // call RemoveAt + self->RemoveAt(index); + + return 0; + } + + static wxLuaArgType s_wxluatypeArray_wxLua_wxGridCellCoordsArray_Shrink[] = { &wxluatype_wxGridCellCoordsArray, NULL }; + static int LUACALL wxLua_wxGridCellCoordsArray_Shrink(lua_State *L); + static wxLuaBindCFunc s_wxluafunc_wxLua_wxGridCellCoordsArray_Shrink[1] = {{ wxLua_wxGridCellCoordsArray_Shrink, WXLUAMETHOD_METHOD, 1, 1, s_wxluatypeArray_wxLua_wxGridCellCoordsArray_Shrink }}; + // void Shrink() + static int LUACALL wxLua_wxGridCellCoordsArray_Shrink(lua_State *L) + { + // get this + wxGridCellCoordsArray * self = (wxGridCellCoordsArray *)wxluaT_getuserdatatype(L, 1, wxluatype_wxGridCellCoordsArray); + // call Shrink + self->Shrink(); + + return 0; + } + + static wxLuaArgType s_wxluatypeArray_wxLua_wxGridCellCoordsArray_delete[] = { &wxluatype_wxGridCellCoordsArray, NULL }; + static wxLuaBindCFunc s_wxluafunc_wxLua_wxGridCellCoordsArray_delete[1] = {{ wxlua_userdata_delete, WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, 1, 1, s_wxluatypeArray_wxLua_wxGridCellCoordsArray_delete }}; + + static wxLuaArgType s_wxluatypeArray_wxLua_wxGridCellCoordsArray_op_index[] = { &wxluatype_wxGridCellCoordsArray, &wxluatype_TNUMBER, NULL }; + static int LUACALL wxLua_wxGridCellCoordsArray_op_index(lua_State *L); + static wxLuaBindCFunc s_wxluafunc_wxLua_wxGridCellCoordsArray_op_index[1] = {{ wxLua_wxGridCellCoordsArray_op_index, WXLUAMETHOD_METHOD, 2, 2, s_wxluatypeArray_wxLua_wxGridCellCoordsArray_op_index }}; + // %operator wxGridCellCoords operator[](size_t nIndex) + static int LUACALL wxLua_wxGridCellCoordsArray_op_index(lua_State *L) + { + // size_t nIndex + size_t nIndex = (size_t)wxlua_getnumbertype(L, 2); + // get this + wxGridCellCoordsArray * self = (wxGridCellCoordsArray *)wxluaT_getuserdatatype(L, 1, wxluatype_wxGridCellCoordsArray); + // call op_index + // allocate a new object using the copy constructor + wxGridCellCoords* returns = new wxGridCellCoords((*self)[(nIndex)]); + // add the new object to the tracked memory list + wxluaO_addgcobject(L, (void*)returns, new wxLua_wxObject_wxGridCellCoords((wxGridCellCoords*)returns)); + // push the result datatype + wxluaT_pushuserdatatype(L, returns, wxluatype_wxGridCellCoords); + + return 1; + } + + static wxLuaArgType s_wxluatypeArray_wxLua_wxGridCellCoordsArray_constructor1[] = { &wxluatype_wxGridCellCoordsArray, NULL }; + static int LUACALL wxLua_wxGridCellCoordsArray_constructor1(lua_State *L); + // static wxLuaBindCFunc s_wxluafunc_wxLua_wxGridCellCoordsArray_constructor1[1] = {{ wxLua_wxGridCellCoordsArray_constructor1, WXLUAMETHOD_CONSTRUCTOR, 1, 1, s_wxluatypeArray_wxLua_wxGridCellCoordsArray_constructor1 }}; + // wxGridCellCoordsArray(const wxGridCellCoordsArray& array) + static int LUACALL wxLua_wxGridCellCoordsArray_constructor1(lua_State *L) + { + // const wxGridCellCoordsArray array + const wxGridCellCoordsArray * array = (const wxGridCellCoordsArray *)wxluaT_getuserdatatype(L, 1, wxluatype_wxGridCellCoordsArray); + // call constructor + wxGridCellCoordsArray* returns = new wxGridCellCoordsArray(*array); + // add to tracked memory list + wxluaO_addgcobject(L, (void*)returns, new wxLua_wxObject_wxGridCellCoordsArray((wxGridCellCoordsArray*)returns)); + // push the constructed class pointer + wxluaT_pushuserdatatype(L, returns, wxluatype_wxGridCellCoordsArray); + + return 1; + } + + static int LUACALL wxLua_wxGridCellCoordsArray_constructor(lua_State *L); + // static wxLuaBindCFunc s_wxluafunc_wxLua_wxGridCellCoordsArray_constructor[1] = {{ wxLua_wxGridCellCoordsArray_constructor, WXLUAMETHOD_CONSTRUCTOR, 0, 0, g_wxluaargtypeArray_None }}; + // wxGridCellCoordsArray() + static int LUACALL wxLua_wxGridCellCoordsArray_constructor(lua_State *L) + { + // call constructor + wxGridCellCoordsArray* returns = new wxGridCellCoordsArray(); + // add to tracked memory list + wxluaO_addgcobject(L, (void*)returns, new wxLua_wxObject_wxGridCellCoordsArray((wxGridCellCoordsArray*)returns)); + // push the constructed class pointer + wxluaT_pushuserdatatype(L, returns, wxluatype_wxGridCellCoordsArray); + + return 1; + } + + + + + #if (wxLUA_USE_wxGrid && wxUSE_GRID) + // function overload table + static wxLuaBindCFunc s_wxluafunc_wxLua_wxGridCellCoordsArray_constructor_overload[] = + { + { wxLua_wxGridCellCoordsArray_constructor1, WXLUAMETHOD_CONSTRUCTOR, 1, 1, s_wxluatypeArray_wxLua_wxGridCellCoordsArray_constructor1 }, + { wxLua_wxGridCellCoordsArray_constructor, WXLUAMETHOD_CONSTRUCTOR, 0, 0, g_wxluaargtypeArray_None }, + }; + static int s_wxluafunc_wxLua_wxGridCellCoordsArray_constructor_overload_count = sizeof(s_wxluafunc_wxLua_wxGridCellCoordsArray_constructor_overload)/sizeof(wxLuaBindCFunc); + + #endif // (wxLUA_USE_wxGrid && wxUSE_GRID) + + // Map Lua Class Methods to C Binding Functions + wxLuaBindMethod wxGridCellCoordsArray_methods[] = { + { "Add", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxGridCellCoordsArray_Add, 1, NULL }, + { "Alloc", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxGridCellCoordsArray_Alloc, 1, NULL }, + { "Clear", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxGridCellCoordsArray_Clear, 1, NULL }, + { "GetCount", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxGridCellCoordsArray_GetCount, 1, NULL }, + { "Insert", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxGridCellCoordsArray_Insert, 1, NULL }, + { "IsEmpty", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxGridCellCoordsArray_IsEmpty, 1, NULL }, + { "Item", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxGridCellCoordsArray_Item, 1, NULL }, + { "RemoveAt", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxGridCellCoordsArray_RemoveAt, 1, NULL }, + { "Shrink", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxGridCellCoordsArray_Shrink, 1, NULL }, + { "delete", WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, s_wxluafunc_wxLua_wxGridCellCoordsArray_delete, 1, NULL }, + { "op_index", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxGridCellCoordsArray_op_index, 1, NULL }, + + #if (wxLUA_USE_wxGrid && wxUSE_GRID) + { "wxGridCellCoordsArray", WXLUAMETHOD_CONSTRUCTOR, s_wxluafunc_wxLua_wxGridCellCoordsArray_constructor_overload, s_wxluafunc_wxLua_wxGridCellCoordsArray_constructor_overload_count, 0 }, + #endif // (wxLUA_USE_wxGrid && wxUSE_GRID) + + { 0, 0, 0, 0 }, + }; + + int wxGridCellCoordsArray_methodCount = sizeof(wxGridCellCoordsArray_methods)/sizeof(wxLuaBindMethod) - 1; + + #endif // wxLUA_USE_wxGrid && wxUSE_GRID + + + #if wxLUA_USE_wxGrid && wxUSE_GRID + // --------------------------------------------------------------------------- // Bind class wxGrid // --------------------------------------------------------------------------- *************** *** 11885,11888 **** --- 12158,12221 ---- } + static wxLuaArgType s_wxluatypeArray_wxLua_wxGrid_GetSelectedCells[] = { &wxluatype_wxGrid, NULL }; + static int LUACALL wxLua_wxGrid_GetSelectedCells(lua_State *L); + static wxLuaBindCFunc s_wxluafunc_wxLua_wxGrid_GetSelectedCells[1] = {{ wxLua_wxGrid_GetSelectedCells, WXLUAMETHOD_METHOD, 1, 1, s_wxluatypeArray_wxLua_wxGrid_GetSelectedCells }}; + // wxGridCellCoordsArray GetSelectedCells() const + static int LUACALL wxLua_wxGrid_GetSelectedCells(lua_State *L) + { + // get this + wxGrid * self = (wxGrid *)wxluaT_getuserdatatype(L, 1, wxluatype_wxGrid); + // call GetSelectedCells + // allocate a new object using the copy constructor + wxGridCellCoordsArray* returns = new wxGridCellCoordsArray(self->GetSelectedCells()); + // add the new object to the tracked memory list + wxluaO_addgcobject(L, (void*)returns, new wxLua_wxObject_wxGridCellCoordsArray((wxGridCellCoordsArray*)returns)); + // push the result datatype + wxluaT_pushuserdatatype(L, returns, wxluatype_wxGridCellCoordsArray); + + return 1; + } + + + #if (wxLUA_USE_wxArrayInt) && (wxLUA_USE_wxGrid && wxUSE_GRID) + static wxLuaArgType s_wxluatypeArray_wxLua_wxGrid_GetSelectedCols[] = { &wxluatype_wxGrid, NULL }; + static int LUACALL wxLua_wxGrid_GetSelectedCols(lua_State *L); + static wxLuaBindCFunc s_wxluafunc_wxLua_wxGrid_GetSelectedCols[1] = {{ wxLua_wxGrid_GetSelectedCols, WXLUAMETHOD_METHOD, 1, 1, s_wxluatypeArray_wxLua_wxGrid_GetSelectedCols }}; + // wxArrayInt GetSelectedCols() const + static int LUACALL wxLua_wxGrid_GetSelectedCols(lua_State *L) + { + // get this + wxGrid * self = (wxGrid *)wxluaT_getuserdatatype(L, 1, wxluatype_wxGrid); + // call GetSelectedCols + // allocate a new object using the copy constructor + wxArrayInt* returns = new wxArrayInt(self->GetSelectedCols()); + // add the new object to the tracked memory list + wxluaO_addgcobject(L, (void*)returns, new wxLua_wxObject_wxArrayInt((wxArrayInt*)returns)); + // push the result datatype + wxluaT_pushuserdatatype(L, returns, wxluatype_wxArrayInt); + + return 1; + } + + static wxLuaArgType s_wxluatypeArray_wxLua_wxGrid_GetSelectedRows[] = { &wxluatype_wxGrid, NULL }; + static int LUACALL wxLua_wxGrid_GetSelectedRows(lua_State *L); + static wxLuaBindCFunc s_wxluafunc_wxLua_wxGrid_GetSelectedRows[1] = {{ wxLua_wxGrid_GetSelectedRows, WXLUAMETHOD_METHOD, 1, 1, s_wxluatypeArray_wxLua_wxGrid_GetSelectedRows }}; + // wxArrayInt GetSelectedRows() const + static int LUACALL wxLua_wxGrid_GetSelectedRows(lua_State *L) + { + // get this + wxGrid * self = (wxGrid *)wxluaT_getuserdatatype(L, 1, wxluatype_wxGrid); + // call GetSelectedRows + // allocate a new object using the copy constructor + wxArrayInt* returns = new wxArrayInt(self->GetSelectedRows()); + // add the new object to the tracked memory list + wxluaO_addgcobject(L, (void*)returns, new wxLua_wxObject_wxArrayInt((wxArrayInt*)returns)); + // push the result datatype + wxluaT_pushuserdatatype(L, returns, wxluatype_wxArrayInt); + + return 1; + } + + #endif // (wxLUA_USE_wxArrayInt) && (wxLUA_USE_wxGrid && wxUSE_GRID) #if (wxLUA_USE_wxColourPenBrush) && (wxLUA_USE_wxGrid && wxUSE_GRID) *************** *** 11906,11909 **** --- 12239,12284 ---- } + #endif // (wxLUA_USE_wxColourPenBrush) && (wxLUA_USE_wxGrid && wxUSE_GRID) + + static wxLuaArgType s_wxluatypeArray_wxLua_wxGrid_GetSelectionBlockBottomRight[] = { &wxluatype_wxGrid, NULL }; + static int LUACALL wxLua_wxGrid_GetSelectionBlockBottomRight(lua_State *L); + static wxLuaBindCFunc s_wxluafunc_wxLua_wxGrid_GetSelectionBlockBottomRight[1] = {{ wxLua_wxGrid_GetSelectionBlockBottomRight, WXLUAMETHOD_METHOD, 1, 1, s_wxluatypeArray_wxLua_wxGrid_GetSelectionBlockBottomRight }}; + // wxGridCellCoordsArray GetSelectionBlockBottomRight() const + static int LUACALL wxLua_wxGrid_GetSelectionBlockBottomRight(lua_State *L) + { + // get this + wxGrid * self = (wxGrid *)wxluaT_getuserdatatype(L, 1, wxluatype_wxGrid); + // call GetSelectionBlockBottomRight + // allocate a new object using the copy constructor + wxGridCellCoordsArray* returns = new wxGridCellCoordsArray(self->GetSelectionBlockBottomRight()); + // add the new object to the tracked memory list + wxluaO_addgcobject(L, (void*)returns, new wxLua_wxObject_wxGridCellCoordsArray((wxGridCellCoordsArray*)returns)); + // push the result datatype + wxluaT_pushuserdatatype(L, returns, wxluatype_wxGridCellCoordsArray); + + return 1; + } + + static wxLuaArgType s_wxluatypeArray_wxLua_wxGrid_GetSelectionBlockTopLeft[] = { &wxluatype_wxGrid, NULL }; + static int LUACALL wxLua_wxGrid_GetSelectionBlockTopLeft(lua_State *L); + static wxLuaBindCFunc s_wxluafunc_wxLua_wxGrid_GetSelectionBlockTopLeft[1] = {{ wxLua_wxGrid_GetSelectionBlockTopLeft, WXLUAMETHOD_METHOD, 1, 1, s_wxluatypeArray_wxLua_wxGrid_GetSelectionBlockTopLeft }}; + // wxGridCellCoordsArray GetSelectionBlockTopLeft() const + static int LUACALL wxLua_wxGrid_GetSelectionBlockTopLeft(lua_State *L) + { + // get this + wxGrid * self = (wxGrid *)wxluaT_getuserdatatype(L, 1, wxluatype_wxGrid); + // call GetSelectionBlockTopLeft + // allocate a new object using the copy constructor + wxGridCellCoordsArray* returns = new wxGridCellCoordsArray(self->GetSelectionBlockTopLeft()); + // add the new object to the tracked memory list + wxluaO_addgcobject(L, (void*)returns, new wxLua_wxObject_wxGridCellCoordsArray((wxGridCellCoordsArray*)returns)); + // push the result datatype + wxluaT_pushuserdatatype(L, returns, wxluatype_wxGridCellCoordsArray); + + return 1; + } + + + #if (wxLUA_USE_wxColourPenBrush) && (wxLUA_USE_wxGrid && wxUSE_GRID) static wxLuaArgType s_wxluatypeArray_wxLua_wxGrid_GetSelectionForeground[] = { &wxluatype_wxGrid, NULL }; static int LUACALL wxLua_wxGrid_GetSelectionForeground(lua_State *L); *************** *** 13816,13822 **** --- 14191,14209 ---- { "GetRowMinimalAcceptableHeight", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxGrid_GetRowMinimalAcceptableHeight, 1, NULL }, { "GetRowSize", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxGrid_GetRowSize, 1, NULL }, + { "GetSelectedCells", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxGrid_GetSelectedCells, 1, NULL }, + + #if (wxLUA_USE_wxArrayInt) && (wxLUA_USE_wxGrid && wxUSE_GRID) + { "GetSelectedCols", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxGrid_GetSelectedCols, 1, NULL }, + { "GetSelectedRows", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxGrid_GetSelectedRows, 1, NULL }, + #endif // (wxLUA_USE_wxArrayInt) && (wxLUA_USE_wxGrid && wxUSE_GRID) #if (wxLUA_USE_wxColourPenBrush) && (wxLUA_USE_wxGrid && wxUSE_GRID) { "GetSelectionBackground", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxGrid_GetSelectionBackground, 1, NULL }, + #endif // (wxLUA_USE_wxColourPenBrush) && (wxLUA_USE_wxGrid && wxUSE_GRID) + + { "GetSelectionBlockBottomRight", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxGrid_GetSelectionBlockBottomRight, 1, NULL }, + { "GetSelectionBlockTopLeft", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxGrid_GetSelectionBlockTopLeft, 1, NULL }, + + #if (wxLUA_USE_wxColourPenBrush) && (wxLUA_USE_wxGrid && wxUSE_GRID) { "GetSelectionForeground", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxGrid_GetSelectionForeground, 1, NULL }, #endif // (wxLUA_USE_wxColourPenBrush) && (wxLUA_USE_wxGrid && wxUSE_GRID) *************** *** 14971,14974 **** --- 15358,15365 ---- #endif // wxLUA_USE_wxGrid && wxUSE_GRID + #if (wxCHECK_VERSION(2,8,8)) && (wxLUA_USE_wxGrid && wxUSE_GRID) + { "wxGRID_AUTOSIZE", wxGRID_AUTOSIZE }, + #endif // (wxCHECK_VERSION(2,8,8)) && (wxLUA_USE_wxGrid && wxUSE_GRID) + #if wxCHECK_VERSION(2,8,0) && wxUSE_HYPERLINKCTRL && wxLUA_USE_wxHyperlinkCtrl { "wxHL_ALIGN_CENTRE", wxHL_ALIGN_CENTRE }, *************** *** 15075,15079 **** { #if wxLUA_USE_wxGrid && wxUSE_GRID ! { "wxGridNoCellRect", &wxluatype_wxGridCellCoords, &wxGridNoCellRect, NULL }, #endif // wxLUA_USE_wxGrid && wxUSE_GRID --- 15466,15470 ---- { #if wxLUA_USE_wxGrid && wxUSE_GRID ! { "wxGridNoCellCoords", &wxluatype_wxGridCellCoords, &wxGridNoCellCoords, NULL }, #endif // wxLUA_USE_wxGrid && wxUSE_GRID *************** *** 15168,15171 **** --- 15559,15563 ---- { "wxGridCellChoiceEditor", wxGridCellChoiceEditor_methods, wxGridCellChoiceEditor_methodCount, NULL, &wxluatype_wxGridCellChoiceEditor, "wxGridCellEditor", NULL ,g_wxluanumberArray_None, 0, }, { "wxGridCellCoords", wxGridCellCoords_methods, wxGridCellCoords_methodCount, NULL, &wxluatype_wxGridCellCoords, NULL, NULL ,g_wxluanumberArray_None, 0, }, + { "wxGridCellCoordsArray", wxGridCellCoordsArray_methods, wxGridCellCoordsArray_methodCount, NULL, &wxluatype_wxGridCellCoordsArray, NULL, NULL ,g_wxluanumberArray_None, 0, }, { "wxGridCellDateTimeRenderer", wxGridCellDateTimeRenderer_methods, wxGridCellDateTimeRenderer_methodCount, NULL, &wxluatype_wxGridCellDateTimeRenderer, "wxGridCellStringRenderer", NULL ,g_wxluanumberArray_None, 0, }, { "wxGridCellEditor", wxGridCellEditor_methods, wxGridCellEditor_methodCount, NULL, &wxluatype_wxGridCellEditor, "wxGridCellWorker", NULL ,g_wxluanumberArray_None, 0, }, *************** *** 15298,15301 **** --- 15690,15694 ---- wxLUA_IMPLEMENT_wxGridCellWorker_ENCAPSULATION(wxGridCellChoiceEditor, wxGridCellChoiceEditor) wxLUA_IMPLEMENT_ENCAPSULATION(wxGridCellCoords, wxGridCellCoords) + wxLUA_IMPLEMENT_ENCAPSULATION(wxGridCellCoordsArray, wxGridCellCoordsArray) wxLUA_IMPLEMENT_wxGridCellWorker_ENCAPSULATION(wxGridCellDateTimeRenderer, wxGridCellDateTimeRenderer) wxLUA_IMPLEMENT_wxGridCellWorker_ENCAPSULATION(wxGridCellEditor, wxGridCellEditor) |