From 32958cea3a7d8645410781ba433c9b42421c854b Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Wed, 7 Jan 2004 20:44:56 +0000 Subject: [PATCH] reSWIGged git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@25083 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- wxPython/src/mac/controls_wrap.cpp | 8 +- wxPython/src/mac/gdi.py | 250 ++++++++++++++++++++++++++++- wxPython/src/mac/grid.py | 4 + wxPython/src/mac/grid_wrap.cpp | 2 +- wxPython/src/mac/misc_wrap.cpp | 4 +- wxPython/src/mac/windows_wrap.cpp | 10 +- 6 files changed, 261 insertions(+), 17 deletions(-) diff --git a/wxPython/src/mac/controls_wrap.cpp b/wxPython/src/mac/controls_wrap.cpp index fdfcbc2b59..e196777387 100644 --- a/wxPython/src/mac/controls_wrap.cpp +++ b/wxPython/src/mac/controls_wrap.cpp @@ -375,7 +375,7 @@ wxString wxTextCtrl_GetString(wxTextCtrl *self,long from,long to){ } static const wxString wxPyScrollBarNameStr(wxScrollBarNameStr); static const wxString wxPySPIN_BUTTON_NAME(wxSPIN_BUTTON_NAME); - static const wxString wxPySpinCtrlNameStr(wxT(_T("wxSpinCtrl"))); + static const wxString wxPySpinCtrlNameStr(_T("wxSpinCtrl")); static const wxString wxPyRadioBoxNameStr(wxRadioBoxNameStr); static const wxString wxPyRadioButtonNameStr(wxRadioButtonNameStr); @@ -383,7 +383,7 @@ wxString wxTextCtrl_GetString(wxTextCtrl *self,long from,long to){ static const wxString wxPySliderNameStr(wxSliderNameStr); - static const wxString wxPyToggleButtonNameStr(wxT(_T("wxToggleButton"))); + static const wxString wxPyToggleButtonNameStr(_T("wxToggleButton")); #ifdef __WXMAC__ // implement dummy classes and such for wxMac @@ -449,7 +449,7 @@ void wxToolBarBase_SetToolClientData(wxToolBarBase *self,int id,PyObject *client #include - static const wxString wxPyListCtrlNameStr(wxT(_T("wxListCtrl"))); + static const wxString wxPyListCtrlNameStr(_T("wxListCtrl")); void wxListItemAttr_Destroy(wxListItemAttr *self){ delete self; } // Python aware sorting function for wxPyListCtrl static int wxCALLBACK wxPyListCtrl_SortItems(long item1, long item2, long funcPtr) { @@ -553,7 +553,7 @@ wxWindow *wxPyListCtrl_GetMainWindow(wxPyListCtrl *self){ #include #include "wx/wxPython/pytree.h" - static const wxString wxPyTreeCtrlNameStr(wxT(_T("wxTreeCtrl"))); + static const wxString wxPyTreeCtrlNameStr(_T("wxTreeCtrl")); bool wxTreeItemId_operator_ee___(wxTreeItemId *self,wxTreeItemId const *other){ if (!other) return False; return *self == *other; diff --git a/wxPython/src/mac/gdi.py b/wxPython/src/mac/gdi.py index cfeb50db23..fc0e3724ad 100644 --- a/wxPython/src/mac/gdi.py +++ b/wxPython/src/mac/gdi.py @@ -2687,8 +2687,8 @@ class DC(core.Object): def DrawPolygonList(self, polygons, pens=None, brushes=None): - - + ## Note: This does not currently support fill style or offset + ## you can always use the non-List version if need be. if pens is None: pens = [] elif isinstance(pens, wx.Pen): @@ -2705,9 +2705,9 @@ class DC(core.Object): def DrawTextList(self, textList, coords, foregrounds = None, backgrounds = None, fonts = None): - - - + ## NOTE: this does not currently support changing the font + ## Make sure you set Background mode to wxSolid (DC.SetBackgroundMode) + ## If you want backgounds to do anything. if type(textList) == type(''): textList = [textList] elif len(textList) != len(coords): @@ -3020,6 +3020,246 @@ class PrinterDCPtr(PrinterDC): self.__class__ = PrinterDC _gdi.PrinterDC_swigregister(PrinterDCPtr) +class DC_old(DC): + """DC class that has methods with 2.4 compatible parameters.""" + FloodFill = DC.FloodFillXY + GetPixel = DC.GetPixelXY + DrawLine = DC.DrawLineXY + CrossHair = DC.CrossHairXY + DrawArc = DC.DrawArcXY + DrawCheckMark = DC.DrawCheckMarkXY + DrawEllipticArc = DC.DrawEllipticArcXY + DrawPoint = DC.DrawPointXY + DrawRectangle = DC.DrawRectangleXY + DrawRoundedRectangle = DC.DrawRoundedRectangleXY + DrawCircle = DC.DrawCircleXY + DrawEllipse = DC.DrawEllipseXY + DrawIcon = DC.DrawIconXY + DrawBitmap = DC.DrawBitmapXY + DrawText = DC.DrawTextXY + DrawRotatedText = DC.DrawRotatedTextXY + Blit = DC.BlitXY + +class MemoryDC_old(MemoryDC): + """DC class that has methods with 2.4 compatible parameters.""" + FloodFill = MemoryDC.FloodFillXY + GetPixel = MemoryDC.GetPixelXY + DrawLine = MemoryDC.DrawLineXY + CrossHair = MemoryDC.CrossHairXY + DrawArc = MemoryDC.DrawArcXY + DrawCheckMark = MemoryDC.DrawCheckMarkXY + DrawEllipticArc = MemoryDC.DrawEllipticArcXY + DrawPoint = MemoryDC.DrawPointXY + DrawRectangle = MemoryDC.DrawRectangleXY + DrawRoundedRectangle = MemoryDC.DrawRoundedRectangleXY + DrawCircle = MemoryDC.DrawCircleXY + DrawEllipse = MemoryDC.DrawEllipseXY + DrawIcon = MemoryDC.DrawIconXY + DrawBitmap = MemoryDC.DrawBitmapXY + DrawText = MemoryDC.DrawTextXY + DrawRotatedText = MemoryDC.DrawRotatedTextXY + Blit = MemoryDC.BlitXY + +class BufferedDC_old(BufferedDC): + """DC class that has methods with 2.4 compatible parameters.""" + FloodFill = BufferedDC.FloodFillXY + GetPixel = BufferedDC.GetPixelXY + DrawLine = BufferedDC.DrawLineXY + CrossHair = BufferedDC.CrossHairXY + DrawArc = BufferedDC.DrawArcXY + DrawCheckMark = BufferedDC.DrawCheckMarkXY + DrawEllipticArc = BufferedDC.DrawEllipticArcXY + DrawPoint = BufferedDC.DrawPointXY + DrawRectangle = BufferedDC.DrawRectangleXY + DrawRoundedRectangle = BufferedDC.DrawRoundedRectangleXY + DrawCircle = BufferedDC.DrawCircleXY + DrawEllipse = BufferedDC.DrawEllipseXY + DrawIcon = BufferedDC.DrawIconXY + DrawBitmap = BufferedDC.DrawBitmapXY + DrawText = BufferedDC.DrawTextXY + DrawRotatedText = BufferedDC.DrawRotatedTextXY + Blit = BufferedDC.BlitXY + +class BufferedPaintDC_old(BufferedPaintDC): + """DC class that has methods with 2.4 compatible parameters.""" + FloodFill = BufferedPaintDC.FloodFillXY + GetPixel = BufferedPaintDC.GetPixelXY + DrawLine = BufferedPaintDC.DrawLineXY + CrossHair = BufferedPaintDC.CrossHairXY + DrawArc = BufferedPaintDC.DrawArcXY + DrawCheckMark = BufferedPaintDC.DrawCheckMarkXY + DrawEllipticArc = BufferedPaintDC.DrawEllipticArcXY + DrawPoint = BufferedPaintDC.DrawPointXY + DrawRectangle = BufferedPaintDC.DrawRectangleXY + DrawRoundedRectangle = BufferedPaintDC.DrawRoundedRectangleXY + DrawCircle = BufferedPaintDC.DrawCircleXY + DrawEllipse = BufferedPaintDC.DrawEllipseXY + DrawIcon = BufferedPaintDC.DrawIconXY + DrawBitmap = BufferedPaintDC.DrawBitmapXY + DrawText = BufferedPaintDC.DrawTextXY + DrawRotatedText = BufferedPaintDC.DrawRotatedTextXY + Blit = BufferedPaintDC.BlitXY + +class ScreenDC_old(ScreenDC): + """DC class that has methods with 2.4 compatible parameters.""" + FloodFill = ScreenDC.FloodFillXY + GetPixel = ScreenDC.GetPixelXY + DrawLine = ScreenDC.DrawLineXY + CrossHair = ScreenDC.CrossHairXY + DrawArc = ScreenDC.DrawArcXY + DrawCheckMark = ScreenDC.DrawCheckMarkXY + DrawEllipticArc = ScreenDC.DrawEllipticArcXY + DrawPoint = ScreenDC.DrawPointXY + DrawRectangle = ScreenDC.DrawRectangleXY + DrawRoundedRectangle = ScreenDC.DrawRoundedRectangleXY + DrawCircle = ScreenDC.DrawCircleXY + DrawEllipse = ScreenDC.DrawEllipseXY + DrawIcon = ScreenDC.DrawIconXY + DrawBitmap = ScreenDC.DrawBitmapXY + DrawText = ScreenDC.DrawTextXY + DrawRotatedText = ScreenDC.DrawRotatedTextXY + Blit = ScreenDC.BlitXY + +class ClientDC_old(ClientDC): + """DC class that has methods with 2.4 compatible parameters.""" + FloodFill = ClientDC.FloodFillXY + GetPixel = ClientDC.GetPixelXY + DrawLine = ClientDC.DrawLineXY + CrossHair = ClientDC.CrossHairXY + DrawArc = ClientDC.DrawArcXY + DrawCheckMark = ClientDC.DrawCheckMarkXY + DrawEllipticArc = ClientDC.DrawEllipticArcXY + DrawPoint = ClientDC.DrawPointXY + DrawRectangle = ClientDC.DrawRectangleXY + DrawRoundedRectangle = ClientDC.DrawRoundedRectangleXY + DrawCircle = ClientDC.DrawCircleXY + DrawEllipse = ClientDC.DrawEllipseXY + DrawIcon = ClientDC.DrawIconXY + DrawBitmap = ClientDC.DrawBitmapXY + DrawText = ClientDC.DrawTextXY + DrawRotatedText = ClientDC.DrawRotatedTextXY + Blit = ClientDC.BlitXY + +class PaintDC_old(PaintDC): + """DC class that has methods with 2.4 compatible parameters.""" + FloodFill = PaintDC.FloodFillXY + GetPixel = PaintDC.GetPixelXY + DrawLine = PaintDC.DrawLineXY + CrossHair = PaintDC.CrossHairXY + DrawArc = PaintDC.DrawArcXY + DrawCheckMark = PaintDC.DrawCheckMarkXY + DrawEllipticArc = PaintDC.DrawEllipticArcXY + DrawPoint = PaintDC.DrawPointXY + DrawRectangle = PaintDC.DrawRectangleXY + DrawRoundedRectangle = PaintDC.DrawRoundedRectangleXY + DrawCircle = PaintDC.DrawCircleXY + DrawEllipse = PaintDC.DrawEllipseXY + DrawIcon = PaintDC.DrawIconXY + DrawBitmap = PaintDC.DrawBitmapXY + DrawText = PaintDC.DrawTextXY + DrawRotatedText = PaintDC.DrawRotatedTextXY + Blit = PaintDC.BlitXY + +class WindowDC_old(WindowDC): + """DC class that has methods with 2.4 compatible parameters.""" + FloodFill = WindowDC.FloodFillXY + GetPixel = WindowDC.GetPixelXY + DrawLine = WindowDC.DrawLineXY + CrossHair = WindowDC.CrossHairXY + DrawArc = WindowDC.DrawArcXY + DrawCheckMark = WindowDC.DrawCheckMarkXY + DrawEllipticArc = WindowDC.DrawEllipticArcXY + DrawPoint = WindowDC.DrawPointXY + DrawRectangle = WindowDC.DrawRectangleXY + DrawRoundedRectangle = WindowDC.DrawRoundedRectangleXY + DrawCircle = WindowDC.DrawCircleXY + DrawEllipse = WindowDC.DrawEllipseXY + DrawIcon = WindowDC.DrawIconXY + DrawBitmap = WindowDC.DrawBitmapXY + DrawText = WindowDC.DrawTextXY + DrawRotatedText = WindowDC.DrawRotatedTextXY + Blit = WindowDC.BlitXY + +class MirrorDC_old(MirrorDC): + """DC class that has methods with 2.4 compatible parameters.""" + FloodFill = MirrorDC.FloodFillXY + GetPixel = MirrorDC.GetPixelXY + DrawLine = MirrorDC.DrawLineXY + CrossHair = MirrorDC.CrossHairXY + DrawArc = MirrorDC.DrawArcXY + DrawCheckMark = MirrorDC.DrawCheckMarkXY + DrawEllipticArc = MirrorDC.DrawEllipticArcXY + DrawPoint = MirrorDC.DrawPointXY + DrawRectangle = MirrorDC.DrawRectangleXY + DrawRoundedRectangle = MirrorDC.DrawRoundedRectangleXY + DrawCircle = MirrorDC.DrawCircleXY + DrawEllipse = MirrorDC.DrawEllipseXY + DrawIcon = MirrorDC.DrawIconXY + DrawBitmap = MirrorDC.DrawBitmapXY + DrawText = MirrorDC.DrawTextXY + DrawRotatedText = MirrorDC.DrawRotatedTextXY + Blit = MirrorDC.BlitXY + +class PostScriptDC_old(PostScriptDC): + """DC class that has methods with 2.4 compatible parameters.""" + FloodFill = PostScriptDC.FloodFillXY + GetPixel = PostScriptDC.GetPixelXY + DrawLine = PostScriptDC.DrawLineXY + CrossHair = PostScriptDC.CrossHairXY + DrawArc = PostScriptDC.DrawArcXY + DrawCheckMark = PostScriptDC.DrawCheckMarkXY + DrawEllipticArc = PostScriptDC.DrawEllipticArcXY + DrawPoint = PostScriptDC.DrawPointXY + DrawRectangle = PostScriptDC.DrawRectangleXY + DrawRoundedRectangle = PostScriptDC.DrawRoundedRectangleXY + DrawCircle = PostScriptDC.DrawCircleXY + DrawEllipse = PostScriptDC.DrawEllipseXY + DrawIcon = PostScriptDC.DrawIconXY + DrawBitmap = PostScriptDC.DrawBitmapXY + DrawText = PostScriptDC.DrawTextXY + DrawRotatedText = PostScriptDC.DrawRotatedTextXY + Blit = PostScriptDC.BlitXY + +class MetaFileDC_old(MetaFileDC): + """DC class that has methods with 2.4 compatible parameters.""" + FloodFill = MetaFileDC.FloodFillXY + GetPixel = MetaFileDC.GetPixelXY + DrawLine = MetaFileDC.DrawLineXY + CrossHair = MetaFileDC.CrossHairXY + DrawArc = MetaFileDC.DrawArcXY + DrawCheckMark = MetaFileDC.DrawCheckMarkXY + DrawEllipticArc = MetaFileDC.DrawEllipticArcXY + DrawPoint = MetaFileDC.DrawPointXY + DrawRectangle = MetaFileDC.DrawRectangleXY + DrawRoundedRectangle = MetaFileDC.DrawRoundedRectangleXY + DrawCircle = MetaFileDC.DrawCircleXY + DrawEllipse = MetaFileDC.DrawEllipseXY + DrawIcon = MetaFileDC.DrawIconXY + DrawBitmap = MetaFileDC.DrawBitmapXY + DrawText = MetaFileDC.DrawTextXY + DrawRotatedText = MetaFileDC.DrawRotatedTextXY + Blit = MetaFileDC.BlitXY + +class PrinterDC_old(PrinterDC): + """DC class that has methods with 2.4 compatible parameters.""" + FloodFill = PrinterDC.FloodFillXY + GetPixel = PrinterDC.GetPixelXY + DrawLine = PrinterDC.DrawLineXY + CrossHair = PrinterDC.CrossHairXY + DrawArc = PrinterDC.DrawArcXY + DrawCheckMark = PrinterDC.DrawCheckMarkXY + DrawEllipticArc = PrinterDC.DrawEllipticArcXY + DrawPoint = PrinterDC.DrawPointXY + DrawRectangle = PrinterDC.DrawRectangleXY + DrawRoundedRectangle = PrinterDC.DrawRoundedRectangleXY + DrawCircle = PrinterDC.DrawCircleXY + DrawEllipse = PrinterDC.DrawEllipseXY + DrawIcon = PrinterDC.DrawIconXY + DrawBitmap = PrinterDC.DrawBitmapXY + DrawText = PrinterDC.DrawTextXY + DrawRotatedText = PrinterDC.DrawRotatedTextXY + Blit = PrinterDC.BlitXY + #--------------------------------------------------------------------------- IMAGELIST_DRAW_NORMAL = _gdi.IMAGELIST_DRAW_NORMAL diff --git a/wxPython/src/mac/grid.py b/wxPython/src/mac/grid.py index 79aaf7c929..2041b17b10 100644 --- a/wxPython/src/mac/grid.py +++ b/wxPython/src/mac/grid.py @@ -1224,6 +1224,10 @@ class Grid(windows.ScrolledWindow): wxGridSelectCells = _grid.Grid_wxGridSelectCells wxGridSelectRows = _grid.Grid_wxGridSelectRows wxGridSelectColumns = _grid.Grid_wxGridSelectColumns + SelectCells = wxGridSelectCells + SelectRows = wxGridSelectRows + SelectColumns = wxGridSelectColumns, + def CreateGrid(*args, **kwargs): """CreateGrid(int numRows, int numCols, WXGRIDSELECTIONMODES selmode=wxGridSelectCells) -> bool""" return _grid.Grid_CreateGrid(*args, **kwargs) diff --git a/wxPython/src/mac/grid_wrap.cpp b/wxPython/src/mac/grid_wrap.cpp index 51df4e5e19..75e4633cd0 100644 --- a/wxPython/src/mac/grid_wrap.cpp +++ b/wxPython/src/mac/grid_wrap.cpp @@ -282,7 +282,7 @@ static swig_type_info *swig_types[52]; static const wxString wxPyEmptyString(wxEmptyString); static const wxString wxPyPanelNameStr(wxPanelNameStr); - static const wxString wxPyDateTimeFormatStr(wxT(wxT("%c"))); + static const wxString wxPyDateTimeFormatStr(wxT("%c")); #define wxPyMake_TEMPLATE(TYPE) \ diff --git a/wxPython/src/mac/misc_wrap.cpp b/wxPython/src/mac/misc_wrap.cpp index e577c23dc4..3451b015e1 100644 --- a/wxPython/src/mac/misc_wrap.cpp +++ b/wxPython/src/mac/misc_wrap.cpp @@ -840,8 +840,8 @@ bool wxConfigBase_ReadBool(wxConfigBase *self,wxString const &key,bool defaultVa #include - static const wxString wxPyDateFormatStr(wxT(wxT("%c"))); - static const wxString wxPyTimeSpanFormatStr(wxT(wxT("%H:%M:%S"))); + static const wxString wxPyDateFormatStr(wxT("%c")); + static const wxString wxPyTimeSpanFormatStr(wxT("%H:%M:%S")); #define LOCAL_TZ wxDateTime::Local diff --git a/wxPython/src/mac/windows_wrap.cpp b/wxPython/src/mac/windows_wrap.cpp index ddaae1f7ae..b627cebcaa 100644 --- a/wxPython/src/mac/windows_wrap.cpp +++ b/wxPython/src/mac/windows_wrap.cpp @@ -356,9 +356,9 @@ wxRect wxStatusBar_GetFieldRect(wxStatusBar *self,int i){ self->GetFieldRect(i, r); return r; } - static const wxString wxPySplitterNameStr(wxT(wxT("splitter"))); - static const wxString wxPySashNameStr(wxT(wxT("sashWindow"))); - static const wxString wxPySashLayoutNameStr(wxT(wxT("layoutWindow"))); + static const wxString wxPySplitterNameStr(wxT("splitter")); + static const wxString wxPySashNameStr(wxT("sashWindow")); + static const wxString wxPySashLayoutNameStr(wxT("layoutWindow")); #include @@ -777,8 +777,8 @@ IMP_PYCALLBACK_VOID_WXWINBASE(wxPyPanel, wxPanel, RemoveChild); #include "wx/wxPython/printfw.h" - static const wxString wxPyPrintoutTitleStr(wxT(wxT("Printout"))); - static const wxString wxPyPreviewCanvasNameStr(wxT(wxT("previewcanvas"))); + static const wxString wxPyPrintoutTitleStr(wxT("Printout")); + static const wxString wxPyPreviewCanvasNameStr(wxT("previewcanvas")); -- 2.45.2