Update of /cvsroot/wxlua/wxLua/bindings/wxwidgets In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7199/wxLua/bindings/wxwidgets Modified Files: appframe.i controls.i data.i datetime.i defsutil.i dialogs.i gdi.i mdi.i override.hpp print.i windows.i wx.rules Log Message: update for wx26/27 Add bindings for builtin (global) functions Handle %if statements for enums Index: appframe.i =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxwidgets/appframe.i,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** appframe.i 18 Jun 2005 20:45:58 -0000 1.2 --- appframe.i 17 Nov 2005 05:51:20 -0000 1.3 *************** *** 168,173 **** %include "wx/tooltip.h" ! %wxchkver22&!%wxchkver23 %class %noclassinfo wxToolTip, wxObject ! %wxchkver23 %class wxToolTip, wxObject wxToolTip(const wxString &tip) static void Enable(bool flag) --- 168,173 ---- %include "wx/tooltip.h" ! // !%wxchkver23 %class %noclassinfo wxToolTip, wxObject ! %class wxToolTip, wxObject wxToolTip(const wxString &tip) static void Enable(bool flag) *************** *** 231,235 **** wxTaskBarIcon() bool IsIconInstalled() ! %wxchkver24 bool IsOK() bool RemoveIcon() bool SetIcon(const wxIcon& icon, const wxString& tooltip) --- 231,235 ---- wxTaskBarIcon() bool IsIconInstalled() ! %wxchkver24 bool IsOk() bool RemoveIcon() bool SetIcon(const wxIcon& icon, const wxString& tooltip) Index: print.i =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxwidgets/print.i,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** print.i 18 Jun 2005 20:45:59 -0000 1.2 --- print.i 17 Nov 2005 05:51:20 -0000 1.3 *************** *** 186,202 **** int GetOrientation() wxPaperSize GetPaperId() ! const wxString& GetPrinterName() wxPrintQuality GetQuality() %wxchkver25 wxPrintBin GetBin() const ! const wxSize& GetPaperSize() ! const wxString& GetPrinterCommand() ! const wxString& GetPrinterOptions() ! const wxString& GetPreviewCommand() ! const wxString& GetFilename() ! const wxString& GetFontMetricPath() ! double GetPrinterScaleX() ! double GetPrinterScaleY() ! long GetPrinterTranslateX() ! long GetPrinterTranslateY() wxPrintMode GetPrintMode() void SetCollate(bool flag) --- 186,202 ---- int GetOrientation() wxPaperSize GetPaperId() ! wxString GetPrinterName() wxPrintQuality GetQuality() %wxchkver25 wxPrintBin GetBin() const ! wxSize GetPaperSize() ! !%wxchkver27 const wxString& GetPrinterCommand() ! !%wxchkver27 const wxString& GetPrinterOptions() ! !%wxchkver27 const wxString& GetPreviewCommand() ! wxString GetFilename() ! !%wxchkver27 const wxString& GetFontMetricPath() ! !%wxchkver27 double GetPrinterScaleX() ! !%wxchkver27 double GetPrinterScaleY() ! !%wxchkver27 long GetPrinterTranslateX() ! !%wxchkver27 long GetPrinterTranslateY() wxPrintMode GetPrintMode() void SetCollate(bool flag) *************** *** 218,241 **** void SetPaperSize(const wxSize& paperSize) %property=PaperSize, read, write ! void SetPrinterCommand(const wxString& command) ! %property=PrinterCommand, read, write ! void SetPrinterOptions(const wxString& options) ! %property=PrinterOptions, read, write ! void SetPreviewCommand(const wxString& command) ! %property=PreviewCommand, read, write void SetFilename(const wxString& filename) %property=Filename, read, write ! void SetFontMetricPath(const wxString& path) ! %property=FontMetricPath, read, write ! void SetPrinterScaleX(double x) ! %property=PrinterScaleX, read, write ! void SetPrinterScaleY(double y) ! %property=PrinterScaleY, read, write ! void SetPrinterScaling(double x, double y) ! void SetPrinterTranslateX(long x) ! %property=PrinterTranslateX, read, write ! void SetPrinterTranslateY(long y) ! %property=PrinterTranslateY, read, write ! void SetPrinterTranslation(long x, long y) %property=PrintMode, read, write void SetPrintMode(wxPrintMode printMode) --- 218,241 ---- void SetPaperSize(const wxSize& paperSize) %property=PaperSize, read, write ! !%wxchkver27 void SetPrinterCommand(const wxString& command) ! !%wxchkver27 %property=PrinterCommand, read, write ! !%wxchkver27 void SetPrinterOptions(const wxString& options) ! !%wxchkver27 %property=PrinterOptions, read, write ! !%wxchkver27 void SetPreviewCommand(const wxString& command) ! !%wxchkver27 %property=PreviewCommand, read, write void SetFilename(const wxString& filename) %property=Filename, read, write ! !%wxchkver27 void SetFontMetricPath(const wxString& path) ! !%wxchkver27 %property=FontMetricPath, read, write ! !%wxchkver27 void SetPrinterScaleX(double x) ! !%wxchkver27 %property=PrinterScaleX, read, write ! !%wxchkver27 void SetPrinterScaleY(double y) ! !%wxchkver27 %property=PrinterScaleY, read, write ! !%wxchkver27 void SetPrinterScaling(double x, double y) ! !%wxchkver27 void SetPrinterTranslateX(long x) ! !%wxchkver27 %property=PrinterTranslateX, read, write ! !%wxchkver27 void SetPrinterTranslateY(long y) ! !%wxchkver27 %property=PrinterTranslateY, read, write ! !%wxchkver27 void SetPrinterTranslation(long x, long y) %property=PrintMode, read, write void SetPrintMode(wxPrintMode printMode) *************** *** 309,314 **** // wxPrintDialog ! !%wxchkver26 %class wxPrintDialog, wxDialog ! %wxchkver26 %class wxPrintDialog, wxObject // FIXME how to make this work wxPrintDialog(wxWindow* parent, wxPrintDialogData* data = NULL) wxPrintDialogData& GetPrintDialogData() --- 309,314 ---- // wxPrintDialog ! //!%wxchkver26 %class wxPrintDialog, wxDialog ! %class wxPrintDialog, wxObject // FIXME how to make this work wxPrintDialog(wxWindow* parent, wxPrintDialogData* data = NULL) wxPrintDialogData& GetPrintDialogData() *************** *** 355,359 **** %property=PrintToFile, read, write void SetSelection(bool flag) ! void SetSetupDialog(bool flag) void SetToPage(int page) %property=ToPage, read, write --- 355,359 ---- %property=PrintToFile, read, write void SetSelection(bool flag) ! !%wxchkver27 void SetSetupDialog(bool flag) void SetToPage(int page) %property=ToPage, read, write Index: mdi.i =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxwidgets/mdi.i,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** mdi.i 18 Jun 2005 20:45:59 -0000 1.2 --- mdi.i 17 Nov 2005 05:51:20 -0000 1.3 *************** *** 9,12 **** --- 9,14 ---- %if wxLUA_USE_MDI + %include "wx/cmdproc.h" + /////////////////////////////////////////////////////////////////////////////// // wxMDIClientWindow *************** *** 95,99 **** wxString GetLastDirectory() const int GetMaxDocsOpen() ! int GetNoHistoryFiles() bool Initialize() bool MakeDefaultName(wxString& buf) // FIXME needs override to return string --- 97,102 ---- wxString GetLastDirectory() const int GetMaxDocsOpen() ! !%wxchkver26 int GetNoHistoryFiles() ! %wxchkver26 size_t GetHistoryFilesCount() const; bool Initialize() bool MakeDefaultName(wxString& buf) // FIXME needs override to return string Index: windows.i =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxwidgets/windows.i,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** windows.i 20 Jun 2005 06:55:23 -0000 1.3 --- windows.i 17 Nov 2005 05:51:20 -0000 1.4 *************** *** 39,43 **** void CentreOnParent(int direction = wxBOTH) void CentreOnScreen(int direction = wxBOTH) ! %wxchkver22&!%wxchkver25 void Clear() %wxchkver25 void ClearBackground() virtual void ClientToScreen(int* x, int* y) const --- 39,43 ---- void CentreOnParent(int direction = wxBOTH) void CentreOnScreen(int direction = wxBOTH) ! !%wxchkver25 void Clear() %wxchkver25 void ClearBackground() virtual void ClientToScreen(int* x, int* y) const *************** *** 86,90 **** // virtual void GetTextExtent(const wxString& string, int* x, int* y, int* descent = NULL, int* externalLeading = NULL, const wxFont* font = NULL, bool use16 = FALSE) const virtual void GetTextExtent(const wxString& string, int* x, int* y, int* descent = NULL, int* externalLeading = NULL, const wxFont* font = NULL ) const ! virtual wxString GetTitle() virtual wxRegion GetUpdateRegion() const wxValidator* GetValidator() const --- 86,90 ---- // virtual void GetTextExtent(const wxString& string, int* x, int* y, int* descent = NULL, int* externalLeading = NULL, const wxFont* font = NULL, bool use16 = FALSE) const virtual void GetTextExtent(const wxString& string, int* x, int* y, int* descent = NULL, int* externalLeading = NULL, const wxFont* font = NULL ) const ! !%wxchkver27 virtual wxString GetTitle() virtual wxRegion GetUpdateRegion() const wxValidator* GetValidator() const *************** *** 151,156 **** virtual void SetSizeHints(int minW = -1, int minH = -1, int maxW = -1, int maxH = -1, int incW = -1, int incH = -1) void SetSizer(wxSizer* sizer) ! virtual void SetTitle(const wxString& title) ! %property=Title, read, write virtual void SetValidator(const wxValidator& validator) %property=Validator, read, write --- 151,156 ---- virtual void SetSizeHints(int minW = -1, int minH = -1, int maxW = -1, int maxH = -1, int incW = -1, int incH = -1) void SetSizer(wxSizer* sizer) ! !%wxchkver27 virtual void SetTitle(const wxString& title) ! !%wxchkver27 %property=Title, read, write virtual void SetValidator(const wxValidator& validator) %property=Validator, read, write Index: gdi.i =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxwidgets/gdi.i,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** gdi.i 18 Jun 2005 20:45:59 -0000 1.3 --- gdi.i 17 Nov 2005 05:51:20 -0000 1.4 *************** *** 639,643 **** %include "wx/cursor.h" ! %enum wxStockCursor wxCURSOR_NONE wxCURSOR_ARROW --- 639,643 ---- %include "wx/cursor.h" ! %enum // wxStockCursor anonymous because we use wxStockCursor as wxCursor constructor wxCURSOR_NONE wxCURSOR_ARROW Index: override.hpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxwidgets/override.hpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** override.hpp 18 Jun 2005 20:45:59 -0000 1.2 --- override.hpp 17 Nov 2005 05:51:20 -0000 1.3 *************** *** 4140,4141 **** --- 4140,4169 ---- } %end + + %override builtin_wxFileSeparator + // %builtin wxString wxFileSeparator() + int LUACALL builtin_wxFileSeparator(lua_State *L) + { + // push the result string + lua_pushstring(L, wx2lua(wxFILE_SEP_PATH)); + return 1; + } + %end + + %override builtin_wxFileSize + // %builtin long wxFileSize(const wxString& fileName) + int LUACALL builtin_wxFileSize(lua_State *L) + { + wxString str = lua2wx(lua_tostring(L, 1)); + if (!str.IsEmpty()) + { + wxStructStat statstr; + wxStat(str, &statstr); + // push the result string + lua_pushnumber(L, (int)statstr.st_size); + + return 1; + } + return 0; + } + %end Index: datetime.i =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxwidgets/datetime.i,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** datetime.i 18 Jun 2005 20:45:58 -0000 1.2 --- datetime.i 17 Nov 2005 05:51:20 -0000 1.3 *************** *** 172,177 **** bool SetToLastWeekDay(wxDateTime::WeekDay weekday, wxDateTime::Month month = wxDateTime::Inv_Month, int year = wxDateTime::Inv_Year) wxDateTime GetLastWeekDay(wxDateTime::WeekDay weekday, wxDateTime::Month month = wxDateTime::Inv_Month, int year = wxDateTime::Inv_Year) ! bool SetToTheWeek(wxDateTime::wxDateTime_t numWeek, wxDateTime::WeekDay weekday = wxDateTime::Mon) ! wxDateTime GetWeek(wxDateTime::wxDateTime_t numWeek, wxDateTime::WeekDay weekday = wxDateTime::Mon) const %wxchkver25 static wxDateTime SetToWeekOfYear(int year, wxDateTime::wxDateTime_t numWeek, wxDateTime::WeekDay weekday = wxDateTime::Mon) wxDateTime& SetToLastMonthDay(wxDateTime::Month month = wxDateTime::Inv_Month, int year = wxDateTime::Inv_Year) --- 172,177 ---- bool SetToLastWeekDay(wxDateTime::WeekDay weekday, wxDateTime::Month month = wxDateTime::Inv_Month, int year = wxDateTime::Inv_Year) wxDateTime GetLastWeekDay(wxDateTime::WeekDay weekday, wxDateTime::Month month = wxDateTime::Inv_Month, int year = wxDateTime::Inv_Year) ! !%wxchkver26 bool SetToTheWeek(wxDateTime::wxDateTime_t numWeek, wxDateTime::WeekDay weekday = wxDateTime::Mon) ! !%wxchkver26 wxDateTime GetWeek(wxDateTime::wxDateTime_t numWeek, wxDateTime::WeekDay weekday = wxDateTime::Mon) const %wxchkver25 static wxDateTime SetToWeekOfYear(int year, wxDateTime::wxDateTime_t numWeek, wxDateTime::WeekDay weekday = wxDateTime::Mon) wxDateTime& SetToLastMonthDay(wxDateTime::Month month = wxDateTime::Inv_Month, int year = wxDateTime::Inv_Year) Index: wx.rules =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxwidgets/wx.rules,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** wx.rules 18 Jun 2005 20:53:41 -0000 1.1 --- wx.rules 17 Nov 2005 05:51:20 -0000 1.2 *************** *** 16,19 **** --- 16,21 ---- hook_event_file=hook_namespace.."_event" hook_event_fn="GetEventList_"..hook_namespace + hook_builtin_file=hook_namespace.."_builtin" + hook_builtin_fn="GetBuiltinList_"..hook_namespace hook_class_file=hook_namespace.."_class" hook_class_fn="GetClassList_"..hook_namespace Index: controls.i =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxwidgets/controls.i,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** controls.i 18 Jun 2005 20:45:58 -0000 1.2 --- controls.i 17 Nov 2005 05:51:20 -0000 1.3 *************** *** 342,346 **** int GetItemCount() const %property=ItemCount, read ! int GetItemSpacing(bool isSmall) const wxString GetItemText(long item) const long GetNextItem(long item, int geometry = wxLIST_NEXT_ALL, int state = wxLIST_STATE_DONTCARE) const --- 342,347 ---- int GetItemCount() const %property=ItemCount, read ! !%wxchkver26 int GetItemSpacing(bool isSmall) const ! %wxchkver26 wxSize GetItemSpacing() const wxString GetItemText(long item) const long GetNextItem(long item, int geometry = wxLIST_NEXT_ALL, int state = wxLIST_STATE_DONTCARE) const Index: defsutil.i =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxwidgets/defsutil.i,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** defsutil.i 20 Jun 2005 06:55:23 -0000 1.3 --- defsutil.i 17 Nov 2005 05:51:20 -0000 1.4 *************** *** 271,280 **** %endenum %endif - - %include "wx/txtstrm.h" - %enum wxEOL - wxEOL_NATIVE - wxEOL_UNIX - wxEOL_MAC - wxEOL_DOS - %endenum --- 271,272 ---- Index: data.i =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxwidgets/data.i,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** data.i 18 Jun 2005 20:45:58 -0000 1.2 --- data.i 17 Nov 2005 05:51:20 -0000 1.3 *************** *** 296,300 **** --- 296,310 ---- // wxStreamBase + %if wxUSE_STREAMS + %include "wx/stream.h" + %include "wx/txtstrm.h" + + %enum wxEOL + wxEOL_NATIVE + wxEOL_UNIX + wxEOL_MAC + wxEOL_DOS + %endenum %enum wxSeekMode // also used in file.i included here for streams *************** *** 353,356 **** --- 363,368 ---- %endclass + %endif // wxUSE_STREAMS + /////////////////////////////////////////////////////////////////////////////// // wxProtocol Index: dialogs.i =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxwidgets/dialogs.i,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** dialogs.i 18 Jun 2005 20:45:58 -0000 1.2 --- dialogs.i 17 Nov 2005 05:51:20 -0000 1.3 *************** *** 21,25 **** wxSAVE wxOVERWRITE_PROMPT ! wxHIDE_READONLY wxFILE_MUST_EXIST wxMULTIPLE --- 21,25 ---- wxSAVE wxOVERWRITE_PROMPT ! %wxcompat24 wxHIDE_READONLY wxFILE_MUST_EXIST wxMULTIPLE *************** *** 31,34 **** --- 31,35 ---- %if wxUSE_NUMBERDLG + %include "wx/numdlg.h" // FIXME not in 2.4 %builtin long wxGetNumberFromUser( const wxString& message, const wxString& prompt, const wxString& caption, long value, long min = 0, long max = 100, wxWindow *parent = NULL, const wxPoint& pos = wxDefaultPosition) %endif wxUSE_NUMBERDLG |