From: John L. <jr...@us...> - 2007-06-26 03:22:49
|
Update of /cvsroot/wxlua/wxLua/bindings/wxwidgets In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv15715/wxLua/bindings/wxwidgets Modified Files: appframe.i datetime.i sizer.i windows.i wx_datatypes.lua Log Message: Added more classes Updated lua 5.1.2 with patches 1-6 Made wxluasudoku a little faster Index: sizer.i =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxwidgets/sizer.i,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** sizer.i 25 Jun 2007 03:19:38 -0000 1.16 --- sizer.i 26 Jun 2007 03:22:04 -0000 1.17 *************** *** 10,13 **** --- 10,53 ---- %if wxLUA_USE_wxSizer + %if %wxchkver_2_8 + + // --------------------------------------------------------------------------- + // wxSizerFlags + + %class %delete %encapsulate %noclassinfo wxSizerFlags + wxSizerFlags(int proportion = 0) + + // setters for all sizer flags, they all return the object itself so that + // calls to them can be chained + + wxSizerFlags& Proportion(int proportion) + wxSizerFlags& Align(int alignment) // combination of wxAlignment values + wxSizerFlags& Expand() // wxEXPAND + + // some shortcuts for Align() + wxSizerFlags& Centre() //{ return Align(wxCENTRE); } + wxSizerFlags& Center() //{ return Centre(); } + wxSizerFlags& Left() //{ return Align(wxALIGN_LEFT); } + wxSizerFlags& Right() //{ return Align(wxALIGN_RIGHT); } + wxSizerFlags& Top() //{ return Align(wxALIGN_TOP); } + wxSizerFlags& Bottom() //{ return Align(wxALIGN_BOTTOM); } + + static int GetDefaultBorder() // default border size used by Border() below + wxSizerFlags& Border(int direction, int borderInPixels) + wxSizerFlags& Border(int direction = wxALL) + wxSizerFlags& DoubleBorder(int direction = wxALL) + + wxSizerFlags& TripleBorder(int direction = wxALL) + wxSizerFlags& HorzBorder() + wxSizerFlags& DoubleHorzBorder() + wxSizerFlags& Shaped() + wxSizerFlags& FixedMinSize() + + // accessors for wxSizer only + int GetProportion() const + int GetFlags() const + int GetBorderInPixels() const + %endclass + // --------------------------------------------------------------------------- // wxSizerItem *************** *** 148,153 **** %class wxFlexGridSizer, wxGridSizer ! wxFlexGridSizer(int rows, int cols, int vgap, int hgap) ! // wxFlexGridSizer(int cols, int vgap = 0, int hgap = 0) void AddGrowableCol( size_t idx, int proportion = 0 ) --- 188,193 ---- %class wxFlexGridSizer, wxGridSizer ! wxFlexGridSizer(int rows, int cols, int vgap=0, int hgap=0) ! // wxFlexGridSizer(int cols, int vgap = 0, int hgap = 0) // just use the above constructor void AddGrowableCol( size_t idx, int proportion = 0 ) Index: windows.i =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxwidgets/windows.i,v retrieving revision 1.48 retrieving revision 1.49 diff -C2 -d -r1.48 -r1.49 *** windows.i 25 Jun 2007 03:19:38 -0000 1.48 --- windows.i 26 Jun 2007 03:22:04 -0000 1.49 *************** *** 22,25 **** --- 22,35 ---- // --------------------------------------------------------------------------- + // wxWindowUpdateLocker - Note this only calls wxWindow::Freeze() -> Thaw() + + %include "wx/wupdlock.h" + + %class %delete %noclassinfo %encapsulate wxWindowUpdateLocker + // NOTE: ALWAYS delete() this when done since lua's gc may not delete it soon enough + wxWindowUpdateLocker(wxWindow *winToLock = NULL) + %endclass + + // --------------------------------------------------------------------------- // wxWindow %define wxSIMPLE_BORDER *************** *** 60,67 **** %endenum ! %mac|%x11|%motif %typedef WXWidget void* ! %gtk %typedef WXWidget unsigned long // GtkWidget* what could you do with it? ! %mgl %typedef WXWidget window_t ! %msw|%os2 %typedef WXWidget unsigned long %class %delete %noclassinfo %encapsulate wxVisualAttributes --- 70,77 ---- %endenum ! //%mac|%x11|%motif %typedef WXWidget void* ! //%gtk %typedef WXWidget unsigned long // GtkWidget* what could you do with it? ! //%mgl %typedef WXWidget window_t ! //%msw|%os2 %typedef WXWidget unsigned long %class %delete %noclassinfo %encapsulate wxVisualAttributes *************** *** 145,149 **** virtual wxColour GetForegroundColour() wxWindow* GetGrandParent() const ! WXWidget GetHandle() const virtual wxString GetHelpText() const int GetId() const --- 155,159 ---- virtual wxColour GetForegroundColour() wxWindow* GetGrandParent() const ! //WXWidget GetHandle() const virtual wxString GetHelpText() const int GetId() const Index: datetime.i =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxwidgets/datetime.i,v retrieving revision 1.33 retrieving revision 1.34 diff -C2 -d -r1.33 -r1.34 *** datetime.i 25 Jun 2007 03:19:37 -0000 1.33 --- datetime.i 26 Jun 2007 03:22:04 -0000 1.34 *************** *** 372,375 **** --- 372,395 ---- %endif //wxLUA_USE_wxTimer && wxUSE_TIMER + + // --------------------------------------------------------------------------- + // wxStopWatch + + %if wxLUA_USE_wxStopWatch && wxUSE_STOPWATCH + + %include "wx/stopwatch.h" + + %class %delete %noclassinfo %encapsulate wxStopWatch + wxStopWatch() // ctor starts the stop watch + + void Start(long t0 = 0) // start the stop watch at the moment t0 + void Pause() + void Resume() + long Time() const + %endclass + + %endif // wxLUA_USE_wxStopWatch && wxUSE_STOPWATCH + + // --------------------------------------------------------------------------- // wxCalendarCtrl Index: wx_datatypes.lua =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxwidgets/wx_datatypes.lua,v retrieving revision 1.77 retrieving revision 1.78 diff -C2 -d -r1.77 -r1.78 *** wx_datatypes.lua 25 Jun 2007 03:19:38 -0000 1.77 --- wx_datatypes.lua 26 Jun 2007 03:22:04 -0000 1.78 *************** *** 12,16 **** { WXHANDLE = "void *", - WXWidget = "unsigned long", ["wxDateTime::wxDateTime_t"] = "unsigned short", wxDouble = "double", --- 12,15 ---- *************** *** 385,389 **** wxBoxSizer = { BaseClass = "wxSizer", ! Condition = "wxLUA_USE_wxSizer", DefType = "class", IsNumber = false, --- 384,388 ---- wxBoxSizer = { BaseClass = "wxSizer", ! Condition = "(wxLUA_USE_wxSizer) && (wxCHECK_VERSION(2,8,0))", DefType = "class", IsNumber = false, *************** *** 1058,1062 **** }, wxEdge = { ! Condition = "wxLUA_USE_wxLayoutConstraints && (!wxCHECK_VERSION(2,6,0))", DefType = "enum", IsNumber = true, --- 1057,1061 ---- }, wxEdge = { ! Condition = "(wxLUA_USE_wxSizer) && (wxLUA_USE_wxLayoutConstraints && (!wxCHECK_VERSION(2,6,0)))", DefType = "enum", IsNumber = true, *************** *** 1274,1278 **** wxFlexGridSizer = { BaseClass = "wxGridSizer", ! Condition = "wxLUA_USE_wxSizer", DefType = "class", IsNumber = false, --- 1273,1277 ---- wxFlexGridSizer = { BaseClass = "wxGridSizer", ! Condition = "(wxLUA_USE_wxSizer) && (wxCHECK_VERSION(2,8,0))", DefType = "class", IsNumber = false, *************** *** 1280,1284 **** }, wxFlexSizerGrowMode = { ! Condition = "wxLUA_USE_wxSizer", DefType = "enum", IsNumber = true, --- 1279,1283 ---- }, wxFlexSizerGrowMode = { ! Condition = "(wxLUA_USE_wxSizer) && (wxCHECK_VERSION(2,8,0))", DefType = "enum", IsNumber = true, *************** *** 1387,1391 **** }, wxGBPosition = { ! Condition = "wxLUA_USE_wxSizer", DefType = "class", Encapsulate = true, --- 1386,1390 ---- }, wxGBPosition = { ! Condition = "(wxLUA_USE_wxSizer) && (wxCHECK_VERSION(2,8,0))", DefType = "class", Encapsulate = true, *************** *** 1395,1399 **** wxGBSizerItem = { BaseClass = "wxSizerItem", ! Condition = "wxLUA_USE_wxSizer", DefType = "class", IsNumber = false, --- 1394,1398 ---- wxGBSizerItem = { BaseClass = "wxSizerItem", ! Condition = "(wxLUA_USE_wxSizer) && (wxCHECK_VERSION(2,8,0))", DefType = "class", IsNumber = false, *************** *** 1401,1405 **** }, wxGBSpan = { ! Condition = "wxLUA_USE_wxSizer", DefType = "class", Encapsulate = true, --- 1400,1404 ---- }, wxGBSpan = { ! Condition = "(wxLUA_USE_wxSizer) && (wxCHECK_VERSION(2,8,0))", DefType = "class", Encapsulate = true, *************** *** 1470,1474 **** wxGridBagSizer = { BaseClass = "wxFlexGridSizer", ! Condition = "wxLUA_USE_wxSizer", DefType = "class", IsNumber = false, --- 1469,1473 ---- wxGridBagSizer = { BaseClass = "wxFlexGridSizer", ! Condition = "(wxLUA_USE_wxSizer) && (wxCHECK_VERSION(2,8,0))", DefType = "class", IsNumber = false, *************** *** 1651,1655 **** wxGridSizer = { BaseClass = "wxSizer", ! Condition = "wxLUA_USE_wxSizer", DefType = "class", IsNumber = false, --- 1650,1654 ---- wxGridSizer = { BaseClass = "wxSizer", ! Condition = "(wxLUA_USE_wxSizer) && (wxCHECK_VERSION(2,8,0))", DefType = "class", IsNumber = false, *************** *** 1990,1994 **** wxIndividualLayoutConstraint = { BaseClass = "wxObject", ! Condition = "wxLUA_USE_wxLayoutConstraints && (!wxCHECK_VERSION(2,6,0))", DefType = "class", IsNumber = false, --- 1989,1993 ---- wxIndividualLayoutConstraint = { BaseClass = "wxObject", ! Condition = "(wxLUA_USE_wxSizer) && (wxLUA_USE_wxLayoutConstraints && (!wxCHECK_VERSION(2,6,0)))", DefType = "class", IsNumber = false, *************** *** 2111,2115 **** wxLayoutConstraints = { BaseClass = "wxObject", ! Condition = "wxLUA_USE_wxLayoutConstraints && (!wxCHECK_VERSION(2,6,0))", DefType = "class", IsNumber = false, --- 2110,2114 ---- wxLayoutConstraints = { BaseClass = "wxObject", ! Condition = "(wxLUA_USE_wxSizer) && (wxLUA_USE_wxLayoutConstraints && (!wxCHECK_VERSION(2,6,0)))", DefType = "class", IsNumber = false, *************** *** 2223,2227 **** }, wxLog = { ! Condition = "wxUSE_LOG", DefType = "class", Encapsulate = true, --- 2222,2226 ---- }, wxLog = { ! Condition = "wxLUA_USE_wxLog && wxUSE_LOG", DefType = "class", Encapsulate = true, *************** *** 2231,2235 **** wxLogBuffer = { BaseClass = "wxLog", ! Condition = "wxUSE_LOG", DefType = "class", Encapsulate = true, --- 2230,2234 ---- wxLogBuffer = { BaseClass = "wxLog", ! Condition = "wxLUA_USE_wxLog && wxUSE_LOG", DefType = "class", Encapsulate = true, *************** *** 2239,2243 **** wxLogChain = { BaseClass = "wxLog", ! Condition = "wxUSE_LOG", DefType = "class", Encapsulate = true, --- 2238,2242 ---- wxLogChain = { BaseClass = "wxLog", ! Condition = "wxLUA_USE_wxLog && wxUSE_LOG", DefType = "class", Encapsulate = true, *************** *** 2245,2251 **** Name = "wxLogChain", }, wxLogNull = { BaseClass = "wxLog", ! Condition = "wxUSE_LOG", DefType = "class", Encapsulate = true, --- 2244,2258 ---- Name = "wxLogChain", }, + wxLogGui = { + BaseClass = "wxLog", + Condition = "(wxLUA_USE_wxLog && wxUSE_LOG) && (wxUSE_LOGGUI)", + DefType = "class", + Encapsulate = true, + IsNumber = false, + Name = "wxLogGui", + }, wxLogNull = { BaseClass = "wxLog", ! Condition = "wxLUA_USE_wxLog && wxUSE_LOG", DefType = "class", Encapsulate = true, *************** *** 2255,2259 **** wxLogPassThrough = { BaseClass = "wxLogChain", ! Condition = "wxUSE_LOG", DefType = "class", Encapsulate = true, --- 2262,2266 ---- wxLogPassThrough = { BaseClass = "wxLogChain", ! Condition = "wxLUA_USE_wxLog && wxUSE_LOG", DefType = "class", Encapsulate = true, *************** *** 2261,2264 **** --- 2268,2287 ---- Name = "wxLogPassThrough", }, + wxLogTextCtrl = { + BaseClass = "wxLog", + Condition = "(wxLUA_USE_wxLog && wxUSE_LOG) && (wxLUA_USE_wxTextCtrl && wxUSE_TEXTCTRL)", + DefType = "class", + Encapsulate = true, + IsNumber = false, + Name = "wxLogTextCtrl", + }, + wxLogWindow = { + BaseClass = "wxLogPassThrough", + Condition = "(wxLUA_USE_wxLog && wxUSE_LOG) && (wxLUA_USE_wxLogWindow && wxUSE_LOGWINDOW)", + DefType = "class", + Encapsulate = true, + IsNumber = false, + Name = "wxLogWindow", + }, wxLongLong = { Condition = "wxUSE_LONGLONG", *************** *** 2536,2540 **** wxNotebookSizer = { BaseClass = "wxSizer", ! Condition = "(wxLUA_USE_wxSizer) && (wxUSE_NOTEBOOK && (!wxCHECK_VERSION(2,6,0)))", DefType = "class", IsNumber = false, --- 2559,2563 ---- wxNotebookSizer = { BaseClass = "wxSizer", ! Condition = "(wxLUA_USE_wxSizer) && (wxCHECK_VERSION(2,8,0)) && (wxUSE_NOTEBOOK && (!wxCHECK_VERSION(2,6,0)))", DefType = "class", IsNumber = false, *************** *** 2976,2980 **** }, wxRelationship = { ! Condition = "wxLUA_USE_wxLayoutConstraints && (!wxCHECK_VERSION(2,6,0))", DefType = "enum", IsNumber = true, --- 2999,3003 ---- }, wxRelationship = { ! Condition = "(wxLUA_USE_wxSizer) && (wxLUA_USE_wxLayoutConstraints && (!wxCHECK_VERSION(2,6,0)))", DefType = "enum", IsNumber = true, *************** *** 3093,3096 **** --- 3116,3126 ---- Name = "wxSingleChoiceDialog", }, + wxSingleInstanceChecker = { + Condition = "wxUSE_SNGLINST_CHECKER", + DefType = "class", + Encapsulate = true, + IsNumber = false, + Name = "wxSingleInstanceChecker", + }, wxSize = { Condition = "wxLUA_USE_wxPointSizeRect", *************** *** 3108,3119 **** wxSizer = { BaseClass = "wxObject", ! Condition = "wxLUA_USE_wxSizer", DefType = "class", IsNumber = false, Name = "wxSizer", }, wxSizerItem = { BaseClass = "wxObject", ! Condition = "wxLUA_USE_wxSizer", DefType = "class", IsNumber = false, --- 3138,3156 ---- wxSizer = { BaseClass = "wxObject", ! Condition = "(wxLUA_USE_wxSizer) && (wxCHECK_VERSION(2,8,0))", DefType = "class", IsNumber = false, Name = "wxSizer", }, + wxSizerFlags = { + Condition = "(wxLUA_USE_wxSizer) && (wxCHECK_VERSION(2,8,0))", + DefType = "class", + Encapsulate = true, + IsNumber = false, + Name = "wxSizerFlags", + }, wxSizerItem = { BaseClass = "wxObject", ! Condition = "(wxLUA_USE_wxSizer) && (wxCHECK_VERSION(2,8,0))", DefType = "class", IsNumber = false, *************** *** 3284,3288 **** wxStaticBoxSizer = { BaseClass = "wxBoxSizer", ! Condition = "(wxLUA_USE_wxSizer) && (wxUSE_STATBOX)", DefType = "class", IsNumber = false, --- 3321,3325 ---- wxStaticBoxSizer = { BaseClass = "wxBoxSizer", ! Condition = "(wxLUA_USE_wxSizer) && (wxCHECK_VERSION(2,8,0)) && (wxUSE_STATBOX)", DefType = "class", IsNumber = false, *************** *** 3312,3316 **** wxStdDialogButtonSizer = { BaseClass = "wxBoxSizer", ! Condition = "(wxLUA_USE_wxSizer) && (wxUSE_BUTTON)", DefType = "class", IsNumber = false, --- 3349,3353 ---- wxStdDialogButtonSizer = { BaseClass = "wxBoxSizer", ! Condition = "(wxLUA_USE_wxSizer) && (wxCHECK_VERSION(2,8,0)) && (wxUSE_BUTTON)", DefType = "class", IsNumber = false, *************** *** 3336,3339 **** --- 3373,3383 ---- Name = "wxStockGDI::Item", }, + wxStopWatch = { + Condition = "wxLUA_USE_wxStopWatch && wxUSE_STOPWATCH", + DefType = "class", + Encapsulate = true, + IsNumber = false, + Name = "wxStopWatch", + }, wxStreamBase = { Condition = "wxUSE_STREAMS", *************** *** 3851,3854 **** --- 3895,3904 ---- Name = "wxWindowList", }, + wxWindowUpdateLocker = { + DefType = "class", + Encapsulate = true, + IsNumber = false, + Name = "wxWindowUpdateLocker", + }, wxWindowVariant = { DefType = "enum", *************** *** 4076,4079 **** --- 4126,4131 ---- wxLUA_USE_wxListBox = "wxLUA_USE_wxListBox", wxLUA_USE_wxListCtrl = "wxLUA_USE_wxListCtrl", + wxLUA_USE_wxLog = "wxLUA_USE_wxLog", + wxLUA_USE_wxLogWindow = "wxLUA_USE_wxLogWindow", wxLUA_USE_wxLuaHtmlWindow = "wxLUA_USE_wxLuaHtmlWindow", wxLUA_USE_wxLuaPrintout = "wxLUA_USE_wxLuaPrintout", *************** *** 4115,4118 **** --- 4167,4171 ---- wxLUA_USE_wxStaticText = "wxLUA_USE_wxStaticText", wxLUA_USE_wxStatusBar = "wxLUA_USE_wxStatusBar", + wxLUA_USE_wxStopWatch = "wxLUA_USE_wxStopWatch", wxLUA_USE_wxStringList = "wxLUA_USE_wxStringList", wxLUA_USE_wxSystemOptions = "wxLUA_USE_wxSystemOptions", Index: appframe.i =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxwidgets/appframe.i,v retrieving revision 1.43 retrieving revision 1.44 diff -C2 -d -r1.43 -r1.44 *** appframe.i 25 Jun 2007 16:07:57 -0000 1.43 --- appframe.i 26 Jun 2007 03:22:04 -0000 1.44 *************** *** 11,15 **** // wxLog ! %if wxUSE_LOG %include "wx/log.h" --- 11,15 ---- // wxLog ! %if wxLUA_USE_wxLog && wxUSE_LOG %include "wx/log.h" *************** *** 135,143 **** // just treat it as a wxLog. ! /* %class %delete %noclassinfo %encapsulate wxLogGui, wxLog wxLogGui() %endclass ! */ // --------------------------------------------------------------------------- --- 135,145 ---- // just treat it as a wxLog. ! %if wxUSE_LOGGUI ! %class %delete %noclassinfo %encapsulate wxLogGui, wxLog wxLogGui() %endclass ! ! %endif // wxUSE_LOGGUI // --------------------------------------------------------------------------- *************** *** 178,183 **** */ ! %endif //wxUSE_LOG // --------------------------------------------------------------------------- --- 180,244 ---- */ ! // --------------------------------------------------------------------------- ! // wxLogTextCtrl ! ! %if wxLUA_USE_wxTextCtrl && wxUSE_TEXTCTRL ! ! %class %delete %noclassinfo %encapsulate wxLogTextCtrl, wxLog ! wxLogTextCtrl(wxTextCtrl* textCtrl); ! ! %endclass + %endif // wxLUA_USE_wxTextCtrl && wxUSE_TEXTCTRL + + // --------------------------------------------------------------------------- + // wxLogWindow + + %if wxLUA_USE_wxLogWindow && wxUSE_LOGWINDOW + + %class %delete %noclassinfo %encapsulate wxLogWindow, wxLogPassThrough + wxLogWindow(wxWindow *pParent, const wxString& szTitle, bool bShow = true, bool bPassToOld = true); + + void Show(bool show = true) + wxFrame * GetFrame() const + + //virtual void OnFrameCreate(wxFrame *frame) + //virtual bool OnFrameClose(wxFrame *frame) + //virtual void OnFrameDelete(wxFrame *frame) + %endclass + + %endif // wxLUA_USE_wxLogWindow && wxUSE_LOGWINDOW + + + %endif // wxLUA_USE_wxLog && wxUSE_LOG + + // --------------------------------------------------------------------------- + // wxSingleInstanceChecker + + %if wxUSE_SNGLINST_CHECKER + + %include "wx/snglinst.h" + + %class %delete %noclassinfo %encapsulate wxSingleInstanceChecker + wxSingleInstanceChecker() // default ctor, use Create() after it + // like Create() but no error checking (dangerous!) + //wxSingleInstanceChecker(const wxString& name, const wxString& path = "") + + // name must be given and be as unique as possible, it is used as the mutex + // name under Win32 and the lock file name under Unix - + // wxTheApp->GetAppName() may be a good value for this parameter + // + // path is optional and is ignored under Win32 and used as the directory to + // create the lock file in under Unix (default is wxGetHomeDir()) + // + // returns false if initialization failed, it doesn't mean that another + // instance is running - use IsAnotherRunning() to check it + bool Create(const wxString& name, const wxString& path = "") + + bool IsAnotherRunning() const // is another copy of this program already running? + + %endclass + + %endif // wxUSE_SNGLINST_CHECKER // --------------------------------------------------------------------------- |