You can subscribe to this list here.
2005 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(191) |
Jul
(1) |
Aug
(2) |
Sep
|
Oct
|
Nov
(238) |
Dec
(68) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2006 |
Jan
(104) |
Feb
(518) |
Mar
(302) |
Apr
(211) |
May
(311) |
Jun
(55) |
Jul
(6) |
Aug
(35) |
Sep
(76) |
Oct
(50) |
Nov
(37) |
Dec
(340) |
2007 |
Jan
(23) |
Feb
(107) |
Mar
(98) |
Apr
(60) |
May
(136) |
Jun
(371) |
Jul
(175) |
Aug
(74) |
Sep
(3) |
Oct
(2) |
Nov
(53) |
Dec
(129) |
2008 |
Jan
(337) |
Feb
(23) |
Mar
(18) |
Apr
(4) |
May
(3) |
Jun
|
Jul
|
Aug
(4) |
Sep
|
Oct
(33) |
Nov
|
Dec
(26) |
2009 |
Jan
(4) |
Feb
(1) |
Mar
(15) |
Apr
|
May
(35) |
Jun
(11) |
Jul
|
Aug
|
Sep
(19) |
Oct
(26) |
Nov
(11) |
Dec
(11) |
2010 |
Jan
(4) |
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
(8) |
Sep
|
Oct
|
Nov
(8) |
Dec
(7) |
2011 |
Jan
|
Feb
|
Mar
(4) |
Apr
(8) |
May
(5) |
Jun
(8) |
Jul
(1) |
Aug
|
Sep
|
Oct
(5) |
Nov
(13) |
Dec
|
From: John L. <jr...@us...> - 2009-02-21 03:16:38
|
Update of /cvsroot/wxlua/wxLua/samples In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv4972/samples Modified Files: scribble.wx.lua Log Message: better comments Index: scribble.wx.lua =================================================================== RCS file: /cvsroot/wxlua/wxLua/samples/scribble.wx.lua,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -d -r1.25 -r1.26 *** scribble.wx.lua 22 Jan 2008 04:45:39 -0000 1.25 --- scribble.wx.lua 21 Feb 2009 02:05:01 -0000 1.26 *************** *** 315,320 **** -- Create the menubar local fileMenu = wx.wxMenu() ! fileMenu:Append(wx.wxID_NEW, "&New...\tCtrl+N", "Begin a new drawing") ! fileMenu:Append(wx.wxID_OPEN, "&Open...\tCtrl+O", "Open an existing drawing") fileMenu:AppendSeparator() fileMenu:Append(wx.wxID_SAVE, "&Save\tCtrl+S", "Save the drawing lines") --- 315,320 ---- -- Create the menubar local fileMenu = wx.wxMenu() ! fileMenu:Append(wx.wxID_NEW, "&New...\tCtrl+N", "Begin a new drawing") ! fileMenu:Append(wx.wxID_OPEN, "&Open...\tCtrl+O", "Open an existing drawing") fileMenu:AppendSeparator() fileMenu:Append(wx.wxID_SAVE, "&Save\tCtrl+S", "Save the drawing lines") *************** *** 322,331 **** fileMenu:Append(ID_SAVEBITMAP, "Save &bitmap...", "Save the drawing as a bitmap file") fileMenu:AppendSeparator() ! fileMenu:Append(wx.wxID_EXIT, "E&xit\tCtrl+Q", "Quit the program") local editMenu = wx.wxMenu() editMenu:Append(ID_PENCOLOUR, "Set pen &color\tCtrl+R", "Set the color of the pen to draw with") editMenu:Append(ID_PENWIDTH, "Set pen &width\tCtrl+T", "Set width of the pen to draw with") ! -- Styles really only work for long lines, when you change direction the styles -- blur into each other and just look like a solid line. --editMenu:Append(ID_PENSTYLE, "Set &Style\tCtrl+Y", "Set style of the pen to draw with") --- 322,331 ---- fileMenu:Append(ID_SAVEBITMAP, "Save &bitmap...", "Save the drawing as a bitmap file") fileMenu:AppendSeparator() ! fileMenu:Append(wx.wxID_EXIT, "E&xit\tCtrl+Q", "Quit the program") local editMenu = wx.wxMenu() editMenu:Append(ID_PENCOLOUR, "Set pen &color\tCtrl+R", "Set the color of the pen to draw with") editMenu:Append(ID_PENWIDTH, "Set pen &width\tCtrl+T", "Set width of the pen to draw with") ! -- Pen styles really only work for long lines, when you change direction the styles -- blur into each other and just look like a solid line. --editMenu:Append(ID_PENSTYLE, "Set &Style\tCtrl+Y", "Set style of the pen to draw with") *************** *** 347,352 **** -- Create the toolbar toolBar = frame:CreateToolBar(wx.wxNO_BORDER + wx.wxTB_FLAT + wx.wxTB_DOCKABLE) ! -- note: Ususally the bmp size isn't necessary, but the HELP icon is not the right size in MSW local toolBmpSize = toolBar:GetToolBitmapSize() toolBar:AddTool(wx.wxID_NEW, "New", wx.wxArtProvider.GetBitmap(wx.wxART_NORMAL_FILE, wx.wxART_MENU, toolBmpSize), "Create an empty scribble") toolBar:AddTool(wx.wxID_OPEN, "Open", wx.wxArtProvider.GetBitmap(wx.wxART_FILE_OPEN, wx.wxART_MENU, toolBmpSize), "Open an existing scribble") --- 347,355 ---- -- Create the toolbar toolBar = frame:CreateToolBar(wx.wxNO_BORDER + wx.wxTB_FLAT + wx.wxTB_DOCKABLE) ! -- Note: Ususally the bmp size isn't necessary, but the HELP icon is not the right size in MSW local toolBmpSize = toolBar:GetToolBitmapSize() + -- Note: Each temp bitmap returned by the wxArtProvider needs to be garbage collected + -- and there is no way to call delete() on them. See collectgarbage("collect") + -- at the end of this function. toolBar:AddTool(wx.wxID_NEW, "New", wx.wxArtProvider.GetBitmap(wx.wxART_NORMAL_FILE, wx.wxART_MENU, toolBmpSize), "Create an empty scribble") toolBar:AddTool(wx.wxID_OPEN, "Open", wx.wxArtProvider.GetBitmap(wx.wxART_FILE_OPEN, wx.wxART_MENU, toolBmpSize), "Open an existing scribble") *************** *** 354,363 **** toolBar:AddTool(wx.wxID_SAVEAS, "Save as", wx.wxArtProvider.GetBitmap(wx.wxART_NEW_DIR, wx.wxART_MENU, toolBmpSize), "Save the current scribble to a new file") toolBar:AddSeparator() ! toolBar:AddTool(wx.wxID_COPY, "Copy", wx.wxArtProvider.GetBitmap(wx.wxART_COPY, wx.wxART_MENU, toolBmpSize), "Copy image to clipboard") toolBar:AddSeparator() ! toolBar:AddTool(wx.wxID_UNDO, "Undo", wx.wxArtProvider.GetBitmap(wx.wxART_UNDO, wx.wxART_MENU, toolBmpSize), "Undo last line drawn") toolBar:AddSeparator() ! penWidthSpinCtrl = wx.wxSpinCtrl(toolBar, ID_PENWIDTH_SPINCTRL, "3", wx.wxDefaultPosition, wx.wxDefaultSize, wx.wxSP_ARROW_KEYS, 1, 100, currentPen:GetWidth()) --- 357,366 ---- toolBar:AddTool(wx.wxID_SAVEAS, "Save as", wx.wxArtProvider.GetBitmap(wx.wxART_NEW_DIR, wx.wxART_MENU, toolBmpSize), "Save the current scribble to a new file") toolBar:AddSeparator() ! toolBar:AddTool(wx.wxID_COPY, "Copy", wx.wxArtProvider.GetBitmap(wx.wxART_COPY, wx.wxART_MENU, toolBmpSize), "Copy image to clipboard") toolBar:AddSeparator() ! toolBar:AddTool(wx.wxID_UNDO, "Undo", wx.wxArtProvider.GetBitmap(wx.wxART_UNDO, wx.wxART_MENU, toolBmpSize), "Undo last line drawn") toolBar:AddSeparator() ! penWidthSpinCtrl = wx.wxSpinCtrl(toolBar, ID_PENWIDTH_SPINCTRL, tostring(currentPen:GetWidth()), wx.wxDefaultPosition, wx.wxDefaultSize, wx.wxSP_ARROW_KEYS, 1, 100, currentPen:GetWidth()) |
From: John L. <jr...@us...> - 2009-01-14 18:52:20
|
Update of /cvsroot/wxlua/wxLua/modules/wxbind/src In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv16471/wxLua/modules/wxbind/src Modified Files: wxcore_windows.cpp Log Message: Add back void* wxWindow::GetHandle() Index: wxcore_windows.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/src/wxcore_windows.cpp,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** wxcore_windows.cpp 29 Jan 2008 04:22:54 -0000 1.15 --- wxcore_windows.cpp 14 Jan 2009 18:52:06 -0000 1.16 *************** *** 1475,1478 **** --- 1475,1496 ---- } + static wxLuaArgType s_wxluatypeArray_wxLua_wxWindow_GetHandle[] = { &wxluatype_wxWindow, NULL }; + static int LUACALL wxLua_wxWindow_GetHandle(lua_State *L); + static wxLuaBindCFunc s_wxluafunc_wxLua_wxWindow_GetHandle[1] = {{ wxLua_wxWindow_GetHandle, WXLUAMETHOD_METHOD, 1, 1, s_wxluatypeArray_wxLua_wxWindow_GetHandle }}; + // %override wxLua_wxWindow_GetHandle + // void *GetHandle() const + static int LUACALL wxLua_wxWindow_GetHandle(lua_State *L) + { + // get this + wxWindow *self = (wxWindow *)wxluaT_getuserdatatype(L, 1, wxluatype_wxWindow); + // call GetHandle + void *handle = (void *)self->GetHandle(); + // push handle + lua_pushlightuserdata(L, handle); + // return the number of parameters + return 1; + } + + static wxLuaArgType s_wxluatypeArray_wxLua_wxWindow_GetHelpText[] = { &wxluatype_wxWindow, NULL }; static int LUACALL wxLua_wxWindow_GetHelpText(lua_State *L); *************** *** 4225,4228 **** --- 4243,4247 ---- { "GetGrandParent", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxWindow_GetGrandParent, 1, NULL }, + { "GetHandle", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxWindow_GetHandle, 1, NULL }, { "GetHelpText", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxWindow_GetHelpText, 1, NULL }, { "GetId", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxWindow_GetId, 1, NULL }, |
From: John L. <jr...@us...> - 2009-01-14 18:52:19
|
Update of /cvsroot/wxlua/wxLua/bindings/wxwidgets In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv16471/wxLua/bindings/wxwidgets Modified Files: wxcore_windows.i Log Message: Add back void* wxWindow::GetHandle() Index: wxcore_windows.i =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxwidgets/wxcore_windows.i,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** wxcore_windows.i 22 Oct 2008 05:31:45 -0000 1.5 --- wxcore_windows.i 14 Jan 2009 18:52:06 -0000 1.6 *************** *** 175,179 **** virtual wxColour GetForegroundColour() wxWindow* GetGrandParent() const ! //WXWidget GetHandle() const virtual wxString GetHelpText() const int GetId() const --- 175,179 ---- virtual wxColour GetForegroundColour() wxWindow* GetGrandParent() const ! void* GetHandle() const virtual wxString GetHelpText() const int GetId() const |
From: John L. <jr...@us...> - 2009-01-06 21:17:22
|
Update of /cvsroot/wxlua/wxLua/apps/wxlua/src In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv9182/wxLua/apps/wxlua/src Modified Files: wxlua.cpp Log Message: Don't use wxPrintf(msg), use wxPrintf(wxT("%s"), msg.c_str()) Index: wxlua.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/apps/wxlua/src/wxlua.cpp,v retrieving revision 1.55 retrieving revision 1.56 diff -C2 -d -r1.55 -r1.56 *** wxlua.cpp 5 Dec 2008 21:15:10 -0000 1.55 --- wxlua.cpp 6 Jan 2009 21:17:18 -0000 1.56 *************** *** 381,385 **** if (m_print_stdout) ! wxPrintf(msg + wxT("\n")); if (m_luaConsoleWrapper.Ok()) --- 381,385 ---- if (m_print_stdout) ! wxPrintf(wxT("%s\n"), msg.c_str()); if (m_luaConsoleWrapper.Ok()) *************** *** 392,396 **** { //if (m_print_stdout) // always print errors, FIXME: to stderr or is stdout ok? ! wxPrintf(msg + wxT("\n")); if (m_luaConsoleWrapper.Ok()) --- 392,396 ---- { //if (m_print_stdout) // always print errors, FIXME: to stderr or is stdout ok? ! wxPrintf(wxT("%s\n"), msg.c_str()); if (m_luaConsoleWrapper.Ok()) |
From: John L. <jr...@us...> - 2009-01-06 21:17:22
|
Update of /cvsroot/wxlua/wxLua/apps/wxluaedit/src In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv9182/wxLua/apps/wxluaedit/src Modified Files: wxluaedit.cpp Log Message: Don't use wxPrintf(msg), use wxPrintf(wxT("%s"), msg.c_str()) Index: wxluaedit.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/apps/wxluaedit/src/wxluaedit.cpp,v retrieving revision 1.40 retrieving revision 1.41 diff -C2 -d -r1.40 -r1.41 *** wxluaedit.cpp 5 Dec 2008 05:57:21 -0000 1.40 --- wxluaedit.cpp 6 Jan 2009 21:17:18 -0000 1.41 *************** *** 386,390 **** #else //fprintf(stderr, wx2lua(msg + wxT("\n"))); ! wxPrintf(msg + wxT("\n")); #endif // __WXMSW__ } --- 386,390 ---- #else //fprintf(stderr, wx2lua(msg + wxT("\n"))); ! wxPrintf(wxT("%s\n"), msg.c_str()); #endif // __WXMSW__ } *************** *** 407,411 **** #else //fprintf(stderr, wx2lua(msg + wxT("\n"))); ! wxPrintf(msg + wxT("\n")); #endif // __WXMSW__ } --- 407,411 ---- #else //fprintf(stderr, wx2lua(msg + wxT("\n"))); ! wxPrintf(wxT("%s\n"), msg.c_str()); #endif // __WXMSW__ } |
From: John L. <jr...@us...> - 2008-12-13 22:35:57
|
Update of /cvsroot/wxlua/wxLua/bindings/wxwidgets In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv25876/wxLua/bindings/wxwidgets Modified Files: wx_datatypes.lua wxadv_grid.i 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: wx_datatypes.lua =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxwidgets/wx_datatypes.lua,v retrieving revision 1.98 retrieving revision 1.99 diff -C2 -d -r1.98 -r1.99 *** wx_datatypes.lua 5 Dec 2008 04:31:30 -0000 1.98 --- wx_datatypes.lua 13 Dec 2008 22:35:52 -0000 1.99 *************** *** 1800,1803 **** --- 1800,1810 ---- ValueType = "class", }, + wxGridCellCoordsArray = { + ["%encapsulate"] = true, + Condition = "wxLUA_USE_wxGrid && wxUSE_GRID", + IsNumber = false, + Name = "wxGridCellCoordsArray", + ValueType = "class", + }, wxGridCellDateTimeRenderer = { ["%encapsulate"] = true, Index: wxadv_grid.i =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxwidgets/wxadv_grid.i,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** wxadv_grid.i 17 Mar 2008 03:05:01 -0000 1.3 --- wxadv_grid.i 13 Dec 2008 22:35:52 -0000 1.4 *************** *** 35,38 **** --- 35,40 ---- %define_string wxGRID_VALUE_DATETIME + %wxchkver_2_8_8 %define wxGRID_AUTOSIZE + // --------------------------------------------------------------------------- // wxGridCellWorker *************** *** 430,434 **** %class %delete %noclassinfo %encapsulate wxGridCellCoords ! %define_object wxGridNoCellRect wxGridCellCoords( int r = -1, int c = -1 ) --- 432,436 ---- %class %delete %noclassinfo %encapsulate wxGridCellCoords ! %define_object wxGridNoCellCoords wxGridCellCoords( int r = -1, int c = -1 ) *************** *** 442,445 **** --- 444,471 ---- %operator wxGridCellCoords& operator=( const wxGridCellCoords& other ) %operator bool operator==( const wxGridCellCoords& other ) const + %operator bool operator!() const + %endclass + + // --------------------------------------------------------------------------- + // wxGridCellCoordsArray + + %include "wx/dynarray.h" + + %class %delete %noclassinfo %encapsulate wxGridCellCoordsArray + wxGridCellCoordsArray() + wxGridCellCoordsArray(const wxGridCellCoordsArray& array) + + void Add( const wxGridCellCoords& c ) + void Alloc(size_t count) + void Clear() + int GetCount() const + bool IsEmpty() const + void Insert( const wxGridCellCoords& c, int n, int copies = 1 ) + wxGridCellCoords Item( int n ) + void RemoveAt(size_t index) + void Shrink() + + %operator wxGridCellCoords operator[](size_t nIndex) + %endclass *************** *** 696,704 **** // bool IsInSelection( const wxGridCellCoords& coords ) ! //wxGridCellCoordsArray GetSelectedCells() const ! //wxGridCellCoordsArray GetSelectionBlockTopLeft() const ! //wxGridCellCoordsArray GetSelectionBlockBottomRight() const ! //wxArrayInt GetSelectedRows() const ! //wxArrayInt GetSelectedCols() const wxRect BlockToDeviceRect( const wxGridCellCoords& topLeft, const wxGridCellCoords& bottomRight ) --- 722,730 ---- // bool IsInSelection( const wxGridCellCoords& coords ) ! wxGridCellCoordsArray GetSelectedCells() const ! wxGridCellCoordsArray GetSelectionBlockTopLeft() const ! wxGridCellCoordsArray GetSelectionBlockBottomRight() const ! wxArrayInt GetSelectedRows() const ! wxArrayInt GetSelectedCols() const wxRect BlockToDeviceRect( const wxGridCellCoords& topLeft, const wxGridCellCoords& bottomRight ) |
From: John L. <jr...@us...> - 2008-12-13 22:35:57
|
Update of /cvsroot/wxlua/wxLua/modules/wxbind/include In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv25876/wxLua/modules/wxbind/include Modified Files: wxadv_bind.h 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.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/include/wxadv_bind.h,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** wxadv_bind.h 22 Oct 2008 05:31:45 -0000 1.15 --- wxadv_bind.h 13 Dec 2008 22:35:52 -0000 1.16 *************** *** 75,78 **** --- 75,79 ---- #if wxLUA_USE_wxGrid && wxUSE_GRID + #include "wx/dynarray.h" #include "wx/generic/gridctrl.h" #include "wx/grid.h" *************** *** 195,198 **** --- 196,202 ---- extern WXDLLIMPEXP_BINDWXADV wxLuaBindMethod wxGridCellCoords_methods[]; extern WXDLLIMPEXP_DATA_BINDWXADV(int) wxGridCellCoords_methodCount; + extern WXDLLIMPEXP_DATA_BINDWXADV(int) wxluatype_wxGridCellCoordsArray; + extern WXDLLIMPEXP_BINDWXADV wxLuaBindMethod wxGridCellCoordsArray_methods[]; + extern WXDLLIMPEXP_DATA_BINDWXADV(int) wxGridCellCoordsArray_methodCount; extern WXDLLIMPEXP_DATA_BINDWXADV(int) wxluatype_wxGridCellDateTimeRenderer; extern WXDLLIMPEXP_BINDWXADV wxLuaBindMethod wxGridCellDateTimeRenderer_methods[]; *************** *** 342,345 **** --- 346,350 ---- wxLUA_DECLARE_ENCAPSULATION(WXDLLIMPEXP_BINDWXADV, wxGridCellChoiceEditor, wxGridCellChoiceEditor) wxLUA_DECLARE_ENCAPSULATION(WXDLLIMPEXP_BINDWXADV, wxGridCellCoords, wxGridCellCoords) + wxLUA_DECLARE_ENCAPSULATION(WXDLLIMPEXP_BINDWXADV, wxGridCellCoordsArray, wxGridCellCoordsArray) wxLUA_DECLARE_ENCAPSULATION(WXDLLIMPEXP_BINDWXADV, wxGridCellDateTimeRenderer, wxGridCellDateTimeRenderer) wxLUA_DECLARE_ENCAPSULATION(WXDLLIMPEXP_BINDWXADV, wxGridCellEditor, wxGridCellEditor) |
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) |
From: John L. <jr...@us...> - 2008-12-13 22:35:57
|
Update of /cvsroot/wxlua/wxLua/bindings In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv25876/wxLua/bindings Modified Files: genwxbind.bat 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: genwxbind.bat =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/genwxbind.bat,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** genwxbind.bat 2 Feb 2008 15:39:05 -0000 1.12 --- genwxbind.bat 13 Dec 2008 22:35:52 -0000 1.13 *************** *** 78,82 **** echo Generating wxLuaCan app Binding cd ..\apps\wxluacan\src ! %LUA% -e"rulesFilename=\"wxluacan_rules.lua\"" ../../../bindings/genwxbind.lua cd ..\..\..\bindings --- 78,82 ---- echo Generating wxLuaCan app Binding cd ..\apps\wxluacan\src ! ..\..\%LUA% -e"rulesFilename=\"wxluacan_rules.lua\"" ../../../bindings/genwxbind.lua cd ..\..\..\bindings |
From: John L. <jr...@us...> - 2008-12-13 22:35:57
|
Update of /cvsroot/wxlua/wxLua/samples In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv25876/wxLua/samples Modified Files: bindings.wx.lua 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: bindings.wx.lua =================================================================== RCS file: /cvsroot/wxlua/wxLua/samples/bindings.wx.lua,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** bindings.wx.lua 20 May 2008 04:21:22 -0000 1.22 --- bindings.wx.lua 13 Dec 2008 22:35:52 -0000 1.23 *************** *** 424,428 **** local t = { {"..", ["icon"] = list_images.folder}, ! ["col_labels"] = { "name", "method_type", "wxluacfuncs_n", "basemethod", "minargs", "maxargs", "argtype_names", "argtypes" }, ["object_type"] = "wxLuaBindMethod" } --- 424,428 ---- local t = { {"..", ["icon"] = list_images.folder}, ! ["col_labels"] = { "name", "method_type", "function", "basemethod", "minargs", "maxargs", "argtype_names", "argtypes" }, ["object_type"] = "wxLuaBindMethod" } *************** *** 440,478 **** if tbl[i].class_name then class_name = tbl[i].class_name.."::" end - local item = { - class_name..tbl[i].name, - CreatewxLuaMethod_TypeString(tbl[i].method_type), - tbl[i].wxluacfuncs_n, - "", - "", - "", - "", - "", - ["icon"] = list_images.folder, - ["col_icons"] = {}, - ["data"] = {} - } - - if tbl[i].classname then - item[1] = tbl[i].classname.."::"..item[1] - end - - -- This method has a basemethod and can be expanded - if type(tbl[i].basemethod) == "userdata" then - item[4] = tbl[i].basemethod.class_name - item.data[4] = tbl[i].basemethod - item.col_icons[4] = list_images.folder - end - - -- Add in the CFuncs - item.data[1] = tbl[i].wxluacfuncs - item.color = wx.wxBLUE - table.insert(t, item) - -- keys for CFunc = { "lua_cfunc", "type", "minargs", "maxargs", "argtype_names", "argtypes" } local cfunc_t = CreatewxLuaBindCFunc(tbl[i].wxluacfuncs) for j = 2, #cfunc_t do ! local cft = {item[1].." func "..j-1, cfunc_t[j][2], "", "", cfunc_t[j][3], cfunc_t[j][4], cfunc_t[j][5], cfunc_t[j][6]} ! if string.find(cfunc_t[j][2], "Overload", 1, 1) then cft.color = list_colors.green end table.insert(t, cft) end --- 440,474 ---- if tbl[i].class_name then class_name = tbl[i].class_name.."::" end -- keys for CFunc = { "lua_cfunc", "type", "minargs", "maxargs", "argtype_names", "argtypes" } local cfunc_t = CreatewxLuaBindCFunc(tbl[i].wxluacfuncs) for j = 2, #cfunc_t do ! local cft = { ! class_name..tbl[i].name, ! cfunc_t[j][2], ! tostring(cfunc_t[j][1]), ! "", ! cfunc_t[j][3], ! cfunc_t[j][4], ! cfunc_t[j][5], ! cfunc_t[j][6], ! ["icon"] = nil, ! ["col_icons"] = {}, ! ["data"] = {} ! } ! ! if string.find(cfunc_t[j][2], "Overload", 1, 1) then ! cft.color = list_colors.green ! end ! if #cfunc_t > 2 then ! cft[1] = cft[1].." "..tostring(j-1) ! end ! ! -- This method has a basemethod and can be expanded ! if type(tbl[i].basemethod) == "userdata" then ! cft[4] = tbl[i].basemethod.class_name ! cft.data[4] = tbl[i].basemethod ! cft.col_icons[4] = list_images.folder ! end ! table.insert(t, cft) end *************** *** 833,840 **** local t = nil ! if (col == 0) and (type(data[data_index].data[col+1]) == "table") then ! t = CreatewxLuaBindCFunc(data[data_index].data[col+1]) ! t.class_name = data.class_name ! elseif (col == 3) and (type(data[data_index].data[col+1]) == "userdata") then t = CreatewxLuaBindMethod({data[data_index].data[col+1]}) t.class_name = data[data_index][col+1].class_name --- 829,833 ---- local t = nil ! if (col == 3) and (type(data[data_index].data[col+1]) == "userdata") then t = CreatewxLuaBindMethod({data[data_index].data[col+1]}) t.class_name = data[data_index][col+1].class_name |
From: John L. <jr...@us...> - 2008-12-09 18:19:35
|
Update of /cvsroot/wxlua/wxLua/modules/wxlua/src In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv32289/wxLua/modules/wxlua/src Modified Files: wxlstate.cpp Log Message: Comment our changes to bitlib to make updating it easier Index: wxlstate.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxlua/src/wxlstate.cpp,v retrieving revision 1.177 retrieving revision 1.178 diff -C2 -d -r1.177 -r1.178 *** wxlstate.cpp 8 Dec 2008 05:17:11 -0000 1.177 --- wxlstate.cpp 9 Dec 2008 18:19:24 -0000 1.178 *************** *** 4044,4048 **** #include <limits.h> ! //#include "bit_limits.h" #define BITLIB_FLOAT_BITS 53 #define BITLIB_FLOAT_MAX 0xfffffffffffffL --- 4044,4048 ---- #include <limits.h> ! //#include "bit_limits.h" // wxLua: directly include the file here #define BITLIB_FLOAT_BITS 53 #define BITLIB_FLOAT_MAX 0xfffffffffffffL *************** *** 4059,4063 **** #ifndef SIZE_MAX ! #define SIZE_MAX ((size_t)-1) #endif --- 4059,4063 ---- #ifndef SIZE_MAX ! #define SIZE_MAX ((size_t)-1) // wxLua: define this if it's not already #endif *************** *** 4086,4090 **** ! #define BUILTIN_CAST /* Define TOBIT to get a bit value */ --- 4086,4090 ---- ! #define BUILTIN_CAST // wxLua: this is probably good enough for us /* Define TOBIT to get a bit value */ |
From: John L. <jr...@us...> - 2008-12-09 18:19:31
|
Update of /cvsroot/wxlua/wxLua/samples In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv32289/wxLua/samples Modified Files: unittest.wx.lua Log Message: Comment our changes to bitlib to make updating it easier Index: unittest.wx.lua =================================================================== RCS file: /cvsroot/wxlua/wxLua/samples/unittest.wx.lua,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** unittest.wx.lua 1 Feb 2008 05:36:39 -0000 1.23 --- unittest.wx.lua 9 Dec 2008 18:19:24 -0000 1.24 *************** *** 339,343 **** -- --------------------------------------------------------------------------- ! PrintOk(bit.bnot(0) == -1, "Test bit library bit.bnot.") PrintOk(bit.band(0x1, 0x3, 0x5) == 1, "Test bit library bit.band.") PrintOk(bit.bor(0x1, 0x3, 0x5) == 7, "Test bit library bit.bor.") --- 339,344 ---- -- --------------------------------------------------------------------------- ! PrintOk(bit.bnot(bit.bnot(0)) == 0, "Test bit library bit.bnot.") ! PrintOk(bit.bnot(bit.bnot(0xF)) == 0xF, "Test bit library bit.bnot.") PrintOk(bit.band(0x1, 0x3, 0x5) == 1, "Test bit library bit.band.") PrintOk(bit.bor(0x1, 0x3, 0x5) == 7, "Test bit library bit.bor.") |
From: John L. <jr...@us...> - 2008-12-08 05:17:16
|
Update of /cvsroot/wxlua/wxLua/modules/wxlua/src In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv21115/wxLua/modules/wxlua/src Modified Files: wxlbind.cpp wxlstate.cpp Log Message: Don't crash in lua_getinfo(L, &lua_Debug) if we don't have a Lua stack. Return "?" for the function name since there isn't one. Index: wxlstate.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxlua/src/wxlstate.cpp,v retrieving revision 1.176 retrieving revision 1.177 diff -C2 -d -r1.176 -r1.177 *** wxlstate.cpp 5 Dec 2008 21:15:11 -0000 1.176 --- wxlstate.cpp 8 Dec 2008 05:17:11 -0000 1.177 *************** *** 308,312 **** void LUACALL wxlua_argerrormsg(lua_State *L, const wxString& msg_) { ! wxString funcArgs; wxString argMsg = wxlua_getLuaArgsMsg(L, 1, lua_gettop(L)); --- 308,312 ---- void LUACALL wxlua_argerrormsg(lua_State *L, const wxString& msg_) { ! wxString funcArgs(wxT("\n")); wxString argMsg = wxlua_getLuaArgsMsg(L, 1, lua_gettop(L)); *************** *** 329,333 **** } ! wxString msg = msg_ + wxT("\nFunction called: '") + argMsg + wxT("'\n") + funcArgs; wxlua_error(L, msg); } --- 329,333 ---- } ! wxString msg = msg_ + wxT("\nFunction called: '") + argMsg + wxT("'") + funcArgs; wxlua_error(L, msg); } Index: wxlbind.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxlua/src/wxlbind.cpp,v retrieving revision 1.120 retrieving revision 1.121 diff -C2 -d -r1.120 -r1.121 *** wxlbind.cpp 26 Jan 2008 23:27:25 -0000 1.120 --- wxlbind.cpp 8 Dec 2008 05:17:11 -0000 1.121 *************** *** 791,796 **** wxString wxlua_getLuaArgsMsg(lua_State* L, int start_stack_idx, int end_stack_idx) { ! lua_Debug ar; ! lua_getstack(L, 0, &ar); lua_getinfo(L, "n", &ar); wxString funcName = lua2wx(ar.name); --- 791,801 ---- wxString wxlua_getLuaArgsMsg(lua_State* L, int start_stack_idx, int end_stack_idx) { ! lua_Debug ar = {0}; ! ! // NOTE: We'd like to be able to give some info, however if we are not ! // running a Lua function the lua_Debug is empty and lua_getinfo() will panic. ! if (lua_getstack(L, 0, &ar) == 0) // returns 0 when called on a level greater than stack depth ! return wxT("?"); ! lua_getinfo(L, "n", &ar); wxString funcName = lua2wx(ar.name); |
From: John L. <jr...@us...> - 2008-12-05 21:15:17
|
Update of /cvsroot/wxlua/wxLua/apps/wxlua/src In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv1652/wxLua/apps/wxlua/src Modified Files: lconsole.h wxlua.cpp wxlua.h Log Message: Allow convertion of wxStrings to const char in wxlua_getstringtype() Make wxLua app allow for printing to stdout, msgdlg, and/or console as cmd line option Check for and don't crash if someone replaces tostring() with garbage Index: wxlua.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/apps/wxlua/src/wxlua.cpp,v retrieving revision 1.54 retrieving revision 1.55 diff -C2 -d -r1.54 -r1.55 *** wxlua.cpp 5 Dec 2008 05:57:21 -0000 1.54 --- wxlua.cpp 5 Dec 2008 21:15:10 -0000 1.55 *************** *** 61,74 **** wxCMD_LINE_VAL_NONE, wxCMD_LINE_PARAM_OPTIONAL|wxCMD_LINE_OPTION_HELP }, ! { wxCMD_LINE_SWITCH, wxT("c"), wxT("console"), wxT("Show message console for print statements."), wxCMD_LINE_VAL_NONE, wxCMD_LINE_PARAM_OPTIONAL }, ! { wxCMD_LINE_SWITCH, wxT("q"), wxT("quit"), wxT("Do not exit even if there are no top level windows open."), wxCMD_LINE_VAL_NONE, wxCMD_LINE_PARAM_OPTIONAL }, ! { wxCMD_LINE_OPTION, wxT("e"), wxT("stat"), wxT("Execute lua string 'stat'."), wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_OPTIONAL }, ! { wxCMD_LINE_OPTION, wxT("d"), wxT("debuggee"), wxT("Run as debuggee -d[host]:[port]"), wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_OPTIONAL }, --- 61,80 ---- wxCMD_LINE_VAL_NONE, wxCMD_LINE_PARAM_OPTIONAL|wxCMD_LINE_OPTION_HELP }, ! { wxCMD_LINE_SWITCH, wxT("s"), wxT("stdout"), wxT("Do NOT print output to command line stdout."), wxCMD_LINE_VAL_NONE, wxCMD_LINE_PARAM_OPTIONAL }, ! { wxCMD_LINE_SWITCH, wxT("m"), wxT("msgdlg"), wxT("Print output to a message dialog."), wxCMD_LINE_VAL_NONE, wxCMD_LINE_PARAM_OPTIONAL }, ! { wxCMD_LINE_SWITCH, wxT("c"), wxT("console"), wxT("Print output to a persistent message console."), ! wxCMD_LINE_VAL_NONE, wxCMD_LINE_PARAM_OPTIONAL }, ! ! { wxCMD_LINE_SWITCH, wxT("q"), wxT("quit"), wxT("Do not exit even if there are no top-level windows open."), ! wxCMD_LINE_VAL_NONE, wxCMD_LINE_PARAM_OPTIONAL }, ! ! { wxCMD_LINE_OPTION, wxT("e"), wxT("stat"), wxT("Execute a Lua string 'stat'."), wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_OPTIONAL }, ! { wxCMD_LINE_OPTION, wxT("d"), wxT("debuggee"), wxT("Run as debuggee -d[host]:[port] (for internal use)"), wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_OPTIONAL }, *************** *** 76,83 **** wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_OPTIONAL|wxCMD_LINE_PARAM_MULTIPLE }, ! { wxCMD_LINE_OPTION, wxT("r"), wxT("run"), wxT("Run lua program with command line args."), wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_OPTIONAL|wxCMD_LINE_PARAM_MULTIPLE}, ! { wxCMD_LINE_PARAM, wxT(""), wxT(""), wxT("Run lua program with command line args."), wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_OPTIONAL|wxCMD_LINE_PARAM_MULTIPLE }, --- 82,89 ---- wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_OPTIONAL|wxCMD_LINE_PARAM_MULTIPLE }, ! { wxCMD_LINE_OPTION, wxT("r"), wxT("run"), wxT("Run a Lua program with command line args."), wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_OPTIONAL|wxCMD_LINE_PARAM_MULTIPLE}, ! { wxCMD_LINE_PARAM, wxT(""), wxT(""), wxT("Run a Lua program with command line args."), wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_OPTIONAL|wxCMD_LINE_PARAM_MULTIPLE }, *************** *** 87,91 **** // Find the index into the argv that matches name starting at arg start_n // This is necessary since the wxCmdLineParser drops -- and all -X ! // params so we use this to make sure that the lua program is at 0. int FindFirstCmdParam(int start_n, const wxString& name, int argc, wxChar** argv) --- 93,97 ---- // Find the index into the argv that matches name starting at arg start_n // This is necessary since the wxCmdLineParser drops -- and all -X ! // params so we use this to make sure that the Lua program is at 0. int FindFirstCmdParam(int start_n, const wxString& name, int argc, wxChar** argv) *************** *** 114,117 **** --- 120,125 ---- { m_programName = argv[0]; // The name of this program + m_print_stdout = true; + m_print_msgdlg = false; m_want_console = false; m_wxlDebugTarget = NULL; *************** *** 119,123 **** int arg_count = 0; // counter for args used during parsing ! bool run_ok = false; // has the lua program executed ok bool dont_quit = false; // user specified -q switch to not quit --- 127,131 ---- int arg_count = 0; // counter for args used during parsing ! bool run_ok = false; // has the Lua program executed ok bool dont_quit = false; // user specified -q switch to not quit *************** *** 180,183 **** --- 188,203 ---- } + if (parser.Found(wxT("s"))) + { + arg_count++; // remove -s arg + m_print_stdout = false; + } + + if (parser.Found(wxT("m"))) + { + arg_count++; // remove -m arg + m_print_msgdlg = true; + } + // Check if we are to display the console if (parser.Found(wxT("c"))) *************** *** 191,195 **** } ! // Check if we are to run some lua code stat wxString luaCode; if (parser.Found(wxT("e"), &luaCode)) --- 211,215 ---- } ! // Check if we are to run some Lua code stat wxString luaCode; if (parser.Found(wxT("e"), &luaCode)) *************** *** 358,378 **** if (!is_error) { if (m_luaConsoleWrapper.Ok()) m_luaConsoleWrapper.GetConsole()->DisplayText(msg); ! else ! { ! #ifdef __WXMSW__ wxMessageBox(msg, wxT("wxLua Print")); - #else - //fprintf(stderr, wx2lua(msg + wxT("\n"))); - wxPrintf(msg + wxT("\n")); - #endif // __WXMSW__ - } } else { ! if (m_wxlDebugTarget != NULL) ! m_wxlDebugTarget->DisplayError(msg); ! else if (m_luaConsoleWrapper.Ok()) { m_luaConsoleWrapper.GetConsole()->DisplayText(msg); --- 378,398 ---- if (!is_error) { + //fprintf(stderr, wx2lua(msg + wxT("\n"))); + + if (m_print_stdout) + wxPrintf(msg + wxT("\n")); + if (m_luaConsoleWrapper.Ok()) m_luaConsoleWrapper.GetConsole()->DisplayText(msg); ! ! if (m_print_msgdlg) wxMessageBox(msg, wxT("wxLua Print")); } else { ! //if (m_print_stdout) // always print errors, FIXME: to stderr or is stdout ok? ! wxPrintf(msg + wxT("\n")); ! ! if (m_luaConsoleWrapper.Ok()) { m_luaConsoleWrapper.GetConsole()->DisplayText(msg); *************** *** 381,393 **** m_luaConsoleWrapper.GetConsole()->DisplayStack(wxlState); } ! else ! { ! #ifdef __WXMSW__ wxMessageBox(msg, wxT("wxLua Error")); - #else - //fprintf(stderr, wx2lua(msg + wxT("\n"))); - wxPrintf(msg + wxT("\n")); - #endif // __WXMSW__ - } } } --- 401,410 ---- m_luaConsoleWrapper.GetConsole()->DisplayStack(wxlState); } ! ! if (m_wxlDebugTarget != NULL) ! m_wxlDebugTarget->DisplayError(msg); ! ! if (m_print_msgdlg) wxMessageBox(msg, wxT("wxLua Error")); } } Index: lconsole.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/apps/wxlua/src/lconsole.h,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** lconsole.h 5 Dec 2008 05:57:21 -0000 1.11 --- lconsole.h 5 Dec 2008 21:15:10 -0000 1.12 *************** *** 42,54 **** void SetExitOnError(bool is_error) { m_exit_on_error = m_exit_on_error || is_error; } - wxLuaConsoleWrapper* m_wrapper; - protected: void OnCloseWindow(wxCloseEvent& event); ! wxSplitterWindow *m_splitter; ! wxTextCtrl *m_textCtrl; ! wxListBox *m_debugListBox; ! bool m_exit_on_error; private: --- 42,53 ---- void SetExitOnError(bool is_error) { m_exit_on_error = m_exit_on_error || is_error; } protected: void OnCloseWindow(wxCloseEvent& event); ! wxLuaConsoleWrapper *m_wrapper; ! wxSplitterWindow *m_splitter; ! wxTextCtrl *m_textCtrl; ! wxListBox *m_debugListBox; ! bool m_exit_on_error; private: Index: wxlua.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/apps/wxlua/src/wxlua.h,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -d -r1.25 -r1.26 *** wxlua.h 5 Dec 2008 05:57:21 -0000 1.25 --- wxlua.h 5 Dec 2008 21:15:10 -0000 1.26 *************** *** 38,41 **** --- 38,43 ---- wxLuaState m_wxlState; wxLuaConsoleWrapper m_luaConsoleWrapper; + bool m_print_stdout; + bool m_print_msgdlg; bool m_want_console; bool m_mem_bitmap_added; |
From: John L. <jr...@us...> - 2008-12-05 21:15:17
|
Update of /cvsroot/wxlua/wxLua/modules/wxlua/src In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv1652/wxLua/modules/wxlua/src Modified Files: wxlstate.cpp Log Message: Allow convertion of wxStrings to const char in wxlua_getstringtype() Make wxLua app allow for printing to stdout, msgdlg, and/or console as cmd line option Check for and don't crash if someone replaces tostring() with garbage Index: wxlstate.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxlua/src/wxlstate.cpp,v retrieving revision 1.175 retrieving revision 1.176 diff -C2 -d -r1.175 -r1.176 *** wxlstate.cpp 3 Dec 2008 05:26:03 -0000 1.175 --- wxlstate.cpp 5 Dec 2008 21:15:11 -0000 1.176 *************** *** 64,69 **** int i, n = lua_gettop(L); ! // figure out the types here in c++ land lua_getglobal(L, "tostring"); for (i = 1; i <= n; ++i) { --- 64,78 ---- int i, n = lua_gettop(L); ! // Use the Lua tostring() function to print them as Lua would lua_getglobal(L, "tostring"); + + if (!lua_isfunction(L, -1)) + { + // This code is also used in wxledit.cpp, wxLuaShell::RunString() + msg = wxT("wxLua ERROR: Unable to print() without the tostring() function. Did you remove it?"); + lua_pop(L, 1); // pop the nil or whatever replaced tostring() + n = 0; // don't let for loop run + } + for (i = 1; i <= n; ++i) { *************** *** 71,78 **** const char *s; ! lua_pushvalue(L, -1); /* function to be called */ ! lua_pushvalue(L, i); /* value to print */ lua_call(L, 1, 1); ! s = lua_tostring(L, -1); /* get result */ if (s == NULL) { --- 80,87 ---- const char *s; ! lua_pushvalue(L, -1); /* function to be called */ ! lua_pushvalue(L, i); /* value to print */ lua_call(L, 1, 1); ! s = lua_tostring(L, -1); /* get result */ if (s == NULL) { *************** *** 92,96 **** } else if (!msg.IsEmpty()) ! wxPrintf(wxT("%s\n"), msg.c_str()); return 0; // no items put onto stack --- 101,105 ---- } else if (!msg.IsEmpty()) ! wxPrintf(wxT("%s\n"), msg.c_str()); // Lua puts a \n too return 0; // no items put onto stack *************** *** 1344,1347 **** --- 1353,1359 ---- bool wxlua_iswxstringtype(lua_State* L, int stack_idx) { + // NOTE: If we ever allow numbers to be coerced to strings we must + // change how we handle lua_tostring() calls since it will change a number + // to a string on the stack. This could break people's code. if (wxlua_iswxluatype(lua_type(L, stack_idx), WXLUA_TSTRING) == 1) return true; *************** *** 1357,1364 **** const char* LUACALL wxlua_getstringtype(lua_State *L, int stack_idx) { ! if (!wxlua_isstringtype(L, stack_idx)) ! wxlua_argerror(L, stack_idx, wxT("a 'string'")); ! return lua_tostring(L, stack_idx); } --- 1369,1389 ---- const char* LUACALL wxlua_getstringtype(lua_State *L, int stack_idx) { ! if (wxlua_isstringtype(L, stack_idx)) ! return lua_tostring(L, stack_idx); ! else if (wxlua_iswxuserdata(L, stack_idx)) ! { ! int stack_type = wxluaT_type(L, stack_idx); ! if (wxluaT_isderivedtype(L, stack_type, *p_wxluatype_wxString) >= 0) ! { ! wxString* wxstr = (wxString*)wxlua_touserdata(L, stack_idx, false); ! wxCHECK_MSG(wxstr, NULL, wxT("Invalid userdata wxString")); ! return wx2lua(*wxstr); ! } ! } ! ! wxlua_argerror(L, stack_idx, wxT("a 'string' or 'wxString'")); ! ! return NULL; } |
From: John L. <jr...@us...> - 2008-12-05 21:15:16
|
Update of /cvsroot/wxlua/wxLua/apps/wxluaedit/src In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv1652/wxLua/apps/wxluaedit/src Modified Files: wxledit.cpp Log Message: Allow convertion of wxStrings to const char in wxlua_getstringtype() Make wxLua app allow for printing to stdout, msgdlg, and/or console as cmd line option Check for and don't crash if someone replaces tostring() with garbage Index: wxledit.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/apps/wxluaedit/src/wxledit.cpp,v retrieving revision 1.36 retrieving revision 1.37 diff -C2 -d -r1.36 -r1.37 *** wxledit.cpp 3 Dec 2008 05:26:03 -0000 1.36 --- wxledit.cpp 5 Dec 2008 21:15:11 -0000 1.37 *************** *** 183,188 **** if (ret && (top2 > top1)) { for (int n = top1+1; n <= top2; n++) ! AppendText(m_wxlState.lua_TowxString(n) + wxT("\n")); } --- 183,205 ---- if (ret && (top2 > top1)) { + m_wxlState.lua_GetGlobal("tostring"); + + if (!m_wxlState.lua_IsFunction(-1)) + { + // This code is also used in wxlua_printFunction() + AppendText(wxT("wxLua ERROR: Unable to print() without the tostring() function. Did you remove it?\n")); + m_wxlState.lua_Pop(1); // pop the nil or whatever replaced tostring() + top2 = top1; // don't let for loop run + } + for (int n = top1+1; n <= top2; n++) ! { ! m_wxlState.lua_PushValue(-1); // push tostring function to be called ! m_wxlState.lua_PushValue(n); // value to print ! m_wxlState.lua_Call(1, 1); // run tostring function ! ! AppendText(m_wxlState.lua_TowxString(-1) + wxT("\n")); ! m_wxlState.lua_Pop(1); // pop string from "tostring" function ! } } |
From: John L. <jr...@us...> - 2008-12-05 05:57:27
|
Update of /cvsroot/wxlua/wxLua/apps/wxluaedit/src In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv8178/wxLua/apps/wxluaedit/src Modified Files: wxluaedit.cpp Log Message: Make the wxLuaConsole not rely on the wxApp having a pointer to it so it can be used easier. Index: wxluaedit.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/apps/wxluaedit/src/wxluaedit.cpp,v retrieving revision 1.39 retrieving revision 1.40 diff -C2 -d -r1.39 -r1.40 *** wxluaedit.cpp 3 Dec 2008 05:26:03 -0000 1.39 --- wxluaedit.cpp 5 Dec 2008 05:57:21 -0000 1.40 *************** *** 35,39 **** #include "wxluadebug/include/wxlstack.h" ! class wxLuaConsole; //#include "art/wxlua.xpm" get it from the lconsole --- 35,39 ---- #include "wxluadebug/include/wxlstack.h" ! #include "../../wxlua/src/lconsole.cpp" //#include "art/wxlua.xpm" get it from the lconsole *************** *** 93,101 **** const wxLuaState& wxlState = wxNullLuaState); ! wxLuaDebugTarget *m_pDebugTarget; ! wxLuaState m_wxlState; ! wxString m_programName; ! wxLuaConsole *m_luaConsole; ! bool m_want_console; private: --- 93,101 ---- const wxLuaState& wxlState = wxNullLuaState); ! wxLuaDebugTarget* m_pDebugTarget; ! wxLuaState m_wxlState; ! wxString m_programName; ! wxLuaConsoleWrapper m_luaConsoleWrapper; ! bool m_want_console; private: *************** *** 105,111 **** IMPLEMENT_APP(wxLuaEditorApp) - #define WXLUAEDITOR_APP - #include "../../wxlua/src/lconsole.cpp" - // ---------------------------------------------------------------------------- // wxLuaEditorFrame --- 105,108 ---- *************** *** 150,154 **** m_pDebugTarget = NULL; m_programName = argv[0]; - m_luaConsole = NULL; m_want_console = false; --- 147,150 ---- *************** *** 374,387 **** // If they closed the console, but specified they wanted it // on the command-line, recreate it. ! if (m_want_console && (m_luaConsole == NULL)) { ! m_luaConsole = new wxLuaConsole(NULL, ID_WXLUA_CONSOLE); ! m_luaConsole->Show(true); } if (!is_error) { ! if (m_luaConsole != NULL) ! m_luaConsole->DisplayText(msg); else { --- 370,383 ---- // If they closed the console, but specified they wanted it // on the command-line, recreate it. ! if (m_want_console && (!m_luaConsoleWrapper.Ok())) { ! m_luaConsoleWrapper.SetConsole(new wxLuaConsole(&m_luaConsoleWrapper, NULL, ID_WXLUA_CONSOLE)); ! m_luaConsoleWrapper.GetConsole()->Show(true); } if (!is_error) { ! if (m_luaConsoleWrapper.Ok()) ! m_luaConsoleWrapper.GetConsole()->DisplayText(msg); else { *************** *** 398,407 **** if (m_pDebugTarget != NULL) m_pDebugTarget->DisplayError(msg); ! else if (m_luaConsole != NULL) { ! m_luaConsole->DisplayText(msg); ! m_luaConsole->SetExitOnError(is_error); if (wxlState.Ok()) ! m_luaConsole->DisplayStack(wxlState); } else --- 394,403 ---- if (m_pDebugTarget != NULL) m_pDebugTarget->DisplayError(msg); ! else if (m_luaConsoleWrapper.Ok()) { ! m_luaConsoleWrapper.GetConsole()->DisplayText(msg); ! m_luaConsoleWrapper.GetConsole()->SetExitOnError(is_error); if (wxlState.Ok()) ! m_luaConsoleWrapper.GetConsole()->DisplayStack(wxlState); } else |
From: John L. <jr...@us...> - 2008-12-05 05:57:27
|
Update of /cvsroot/wxlua/wxLua/apps/wxlua/src In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv8178/wxLua/apps/wxlua/src Modified Files: Makefile editor.h lconsole.cpp lconsole.h wxlua.cpp wxlua.h Log Message: Make the wxLuaConsole not rely on the wxApp having a pointer to it so it can be used easier. Index: editor.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/apps/wxlua/src/editor.h,v retrieving revision 1.42 retrieving revision 1.43 diff -C2 -d -r1.42 -r1.43 *** editor.h 1 Apr 2008 05:10:04 -0000 1.42 --- editor.h 5 Dec 2008 05:57:20 -0000 1.43 *************** *** 7,15 **** /* Original filename: '../../../samples/editor.wx.lua' */ ! extern const size_t wxLuaEditor_len; ! extern const unsigned char wxLuaEditor[]; ! const size_t wxLuaEditor_len = 91181; ! const unsigned char wxLuaEditor[91182] = { 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 61, 45, 45, 45, 10, 45, 45, 32, 78, 97,109,101, 58, 32, 32, 32, 32, 32, 32, 32, 32, 69,100,105,116,111,114, 46,119,120, 46,108,117, 97, 10, --- 7,15 ---- /* Original filename: '../../../samples/editor.wx.lua' */ ! extern const size_t editor_wx_lua_len; ! extern const unsigned char editor_wx_lua[]; ! const size_t editor_wx_lua_len = 91181; ! const unsigned char editor_wx_lua[91182] = { 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 61, 45, 45, 45, 10, 45, 45, 32, 78, 97,109,101, 58, 32, 32, 32, 32, 32, 32, 32, 32, 69,100,105,116,111,114, 46,119,120, 46,108,117, 97, 10, Index: lconsole.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/apps/wxlua/src/lconsole.h,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** lconsole.h 12 Dec 2006 01:23:40 -0000 1.10 --- lconsole.h 5 Dec 2008 05:57:21 -0000 1.11 *************** *** 17,20 **** --- 17,22 ---- class WXDLLEXPORT wxListBox; + class wxLuaConsoleWrapper; + // ---------------------------------------------------------------------------- // wxLuaConsole - define a console class to display print statements *************** *** 24,28 **** { public: ! wxLuaConsole(wxWindow* parent, wxWindowID id, const wxString& title = wxT("wxLua console"), const wxPoint& pos = wxDefaultPosition, --- 26,31 ---- { public: ! wxLuaConsole(wxLuaConsoleWrapper* consoleWrapper, ! wxWindow* parent, wxWindowID id, const wxString& title = wxT("wxLua console"), const wxPoint& pos = wxDefaultPosition, *************** *** 39,42 **** --- 42,47 ---- void SetExitOnError(bool is_error) { m_exit_on_error = m_exit_on_error || is_error; } + wxLuaConsoleWrapper* m_wrapper; + protected: void OnCloseWindow(wxCloseEvent& event); *************** *** 51,53 **** --- 56,83 ---- }; + // ---------------------------------------------------------------------------- + // wxLuaConsoleWrapper - A smart pointer like wrapper for the wxLuaConsole + // + // Create one as a member of the wxApp or whereever it will exist longer than + // the wxLuaConsole it wraps and the wxLuaConsole will NULL the pointer to + // it when closed. See wxLuaConsole::OnCloseWindow(wxCloseEvent&) as to why + // we simply can't catch the close event elsewhere. + // ---------------------------------------------------------------------------- + + class wxLuaConsoleWrapper + { + public: + + wxLuaConsoleWrapper(wxLuaConsole* c = NULL) : m_luaConsole(c) {} + + bool Ok() const { return m_luaConsole != NULL; } + + wxLuaConsole* GetConsole(); // this will assert if console is NULL, check with Ok() + void SetConsole(wxLuaConsole* c) { m_luaConsole = c; } + + protected: + wxLuaConsole* m_luaConsole; + }; + + #endif // WX_LUA_CONSOLE_H Index: Makefile =================================================================== RCS file: /cvsroot/wxlua/wxLua/apps/wxlua/src/Makefile,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** Makefile 16 Jul 2007 19:34:12 -0000 1.24 --- Makefile 5 Dec 2008 05:57:20 -0000 1.25 *************** *** 39,43 **** editor: ! $(LUA) $(WXLUA_DIR)/util/bin2c/bin2c.lua -t -lf -n wxLuaEditor -o editor.h $(WXLUA_DIR)/samples/editor.wx.lua clean: --- 39,43 ---- editor: ! $(LUA) $(WXLUA_DIR)/util/bin2c/bin2c.lua -t -lf -n editor_wx_lua -o editor.h $(WXLUA_DIR)/samples/editor.wx.lua clean: Index: wxlua.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/apps/wxlua/src/wxlua.cpp,v retrieving revision 1.53 retrieving revision 1.54 diff -C2 -d -r1.53 -r1.54 *** wxlua.cpp 3 Dec 2008 05:26:03 -0000 1.53 --- wxlua.cpp 5 Dec 2008 05:57:21 -0000 1.54 *************** *** 113,121 **** bool wxLuaStandaloneApp::OnInit() { ! m_programName = argv[0]; // The name of this program ! m_luaConsole = NULL; ! m_want_console = false; ! m_wxlDebugTarget = NULL; ! m_mem_bitmap_added = false; int arg_count = 0; // counter for args used during parsing --- 113,120 ---- bool wxLuaStandaloneApp::OnInit() { ! m_programName = argv[0]; // The name of this program ! m_want_console = false; ! m_wxlDebugTarget = NULL; ! m_mem_bitmap_added = false; int arg_count = 0; // counter for args used during parsing *************** *** 150,154 **** // When this function returns wxApp:MainLoop() will be called by wxWidgets ! // and so we want the Lua code wx.wxGetApp:MailLoop() to not // prematurely start it. wxLuaState::sm_wxAppMainLoop_will_run = true; --- 149,153 ---- // When this function returns wxApp:MainLoop() will be called by wxWidgets ! // and so we want the Lua code wx.wxGetApp:MainLoop() to not // prematurely start it. wxLuaState::sm_wxAppMainLoop_will_run = true; *************** *** 186,193 **** arg_count++; // remove -c arg m_want_console = true; ! // Note: The m_luaConsole will be nulled when it closes in // wxLuaConsole::OnCloseWindow. ! m_luaConsole = new wxLuaConsole(NULL, ID_WXLUA_CONSOLE); ! m_luaConsole->Show(true); } --- 185,192 ---- arg_count++; // remove -c arg m_want_console = true; ! // Note: The wxLuaConsoleWrapper::m_luaConsole will be nulled when it closes in // wxLuaConsole::OnCloseWindow. ! m_luaConsoleWrapper.SetConsole(new wxLuaConsole(&m_luaConsoleWrapper, NULL, ID_WXLUA_CONSOLE)); ! m_luaConsoleWrapper.GetConsole()->Show(true); } *************** *** 238,242 **** } ! return (m_luaConsole != NULL); // will exit app when console is closed } --- 237,241 ---- } ! return (m_luaConsoleWrapper.Ok()); // will exit app when console is closed } *************** *** 257,261 **** wxlua_pushargs(m_wxlState.GetLuaState(), argv, argc, arg_count); ! int rc = m_wxlState.RunBuffer((const char*)wxLuaEditor, wxLuaEditor_len, m_programName); run_ok = (rc == 0); if (rc != 0) --- 256,260 ---- wxlua_pushargs(m_wxlState.GetLuaState(), argv, argc, arg_count); ! int rc = m_wxlState.RunBuffer((const char*)editor_wx_lua, editor_wx_lua_len, m_programName); run_ok = (rc == 0); if (rc != 0) *************** *** 308,312 **** } ! return (m_luaConsole != NULL) || run_ok; } --- 307,311 ---- } ! return m_luaConsoleWrapper.Ok() || run_ok; } *************** *** 326,333 **** m_want_console = false; // no more messages ! if (m_luaConsole && !m_luaConsole->IsBeingDeleted()) { ! m_luaConsole->Destroy(); ! m_luaConsole = NULL; } --- 325,332 ---- m_want_console = false; // no more messages ! if (m_luaConsoleWrapper.Ok() && !m_luaConsoleWrapper.GetConsole()->IsBeingDeleted()) { ! m_luaConsoleWrapper.GetConsole()->Destroy(); ! m_luaConsoleWrapper.SetConsole(NULL); } *************** *** 351,364 **** // If they closed the console, but specified they wanted it // on the command-line, recreate it. ! if (m_want_console && (m_luaConsole == NULL)) { ! m_luaConsole = new wxLuaConsole(NULL, ID_WXLUA_CONSOLE); ! m_luaConsole->Show(true); } if (!is_error) { ! if (m_luaConsole != NULL) ! m_luaConsole->DisplayText(msg); else { --- 350,363 ---- // If they closed the console, but specified they wanted it // on the command-line, recreate it. ! if (m_want_console && (!m_luaConsoleWrapper.Ok())) { ! m_luaConsoleWrapper.SetConsole(new wxLuaConsole(&m_luaConsoleWrapper, NULL, ID_WXLUA_CONSOLE)); ! m_luaConsoleWrapper.GetConsole()->Show(true); } if (!is_error) { ! if (m_luaConsoleWrapper.Ok()) ! m_luaConsoleWrapper.GetConsole()->DisplayText(msg); else { *************** *** 375,384 **** if (m_wxlDebugTarget != NULL) m_wxlDebugTarget->DisplayError(msg); ! else if (m_luaConsole != NULL) { ! m_luaConsole->DisplayText(msg); ! m_luaConsole->SetExitOnError(is_error); if (wxlState.Ok()) ! m_luaConsole->DisplayStack(wxlState); } else --- 374,383 ---- if (m_wxlDebugTarget != NULL) m_wxlDebugTarget->DisplayError(msg); ! else if (m_luaConsoleWrapper.Ok()) { ! m_luaConsoleWrapper.GetConsole()->DisplayText(msg); ! m_luaConsoleWrapper.GetConsole()->SetExitOnError(is_error); if (wxlState.Ok()) ! m_luaConsoleWrapper.GetConsole()->DisplayStack(wxlState); } else Index: wxlua.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/apps/wxlua/src/wxlua.h,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** wxlua.h 15 Jan 2008 01:04:04 -0000 1.24 --- wxlua.h 5 Dec 2008 05:57:21 -0000 1.25 *************** *** 35,44 **** void OnLua(wxLuaEvent &event); ! wxString m_programName; ! wxLuaState m_wxlState; ! wxLuaConsole *m_luaConsole; ! bool m_want_console; ! bool m_mem_bitmap_added; ! wxLuaDebugTarget *m_wxlDebugTarget; private: --- 35,44 ---- void OnLua(wxLuaEvent &event); ! wxString m_programName; ! wxLuaState m_wxlState; ! wxLuaConsoleWrapper m_luaConsoleWrapper; ! bool m_want_console; ! bool m_mem_bitmap_added; ! wxLuaDebugTarget* m_wxlDebugTarget; private: Index: lconsole.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/apps/wxlua/src/lconsole.cpp,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** lconsole.cpp 20 Jul 2007 01:39:05 -0000 1.18 --- lconsole.cpp 5 Dec 2008 05:57:21 -0000 1.19 *************** *** 28,36 **** #include "lconsole.h" - // Only include this for the wxlua app, wxluaedit includes this whole file. - #ifndef WXLUAEDITOR_APP - #include "wxlua.h" - #endif //WXLUAEDITOR_APP - // ---------------------------------------------------------------------------- // wxLuaConsole --- 28,31 ---- *************** *** 41,48 **** END_EVENT_TABLE() ! wxLuaConsole::wxLuaConsole(wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style, const wxString& name) ! :wxFrame(parent, id, title, pos, size, style, name), m_exit_on_error(false) { SetIcon(wxICON(LUA)); --- 36,45 ---- END_EVENT_TABLE() ! wxLuaConsole::wxLuaConsole(wxLuaConsoleWrapper* consoleWrapper, ! wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style, const wxString& name) ! :wxFrame(parent, id, title, pos, size, style, name), ! m_wrapper(consoleWrapper), m_exit_on_error(false) { SetIcon(wxICON(LUA)); *************** *** 65,73 **** void wxLuaConsole::OnCloseWindow(wxCloseEvent&) { ! // Must NULL the console in the app so it won't be used. // Using EVT_DESTROY in the app causes a segfault if this is deleted ! // in wxApp::OnExit and through this is ugly, it works. ! if (wxGetApp().m_luaConsole == this) ! wxGetApp().m_luaConsole = NULL; Destroy(); --- 62,70 ---- void wxLuaConsole::OnCloseWindow(wxCloseEvent&) { ! // Must NULL the console so nobody will try to still use it. // Using EVT_DESTROY in the app causes a segfault if this is deleted ! // in wxApp::OnExit() and though this is ugly, it works. ! if (m_wrapper) ! m_wrapper->SetConsole(NULL); Destroy(); *************** *** 130,131 **** --- 127,140 ---- } } + + // --------------------------------------------------------------------------- + // wxLuaConsoleWrapper + // --------------------------------------------------------------------------- + + wxLuaConsole* wxLuaConsoleWrapper::GetConsole() + { + wxCHECK_MSG(m_luaConsole != NULL, NULL, wxT("Member wxLuaConsole is NULL!")); + return m_luaConsole; + } + + |
From: John L. <jr...@us...> - 2008-12-05 04:31:36
|
Update of /cvsroot/wxlua/wxLua/modules/wxbind/src In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv5399/wxLua/modules/wxbind/src Modified Files: wxcore_bind.cpp Log Message: Added wxFIXED_MINSIZE Index: wxcore_bind.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/src/wxcore_bind.cpp,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** wxcore_bind.cpp 4 Dec 2008 05:12:38 -0000 1.19 --- wxcore_bind.cpp 5 Dec 2008 04:31:31 -0000 1.20 *************** *** 1056,1059 **** --- 1056,1063 ---- { "wxFIXED_LENGTH", wxFIXED_LENGTH }, + #if wxCHECK_VERSION(2,8,8) + { "wxFIXED_MINSIZE", wxFIXED_MINSIZE }, + #endif // wxCHECK_VERSION(2,8,8) + #if (wxLUA_USE_wxSizer) && (wxCHECK_VERSION(2,8,0)) { "wxFLEX_GROWMODE_ALL", wxFLEX_GROWMODE_ALL }, *************** *** 1972,1975 **** --- 1976,1983 ---- #endif // wxLUA_USE_wxRadioButton && wxUSE_RADIOBTN + #if wxCHECK_VERSION(2,8,8) + { "wxRESERVE_SPACE_EVEN_IF_HIDDEN", wxRESERVE_SPACE_EVEN_IF_HIDDEN }, + #endif // wxCHECK_VERSION(2,8,8) + { "wxRESET", wxRESET }, |
From: John L. <jr...@us...> - 2008-12-05 04:31:36
|
Update of /cvsroot/wxlua/wxLua/bindings/wxwidgets In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv5399/wxLua/bindings/wxwidgets Modified Files: wx_datatypes.lua wxcore_defsutils.i Log Message: Added wxFIXED_MINSIZE Index: wx_datatypes.lua =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxwidgets/wx_datatypes.lua,v retrieving revision 1.97 retrieving revision 1.98 diff -C2 -d -r1.97 -r1.98 *** wx_datatypes.lua 4 Dec 2008 05:12:38 -0000 1.97 --- wx_datatypes.lua 5 Dec 2008 04:31:30 -0000 1.98 *************** *** 4453,4456 **** --- 4453,4457 ---- ["%wxchkver_2_8_5"] = "wxCHECK_VERSION(2,8,5)", ["%wxchkver_2_8_6"] = "wxCHECK_VERSION(2,8,6)", + ["%wxchkver_2_8_8"] = "wxCHECK_VERSION(2,8,8)", ["%wxcompat_2_4"] = "(defined(WXWIN_COMPATIBILITY_2_4) && WXWIN_COMPATIBILITY_2_4)", ["%wxcompat_2_6"] = "(defined(WXWIN_COMPATIBILITY_2_6) && WXWIN_COMPATIBILITY_2_6)", Index: wxcore_defsutils.i =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxwidgets/wxcore_defsutils.i,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** wxcore_defsutils.i 18 Dec 2007 01:03:32 -0000 1.4 --- wxcore_defsutils.i 5 Dec 2008 04:31:30 -0000 1.5 *************** *** 454,459 **** wxEXPAND wxSHAPED - wxADJUST_MINSIZE wxTILE %endenum --- 454,463 ---- wxEXPAND wxSHAPED wxTILE + + wxADJUST_MINSIZE // deprecated after 2.4 and takes the value of 0 + + %wxchkver_2_8_8 wxFIXED_MINSIZE + %wxchkver_2_8_8 wxRESERVE_SPACE_EVEN_IF_HIDDEN %endenum |
From: John L. <jr...@us...> - 2008-12-04 05:20:28
|
Update of /cvsroot/wxlua/website In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv16302/website Modified Files: download.php Log Message: Add link to Maemo wxLua on download page Index: download.php =================================================================== RCS file: /cvsroot/wxlua/website/download.php,v retrieving revision 1.30 retrieving revision 1.31 diff -C2 -d -r1.30 -r1.31 *** download.php 20 Feb 2008 05:18:58 -0000 1.30 --- download.php 4 Dec 2008 05:20:23 -0000 1.31 *************** *** 99,102 **** --- 99,109 ---- <div class="indented"> + <h2 id="mac">...for Maemo</h2> + <p>Run wxLua on your Nokia N810 (possibly N770) using the Maemo platform. + Please visit Charles Shapiro's website, <a href="http://tomshiro.org/lua-maemo/">http://tomshiro.org/lua-maemo/</a>, for more information. + </p> + </div> + + <div class="indented"> <h2 id="sources">Sources</h2> <p>Source packages are available in two formats which contain exactly the same things:</p> |
From: John L. <jr...@us...> - 2008-12-04 05:12:50
|
Update of /cvsroot/wxlua/wxLua/modules/wxbind/include In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv16045/wxLua/modules/wxbind/include Modified Files: wxcore_bind.h Log Message: Added wxTextUrlEvent to the bindings. Index: wxcore_bind.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/include/wxcore_bind.h,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** wxcore_bind.h 22 Oct 2008 05:31:45 -0000 1.16 --- wxcore_bind.h 4 Dec 2008 05:12:38 -0000 1.17 *************** *** 1677,1680 **** --- 1677,1683 ---- extern WXDLLIMPEXP_BINDWXCORE wxLuaBindMethod wxTextCtrl_methods[]; extern WXDLLIMPEXP_DATA_BINDWXCORE(int) wxTextCtrl_methodCount; + extern WXDLLIMPEXP_DATA_BINDWXCORE(int) wxluatype_wxTextUrlEvent; + extern WXDLLIMPEXP_BINDWXCORE wxLuaBindMethod wxTextUrlEvent_methods[]; + extern WXDLLIMPEXP_DATA_BINDWXCORE(int) wxTextUrlEvent_methodCount; #endif // wxLUA_USE_wxTextCtrl && wxUSE_TEXTCTRL |
From: John L. <jr...@us...> - 2008-12-04 05:12:44
|
Update of /cvsroot/wxlua/wxLua/modules/wxbind/src In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv16045/wxLua/modules/wxbind/src Modified Files: wxcore_bind.cpp wxcore_controls.cpp Log Message: Added wxTextUrlEvent to the bindings. Index: wxcore_bind.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/src/wxcore_bind.cpp,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** wxcore_bind.cpp 21 Oct 2008 04:23:18 -0000 1.18 --- wxcore_bind.cpp 4 Dec 2008 05:12:38 -0000 1.19 *************** *** 218,223 **** { "wxEVT_COMMAND_TEXT_UPDATED", &wxEVT_COMMAND_TEXT_UPDATED, &wxluatype_wxCommandEvent }, - { "wxEVT_COMMAND_TEXT_URL", &wxEVT_COMMAND_TEXT_URL, &wxluatype_wxCommandEvent }, #if wxCHECK_VERSION(2,4,0) { "wxEVT_COMMAND_TOGGLEBUTTON_CLICKED", &wxEVT_COMMAND_TOGGLEBUTTON_CLICKED, &wxluatype_wxCommandEvent }, --- 218,227 ---- { "wxEVT_COMMAND_TEXT_UPDATED", &wxEVT_COMMAND_TEXT_UPDATED, &wxluatype_wxCommandEvent }, + #if !wxCHECK_VERSION(2,8,0) + { "wxEVT_COMMAND_TEXT_URL", &wxEVT_COMMAND_TEXT_URL, &wxluatype_wxCommandEvent }, + #elif (wxCHECK_VERSION(2,8,0)) && (wxLUA_USE_wxTextCtrl && wxUSE_TEXTCTRL) + { "wxEVT_COMMAND_TEXT_URL", &wxEVT_COMMAND_TEXT_URL, &wxluatype_wxTextUrlEvent }, + #endif // (wxCHECK_VERSION(2,8,0)) && (wxLUA_USE_wxTextCtrl && wxUSE_TEXTCTRL) #if wxCHECK_VERSION(2,4,0) { "wxEVT_COMMAND_TOGGLEBUTTON_CLICKED", &wxEVT_COMMAND_TOGGLEBUTTON_CLICKED, &wxluatype_wxCommandEvent }, *************** *** 4949,4952 **** --- 4953,4960 ---- #endif // wxUSE_TEXTDLG && wxLUA_USE_wxTextEntryDialog + #if wxLUA_USE_wxTextCtrl && wxUSE_TEXTCTRL + { "wxTextUrlEvent", wxTextUrlEvent_methods, wxTextUrlEvent_methodCount, CLASSINFO(wxTextUrlEvent), &wxluatype_wxTextUrlEvent, "wxCommandEvent", NULL ,g_wxluanumberArray_None, 0, }, + #endif // wxLUA_USE_wxTextCtrl && wxUSE_TEXTCTRL + #if (wxLUA_USE_wxValidator && wxUSE_VALIDATORS) && (wxLUA_USE_wxTextValidator) { "wxTextValidator", wxTextValidator_methods, wxTextValidator_methodCount, CLASSINFO(wxTextValidator), &wxluatype_wxTextValidator, "wxValidator", NULL ,g_wxluanumberArray_None, 0, }, Index: wxcore_controls.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/src/wxcore_controls.cpp,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** wxcore_controls.cpp 29 Oct 2008 04:44:33 -0000 1.16 --- wxcore_controls.cpp 4 Dec 2008 05:12:38 -0000 1.17 *************** *** 9243,9246 **** --- 9243,9348 ---- + #if wxLUA_USE_wxTextCtrl && wxUSE_TEXTCTRL + // --------------------------------------------------------------------------- + // Bind class wxTextUrlEvent + // --------------------------------------------------------------------------- + + // Lua MetaTable Tag for Class 'wxTextUrlEvent' + int wxluatype_wxTextUrlEvent = WXLUA_TUNKNOWN; + + static wxLuaArgType s_wxluatypeArray_wxLua_wxTextUrlEvent_GetMouseEvent[] = { &wxluatype_wxTextUrlEvent, NULL }; + static int LUACALL wxLua_wxTextUrlEvent_GetMouseEvent(lua_State *L); + static wxLuaBindCFunc s_wxluafunc_wxLua_wxTextUrlEvent_GetMouseEvent[1] = {{ wxLua_wxTextUrlEvent_GetMouseEvent, WXLUAMETHOD_METHOD, 1, 1, s_wxluatypeArray_wxLua_wxTextUrlEvent_GetMouseEvent }}; + // const wxMouseEvent& GetMouseEvent() const + static int LUACALL wxLua_wxTextUrlEvent_GetMouseEvent(lua_State *L) + { + // get this + wxTextUrlEvent * self = (wxTextUrlEvent *)wxluaT_getuserdatatype(L, 1, wxluatype_wxTextUrlEvent); + // call GetMouseEvent + const wxMouseEvent* returns = &self->GetMouseEvent(); + // push the result datatype + wxluaT_pushuserdatatype(L, returns, wxluatype_wxMouseEvent); + + return 1; + } + + static wxLuaArgType s_wxluatypeArray_wxLua_wxTextUrlEvent_GetURLEnd[] = { &wxluatype_wxTextUrlEvent, NULL }; + static int LUACALL wxLua_wxTextUrlEvent_GetURLEnd(lua_State *L); + static wxLuaBindCFunc s_wxluafunc_wxLua_wxTextUrlEvent_GetURLEnd[1] = {{ wxLua_wxTextUrlEvent_GetURLEnd, WXLUAMETHOD_METHOD, 1, 1, s_wxluatypeArray_wxLua_wxTextUrlEvent_GetURLEnd }}; + // long GetURLEnd() const + static int LUACALL wxLua_wxTextUrlEvent_GetURLEnd(lua_State *L) + { + // get this + wxTextUrlEvent * self = (wxTextUrlEvent *)wxluaT_getuserdatatype(L, 1, wxluatype_wxTextUrlEvent); + // call GetURLEnd + long returns = (self->GetURLEnd()); + // push the result number + lua_pushnumber(L, returns); + + return 1; + } + + static wxLuaArgType s_wxluatypeArray_wxLua_wxTextUrlEvent_GetURLStart[] = { &wxluatype_wxTextUrlEvent, NULL }; + static int LUACALL wxLua_wxTextUrlEvent_GetURLStart(lua_State *L); + static wxLuaBindCFunc s_wxluafunc_wxLua_wxTextUrlEvent_GetURLStart[1] = {{ wxLua_wxTextUrlEvent_GetURLStart, WXLUAMETHOD_METHOD, 1, 1, s_wxluatypeArray_wxLua_wxTextUrlEvent_GetURLStart }}; + // long GetURLStart() const + static int LUACALL wxLua_wxTextUrlEvent_GetURLStart(lua_State *L) + { + // get this + wxTextUrlEvent * self = (wxTextUrlEvent *)wxluaT_getuserdatatype(L, 1, wxluatype_wxTextUrlEvent); + // call GetURLStart + long returns = (self->GetURLStart()); + // push the result number + lua_pushnumber(L, returns); + + return 1; + } + + static wxLuaArgType s_wxluatypeArray_wxLua_wxTextUrlEvent_delete[] = { &wxluatype_wxTextUrlEvent, NULL }; + static wxLuaBindCFunc s_wxluafunc_wxLua_wxTextUrlEvent_delete[1] = {{ wxlua_userdata_delete, WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, 1, 1, s_wxluatypeArray_wxLua_wxTextUrlEvent_delete }}; + + static wxLuaArgType s_wxluatypeArray_wxLua_wxTextUrlEvent_constructor[] = { &wxluatype_TNUMBER, &wxluatype_wxMouseEvent, &wxluatype_TNUMBER, &wxluatype_TNUMBER, NULL }; + static int LUACALL wxLua_wxTextUrlEvent_constructor(lua_State *L); + static wxLuaBindCFunc s_wxluafunc_wxLua_wxTextUrlEvent_constructor[1] = {{ wxLua_wxTextUrlEvent_constructor, WXLUAMETHOD_CONSTRUCTOR, 4, 4, s_wxluatypeArray_wxLua_wxTextUrlEvent_constructor }}; + // wxTextUrlEvent(int winid, const wxMouseEvent& evtMouse, long start, long end) + static int LUACALL wxLua_wxTextUrlEvent_constructor(lua_State *L) + { + // long end + long end = (long)wxlua_getnumbertype(L, 4); + // long start + long start = (long)wxlua_getnumbertype(L, 3); + // const wxMouseEvent evtMouse + const wxMouseEvent * evtMouse = (const wxMouseEvent *)wxluaT_getuserdatatype(L, 2, wxluatype_wxMouseEvent); + // int winid + int winid = (int)wxlua_getnumbertype(L, 1); + // call constructor + wxTextUrlEvent* returns = new wxTextUrlEvent(winid, *evtMouse, start, end); + // add to tracked memory list + wxluaO_addgcobject(L, returns); + // push the constructed class pointer + wxluaT_pushuserdatatype(L, returns, wxluatype_wxTextUrlEvent); + + return 1; + } + + + + + // Map Lua Class Methods to C Binding Functions + wxLuaBindMethod wxTextUrlEvent_methods[] = { + { "GetMouseEvent", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxTextUrlEvent_GetMouseEvent, 1, NULL }, + { "GetURLEnd", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxTextUrlEvent_GetURLEnd, 1, NULL }, + { "GetURLStart", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxTextUrlEvent_GetURLStart, 1, NULL }, + { "delete", WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, s_wxluafunc_wxLua_wxTextUrlEvent_delete, 1, NULL }, + { "wxTextUrlEvent", WXLUAMETHOD_CONSTRUCTOR, s_wxluafunc_wxLua_wxTextUrlEvent_constructor, 1, NULL }, + + { 0, 0, 0, 0 }, + }; + + int wxTextUrlEvent_methodCount = sizeof(wxTextUrlEvent_methods)/sizeof(wxLuaBindMethod) - 1; + + #endif // wxLUA_USE_wxTextCtrl && wxUSE_TEXTCTRL + + #if wxLUA_USE_wxTreeCtrl && wxUSE_TREECTRL // --------------------------------------------------------------------------- |
From: John L. <jr...@us...> - 2008-12-04 05:12:44
|
Update of /cvsroot/wxlua/wxLua/bindings/wxwidgets In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv16045/wxLua/bindings/wxwidgets Modified Files: wx_datatypes.lua wxcore_controls.i wxcore_event.i Log Message: Added wxTextUrlEvent to the bindings. Index: wxcore_event.i =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxwidgets/wxcore_event.i,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** wxcore_event.i 21 Oct 2008 04:23:18 -0000 1.3 --- wxcore_event.i 4 Dec 2008 05:12:38 -0000 1.4 *************** *** 129,134 **** %define_event wxEVT_COMMAND_TEXT_ENTER // EVT_TEXT_ENTER(id, fn) %define_event wxEVT_COMMAND_TEXT_UPDATED // EVT_TEXT(id, fn) - %define_event wxEVT_COMMAND_TEXT_URL // EVT_TEXT_URL(id, fn) %define_event wxEVT_COMMAND_TEXT_MAXLEN // EVT_TEXT_MAXLEN(id, fn) %define_event wxEVT_COMMAND_SPINCTRL_UPDATED // EVT_SPINCTRL(id, fn) --- 129,134 ---- %define_event wxEVT_COMMAND_TEXT_ENTER // EVT_TEXT_ENTER(id, fn) %define_event wxEVT_COMMAND_TEXT_UPDATED // EVT_TEXT(id, fn) %define_event wxEVT_COMMAND_TEXT_MAXLEN // EVT_TEXT_MAXLEN(id, fn) + !%wxchkver_2_8_0 %define_event wxEVT_COMMAND_TEXT_URL // EVT_TEXT_URL(id, fn) %define_event wxEVT_COMMAND_SPINCTRL_UPDATED // EVT_SPINCTRL(id, fn) Index: wx_datatypes.lua =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxwidgets/wx_datatypes.lua,v retrieving revision 1.96 retrieving revision 1.97 diff -C2 -d -r1.96 -r1.97 *** wx_datatypes.lua 31 Oct 2008 05:25:08 -0000 1.96 --- wx_datatypes.lua 4 Dec 2008 05:12:38 -0000 1.97 *************** *** 3962,3965 **** --- 3962,3972 ---- ValueType = "class", }, + wxTextUrlEvent = { + BaseClass = "wxCommandEvent", + Condition = "wxLUA_USE_wxTextCtrl && wxUSE_TEXTCTRL", + IsNumber = false, + Name = "wxTextUrlEvent", + ValueType = "class", + }, wxTextValidator = { BaseClass = "wxValidator", *************** *** 4441,4444 **** --- 4448,4452 ---- ["%wxchkver_2_6_4"] = "wxCHECK_VERSION(2,6,4)", ["%wxchkver_2_8"] = "wxCHECK_VERSION(2,8,0)", + ["%wxchkver_2_8_0"] = "wxCHECK_VERSION(2,8,0)", ["%wxchkver_2_8_1"] = "wxCHECK_VERSION(2,8,1)", ["%wxchkver_2_8_4"] = "wxCHECK_VERSION(2,8,4)", Index: wxcore_controls.i =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxwidgets/wxcore_controls.i,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** wxcore_controls.i 22 Oct 2008 05:31:45 -0000 1.7 --- wxcore_controls.i 4 Dec 2008 05:12:38 -0000 1.8 *************** *** 960,963 **** --- 960,978 ---- %endclass + // --------------------------------------------------------------------------- + // wxTextUrlEvent + + %class %delete wxTextUrlEvent, wxCommandEvent + + %wxchkver_2_8_0 %define_event wxEVT_COMMAND_TEXT_URL // EVT_TEXT_URL(id, fn) + + wxTextUrlEvent(int winid, const wxMouseEvent& evtMouse, long start, long end) + + const wxMouseEvent& GetMouseEvent() const + long GetURLStart() const + long GetURLEnd() const + + %endclass + %endif //wxLUA_USE_wxTextCtrl && wxUSE_TEXTCTRL |
From: John L. <jr...@us...> - 2008-12-04 05:12:41
|
Update of /cvsroot/wxlua/wxLua/docs In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv16045/wxLua/docs Modified Files: changelog.txt Log Message: Added wxTextUrlEvent to the bindings. Index: changelog.txt =================================================================== RCS file: /cvsroot/wxlua/wxLua/docs/changelog.txt,v retrieving revision 1.66 retrieving revision 1.67 diff -C2 -d -r1.66 -r1.67 *** changelog.txt 3 Dec 2008 05:26:03 -0000 1.66 --- changelog.txt 4 Dec 2008 05:12:38 -0000 1.67 *************** *** 17,20 **** --- 17,21 ---- - Allow wxLuaState::RunString/Buffer() and friends to allow for values left on the stack. The default is to leave none as before. + - Added wxTextUrlEvent to the bindings. version 2.8.7.0 (released 02/02/2008) |