From cbfc9df6768069f770bf8299fc0e6f528a92d4a8 Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Tue, 27 Mar 2007 01:49:46 +0000 Subject: [PATCH] Merge recent changes from 2.8 branch. Make updates for recent changes on CVS HEAD. Remove or workaround deprecated items. Fix compile errors. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@45088 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- .../gizmos/wxCode/src/treelistctrl.cpp | 16 +- wxPython/demo/AlphaDrawing.py | 8 +- wxPython/demo/AnimateCtrl.py | 4 +- wxPython/demo/CustomTreeCtrl.py | 8 +- wxPython/demo/DirDialog.py | 5 +- wxPython/demo/DynamicSashWindow.py | 10 +- wxPython/demo/GraphicsContext.py | 17 +- wxPython/demo/GridSimple.py | 3 +- wxPython/demo/I18N.py | 5 +- wxPython/demo/Main.py | 26 +- wxPython/demo/ScrolledWindow.py | 33 +- wxPython/demo/TreeMixin.py | 265 +++ wxPython/demo/run.py | 4 +- wxPython/distrib/all/build-all | 5 +- wxPython/distrib/all/build-deb | 6 +- wxPython/distrib/makedev.bat | 24 +- wxPython/distrib/makerpm | 3 +- wxPython/docs/CHANGES.txt | 134 +- wxPython/src/_accel.i | 7 +- wxPython/src/_bitmap.i | 4 +- wxPython/src/_cmndlgs.i | 33 +- wxPython/src/_config.i | 5 +- wxPython/src/_datetime.i | 16 - wxPython/src/_dc.i | 54 +- wxPython/src/_defs.i | 17 +- wxPython/src/_display.i | 2 +- wxPython/src/_event.i | 2 +- wxPython/src/_functions.i | 4 - wxPython/src/_graphics.i | 14 +- wxPython/src/_intl.i | 131 +- wxPython/src/_menu.i | 1 - wxPython/src/_sashwin.i | 8 +- wxPython/src/_sizers.i | 256 ++- wxPython/src/_stockobjs.i | 25 - wxPython/src/_textctrl.i | 6 + wxPython/src/_toolbar.i | 6 +- wxPython/src/_toplvl.i | 22 +- wxPython/src/_vscroll.i | 3 + wxPython/src/_window.i | 43 +- wxPython/src/aui.i | 39 +- wxPython/src/combo.i | 7 + wxPython/src/grid.i | 31 + wxPython/src/gtk/_controls.py | 7 +- wxPython/src/gtk/_controls_wrap.cpp | 50 +- wxPython/src/gtk/_core.py | 309 +++- wxPython/src/gtk/_core_wrap.cpp | 1537 +++++++++++++--- wxPython/src/gtk/_gdi.py | 81 +- wxPython/src/gtk/_gdi_wrap.cpp | 523 +++--- wxPython/src/gtk/_misc.py | 39 +- wxPython/src/gtk/_misc_wrap.cpp | 314 ++-- wxPython/src/gtk/_windows.py | 46 +- wxPython/src/gtk/_windows_wrap.cpp | 134 +- wxPython/src/gtk/aui.py | 36 +- wxPython/src/gtk/aui_wrap.cpp | 213 ++- wxPython/src/gtk/combo.py | 3 + wxPython/src/gtk/combo_wrap.cpp | 3 + wxPython/src/gtk/grid.py | 18 + wxPython/src/gtk/grid_wrap.cpp | 374 ++-- wxPython/src/gtk/html.py | 11 - wxPython/src/gtk/html_wrap.cpp | 60 - wxPython/src/gtk/wizard_wrap.cpp | 12 +- wxPython/src/html.i | 7 - wxPython/src/mac/_controls.py | 7 +- wxPython/src/mac/_controls_wrap.cpp | 50 +- wxPython/src/mac/_core.py | 321 +++- wxPython/src/mac/_core_wrap.cpp | 1581 ++++++++++++++--- wxPython/src/mac/_gdi.py | 99 +- wxPython/src/mac/_gdi_wrap.cpp | 1054 ++++++----- wxPython/src/mac/_misc.py | 39 +- wxPython/src/mac/_misc_wrap.cpp | 306 ++-- wxPython/src/mac/_windows.py | 46 +- wxPython/src/mac/_windows_wrap.cpp | 134 +- wxPython/src/mac/aui.py | 36 +- wxPython/src/mac/aui_wrap.cpp | 213 ++- wxPython/src/mac/combo.py | 3 + wxPython/src/mac/combo_wrap.cpp | 3 + wxPython/src/mac/grid.py | 18 + wxPython/src/mac/grid_wrap.cpp | 374 ++-- wxPython/src/mac/html.py | 11 - wxPython/src/mac/html_wrap.cpp | 60 - wxPython/src/mac/wizard_wrap.cpp | 12 +- wxPython/src/msw/_controls.py | 7 +- wxPython/src/msw/_controls_wrap.cpp | 50 +- wxPython/src/msw/_core.py | 321 +++- wxPython/src/msw/_core_wrap.cpp | 1295 +++++++++++++- wxPython/src/msw/_gdi.py | 99 +- wxPython/src/msw/_gdi_wrap.cpp | 1054 ++++++----- wxPython/src/msw/_misc.py | 39 +- wxPython/src/msw/_misc_wrap.cpp | 306 ++-- wxPython/src/msw/_windows.py | 46 +- wxPython/src/msw/_windows_wrap.cpp | 134 +- wxPython/src/msw/aui.py | 36 +- wxPython/src/msw/aui_wrap.cpp | 213 ++- wxPython/src/msw/combo.py | 3 + wxPython/src/msw/combo_wrap.cpp | 3 + wxPython/src/msw/grid.py | 18 + wxPython/src/msw/grid_wrap.cpp | 374 ++-- wxPython/src/msw/html.py | 11 - wxPython/src/msw/html_wrap.cpp | 60 - wxPython/src/msw/wizard_wrap.cpp | 12 +- wxPython/src/wizard.i | 12 +- wxPython/tests/TreeMixinTest.py | 758 ++++++++ wxPython/tests/test_buttonKeyHandler.py | 33 + wxPython/tests/test_gcDrawBitmap.py | 200 +++ wxPython/tests/test_gcMemDC.py | 35 + wxPython/tests/test_gcText.py | 77 + wxPython/tests/test_gcdcDrawEllipticArc.py | 41 + wxPython/tests/test_gcdcDrawRect.py | 44 + wxPython/tests/test_logWindow.py | 47 + wxPython/tests/test_mediaCtrl.py | 120 ++ wxPython/tests/test_scaleText.py | 71 + wxPython/wx/lib/buttonpanel.py | 17 +- wxPython/wx/lib/buttons.py | 2 + wxPython/wx/lib/customtreectrl.py | 65 +- wxPython/wx/lib/dialogs.py | 4 +- wxPython/wx/lib/docview.py | 2 +- wxPython/wx/lib/filebrowsebutton.py | 4 +- wxPython/wx/lib/flatnotebook.py | 27 +- wxPython/wx/lib/inspection.py | 901 ++++++++++ wxPython/wx/lib/masked/maskededit.py | 102 +- .../lib/mixins/{inspect.py => inspection.py} | 4 +- wxPython/wx/lib/mixins/listctrl.py | 9 + wxPython/wx/lib/mixins/treemixin.py | 646 +++++++ wxPython/wx/lib/ogl/_basic.py | 6 - wxPython/wx/lib/ogl/_lines.py | 15 +- wxPython/wx/lib/plot.py | 48 +- wxPython/wx/lib/wxpTag.py | 5 +- wxPython/wx/tools/XRCed/xrced.py | 19 +- wxPython/wx/tools/helpviewer.py | 16 +- wxPython/wx/tools/img2py.py | 339 ++-- wxPython/wxPython/__init__.py | 2 +- 131 files changed, 12811 insertions(+), 4397 deletions(-) create mode 100644 wxPython/demo/TreeMixin.py create mode 100644 wxPython/tests/TreeMixinTest.py create mode 100644 wxPython/tests/test_buttonKeyHandler.py create mode 100644 wxPython/tests/test_gcDrawBitmap.py create mode 100644 wxPython/tests/test_gcMemDC.py create mode 100644 wxPython/tests/test_gcText.py create mode 100644 wxPython/tests/test_gcdcDrawEllipticArc.py create mode 100644 wxPython/tests/test_gcdcDrawRect.py create mode 100755 wxPython/tests/test_logWindow.py create mode 100644 wxPython/tests/test_mediaCtrl.py create mode 100644 wxPython/tests/test_scaleText.py create mode 100644 wxPython/wx/lib/inspection.py rename wxPython/wx/lib/mixins/{inspect.py => inspection.py} (97%) create mode 100644 wxPython/wx/lib/mixins/treemixin.py diff --git a/wxPython/contrib/gizmos/wxCode/src/treelistctrl.cpp b/wxPython/contrib/gizmos/wxCode/src/treelistctrl.cpp index 6cded83c61..1fbe0b94e9 100644 --- a/wxPython/contrib/gizmos/wxCode/src/treelistctrl.cpp +++ b/wxPython/contrib/gizmos/wxCode/src/treelistctrl.cpp @@ -1336,7 +1336,7 @@ int wxTreeListHeaderWindow::XToCol(int x) void wxTreeListHeaderWindow::RefreshColLabel(int col) { - if ( col > GetColumnCount() ) + if ( col >= GetColumnCount() ) return; int x = 0; @@ -3600,7 +3600,7 @@ void wxTreeListMainWindow::OnChar (wxKeyEvent &event) { default: if (event.GetKeyCode() >= (int)' ') { if (!m_findTimer->IsRunning()) m_findStr.Clear(); - m_findStr.Append (event.GetKeyCode()); + m_findStr.Append ((char)event.GetKeyCode()); m_findTimer->Start (FIND_TIMER_TICKS, wxTIMER_ONE_SHOT); wxTreeItemId prev = m_curItem? (wxTreeItemId*)m_curItem: (wxTreeItemId*)NULL; while (true) { @@ -4681,6 +4681,18 @@ int wxTreeListCtrl::GetColumnCount() const void wxTreeListCtrl::SetColumnWidth(int column, int width) { + if (width == wxLIST_AUTOSIZE_USEHEADER) + { + wxFont font = m_header_win->GetFont(); + m_header_win->GetTextExtent(m_header_win->GetColumnText(column), &width, NULL, NULL, NULL, font.Ok()? &font: NULL); + //search wxTreeListHeaderWindow::OnPaint to understand this: + width += 2*EXTRA_WIDTH + MARGIN; + } + else if (width == wxLIST_AUTOSIZE) + { + width = m_main_win->GetBestColumnWidth(column); + } + m_header_win->SetColumnWidth (column, width); m_header_win->Refresh(); } diff --git a/wxPython/demo/AlphaDrawing.py b/wxPython/demo/AlphaDrawing.py index 7023b7beda..6fb15a97c3 100644 --- a/wxPython/demo/AlphaDrawing.py +++ b/wxPython/demo/AlphaDrawing.py @@ -35,7 +35,13 @@ then these squares should be transparent. dc.SetBrush(wx.Brush(brushclr)) rect.SetPosition(pos) dc.DrawRoundedRectangleRect(rect, 8) - + + # some additional testing stuff + #dc.SetPen(wx.Pen(wx.Colour(0,0,255, 196))) + #dc.SetBrush(wx.Brush(wx.Colour(0,0,255, 64))) + #dc.DrawCircle(50, 275, 25) + #dc.DrawEllipse(100, 275, 75, 50) + #---------------------------------------------------------------------- diff --git a/wxPython/demo/AnimateCtrl.py b/wxPython/demo/AnimateCtrl.py index e993e4ee77..276771ec59 100644 --- a/wxPython/demo/AnimateCtrl.py +++ b/wxPython/demo/AnimateCtrl.py @@ -25,10 +25,10 @@ class TestPanel(wx.Panel): ctrl = wx.animate.AnimationCtrl(self, -1, ani) ctrl.SetUseWindowBackgroundColour() ctrl.Play() - sizer.Add(ctrl, 0, wx.ALL, 10) + sizer.AddF(ctrl, wx.SizerFlags().Border(wx.ALL, 10)) border = wx.BoxSizer() - border.Add(sizer, 1, wx.EXPAND|wx.ALL, 20) + border.AddF(sizer, wx.SizerFlags(1).Expand().Border(wx.ALL, 20)) self.SetSizer(border) diff --git a/wxPython/demo/CustomTreeCtrl.py b/wxPython/demo/CustomTreeCtrl.py index 25214d52fa..d9faaaee0f 100644 --- a/wxPython/demo/CustomTreeCtrl.py +++ b/wxPython/demo/CustomTreeCtrl.py @@ -764,7 +764,8 @@ class CustomTreeCtrlDemo(wx.Panel): splitter = wx.SplitterWindow(self, -1, style=wx.CLIP_CHILDREN | wx.SP_LIVE_UPDATE | wx.SP_3D) # Create the CustomTreeCtrl, using a derived class defined below - self.tree = CustomTreeCtrl(splitter, -1, log=self.log, style=wx.SUNKEN_BORDER) + self.tree = CustomTreeCtrl(splitter, -1, log=self.log, + style= wx.SUNKEN_BORDER| CT.TR_HAS_BUTTONS | CT.TR_HAS_VARIABLE_ROW_HEIGHT) self.leftpanel = wx.ScrolledWindow(splitter, -1, style=wx.SUNKEN_BORDER) self.leftpanel.SetScrollRate(20,20) @@ -1239,11 +1240,10 @@ class CustomTreeCtrl(CT.CustomTreeCtrl): def __init__(self, parent, id=wx.ID_ANY, pos=wx.DefaultPosition, size=wx.DefaultSize, - style=wx.SUNKEN_BORDER, - ctstyle=CT.TR_HAS_BUTTONS | CT.TR_HAS_VARIABLE_ROW_HEIGHT, + style=wx.SUNKEN_BORDER | CT.TR_HAS_BUTTONS | CT.TR_HAS_VARIABLE_ROW_HEIGHT, log=None): - CT.CustomTreeCtrl.__init__(self, parent, id, pos, size, style, ctstyle) + CT.CustomTreeCtrl.__init__(self, parent, id, pos, size, style) alldata = dir(CT) diff --git a/wxPython/demo/DirDialog.py b/wxPython/demo/DirDialog.py index c1b1c2a433..eed1be3beb 100644 --- a/wxPython/demo/DirDialog.py +++ b/wxPython/demo/DirDialog.py @@ -15,7 +15,10 @@ class TestPanel(wx.Panel): def OnButton(self, evt): # In this case we include a "New directory" button. dlg = wx.DirDialog(self, "Choose a directory:", - style=wx.DD_DEFAULT_STYLE|wx.DD_NEW_DIR_BUTTON) + style=wx.DD_DEFAULT_STYLE + #| wx.DD_DIR_MUST_EXIST + #| wx.DD_CHANGE_DIR + ) # If the user selects OK, then we process the dialog's data. # This is done by getting the path data from the dialog - BEFORE diff --git a/wxPython/demo/DynamicSashWindow.py b/wxPython/demo/DynamicSashWindow.py index b06438b6ee..bd1ccbc34a 100644 --- a/wxPython/demo/DynamicSashWindow.py +++ b/wxPython/demo/DynamicSashWindow.py @@ -91,11 +91,11 @@ class SimpleView(wx.Panel): #---------------------------------------------------------------------- def runTest(frame, nb, log): - if wx.Platform == "__WXMAC__": - from Main import MessagePanel - win = MessagePanel(nb, 'This demo currently fails on the Mac. The problem is being looked into...', - 'Sorry', wx.ICON_WARNING) - return win +## if wx.Platform == "__WXMAC__": +## from Main import MessagePanel +## win = MessagePanel(nb, 'This demo currently fails on the Mac. The problem is being looked into...', +## 'Sorry', wx.ICON_WARNING) +## return win if 1: win = gizmos.DynamicSashWindow(nb, -1, style = wx.CLIP_CHILDREN diff --git a/wxPython/demo/GraphicsContext.py b/wxPython/demo/GraphicsContext.py index bc2d3039eb..e598362381 100644 --- a/wxPython/demo/GraphicsContext.py +++ b/wxPython/demo/GraphicsContext.py @@ -19,7 +19,13 @@ class TestPanel(wx.Panel): def OnPaint(self, evt): dc = wx.PaintDC(self) - gc = wx.GraphicsContext.Create(dc) + try: + gc = wx.GraphicsContext.Create(dc) + except NotImplementedError: + dc.DrawText("This build of wxPython does not support the wx.GraphicsContext " + "family of classes.", + 25, 25) + return font = wx.SystemSettings.GetFont(wx.SYS_DEFAULT_GUI_FONT) font.SetWeight(wx.BOLD) @@ -64,6 +70,13 @@ class TestPanel(wx.Panel): gc.DrawText("Scale", 0, -BASE2) gc.Translate(0, 20) + # for testing clipping + #gc.Clip(0, 0, 100, 100) + #rgn = wx.RegionFromPoints([ (0,0), (75,0), (75,25,), (100, 25), + # (100,100), (0,100), (0,0) ]) + #gc.ClipRegion(rgn) + #gc.ResetClip() + gc.SetBrush(wx.Brush(wx.Colour(178, 34, 34, 128))) # 128 == half transparent for cnt in range(8): gc.Scale(1.08, 1.08) # increase scale by 8% @@ -75,7 +88,7 @@ class TestPanel(wx.Panel): gc.PushState() # save it again gc.Translate(400, 200) gc.DrawText("Rotate", 0, -BASE2) - + gc.Translate(0, 75) for angle in range(0, 360, 30): gc.PushState() # save this new current state so we can pop back to diff --git a/wxPython/demo/GridSimple.py b/wxPython/demo/GridSimple.py index 0748d09f7e..ab358bff24 100644 --- a/wxPython/demo/GridSimple.py +++ b/wxPython/demo/GridSimple.py @@ -242,7 +242,8 @@ class TestFrame(wx.Frame): if __name__ == '__main__': import sys - app = wx.PySimpleApp() + from wx.lib.mixins.inspect import InspectableApp + app = InspectableApp(False) frame = TestFrame(None, sys.stdout) frame.Show(True) #import wx.py diff --git a/wxPython/demo/I18N.py b/wxPython/demo/I18N.py index c04c5506e8..e35f483a9b 100644 --- a/wxPython/demo/I18N.py +++ b/wxPython/demo/I18N.py @@ -177,7 +177,10 @@ class LanguageSelectPanel(wx.Panel): # create a locale object for this language self.locale = wx.Locale(lang) - self.locale.AddCatalog('wxpydemo') + if self.locale.IsOk(): + self.locale.AddCatalog('wxpydemo') + else: + self.locale = None def translateExample(self): self.translatedST.SetLabel(_(self.englishBaseCh.GetStringSelection())) diff --git a/wxPython/demo/Main.py b/wxPython/demo/Main.py index c5ec3fa129..f86088a1d2 100644 --- a/wxPython/demo/Main.py +++ b/wxPython/demo/Main.py @@ -47,29 +47,6 @@ import images _treeList = [ # new stuff ('Recent Additions/Updates', [ - 'RichTextCtrl', - 'Treebook', - 'Toolbook', - 'BitmapFromBuffer', - 'RawBitmapAccess', - 'DragScroller', - 'DelayedResult', - 'ExpandoTextCtrl', - 'ButtonPanel', - 'FlatNotebook', - 'CustomTreeCtrl', - 'AboutBox', - 'AlphaDrawing', - 'GraphicsContext', - 'CollapsiblePane', - 'ComboCtrl', - 'OwnerDrawnComboBox', - 'BitmapComboBox', - 'I18N', - 'Img2PyArtProvider', - 'SearchCtrl', - 'SizedControls', - 'AUI_MDI', ]), # managed windows == things with a (optional) caption you can close @@ -214,6 +191,7 @@ _treeList = [ 'Throbber', 'Ticker', 'TimeCtrl', + 'TreeMixin', 'VListBox', ]), @@ -1688,7 +1666,7 @@ class wxPythonDemo(wx.Frame): def OnOpenWidgetInspector(self, evt): # Activate the widget inspection tool - from wx.lib.inspect import InspectionTool + from wx.lib.inspection import InspectionTool if not InspectionTool().initialized: InspectionTool().Init() diff --git a/wxPython/demo/ScrolledWindow.py b/wxPython/demo/ScrolledWindow.py index 35087538d8..d5b0728be2 100644 --- a/wxPython/demo/ScrolledWindow.py +++ b/wxPython/demo/ScrolledWindow.py @@ -157,10 +157,8 @@ class MyCanvas(wx.ScrolledWindow): self.x, self.y = self.ConvertEventCoords(event) def ConvertEventCoords(self, event): - xView, yView = self.GetViewStart() - xDelta, yDelta = self.GetScrollPixelsPerUnit() - return (event.GetX() + (xView * xDelta), - event.GetY() + (yView * yDelta)) + newpos = self.CalcUnscrolledPosition(event.GetX(), event.GetY()) + return newpos def OnLeftButtonEvent(self, event): if event.LeftDown(): @@ -172,23 +170,34 @@ class MyCanvas(wx.ScrolledWindow): elif event.Dragging() and self.drawing: if BUFFERED: - # If doing buffered drawing, create the buffered DC, giving it - # it a real DC to blit to when done. - cdc = wx.ClientDC(self) - self.PrepareDC(cdc) - dc = wx.BufferedDC(cdc, self.buffer) + # If doing buffered drawing we'll just update the + # buffer here and then refresh that portion of the + # window, then that portion of the buffer will be + # redrawn in the EVT_PAINT handler. + dc = wx.BufferedDC(None, self.buffer) else: + # otherwise we'll draw directly to a wx.ClientDC dc = wx.ClientDC(self) self.PrepareDC(dc) - dc.BeginDrawing() dc.SetPen(wx.Pen('MEDIUM FOREST GREEN', 4)) coords = (self.x, self.y) + self.ConvertEventCoords(event) self.curLine.append(coords) dc.DrawLine(*coords) self.SetXY(event) - dc.EndDrawing() - + + if BUFFERED: + # figure out what part of the window to refresh + x1,y1, x2,y2 = dc.GetBoundingBox() + x1,y1 = self.CalcScrolledPosition(x1, y1) + x2,y2 = self.CalcScrolledPosition(x2, y2) + # make a rectangle + rect = wx.Rect() + rect.SetTopLeft((x1,y1)) + rect.SetBottomRight((x2,y2)) + rect.Inflate(2,2) + # refresh it + self.RefreshRect(rect) elif event.LeftUp() and self.drawing: self.lines.append(self.curLine) diff --git a/wxPython/demo/TreeMixin.py b/wxPython/demo/TreeMixin.py new file mode 100644 index 0000000000..8a3245571b --- /dev/null +++ b/wxPython/demo/TreeMixin.py @@ -0,0 +1,265 @@ +import wx, wx.lib.customtreectrl, wx.gizmos +try: + import treemixin +except ImportError: + from wx.lib.mixins import treemixin + +overview = treemixin.__doc__ + +class TreeModel(object): + ''' TreeModel holds the domain objects that are shown in the different + tree controls. Each domain object is simply a two-tuple consisting of + a label and a list of child tuples, i.e. (label, [list of child tuples]). + ''' + def __init__(self, *args, **kwargs): + self.items = [] + self.itemCounter = 0 + super(TreeModel, self).__init__(*args, **kwargs) + + def GetItem(self, indices): + text, children = 'Hidden root', self.items + for index in indices: + text, children = children[index] + return text, children + + def GetText(self, indices): + return self.GetItem(indices)[0] + + def GetChildren(self, indices): + return self.GetItem(indices)[1] + + def GetChildrenCount(self, indices): + return len(self.GetChildren(indices)) + + def SetChildrenCount(self, indices, count): + children = self.GetChildren(indices) + while len(children) > count: + children.pop() + while len(children) < count: + children.append(('item %d'%self.itemCounter, [])) + self.itemCounter += 1 + + def MoveItem(self, itemToMoveIndex, newParentIndex): + itemToMove = self.GetItem(itemToMoveIndex) + newParentChildren = self.GetChildren(newParentIndex) + newParentChildren.append(itemToMove) + oldParentChildren = self.GetChildren(itemToMoveIndex[:-1]) + oldParentChildren.remove(itemToMove) + + +class DemoTreeMixin(treemixin.VirtualTree, treemixin.DragAndDrop, + treemixin.ExpansionState): + def __init__(self, *args, **kwargs): + self.model = kwargs.pop('treemodel') + self.log = kwargs.pop('log') + super(DemoTreeMixin, self).__init__(*args, **kwargs) + self.CreateImageList() + + def CreateImageList(self): + size = (16, 16) + self.imageList = wx.ImageList(*size) + for art in wx.ART_FOLDER, wx.ART_FILE_OPEN, wx.ART_NORMAL_FILE: + self.imageList.Add(wx.ArtProvider.GetBitmap(art, wx.ART_OTHER, + size)) + self.AssignImageList(self.imageList) + + def OnGetItemText(self, indices): + return self.model.GetText(indices) + + def OnGetChildrenCount(self, indices): + return self.model.GetChildrenCount(indices) + + def OnGetItemFont(self, indices): + # Show how to change the item font. Here we use a small font for + # items that have children and the default font otherwise. + if self.model.GetChildrenCount(indices) > 0: + return wx.SMALL_FONT + else: + return super(DemoTreeMixin, self).OnGetItemFont(indices) + + def OnGetItemTextColour(self, indices): + # Show how to change the item text colour. In this case second level + # items are coloured red and third level items are blue. All other + # items have the default text colour. + if len(indices) % 2 == 0: + return wx.RED + elif len(indices) % 3 == 0: + return wx.BLUE + else: + return super(DemoTreeMixin, self).OnGetItemTextColour(indices) + + def OnGetItemBackgroundColour(self, indices): + # Show how to change the item background colour. In this case the + # background colour of each third item is green. + if indices[-1] == 2: + return wx.GREEN + else: + return super(DemoTreeMixin, + self).OnGetItemBackgroundColour(indices) + + def OnGetItemImage(self, indices, which): + # Return the right icon depending on whether the item has children. + if which in [wx.TreeItemIcon_Normal, wx.TreeItemIcon_Selected]: + if self.model.GetChildrenCount(indices): + return 0 + else: + return 2 + else: + return 1 + + def OnDrop(self, dropTarget, dragItem): + dropIndex = self.GetIndexOfItem(dropTarget) + dropText = self.model.GetText(dropIndex) + dragIndex = self.GetIndexOfItem(dragItem) + dragText = self.model.GetText(dragIndex) + self.log.write('drop %s %s on %s %s'%(dragText, dragIndex, + dropText, dropIndex)) + self.model.MoveItem(dragIndex, dropIndex) + self.GetParent().RefreshItems() + + +class VirtualTreeCtrl(DemoTreeMixin, wx.TreeCtrl): + pass + + +class VirtualTreeListCtrl(DemoTreeMixin, wx.gizmos.TreeListCtrl): + def __init__(self, *args, **kwargs): + kwargs['style'] = wx.TR_DEFAULT_STYLE | wx.TR_FULL_ROW_HIGHLIGHT + super(VirtualTreeListCtrl, self).__init__(*args, **kwargs) + self.AddColumn('Column 0') + self.AddColumn('Column 1') + for art in wx.ART_TIP, wx.ART_WARNING: + self.imageList.Add(wx.ArtProvider.GetBitmap(art, wx.ART_OTHER, + (16, 16))) + + def OnGetItemText(self, indices, column=0): + # Return a different label depending on column. + return '%s, column %d'%\ + (super(VirtualTreeListCtrl, self).OnGetItemText(indices), column) + + def OnGetItemImage(self, indices, which, column=0): + # Also change the image of the other columns when the item has + # children. + if column == 0: + return super(VirtualTreeListCtrl, self).OnGetItemImage(indices, + which) + elif self.OnGetChildrenCount(indices): + return 4 + else: + return 3 + + +class VirtualCustomTreeCtrl(DemoTreeMixin, + wx.lib.customtreectrl.CustomTreeCtrl): + def __init__(self, *args, **kwargs): + self.checked = {} + kwargs['ctstyle'] = wx.TR_DEFAULT_STYLE | wx.TR_HIDE_ROOT | \ + wx.TR_HAS_BUTTONS | wx.TR_FULL_ROW_HIGHLIGHT + super(VirtualCustomTreeCtrl, self).__init__(*args, **kwargs) + self.Bind(wx.lib.customtreectrl.EVT_TREE_ITEM_CHECKED, + self.OnItemChecked) + + def OnGetItemType(self, indices): + if len(indices) == 1: + return 1 + elif len(indices) == 2: + return 2 + else: + return 0 + + def OnGetItemChecked(self, indices): + return self.checked.get(indices, False) + + def OnItemChecked(self, event): + item = event.GetItem() + itemIndex = self.GetIndexOfItem(item) + if self.GetItemType(item) == 2: + # It's a radio item; reset other items on the same level + for nr in range(self.GetChildrenCount(self.GetItemParent(item))): + self.checked[itemIndex[:-1]+(nr,)] = False + self.checked[itemIndex] = True + + + +class TreeNotebook(wx.Notebook): + def __init__(self, *args, **kwargs): + treemodel = kwargs.pop('treemodel') + log = kwargs.pop('log') + super(TreeNotebook, self).__init__(*args, **kwargs) + self.trees = [] + for class_, title in [(VirtualTreeCtrl, 'TreeCtrl'), + (VirtualTreeListCtrl, 'TreeListCtrl'), + (VirtualCustomTreeCtrl, 'CustomTreeCtrl')]: + tree = class_(self, treemodel=treemodel, log=log) + self.trees.append(tree) + self.AddPage(tree, title) + self.Bind(wx.EVT_NOTEBOOK_PAGE_CHANGED, self.OnPageChanged) + + def OnPageChanged(self, event): + oldTree = self.GetPage(event.OldSelection) + newTree = self.GetPage(event.Selection) + newTree.RefreshItems() + newTree.SetExpansionState(oldTree.GetExpansionState()) + event.Skip() + + def GetIndicesOfSelectedItems(self): + tree = self.trees[self.GetSelection()] + if tree.GetSelections(): + return [tree.GetIndexOfItem(item) for item in tree.GetSelections()] + else: + return [()] + + def RefreshItems(self): + tree = self.trees[self.GetSelection()] + tree.RefreshItems() + tree.UnselectAll() + + +class TestPanel(wx.Panel): + def __init__(self, parent, log): + self.log = log + super(TestPanel, self).__init__(parent) + self.treemodel = TreeModel() + self.CreateControls() + self.LayoutControls() + + def CreateControls(self): + self.notebook = TreeNotebook(self, treemodel=self.treemodel, + log=self.log) + self.label = wx.StaticText(self, label='Number of children: ') + self.childrenCountCtrl = wx.SpinCtrl(self, value='0', max=10000) + self.button = wx.Button(self, label='Update children') + self.button.Bind(wx.EVT_BUTTON, self.OnEnter) + + def LayoutControls(self): + hSizer = wx.BoxSizer(wx.HORIZONTAL) + options = dict(flag=wx.ALIGN_CENTER_VERTICAL|wx.ALL, border=2) + hSizer.Add(self.label, **options) + hSizer.Add(self.childrenCountCtrl, 2, **options) + hSizer.Add(self.button, **options) + sizer = wx.BoxSizer(wx.VERTICAL) + sizer.Add(self.notebook, 1, wx.EXPAND) + sizer.Add(hSizer, 0, wx.EXPAND) + self.SetSizer(sizer) + + def OnEnter(self, event): + indicesList = self.notebook.GetIndicesOfSelectedItems() + newChildrenCount = self.childrenCountCtrl.GetValue() + for indices in indicesList: + text = self.treemodel.GetText(indices) + oldChildrenCount = self.treemodel.GetChildrenCount(indices) + self.log.write('%s %s now has %d children (was %d)'%(text, indices, + newChildrenCount, oldChildrenCount)) + self.treemodel.SetChildrenCount(indices, newChildrenCount) + self.notebook.RefreshItems() + + +def runTest(frame, nb, log): + win = TestPanel(nb, log) + return win + + +if __name__ == '__main__': + import sys, os, run + run.main(['', os.path.basename(sys.argv[0])] + sys.argv[1:]) + diff --git a/wxPython/demo/run.py b/wxPython/demo/run.py index 5b1fffb091..b7b1a38ec0 100755 --- a/wxPython/demo/run.py +++ b/wxPython/demo/run.py @@ -18,7 +18,7 @@ on the command line. """ import wx -import wx.lib.mixins.inspect +import wx.lib.mixins.inspection import sys, os # stuff for debugging @@ -40,7 +40,7 @@ class Log: write = WriteText -class RunDemoApp(wx.App, wx.lib.mixins.inspect.InspectionMixin): +class RunDemoApp(wx.App, wx.lib.mixins.inspection.InspectionMixin): def __init__(self, name, module, useShell): self.name = name self.demoModule = module diff --git a/wxPython/distrib/all/build-all b/wxPython/distrib/all/build-all index aca8fbba8a..425c9acbd5 100755 --- a/wxPython/distrib/all/build-all +++ b/wxPython/distrib/all/build-all @@ -73,7 +73,7 @@ def getTasks(config_env): beastTask1 = Task( - [ #Job("beast.23", "distrib/all/build-windows", ["2.3"], env=config_env), + [ Job("beast.23", "distrib/all/build-windows", ["2.3"], env=config_env), # Job("co-rh9.23", "distrib/all/build-rpm", ["beast", "co-rh9", "rh9", "2.3"], env=config_env), Job("beast.24", "distrib/all/build-windows", ["2.4"], env=config_env), # Job("co-rh9.24", "distrib/all/build-rpm", ["beast", "co-rh9", "rh9", "2.4"], env=config_env), @@ -89,7 +89,8 @@ def getTasks(config_env): ]) xavierTask = Task([ - Job("xavier", "distrib/all/build-deb", ["xavier", "/work/chroot/dapper", "dapper"], env=config_env), + Job("xavier.d", "distrib/all/build-deb", ["xavier", "/work/chroot/dapper", "dapper"], env=config_env), + Job("xavier.f", "distrib/all/build-deb", ["xavier", "/work/chroot/feisty", "feisty"], env=config_env), ]) buildTasks = [ #jaguarTask, diff --git a/wxPython/distrib/all/build-deb b/wxPython/distrib/all/build-deb index 6bfc3f9315..442a53e708 100755 --- a/wxPython/distrib/all/build-deb +++ b/wxPython/distrib/all/build-deb @@ -25,8 +25,8 @@ function TestOnline { if [ $skipdeb != yes ]; then # We use a chroot environment on the build machine for the debian # builds, so this build is pretty simple. Just copy the tarball - # and a build script to /tmp, and then run do-build-deb in the - # chroot. + # and a build script to the build machine, and then run + # do-build-deb in the chroot. if TestOnline $host; then @@ -37,7 +37,7 @@ if [ $skipdeb != yes ]; then scp $STAGING_DIR/wxPython-src* distrib/all/do-build-deb \ root@$host:$chRootRoot/$LINUX_BUILD - ssh root@$host "dchroot --chroot $chRootName --directory $LINUX_BUILD \"do-build-deb $VERSION $VER2\"" + ssh root@$host "dchroot --chroot $chRootName --directory $LINUX_BUILD \"./do-build-deb $VERSION $VER2\"" echo "Fetching the results..." mkdir -p $STAGING_DIR/$chRootName diff --git a/wxPython/distrib/makedev.bat b/wxPython/distrib/makedev.bat index 85ce3afb03..24c2cabfd1 100755 --- a/wxPython/distrib/makedev.bat +++ b/wxPython/distrib/makedev.bat @@ -6,6 +6,12 @@ rem or extensions that can share the same DLL. setlocal set BASE=_distrib_zip\wxPython-%1 +set TYPE=h +if %2 == "debug" set TYPE=d + +set DELTYPE=d +if %2 == "debug" set DELTYPE=h + rem **** Make a directory to build up a distribution tree mkdir _distrib_zip mkdir %BASE% @@ -30,19 +36,19 @@ copy %WXWIN%\wxPython\src\*.py %BASE%\include\wx\wxPython\i_files mkdir %BASE%\lib mkdir %BASE%\lib\vc_dll -mkdir %BASE%\lib\vc_dll\mswh -mkdir %BASE%\lib\vc_dll\mswuh +mkdir %BASE%\lib\vc_dll\msw%TYPE% +mkdir %BASE%\lib\vc_dll\mswu%TYPE% -copy /s %WXWIN%\lib\vc_dll\mswh\* %BASE%\lib\vc_dll\mswh -copy /s %WXWIN%\lib\vc_dll\mswuh\* %BASE%\lib\vc_dll\mswuh +copy /s %WXWIN%\lib\vc_dll\msw%TYPE%\* %BASE%\lib\vc_dll\mswh +copy /s %WXWIN%\lib\vc_dll\mswu%TYPE%\* %BASE%\lib\vc_dll\mswuh copy %WXWIN%\lib\vc_dll\* %BASE%\lib\vc_dll rem *** remove unneeded files cd _distrib_zip -ffind /SB wx*d_*.* > del-files -ffind /SB wx*d.* >> del-files +ffind /SB wx*%DELTYPE%_*.* > del-files +ffind /SB wx*%DELTYPE%.* >> del-files ffind /SB .#* >> del-files ffind /SB .cvsignore >> del-files @@ -68,8 +74,10 @@ rm del-files rm del-dirs rem *** bundle it all up TODO: don't hard-code the 2.8 -tar cvf ../dist/wxPython2.8-win32-devel-%1.tar wxPython-%1 -bzip2 -9 ../dist/wxPython2.8-win32-devel-%1.tar +set EXT= +if %2 == "debug" set EXT="-debug" +tar cvf ../dist/wxPython2.8-win32-devel-%1%EXT%.tar wxPython-%1 +bzip2 -9 ../dist/wxPython2.8-win32-devel-%1%EXT%.tar rem *** cleanup cd .. diff --git a/wxPython/distrib/makerpm b/wxPython/distrib/makerpm index 028cd1f65d..5acb514db4 100755 --- a/wxPython/distrib/makerpm +++ b/wxPython/distrib/makerpm @@ -3,6 +3,7 @@ # Build an RPM containing both wxGTK and wxPython ##set -o xtrace +##set -o errexit spectemplate=distrib/wxPythonFull.spec.in @@ -236,7 +237,7 @@ fi #---------------------------------------------------------------------- # build the RPM -if [ -z "${skiprpm}" ]; then +if [ "${skiprpm}" != "1" ]; then echo "*** Building RPMs..." cp ${distdir}/${tarver}.tar.bz2 ${rpmtop}/SOURCES diff --git a/wxPython/docs/CHANGES.txt b/wxPython/docs/CHANGES.txt index fe9cdd31c9..265c88d95c 100644 --- a/wxPython/docs/CHANGES.txt +++ b/wxPython/docs/CHANGES.txt @@ -3,7 +3,7 @@ Recent Changes for wxPython 2.9.0.0 ------- -* +* wxGTK: Implemented support for underlined fonts in wx.StaticText @@ -11,12 +11,59 @@ wxGTK: wx.TopLevelWindow.SetSizeHints size increments now work Added wx.EventBlocker class +wxGTK: make wx.TopLevelWindow.GetSize() return the size of the window +including the decorations and updated SetSize() to account for this as +well. +wxMSW: For consistency with wxGTK, when a top level window is +minimized the size returned from GetSize will be the restored size, +not the size of the icon window. +wxGTK: For consistency with wxMSW, when a top level window is +minimized the size returned from GetClientSize will be (0,0). -2.8.1.2 +wxGTK: Color cursors now supported. + +Added wx.DC.StretchBlit() for wxMac and wxMSW (Vince Harron) + +Added support for labels for toolbar controls (Vince Harron) + +wxGTK: Implemented support for underlined fonts in wx.StaticText. + +wxGTK: Setting foreground colour of single line wx.TextCtrl now works. + +wxMac: Corrected top border size for wxStaticBox with empty label (nusi) + +wx.Window.IsEnabled() now returns false even if the window parent, and +not the window itself, is disabled and added IsThisEnabled() +implementing the old IsEnabled() behaviour. + +wxGTK: Now using the native tab traversal functions instead of +simulating it ourselves. + +Generating wx.NavigationKeyEvent events doesn't work any more under +wxGTK (and other platforms in the future), use wx.Window.Navigate() or +NavigateIn() instead. + + + + + + +2.8.3.1 ------- -* +* + +wxGTK: Make wx.NO_BORDER style work with wx.RadioBox (patch 1525406) + +Update to 0.9.1 of TreeMixin. + + + + +2.8.3.0 +------- +* 22-March-2007 Added wx.ToolBar.SetToolNormalBitmap and SetToolDisabledBitmap methods. (Keep in mind however that the disabled bitmap is currently @@ -27,6 +74,85 @@ Refactored the inspection tool such that it can be used as a wx.App mix-in class as it was used before (with the wx.lib.mixins.inspect module) and also as a non mix-in tool (using wx.lib.inspect.InspectionTool). +Add wx.lib.mixins.treemixin from Frank Niessink. + +Added the wx.SizerFlags class, and also added AddF, InsertF and +PrependF methods to wx.Sizer. The wxSizerFlags class provides a +convienient and easier to read way to add items to a sizer. It was +added as a new set of methods of the wx.Sizer class so as to not +disturb existing code. For example, instead of writing:: + + sizer.Add(ctrl, 0, wx.EXPAND | wx.ALL, 10) + +you can now write:: + + sizer.AddF(ctrl, wx.SizerFlags().Expand().Border(wx.ALL,10)) + + +Will Sadkin provided a patch for the wx.lib.masked package that fixes +its support for using the navigation keys on the numeric keypad. + +wx.lib.plot: patch #1663937 to allow user to turn off scientific +notation on plot. + +wxGTK: Most of the remaining TODOs for the wx.GraphicsContext on wxGTK +have been done. This includes implementations for GetTextExtent, +Clip, DrawBitmap, fixing the drawing position of text to be at the +upper left corner instead of the baseline, etc. + +wx.lib.customtreectrl patches from Andrea: + + 1. ExpandAll has been renamed as ExpandAllChildren, and the new + ExpandAll now takes no input arguments (consistent with + wx.TreeCtrl) + + 2. ctstyle keyword is now defaulted to 0: every style related to + CustomTreeCtrl and the underlying wx.PyScrolledWindow should be + declared using the keyword "style" only. For backward + compatibility, ctstyle continues to work as I merged ctstyle and + style in the __init__ method. + + 3. GetClassDefaultAttributes is now a classmethod. + + 4. UnselectAll bug fixed. + + +Renamed the wx.lib.inspect and wx.lib.mixins.inspect modules to +inspection, in order to avoid conflicts with the inspect module in the +standard Python library. + +Lots of changes to XRCed from Roman Rolinsky: + + * Preferences for default "sizeritem" parameters for new panels and + controls can be configured ("File">"Preferences..."). + + * Implemented comment object for including simple one-line comments and + comment directives as tree nodes. No validation is performed for a + valid XML string so comments must not contain "-->". Comment directive + is a special comment starting with '%' character, followed by a line + of python code. It is executed using 'exec' when the resource file is + opened. This is useful to import plugin modules containing custom + handlers which are specific to the resource file, hovewer this is of + course a security hole if you use foreign XRC files. A warning is + displayed if the preference option 'ask' is selected (by default). + + * Added support for custom controls and plugin modules. Refer to this + wxPythonWiki for the details: http://wiki.wxpython.org/index.cgi/XRCed#custom + + * Tool panel sections can be collapsed/expanded by clicking on the + label of a tool group. + + * Some undo/redo and other fixes. + + * Fixes for wxMSW (notebook highlighting, control sizes, tree Unselect). + + * Notebook page highlighting fix. Highlight resizes when the window + is resized. ParamUnit spin button detects event handler re-entry + (wxGTK probably has a bug in wxSpinButton with repeated events). + + * Fix for dealing with empty 'growable' property, using MiniFrame + for properties panel, the panel is restored together with the + main window. @@ -73,7 +199,7 @@ windows so they are no longer clipped by the bounds of the stc window. 2.8.1.0 ------- -* 8-Jan-2006 +* 8-Jan-2007 Added EVT_TASKBAR_CLICK and use it to show taskbar icon menu on right button release, not press, under MSW (bug 1623761) diff --git a/wxPython/src/_accel.i b/wxPython/src/_accel.i index 0cf237d152..cc20204c42 100644 --- a/wxPython/src/_accel.i +++ b/wxPython/src/_accel.i @@ -165,6 +165,11 @@ const wxAcceleratorTable wxNullAcceleratorTable; %mutable; -wxAcceleratorEntry *wxGetAccelFromString(const wxString& label); +%pythoncode { + def GetAccelFromString(label): + entry = AcceleratorEntry() + entry.FromString(label) + return entry +} //--------------------------------------------------------------------------- diff --git a/wxPython/src/_bitmap.i b/wxPython/src/_bitmap.i index 1316e7cd35..994d5e93e8 100644 --- a/wxPython/src/_bitmap.i +++ b/wxPython/src/_bitmap.i @@ -319,7 +319,7 @@ the ``type`` parameter.", ""); %extend { DocStr(CopyFromBuffer, "Copy data from a RGB buffer object to replace the bitmap pixel data. -See `wxBitmapFromBuffer` for more details.", ""); +See `wx.BitmapFromBuffer` for more details.", ""); void CopyFromBuffer(buffer data, int DATASIZE) { int height=self->GetHeight(); @@ -352,7 +352,7 @@ See `wxBitmapFromBuffer` for more details.", ""); DocStr(CopyFromBufferRGBA, "Copy data from a RGBA buffer object to replace the bitmap pixel data. -See `wxBitmapFromBufferRGBA` for more details.", ""); +See `wx.BitmapFromBufferRGBA` for more details.", ""); void CopyFromBufferRGBA(buffer data, int DATASIZE) { int height=self->GetHeight(); diff --git a/wxPython/src/_cmndlgs.i b/wxPython/src/_cmndlgs.i index f488af7ecb..bd4c856501 100644 --- a/wxPython/src/_cmndlgs.i +++ b/wxPython/src/_cmndlgs.i @@ -113,9 +113,10 @@ wxColour wxGetColourFromUser(wxWindow *parent = (wxWindow *)NULL, //-------------------------------------------------------------------------------- enum { + wxDD_CHANGE_DIR, + wxDD_DIR_MUST_EXIST, wxDD_NEW_DIR_BUTTON, wxDD_DEFAULT_STYLE, - wxDD_CHANGE_DIR, }; DocStr(wxDirDialog, @@ -129,10 +130,12 @@ Window Styles wx.DEFAULT_DIALOG_STYLE, wx.DD_NEW_DIR_BUTTON and wx.RESIZE_BORDER. - wx.DD_NEW_DIR_BUTTON Add 'Create new directory' button and allow - directory names to be editable. On Windows - the new directory button is only available - with recent versions of the common dialogs. + wx.DD_DIR_MUST_EXIST The dialog will allow the user to choose only an + existing folder. When this style is not given, a + 'Create new directory' button is added to the dialog + (on Windows) or some other way is provided to the + user to type the name of a new folder. + Use this instead of deprecated wx.DD_NEW_DIR_BUTTON. wx.DD_CHANGE_DIR Change the current working directory to the directory chosen by the user. @@ -195,15 +198,6 @@ public: %} enum { - // These will dissappear in 2.8 - wxOPEN, - wxSAVE, - wxOVERWRITE_PROMPT, - wxFILE_MUST_EXIST, - wxMULTIPLE, - wxCHANGE_DIR, - wxHIDE_READONLY, - wxFD_OPEN, wxFD_SAVE, wxFD_OVERWRITE_PROMPT, @@ -214,6 +208,17 @@ enum { wxFD_DEFAULT_STYLE, }; +%pythoncode { + %# deprecated names + OPEN = FD_OPEN, + SAVE = FD_SAVE, + OVERWRITE_PROMPT = FD_OVERWRITE_PROMPT, + FILE_MUST_EXIST = FD_FILE_MUST_EXIST, + MULTIPLE = FD_MULTIPLE, + CHANGE_DIR = FD_CHANGE_DIR +} + + DocStr(wxFileDialog, "wx.FileDialog allows the user to select one or more files from the filesystem.", " diff --git a/wxPython/src/_config.i b/wxPython/src/_config.i index f3f4d306a8..fd02d27e51 100644 --- a/wxPython/src/_config.i +++ b/wxPython/src/_config.i @@ -419,8 +419,11 @@ public: const wxString& globalFilename = wxPyEmptyString, long style = wxCONFIG_USE_LOCAL_FILE | wxCONFIG_USE_GLOBAL_FILE), "", ""); - ~wxFileConfig(); + + static wxString GetGlobalFileName(const wxString& szFile); + static wxString GetLocalFileName(const wxString& szFile, int style = 0); + }; diff --git a/wxPython/src/_datetime.i b/wxPython/src/_datetime.i index 8216236511..4eb0162dd1 100644 --- a/wxPython/src/_datetime.i +++ b/wxPython/src/_datetime.i @@ -510,10 +510,6 @@ public: int n = 1, Month month = Inv_Month, int year = Inv_Year); -// wxDateTime GetWeekDay(WeekDay weekday, -// int n = 1, -// Month month = Inv_Month, -// int year = Inv_Year); // sets to the last weekday in the given month, year bool SetToLastWeekDay(WeekDay weekday, @@ -523,17 +519,6 @@ public: Month month = Inv_Month, int year = Inv_Year); - // sets the date to the given day of the given week in the year, - // returns True on success and False if given date doesn't exist (e.g. - // numWeek is > 53) - bool SetToTheWeek(wxDateTime_t numWeek, WeekDay weekday = Mon, WeekFlags flags = Monday_First); - wxDateTime GetWeek(wxDateTime_t numWeek, WeekDay weekday = Mon, WeekFlags flags = Monday_First); - - %pythoncode { - SetToTheWeek = wx._deprecated(SetToTheWeek, "SetToTheWeek is deprecated, use (static) SetToWeekOfYear instead") - GetWeek = wx._deprecated(GetWeek, "GetWeek is deprecated, use GetWeekOfYear instead") - } - // returns the date corresponding to the given week day of the given // week (in ISO notation) of the specified year static wxDateTime SetToWeekOfYear(int year, @@ -911,7 +896,6 @@ public: %property(RataDie, GetRataDie, doc="See `GetRataDie`"); %property(Second, GetSecond, SetSecond, doc="See `GetSecond` and `SetSecond`"); %property(Ticks, GetTicks, doc="See `GetTicks`"); - %property(Week, GetWeek, doc="See `GetWeek`"); %property(WeekDay, GetWeekDay, doc="See `GetWeekDay`"); %property(WeekDayInSameWeek, GetWeekDayInSameWeek, doc="See `GetWeekDayInSameWeek`"); %property(WeekOfMonth, GetWeekOfMonth, doc="See `GetWeekOfMonth`"); diff --git a/wxPython/src/_dc.i b/wxPython/src/_dc.i index 47295bc265..30f8df8e22 100644 --- a/wxPython/src/_dc.i +++ b/wxPython/src/_dc.i @@ -354,6 +354,57 @@ position.", " BlitPointSize); + DocDeclStr( + bool , StretchBlit(wxCoord dstX, wxCoord dstY, + wxCoord dstWidth, wxCoord dstHeight, + wxDC *source, + wxCoord srcX, wxCoord srcY, + wxCoord srcWidth, wxCoord srcHeight, + int rop = wxCOPY, bool useMask = false, + wxCoord srcMaskX = wxDefaultCoord, + wxCoord srcMaskY = wxDefaultCoord), + "Copy from a source DC to this DC, specifying the destination +coordinates, destination size, source DC, source coordinates, size of +source area to copy, logical function, whether to use a bitmap mask, +and mask source position.", " + + :param xdest: Destination device context x position. + :param ydest: Destination device context y position. + :param dstWidth: Width of destination area. + :param dstHeight: Height of destination area. + :param source: Source device context. + :param xsrc: Source device context x position. + :param ysrc: Source device context y position. + :param srcWidth: Width of source area to be copied. + :param srcHeight: Height of source area to be copied. + :param logicalFunc: Logical function to use: see `SetLogicalFunction`. + :param useMask: If true, StretchBlit does a transparent blit using + the mask that is associated with the bitmap selected + into the source device context. + :param xsrcMask: Source x position on the mask. If both xsrcMask and + ysrcMask are -1, xsrc and ysrc will be assumed for + the mask source position. Currently only implemented + on Windows. + :param ysrcMask: Source y position on the mask. +"); + + + + DocDeclStrName( + bool , StretchBlit(const wxPoint& dstPt, const wxSize& dstSize, + wxDC *source, const wxPoint& srcPt, const wxSize& srcSize, + int rop = wxCOPY, bool useMask = false, + const wxPoint& srcMaskPt = wxDefaultPosition), + "Copy from a source DC to this DC, specifying the destination +coordinates, destination size, source DC, source coordinates, size of +source area to copy, logical function, whether to use a bitmap mask, +and mask source position. This version is the same as `StretchBlit` +except `wx.Point` and `wx.Size` objects are used instead of individual +position and size components.", "", + StretchBlitPointSize); + + + DocDeclStr( wxBitmap , GetAsBitmap(const wxRect *subrect = NULL) const, "", ""); @@ -1487,7 +1538,8 @@ destroyed safely.", ""); enum { wxBUFFER_VIRTUAL_AREA, - wxBUFFER_CLIENT_AREA + wxBUFFER_CLIENT_AREA, + wxBUFFER_USES_SHARED_BUFFER }; MustHaveApp(wxBufferedDC); diff --git a/wxPython/src/_defs.i b/wxPython/src/_defs.i index 7723185846..d56781bf99 100644 --- a/wxPython/src/_defs.i +++ b/wxPython/src/_defs.i @@ -520,8 +520,6 @@ enum { wxLB_EXTENDED, wxLB_OWNERDRAW, wxLB_HSCROLL, - wxPROCESS_ENTER, - wxPASSWORD, wxCB_SIMPLE, wxCB_DROPDOWN, @@ -802,9 +800,8 @@ enum wxStretch wxSHAPED, wxFIXED_MINSIZE, wxTILE, - wxADJUST_MINSIZE, }; - +%pythoncode { ADJUST_MINSIZE = 0 } enum wxBorder { @@ -907,8 +904,6 @@ enum wxKeyCode { WXK_MENU, WXK_PAUSE, WXK_CAPITAL, - WXK_PRIOR, /* Page up */ - WXK_NEXT, /* Page down */ WXK_END, WXK_HOME, WXK_LEFT, @@ -978,9 +973,7 @@ enum wxKeyCode { WXK_NUMPAD_UP, WXK_NUMPAD_RIGHT, WXK_NUMPAD_DOWN, - WXK_NUMPAD_PRIOR, WXK_NUMPAD_PAGEUP, - WXK_NUMPAD_NEXT, WXK_NUMPAD_PAGEDOWN, WXK_NUMPAD_END, WXK_NUMPAD_BEGIN, @@ -1023,7 +1016,13 @@ enum wxKeyCode { WXK_SPECIAL20 }; - +// deprecated synonymns +%pythoncode { + WXK_PRIOR = WXK_PAGEUP + WXK_NEXT = WXK_PAGEDOWN + WXK_NUMPAD_PRIOR = WXK_NUMPAD_PAGEUP + WXK_NUMPAD_NEXT = WXK_NUMPAD_PAGEDOWN +} typedef enum { wxPAPER_NONE, // Use specific dimensions diff --git a/wxPython/src/_display.i b/wxPython/src/_display.i index 1003365dfc..2a8a450458 100644 --- a/wxPython/src/_display.i +++ b/wxPython/src/_display.i @@ -121,7 +121,7 @@ doesn't belong to any display", ""); "Find the display where the given window lies, return wx.NOT_FOUND if it is not shown at all.", ""); - static int GetFromWindow(wxWindow *window); + static int GetFromWindow(const wxWindow *window); DocDeclStr( diff --git a/wxPython/src/_event.i b/wxPython/src/_event.i index 553f0e1cf6..5f7c7140b4 100644 --- a/wxPython/src/_event.i +++ b/wxPython/src/_event.i @@ -663,7 +663,7 @@ false otherwise (if it was).", ""); DocStr(wxScrollEvent, "A scroll event holds information about events sent from stand-alone scrollbars and sliders. Note that scrolled windows do not send -instnaces of this event class, but send the `wx.ScrollWinEvent` +instances of this event class, but send the `wx.ScrollWinEvent` instead.", " Events diff --git a/wxPython/src/_functions.i b/wxPython/src/_functions.i index 7b5d74e133..481f99d87f 100644 --- a/wxPython/src/_functions.i +++ b/wxPython/src/_functions.i @@ -70,13 +70,9 @@ void wxBell(); MustHaveApp(wxEndBusyCursor); void wxEndBusyCursor(); -long wxGetElapsedTime(bool resetTimer = true); -%pythoncode { GetElapsedTime = wx._deprecated(GetElapsedTime) } - bool wxIsBusy(); wxString wxNow(); bool wxShell(const wxString& command = wxPyEmptyString); -void wxStartTimer(); DocDeclA( diff --git a/wxPython/src/_graphics.i b/wxPython/src/_graphics.i index 90246393dd..8b667a7235 100644 --- a/wxPython/src/_graphics.i +++ b/wxPython/src/_graphics.i @@ -670,13 +670,15 @@ public: static wxGraphicsContext* , CreateFromNative( void * context ) , "Creates a wx.GraphicsContext from a native context. This native context must be eg a CGContextRef for Core Graphics, a Graphics -pointer for GDIPlus or a cairo_t pointer for Cairo.", ""); +pointer for GDIPlus or a cairo_t pointer for Cairo. NOTE: For +wxPython we still need a way to make this value usable.", ""); %newobject CreateFromNative; DocDeclStr( static wxGraphicsContext* , CreateFromNativeWindow( void * window ) , - "Creates a wx.GraphicsContext from a native window.", ""); + "Creates a wx.GraphicsContext from a native window. NOTE: For wxPython +we still need a way to make this value usable.", ""); @@ -799,8 +801,7 @@ this context.", ""); DocDeclStr( virtual wxGraphicsMatrix , GetTransform() const, "Gets the current transformation matrix of this context.", ""); - - + DocStr(SetPen, "Sets the stroke pen", ""); @@ -937,8 +938,9 @@ and the current brush is used for filling.", ""); %extend { - DocStr(StrokeLineSegements, - "Stroke disconnected lines from begin to end points", ""); + DocAStr(StrokeLineSegements, + "StrokeLineSegments(self, List beginPoints, List endPoints)", + "Stroke disconnected lines from begin to end points", ""); void StrokeLineSegements(PyObject* beginPoints, PyObject* endPoints) { size_t c1, c2, count; diff --git a/wxPython/src/_intl.i b/wxPython/src/_intl.i index d401c72de2..c8dff0c6db 100644 --- a/wxPython/src/_intl.i +++ b/wxPython/src/_intl.i @@ -329,12 +329,12 @@ public: ~wxLocale(); %extend { - bool Init1(const wxString& szName, - const wxString& szShort = wxPyEmptyString, - const wxString& szLocale = wxPyEmptyString, + bool Init1(const wxString& name, + const wxString& shortName = wxPyEmptyString, + const wxString& locale = wxPyEmptyString, bool bLoadDefault = true, bool bConvertEncoding = false) { - bool rc = self->Init(szName, szShort, szLocale, bLoadDefault, bConvertEncoding); + bool rc = self->Init(name, shortName, locale, bLoadDefault, bConvertEncoding); // Python before 2.4 needs to have LC_NUMERIC set to "C" in order // for the floating point conversions and such to work right. %#if PY_VERSION_HEX < 0x02040000 @@ -416,13 +416,13 @@ public: // The loaded catalog will be used for message lookup by GetString(). // // Returns 'True' if it was successfully loaded - bool AddCatalog(const wxString& szDomain); + bool AddCatalog(const wxString& domain); // check if the given locale is provided by OS and C run time static bool IsAvailable(int lang); // check if the given catalog is loaded - bool IsLoaded(const wxString& szDomain) const; + bool IsLoaded(const wxString& domain) const; // Retrieve the language info struct for the given language // @@ -455,8 +455,8 @@ public: // // domains are searched in the last to first order, i.e. catalogs // added later override those added before. - wxString GetString(const wxString& szOrigString, - const wxString& szDomain = wxPyEmptyString) const; + wxString GetString(const wxString& origString, + const wxString& domain = wxPyEmptyString) const; // Returns the current short name for the locale const wxString& GetName() const; @@ -478,28 +478,31 @@ class wxPyLocale : public wxLocale public: wxPyLocale(); - wxPyLocale(const wxChar *szName, // name (for messages) - const wxChar *szShort = (const wxChar *) NULL, // dir prefix (for msg files) - const wxChar *szLocale = (const wxChar *) NULL, // locale (for setlocale) - bool bLoadDefault = true, // preload wxstd.mo? - bool bConvertEncoding = false); // convert Win<->Unix if necessary? + wxPyLocale(const wxString& name, // name (for messages) + const wxString& shortName = wxPyEmptyString, // dir prefix (for msg files) + const wxString& locale = wxPyEmptyString, // locale (for setlocale) + bool bLoadDefault = true, // preload wxstd.mo? + bool bConvertEncoding = false); // convert Win<->Unix if necessary? wxPyLocale(int language, // wxLanguage id or custom language - int flags = wxLOCALE_LOAD_DEFAULT | wxLOCALE_CONV_ENCODING); + int flags = wxLOCALE_LOAD_DEFAULT | wxLOCALE_CONV_ENCODING); ~wxPyLocale(); - virtual const wxChar *GetString(const wxChar *szOrigString, - const wxChar *szDomain = NULL) const; - virtual const wxChar *GetString(const wxChar *szOrigString, - const wxChar *szOrigString2, size_t n, - const wxChar *szDomain = NULL) const; - - virtual wxChar *GetSingularString(const wxChar *szOrigString, - const wxChar *szDomain = NULL) const; - virtual wxChar *GetPluralString(const wxChar *szOrigString, - const wxChar *szOrigString2, size_t n, - const wxChar *szDomain = NULL) const; + virtual const wxString& GetString(const wxString& origString, + const wxString& domain = wxPyEmptyString) const; + virtual const wxString& GetString(const wxString& origString, + const wxString& origString2, + size_t n, + const wxString& domain = wxPyEmptyString) const; + + virtual const wxString& GetSingularString(const wxString& origString, + const wxString& domain = wxPyEmptyString) const; + virtual const wxString& GetPluralString(const wxString& origString, + const wxString& origString2, + size_t n, + const wxString& domain = wxPyEmptyString) const; + PYPRIVATE; private: @@ -510,12 +513,12 @@ wxPyLocale::wxPyLocale() : wxLocale() { } -wxPyLocale::wxPyLocale(const wxChar *szName, // name (for messages) - const wxChar *szShort, // dir prefix (for msg files) - const wxChar *szLocale, // locale (for setlocale) - bool bLoadDefault, // preload wxstd.mo? - bool bConvertEncoding) // convert Win<->Unix if necessary? - : wxLocale(szName, szShort, szLocale, bLoadDefault, bConvertEncoding) +wxPyLocale::wxPyLocale(const wxString& name, // name (for messages) + const wxString& shortName, // dir prefix (for msg files) + const wxString& locale, // locale (for setlocale) + bool bLoadDefault, // preload wxstd.mo? + bool bConvertEncoding) // convert Win<->Unix if necessary? + : wxLocale(name, shortName, locale, bLoadDefault, bConvertEncoding) { } @@ -528,31 +531,29 @@ wxPyLocale::~wxPyLocale() { } -const wxChar *wxPyLocale::GetString(const wxChar *szOrigString, - const wxChar *szDomain) const +const wxString& wxPyLocale::GetString(const wxString& origString, + const wxString& domain) const { - wxChar *str = GetSingularString(szOrigString, szDomain); - return (str != NULL) ? str : wxLocale::GetString(szOrigString, szDomain); + return GetSingularString(origString, domain); } -const wxChar *wxPyLocale::GetString(const wxChar *szOrigString, - const wxChar *szOrigString2, size_t n, - const wxChar *szDomain) const +const wxString& wxPyLocale::GetString(const wxString& origString, + const wxString& origString2, + size_t n, + const wxString& domain) const { - wxChar *str = GetPluralString(szOrigString, szOrigString2, n, szDomain); - return (str != NULL) ? str : wxLocale::GetString(szOrigString, szOrigString2, n, szDomain); + return GetPluralString(origString, origString2, n, domain); } -wxChar *wxPyLocale::GetSingularString(const wxChar *szOrigString, - const wxChar *szDomain) const +const wxString& wxPyLocale::GetSingularString(const wxString& origString, + const wxString& domain) const { bool found; - static wxString str; - str = _T("error in translation"); // when the first if condition is true but the second if condition is not we do not want to return the previously queried string. + wxString str( _T("error in translation")); wxPyBlock_t blocked = wxPyBeginBlockThreads(); - if((found=wxPyCBH_findCallback(m_myInst, "GetSingularString"))) { - PyObject* param1 = wx2PyString(szOrigString); - PyObject* param2 = wx2PyString(szDomain); + if ((found=wxPyCBH_findCallback(m_myInst, "GetSingularString"))) { + PyObject* param1 = wx2PyString(origString); + PyObject* param2 = wx2PyString(domain); PyObject* ret = wxPyCBH_callCallbackObj(m_myInst, Py_BuildValue("(OO)", param1, param2)); Py_DECREF(param1); Py_DECREF(param2); @@ -562,22 +563,24 @@ wxChar *wxPyLocale::GetSingularString(const wxChar *szOrigString, } } wxPyEndBlockThreads(blocked); - return (found ? (wxChar*)str.c_str() : NULL); + return (found ? str : wxLocale::GetString(origString, domain)); } -wxChar *wxPyLocale::GetPluralString(const wxChar *szOrigString, - const wxChar *szOrigString2, size_t n, - const wxChar *szDomain) const +const wxString& wxPyLocale::GetPluralString(const wxString& origString, + const wxString& origString2, size_t n, + const wxString& domain) const { bool found; - static wxString str; - str = _T("error in translation"); // when the first if condition is true but the second if condition is not we do not want to return the previously queried string. + wxString str( _T("error in translation")); wxPyBlock_t blocked = wxPyBeginBlockThreads(); - if((found=wxPyCBH_findCallback(m_myInst, "GetPluralString"))) { - PyObject* param1 = wx2PyString(szOrigString); - PyObject* param2 = wx2PyString(szOrigString2); - PyObject* param4 = wx2PyString(szDomain); - PyObject* ret = wxPyCBH_callCallbackObj(m_myInst, Py_BuildValue("(OOiO)", param1, param2, (int)n, param4)); + if ((found=wxPyCBH_findCallback(m_myInst, "GetPluralString"))) { + PyObject* param1 = wx2PyString(origString); + PyObject* param2 = wx2PyString(origString2); + PyObject* param4 = wx2PyString(domain); + PyObject* ret = wxPyCBH_callCallbackObj(m_myInst, + Py_BuildValue("(OOiO)", + param1, param2, + (int)n, param4)); Py_DECREF(param1); Py_DECREF(param2); Py_DECREF(param4); @@ -587,7 +590,7 @@ wxChar *wxPyLocale::GetPluralString(const wxChar *szOrigString, } } wxPyEndBlockThreads(blocked); - return (found ? (wxChar*)str.c_str() : NULL); + return (found ? str : wxLocale::GetString(origString, origString2, n, domain) ); } %} @@ -619,11 +622,11 @@ public: void _setCallbackInfo(PyObject* self, PyObject* _class); - virtual const wxChar *GetSingularString(const wxChar *szOrigString, - const wxChar *szDomain = NULL) const; - virtual const wxChar *GetPluralString(const wxChar *szOrigString, - const wxChar *szOrigString2, size_t n, - const wxChar *szDomain = NULL) const; + virtual const wxString& GetSingularString(const wxString& origString, + const wxString& domain = wxPyEmptyString) const; + virtual const wxString& GetPluralString(const wxString& origString, + const wxString& origString2, size_t n, + const wxString& domain = wxPyEmptyString) const; }; //--------------------------------------------------------------------------- diff --git a/wxPython/src/_menu.i b/wxPython/src/_menu.i index c19a304862..db3c33ce71 100644 --- a/wxPython/src/_menu.i +++ b/wxPython/src/_menu.i @@ -367,7 +367,6 @@ public: } %property(Frame, GetFrame, doc="See `GetFrame`"); - %property(Menu, GetMenu, doc="See `GetMenu`"); %property(MenuCount, GetMenuCount, doc="See `GetMenuCount`"); %property(Menus, GetMenus, SetMenus, doc="See `GetMenus` and `SetMenus`"); }; diff --git a/wxPython/src/_sashwin.i b/wxPython/src/_sashwin.i index a38c88ea68..6aaa5ecaf8 100644 --- a/wxPython/src/_sashwin.i +++ b/wxPython/src/_sashwin.i @@ -76,11 +76,11 @@ public: // Get whether there's a sash in this position bool GetSashVisible(wxSashEdgePosition edge) const; - // Set whether there's a border in this position - void SetSashBorder(wxSashEdgePosition edge, bool border); +// // Set whether there's a border in this position +// void SetSashBorder(wxSashEdgePosition edge, bool border); - // Get whether there's a border in this position - bool HasBorder(wxSashEdgePosition edge) const; +// // Get whether there's a border in this position +// bool HasBorder(wxSashEdgePosition edge) const; // Get border size int GetEdgeMargin(wxSashEdgePosition edge) const; diff --git a/wxPython/src/_sizers.i b/wxPython/src/_sizers.i index 2b1e26a76c..ef1ab445c2 100644 --- a/wxPython/src/_sizers.i +++ b/wxPython/src/_sizers.i @@ -21,6 +21,155 @@ //--------------------------------------------------------------------------- %newgroup; +DocStr(wxSizerFlags, +"Normally, when you add an item to a sizer via `wx.Sizer.Add`, you have +to specify a lot of flags and parameters which can be unwieldy. This +is where wx.SizerFlags comes in: it allows you to specify all +parameters using the named methods instead. For example, instead of:: + + sizer.Add(ctrl, 0, wx.EXPAND | wx.ALL, 10) + +you can now write:: + + sizer.AddF(ctrl, wx.SizerFlags().Expand().Border(wx.ALL, 10)) + +This is more readable and also allows you to create wx.SizerFlags +objects which can be reused for several sizer items.:: + + flagsExpand = wx.SizerFlags(1) + flagsExpand.Expand().Border(wx.ALL, 10) + sizer.AddF(ctrl1, flagsExpand) + sizer.AddF(ctrl2, flagsExpand) + +Note that by specification, all methods of wx.SizerFlags return the +wx.SizerFlags object itself allowing chaining multiple method calls +like in the examples above.", ""); + +class wxSizerFlags +{ +public: + // construct the flags object initialized with the given proportion (0 by + // default) + DocCtorStr( + wxSizerFlags(int proportion = 0), + "Constructs the flags object with the specified proportion.", ""); + + ~wxSizerFlags(); + + // This typemap ensures that the returned object is the same + // Python instance as what was passed in as `self`, instead of + // creating a new proxy as SWIG would normally do. + %typemap(out) wxSizerFlags& { $result = $self; Py_INCREF($result); } + + DocDeclStr( + wxSizerFlags& , Proportion(int proportion), + "Sets the item's proportion value.", ""); + + DocDeclStr( + wxSizerFlags& , Align(int alignment), + "Sets the item's alignment", ""); + + DocDeclStr( + wxSizerFlags& , Expand(), + "Sets the wx.EXPAND flag, which will cause the item to be expanded to +fill as much space as it is given by the sizer.", ""); + + DocDeclStr( + wxSizerFlags& , Centre(), + "Same as `Center` for those with an alternate dialect of English.", ""); + + DocDeclStr( + wxSizerFlags& , Center(), + "Sets the centering alignment flags.", ""); + + DocDeclStr( + wxSizerFlags& , Left(), + "Aligns the object to the left, a shortcut for calling +Align(wx.ALIGN_LEFT)", ""); + + DocDeclStr( + wxSizerFlags& , Right(), + "Aligns the object to the right, a shortcut for calling +Align(wx.ALIGN_RIGHT)", ""); + + DocDeclStr( + wxSizerFlags& , Top(), + "Aligns the object to the top of the available space, a shortcut for +calling Align(wx.ALIGN_TOP)", ""); + + DocDeclStr( + wxSizerFlags& , Bottom(), + "Aligns the object to the bottom of the available space, a shortcut for +calling Align(wx.ALIGN_BOTTOM)", ""); + + DocDeclStr( + wxSizerFlags& , Shaped(), + "Sets the wx.SHAPED flag.", ""); + + DocDeclStr( + wxSizerFlags& , FixedMinSize(), + "Sets the wx.FIXED_MINSIZE flag.", ""); + + + + %extend { + DocDeclStr( + wxSizerFlags& , Border(int direction=wxALL, int borderInPixels=-1), + "Sets the border of the item in the direction(s) or sides given by the +direction parameter. If the borderInPixels value is not given then +the default border size (see `GetDefaultBorder`) will be used.", "") + { + if (borderInPixels == -1) + return self->Border(direction); + else + return self->Border(direction, borderInPixels); + } + } + + DocDeclStr( + wxSizerFlags& , DoubleBorder(int direction = wxALL), + "Sets the border in the given direction to twice the default border +size.", ""); + + DocDeclStr( + wxSizerFlags& , TripleBorder(int direction = wxALL), + "Sets the border in the given direction to three times the default +border size.", ""); + + DocDeclStr( + wxSizerFlags& , HorzBorder(), + "Sets the left and right borders to the default border size.", ""); + + DocDeclStr( + wxSizerFlags& , DoubleHorzBorder(), + "Sets the left and right borders to twice the default border size.", ""); + + + // Clear the typemap + %typemap(out) wxSizerFlags& ; + + + + DocDeclStr( + static int , GetDefaultBorder(), + "Returns the default border size used by the other border methods", ""); + + + DocDeclStr( + int , GetProportion() const, + "Returns the proportion value to be used in the sizer item.", ""); + + DocDeclStr( + int , GetFlags() const, + "Returns the flags value to be used in the sizer item.", ""); + + DocDeclStr( + int , GetBorderInPixels() const, + "Returns the border value in pixels to be used in the sizer item.", ""); +}; + +//--------------------------------------------------------------------------- + DocStr(wxSizerItem, "The wx.SizerItem class is used to track the position, size and other attributes of each item managed by a `wx.Sizer`. It is not usually @@ -444,7 +593,7 @@ public: - **sizer**: The (child-)sizer to be added to the sizer. This allows placing a child sizer in a sizer and thus to create - hierarchies of sizers (typically a vertical box as the top + hierarchies of sizers (for example a vertical box as the top sizer and several horizontal boxes on the level beneath). - **size**: A `wx.Size` or a 2-element sequence of integers @@ -552,8 +701,34 @@ public: return NULL; } -// virtual wxSizerItem* AddSpacer(int size); -// virtual wxSizerItem* AddStretchSpacer(int prop = 1); + + DocAStr(AddF, + "AddF(self, item, wx.SizerFlags flags) -> wx.SizerItem", + "Similar to `Add` but uses the `wx.SizerFlags` convenience class for +setting the various flags, options and borders.", ""); + wxSizerItem* AddF(PyObject* item, wxSizerFlags& flags) { + + wxPyBlock_t blocked = wxPyBeginBlockThreads(); + wxPySizerItemInfo info = wxPySizerItemTypeHelper(item, true, false); + if ( info.sizer ) + PyObject_SetAttrString(item,"thisown",Py_False); + wxPyEndBlockThreads(blocked); + + // Now call the real Add method if a valid item type was found + if ( info.window ) + return self->Add(info.window, flags); + else if ( info.sizer ) + return self->Add(info.sizer, flags); + else if (info.gotSize) + return self->Add(info.size.GetWidth(), info.size.GetHeight(), + flags.GetProportion(), + flags.GetFlags(), + flags.GetBorderInPixels()); + else + return NULL; + } + + DocAStr(Insert, "Insert(self, int before, item, int proportion=0, int flag=0, int border=0, @@ -586,8 +761,35 @@ the item at index *before*. See `Add` for a description of the parameters.", "" } -// virtual wxSizerItem* InsertSpacer(size_t index, int size); -// virtual wxSizerItem* InsertStretchSpacer(size_t index, int prop = 1); + + DocAStr(InsertF, + "InsertF(self, int before, item, wx.SizerFlags flags) -> wx.SizerItem", + "Similar to `Insert`, but uses the `wx.SizerFlags` convenience class +for setting the various flags, options and borders.", ""); + wxSizerItem* InsertF(int before, PyObject* item, wxSizerFlags& flags) { + + wxPyBlock_t blocked = wxPyBeginBlockThreads(); + wxPySizerItemInfo info = wxPySizerItemTypeHelper(item, true, false); + if ( info.sizer ) + PyObject_SetAttrString(item,"thisown",Py_False); + wxPyEndBlockThreads(blocked); + + // Now call the real Insert method if a valid item type was found + if ( info.window ) + return self->Insert(before, info.window, flags); + else if ( info.sizer ) + return self->Insert(before, info.sizer, flags); + else if (info.gotSize) + return self->Insert(before, info.size.GetWidth(), info.size.GetHeight(), + flags.GetProportion(), + flags.GetFlags(), + flags.GetBorderInPixels()); + else + return NULL; + } + + + DocAStr(Prepend, "Prepend(self, item, int proportion=0, int flag=0, int border=0, @@ -619,10 +821,36 @@ this sizer. See `Add` for a description of the parameters.", ""); return NULL; } -// virtual wxSizerItem* PrependSpacer(int size); -// virtual wxSizerItem* PrependStretchSpacer(int prop = 1); + DocAStr(PrependF, + "PrependF(self, item, wx.SizerFlags flags) -> wx.SizerItem", + "Similar to `Prepend` but uses the `wx.SizerFlags` convenience class +for setting the various flags, options and borders.", ""); + wxSizerItem* PrependF(PyObject* item, wxSizerFlags& flags) { + + wxPyBlock_t blocked = wxPyBeginBlockThreads(); + wxPySizerItemInfo info = wxPySizerItemTypeHelper(item, true, false); + if ( info.sizer ) + PyObject_SetAttrString(item,"thisown",Py_False); + wxPyEndBlockThreads(blocked); + + // Now call the real Add method if a valid item type was found + if ( info.window ) + return self->Prepend(info.window, flags); + else if ( info.sizer ) + return self->Prepend(info.sizer, flags); + else if (info.gotSize) + return self->Prepend(info.size.GetWidth(), info.size.GetHeight(), + flags.GetProportion(), + flags.GetFlags(), + flags.GetBorderInPixels()); + else + return NULL; + } + + + DocAStr(Remove, "Remove(self, item) -> bool", "Removes an item from the sizer and destroys it. This method does not @@ -642,7 +870,7 @@ and removed.", " wxPySizerItemInfo info = wxPySizerItemTypeHelper(item, false, true); wxPyEndBlockThreads(blocked); if ( info.window ) - return self->Remove(info.window); + return false; //self->Remove(info.window); else if ( info.sizer ) return self->Remove(info.sizer); else if ( info.gotPos ) @@ -675,18 +903,18 @@ was found and detached.", ""); DocAStr(GetItem, - "GetItem(self, item) -> wx.SizerItem", + "GetItem(self, item, recursive=False) -> wx.SizerItem", "Returns the `wx.SizerItem` which holds the *item* given. The *item* parameter can be either a window, a sizer, or the zero-based index of the item to be found.", ""); - wxSizerItem* GetItem(PyObject* item) { + wxSizerItem* GetItem(PyObject* item, bool recursive=false) { wxPyBlock_t blocked = wxPyBeginBlockThreads(); wxPySizerItemInfo info = wxPySizerItemTypeHelper(item, false, true); wxPyEndBlockThreads(blocked); if ( info.window ) - return self->GetItem(info.window); + return self->GetItem(info.window, recursive); else if ( info.sizer ) - return self->GetItem(info.sizer); + return self->GetItem(info.sizer, recursive); else if ( info.gotPos ) return self->GetItem(info.pos); else @@ -731,9 +959,9 @@ the item to be found.", ""); """ if isinstance(olditem, wx.Window): return self._ReplaceWin(olditem, item, recursive) - elif isinstnace(olditem, wx.Sizer): + elif isinstance(olditem, wx.Sizer): return self._ReplaceSizer(olditem, item, recursive) - elif isinstnace(olditem, int): + elif isinstance(olditem, int): return self._ReplaceItem(olditem, item) else: raise TypeError("Expected Window, Sizer, or integer for first parameter.") diff --git a/wxPython/src/_stockobjs.i b/wxPython/src/_stockobjs.i index 8eb9289ffa..544067e1a2 100644 --- a/wxPython/src/_stockobjs.i +++ b/wxPython/src/_stockobjs.i @@ -198,14 +198,6 @@ class wxPenList : public wxGDIObjListBase { public: wxPen* FindOrCreatePen(const wxColour& colour, int width, int style); - - void AddPen(wxPen* pen); - void RemovePen(wxPen* pen); - %pythoncode { - AddPen = wx._deprecated(AddPen) - RemovePen = wx._deprecated(RemovePen) - } -// int GetCount(); }; @@ -213,14 +205,6 @@ class wxBrushList : public wxGDIObjListBase { public: wxBrush * FindOrCreateBrush(const wxColour& colour, int style=wxSOLID); - - void AddBrush(wxBrush *brush); - void RemoveBrush(wxBrush *brush); - %pythoncode { - AddBrush = wx._deprecated(AddBrush) - RemoveBrush = wx._deprecated(RemoveBrush) - } -// int GetCount(); }; @@ -231,15 +215,6 @@ public: bool underline = false, const wxString& facename = wxPyEmptyString, wxFontEncoding encoding = wxFONTENCODING_DEFAULT); - - void AddFont(wxFont* font); - void RemoveFont(wxFont *font); - %pythoncode { - AddFont = wx._deprecated(AddFont) - RemoveFont = wx._deprecated(RemoveFont) - } - -// int GetCount(); }; //--------------------------------------------------------------------------- diff --git a/wxPython/src/_textctrl.i b/wxPython/src/_textctrl.i index f6755ef430..39c10fb7a4 100644 --- a/wxPython/src/_textctrl.i +++ b/wxPython/src/_textctrl.i @@ -70,6 +70,12 @@ enum { %pythoncode { TE_LINEWRAP = TE_CHARWRAP } +// deprecated synonymns +%pythoncode { +PROCESS_ENTER = TE_PROCESS_ENTER +PASSWORD = TE_PASSWORD +} + enum wxTextAttrAlignment diff --git a/wxPython/src/_toolbar.i b/wxPython/src/_toolbar.i index 3180b8e515..629b1b2c36 100644 --- a/wxPython/src/_toolbar.i +++ b/wxPython/src/_toolbar.i @@ -325,8 +325,10 @@ public: %Rename(AddToolItem, wxToolBarToolBase*, AddTool (wxToolBarToolBase *tool)); %Rename(InsertToolItem, wxToolBarToolBase*, InsertTool (size_t pos, wxToolBarToolBase *tool)); - wxToolBarToolBase *AddControl(wxControl *control); - wxToolBarToolBase *InsertControl(size_t pos, wxControl *control); + wxToolBarToolBase *AddControl(wxControl *control, + const wxString& label = wxEmptyString); + wxToolBarToolBase *InsertControl(size_t pos, wxControl *control, + const wxString& label = wxEmptyString); wxControl *FindControl( int id ); wxToolBarToolBase *AddSeparator(); diff --git a/wxPython/src/_toplvl.i b/wxPython/src/_toplvl.i index b85506b0d1..61a7e8ce60 100644 --- a/wxPython/src/_toplvl.i +++ b/wxPython/src/_toplvl.i @@ -30,13 +30,11 @@ enum wxMINIMIZE, wxMAXIMIZE, wxCLOSE_BOX, - wxTHICK_FRAME, wxSYSTEM_MENU, wxMINIMIZE_BOX, wxMAXIMIZE_BOX, wxTINY_CAPTION_HORIZ, wxTINY_CAPTION_VERT, - wxRESIZE_BOX, wxRESIZE_BORDER, wxDIALOG_NO_PARENT, @@ -54,16 +52,22 @@ enum wxFRAME_EX_METAL, wxDIALOG_EX_METAL, wxWS_EX_CONTEXTHELP, - - // Obsolete - wxDIALOG_MODAL, - wxDIALOG_MODELESS, - wxUSER_COLOURS, - wxNO_3D, wxFRAME_EX_CONTEXTHELP, wxDIALOG_EX_CONTEXTHELP, -}; +}; + +%pythoncode { + %# deprecated + RESIZE_BOX = MAXIMIZE_BOX + THICK_FRAME = RESIZE_BORDER + + %# Obsolete + wxDIALOG_MODAL = 0 + wxDIALOG_MODELESS = 0 + wxUSER_COLOURS = 0 + wxNO_3D = 0 +} enum diff --git a/wxPython/src/_vscroll.i b/wxPython/src/_vscroll.i index 546c0db92b..f19776d8e5 100644 --- a/wxPython/src/_vscroll.i +++ b/wxPython/src/_vscroll.i @@ -469,6 +469,9 @@ public: // change the background colour of the selected cells void SetSelectionBackground(const wxColour& col); + // refreshes only the selected items + void RefreshSelected(); + virtual void OnDrawSeparator(wxDC& dc, wxRect& rect, size_t n) const; virtual void OnDrawBackground(wxDC& dc, const wxRect& rect, size_t n) const; diff --git a/wxPython/src/_window.i b/wxPython/src/_window.i index 450d476f26..8a46dd75ca 100644 --- a/wxPython/src/_window.i +++ b/wxPython/src/_window.i @@ -775,7 +775,16 @@ window had already been in the specified state.", ""); DocDeclStr( bool , IsEnabled() const, - "Returns true if the window is enabled for input, false otherwise.", ""); + "Returns true if the window is enabled for input, false otherwise. +This method takes into account the enabled state of parent windows up +to the top-level window.", ""); + + DocDeclStr( + bool , IsThisEnabled() const, + "Returns the internal enabled state independent of the parent(s) state, +i.e. the state in which the window would be if all of its parents are +enabled. Use `IsEnabled` to get the effective window state.", ""); + DocDeclStr( virtual bool , IsShownOnScreen() const, @@ -892,6 +901,12 @@ or None.", ""); "Can this window have focus?", ""); + DocDeclStr( + bool , CanAcceptFocus() const, + "Can this window have focus right now?", ""); + + + DocDeclStr( virtual bool , AcceptsFocusFromKeyboard() const, "Can this window be given focus by keyboard navigation? if not, the @@ -899,13 +914,24 @@ only way to give it focus (provided it accepts it at all) is to click it.", ""); + + DocDeclStr( + bool , CanAcceptFocusFromKeyboard() const, + "Can this window be assigned focus from keyboard right now?", ""); + + + + DocDeclAStr( + virtual bool , NavigateIn(int flags = wxNavigationKeyEvent::IsForward), + "NavigateIn(self, int flags=NavigationKeyEvent.IsForward) -> bool", + "Navigates inside this window.", ""); DocDeclAStr( virtual bool , Navigate(int flags = wxNavigationKeyEvent::IsForward), "Navigate(self, int flags=NavigationKeyEvent.IsForward) -> bool", - "Does keyboard navigation from this window to another, by sending a -`wx.NavigationKeyEvent`.", " + "Does keyboard navigation starting from this window to another. This is +equivalient to self.GetParent().NavigateIn().", " :param flags: A combination of the ``IsForward`` or ``IsBackward`` and the ``WinChange`` values in the `wx.NavigationKeyEvent` @@ -973,8 +999,16 @@ do not change.", ""); wxWindow *, GetGrandParent() const, "Returns the parent of the parent of this window, or None if there isn't one.", ""); - + + %extend { + DocDeclStr(wxWindow *, GetTopLevelParent(), + "Returns the first frame or dialog in this window's parental hierarchy.", "") + { + return wxGetTopLevelParent(self); + } + } + DocDeclStr( virtual bool , IsTopLevel() const, @@ -2114,6 +2148,7 @@ opaque.", ""); %property(Font, GetFont, SetFont, doc="See `GetFont` and `SetFont`"); %property(ForegroundColour, GetForegroundColour, SetForegroundColour, doc="See `GetForegroundColour` and `SetForegroundColour`"); %property(GrandParent, GetGrandParent, doc="See `GetGrandParent`"); + %property(TopLevelParent, GetTopLevelParent, doc="See `GetTopLevelParent`"); %property(Handle, GetHandle, doc="See `GetHandle`"); %property(HelpText, GetHelpText, SetHelpText, doc="See `GetHelpText` and `SetHelpText`"); %property(Id, GetId, SetId, doc="See `GetId` and `SetId`"); diff --git a/wxPython/src/aui.i b/wxPython/src/aui.i index 1609c74f52..ee3dcdb88f 100755 --- a/wxPython/src/aui.i +++ b/wxPython/src/aui.i @@ -202,6 +202,11 @@ The following example shows a simple implementation that utilizes %ignore wxAuiMDIParentFrame::~wxAuiMDIParentFrame; %rename(PreAuiMDIParentFrame) wxAuiMDIParentFrame::wxAuiMDIParentFrame(); +// Ignore these for now because they need a typemap for the return value, see below. +%ignore wxAuiMDIParentFrame::GetNotebook; +%ignore wxAuiMDIParentFrame::GetActiveChild; +%ignore wxAuiMDIParentFrame::GetClientWindow; + %pythonAppend wxAuiMDIChildFrame::wxAuiMDIChildFrame "self._setOORInfo(self)"; %pythonAppend wxAuiMDIChildFrame::wxAuiMDIChildFrame() "val._setOORInfo(val)"; %ignore wxAuiMDIChildFrame::~wxAuiMDIChildFrame; @@ -213,6 +218,8 @@ The following example shows a simple implementation that utilizes %rename(PreAuiMDIClientWindow) wxAuiMDIClientWindow::wxAuiMDIClientWindow(); +%typemap(out) wxEvtHandler* { $result = wxPyMake_wxObject($1, $owner); } + //--------------------------------------------------------------------------- // Get all our defs from the REAL header files. @@ -300,6 +307,36 @@ The following example shows a simple implementation that utilizes ~wxAuiPaneButton() {} } +%extend wxAuiMDIParentFrame { + %typemap(out) wxAuiNotebook* { $result = wxPyMake_wxObject($1, $owner); } + %typemap(out) wxAuiMDIChildFrame* { $result = wxPyMake_wxObject($1, $owner); } + %typemap(out) wxAuiMDIClientWindow* { $result = wxPyMake_wxObject($1, $owner); } + + %rename(GetNotebook) _GetNotebook; + %rename(GetActiveChild) _GetActiveChild; + %rename(GetClientWindow) _GetClientWindow; + + wxAuiNotebook* _GetNotebook() const + { + return self->GetNotebook(); + } + + wxAuiMDIChildFrame* _GetActiveChild() const + { + return self->GetActiveChild(); + } + + wxAuiMDIClientWindow* _GetClientWindow() const + { + return self->GetClientWindow(); + } + + %typemap(out) wxAuiNotebook*; + %typemap(out) wxAuiMDIChildFrame*; + %typemap(out) wxAuiMDIClientWindow*; +} + + //--------------------------------------------------------------------------- %{ @@ -482,7 +519,7 @@ class wxPyAuiDockArt : public wxAuiDefaultDockArt { public: %pythonAppend wxPyAuiDockArt setCallbackInfo(PyAuiDockArt) - wxPyAuiDocArt(); + wxPyAuiDockArt(); }; diff --git a/wxPython/src/combo.i b/wxPython/src/combo.i index d14a2487ce..33c70d7387 100644 --- a/wxPython/src/combo.i +++ b/wxPython/src/combo.i @@ -49,6 +49,13 @@ enum { wxCC_POPUP_ON_MOUSE_UP = 0x0002, // All text is not automatically selected on click wxCC_NO_TEXT_AUTO_SELECT = 0x0004, + // Drop-button stays down as long as popup is displayed. + wxCC_BUTTON_STAYS_DOWN = 0x0008, + // Drop-button covers the entire control. + wxCC_FULL_BUTTON = 0x0010, + // Drop-button goes over the custom-border (used under WinVista). + wxCC_BUTTON_COVERS_BORDER = 0x0020, + }; diff --git a/wxPython/src/grid.i b/wxPython/src/grid.i index 2574e9edb4..c9491150ef 100644 --- a/wxPython/src/grid.i +++ b/wxPython/src/grid.i @@ -455,6 +455,20 @@ class wxGridCellAttr; #define wxGRID_VALUE_DATETIME "datetime" +// magic constant which tells (to some functions) to automatically calculate +// the appropriate size +enum { wxGRID_AUTOSIZE }; + + +// many wxGrid methods work either with columns or rows, this enum is used for +// the parameter indicating which one should it be +enum wxGridDirection +{ + wxGRID_COLUMN, + wxGRID_ROW +}; + + %immutable; const wxGridCellCoords wxGridNoCellCoords; const wxRect wxGridNoCellRect; @@ -2143,6 +2157,23 @@ public: }; +// ---------------------------------------------------------------------------- +// wxGridUpdateLocker prevents updates to a grid during its lifetime +// ---------------------------------------------------------------------------- + +class wxGridUpdateLocker +{ +public: + // if the pointer is NULL, Create() can be called later + wxGridUpdateLocker(wxGrid *grid = NULL); + ~wxGridUpdateLocker(); + + // can be called if ctor was used with a NULL pointer, must not be called + // more than once + void Create(wxGrid *grid); + +}; + //--------------------------------------------------------------------------- //--------------------------------------------------------------------------- // Grid events and stuff diff --git a/wxPython/src/gtk/_controls.py b/wxPython/src/gtk/_controls.py index f945fc8941..8fcc6817ca 100644 --- a/wxPython/src/gtk/_controls.py +++ b/wxPython/src/gtk/_controls.py @@ -1500,6 +1500,9 @@ TE_BESTWRAP = _controls_.TE_BESTWRAP TE_RICH2 = _controls_.TE_RICH2 TE_CAPITALIZE = _controls_.TE_CAPITALIZE TE_LINEWRAP = TE_CHARWRAP +PROCESS_ENTER = TE_PROCESS_ENTER +PASSWORD = TE_PASSWORD + TEXT_ALIGNMENT_DEFAULT = _controls_.TEXT_ALIGNMENT_DEFAULT TEXT_ALIGNMENT_LEFT = _controls_.TEXT_ALIGNMENT_LEFT TEXT_ALIGNMENT_CENTRE = _controls_.TEXT_ALIGNMENT_CENTRE @@ -3778,11 +3781,11 @@ class ToolBarBase(_core.Control): return _controls_.ToolBarBase_InsertToolItem(*args, **kwargs) def AddControl(*args, **kwargs): - """AddControl(self, Control control) -> ToolBarToolBase""" + """AddControl(self, Control control, String label=wxEmptyString) -> ToolBarToolBase""" return _controls_.ToolBarBase_AddControl(*args, **kwargs) def InsertControl(*args, **kwargs): - """InsertControl(self, size_t pos, Control control) -> ToolBarToolBase""" + """InsertControl(self, size_t pos, Control control, String label=wxEmptyString) -> ToolBarToolBase""" return _controls_.ToolBarBase_InsertControl(*args, **kwargs) def FindControl(*args, **kwargs): diff --git a/wxPython/src/gtk/_controls_wrap.cpp b/wxPython/src/gtk/_controls_wrap.cpp index d64cab06d4..6a4ca84410 100644 --- a/wxPython/src/gtk/_controls_wrap.cpp +++ b/wxPython/src/gtk/_controls_wrap.cpp @@ -24263,18 +24263,22 @@ SWIGINTERN PyObject *_wrap_ToolBarBase_AddControl(PyObject *SWIGUNUSEDPARM(self) PyObject *resultobj = 0; wxToolBarBase *arg1 = (wxToolBarBase *) 0 ; wxControl *arg2 = (wxControl *) 0 ; + wxString const &arg3_defvalue = wxEmptyString ; + wxString *arg3 = (wxString *) &arg3_defvalue ; wxToolBarToolBase *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; + bool temp3 = false ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; char * kwnames[] = { - (char *) "self",(char *) "control", NULL + (char *) "self",(char *) "control",(char *) "label", NULL }; - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:ToolBarBase_AddControl",kwnames,&obj0,&obj1)) SWIG_fail; + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|O:ToolBarBase_AddControl",kwnames,&obj0,&obj1,&obj2)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_wxToolBarBase, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ToolBarBase_AddControl" "', expected argument " "1"" of type '" "wxToolBarBase *""'"); @@ -24285,17 +24289,32 @@ SWIGINTERN PyObject *_wrap_ToolBarBase_AddControl(PyObject *SWIGUNUSEDPARM(self) SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ToolBarBase_AddControl" "', expected argument " "2"" of type '" "wxControl *""'"); } arg2 = reinterpret_cast< wxControl * >(argp2); + if (obj2) { + { + arg3 = wxString_in_helper(obj2); + if (arg3 == NULL) SWIG_fail; + temp3 = true; + } + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - result = (wxToolBarToolBase *)(arg1)->AddControl(arg2); + result = (wxToolBarToolBase *)(arg1)->AddControl(arg2,(wxString const &)*arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) SWIG_fail; } { resultobj = wxPyMake_wxObject(result, (bool)0); } + { + if (temp3) + delete arg3; + } return resultobj; fail: + { + if (temp3) + delete arg3; + } return NULL; } @@ -24305,6 +24324,8 @@ SWIGINTERN PyObject *_wrap_ToolBarBase_InsertControl(PyObject *SWIGUNUSEDPARM(se wxToolBarBase *arg1 = (wxToolBarBase *) 0 ; size_t arg2 ; wxControl *arg3 = (wxControl *) 0 ; + wxString const &arg4_defvalue = wxEmptyString ; + wxString *arg4 = (wxString *) &arg4_defvalue ; wxToolBarToolBase *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; @@ -24312,14 +24333,16 @@ SWIGINTERN PyObject *_wrap_ToolBarBase_InsertControl(PyObject *SWIGUNUSEDPARM(se int ecode2 = 0 ; void *argp3 = 0 ; int res3 = 0 ; + bool temp4 = false ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; char * kwnames[] = { - (char *) "self",(char *) "pos",(char *) "control", NULL + (char *) "self",(char *) "pos",(char *) "control",(char *) "label", NULL }; - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:ToolBarBase_InsertControl",kwnames,&obj0,&obj1,&obj2)) SWIG_fail; + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO|O:ToolBarBase_InsertControl",kwnames,&obj0,&obj1,&obj2,&obj3)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_wxToolBarBase, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ToolBarBase_InsertControl" "', expected argument " "1"" of type '" "wxToolBarBase *""'"); @@ -24335,17 +24358,32 @@ SWIGINTERN PyObject *_wrap_ToolBarBase_InsertControl(PyObject *SWIGUNUSEDPARM(se SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ToolBarBase_InsertControl" "', expected argument " "3"" of type '" "wxControl *""'"); } arg3 = reinterpret_cast< wxControl * >(argp3); + if (obj3) { + { + arg4 = wxString_in_helper(obj3); + if (arg4 == NULL) SWIG_fail; + temp4 = true; + } + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - result = (wxToolBarToolBase *)(arg1)->InsertControl(arg2,arg3); + result = (wxToolBarToolBase *)(arg1)->InsertControl(arg2,arg3,(wxString const &)*arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) SWIG_fail; } { resultobj = wxPyMake_wxObject(result, (bool)0); } + { + if (temp4) + delete arg4; + } return resultobj; fail: + { + if (temp4) + delete arg4; + } return NULL; } diff --git a/wxPython/src/gtk/_core.py b/wxPython/src/gtk/_core.py index ff70743710..fe25db7e47 100644 --- a/wxPython/src/gtk/_core.py +++ b/wxPython/src/gtk/_core.py @@ -116,8 +116,6 @@ LB_MULTIPLE = _core_.LB_MULTIPLE LB_EXTENDED = _core_.LB_EXTENDED LB_OWNERDRAW = _core_.LB_OWNERDRAW LB_HSCROLL = _core_.LB_HSCROLL -PROCESS_ENTER = _core_.PROCESS_ENTER -PASSWORD = _core_.PASSWORD CB_SIMPLE = _core_.CB_SIMPLE CB_DROPDOWN = _core_.CB_DROPDOWN CB_SORT = _core_.CB_SORT @@ -334,7 +332,7 @@ EXPAND = _core_.EXPAND SHAPED = _core_.SHAPED FIXED_MINSIZE = _core_.FIXED_MINSIZE TILE = _core_.TILE -ADJUST_MINSIZE = _core_.ADJUST_MINSIZE +ADJUST_MINSIZE = 0 BORDER_DEFAULT = _core_.BORDER_DEFAULT BORDER_NONE = _core_.BORDER_NONE BORDER_STATIC = _core_.BORDER_STATIC @@ -416,8 +414,6 @@ WXK_CONTROL = _core_.WXK_CONTROL WXK_MENU = _core_.WXK_MENU WXK_PAUSE = _core_.WXK_PAUSE WXK_CAPITAL = _core_.WXK_CAPITAL -WXK_PRIOR = _core_.WXK_PRIOR -WXK_NEXT = _core_.WXK_NEXT WXK_END = _core_.WXK_END WXK_HOME = _core_.WXK_HOME WXK_LEFT = _core_.WXK_LEFT @@ -486,9 +482,7 @@ WXK_NUMPAD_LEFT = _core_.WXK_NUMPAD_LEFT WXK_NUMPAD_UP = _core_.WXK_NUMPAD_UP WXK_NUMPAD_RIGHT = _core_.WXK_NUMPAD_RIGHT WXK_NUMPAD_DOWN = _core_.WXK_NUMPAD_DOWN -WXK_NUMPAD_PRIOR = _core_.WXK_NUMPAD_PRIOR WXK_NUMPAD_PAGEUP = _core_.WXK_NUMPAD_PAGEUP -WXK_NUMPAD_NEXT = _core_.WXK_NUMPAD_NEXT WXK_NUMPAD_PAGEDOWN = _core_.WXK_NUMPAD_PAGEDOWN WXK_NUMPAD_END = _core_.WXK_NUMPAD_END WXK_NUMPAD_BEGIN = _core_.WXK_NUMPAD_BEGIN @@ -525,6 +519,11 @@ WXK_SPECIAL17 = _core_.WXK_SPECIAL17 WXK_SPECIAL18 = _core_.WXK_SPECIAL18 WXK_SPECIAL19 = _core_.WXK_SPECIAL19 WXK_SPECIAL20 = _core_.WXK_SPECIAL20 +WXK_PRIOR = WXK_PAGEUP +WXK_NEXT = WXK_PAGEDOWN +WXK_NUMPAD_PRIOR = WXK_NUMPAD_PAGEUP +WXK_NUMPAD_NEXT = WXK_NUMPAD_PAGEDOWN + PAPER_NONE = _core_.PAPER_NONE PAPER_LETTER = _core_.PAPER_LETTER PAPER_LEGAL = _core_.PAPER_LEGAL @@ -4581,7 +4580,7 @@ class ScrollEvent(CommandEvent): """ A scroll event holds information about events sent from stand-alone scrollbars and sliders. Note that scrolled windows do not send - instnaces of this event class, but send the `wx.ScrollWinEvent` + instances of this event class, but send the `wx.ScrollWinEvent` instead. """ thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') @@ -8124,10 +8123,11 @@ class AcceleratorTable(Object): Ok = IsOk _core_.AcceleratorTable_swigregister(AcceleratorTable) +def GetAccelFromString(label): + entry = AcceleratorEntry() + entry.FromString(label) + return entry -def GetAccelFromString(*args, **kwargs): - """GetAccelFromString(String label) -> AcceleratorEntry""" - return _core_.GetAccelFromString(*args, **kwargs) #--------------------------------------------------------------------------- class VisualAttributes(object): @@ -8909,9 +8909,21 @@ class Window(EvtHandler): IsEnabled(self) -> bool Returns true if the window is enabled for input, false otherwise. + This method takes into account the enabled state of parent windows up + to the top-level window. """ return _core_.Window_IsEnabled(*args, **kwargs) + def IsThisEnabled(*args, **kwargs): + """ + IsThisEnabled(self) -> bool + + Returns the internal enabled state independent of the parent(s) state, + i.e. the state in which the window would be if all of its parents are + enabled. Use `IsEnabled` to get the effective window state. + """ + return _core_.Window_IsThisEnabled(*args, **kwargs) + def IsShownOnScreen(*args, **kwargs): """ IsShownOnScreen(self) -> bool @@ -9056,6 +9068,14 @@ class Window(EvtHandler): """ return _core_.Window_AcceptsFocus(*args, **kwargs) + def CanAcceptFocus(*args, **kwargs): + """ + CanAcceptFocus(self) -> bool + + Can this window have focus right now? + """ + return _core_.Window_CanAcceptFocus(*args, **kwargs) + def AcceptsFocusFromKeyboard(*args, **kwargs): """ AcceptsFocusFromKeyboard(self) -> bool @@ -9066,6 +9086,14 @@ class Window(EvtHandler): """ return _core_.Window_AcceptsFocusFromKeyboard(*args, **kwargs) + def CanAcceptFocusFromKeyboard(*args, **kwargs): + """ + CanAcceptFocusFromKeyboard(self) -> bool + + Can this window be assigned focus from keyboard right now? + """ + return _core_.Window_CanAcceptFocusFromKeyboard(*args, **kwargs) + def Navigate(*args, **kwargs): """ Navigate(self, int flags=NavigationKeyEvent.IsForward) -> bool @@ -9127,6 +9155,14 @@ class Window(EvtHandler): """ return _core_.Window_GetGrandParent(*args, **kwargs) + def GetTopLevelParent(*args, **kwargs): + """ + GetTopLevelParent(self) -> Window + + Returns the first frame or dialog in this window's parental hierarchy. + """ + return _core_.Window_GetTopLevelParent(*args, **kwargs) + def IsTopLevel(*args, **kwargs): """ IsTopLevel(self) -> bool @@ -10423,6 +10459,7 @@ class Window(EvtHandler): Font = property(GetFont,SetFont,doc="See `GetFont` and `SetFont`") ForegroundColour = property(GetForegroundColour,SetForegroundColour,doc="See `GetForegroundColour` and `SetForegroundColour`") GrandParent = property(GetGrandParent,doc="See `GetGrandParent`") + TopLevelParent = property(GetTopLevelParent,doc="See `GetTopLevelParent`") Handle = property(GetHandle,doc="See `GetHandle`") HelpText = property(GetHelpText,SetHelpText,doc="See `GetHelpText` and `SetHelpText`") Id = property(GetId,SetId,doc="See `GetId` and `SetId`") @@ -11066,7 +11103,6 @@ class MenuBar(Window): self.Append(m, l) Frame = property(GetFrame,doc="See `GetFrame`") - Menu = property(GetMenu,doc="See `GetMenu`") MenuCount = property(GetMenuCount,doc="See `GetMenuCount`") Menus = property(GetMenus,SetMenus,doc="See `GetMenus` and `SetMenus`") _core_.MenuBar_swigregister(MenuBar) @@ -11601,6 +11637,222 @@ _core_.ControlWithItems_swigregister(ControlWithItems) #--------------------------------------------------------------------------- +class SizerFlags(object): + """ + Normally, when you add an item to a sizer via `wx.Sizer.Add`, you have + to specify a lot of flags and parameters which can be unwieldy. This + is where wx.SizerFlags comes in: it allows you to specify all + parameters using the named methods instead. For example, instead of:: + + sizer.Add(ctrl, 0, wx.EXPAND | wx.ALL, 10) + + you can now write:: + + sizer.AddF(ctrl, wx.SizerFlags().Expand().Border(wx.ALL, 10)) + + This is more readable and also allows you to create wx.SizerFlags + objects which can be reused for several sizer items.:: + + flagsExpand = wx.SizerFlags(1) + flagsExpand.Expand().Border(wx.ALL, 10) + sizer.AddF(ctrl1, flagsExpand) + sizer.AddF(ctrl2, flagsExpand) + + Note that by specification, all methods of wx.SizerFlags return the + wx.SizerFlags object itself allowing chaining multiple method calls + like in the examples above. + """ + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + __repr__ = _swig_repr + def __init__(self, *args, **kwargs): + """ + __init__(self, int proportion=0) -> SizerFlags + + Constructs the flags object with the specified proportion. + """ + _core_.SizerFlags_swiginit(self,_core_.new_SizerFlags(*args, **kwargs)) + __swig_destroy__ = _core_.delete_SizerFlags + __del__ = lambda self : None; + def Proportion(*args, **kwargs): + """ + Proportion(self, int proportion) -> SizerFlags + + Sets the item's proportion value. + """ + return _core_.SizerFlags_Proportion(*args, **kwargs) + + def Align(*args, **kwargs): + """ + Align(self, int alignment) -> SizerFlags + + Sets the item's alignment + """ + return _core_.SizerFlags_Align(*args, **kwargs) + + def Expand(*args, **kwargs): + """ + Expand(self) -> SizerFlags + + Sets the wx.EXPAND flag, which will cause the item to be expanded to + fill as much space as it is given by the sizer. + """ + return _core_.SizerFlags_Expand(*args, **kwargs) + + def Centre(*args, **kwargs): + """ + Centre(self) -> SizerFlags + + Same as `Center` for those with an alternate dialect of English. + """ + return _core_.SizerFlags_Centre(*args, **kwargs) + + def Center(*args, **kwargs): + """ + Center(self) -> SizerFlags + + Sets the centering alignment flags. + """ + return _core_.SizerFlags_Center(*args, **kwargs) + + def Left(*args, **kwargs): + """ + Left(self) -> SizerFlags + + Aligns the object to the left, a shortcut for calling + Align(wx.ALIGN_LEFT) + """ + return _core_.SizerFlags_Left(*args, **kwargs) + + def Right(*args, **kwargs): + """ + Right(self) -> SizerFlags + + Aligns the object to the right, a shortcut for calling + Align(wx.ALIGN_RIGHT) + """ + return _core_.SizerFlags_Right(*args, **kwargs) + + def Top(*args, **kwargs): + """ + Top(self) -> SizerFlags + + Aligns the object to the top of the available space, a shortcut for + calling Align(wx.ALIGN_TOP) + """ + return _core_.SizerFlags_Top(*args, **kwargs) + + def Bottom(*args, **kwargs): + """ + Bottom(self) -> SizerFlags + + Aligns the object to the bottom of the available space, a shortcut for + calling Align(wx.ALIGN_BOTTOM) + """ + return _core_.SizerFlags_Bottom(*args, **kwargs) + + def Shaped(*args, **kwargs): + """ + Shaped(self) -> SizerFlags + + Sets the wx.SHAPED flag. + """ + return _core_.SizerFlags_Shaped(*args, **kwargs) + + def FixedMinSize(*args, **kwargs): + """ + FixedMinSize(self) -> SizerFlags + + Sets the wx.FIXED_MINSIZE flag. + """ + return _core_.SizerFlags_FixedMinSize(*args, **kwargs) + + def Border(*args, **kwargs): + """ + Border(self, int direction=ALL, int borderInPixels=-1) -> SizerFlags + + Sets the border of the item in the direction(s) or sides given by the + direction parameter. If the borderInPixels value is not given then + the default border size (see `GetDefaultBorder`) will be used. + """ + return _core_.SizerFlags_Border(*args, **kwargs) + + def DoubleBorder(*args, **kwargs): + """ + DoubleBorder(self, int direction=ALL) -> SizerFlags + + Sets the border in the given direction to twice the default border + size. + """ + return _core_.SizerFlags_DoubleBorder(*args, **kwargs) + + def TripleBorder(*args, **kwargs): + """ + TripleBorder(self, int direction=ALL) -> SizerFlags + + Sets the border in the given direction to three times the default + border size. + """ + return _core_.SizerFlags_TripleBorder(*args, **kwargs) + + def HorzBorder(*args, **kwargs): + """ + HorzBorder(self) -> SizerFlags + + Sets the left and right borders to the default border size. + """ + return _core_.SizerFlags_HorzBorder(*args, **kwargs) + + def DoubleHorzBorder(*args, **kwargs): + """ + DoubleHorzBorder(self) -> SizerFlags + + Sets the left and right borders to twice the default border size. + """ + return _core_.SizerFlags_DoubleHorzBorder(*args, **kwargs) + + def GetDefaultBorder(*args, **kwargs): + """ + GetDefaultBorder() -> int + + Returns the default border size used by the other border methods + """ + return _core_.SizerFlags_GetDefaultBorder(*args, **kwargs) + + GetDefaultBorder = staticmethod(GetDefaultBorder) + def GetProportion(*args, **kwargs): + """ + GetProportion(self) -> int + + Returns the proportion value to be used in the sizer item. + """ + return _core_.SizerFlags_GetProportion(*args, **kwargs) + + def GetFlags(*args, **kwargs): + """ + GetFlags(self) -> int + + Returns the flags value to be used in the sizer item. + """ + return _core_.SizerFlags_GetFlags(*args, **kwargs) + + def GetBorderInPixels(*args, **kwargs): + """ + GetBorderInPixels(self) -> int + + Returns the border value in pixels to be used in the sizer item. + """ + return _core_.SizerFlags_GetBorderInPixels(*args, **kwargs) + +_core_.SizerFlags_swigregister(SizerFlags) + +def SizerFlags_GetDefaultBorder(*args): + """ + SizerFlags_GetDefaultBorder() -> int + + Returns the default border size used by the other border methods + """ + return _core_.SizerFlags_GetDefaultBorder(*args) + class SizerItem(Object): """ The wx.SizerItem class is used to track the position, size and other @@ -11996,6 +12248,15 @@ class Sizer(Object): """ return _core_.Sizer_Add(*args, **kwargs) + def AddF(*args, **kwargs): + """ + AddF(self, item, wx.SizerFlags flags) -> wx.SizerItem + + Similar to `Add` but uses the `wx.SizerFlags` convenience class for + setting the various flags, options and borders. + """ + return _core_.Sizer_AddF(*args, **kwargs) + def Insert(*args, **kwargs): """ Insert(self, int before, item, int proportion=0, int flag=0, int border=0, @@ -12006,6 +12267,15 @@ class Sizer(Object): """ return _core_.Sizer_Insert(*args, **kwargs) + def InsertF(*args, **kwargs): + """ + InsertF(self, int before, item, wx.SizerFlags flags) -> wx.SizerItem + + Similar to `Insert`, but uses the `wx.SizerFlags` convenience class + for setting the various flags, options and borders. + """ + return _core_.Sizer_InsertF(*args, **kwargs) + def Prepend(*args, **kwargs): """ Prepend(self, item, int proportion=0, int flag=0, int border=0, @@ -12016,6 +12286,15 @@ class Sizer(Object): """ return _core_.Sizer_Prepend(*args, **kwargs) + def PrependF(*args, **kwargs): + """ + PrependF(self, item, wx.SizerFlags flags) -> wx.SizerItem + + Similar to `Prepend` but uses the `wx.SizerFlags` convenience class + for setting the various flags, options and borders. + """ + return _core_.Sizer_PrependF(*args, **kwargs) + def Remove(*args, **kwargs): """ Remove(self, item) -> bool @@ -12043,7 +12322,7 @@ class Sizer(Object): def GetItem(*args, **kwargs): """ - GetItem(self, item) -> wx.SizerItem + GetItem(self, item, recursive=False) -> wx.SizerItem Returns the `wx.SizerItem` which holds the *item* given. The *item* parameter can be either a window, a sizer, or the zero-based index of @@ -12083,9 +12362,9 @@ class Sizer(Object): """ if isinstance(olditem, wx.Window): return self._ReplaceWin(olditem, item, recursive) - elif isinstnace(olditem, wx.Sizer): + elif isinstance(olditem, wx.Sizer): return self._ReplaceSizer(olditem, item, recursive) - elif isinstnace(olditem, int): + elif isinstance(olditem, int): return self._ReplaceItem(olditem, item) else: raise TypeError("Expected Window, Sizer, or integer for first parameter.") diff --git a/wxPython/src/gtk/_core_wrap.cpp b/wxPython/src/gtk/_core_wrap.cpp index bfd182e665..464965772b 100644 --- a/wxPython/src/gtk/_core_wrap.cpp +++ b/wxPython/src/gtk/_core_wrap.cpp @@ -2583,24 +2583,25 @@ SWIG_Python_MustGetPtr(PyObject *obj, swig_type_info *ty, int argnum, int flags) #define SWIGTYPE_p_wxSize swig_types[117] #define SWIGTYPE_p_wxSizeEvent swig_types[118] #define SWIGTYPE_p_wxSizer swig_types[119] -#define SWIGTYPE_p_wxSizerItem swig_types[120] -#define SWIGTYPE_p_wxStaticBox swig_types[121] -#define SWIGTYPE_p_wxStaticBoxSizer swig_types[122] -#define SWIGTYPE_p_wxStdDialogButtonSizer swig_types[123] -#define SWIGTYPE_p_wxSysColourChangedEvent swig_types[124] -#define SWIGTYPE_p_wxTGAHandler swig_types[125] -#define SWIGTYPE_p_wxTIFFHandler swig_types[126] -#define SWIGTYPE_p_wxToolTip swig_types[127] -#define SWIGTYPE_p_wxUpdateUIEvent swig_types[128] -#define SWIGTYPE_p_wxValidator swig_types[129] -#define SWIGTYPE_p_wxVisualAttributes swig_types[130] -#define SWIGTYPE_p_wxWindow swig_types[131] -#define SWIGTYPE_p_wxWindowCreateEvent swig_types[132] -#define SWIGTYPE_p_wxWindowDestroyEvent swig_types[133] -#define SWIGTYPE_p_wxXPMHandler swig_types[134] -#define SWIGTYPE_p_wxZipFSHandler swig_types[135] -static swig_type_info *swig_types[137]; -static swig_module_info swig_module = {swig_types, 136, 0, 0, 0, 0}; +#define SWIGTYPE_p_wxSizerFlags swig_types[120] +#define SWIGTYPE_p_wxSizerItem swig_types[121] +#define SWIGTYPE_p_wxStaticBox swig_types[122] +#define SWIGTYPE_p_wxStaticBoxSizer swig_types[123] +#define SWIGTYPE_p_wxStdDialogButtonSizer swig_types[124] +#define SWIGTYPE_p_wxSysColourChangedEvent swig_types[125] +#define SWIGTYPE_p_wxTGAHandler swig_types[126] +#define SWIGTYPE_p_wxTIFFHandler swig_types[127] +#define SWIGTYPE_p_wxToolTip swig_types[128] +#define SWIGTYPE_p_wxUpdateUIEvent swig_types[129] +#define SWIGTYPE_p_wxValidator swig_types[130] +#define SWIGTYPE_p_wxVisualAttributes swig_types[131] +#define SWIGTYPE_p_wxWindow swig_types[132] +#define SWIGTYPE_p_wxWindowCreateEvent swig_types[133] +#define SWIGTYPE_p_wxWindowDestroyEvent swig_types[134] +#define SWIGTYPE_p_wxXPMHandler swig_types[135] +#define SWIGTYPE_p_wxZipFSHandler swig_types[136] +static swig_type_info *swig_types[138]; +static swig_module_info swig_module = {swig_types, 137, 0, 0, 0, 0}; #define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name) #define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name) @@ -3885,6 +3886,9 @@ SWIGINTERN PyObject *wxWindow_GetChildren(wxWindow *self){ wxWindowList& list = self->GetChildren(); return wxPy_ConvertList(&list); } +SWIGINTERN wxWindow *wxWindow_GetTopLevelParent(wxWindow *self){ + return wxGetTopLevelParent(self); + } SWIGINTERN bool wxWindow_RegisterHotKey(wxWindow *self,int hotkeyId,int modifiers,int keycode){ #if wxUSE_HOTKEY return self->RegisterHotKey(hotkeyId, modifiers, keycode); @@ -4022,6 +4026,12 @@ SWIGINTERN void wxItemContainer_SetClientData(wxItemContainer *self,int n,PyObje } +SWIGINTERN wxSizerFlags &wxSizerFlags_Border(wxSizerFlags *self,int direction=wxALL,int borderInPixels=-1){ + if (borderInPixels == -1) + return self->Border(direction); + else + return self->Border(direction, borderInPixels); + } SWIGINTERN wxSizerItem *new_wxSizerItem(wxWindow *window,int proportion,int flag,int border,PyObject *userData=NULL){ wxPyUserData* data = NULL; if ( userData ) { @@ -4165,6 +4175,27 @@ SWIGINTERN wxSizerItem *wxSizer_Add(wxSizer *self,PyObject *item,int proportion= else return NULL; } +SWIGINTERN wxSizerItem *wxSizer_AddF(wxSizer *self,PyObject *item,wxSizerFlags &flags){ + + wxPyBlock_t blocked = wxPyBeginBlockThreads(); + wxPySizerItemInfo info = wxPySizerItemTypeHelper(item, true, false); + if ( info.sizer ) + PyObject_SetAttrString(item,"thisown",Py_False); + wxPyEndBlockThreads(blocked); + + // Now call the real Add method if a valid item type was found + if ( info.window ) + return self->Add(info.window, flags); + else if ( info.sizer ) + return self->Add(info.sizer, flags); + else if (info.gotSize) + return self->Add(info.size.GetWidth(), info.size.GetHeight(), + flags.GetProportion(), + flags.GetFlags(), + flags.GetBorderInPixels()); + else + return NULL; + } SWIGINTERN wxSizerItem *wxSizer_Insert(wxSizer *self,int before,PyObject *item,int proportion=0,int flag=0,int border=0,PyObject *userData=NULL){ wxPyUserData* data = NULL; @@ -4187,6 +4218,27 @@ SWIGINTERN wxSizerItem *wxSizer_Insert(wxSizer *self,int before,PyObject *item,i else return NULL; } +SWIGINTERN wxSizerItem *wxSizer_InsertF(wxSizer *self,int before,PyObject *item,wxSizerFlags &flags){ + + wxPyBlock_t blocked = wxPyBeginBlockThreads(); + wxPySizerItemInfo info = wxPySizerItemTypeHelper(item, true, false); + if ( info.sizer ) + PyObject_SetAttrString(item,"thisown",Py_False); + wxPyEndBlockThreads(blocked); + + // Now call the real Insert method if a valid item type was found + if ( info.window ) + return self->Insert(before, info.window, flags); + else if ( info.sizer ) + return self->Insert(before, info.sizer, flags); + else if (info.gotSize) + return self->Insert(before, info.size.GetWidth(), info.size.GetHeight(), + flags.GetProportion(), + flags.GetFlags(), + flags.GetBorderInPixels()); + else + return NULL; + } SWIGINTERN wxSizerItem *wxSizer_Prepend(wxSizer *self,PyObject *item,int proportion=0,int flag=0,int border=0,PyObject *userData=NULL){ wxPyUserData* data = NULL; @@ -4209,12 +4261,33 @@ SWIGINTERN wxSizerItem *wxSizer_Prepend(wxSizer *self,PyObject *item,int proport else return NULL; } +SWIGINTERN wxSizerItem *wxSizer_PrependF(wxSizer *self,PyObject *item,wxSizerFlags &flags){ + + wxPyBlock_t blocked = wxPyBeginBlockThreads(); + wxPySizerItemInfo info = wxPySizerItemTypeHelper(item, true, false); + if ( info.sizer ) + PyObject_SetAttrString(item,"thisown",Py_False); + wxPyEndBlockThreads(blocked); + + // Now call the real Add method if a valid item type was found + if ( info.window ) + return self->Prepend(info.window, flags); + else if ( info.sizer ) + return self->Prepend(info.sizer, flags); + else if (info.gotSize) + return self->Prepend(info.size.GetWidth(), info.size.GetHeight(), + flags.GetProportion(), + flags.GetFlags(), + flags.GetBorderInPixels()); + else + return NULL; + } SWIGINTERN bool wxSizer_Remove(wxSizer *self,PyObject *item){ wxPyBlock_t blocked = wxPyBeginBlockThreads(); wxPySizerItemInfo info = wxPySizerItemTypeHelper(item, false, true); wxPyEndBlockThreads(blocked); if ( info.window ) - return self->Remove(info.window); + return false; //self->Remove(info.window); else if ( info.sizer ) return self->Remove(info.sizer); else if ( info.gotPos ) @@ -4235,14 +4308,14 @@ SWIGINTERN bool wxSizer_Detach(wxSizer *self,PyObject *item){ else return false; } -SWIGINTERN wxSizerItem *wxSizer_GetItem(wxSizer *self,PyObject *item){ +SWIGINTERN wxSizerItem *wxSizer_GetItem(wxSizer *self,PyObject *item,bool recursive=false){ wxPyBlock_t blocked = wxPyBeginBlockThreads(); wxPySizerItemInfo info = wxPySizerItemTypeHelper(item, false, true); wxPyEndBlockThreads(blocked); if ( info.window ) - return self->GetItem(info.window); + return self->GetItem(info.window, recursive); else if ( info.sizer ) - return self->GetItem(info.sizer); + return self->GetItem(info.sizer, recursive); else if ( info.gotPos ) return self->GetItem(info.pos); else @@ -32554,43 +32627,6 @@ SWIGINTERN PyObject *NullAcceleratorTable_get(void) { } -SWIGINTERN PyObject *_wrap_GetAccelFromString(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - wxString *arg1 = 0 ; - wxAcceleratorEntry *result = 0 ; - bool temp1 = false ; - PyObject * obj0 = 0 ; - char * kwnames[] = { - (char *) "label", NULL - }; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:GetAccelFromString",kwnames,&obj0)) SWIG_fail; - { - arg1 = wxString_in_helper(obj0); - if (arg1 == NULL) SWIG_fail; - temp1 = true; - } - { - PyThreadState* __tstate = wxPyBeginAllowThreads(); - result = (wxAcceleratorEntry *)wxGetAccelFromString((wxString const &)*arg1); - wxPyEndAllowThreads(__tstate); - if (PyErr_Occurred()) SWIG_fail; - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_wxAcceleratorEntry, 0 | 0 ); - { - if (temp1) - delete arg1; - } - return resultobj; -fail: - { - if (temp1) - delete arg1; - } - return NULL; -} - - SWIGINTERN int PanelNameStr_set(PyObject *) { SWIG_Error(SWIG_AttributeError,"Variable PanelNameStr is read-only."); return 1; @@ -35821,6 +35857,36 @@ fail: } +SWIGINTERN PyObject *_wrap_Window_IsThisEnabled(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + wxWindow *arg1 = (wxWindow *) 0 ; + bool result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_wxWindow, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Window_IsThisEnabled" "', expected argument " "1"" of type '" "wxWindow const *""'"); + } + arg1 = reinterpret_cast< wxWindow * >(argp1); + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + result = (bool)((wxWindow const *)arg1)->IsThisEnabled(); + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + { + resultobj = result ? Py_True : Py_False; Py_INCREF(resultobj); + } + return resultobj; +fail: + return NULL; +} + + SWIGINTERN PyObject *_wrap_Window_IsShownOnScreen(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; wxWindow *arg1 = (wxWindow *) 0 ; @@ -36308,6 +36374,36 @@ fail: } +SWIGINTERN PyObject *_wrap_Window_CanAcceptFocus(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + wxWindow *arg1 = (wxWindow *) 0 ; + bool result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_wxWindow, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Window_CanAcceptFocus" "', expected argument " "1"" of type '" "wxWindow const *""'"); + } + arg1 = reinterpret_cast< wxWindow * >(argp1); + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + result = (bool)((wxWindow const *)arg1)->CanAcceptFocus(); + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + { + resultobj = result ? Py_True : Py_False; Py_INCREF(resultobj); + } + return resultobj; +fail: + return NULL; +} + + SWIGINTERN PyObject *_wrap_Window_AcceptsFocusFromKeyboard(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; wxWindow *arg1 = (wxWindow *) 0 ; @@ -36338,6 +36434,36 @@ fail: } +SWIGINTERN PyObject *_wrap_Window_CanAcceptFocusFromKeyboard(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + wxWindow *arg1 = (wxWindow *) 0 ; + bool result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_wxWindow, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Window_CanAcceptFocusFromKeyboard" "', expected argument " "1"" of type '" "wxWindow const *""'"); + } + arg1 = reinterpret_cast< wxWindow * >(argp1); + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + result = (bool)((wxWindow const *)arg1)->CanAcceptFocusFromKeyboard(); + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + { + resultobj = result ? Py_True : Py_False; Py_INCREF(resultobj); + } + return resultobj; +fail: + return NULL; +} + + SWIGINTERN PyObject *_wrap_Window_Navigate(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { PyObject *resultobj = 0; wxWindow *arg1 = (wxWindow *) 0 ; @@ -36545,6 +36671,36 @@ fail: } +SWIGINTERN PyObject *_wrap_Window_GetTopLevelParent(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + wxWindow *arg1 = (wxWindow *) 0 ; + wxWindow *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_wxWindow, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Window_GetTopLevelParent" "', expected argument " "1"" of type '" "wxWindow *""'"); + } + arg1 = reinterpret_cast< wxWindow * >(argp1); + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + result = (wxWindow *)wxWindow_GetTopLevelParent(arg1); + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + { + resultobj = wxPyMake_wxObject(result, 0); + } + return resultobj; +fail: + return NULL; +} + + SWIGINTERN PyObject *_wrap_Window_IsTopLevel(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; wxWindow *arg1 = (wxWindow *) 0 ; @@ -48538,6 +48694,779 @@ SWIGINTERN PyObject *ControlWithItems_swigregister(PyObject *SWIGUNUSEDPARM(self return SWIG_Py_Void(); } +SWIGINTERN PyObject *_wrap_new_SizerFlags(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + int arg1 = (int) 0 ; + wxSizerFlags *result = 0 ; + int val1 ; + int ecode1 = 0 ; + PyObject * obj0 = 0 ; + char * kwnames[] = { + (char *) "proportion", NULL + }; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"|O:new_SizerFlags",kwnames,&obj0)) SWIG_fail; + if (obj0) { + ecode1 = SWIG_AsVal_int(obj0, &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_SizerFlags" "', expected argument " "1"" of type '" "int""'"); + } + arg1 = static_cast< int >(val1); + } + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + result = (wxSizerFlags *)new wxSizerFlags(arg1); + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_wxSizerFlags, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_SizerFlags(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + wxSizerFlags *arg1 = (wxSizerFlags *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_wxSizerFlags, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_SizerFlags" "', expected argument " "1"" of type '" "wxSizerFlags *""'"); + } + arg1 = reinterpret_cast< wxSizerFlags * >(argp1); + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + delete arg1; + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SizerFlags_Proportion(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + wxSizerFlags *arg1 = (wxSizerFlags *) 0 ; + int arg2 ; + wxSizerFlags *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "proportion", NULL + }; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:SizerFlags_Proportion",kwnames,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_wxSizerFlags, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SizerFlags_Proportion" "', expected argument " "1"" of type '" "wxSizerFlags *""'"); + } + arg1 = reinterpret_cast< wxSizerFlags * >(argp1); + ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SizerFlags_Proportion" "', expected argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + { + wxSizerFlags &_result_ref = (arg1)->Proportion(arg2); + result = (wxSizerFlags *) &_result_ref; + } + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + { + resultobj = obj0; Py_INCREF(resultobj); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SizerFlags_Align(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + wxSizerFlags *arg1 = (wxSizerFlags *) 0 ; + int arg2 ; + wxSizerFlags *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "alignment", NULL + }; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:SizerFlags_Align",kwnames,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_wxSizerFlags, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SizerFlags_Align" "', expected argument " "1"" of type '" "wxSizerFlags *""'"); + } + arg1 = reinterpret_cast< wxSizerFlags * >(argp1); + ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SizerFlags_Align" "', expected argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + { + wxSizerFlags &_result_ref = (arg1)->Align(arg2); + result = (wxSizerFlags *) &_result_ref; + } + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + { + resultobj = obj0; Py_INCREF(resultobj); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SizerFlags_Expand(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + wxSizerFlags *arg1 = (wxSizerFlags *) 0 ; + wxSizerFlags *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_wxSizerFlags, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SizerFlags_Expand" "', expected argument " "1"" of type '" "wxSizerFlags *""'"); + } + arg1 = reinterpret_cast< wxSizerFlags * >(argp1); + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + { + wxSizerFlags &_result_ref = (arg1)->Expand(); + result = (wxSizerFlags *) &_result_ref; + } + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + { + resultobj = swig_obj[0]; Py_INCREF(resultobj); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SizerFlags_Centre(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + wxSizerFlags *arg1 = (wxSizerFlags *) 0 ; + wxSizerFlags *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_wxSizerFlags, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SizerFlags_Centre" "', expected argument " "1"" of type '" "wxSizerFlags *""'"); + } + arg1 = reinterpret_cast< wxSizerFlags * >(argp1); + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + { + wxSizerFlags &_result_ref = (arg1)->Centre(); + result = (wxSizerFlags *) &_result_ref; + } + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + { + resultobj = swig_obj[0]; Py_INCREF(resultobj); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SizerFlags_Center(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + wxSizerFlags *arg1 = (wxSizerFlags *) 0 ; + wxSizerFlags *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_wxSizerFlags, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SizerFlags_Center" "', expected argument " "1"" of type '" "wxSizerFlags *""'"); + } + arg1 = reinterpret_cast< wxSizerFlags * >(argp1); + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + { + wxSizerFlags &_result_ref = (arg1)->Center(); + result = (wxSizerFlags *) &_result_ref; + } + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + { + resultobj = swig_obj[0]; Py_INCREF(resultobj); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SizerFlags_Left(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + wxSizerFlags *arg1 = (wxSizerFlags *) 0 ; + wxSizerFlags *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_wxSizerFlags, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SizerFlags_Left" "', expected argument " "1"" of type '" "wxSizerFlags *""'"); + } + arg1 = reinterpret_cast< wxSizerFlags * >(argp1); + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + { + wxSizerFlags &_result_ref = (arg1)->Left(); + result = (wxSizerFlags *) &_result_ref; + } + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + { + resultobj = swig_obj[0]; Py_INCREF(resultobj); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SizerFlags_Right(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + wxSizerFlags *arg1 = (wxSizerFlags *) 0 ; + wxSizerFlags *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_wxSizerFlags, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SizerFlags_Right" "', expected argument " "1"" of type '" "wxSizerFlags *""'"); + } + arg1 = reinterpret_cast< wxSizerFlags * >(argp1); + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + { + wxSizerFlags &_result_ref = (arg1)->Right(); + result = (wxSizerFlags *) &_result_ref; + } + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + { + resultobj = swig_obj[0]; Py_INCREF(resultobj); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SizerFlags_Top(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + wxSizerFlags *arg1 = (wxSizerFlags *) 0 ; + wxSizerFlags *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_wxSizerFlags, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SizerFlags_Top" "', expected argument " "1"" of type '" "wxSizerFlags *""'"); + } + arg1 = reinterpret_cast< wxSizerFlags * >(argp1); + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + { + wxSizerFlags &_result_ref = (arg1)->Top(); + result = (wxSizerFlags *) &_result_ref; + } + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + { + resultobj = swig_obj[0]; Py_INCREF(resultobj); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SizerFlags_Bottom(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + wxSizerFlags *arg1 = (wxSizerFlags *) 0 ; + wxSizerFlags *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_wxSizerFlags, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SizerFlags_Bottom" "', expected argument " "1"" of type '" "wxSizerFlags *""'"); + } + arg1 = reinterpret_cast< wxSizerFlags * >(argp1); + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + { + wxSizerFlags &_result_ref = (arg1)->Bottom(); + result = (wxSizerFlags *) &_result_ref; + } + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + { + resultobj = swig_obj[0]; Py_INCREF(resultobj); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SizerFlags_Shaped(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + wxSizerFlags *arg1 = (wxSizerFlags *) 0 ; + wxSizerFlags *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_wxSizerFlags, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SizerFlags_Shaped" "', expected argument " "1"" of type '" "wxSizerFlags *""'"); + } + arg1 = reinterpret_cast< wxSizerFlags * >(argp1); + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + { + wxSizerFlags &_result_ref = (arg1)->Shaped(); + result = (wxSizerFlags *) &_result_ref; + } + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + { + resultobj = swig_obj[0]; Py_INCREF(resultobj); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SizerFlags_FixedMinSize(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + wxSizerFlags *arg1 = (wxSizerFlags *) 0 ; + wxSizerFlags *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_wxSizerFlags, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SizerFlags_FixedMinSize" "', expected argument " "1"" of type '" "wxSizerFlags *""'"); + } + arg1 = reinterpret_cast< wxSizerFlags * >(argp1); + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + { + wxSizerFlags &_result_ref = (arg1)->FixedMinSize(); + result = (wxSizerFlags *) &_result_ref; + } + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + { + resultobj = swig_obj[0]; Py_INCREF(resultobj); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SizerFlags_Border(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + wxSizerFlags *arg1 = (wxSizerFlags *) 0 ; + int arg2 = (int) wxALL ; + int arg3 = (int) -1 ; + wxSizerFlags *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + int val3 ; + int ecode3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "direction",(char *) "borderInPixels", NULL + }; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|OO:SizerFlags_Border",kwnames,&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_wxSizerFlags, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SizerFlags_Border" "', expected argument " "1"" of type '" "wxSizerFlags *""'"); + } + arg1 = reinterpret_cast< wxSizerFlags * >(argp1); + if (obj1) { + ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SizerFlags_Border" "', expected argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + } + if (obj2) { + ecode3 = SWIG_AsVal_int(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SizerFlags_Border" "', expected argument " "3"" of type '" "int""'"); + } + arg3 = static_cast< int >(val3); + } + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + { + wxSizerFlags &_result_ref = wxSizerFlags_Border(arg1,arg2,arg3); + result = (wxSizerFlags *) &_result_ref; + } + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + { + resultobj = obj0; Py_INCREF(resultobj); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SizerFlags_DoubleBorder(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + wxSizerFlags *arg1 = (wxSizerFlags *) 0 ; + int arg2 = (int) wxALL ; + wxSizerFlags *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "direction", NULL + }; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:SizerFlags_DoubleBorder",kwnames,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_wxSizerFlags, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SizerFlags_DoubleBorder" "', expected argument " "1"" of type '" "wxSizerFlags *""'"); + } + arg1 = reinterpret_cast< wxSizerFlags * >(argp1); + if (obj1) { + ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SizerFlags_DoubleBorder" "', expected argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + } + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + { + wxSizerFlags &_result_ref = (arg1)->DoubleBorder(arg2); + result = (wxSizerFlags *) &_result_ref; + } + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + { + resultobj = obj0; Py_INCREF(resultobj); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SizerFlags_TripleBorder(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + wxSizerFlags *arg1 = (wxSizerFlags *) 0 ; + int arg2 = (int) wxALL ; + wxSizerFlags *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "direction", NULL + }; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:SizerFlags_TripleBorder",kwnames,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_wxSizerFlags, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SizerFlags_TripleBorder" "', expected argument " "1"" of type '" "wxSizerFlags *""'"); + } + arg1 = reinterpret_cast< wxSizerFlags * >(argp1); + if (obj1) { + ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SizerFlags_TripleBorder" "', expected argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + } + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + { + wxSizerFlags &_result_ref = (arg1)->TripleBorder(arg2); + result = (wxSizerFlags *) &_result_ref; + } + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + { + resultobj = obj0; Py_INCREF(resultobj); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SizerFlags_HorzBorder(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + wxSizerFlags *arg1 = (wxSizerFlags *) 0 ; + wxSizerFlags *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_wxSizerFlags, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SizerFlags_HorzBorder" "', expected argument " "1"" of type '" "wxSizerFlags *""'"); + } + arg1 = reinterpret_cast< wxSizerFlags * >(argp1); + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + { + wxSizerFlags &_result_ref = (arg1)->HorzBorder(); + result = (wxSizerFlags *) &_result_ref; + } + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + { + resultobj = swig_obj[0]; Py_INCREF(resultobj); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SizerFlags_DoubleHorzBorder(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + wxSizerFlags *arg1 = (wxSizerFlags *) 0 ; + wxSizerFlags *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_wxSizerFlags, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SizerFlags_DoubleHorzBorder" "', expected argument " "1"" of type '" "wxSizerFlags *""'"); + } + arg1 = reinterpret_cast< wxSizerFlags * >(argp1); + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + { + wxSizerFlags &_result_ref = (arg1)->DoubleHorzBorder(); + result = (wxSizerFlags *) &_result_ref; + } + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + { + resultobj = swig_obj[0]; Py_INCREF(resultobj); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SizerFlags_GetDefaultBorder(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + int result; + + if (!SWIG_Python_UnpackTuple(args,"SizerFlags_GetDefaultBorder",0,0,0)) SWIG_fail; + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + result = (int)wxSizerFlags::GetDefaultBorder(); + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SizerFlags_GetProportion(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + wxSizerFlags *arg1 = (wxSizerFlags *) 0 ; + int result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_wxSizerFlags, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SizerFlags_GetProportion" "', expected argument " "1"" of type '" "wxSizerFlags const *""'"); + } + arg1 = reinterpret_cast< wxSizerFlags * >(argp1); + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + result = (int)((wxSizerFlags const *)arg1)->GetProportion(); + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SizerFlags_GetFlags(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + wxSizerFlags *arg1 = (wxSizerFlags *) 0 ; + int result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_wxSizerFlags, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SizerFlags_GetFlags" "', expected argument " "1"" of type '" "wxSizerFlags const *""'"); + } + arg1 = reinterpret_cast< wxSizerFlags * >(argp1); + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + result = (int)((wxSizerFlags const *)arg1)->GetFlags(); + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SizerFlags_GetBorderInPixels(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + wxSizerFlags *arg1 = (wxSizerFlags *) 0 ; + int result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_wxSizerFlags, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SizerFlags_GetBorderInPixels" "', expected argument " "1"" of type '" "wxSizerFlags const *""'"); + } + arg1 = reinterpret_cast< wxSizerFlags * >(argp1); + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + result = (int)((wxSizerFlags const *)arg1)->GetBorderInPixels(); + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *SizerFlags_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_wxSizerFlags, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *SizerFlags_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} + SWIGINTERN PyObject *_wrap_new_SizerItem(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; wxSizerItem *result = 0 ; @@ -49994,6 +50923,51 @@ fail: } +SWIGINTERN PyObject *_wrap_Sizer_AddF(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + wxSizer *arg1 = (wxSizer *) 0 ; + PyObject *arg2 = (PyObject *) 0 ; + wxSizerFlags *arg3 = 0 ; + wxSizerItem *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp3 = 0 ; + int res3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "item",(char *) "flags", NULL + }; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:Sizer_AddF",kwnames,&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_wxSizer, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Sizer_AddF" "', expected argument " "1"" of type '" "wxSizer *""'"); + } + arg1 = reinterpret_cast< wxSizer * >(argp1); + arg2 = obj1; + res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_wxSizerFlags, 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Sizer_AddF" "', expected argument " "3"" of type '" "wxSizerFlags &""'"); + } + if (!argp3) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Sizer_AddF" "', expected argument " "3"" of type '" "wxSizerFlags &""'"); + } + arg3 = reinterpret_cast< wxSizerFlags * >(argp3); + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + result = (wxSizerItem *)wxSizer_AddF(arg1,arg2,*arg3); + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_wxSizerItem, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + SWIGINTERN PyObject *_wrap_Sizer_Insert(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { PyObject *resultobj = 0; wxSizer *arg1 = (wxSizer *) 0 ; @@ -50074,6 +51048,60 @@ fail: } +SWIGINTERN PyObject *_wrap_Sizer_InsertF(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + wxSizer *arg1 = (wxSizer *) 0 ; + int arg2 ; + PyObject *arg3 = (PyObject *) 0 ; + wxSizerFlags *arg4 = 0 ; + wxSizerItem *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + void *argp4 = 0 ; + int res4 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "before",(char *) "item",(char *) "flags", NULL + }; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOO:Sizer_InsertF",kwnames,&obj0,&obj1,&obj2,&obj3)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_wxSizer, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Sizer_InsertF" "', expected argument " "1"" of type '" "wxSizer *""'"); + } + arg1 = reinterpret_cast< wxSizer * >(argp1); + ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Sizer_InsertF" "', expected argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + arg3 = obj2; + res4 = SWIG_ConvertPtr(obj3, &argp4, SWIGTYPE_p_wxSizerFlags, 0 ); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "Sizer_InsertF" "', expected argument " "4"" of type '" "wxSizerFlags &""'"); + } + if (!argp4) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Sizer_InsertF" "', expected argument " "4"" of type '" "wxSizerFlags &""'"); + } + arg4 = reinterpret_cast< wxSizerFlags * >(argp4); + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + result = (wxSizerItem *)wxSizer_InsertF(arg1,arg2,arg3,*arg4); + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_wxSizerItem, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + SWIGINTERN PyObject *_wrap_Sizer_Prepend(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { PyObject *resultobj = 0; wxSizer *arg1 = (wxSizer *) 0 ; @@ -50145,6 +51173,51 @@ fail: } +SWIGINTERN PyObject *_wrap_Sizer_PrependF(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + wxSizer *arg1 = (wxSizer *) 0 ; + PyObject *arg2 = (PyObject *) 0 ; + wxSizerFlags *arg3 = 0 ; + wxSizerItem *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp3 = 0 ; + int res3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "item",(char *) "flags", NULL + }; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:Sizer_PrependF",kwnames,&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_wxSizer, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Sizer_PrependF" "', expected argument " "1"" of type '" "wxSizer *""'"); + } + arg1 = reinterpret_cast< wxSizer * >(argp1); + arg2 = obj1; + res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_wxSizerFlags, 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Sizer_PrependF" "', expected argument " "3"" of type '" "wxSizerFlags &""'"); + } + if (!argp3) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Sizer_PrependF" "', expected argument " "3"" of type '" "wxSizerFlags &""'"); + } + arg3 = reinterpret_cast< wxSizerFlags * >(argp3); + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + result = (wxSizerItem *)wxSizer_PrependF(arg1,arg2,*arg3); + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_wxSizerItem, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + SWIGINTERN PyObject *_wrap_Sizer_Remove(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { PyObject *resultobj = 0; wxSizer *arg1 = (wxSizer *) 0 ; @@ -50219,25 +51292,36 @@ SWIGINTERN PyObject *_wrap_Sizer_GetItem(PyObject *SWIGUNUSEDPARM(self), PyObjec PyObject *resultobj = 0; wxSizer *arg1 = (wxSizer *) 0 ; PyObject *arg2 = (PyObject *) 0 ; + bool arg3 = (bool) false ; wxSizerItem *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; + bool val3 ; + int ecode3 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; char * kwnames[] = { - (char *) "self",(char *) "item", NULL + (char *) "self",(char *) "item",(char *) "recursive", NULL }; - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:Sizer_GetItem",kwnames,&obj0,&obj1)) SWIG_fail; + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|O:Sizer_GetItem",kwnames,&obj0,&obj1,&obj2)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_wxSizer, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Sizer_GetItem" "', expected argument " "1"" of type '" "wxSizer *""'"); } arg1 = reinterpret_cast< wxSizer * >(argp1); arg2 = obj1; + if (obj2) { + ecode3 = SWIG_AsVal_bool(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Sizer_GetItem" "', expected argument " "3"" of type '" "bool""'"); + } + arg3 = static_cast< bool >(val3); + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - result = (wxSizerItem *)wxSizer_GetItem(arg1,arg2); + result = (wxSizerItem *)wxSizer_GetItem(arg1,arg2,arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) SWIG_fail; } @@ -57488,7 +58572,6 @@ static PyMethodDef SwigMethods[] = { { (char *)"AcceleratorTable_IsOk", (PyCFunction)_wrap_AcceleratorTable_IsOk, METH_O, NULL}, { (char *)"AcceleratorTable_swigregister", AcceleratorTable_swigregister, METH_VARARGS, NULL}, { (char *)"AcceleratorTable_swiginit", AcceleratorTable_swiginit, METH_VARARGS, NULL}, - { (char *)"GetAccelFromString", (PyCFunction) _wrap_GetAccelFromString, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"new_VisualAttributes", (PyCFunction)_wrap_new_VisualAttributes, METH_NOARGS, NULL}, { (char *)"delete_VisualAttributes", (PyCFunction)_wrap_delete_VisualAttributes, METH_O, NULL}, { (char *)"VisualAttributes_font_set", _wrap_VisualAttributes_font_set, METH_VARARGS, NULL}, @@ -57577,6 +58660,7 @@ static PyMethodDef SwigMethods[] = { { (char *)"Window_Disable", (PyCFunction)_wrap_Window_Disable, METH_O, NULL}, { (char *)"Window_IsShown", (PyCFunction)_wrap_Window_IsShown, METH_O, NULL}, { (char *)"Window_IsEnabled", (PyCFunction)_wrap_Window_IsEnabled, METH_O, NULL}, + { (char *)"Window_IsThisEnabled", (PyCFunction)_wrap_Window_IsThisEnabled, METH_O, NULL}, { (char *)"Window_IsShownOnScreen", (PyCFunction)_wrap_Window_IsShownOnScreen, METH_O, NULL}, { (char *)"Window_SetWindowStyleFlag", (PyCFunction) _wrap_Window_SetWindowStyleFlag, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"Window_GetWindowStyleFlag", (PyCFunction)_wrap_Window_GetWindowStyleFlag, METH_O, NULL}, @@ -57592,13 +58676,16 @@ static PyMethodDef SwigMethods[] = { { (char *)"Window_SetFocusFromKbd", (PyCFunction)_wrap_Window_SetFocusFromKbd, METH_O, NULL}, { (char *)"Window_FindFocus", (PyCFunction)_wrap_Window_FindFocus, METH_NOARGS, NULL}, { (char *)"Window_AcceptsFocus", (PyCFunction)_wrap_Window_AcceptsFocus, METH_O, NULL}, + { (char *)"Window_CanAcceptFocus", (PyCFunction)_wrap_Window_CanAcceptFocus, METH_O, NULL}, { (char *)"Window_AcceptsFocusFromKeyboard", (PyCFunction)_wrap_Window_AcceptsFocusFromKeyboard, METH_O, NULL}, + { (char *)"Window_CanAcceptFocusFromKeyboard", (PyCFunction)_wrap_Window_CanAcceptFocusFromKeyboard, METH_O, NULL}, { (char *)"Window_Navigate", (PyCFunction) _wrap_Window_Navigate, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"Window_MoveAfterInTabOrder", (PyCFunction) _wrap_Window_MoveAfterInTabOrder, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"Window_MoveBeforeInTabOrder", (PyCFunction) _wrap_Window_MoveBeforeInTabOrder, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"Window_GetChildren", (PyCFunction)_wrap_Window_GetChildren, METH_O, NULL}, { (char *)"Window_GetParent", (PyCFunction)_wrap_Window_GetParent, METH_O, NULL}, { (char *)"Window_GetGrandParent", (PyCFunction)_wrap_Window_GetGrandParent, METH_O, NULL}, + { (char *)"Window_GetTopLevelParent", (PyCFunction)_wrap_Window_GetTopLevelParent, METH_O, NULL}, { (char *)"Window_IsTopLevel", (PyCFunction)_wrap_Window_IsTopLevel, METH_O, NULL}, { (char *)"Window_Reparent", (PyCFunction) _wrap_Window_Reparent, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"Window_AddChild", (PyCFunction) _wrap_Window_AddChild, METH_VARARGS | METH_KEYWORDS, NULL}, @@ -57906,6 +58993,30 @@ static PyMethodDef SwigMethods[] = { { (char *)"ItemContainer_Select", (PyCFunction) _wrap_ItemContainer_Select, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"ItemContainer_swigregister", ItemContainer_swigregister, METH_VARARGS, NULL}, { (char *)"ControlWithItems_swigregister", ControlWithItems_swigregister, METH_VARARGS, NULL}, + { (char *)"new_SizerFlags", (PyCFunction) _wrap_new_SizerFlags, METH_VARARGS | METH_KEYWORDS, NULL}, + { (char *)"delete_SizerFlags", (PyCFunction)_wrap_delete_SizerFlags, METH_O, NULL}, + { (char *)"SizerFlags_Proportion", (PyCFunction) _wrap_SizerFlags_Proportion, METH_VARARGS | METH_KEYWORDS, NULL}, + { (char *)"SizerFlags_Align", (PyCFunction) _wrap_SizerFlags_Align, METH_VARARGS | METH_KEYWORDS, NULL}, + { (char *)"SizerFlags_Expand", (PyCFunction)_wrap_SizerFlags_Expand, METH_O, NULL}, + { (char *)"SizerFlags_Centre", (PyCFunction)_wrap_SizerFlags_Centre, METH_O, NULL}, + { (char *)"SizerFlags_Center", (PyCFunction)_wrap_SizerFlags_Center, METH_O, NULL}, + { (char *)"SizerFlags_Left", (PyCFunction)_wrap_SizerFlags_Left, METH_O, NULL}, + { (char *)"SizerFlags_Right", (PyCFunction)_wrap_SizerFlags_Right, METH_O, NULL}, + { (char *)"SizerFlags_Top", (PyCFunction)_wrap_SizerFlags_Top, METH_O, NULL}, + { (char *)"SizerFlags_Bottom", (PyCFunction)_wrap_SizerFlags_Bottom, METH_O, NULL}, + { (char *)"SizerFlags_Shaped", (PyCFunction)_wrap_SizerFlags_Shaped, METH_O, NULL}, + { (char *)"SizerFlags_FixedMinSize", (PyCFunction)_wrap_SizerFlags_FixedMinSize, METH_O, NULL}, + { (char *)"SizerFlags_Border", (PyCFunction) _wrap_SizerFlags_Border, METH_VARARGS | METH_KEYWORDS, NULL}, + { (char *)"SizerFlags_DoubleBorder", (PyCFunction) _wrap_SizerFlags_DoubleBorder, METH_VARARGS | METH_KEYWORDS, NULL}, + { (char *)"SizerFlags_TripleBorder", (PyCFunction) _wrap_SizerFlags_TripleBorder, METH_VARARGS | METH_KEYWORDS, NULL}, + { (char *)"SizerFlags_HorzBorder", (PyCFunction)_wrap_SizerFlags_HorzBorder, METH_O, NULL}, + { (char *)"SizerFlags_DoubleHorzBorder", (PyCFunction)_wrap_SizerFlags_DoubleHorzBorder, METH_O, NULL}, + { (char *)"SizerFlags_GetDefaultBorder", (PyCFunction)_wrap_SizerFlags_GetDefaultBorder, METH_NOARGS, NULL}, + { (char *)"SizerFlags_GetProportion", (PyCFunction)_wrap_SizerFlags_GetProportion, METH_O, NULL}, + { (char *)"SizerFlags_GetFlags", (PyCFunction)_wrap_SizerFlags_GetFlags, METH_O, NULL}, + { (char *)"SizerFlags_GetBorderInPixels", (PyCFunction)_wrap_SizerFlags_GetBorderInPixels, METH_O, NULL}, + { (char *)"SizerFlags_swigregister", SizerFlags_swigregister, METH_VARARGS, NULL}, + { (char *)"SizerFlags_swiginit", SizerFlags_swiginit, METH_VARARGS, NULL}, { (char *)"new_SizerItem", (PyCFunction)_wrap_new_SizerItem, METH_NOARGS, NULL}, { (char *)"delete_SizerItem", (PyCFunction)_wrap_delete_SizerItem, METH_O, NULL}, { (char *)"new_SizerItemWindow", (PyCFunction) _wrap_new_SizerItemWindow, METH_VARARGS | METH_KEYWORDS, NULL}, @@ -57949,8 +59060,11 @@ static PyMethodDef SwigMethods[] = { { (char *)"delete_Sizer", (PyCFunction)_wrap_delete_Sizer, METH_O, NULL}, { (char *)"Sizer__setOORInfo", (PyCFunction) _wrap_Sizer__setOORInfo, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"Sizer_Add", (PyCFunction) _wrap_Sizer_Add, METH_VARARGS | METH_KEYWORDS, NULL}, + { (char *)"Sizer_AddF", (PyCFunction) _wrap_Sizer_AddF, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"Sizer_Insert", (PyCFunction) _wrap_Sizer_Insert, METH_VARARGS | METH_KEYWORDS, NULL}, + { (char *)"Sizer_InsertF", (PyCFunction) _wrap_Sizer_InsertF, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"Sizer_Prepend", (PyCFunction) _wrap_Sizer_Prepend, METH_VARARGS | METH_KEYWORDS, NULL}, + { (char *)"Sizer_PrependF", (PyCFunction) _wrap_Sizer_PrependF, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"Sizer_Remove", (PyCFunction) _wrap_Sizer_Remove, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"Sizer_Detach", (PyCFunction) _wrap_Sizer_Detach, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"Sizer_GetItem", (PyCFunction) _wrap_Sizer_GetItem, METH_VARARGS | METH_KEYWORDS, NULL}, @@ -58136,36 +59250,6 @@ static PyMethodDef SwigMethods[] = { /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */ -static void *_p_wxGBSizerItemTo_p_wxSizerItem(void *x) { - return (void *)((wxSizerItem *) ((wxGBSizerItem *) x)); -} -static void *_p_wxBoxSizerTo_p_wxSizer(void *x) { - return (void *)((wxSizer *) ((wxBoxSizer *) x)); -} -static void *_p_wxStaticBoxSizerTo_p_wxSizer(void *x) { - return (void *)((wxSizer *) (wxBoxSizer *) ((wxStaticBoxSizer *) x)); -} -static void *_p_wxStdDialogButtonSizerTo_p_wxSizer(void *x) { - return (void *)((wxSizer *) (wxBoxSizer *) ((wxStdDialogButtonSizer *) x)); -} -static void *_p_wxGridBagSizerTo_p_wxSizer(void *x) { - return (void *)((wxSizer *) (wxGridSizer *)(wxFlexGridSizer *) ((wxGridBagSizer *) x)); -} -static void *_p_wxGridSizerTo_p_wxSizer(void *x) { - return (void *)((wxSizer *) ((wxGridSizer *) x)); -} -static void *_p_wxFlexGridSizerTo_p_wxSizer(void *x) { - return (void *)((wxSizer *) (wxGridSizer *) ((wxFlexGridSizer *) x)); -} -static void *_p_wxPySizerTo_p_wxSizer(void *x) { - return (void *)((wxSizer *) ((wxPySizer *) x)); -} -static void *_p_wxStaticBoxSizerTo_p_wxBoxSizer(void *x) { - return (void *)((wxBoxSizer *) ((wxStaticBoxSizer *) x)); -} -static void *_p_wxStdDialogButtonSizerTo_p_wxBoxSizer(void *x) { - return (void *)((wxBoxSizer *) ((wxStdDialogButtonSizer *) x)); -} static void *_p_wxContextMenuEventTo_p_wxEvent(void *x) { return (void *)((wxEvent *) (wxCommandEvent *) ((wxContextMenuEvent *) x)); } @@ -58280,116 +59364,8 @@ static void *_p_wxKeyEventTo_p_wxEvent(void *x) { static void *_p_wxScrollWinEventTo_p_wxEvent(void *x) { return (void *)((wxEvent *) ((wxScrollWinEvent *) x)); } -static void *_p_wxGridBagSizerTo_p_wxGridSizer(void *x) { - return (void *)((wxGridSizer *) (wxFlexGridSizer *) ((wxGridBagSizer *) x)); -} -static void *_p_wxFlexGridSizerTo_p_wxGridSizer(void *x) { - return (void *)((wxGridSizer *) ((wxFlexGridSizer *) x)); -} -static void *_p_wxGridBagSizerTo_p_wxFlexGridSizer(void *x) { - return (void *)((wxFlexGridSizer *) ((wxGridBagSizer *) x)); -} -static void *_p_wxControlWithItemsTo_p_wxItemContainer(void *x) { - return (void *)((wxItemContainer *) ((wxControlWithItems *) x)); -} -static void *_p_wxControlWithItemsTo_p_wxControl(void *x) { - return (void *)((wxControl *) ((wxControlWithItems *) x)); -} -static void *_p_wxControlTo_p_wxEvtHandler(void *x) { - return (void *)((wxEvtHandler *) (wxWindow *) ((wxControl *) x)); -} -static void *_p_wxWindowTo_p_wxEvtHandler(void *x) { - return (void *)((wxEvtHandler *) ((wxWindow *) x)); -} -static void *_p_wxControlWithItemsTo_p_wxEvtHandler(void *x) { - return (void *)((wxEvtHandler *) (wxWindow *)(wxControl *) ((wxControlWithItems *) x)); -} -static void *_p_wxPyAppTo_p_wxEvtHandler(void *x) { - return (void *)((wxEvtHandler *) ((wxPyApp *) x)); -} -static void *_p_wxValidatorTo_p_wxEvtHandler(void *x) { - return (void *)((wxEvtHandler *) ((wxValidator *) x)); -} -static void *_p_wxPyValidatorTo_p_wxEvtHandler(void *x) { - return (void *)((wxEvtHandler *) (wxValidator *) ((wxPyValidator *) x)); -} -static void *_p_wxMenuBarTo_p_wxEvtHandler(void *x) { - return (void *)((wxEvtHandler *) (wxWindow *) ((wxMenuBar *) x)); -} -static void *_p_wxEventBlockerTo_p_wxEvtHandler(void *x) { - return (void *)((wxEvtHandler *) ((wxEventBlocker *) x)); -} -static void *_p_wxMenuTo_p_wxEvtHandler(void *x) { - return (void *)((wxEvtHandler *) ((wxMenu *) x)); -} -static void *_p_wxANIHandlerTo_p_wxCURHandler(void *x) { - return (void *)((wxCURHandler *) ((wxANIHandler *) x)); -} -static void *_p_wxCURHandlerTo_p_wxICOHandler(void *x) { - return (void *)((wxICOHandler *) ((wxCURHandler *) x)); -} -static void *_p_wxANIHandlerTo_p_wxICOHandler(void *x) { - return (void *)((wxICOHandler *) (wxCURHandler *) ((wxANIHandler *) x)); -} -static void *_p_wxICOHandlerTo_p_wxBMPHandler(void *x) { - return (void *)((wxBMPHandler *) ((wxICOHandler *) x)); -} -static void *_p_wxCURHandlerTo_p_wxBMPHandler(void *x) { - return (void *)((wxBMPHandler *) (wxICOHandler *) ((wxCURHandler *) x)); -} -static void *_p_wxANIHandlerTo_p_wxBMPHandler(void *x) { - return (void *)((wxBMPHandler *) (wxICOHandler *)(wxCURHandler *) ((wxANIHandler *) x)); -} -static void *_p_wxPyImageHandlerTo_p_wxImageHandler(void *x) { - return (void *)((wxImageHandler *) ((wxPyImageHandler *) x)); -} -static void *_p_wxBMPHandlerTo_p_wxImageHandler(void *x) { - return (void *)((wxImageHandler *) ((wxBMPHandler *) x)); -} -static void *_p_wxICOHandlerTo_p_wxImageHandler(void *x) { - return (void *)((wxImageHandler *) (wxBMPHandler *) ((wxICOHandler *) x)); -} -static void *_p_wxCURHandlerTo_p_wxImageHandler(void *x) { - return (void *)((wxImageHandler *) (wxBMPHandler *)(wxICOHandler *) ((wxCURHandler *) x)); -} -static void *_p_wxANIHandlerTo_p_wxImageHandler(void *x) { - return (void *)((wxImageHandler *) (wxBMPHandler *)(wxICOHandler *)(wxCURHandler *) ((wxANIHandler *) x)); -} -static void *_p_wxPNGHandlerTo_p_wxImageHandler(void *x) { - return (void *)((wxImageHandler *) ((wxPNGHandler *) x)); -} -static void *_p_wxGIFHandlerTo_p_wxImageHandler(void *x) { - return (void *)((wxImageHandler *) ((wxGIFHandler *) x)); -} -static void *_p_wxPCXHandlerTo_p_wxImageHandler(void *x) { - return (void *)((wxImageHandler *) ((wxPCXHandler *) x)); -} -static void *_p_wxJPEGHandlerTo_p_wxImageHandler(void *x) { - return (void *)((wxImageHandler *) ((wxJPEGHandler *) x)); -} -static void *_p_wxPNMHandlerTo_p_wxImageHandler(void *x) { - return (void *)((wxImageHandler *) ((wxPNMHandler *) x)); -} -static void *_p_wxXPMHandlerTo_p_wxImageHandler(void *x) { - return (void *)((wxImageHandler *) ((wxXPMHandler *) x)); -} -static void *_p_wxTIFFHandlerTo_p_wxImageHandler(void *x) { - return (void *)((wxImageHandler *) ((wxTIFFHandler *) x)); -} -static void *_p_wxTGAHandlerTo_p_wxImageHandler(void *x) { - return (void *)((wxImageHandler *) ((wxTGAHandler *) x)); -} -static void *_p_wxPyFileSystemHandlerTo_p_wxFileSystemHandler(void *x) { - return (void *)((wxFileSystemHandler *) ((wxPyFileSystemHandler *) x)); -} -static void *_p_wxInternetFSHandlerTo_p_wxFileSystemHandler(void *x) { - return (void *)((wxFileSystemHandler *) ((wxInternetFSHandler *) x)); -} -static void *_p_wxZipFSHandlerTo_p_wxFileSystemHandler(void *x) { - return (void *)((wxFileSystemHandler *) ((wxZipFSHandler *) x)); -} -static void *_p_wxMemoryFSHandlerTo_p_wxFileSystemHandler(void *x) { - return (void *)((wxFileSystemHandler *) ((wxMemoryFSHandler *) x)); +static void *_p_wxPyValidatorTo_p_wxValidator(void *x) { + return (void *)((wxValidator *) ((wxPyValidator *) x)); } static void *_p_wxLayoutConstraintsTo_p_wxObject(void *x) { return (void *)((wxObject *) ((wxLayoutConstraints *) x)); @@ -58631,6 +59607,147 @@ static void *_p_wxPyValidatorTo_p_wxObject(void *x) { static void *_p_wxValidatorTo_p_wxObject(void *x) { return (void *)((wxObject *) (wxEvtHandler *) ((wxValidator *) x)); } +static void *_p_wxGridBagSizerTo_p_wxFlexGridSizer(void *x) { + return (void *)((wxFlexGridSizer *) ((wxGridBagSizer *) x)); +} +static void *_p_wxGridBagSizerTo_p_wxGridSizer(void *x) { + return (void *)((wxGridSizer *) (wxFlexGridSizer *) ((wxGridBagSizer *) x)); +} +static void *_p_wxFlexGridSizerTo_p_wxGridSizer(void *x) { + return (void *)((wxGridSizer *) ((wxFlexGridSizer *) x)); +} +static void *_p_wxControlWithItemsTo_p_wxControl(void *x) { + return (void *)((wxControl *) ((wxControlWithItems *) x)); +} +static void *_p_wxControlWithItemsTo_p_wxItemContainer(void *x) { + return (void *)((wxItemContainer *) ((wxControlWithItems *) x)); +} +static void *_p_wxStaticBoxSizerTo_p_wxBoxSizer(void *x) { + return (void *)((wxBoxSizer *) ((wxStaticBoxSizer *) x)); +} +static void *_p_wxStdDialogButtonSizerTo_p_wxBoxSizer(void *x) { + return (void *)((wxBoxSizer *) ((wxStdDialogButtonSizer *) x)); +} +static void *_p_wxBoxSizerTo_p_wxSizer(void *x) { + return (void *)((wxSizer *) ((wxBoxSizer *) x)); +} +static void *_p_wxStaticBoxSizerTo_p_wxSizer(void *x) { + return (void *)((wxSizer *) (wxBoxSizer *) ((wxStaticBoxSizer *) x)); +} +static void *_p_wxStdDialogButtonSizerTo_p_wxSizer(void *x) { + return (void *)((wxSizer *) (wxBoxSizer *) ((wxStdDialogButtonSizer *) x)); +} +static void *_p_wxGridBagSizerTo_p_wxSizer(void *x) { + return (void *)((wxSizer *) (wxGridSizer *)(wxFlexGridSizer *) ((wxGridBagSizer *) x)); +} +static void *_p_wxGridSizerTo_p_wxSizer(void *x) { + return (void *)((wxSizer *) ((wxGridSizer *) x)); +} +static void *_p_wxFlexGridSizerTo_p_wxSizer(void *x) { + return (void *)((wxSizer *) (wxGridSizer *) ((wxFlexGridSizer *) x)); +} +static void *_p_wxPySizerTo_p_wxSizer(void *x) { + return (void *)((wxSizer *) ((wxPySizer *) x)); +} +static void *_p_wxGBSizerItemTo_p_wxSizerItem(void *x) { + return (void *)((wxSizerItem *) ((wxGBSizerItem *) x)); +} +static void *_p_wxPyFileSystemHandlerTo_p_wxFileSystemHandler(void *x) { + return (void *)((wxFileSystemHandler *) ((wxPyFileSystemHandler *) x)); +} +static void *_p_wxInternetFSHandlerTo_p_wxFileSystemHandler(void *x) { + return (void *)((wxFileSystemHandler *) ((wxInternetFSHandler *) x)); +} +static void *_p_wxZipFSHandlerTo_p_wxFileSystemHandler(void *x) { + return (void *)((wxFileSystemHandler *) ((wxZipFSHandler *) x)); +} +static void *_p_wxMemoryFSHandlerTo_p_wxFileSystemHandler(void *x) { + return (void *)((wxFileSystemHandler *) ((wxMemoryFSHandler *) x)); +} +static void *_p_wxPyImageHandlerTo_p_wxImageHandler(void *x) { + return (void *)((wxImageHandler *) ((wxPyImageHandler *) x)); +} +static void *_p_wxBMPHandlerTo_p_wxImageHandler(void *x) { + return (void *)((wxImageHandler *) ((wxBMPHandler *) x)); +} +static void *_p_wxICOHandlerTo_p_wxImageHandler(void *x) { + return (void *)((wxImageHandler *) (wxBMPHandler *) ((wxICOHandler *) x)); +} +static void *_p_wxCURHandlerTo_p_wxImageHandler(void *x) { + return (void *)((wxImageHandler *) (wxBMPHandler *)(wxICOHandler *) ((wxCURHandler *) x)); +} +static void *_p_wxANIHandlerTo_p_wxImageHandler(void *x) { + return (void *)((wxImageHandler *) (wxBMPHandler *)(wxICOHandler *)(wxCURHandler *) ((wxANIHandler *) x)); +} +static void *_p_wxPNGHandlerTo_p_wxImageHandler(void *x) { + return (void *)((wxImageHandler *) ((wxPNGHandler *) x)); +} +static void *_p_wxGIFHandlerTo_p_wxImageHandler(void *x) { + return (void *)((wxImageHandler *) ((wxGIFHandler *) x)); +} +static void *_p_wxPCXHandlerTo_p_wxImageHandler(void *x) { + return (void *)((wxImageHandler *) ((wxPCXHandler *) x)); +} +static void *_p_wxJPEGHandlerTo_p_wxImageHandler(void *x) { + return (void *)((wxImageHandler *) ((wxJPEGHandler *) x)); +} +static void *_p_wxPNMHandlerTo_p_wxImageHandler(void *x) { + return (void *)((wxImageHandler *) ((wxPNMHandler *) x)); +} +static void *_p_wxXPMHandlerTo_p_wxImageHandler(void *x) { + return (void *)((wxImageHandler *) ((wxXPMHandler *) x)); +} +static void *_p_wxTIFFHandlerTo_p_wxImageHandler(void *x) { + return (void *)((wxImageHandler *) ((wxTIFFHandler *) x)); +} +static void *_p_wxTGAHandlerTo_p_wxImageHandler(void *x) { + return (void *)((wxImageHandler *) ((wxTGAHandler *) x)); +} +static void *_p_wxICOHandlerTo_p_wxBMPHandler(void *x) { + return (void *)((wxBMPHandler *) ((wxICOHandler *) x)); +} +static void *_p_wxCURHandlerTo_p_wxBMPHandler(void *x) { + return (void *)((wxBMPHandler *) (wxICOHandler *) ((wxCURHandler *) x)); +} +static void *_p_wxANIHandlerTo_p_wxBMPHandler(void *x) { + return (void *)((wxBMPHandler *) (wxICOHandler *)(wxCURHandler *) ((wxANIHandler *) x)); +} +static void *_p_wxCURHandlerTo_p_wxICOHandler(void *x) { + return (void *)((wxICOHandler *) ((wxCURHandler *) x)); +} +static void *_p_wxANIHandlerTo_p_wxICOHandler(void *x) { + return (void *)((wxICOHandler *) (wxCURHandler *) ((wxANIHandler *) x)); +} +static void *_p_wxANIHandlerTo_p_wxCURHandler(void *x) { + return (void *)((wxCURHandler *) ((wxANIHandler *) x)); +} +static void *_p_wxControlTo_p_wxEvtHandler(void *x) { + return (void *)((wxEvtHandler *) (wxWindow *) ((wxControl *) x)); +} +static void *_p_wxWindowTo_p_wxEvtHandler(void *x) { + return (void *)((wxEvtHandler *) ((wxWindow *) x)); +} +static void *_p_wxControlWithItemsTo_p_wxEvtHandler(void *x) { + return (void *)((wxEvtHandler *) (wxWindow *)(wxControl *) ((wxControlWithItems *) x)); +} +static void *_p_wxPyAppTo_p_wxEvtHandler(void *x) { + return (void *)((wxEvtHandler *) ((wxPyApp *) x)); +} +static void *_p_wxValidatorTo_p_wxEvtHandler(void *x) { + return (void *)((wxEvtHandler *) ((wxValidator *) x)); +} +static void *_p_wxPyValidatorTo_p_wxEvtHandler(void *x) { + return (void *)((wxEvtHandler *) (wxValidator *) ((wxPyValidator *) x)); +} +static void *_p_wxMenuBarTo_p_wxEvtHandler(void *x) { + return (void *)((wxEvtHandler *) (wxWindow *) ((wxMenuBar *) x)); +} +static void *_p_wxEventBlockerTo_p_wxEvtHandler(void *x) { + return (void *)((wxEvtHandler *) ((wxEventBlocker *) x)); +} +static void *_p_wxMenuTo_p_wxEvtHandler(void *x) { + return (void *)((wxEvtHandler *) ((wxMenu *) x)); +} static void *_p_wxControlTo_p_wxWindow(void *x) { return (void *)((wxWindow *) ((wxControl *) x)); } @@ -58670,9 +59787,6 @@ static void *_p_wxNotifyEventTo_p_wxCommandEvent(void *x) { static void *_p_wxPyCommandEventTo_p_wxCommandEvent(void *x) { return (void *)((wxCommandEvent *) ((wxPyCommandEvent *) x)); } -static void *_p_wxPyValidatorTo_p_wxValidator(void *x) { - return (void *)((wxValidator *) ((wxPyValidator *) x)); -} static swig_type_info _swigt__p_buffer = {"_p_buffer", "buffer *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_char = {"_p_char", "char *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_form_ops_t = {"_p_form_ops_t", "enum form_ops_t *|form_ops_t *", 0, 0, (void*)0, 0}; @@ -58793,6 +59907,7 @@ static swig_type_info _swigt__p_wxShowEvent = {"_p_wxShowEvent", "wxShowEvent *" static swig_type_info _swigt__p_wxSize = {"_p_wxSize", "wxSize *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_wxSizeEvent = {"_p_wxSizeEvent", "wxSizeEvent *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_wxSizer = {"_p_wxSizer", "wxSizer *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_wxSizerFlags = {"_p_wxSizerFlags", "wxSizerFlags *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_wxSizerItem = {"_p_wxSizerItem", "wxSizerItem *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_wxStaticBox = {"_p_wxStaticBox", "wxStaticBox *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_wxStaticBoxSizer = {"_p_wxStaticBoxSizer", "wxStaticBoxSizer *", 0, 0, (void*)0, 0}; @@ -58931,6 +60046,7 @@ static swig_type_info *swig_type_initial[] = { &_swigt__p_wxSize, &_swigt__p_wxSizeEvent, &_swigt__p_wxSizer, + &_swigt__p_wxSizerFlags, &_swigt__p_wxSizerItem, &_swigt__p_wxStaticBox, &_swigt__p_wxStaticBoxSizer, @@ -59069,6 +60185,7 @@ static swig_cast_info _swigc__p_wxShowEvent[] = { {&_swigt__p_wxShowEvent, 0, 0 static swig_cast_info _swigc__p_wxSize[] = { {&_swigt__p_wxSize, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_wxSizeEvent[] = { {&_swigt__p_wxSizeEvent, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_wxSizer[] = { {&_swigt__p_wxSizer, 0, 0, 0}, {&_swigt__p_wxBoxSizer, _p_wxBoxSizerTo_p_wxSizer, 0, 0}, {&_swigt__p_wxStaticBoxSizer, _p_wxStaticBoxSizerTo_p_wxSizer, 0, 0}, {&_swigt__p_wxStdDialogButtonSizer, _p_wxStdDialogButtonSizerTo_p_wxSizer, 0, 0}, {&_swigt__p_wxGridBagSizer, _p_wxGridBagSizerTo_p_wxSizer, 0, 0}, {&_swigt__p_wxGridSizer, _p_wxGridSizerTo_p_wxSizer, 0, 0}, {&_swigt__p_wxFlexGridSizer, _p_wxFlexGridSizerTo_p_wxSizer, 0, 0}, {&_swigt__p_wxPySizer, _p_wxPySizerTo_p_wxSizer, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_wxSizerFlags[] = { {&_swigt__p_wxSizerFlags, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_wxSizerItem[] = { {&_swigt__p_wxSizerItem, 0, 0, 0}, {&_swigt__p_wxGBSizerItem, _p_wxGBSizerItemTo_p_wxSizerItem, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_wxStaticBox[] = { {&_swigt__p_wxStaticBox, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_wxStaticBoxSizer[] = { {&_swigt__p_wxStaticBoxSizer, 0, 0, 0},{0, 0, 0, 0}}; @@ -59207,6 +60324,7 @@ static swig_cast_info *swig_cast_initial[] = { _swigc__p_wxSize, _swigc__p_wxSizeEvent, _swigc__p_wxSizer, + _swigc__p_wxSizerFlags, _swigc__p_wxSizerItem, _swigc__p_wxStaticBox, _swigc__p_wxStaticBoxSizer, @@ -59771,8 +60889,6 @@ SWIGEXPORT void SWIG_init(void) { SWIG_Python_SetConstant(d, "LB_EXTENDED",SWIG_From_int(static_cast< int >(wxLB_EXTENDED))); SWIG_Python_SetConstant(d, "LB_OWNERDRAW",SWIG_From_int(static_cast< int >(wxLB_OWNERDRAW))); SWIG_Python_SetConstant(d, "LB_HSCROLL",SWIG_From_int(static_cast< int >(wxLB_HSCROLL))); - SWIG_Python_SetConstant(d, "PROCESS_ENTER",SWIG_From_int(static_cast< int >(wxPROCESS_ENTER))); - SWIG_Python_SetConstant(d, "PASSWORD",SWIG_From_int(static_cast< int >(wxPASSWORD))); SWIG_Python_SetConstant(d, "CB_SIMPLE",SWIG_From_int(static_cast< int >(wxCB_SIMPLE))); SWIG_Python_SetConstant(d, "CB_DROPDOWN",SWIG_From_int(static_cast< int >(wxCB_DROPDOWN))); SWIG_Python_SetConstant(d, "CB_SORT",SWIG_From_int(static_cast< int >(wxCB_SORT))); @@ -59989,7 +61105,6 @@ SWIGEXPORT void SWIG_init(void) { SWIG_Python_SetConstant(d, "SHAPED",SWIG_From_int(static_cast< int >(wxSHAPED))); SWIG_Python_SetConstant(d, "FIXED_MINSIZE",SWIG_From_int(static_cast< int >(wxFIXED_MINSIZE))); SWIG_Python_SetConstant(d, "TILE",SWIG_From_int(static_cast< int >(wxTILE))); - SWIG_Python_SetConstant(d, "ADJUST_MINSIZE",SWIG_From_int(static_cast< int >(wxADJUST_MINSIZE))); SWIG_Python_SetConstant(d, "BORDER_DEFAULT",SWIG_From_int(static_cast< int >(wxBORDER_DEFAULT))); SWIG_Python_SetConstant(d, "BORDER_NONE",SWIG_From_int(static_cast< int >(wxBORDER_NONE))); SWIG_Python_SetConstant(d, "BORDER_STATIC",SWIG_From_int(static_cast< int >(wxBORDER_STATIC))); @@ -60071,8 +61186,6 @@ SWIGEXPORT void SWIG_init(void) { SWIG_Python_SetConstant(d, "WXK_MENU",SWIG_From_int(static_cast< int >(WXK_MENU))); SWIG_Python_SetConstant(d, "WXK_PAUSE",SWIG_From_int(static_cast< int >(WXK_PAUSE))); SWIG_Python_SetConstant(d, "WXK_CAPITAL",SWIG_From_int(static_cast< int >(WXK_CAPITAL))); - SWIG_Python_SetConstant(d, "WXK_PRIOR",SWIG_From_int(static_cast< int >(WXK_PRIOR))); - SWIG_Python_SetConstant(d, "WXK_NEXT",SWIG_From_int(static_cast< int >(WXK_NEXT))); SWIG_Python_SetConstant(d, "WXK_END",SWIG_From_int(static_cast< int >(WXK_END))); SWIG_Python_SetConstant(d, "WXK_HOME",SWIG_From_int(static_cast< int >(WXK_HOME))); SWIG_Python_SetConstant(d, "WXK_LEFT",SWIG_From_int(static_cast< int >(WXK_LEFT))); @@ -60141,9 +61254,7 @@ SWIGEXPORT void SWIG_init(void) { SWIG_Python_SetConstant(d, "WXK_NUMPAD_UP",SWIG_From_int(static_cast< int >(WXK_NUMPAD_UP))); SWIG_Python_SetConstant(d, "WXK_NUMPAD_RIGHT",SWIG_From_int(static_cast< int >(WXK_NUMPAD_RIGHT))); SWIG_Python_SetConstant(d, "WXK_NUMPAD_DOWN",SWIG_From_int(static_cast< int >(WXK_NUMPAD_DOWN))); - SWIG_Python_SetConstant(d, "WXK_NUMPAD_PRIOR",SWIG_From_int(static_cast< int >(WXK_NUMPAD_PRIOR))); SWIG_Python_SetConstant(d, "WXK_NUMPAD_PAGEUP",SWIG_From_int(static_cast< int >(WXK_NUMPAD_PAGEUP))); - SWIG_Python_SetConstant(d, "WXK_NUMPAD_NEXT",SWIG_From_int(static_cast< int >(WXK_NUMPAD_NEXT))); SWIG_Python_SetConstant(d, "WXK_NUMPAD_PAGEDOWN",SWIG_From_int(static_cast< int >(WXK_NUMPAD_PAGEDOWN))); SWIG_Python_SetConstant(d, "WXK_NUMPAD_END",SWIG_From_int(static_cast< int >(WXK_NUMPAD_END))); SWIG_Python_SetConstant(d, "WXK_NUMPAD_BEGIN",SWIG_From_int(static_cast< int >(WXK_NUMPAD_BEGIN))); diff --git a/wxPython/src/gtk/_gdi.py b/wxPython/src/gtk/_gdi.py index a70a8ba74f..532073c7fb 100644 --- a/wxPython/src/gtk/_gdi.py +++ b/wxPython/src/gtk/_gdi.py @@ -673,7 +673,7 @@ class Bitmap(GDIObject): CopyFromBuffer(self, buffer data) Copy data from a RGB buffer object to replace the bitmap pixel data. - See `wxBitmapFromBuffer` for more . + See `wx.BitmapFromBuffer` for more . """ return _gdi_.Bitmap_CopyFromBuffer(*args, **kwargs) @@ -682,7 +682,7 @@ class Bitmap(GDIObject): CopyFromBufferRGBA(self, buffer data) Copy data from a RGBA buffer object to replace the bitmap pixel data. - See `wxBitmapFromBufferRGBA` for more . + See `wx.BitmapFromBufferRGBA` for more . """ return _gdi_.Bitmap_CopyFromBufferRGBA(*args, **kwargs) @@ -3385,6 +3385,35 @@ class DC(_core.Object): """ return _gdi_.DC_BlitPointSize(*args, **kwargs) + def StretchBlit(*args, **kwargs): + """ + StretchBlit(self, int dstX, int dstY, int dstWidth, int dstHeight, DC source, + int srcX, int srcY, int srcWidth, int srcHeight, + int rop=COPY, bool useMask=False, + int srcMaskX=wxDefaultCoord, int srcMaskY=wxDefaultCoord) -> bool + + Copy from a source DC to this DC, specifying the destination + coordinates, destination size, source DC, source coordinates, size of + source area to copy, logical function, whether to use a bitmap mask, + and mask source position. + """ + return _gdi_.DC_StretchBlit(*args, **kwargs) + + def StretchBlitPointSize(*args, **kwargs): + """ + StretchBlitPointSize(self, Point dstPt, Size dstSize, DC source, Point srcPt, + Size srcSize, int rop=COPY, bool useMask=False, + Point srcMaskPt=DefaultPosition) -> bool + + Copy from a source DC to this DC, specifying the destination + coordinates, destination size, source DC, source coordinates, size of + source area to copy, logical function, whether to use a bitmap mask, + and mask source position. This version is the same as `StretchBlit` + except `wx.Point` and `wx.Size` objects are used instead of individual + position and size components. + """ + return _gdi_.DC_StretchBlitPointSize(*args, **kwargs) + def GetAsBitmap(*args, **kwargs): """GetAsBitmap(self, Rect subrect=None) -> Bitmap""" return _gdi_.DC_GetAsBitmap(*args, **kwargs) @@ -4693,6 +4722,7 @@ def MemoryDCFromDC(*args, **kwargs): BUFFER_VIRTUAL_AREA = _gdi_.BUFFER_VIRTUAL_AREA BUFFER_CLIENT_AREA = _gdi_.BUFFER_CLIENT_AREA +BUFFER_USES_SHARED_BUFFER = _gdi_.BUFFER_USES_SHARED_BUFFER class BufferedDC(MemoryDC): """ This simple class provides a simple way to avoid flicker: when drawing @@ -5391,7 +5421,8 @@ class GraphicsContext(GraphicsObject): Creates a wx.GraphicsContext from a native context. This native context must be eg a CGContextRef for Core Graphics, a Graphics - pointer for GDIPlus or a cairo_t pointer for Cairo. + pointer for GDIPlus or a cairo_t pointer for Cairo. NOTE: For + wxPython we still need a way to make this value usable. """ return _gdi_.GraphicsContext_CreateFromNative(*args, **kwargs) @@ -5400,7 +5431,8 @@ class GraphicsContext(GraphicsObject): """ CreateFromNativeWindow(void window) -> GraphicsContext - Creates a wx.GraphicsContext from a native window. + Creates a wx.GraphicsContext from a native window. NOTE: For wxPython + we still need a way to make this value usable. """ return _gdi_.GraphicsContext_CreateFromNativeWindow(*args, **kwargs) @@ -5719,7 +5751,7 @@ class GraphicsContext(GraphicsObject): def StrokeLineSegements(*args, **kwargs): """ - StrokeLineSegements(self, PyObject beginPoints, PyObject endPoints) + StrokeLineSegments(self, List beginPoints, List endPoints) Stroke disconnected lines from begin to end points """ @@ -5800,7 +5832,8 @@ def GraphicsContext_CreateFromNative(*args, **kwargs): Creates a wx.GraphicsContext from a native context. This native context must be eg a CGContextRef for Core Graphics, a Graphics - pointer for GDIPlus or a cairo_t pointer for Cairo. + pointer for GDIPlus or a cairo_t pointer for Cairo. NOTE: For + wxPython we still need a way to make this value usable. """ return _gdi_.GraphicsContext_CreateFromNative(*args, **kwargs) @@ -5808,7 +5841,8 @@ def GraphicsContext_CreateFromNativeWindow(*args, **kwargs): """ GraphicsContext_CreateFromNativeWindow(void window) -> GraphicsContext - Creates a wx.GraphicsContext from a native window. + Creates a wx.GraphicsContext from a native window. NOTE: For wxPython + we still need a way to make this value usable. """ return _gdi_.GraphicsContext_CreateFromNativeWindow(*args, **kwargs) @@ -6238,17 +6272,6 @@ class PenList(GDIObjListBase): """FindOrCreatePen(self, Colour colour, int width, int style) -> Pen""" return _gdi_.PenList_FindOrCreatePen(*args, **kwargs) - def AddPen(*args, **kwargs): - """AddPen(self, Pen pen)""" - return _gdi_.PenList_AddPen(*args, **kwargs) - - def RemovePen(*args, **kwargs): - """RemovePen(self, Pen pen)""" - return _gdi_.PenList_RemovePen(*args, **kwargs) - - AddPen = wx._deprecated(AddPen) - RemovePen = wx._deprecated(RemovePen) - _gdi_.PenList_swigregister(PenList) class BrushList(GDIObjListBase): @@ -6260,17 +6283,6 @@ class BrushList(GDIObjListBase): """FindOrCreateBrush(self, Colour colour, int style=SOLID) -> Brush""" return _gdi_.BrushList_FindOrCreateBrush(*args, **kwargs) - def AddBrush(*args, **kwargs): - """AddBrush(self, Brush brush)""" - return _gdi_.BrushList_AddBrush(*args, **kwargs) - - def RemoveBrush(*args, **kwargs): - """RemoveBrush(self, Brush brush)""" - return _gdi_.BrushList_RemoveBrush(*args, **kwargs) - - AddBrush = wx._deprecated(AddBrush) - RemoveBrush = wx._deprecated(RemoveBrush) - _gdi_.BrushList_swigregister(BrushList) class FontList(GDIObjListBase): @@ -6286,17 +6298,6 @@ class FontList(GDIObjListBase): """ return _gdi_.FontList_FindOrCreateFont(*args, **kwargs) - def AddFont(*args, **kwargs): - """AddFont(self, Font font)""" - return _gdi_.FontList_AddFont(*args, **kwargs) - - def RemoveFont(*args, **kwargs): - """RemoveFont(self, Font font)""" - return _gdi_.FontList_RemoveFont(*args, **kwargs) - - AddFont = wx._deprecated(AddFont) - RemoveFont = wx._deprecated(RemoveFont) - _gdi_.FontList_swigregister(FontList) class ColourDatabase(object): diff --git a/wxPython/src/gtk/_gdi_wrap.cpp b/wxPython/src/gtk/_gdi_wrap.cpp index 729b153797..43dadd1f5b 100644 --- a/wxPython/src/gtk/_gdi_wrap.cpp +++ b/wxPython/src/gtk/_gdi_wrap.cpp @@ -3412,11 +3412,11 @@ public: const wxChar *szOrigString2, size_t n, const wxChar *szDomain = NULL) const; - virtual wxChar *GetSingularString(const wxChar *szOrigString, - const wxChar *szDomain = NULL) const; - virtual wxChar *GetPluralString(const wxChar *szOrigString, - const wxChar *szOrigString2, size_t n, - const wxChar *szDomain = NULL) const; + virtual const wxChar *GetSingularString(const wxChar *szOrigString, + const wxChar *szDomain = NULL) const; + virtual const wxChar *GetPluralString(const wxChar *szOrigString, + const wxChar *szOrigString2, size_t n, + const wxChar *szDomain = NULL) const; PYPRIVATE; private: @@ -3448,7 +3448,7 @@ wxPyLocale::~wxPyLocale() const wxChar *wxPyLocale::GetString(const wxChar *szOrigString, const wxChar *szDomain) const { - wxChar *str = GetSingularString(szOrigString, szDomain); + const wxChar *str = GetSingularString(szOrigString, szDomain); return (str != NULL) ? str : wxLocale::GetString(szOrigString, szDomain); } @@ -3456,12 +3456,12 @@ const wxChar *wxPyLocale::GetString(const wxChar *szOrigString, const wxChar *szOrigString2, size_t n, const wxChar *szDomain) const { - wxChar *str = GetPluralString(szOrigString, szOrigString2, n, szDomain); + const wxChar *str = GetPluralString(szOrigString, szOrigString2, n, szDomain); return (str != NULL) ? str : wxLocale::GetString(szOrigString, szOrigString2, n, szDomain); } -wxChar *wxPyLocale::GetSingularString(const wxChar *szOrigString, - const wxChar *szDomain) const +const wxChar *wxPyLocale::GetSingularString(const wxChar *szOrigString, + const wxChar *szDomain) const { bool found; static wxString str; @@ -3479,12 +3479,12 @@ wxChar *wxPyLocale::GetSingularString(const wxChar *szOrigString, } } wxPyEndBlockThreads(blocked); - return (found ? (wxChar*)str.c_str() : NULL); + return (found ? (const wxChar*)str.c_str() : NULL); } -wxChar *wxPyLocale::GetPluralString(const wxChar *szOrigString, - const wxChar *szOrigString2, size_t n, - const wxChar *szDomain) const +const wxChar *wxPyLocale::GetPluralString(const wxChar *szOrigString, + const wxChar *szOrigString2, size_t n, + const wxChar *szDomain) const { bool found; static wxString str; @@ -3504,7 +3504,7 @@ wxChar *wxPyLocale::GetPluralString(const wxChar *szOrigString, } } wxPyEndBlockThreads(blocked); - return (found ? (wxChar*)str.c_str() : NULL); + return (found ? (const wxChar*)str.c_str() : NULL); } SWIGINTERN wxPyLocale *new_wxPyLocale(int language=-1,int flags=wxLOCALE_LOAD_DEFAULT|wxLOCALE_CONV_ENCODING){ @@ -19848,6 +19848,264 @@ fail: } +SWIGINTERN PyObject *_wrap_DC_StretchBlit(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + wxDC *arg1 = (wxDC *) 0 ; + int arg2 ; + int arg3 ; + int arg4 ; + int arg5 ; + wxDC *arg6 = (wxDC *) 0 ; + int arg7 ; + int arg8 ; + int arg9 ; + int arg10 ; + int arg11 = (int) wxCOPY ; + bool arg12 = (bool) false ; + int arg13 = (int) wxDefaultCoord ; + int arg14 = (int) wxDefaultCoord ; + bool result; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + int val3 ; + int ecode3 = 0 ; + int val4 ; + int ecode4 = 0 ; + int val5 ; + int ecode5 = 0 ; + void *argp6 = 0 ; + int res6 = 0 ; + int val7 ; + int ecode7 = 0 ; + int val8 ; + int ecode8 = 0 ; + int val9 ; + int ecode9 = 0 ; + int val10 ; + int ecode10 = 0 ; + int val11 ; + int ecode11 = 0 ; + bool val12 ; + int ecode12 = 0 ; + int val13 ; + int ecode13 = 0 ; + int val14 ; + int ecode14 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; + PyObject * obj4 = 0 ; + PyObject * obj5 = 0 ; + PyObject * obj6 = 0 ; + PyObject * obj7 = 0 ; + PyObject * obj8 = 0 ; + PyObject * obj9 = 0 ; + PyObject * obj10 = 0 ; + PyObject * obj11 = 0 ; + PyObject * obj12 = 0 ; + PyObject * obj13 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "dstX",(char *) "dstY",(char *) "dstWidth",(char *) "dstHeight",(char *) "source",(char *) "srcX",(char *) "srcY",(char *) "srcWidth",(char *) "srcHeight",(char *) "rop",(char *) "useMask",(char *) "srcMaskX",(char *) "srcMaskY", NULL + }; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOOOOOOOO|OOOO:DC_StretchBlit",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8,&obj9,&obj10,&obj11,&obj12,&obj13)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_wxDC, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DC_StretchBlit" "', expected argument " "1"" of type '" "wxDC *""'"); + } + arg1 = reinterpret_cast< wxDC * >(argp1); + ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "DC_StretchBlit" "', expected argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + ecode3 = SWIG_AsVal_int(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "DC_StretchBlit" "', expected argument " "3"" of type '" "int""'"); + } + arg3 = static_cast< int >(val3); + ecode4 = SWIG_AsVal_int(obj3, &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "DC_StretchBlit" "', expected argument " "4"" of type '" "int""'"); + } + arg4 = static_cast< int >(val4); + ecode5 = SWIG_AsVal_int(obj4, &val5); + if (!SWIG_IsOK(ecode5)) { + SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "DC_StretchBlit" "', expected argument " "5"" of type '" "int""'"); + } + arg5 = static_cast< int >(val5); + res6 = SWIG_ConvertPtr(obj5, &argp6,SWIGTYPE_p_wxDC, 0 | 0 ); + if (!SWIG_IsOK(res6)) { + SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "DC_StretchBlit" "', expected argument " "6"" of type '" "wxDC *""'"); + } + arg6 = reinterpret_cast< wxDC * >(argp6); + ecode7 = SWIG_AsVal_int(obj6, &val7); + if (!SWIG_IsOK(ecode7)) { + SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "DC_StretchBlit" "', expected argument " "7"" of type '" "int""'"); + } + arg7 = static_cast< int >(val7); + ecode8 = SWIG_AsVal_int(obj7, &val8); + if (!SWIG_IsOK(ecode8)) { + SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "DC_StretchBlit" "', expected argument " "8"" of type '" "int""'"); + } + arg8 = static_cast< int >(val8); + ecode9 = SWIG_AsVal_int(obj8, &val9); + if (!SWIG_IsOK(ecode9)) { + SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "DC_StretchBlit" "', expected argument " "9"" of type '" "int""'"); + } + arg9 = static_cast< int >(val9); + ecode10 = SWIG_AsVal_int(obj9, &val10); + if (!SWIG_IsOK(ecode10)) { + SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "DC_StretchBlit" "', expected argument " "10"" of type '" "int""'"); + } + arg10 = static_cast< int >(val10); + if (obj10) { + ecode11 = SWIG_AsVal_int(obj10, &val11); + if (!SWIG_IsOK(ecode11)) { + SWIG_exception_fail(SWIG_ArgError(ecode11), "in method '" "DC_StretchBlit" "', expected argument " "11"" of type '" "int""'"); + } + arg11 = static_cast< int >(val11); + } + if (obj11) { + ecode12 = SWIG_AsVal_bool(obj11, &val12); + if (!SWIG_IsOK(ecode12)) { + SWIG_exception_fail(SWIG_ArgError(ecode12), "in method '" "DC_StretchBlit" "', expected argument " "12"" of type '" "bool""'"); + } + arg12 = static_cast< bool >(val12); + } + if (obj12) { + ecode13 = SWIG_AsVal_int(obj12, &val13); + if (!SWIG_IsOK(ecode13)) { + SWIG_exception_fail(SWIG_ArgError(ecode13), "in method '" "DC_StretchBlit" "', expected argument " "13"" of type '" "int""'"); + } + arg13 = static_cast< int >(val13); + } + if (obj13) { + ecode14 = SWIG_AsVal_int(obj13, &val14); + if (!SWIG_IsOK(ecode14)) { + SWIG_exception_fail(SWIG_ArgError(ecode14), "in method '" "DC_StretchBlit" "', expected argument " "14"" of type '" "int""'"); + } + arg14 = static_cast< int >(val14); + } + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + result = (bool)(arg1)->StretchBlit(arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12,arg13,arg14); + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + { + resultobj = result ? Py_True : Py_False; Py_INCREF(resultobj); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_DC_StretchBlitPointSize(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + wxDC *arg1 = (wxDC *) 0 ; + wxPoint *arg2 = 0 ; + wxSize *arg3 = 0 ; + wxDC *arg4 = (wxDC *) 0 ; + wxPoint *arg5 = 0 ; + wxSize *arg6 = 0 ; + int arg7 = (int) wxCOPY ; + bool arg8 = (bool) false ; + wxPoint const &arg9_defvalue = wxDefaultPosition ; + wxPoint *arg9 = (wxPoint *) &arg9_defvalue ; + bool result; + void *argp1 = 0 ; + int res1 = 0 ; + wxPoint temp2 ; + wxSize temp3 ; + void *argp4 = 0 ; + int res4 = 0 ; + wxPoint temp5 ; + wxSize temp6 ; + int val7 ; + int ecode7 = 0 ; + bool val8 ; + int ecode8 = 0 ; + wxPoint temp9 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; + PyObject * obj4 = 0 ; + PyObject * obj5 = 0 ; + PyObject * obj6 = 0 ; + PyObject * obj7 = 0 ; + PyObject * obj8 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "dstPt",(char *) "dstSize",(char *) "source",(char *) "srcPt",(char *) "srcSize",(char *) "rop",(char *) "useMask",(char *) "srcMaskPt", NULL + }; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOOOO|OOO:DC_StretchBlitPointSize",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_wxDC, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DC_StretchBlitPointSize" "', expected argument " "1"" of type '" "wxDC *""'"); + } + arg1 = reinterpret_cast< wxDC * >(argp1); + { + arg2 = &temp2; + if ( ! wxPoint_helper(obj1, &arg2)) SWIG_fail; + } + { + arg3 = &temp3; + if ( ! wxSize_helper(obj2, &arg3)) SWIG_fail; + } + res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_wxDC, 0 | 0 ); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "DC_StretchBlitPointSize" "', expected argument " "4"" of type '" "wxDC *""'"); + } + arg4 = reinterpret_cast< wxDC * >(argp4); + { + arg5 = &temp5; + if ( ! wxPoint_helper(obj4, &arg5)) SWIG_fail; + } + { + arg6 = &temp6; + if ( ! wxSize_helper(obj5, &arg6)) SWIG_fail; + } + if (obj6) { + ecode7 = SWIG_AsVal_int(obj6, &val7); + if (!SWIG_IsOK(ecode7)) { + SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "DC_StretchBlitPointSize" "', expected argument " "7"" of type '" "int""'"); + } + arg7 = static_cast< int >(val7); + } + if (obj7) { + ecode8 = SWIG_AsVal_bool(obj7, &val8); + if (!SWIG_IsOK(ecode8)) { + SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "DC_StretchBlitPointSize" "', expected argument " "8"" of type '" "bool""'"); + } + arg8 = static_cast< bool >(val8); + } + if (obj8) { + { + arg9 = &temp9; + if ( ! wxPoint_helper(obj8, &arg9)) SWIG_fail; + } + } + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + result = (bool)(arg1)->StretchBlit((wxPoint const &)*arg2,(wxSize const &)*arg3,arg4,(wxPoint const &)*arg5,(wxSize const &)*arg6,arg7,arg8,(wxPoint const &)*arg9); + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + { + resultobj = result ? Py_True : Py_False; Py_INCREF(resultobj); + } + return resultobj; +fail: + return NULL; +} + + SWIGINTERN PyObject *_wrap_DC_GetAsBitmap(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { PyObject *resultobj = 0; wxDC *arg1 = (wxDC *) 0 ; @@ -32073,82 +32331,6 @@ fail: } -SWIGINTERN PyObject *_wrap_PenList_AddPen(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - wxPenList *arg1 = (wxPenList *) 0 ; - wxPen *arg2 = (wxPen *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "pen", NULL - }; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:PenList_AddPen",kwnames,&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_wxPenList, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PenList_AddPen" "', expected argument " "1"" of type '" "wxPenList *""'"); - } - arg1 = reinterpret_cast< wxPenList * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_wxPen, 0 | 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "PenList_AddPen" "', expected argument " "2"" of type '" "wxPen *""'"); - } - arg2 = reinterpret_cast< wxPen * >(argp2); - { - PyThreadState* __tstate = wxPyBeginAllowThreads(); - (arg1)->AddPen(arg2); - wxPyEndAllowThreads(__tstate); - if (PyErr_Occurred()) SWIG_fail; - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_PenList_RemovePen(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - wxPenList *arg1 = (wxPenList *) 0 ; - wxPen *arg2 = (wxPen *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "pen", NULL - }; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:PenList_RemovePen",kwnames,&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_wxPenList, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PenList_RemovePen" "', expected argument " "1"" of type '" "wxPenList *""'"); - } - arg1 = reinterpret_cast< wxPenList * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_wxPen, 0 | 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "PenList_RemovePen" "', expected argument " "2"" of type '" "wxPen *""'"); - } - arg2 = reinterpret_cast< wxPen * >(argp2); - { - PyThreadState* __tstate = wxPyBeginAllowThreads(); - (arg1)->RemovePen(arg2); - wxPyEndAllowThreads(__tstate); - if (PyErr_Occurred()) SWIG_fail; - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - SWIGINTERN PyObject *PenList_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; if (!SWIG_Python_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return NULL; @@ -32204,82 +32386,6 @@ fail: } -SWIGINTERN PyObject *_wrap_BrushList_AddBrush(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - wxBrushList *arg1 = (wxBrushList *) 0 ; - wxBrush *arg2 = (wxBrush *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "brush", NULL - }; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:BrushList_AddBrush",kwnames,&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_wxBrushList, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BrushList_AddBrush" "', expected argument " "1"" of type '" "wxBrushList *""'"); - } - arg1 = reinterpret_cast< wxBrushList * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_wxBrush, 0 | 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "BrushList_AddBrush" "', expected argument " "2"" of type '" "wxBrush *""'"); - } - arg2 = reinterpret_cast< wxBrush * >(argp2); - { - PyThreadState* __tstate = wxPyBeginAllowThreads(); - (arg1)->AddBrush(arg2); - wxPyEndAllowThreads(__tstate); - if (PyErr_Occurred()) SWIG_fail; - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_BrushList_RemoveBrush(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - wxBrushList *arg1 = (wxBrushList *) 0 ; - wxBrush *arg2 = (wxBrush *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "brush", NULL - }; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:BrushList_RemoveBrush",kwnames,&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_wxBrushList, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BrushList_RemoveBrush" "', expected argument " "1"" of type '" "wxBrushList *""'"); - } - arg1 = reinterpret_cast< wxBrushList * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_wxBrush, 0 | 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "BrushList_RemoveBrush" "', expected argument " "2"" of type '" "wxBrush *""'"); - } - arg2 = reinterpret_cast< wxBrush * >(argp2); - { - PyThreadState* __tstate = wxPyBeginAllowThreads(); - (arg1)->RemoveBrush(arg2); - wxPyEndAllowThreads(__tstate); - if (PyErr_Occurred()) SWIG_fail; - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - SWIGINTERN PyObject *BrushList_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; if (!SWIG_Python_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return NULL; @@ -32394,82 +32500,6 @@ fail: } -SWIGINTERN PyObject *_wrap_FontList_AddFont(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - wxFontList *arg1 = (wxFontList *) 0 ; - wxFont *arg2 = (wxFont *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "font", NULL - }; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:FontList_AddFont",kwnames,&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_wxFontList, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FontList_AddFont" "', expected argument " "1"" of type '" "wxFontList *""'"); - } - arg1 = reinterpret_cast< wxFontList * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_wxFont, 0 | 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FontList_AddFont" "', expected argument " "2"" of type '" "wxFont *""'"); - } - arg2 = reinterpret_cast< wxFont * >(argp2); - { - PyThreadState* __tstate = wxPyBeginAllowThreads(); - (arg1)->AddFont(arg2); - wxPyEndAllowThreads(__tstate); - if (PyErr_Occurred()) SWIG_fail; - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FontList_RemoveFont(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - wxFontList *arg1 = (wxFontList *) 0 ; - wxFont *arg2 = (wxFont *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "font", NULL - }; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:FontList_RemoveFont",kwnames,&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_wxFontList, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FontList_RemoveFont" "', expected argument " "1"" of type '" "wxFontList *""'"); - } - arg1 = reinterpret_cast< wxFontList * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_wxFont, 0 | 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FontList_RemoveFont" "', expected argument " "2"" of type '" "wxFont *""'"); - } - arg2 = reinterpret_cast< wxFont * >(argp2); - { - PyThreadState* __tstate = wxPyBeginAllowThreads(); - (arg1)->RemoveFont(arg2); - wxPyEndAllowThreads(__tstate); - if (PyErr_Occurred()) SWIG_fail; - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - SWIGINTERN PyObject *FontList_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; if (!SWIG_Python_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return NULL; @@ -38835,6 +38865,8 @@ static PyMethodDef SwigMethods[] = { { (char *)"DC_DrawRotatedTextPoint", (PyCFunction) _wrap_DC_DrawRotatedTextPoint, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"DC_Blit", (PyCFunction) _wrap_DC_Blit, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"DC_BlitPointSize", (PyCFunction) _wrap_DC_BlitPointSize, METH_VARARGS | METH_KEYWORDS, NULL}, + { (char *)"DC_StretchBlit", (PyCFunction) _wrap_DC_StretchBlit, METH_VARARGS | METH_KEYWORDS, NULL}, + { (char *)"DC_StretchBlitPointSize", (PyCFunction) _wrap_DC_StretchBlitPointSize, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"DC_GetAsBitmap", (PyCFunction) _wrap_DC_GetAsBitmap, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"DC_SetClippingRegion", (PyCFunction) _wrap_DC_SetClippingRegion, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"DC_SetClippingRegionPointSize", (PyCFunction) _wrap_DC_SetClippingRegionPointSize, METH_VARARGS | METH_KEYWORDS, NULL}, @@ -39157,16 +39189,10 @@ static PyMethodDef SwigMethods[] = { { (char *)"GDIObjListBase_swigregister", GDIObjListBase_swigregister, METH_VARARGS, NULL}, { (char *)"GDIObjListBase_swiginit", GDIObjListBase_swiginit, METH_VARARGS, NULL}, { (char *)"PenList_FindOrCreatePen", (PyCFunction) _wrap_PenList_FindOrCreatePen, METH_VARARGS | METH_KEYWORDS, NULL}, - { (char *)"PenList_AddPen", (PyCFunction) _wrap_PenList_AddPen, METH_VARARGS | METH_KEYWORDS, NULL}, - { (char *)"PenList_RemovePen", (PyCFunction) _wrap_PenList_RemovePen, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"PenList_swigregister", PenList_swigregister, METH_VARARGS, NULL}, { (char *)"BrushList_FindOrCreateBrush", (PyCFunction) _wrap_BrushList_FindOrCreateBrush, METH_VARARGS | METH_KEYWORDS, NULL}, - { (char *)"BrushList_AddBrush", (PyCFunction) _wrap_BrushList_AddBrush, METH_VARARGS | METH_KEYWORDS, NULL}, - { (char *)"BrushList_RemoveBrush", (PyCFunction) _wrap_BrushList_RemoveBrush, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"BrushList_swigregister", BrushList_swigregister, METH_VARARGS, NULL}, { (char *)"FontList_FindOrCreateFont", (PyCFunction) _wrap_FontList_FindOrCreateFont, METH_VARARGS | METH_KEYWORDS, NULL}, - { (char *)"FontList_AddFont", (PyCFunction) _wrap_FontList_AddFont, METH_VARARGS | METH_KEYWORDS, NULL}, - { (char *)"FontList_RemoveFont", (PyCFunction) _wrap_FontList_RemoveFont, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"FontList_swigregister", FontList_swigregister, METH_VARARGS, NULL}, { (char *)"new_ColourDatabase", (PyCFunction)_wrap_new_ColourDatabase, METH_NOARGS, NULL}, { (char *)"delete_ColourDatabase", (PyCFunction)_wrap_delete_ColourDatabase, METH_O, NULL}, @@ -41386,6 +41412,7 @@ SWIGEXPORT void SWIG_init(void) { SWIG_Python_SetConstant(d, "PLATFORM_MAC",SWIG_From_int(static_cast< int >(wxPLATFORM_MAC))); SWIG_Python_SetConstant(d, "BUFFER_VIRTUAL_AREA",SWIG_From_int(static_cast< int >(wxBUFFER_VIRTUAL_AREA))); SWIG_Python_SetConstant(d, "BUFFER_CLIENT_AREA",SWIG_From_int(static_cast< int >(wxBUFFER_CLIENT_AREA))); + SWIG_Python_SetConstant(d, "BUFFER_USES_SHARED_BUFFER",SWIG_From_int(static_cast< int >(wxBUFFER_USES_SHARED_BUFFER))); PyDict_SetItemString(d,(char*)"cvar", SWIG_globals()); SWIG_addvarlink(SWIG_globals(),(char*)"NullGraphicsPen",NullGraphicsPen_get, NullGraphicsPen_set); SWIG_addvarlink(SWIG_globals(),(char*)"NullGraphicsBrush",NullGraphicsBrush_get, NullGraphicsBrush_set); diff --git a/wxPython/src/gtk/_misc.py b/wxPython/src/gtk/_misc.py index 795fff7b49..cf25f3fbb5 100644 --- a/wxPython/src/gtk/_misc.py +++ b/wxPython/src/gtk/_misc.py @@ -316,11 +316,6 @@ def EndBusyCursor(*args): """EndBusyCursor()""" return _misc_.EndBusyCursor(*args) -def GetElapsedTime(*args, **kwargs): - """GetElapsedTime(bool resetTimer=True) -> long""" - return _misc_.GetElapsedTime(*args, **kwargs) -GetElapsedTime = wx._deprecated(GetElapsedTime) - def IsBusy(*args): """IsBusy() -> bool""" return _misc_.IsBusy(*args) @@ -333,10 +328,6 @@ def Shell(*args, **kwargs): """Shell(String command=EmptyString) -> bool""" return _misc_.Shell(*args, **kwargs) -def StartTimer(*args): - """StartTimer()""" - return _misc_.StartTimer(*args) - def GetOsVersion(*args): """GetOsVersion() -> (platform, major, minor)""" return _misc_.GetOsVersion(*args) @@ -3307,8 +3298,26 @@ class FileConfig(ConfigBase): _misc_.FileConfig_swiginit(self,_misc_.new_FileConfig(*args, **kwargs)) __swig_destroy__ = _misc_.delete_FileConfig __del__ = lambda self : None; + def GetGlobalFileName(*args, **kwargs): + """GetGlobalFileName(String szFile) -> String""" + return _misc_.FileConfig_GetGlobalFileName(*args, **kwargs) + + GetGlobalFileName = staticmethod(GetGlobalFileName) + def GetLocalFileName(*args, **kwargs): + """GetLocalFileName(String szFile, int style=0) -> String""" + return _misc_.FileConfig_GetLocalFileName(*args, **kwargs) + + GetLocalFileName = staticmethod(GetLocalFileName) _misc_.FileConfig_swigregister(FileConfig) +def FileConfig_GetGlobalFileName(*args, **kwargs): + """FileConfig_GetGlobalFileName(String szFile) -> String""" + return _misc_.FileConfig_GetGlobalFileName(*args, **kwargs) + +def FileConfig_GetLocalFileName(*args, **kwargs): + """FileConfig_GetLocalFileName(String szFile, int style=0) -> String""" + return _misc_.FileConfig_GetLocalFileName(*args, **kwargs) + class ConfigPathChanger(object): """ A handy little class which changes current path to the path of given @@ -3707,17 +3716,6 @@ class DateTime(object): """GetLastWeekDay(self, int weekday, int month=Inv_Month, int year=Inv_Year) -> DateTime""" return _misc_.DateTime_GetLastWeekDay(*args, **kwargs) - def SetToTheWeek(*args, **kwargs): - """SetToTheWeek(self, int numWeek, int weekday=Mon, int flags=Monday_First) -> bool""" - return _misc_.DateTime_SetToTheWeek(*args, **kwargs) - - def GetWeek(*args, **kwargs): - """GetWeek(self, int numWeek, int weekday=Mon, int flags=Monday_First) -> DateTime""" - return _misc_.DateTime_GetWeek(*args, **kwargs) - - SetToTheWeek = wx._deprecated(SetToTheWeek, "SetToTheWeek is deprecated, use (static) SetToWeekOfYear instead") - GetWeek = wx._deprecated(GetWeek, "GetWeek is deprecated, use GetWeekOfYear instead") - def SetToWeekOfYear(*args, **kwargs): """SetToWeekOfYear(int year, int numWeek, int weekday=Mon) -> DateTime""" return _misc_.DateTime_SetToWeekOfYear(*args, **kwargs) @@ -4036,7 +4034,6 @@ class DateTime(object): RataDie = property(GetRataDie,doc="See `GetRataDie`") Second = property(GetSecond,SetSecond,doc="See `GetSecond` and `SetSecond`") Ticks = property(GetTicks,doc="See `GetTicks`") - Week = property(GetWeek,doc="See `GetWeek`") WeekDay = property(GetWeekDay,doc="See `GetWeekDay`") WeekDayInSameWeek = property(GetWeekDayInSameWeek,doc="See `GetWeekDayInSameWeek`") WeekOfMonth = property(GetWeekOfMonth,doc="See `GetWeekOfMonth`") diff --git a/wxPython/src/gtk/_misc_wrap.cpp b/wxPython/src/gtk/_misc_wrap.cpp index c299614ca0..be26a2769d 100644 --- a/wxPython/src/gtk/_misc_wrap.cpp +++ b/wxPython/src/gtk/_misc_wrap.cpp @@ -2801,6 +2801,23 @@ SWIG_AsVal_int (PyObject * obj, int *val) static const wxString wxPyFileSelectorDefaultWildcardStr(wxFileSelectorDefaultWildcardStr); static const wxString wxPyDirSelectorPromptStr(wxDirSelectorPromptStr); + wxMemorySize wxGetFreeMemory() + { wxPyRaiseNotImplemented(); return 0; } + + +SWIGINTERN int +SWIG_AsVal_unsigned_SS_long (PyObject* obj, unsigned long* val) +{ + long v = 0; + if (SWIG_AsVal_long(obj, &v) && v < 0) { + return SWIG_TypeError; + } + else if (val) + *val = (unsigned long)v; + return SWIG_OK; +} + + SWIGINTERN int SWIG_AsVal_bool (PyObject *obj, bool *val) { @@ -2819,23 +2836,6 @@ SWIG_AsVal_bool (PyObject *obj, bool *val) } - wxMemorySize wxGetFreeMemory() - { wxPyRaiseNotImplemented(); return 0; } - - -SWIGINTERN int -SWIG_AsVal_unsigned_SS_long (PyObject* obj, unsigned long* val) -{ - long v = 0; - if (SWIG_AsVal_long(obj, &v) && v < 0) { - return SWIG_TypeError; - } - else if (val) - *val = (unsigned long)v; - return SWIG_OK; -} - - SWIGINTERNINLINE PyObject* SWIG_From_unsigned_SS_long (unsigned long value) { @@ -4937,38 +4937,6 @@ fail: } -SWIGINTERN PyObject *_wrap_GetElapsedTime(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - bool arg1 = (bool) true ; - long result; - bool val1 ; - int ecode1 = 0 ; - PyObject * obj0 = 0 ; - char * kwnames[] = { - (char *) "resetTimer", NULL - }; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"|O:GetElapsedTime",kwnames,&obj0)) SWIG_fail; - if (obj0) { - ecode1 = SWIG_AsVal_bool(obj0, &val1); - if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "GetElapsedTime" "', expected argument " "1"" of type '" "bool""'"); - } - arg1 = static_cast< bool >(val1); - } - { - PyThreadState* __tstate = wxPyBeginAllowThreads(); - result = (long)wxGetElapsedTime(arg1); - wxPyEndAllowThreads(__tstate); - if (PyErr_Occurred()) SWIG_fail; - } - resultobj = SWIG_From_long(static_cast< long >(result)); - return resultobj; -fail: - return NULL; -} - - SWIGINTERN PyObject *_wrap_IsBusy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; bool result; @@ -5055,23 +5023,6 @@ fail: } -SWIGINTERN PyObject *_wrap_StartTimer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - - if (!SWIG_Python_UnpackTuple(args,"StartTimer",0,0,0)) SWIG_fail; - { - PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStartTimer(); - wxPyEndAllowThreads(__tstate); - if (PyErr_Occurred()) SWIG_fail; - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - SWIGINTERN PyObject *_wrap_GetOsVersion(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; int *arg1 = (int *) 0 ; @@ -22974,6 +22925,103 @@ fail: } +SWIGINTERN PyObject *_wrap_FileConfig_GetGlobalFileName(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + wxString *arg1 = 0 ; + wxString result; + bool temp1 = false ; + PyObject * obj0 = 0 ; + char * kwnames[] = { + (char *) "szFile", NULL + }; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:FileConfig_GetGlobalFileName",kwnames,&obj0)) SWIG_fail; + { + arg1 = wxString_in_helper(obj0); + if (arg1 == NULL) SWIG_fail; + temp1 = true; + } + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + result = wxFileConfig::GetGlobalFileName((wxString const &)*arg1); + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + { +#if wxUSE_UNICODE + resultobj = PyUnicode_FromWideChar((&result)->c_str(), (&result)->Len()); +#else + resultobj = PyString_FromStringAndSize((&result)->c_str(), (&result)->Len()); +#endif + } + { + if (temp1) + delete arg1; + } + return resultobj; +fail: + { + if (temp1) + delete arg1; + } + return NULL; +} + + +SWIGINTERN PyObject *_wrap_FileConfig_GetLocalFileName(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + wxString *arg1 = 0 ; + int arg2 = (int) 0 ; + wxString result; + bool temp1 = false ; + int val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "szFile",(char *) "style", NULL + }; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:FileConfig_GetLocalFileName",kwnames,&obj0,&obj1)) SWIG_fail; + { + arg1 = wxString_in_helper(obj0); + if (arg1 == NULL) SWIG_fail; + temp1 = true; + } + if (obj1) { + ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FileConfig_GetLocalFileName" "', expected argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + } + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + result = wxFileConfig::GetLocalFileName((wxString const &)*arg1,arg2); + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + { +#if wxUSE_UNICODE + resultobj = PyUnicode_FromWideChar((&result)->c_str(), (&result)->Len()); +#else + resultobj = PyString_FromStringAndSize((&result)->c_str(), (&result)->Len()); +#endif + } + { + if (temp1) + delete arg1; + } + return resultobj; +fail: + { + if (temp1) + delete arg1; + } + return NULL; +} + + SWIGINTERN PyObject *FileConfig_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; if (!SWIG_Python_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return NULL; @@ -25244,130 +25292,6 @@ fail: } -SWIGINTERN PyObject *_wrap_DateTime_SetToTheWeek(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - wxDateTime *arg1 = (wxDateTime *) 0 ; - int arg2 ; - wxDateTime::WeekDay arg3 = (wxDateTime::WeekDay) wxDateTime::Mon ; - wxDateTime::WeekFlags arg4 = (wxDateTime::WeekFlags) wxDateTime::Monday_First ; - bool result; - void *argp1 = 0 ; - int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - int val3 ; - int ecode3 = 0 ; - int val4 ; - int ecode4 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "numWeek",(char *) "weekday",(char *) "flags", NULL - }; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|OO:DateTime_SetToTheWeek",kwnames,&obj0,&obj1,&obj2,&obj3)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_wxDateTime, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DateTime_SetToTheWeek" "', expected argument " "1"" of type '" "wxDateTime *""'"); - } - arg1 = reinterpret_cast< wxDateTime * >(argp1); - ecode2 = SWIG_AsVal_int(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "DateTime_SetToTheWeek" "', expected argument " "2"" of type '" "int""'"); - } - arg2 = static_cast< int >(val2); - if (obj2) { - ecode3 = SWIG_AsVal_int(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "DateTime_SetToTheWeek" "', expected argument " "3"" of type '" "wxDateTime::WeekDay""'"); - } - arg3 = static_cast< wxDateTime::WeekDay >(val3); - } - if (obj3) { - ecode4 = SWIG_AsVal_int(obj3, &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "DateTime_SetToTheWeek" "', expected argument " "4"" of type '" "wxDateTime::WeekFlags""'"); - } - arg4 = static_cast< wxDateTime::WeekFlags >(val4); - } - { - PyThreadState* __tstate = wxPyBeginAllowThreads(); - result = (bool)(arg1)->SetToTheWeek(arg2,arg3,arg4); - wxPyEndAllowThreads(__tstate); - if (PyErr_Occurred()) SWIG_fail; - } - { - resultobj = result ? Py_True : Py_False; Py_INCREF(resultobj); - } - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_DateTime_GetWeek(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - wxDateTime *arg1 = (wxDateTime *) 0 ; - int arg2 ; - wxDateTime::WeekDay arg3 = (wxDateTime::WeekDay) wxDateTime::Mon ; - wxDateTime::WeekFlags arg4 = (wxDateTime::WeekFlags) wxDateTime::Monday_First ; - wxDateTime result; - void *argp1 = 0 ; - int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - int val3 ; - int ecode3 = 0 ; - int val4 ; - int ecode4 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "numWeek",(char *) "weekday",(char *) "flags", NULL - }; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|OO:DateTime_GetWeek",kwnames,&obj0,&obj1,&obj2,&obj3)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_wxDateTime, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DateTime_GetWeek" "', expected argument " "1"" of type '" "wxDateTime *""'"); - } - arg1 = reinterpret_cast< wxDateTime * >(argp1); - ecode2 = SWIG_AsVal_int(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "DateTime_GetWeek" "', expected argument " "2"" of type '" "int""'"); - } - arg2 = static_cast< int >(val2); - if (obj2) { - ecode3 = SWIG_AsVal_int(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "DateTime_GetWeek" "', expected argument " "3"" of type '" "wxDateTime::WeekDay""'"); - } - arg3 = static_cast< wxDateTime::WeekDay >(val3); - } - if (obj3) { - ecode4 = SWIG_AsVal_int(obj3, &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "DateTime_GetWeek" "', expected argument " "4"" of type '" "wxDateTime::WeekFlags""'"); - } - arg4 = static_cast< wxDateTime::WeekFlags >(val4); - } - { - PyThreadState* __tstate = wxPyBeginAllowThreads(); - result = (arg1)->GetWeek(arg2,arg3,arg4); - wxPyEndAllowThreads(__tstate); - if (PyErr_Occurred()) SWIG_fail; - } - resultobj = SWIG_NewPointerObj((new wxDateTime(static_cast< const wxDateTime& >(result))), SWIGTYPE_p_wxDateTime, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - SWIGINTERN PyObject *_wrap_DateTime_SetToWeekOfYear(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { PyObject *resultobj = 0; int arg1 ; @@ -36547,12 +36471,12 @@ SWIGINTERN PyObject *_wrap_Display_GetFromWindow(PyObject *SWIGUNUSEDPARM(self), if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:Display_GetFromWindow",kwnames,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_wxWindow, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Display_GetFromWindow" "', expected argument " "1"" of type '" "wxWindow *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Display_GetFromWindow" "', expected argument " "1"" of type '" "wxWindow const *""'"); } arg1 = reinterpret_cast< wxWindow * >(argp1); { PyThreadState* __tstate = wxPyBeginAllowThreads(); - result = (int)wxDisplay::GetFromWindow(arg1); + result = (int)wxDisplay::GetFromWindow((wxWindow const *)arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) SWIG_fail; } @@ -39198,11 +39122,9 @@ static PyMethodDef SwigMethods[] = { { (char *)"GetStockHelpString", (PyCFunction) _wrap_GetStockHelpString, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"Bell", (PyCFunction)_wrap_Bell, METH_NOARGS, NULL}, { (char *)"EndBusyCursor", (PyCFunction)_wrap_EndBusyCursor, METH_NOARGS, NULL}, - { (char *)"GetElapsedTime", (PyCFunction) _wrap_GetElapsedTime, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"IsBusy", (PyCFunction)_wrap_IsBusy, METH_NOARGS, NULL}, { (char *)"Now", (PyCFunction)_wrap_Now, METH_NOARGS, NULL}, { (char *)"Shell", (PyCFunction) _wrap_Shell, METH_VARARGS | METH_KEYWORDS, NULL}, - { (char *)"StartTimer", (PyCFunction)_wrap_StartTimer, METH_NOARGS, NULL}, { (char *)"GetOsVersion", (PyCFunction)_wrap_GetOsVersion, METH_NOARGS, NULL}, { (char *)"GetOsDescription", (PyCFunction)_wrap_GetOsDescription, METH_NOARGS, NULL}, { (char *)"IsPlatformLittleEndian", (PyCFunction)_wrap_IsPlatformLittleEndian, METH_NOARGS, NULL}, @@ -39720,6 +39642,8 @@ static PyMethodDef SwigMethods[] = { { (char *)"Config_swiginit", Config_swiginit, METH_VARARGS, NULL}, { (char *)"new_FileConfig", (PyCFunction) _wrap_new_FileConfig, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"delete_FileConfig", (PyCFunction)_wrap_delete_FileConfig, METH_O, NULL}, + { (char *)"FileConfig_GetGlobalFileName", (PyCFunction) _wrap_FileConfig_GetGlobalFileName, METH_VARARGS | METH_KEYWORDS, NULL}, + { (char *)"FileConfig_GetLocalFileName", (PyCFunction) _wrap_FileConfig_GetLocalFileName, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"FileConfig_swigregister", FileConfig_swigregister, METH_VARARGS, NULL}, { (char *)"FileConfig_swiginit", FileConfig_swiginit, METH_VARARGS, NULL}, { (char *)"new_ConfigPathChanger", (PyCFunction) _wrap_new_ConfigPathChanger, METH_VARARGS | METH_KEYWORDS, NULL}, @@ -39777,8 +39701,6 @@ static PyMethodDef SwigMethods[] = { { (char *)"DateTime_SetToWeekDay", (PyCFunction) _wrap_DateTime_SetToWeekDay, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"DateTime_SetToLastWeekDay", (PyCFunction) _wrap_DateTime_SetToLastWeekDay, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"DateTime_GetLastWeekDay", (PyCFunction) _wrap_DateTime_GetLastWeekDay, METH_VARARGS | METH_KEYWORDS, NULL}, - { (char *)"DateTime_SetToTheWeek", (PyCFunction) _wrap_DateTime_SetToTheWeek, METH_VARARGS | METH_KEYWORDS, NULL}, - { (char *)"DateTime_GetWeek", (PyCFunction) _wrap_DateTime_GetWeek, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"DateTime_SetToWeekOfYear", (PyCFunction) _wrap_DateTime_SetToWeekOfYear, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"DateTime_SetToLastMonthDay", (PyCFunction) _wrap_DateTime_SetToLastMonthDay, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"DateTime_GetLastMonthDay", (PyCFunction) _wrap_DateTime_GetLastMonthDay, METH_VARARGS | METH_KEYWORDS, NULL}, diff --git a/wxPython/src/gtk/_windows.py b/wxPython/src/gtk/_windows.py index 275d841160..3d04f82f7d 100644 --- a/wxPython/src/gtk/_windows.py +++ b/wxPython/src/gtk/_windows.py @@ -305,13 +305,11 @@ ICONIZE = _windows_.ICONIZE MINIMIZE = _windows_.MINIMIZE MAXIMIZE = _windows_.MAXIMIZE CLOSE_BOX = _windows_.CLOSE_BOX -THICK_FRAME = _windows_.THICK_FRAME SYSTEM_MENU = _windows_.SYSTEM_MENU MINIMIZE_BOX = _windows_.MINIMIZE_BOX MAXIMIZE_BOX = _windows_.MAXIMIZE_BOX TINY_CAPTION_HORIZ = _windows_.TINY_CAPTION_HORIZ TINY_CAPTION_VERT = _windows_.TINY_CAPTION_VERT -RESIZE_BOX = _windows_.RESIZE_BOX RESIZE_BORDER = _windows_.RESIZE_BORDER DIALOG_NO_PARENT = _windows_.DIALOG_NO_PARENT DEFAULT_FRAME_STYLE = _windows_.DEFAULT_FRAME_STYLE @@ -325,12 +323,18 @@ FRAME_DRAWER = _windows_.FRAME_DRAWER FRAME_EX_METAL = _windows_.FRAME_EX_METAL DIALOG_EX_METAL = _windows_.DIALOG_EX_METAL WS_EX_CONTEXTHELP = _windows_.WS_EX_CONTEXTHELP -DIALOG_MODAL = _windows_.DIALOG_MODAL -DIALOG_MODELESS = _windows_.DIALOG_MODELESS -USER_COLOURS = _windows_.USER_COLOURS -NO_3D = _windows_.NO_3D FRAME_EX_CONTEXTHELP = _windows_.FRAME_EX_CONTEXTHELP DIALOG_EX_CONTEXTHELP = _windows_.DIALOG_EX_CONTEXTHELP +# deprecated +RESIZE_BOX = MAXIMIZE_BOX +THICK_FRAME = RESIZE_BORDER + +# Obsolete +wxDIALOG_MODAL = 0 +wxDIALOG_MODELESS = 0 +wxUSER_COLOURS = 0 +wxNO_3D = 0 + FULLSCREEN_NOMENUBAR = _windows_.FULLSCREEN_NOMENUBAR FULLSCREEN_NOTOOLBAR = _windows_.FULLSCREEN_NOTOOLBAR FULLSCREEN_NOSTATUSBAR = _windows_.FULLSCREEN_NOSTATUSBAR @@ -1418,14 +1422,6 @@ class SashWindow(_core.Window): """GetSashVisible(self, int edge) -> bool""" return _windows_.SashWindow_GetSashVisible(*args, **kwargs) - def SetSashBorder(*args, **kwargs): - """SetSashBorder(self, int edge, bool border)""" - return _windows_.SashWindow_SetSashBorder(*args, **kwargs) - - def HasBorder(*args, **kwargs): - """HasBorder(self, int edge) -> bool""" - return _windows_.SashWindow_HasBorder(*args, **kwargs) - def GetEdgeMargin(*args, **kwargs): """GetEdgeMargin(self, int edge) -> int""" return _windows_.SashWindow_GetEdgeMargin(*args, **kwargs) @@ -2011,6 +2007,10 @@ class VListBox(VScrolledWindow): """SetSelectionBackground(self, Colour col)""" return _windows_.VListBox_SetSelectionBackground(*args, **kwargs) + def RefreshSelected(*args, **kwargs): + """RefreshSelected(self)""" + return _windows_.VListBox_RefreshSelected(*args, **kwargs) + def OnDrawSeparator(*args, **kwargs): """OnDrawSeparator(self, DC dc, Rect rect, size_t n)""" return _windows_.VListBox_OnDrawSeparator(*args, **kwargs) @@ -2305,9 +2305,10 @@ def GetColourFromUser(*args, **kwargs): String caption=EmptyString) -> Colour """ return _windows_.GetColourFromUser(*args, **kwargs) +DD_CHANGE_DIR = _windows_.DD_CHANGE_DIR +DD_DIR_MUST_EXIST = _windows_.DD_DIR_MUST_EXIST DD_NEW_DIR_BUTTON = _windows_.DD_NEW_DIR_BUTTON DD_DEFAULT_STYLE = _windows_.DD_DEFAULT_STYLE -DD_CHANGE_DIR = _windows_.DD_CHANGE_DIR class DirDialog(Dialog): """ wx.DirDialog allows the user to select a directory by browising the @@ -2363,13 +2364,6 @@ class DirDialog(Dialog): Path = property(GetPath,SetPath,doc="See `GetPath` and `SetPath`") _windows_.DirDialog_swigregister(DirDialog) -OPEN = _windows_.OPEN -SAVE = _windows_.SAVE -OVERWRITE_PROMPT = _windows_.OVERWRITE_PROMPT -FILE_MUST_EXIST = _windows_.FILE_MUST_EXIST -MULTIPLE = _windows_.MULTIPLE -CHANGE_DIR = _windows_.CHANGE_DIR -HIDE_READONLY = _windows_.HIDE_READONLY FD_OPEN = _windows_.FD_OPEN FD_SAVE = _windows_.FD_SAVE FD_OVERWRITE_PROMPT = _windows_.FD_OVERWRITE_PROMPT @@ -2378,6 +2372,14 @@ FD_MULTIPLE = _windows_.FD_MULTIPLE FD_CHANGE_DIR = _windows_.FD_CHANGE_DIR FD_PREVIEW = _windows_.FD_PREVIEW FD_DEFAULT_STYLE = _windows_.FD_DEFAULT_STYLE +# deprecated names +OPEN = FD_OPEN, +SAVE = FD_SAVE, +OVERWRITE_PROMPT = FD_OVERWRITE_PROMPT, +FILE_MUST_EXIST = FD_FILE_MUST_EXIST, +MULTIPLE = FD_MULTIPLE, +CHANGE_DIR = FD_CHANGE_DIR + class FileDialog(Dialog): """ wx.FileDialog allows the user to select one or more files from the diff --git a/wxPython/src/gtk/_windows_wrap.cpp b/wxPython/src/gtk/_windows_wrap.cpp index 597a971e6a..26732e0f98 100644 --- a/wxPython/src/gtk/_windows_wrap.cpp +++ b/wxPython/src/gtk/_windows_wrap.cpp @@ -11104,94 +11104,6 @@ fail: } -SWIGINTERN PyObject *_wrap_SashWindow_SetSashBorder(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - wxSashWindow *arg1 = (wxSashWindow *) 0 ; - wxSashEdgePosition arg2 ; - bool arg3 ; - void *argp1 = 0 ; - int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - bool val3 ; - int ecode3 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "edge",(char *) "border", NULL - }; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:SashWindow_SetSashBorder",kwnames,&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_wxSashWindow, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SashWindow_SetSashBorder" "', expected argument " "1"" of type '" "wxSashWindow *""'"); - } - arg1 = reinterpret_cast< wxSashWindow * >(argp1); - ecode2 = SWIG_AsVal_int(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SashWindow_SetSashBorder" "', expected argument " "2"" of type '" "wxSashEdgePosition""'"); - } - arg2 = static_cast< wxSashEdgePosition >(val2); - ecode3 = SWIG_AsVal_bool(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SashWindow_SetSashBorder" "', expected argument " "3"" of type '" "bool""'"); - } - arg3 = static_cast< bool >(val3); - { - PyThreadState* __tstate = wxPyBeginAllowThreads(); - (arg1)->SetSashBorder(arg2,arg3); - wxPyEndAllowThreads(__tstate); - if (PyErr_Occurred()) SWIG_fail; - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_SashWindow_HasBorder(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - wxSashWindow *arg1 = (wxSashWindow *) 0 ; - wxSashEdgePosition arg2 ; - bool result; - void *argp1 = 0 ; - int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "edge", NULL - }; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:SashWindow_HasBorder",kwnames,&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_wxSashWindow, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SashWindow_HasBorder" "', expected argument " "1"" of type '" "wxSashWindow const *""'"); - } - arg1 = reinterpret_cast< wxSashWindow * >(argp1); - ecode2 = SWIG_AsVal_int(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SashWindow_HasBorder" "', expected argument " "2"" of type '" "wxSashEdgePosition""'"); - } - arg2 = static_cast< wxSashEdgePosition >(val2); - { - PyThreadState* __tstate = wxPyBeginAllowThreads(); - result = (bool)((wxSashWindow const *)arg1)->HasBorder(arg2); - wxPyEndAllowThreads(__tstate); - if (PyErr_Occurred()) SWIG_fail; - } - { - resultobj = result ? Py_True : Py_False; Py_INCREF(resultobj); - } - return resultobj; -fail: - return NULL; -} - - SWIGINTERN PyObject *_wrap_SashWindow_GetEdgeMargin(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { PyObject *resultobj = 0; wxSashWindow *arg1 = (wxSashWindow *) 0 ; @@ -15433,6 +15345,33 @@ fail: } +SWIGINTERN PyObject *_wrap_VListBox_RefreshSelected(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + wxPyVListBox *arg1 = (wxPyVListBox *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_wxPyVListBox, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VListBox_RefreshSelected" "', expected argument " "1"" of type '" "wxPyVListBox *""'"); + } + arg1 = reinterpret_cast< wxPyVListBox * >(argp1); + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + (arg1)->RefreshSelected(); + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + SWIGINTERN PyObject *_wrap_VListBox_OnDrawSeparator(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { PyObject *resultobj = 0; wxPyVListBox *arg1 = (wxPyVListBox *) 0 ; @@ -31978,8 +31917,6 @@ static PyMethodDef SwigMethods[] = { { (char *)"SashWindow_Create", (PyCFunction) _wrap_SashWindow_Create, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"SashWindow_SetSashVisible", (PyCFunction) _wrap_SashWindow_SetSashVisible, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"SashWindow_GetSashVisible", (PyCFunction) _wrap_SashWindow_GetSashVisible, METH_VARARGS | METH_KEYWORDS, NULL}, - { (char *)"SashWindow_SetSashBorder", (PyCFunction) _wrap_SashWindow_SetSashBorder, METH_VARARGS | METH_KEYWORDS, NULL}, - { (char *)"SashWindow_HasBorder", (PyCFunction) _wrap_SashWindow_HasBorder, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"SashWindow_GetEdgeMargin", (PyCFunction) _wrap_SashWindow_GetEdgeMargin, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"SashWindow_SetDefaultBorderSize", (PyCFunction) _wrap_SashWindow_SetDefaultBorderSize, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"SashWindow_GetDefaultBorderSize", (PyCFunction)_wrap_SashWindow_GetDefaultBorderSize, METH_O, NULL}, @@ -32107,6 +32044,7 @@ static PyMethodDef SwigMethods[] = { { (char *)"VListBox_SetMargins", (PyCFunction) _wrap_VListBox_SetMargins, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"VListBox_SetMarginsXY", (PyCFunction) _wrap_VListBox_SetMarginsXY, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"VListBox_SetSelectionBackground", (PyCFunction) _wrap_VListBox_SetSelectionBackground, METH_VARARGS | METH_KEYWORDS, NULL}, + { (char *)"VListBox_RefreshSelected", (PyCFunction)_wrap_VListBox_RefreshSelected, METH_O, NULL}, { (char *)"VListBox_OnDrawSeparator", (PyCFunction) _wrap_VListBox_OnDrawSeparator, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"VListBox_OnDrawBackground", (PyCFunction) _wrap_VListBox_OnDrawBackground, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"VListBox_swigregister", VListBox_swigregister, METH_VARARGS, NULL}, @@ -34866,13 +34804,11 @@ SWIGEXPORT void SWIG_init(void) { SWIG_Python_SetConstant(d, "MINIMIZE",SWIG_From_int(static_cast< int >(wxMINIMIZE))); SWIG_Python_SetConstant(d, "MAXIMIZE",SWIG_From_int(static_cast< int >(wxMAXIMIZE))); SWIG_Python_SetConstant(d, "CLOSE_BOX",SWIG_From_int(static_cast< int >(wxCLOSE_BOX))); - SWIG_Python_SetConstant(d, "THICK_FRAME",SWIG_From_int(static_cast< int >(wxTHICK_FRAME))); SWIG_Python_SetConstant(d, "SYSTEM_MENU",SWIG_From_int(static_cast< int >(wxSYSTEM_MENU))); SWIG_Python_SetConstant(d, "MINIMIZE_BOX",SWIG_From_int(static_cast< int >(wxMINIMIZE_BOX))); SWIG_Python_SetConstant(d, "MAXIMIZE_BOX",SWIG_From_int(static_cast< int >(wxMAXIMIZE_BOX))); SWIG_Python_SetConstant(d, "TINY_CAPTION_HORIZ",SWIG_From_int(static_cast< int >(wxTINY_CAPTION_HORIZ))); SWIG_Python_SetConstant(d, "TINY_CAPTION_VERT",SWIG_From_int(static_cast< int >(wxTINY_CAPTION_VERT))); - SWIG_Python_SetConstant(d, "RESIZE_BOX",SWIG_From_int(static_cast< int >(wxRESIZE_BOX))); SWIG_Python_SetConstant(d, "RESIZE_BORDER",SWIG_From_int(static_cast< int >(wxRESIZE_BORDER))); SWIG_Python_SetConstant(d, "DIALOG_NO_PARENT",SWIG_From_int(static_cast< int >(wxDIALOG_NO_PARENT))); SWIG_Python_SetConstant(d, "DEFAULT_FRAME_STYLE",SWIG_From_int(static_cast< int >(wxDEFAULT_FRAME_STYLE))); @@ -34886,10 +34822,6 @@ SWIGEXPORT void SWIG_init(void) { SWIG_Python_SetConstant(d, "FRAME_EX_METAL",SWIG_From_int(static_cast< int >(wxFRAME_EX_METAL))); SWIG_Python_SetConstant(d, "DIALOG_EX_METAL",SWIG_From_int(static_cast< int >(wxDIALOG_EX_METAL))); SWIG_Python_SetConstant(d, "WS_EX_CONTEXTHELP",SWIG_From_int(static_cast< int >(wxWS_EX_CONTEXTHELP))); - SWIG_Python_SetConstant(d, "DIALOG_MODAL",SWIG_From_int(static_cast< int >(wxDIALOG_MODAL))); - SWIG_Python_SetConstant(d, "DIALOG_MODELESS",SWIG_From_int(static_cast< int >(wxDIALOG_MODELESS))); - SWIG_Python_SetConstant(d, "USER_COLOURS",SWIG_From_int(static_cast< int >(wxUSER_COLOURS))); - SWIG_Python_SetConstant(d, "NO_3D",SWIG_From_int(static_cast< int >(wxNO_3D))); SWIG_Python_SetConstant(d, "FRAME_EX_CONTEXTHELP",SWIG_From_int(static_cast< int >(wxFRAME_EX_CONTEXTHELP))); SWIG_Python_SetConstant(d, "DIALOG_EX_CONTEXTHELP",SWIG_From_int(static_cast< int >(wxDIALOG_EX_CONTEXTHELP))); SWIG_Python_SetConstant(d, "FULLSCREEN_NOMENUBAR",SWIG_From_int(static_cast< int >(wxFULLSCREEN_NOMENUBAR))); @@ -34985,16 +34917,10 @@ SWIGEXPORT void SWIG_init(void) { SWIG_addvarlink(SWIG_globals(),(char*)"FileSelectorDefaultWildcardStr",FileSelectorDefaultWildcardStr_get, FileSelectorDefaultWildcardStr_set); SWIG_addvarlink(SWIG_globals(),(char*)"GetTextFromUserPromptStr",GetTextFromUserPromptStr_get, GetTextFromUserPromptStr_set); SWIG_addvarlink(SWIG_globals(),(char*)"MessageBoxCaptionStr",MessageBoxCaptionStr_get, MessageBoxCaptionStr_set); + SWIG_Python_SetConstant(d, "DD_CHANGE_DIR",SWIG_From_int(static_cast< int >(wxDD_CHANGE_DIR))); + SWIG_Python_SetConstant(d, "DD_DIR_MUST_EXIST",SWIG_From_int(static_cast< int >(wxDD_DIR_MUST_EXIST))); SWIG_Python_SetConstant(d, "DD_NEW_DIR_BUTTON",SWIG_From_int(static_cast< int >(wxDD_NEW_DIR_BUTTON))); SWIG_Python_SetConstant(d, "DD_DEFAULT_STYLE",SWIG_From_int(static_cast< int >(wxDD_DEFAULT_STYLE))); - SWIG_Python_SetConstant(d, "DD_CHANGE_DIR",SWIG_From_int(static_cast< int >(wxDD_CHANGE_DIR))); - SWIG_Python_SetConstant(d, "OPEN",SWIG_From_int(static_cast< int >(wxOPEN))); - SWIG_Python_SetConstant(d, "SAVE",SWIG_From_int(static_cast< int >(wxSAVE))); - SWIG_Python_SetConstant(d, "OVERWRITE_PROMPT",SWIG_From_int(static_cast< int >(wxOVERWRITE_PROMPT))); - SWIG_Python_SetConstant(d, "FILE_MUST_EXIST",SWIG_From_int(static_cast< int >(wxFILE_MUST_EXIST))); - SWIG_Python_SetConstant(d, "MULTIPLE",SWIG_From_int(static_cast< int >(wxMULTIPLE))); - SWIG_Python_SetConstant(d, "CHANGE_DIR",SWIG_From_int(static_cast< int >(wxCHANGE_DIR))); - SWIG_Python_SetConstant(d, "HIDE_READONLY",SWIG_From_int(static_cast< int >(wxHIDE_READONLY))); SWIG_Python_SetConstant(d, "FD_OPEN",SWIG_From_int(static_cast< int >(wxFD_OPEN))); SWIG_Python_SetConstant(d, "FD_SAVE",SWIG_From_int(static_cast< int >(wxFD_SAVE))); SWIG_Python_SetConstant(d, "FD_OVERWRITE_PROMPT",SWIG_From_int(static_cast< int >(wxFD_OVERWRITE_PROMPT))); diff --git a/wxPython/src/gtk/aui.py b/wxPython/src/gtk/aui.py index 6c0cacb656..13e292c270 100644 --- a/wxPython/src/gtk/aui.py +++ b/wxPython/src/gtk/aui.py @@ -1495,10 +1495,6 @@ class AuiMDIParentFrame(_windows.Frame): """GetArtProvider(self) -> AuiTabArt""" return _aui.AuiMDIParentFrame_GetArtProvider(*args, **kwargs) - def GetNotebook(*args, **kwargs): - """GetNotebook(self) -> AuiNotebook""" - return _aui.AuiMDIParentFrame_GetNotebook(*args, **kwargs) - def GetWindowMenu(*args, **kwargs): """GetWindowMenu(self) -> Menu""" return _aui.AuiMDIParentFrame_GetWindowMenu(*args, **kwargs) @@ -1515,18 +1511,10 @@ class AuiMDIParentFrame(_windows.Frame): """ProcessEvent(self, Event event) -> bool""" return _aui.AuiMDIParentFrame_ProcessEvent(*args, **kwargs) - def GetActiveChild(*args, **kwargs): - """GetActiveChild(self) -> AuiMDIChildFrame""" - return _aui.AuiMDIParentFrame_GetActiveChild(*args, **kwargs) - def SetActiveChild(*args, **kwargs): """SetActiveChild(self, AuiMDIChildFrame pChildFrame)""" return _aui.AuiMDIParentFrame_SetActiveChild(*args, **kwargs) - def GetClientWindow(*args, **kwargs): - """GetClientWindow(self) -> AuiMDIClientWindow""" - return _aui.AuiMDIParentFrame_GetClientWindow(*args, **kwargs) - def OnCreateClient(*args, **kwargs): """OnCreateClient(self) -> AuiMDIClientWindow""" return _aui.AuiMDIParentFrame_OnCreateClient(*args, **kwargs) @@ -1551,6 +1539,18 @@ class AuiMDIParentFrame(_windows.Frame): """ActivatePrevious(self)""" return _aui.AuiMDIParentFrame_ActivatePrevious(*args, **kwargs) + def GetNotebook(*args, **kwargs): + """GetNotebook(self) -> AuiNotebook""" + return _aui.AuiMDIParentFrame_GetNotebook(*args, **kwargs) + + def GetActiveChild(*args, **kwargs): + """GetActiveChild(self) -> AuiMDIChildFrame""" + return _aui.AuiMDIParentFrame_GetActiveChild(*args, **kwargs) + + def GetClientWindow(*args, **kwargs): + """GetClientWindow(self) -> AuiMDIClientWindow""" + return _aui.AuiMDIParentFrame_GetClientWindow(*args, **kwargs) + _aui.AuiMDIParentFrame_swigregister(AuiMDIParentFrame) def PreAuiMDIParentFrame(*args, **kwargs): @@ -1719,8 +1719,18 @@ class PyAuiDockArt(AuiDefaultDockArt): methods to the Python methods implemented in the derived class. """ thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') - def __init__(self): raise AttributeError, "No constructor defined" __repr__ = _swig_repr + def __init__(self, *args, **kwargs): + """ + __init__(self) -> PyAuiDockArt + + This version of the `AuiDockArt` class has been instrumented to be + subclassable in Python and to reflect all calls to the C++ base class + methods to the Python methods implemented in the derived class. + """ + _aui.PyAuiDockArt_swiginit(self,_aui.new_PyAuiDockArt(*args, **kwargs)) + PyAuiDockArt._setCallbackInfo(self, self, PyAuiDockArt) + _aui.PyAuiDockArt_swigregister(PyAuiDockArt) class PyAuiTabArt(AuiDefaultTabArt): diff --git a/wxPython/src/gtk/aui_wrap.cpp b/wxPython/src/gtk/aui_wrap.cpp index e45e57f673..27926af981 100644 --- a/wxPython/src/gtk/aui_wrap.cpp +++ b/wxPython/src/gtk/aui_wrap.cpp @@ -2926,6 +2926,15 @@ SWIG_From_size_t (size_t value) return SWIG_From_unsigned_SS_long (static_cast< unsigned long >(value)); } +SWIGINTERN wxAuiNotebook *wxAuiMDIParentFrame__GetNotebook(wxAuiMDIParentFrame const *self){ + return self->GetNotebook(); + } +SWIGINTERN wxAuiMDIChildFrame *wxAuiMDIParentFrame__GetActiveChild(wxAuiMDIParentFrame const *self){ + return self->GetActiveChild(); + } +SWIGINTERN wxAuiMDIClientWindow *wxAuiMDIParentFrame__GetClientWindow(wxAuiMDIParentFrame const *self){ + return self->GetClientWindow(); + } // A wxDocArt class that knows how to forward virtuals to Python methods class wxPyAuiDockArt : public wxAuiDefaultDockArt @@ -16363,34 +16372,6 @@ fail: } -SWIGINTERN PyObject *_wrap_AuiMDIParentFrame_GetNotebook(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - wxAuiMDIParentFrame *arg1 = (wxAuiMDIParentFrame *) 0 ; - wxAuiNotebook *result = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_wxAuiMDIParentFrame, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AuiMDIParentFrame_GetNotebook" "', expected argument " "1"" of type '" "wxAuiMDIParentFrame const *""'"); - } - arg1 = reinterpret_cast< wxAuiMDIParentFrame * >(argp1); - { - PyThreadState* __tstate = wxPyBeginAllowThreads(); - result = (wxAuiNotebook *)((wxAuiMDIParentFrame const *)arg1)->GetNotebook(); - wxPyEndAllowThreads(__tstate); - if (PyErr_Occurred()) SWIG_fail; - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_wxAuiNotebook, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - SWIGINTERN PyObject *_wrap_AuiMDIParentFrame_GetWindowMenu(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; wxAuiMDIParentFrame *arg1 = (wxAuiMDIParentFrame *) 0 ; @@ -16541,34 +16522,6 @@ fail: } -SWIGINTERN PyObject *_wrap_AuiMDIParentFrame_GetActiveChild(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - wxAuiMDIParentFrame *arg1 = (wxAuiMDIParentFrame *) 0 ; - wxAuiMDIChildFrame *result = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_wxAuiMDIParentFrame, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AuiMDIParentFrame_GetActiveChild" "', expected argument " "1"" of type '" "wxAuiMDIParentFrame const *""'"); - } - arg1 = reinterpret_cast< wxAuiMDIParentFrame * >(argp1); - { - PyThreadState* __tstate = wxPyBeginAllowThreads(); - result = (wxAuiMDIChildFrame *)((wxAuiMDIParentFrame const *)arg1)->GetActiveChild(); - wxPyEndAllowThreads(__tstate); - if (PyErr_Occurred()) SWIG_fail; - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_wxAuiMDIChildFrame, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - SWIGINTERN PyObject *_wrap_AuiMDIParentFrame_SetActiveChild(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { PyObject *resultobj = 0; wxAuiMDIParentFrame *arg1 = (wxAuiMDIParentFrame *) 0 ; @@ -16607,34 +16560,6 @@ fail: } -SWIGINTERN PyObject *_wrap_AuiMDIParentFrame_GetClientWindow(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - wxAuiMDIParentFrame *arg1 = (wxAuiMDIParentFrame *) 0 ; - wxAuiMDIClientWindow *result = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_wxAuiMDIParentFrame, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AuiMDIParentFrame_GetClientWindow" "', expected argument " "1"" of type '" "wxAuiMDIParentFrame const *""'"); - } - arg1 = reinterpret_cast< wxAuiMDIParentFrame * >(argp1); - { - PyThreadState* __tstate = wxPyBeginAllowThreads(); - result = (wxAuiMDIClientWindow *)((wxAuiMDIParentFrame const *)arg1)->GetClientWindow(); - wxPyEndAllowThreads(__tstate); - if (PyErr_Occurred()) SWIG_fail; - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_wxAuiMDIClientWindow, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - SWIGINTERN PyObject *_wrap_AuiMDIParentFrame_OnCreateClient(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; wxAuiMDIParentFrame *arg1 = (wxAuiMDIParentFrame *) 0 ; @@ -16811,6 +16736,96 @@ fail: } +SWIGINTERN PyObject *_wrap_AuiMDIParentFrame_GetNotebook(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + wxAuiMDIParentFrame *arg1 = (wxAuiMDIParentFrame *) 0 ; + wxAuiNotebook *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_wxAuiMDIParentFrame, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AuiMDIParentFrame_GetNotebook" "', expected argument " "1"" of type '" "wxAuiMDIParentFrame const *""'"); + } + arg1 = reinterpret_cast< wxAuiMDIParentFrame * >(argp1); + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + result = (wxAuiNotebook *)wxAuiMDIParentFrame__GetNotebook((wxAuiMDIParentFrame const *)arg1); + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + { + resultobj = wxPyMake_wxObject(result, 0); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_AuiMDIParentFrame_GetActiveChild(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + wxAuiMDIParentFrame *arg1 = (wxAuiMDIParentFrame *) 0 ; + wxAuiMDIChildFrame *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_wxAuiMDIParentFrame, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AuiMDIParentFrame_GetActiveChild" "', expected argument " "1"" of type '" "wxAuiMDIParentFrame const *""'"); + } + arg1 = reinterpret_cast< wxAuiMDIParentFrame * >(argp1); + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + result = (wxAuiMDIChildFrame *)wxAuiMDIParentFrame__GetActiveChild((wxAuiMDIParentFrame const *)arg1); + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + { + resultobj = wxPyMake_wxObject(result, 0); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_AuiMDIParentFrame_GetClientWindow(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + wxAuiMDIParentFrame *arg1 = (wxAuiMDIParentFrame *) 0 ; + wxAuiMDIClientWindow *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_wxAuiMDIParentFrame, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AuiMDIParentFrame_GetClientWindow" "', expected argument " "1"" of type '" "wxAuiMDIParentFrame const *""'"); + } + arg1 = reinterpret_cast< wxAuiMDIParentFrame * >(argp1); + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + result = (wxAuiMDIClientWindow *)wxAuiMDIParentFrame__GetClientWindow((wxAuiMDIParentFrame const *)arg1); + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + { + resultobj = wxPyMake_wxObject(result, 0); + } + return resultobj; +fail: + return NULL; +} + + SWIGINTERN PyObject *AuiMDIParentFrame_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; if (!SWIG_Python_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return NULL; @@ -18146,6 +18161,24 @@ SWIGINTERN PyObject *AuiMDIClientWindow_swiginit(PyObject *SWIGUNUSEDPARM(self), return SWIG_Python_InitShadowInstance(args); } +SWIGINTERN PyObject *_wrap_new_PyAuiDockArt(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + wxPyAuiDockArt *result = 0 ; + + if (!SWIG_Python_UnpackTuple(args,"new_PyAuiDockArt",0,0,0)) SWIG_fail; + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + result = (wxPyAuiDockArt *)new wxPyAuiDockArt(); + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_wxPyAuiDockArt, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + SWIGINTERN PyObject *PyAuiDockArt_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; if (!SWIG_Python_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return NULL; @@ -18153,6 +18186,10 @@ SWIGINTERN PyObject *PyAuiDockArt_swigregister(PyObject *SWIGUNUSEDPARM(self), P return SWIG_Py_Void(); } +SWIGINTERN PyObject *PyAuiDockArt_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} + SWIGINTERN PyObject *_wrap_new_PyAuiTabArt(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; wxPyAuiTabArt *result = 0 ; @@ -18563,20 +18600,20 @@ static PyMethodDef SwigMethods[] = { { (char *)"AuiMDIParentFrame_Create", (PyCFunction) _wrap_AuiMDIParentFrame_Create, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"AuiMDIParentFrame_SetArtProvider", (PyCFunction) _wrap_AuiMDIParentFrame_SetArtProvider, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"AuiMDIParentFrame_GetArtProvider", (PyCFunction)_wrap_AuiMDIParentFrame_GetArtProvider, METH_O, NULL}, - { (char *)"AuiMDIParentFrame_GetNotebook", (PyCFunction)_wrap_AuiMDIParentFrame_GetNotebook, METH_O, NULL}, { (char *)"AuiMDIParentFrame_GetWindowMenu", (PyCFunction)_wrap_AuiMDIParentFrame_GetWindowMenu, METH_O, NULL}, { (char *)"AuiMDIParentFrame_SetWindowMenu", (PyCFunction) _wrap_AuiMDIParentFrame_SetWindowMenu, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"AuiMDIParentFrame_SetChildMenuBar", (PyCFunction) _wrap_AuiMDIParentFrame_SetChildMenuBar, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"AuiMDIParentFrame_ProcessEvent", (PyCFunction) _wrap_AuiMDIParentFrame_ProcessEvent, METH_VARARGS | METH_KEYWORDS, NULL}, - { (char *)"AuiMDIParentFrame_GetActiveChild", (PyCFunction)_wrap_AuiMDIParentFrame_GetActiveChild, METH_O, NULL}, { (char *)"AuiMDIParentFrame_SetActiveChild", (PyCFunction) _wrap_AuiMDIParentFrame_SetActiveChild, METH_VARARGS | METH_KEYWORDS, NULL}, - { (char *)"AuiMDIParentFrame_GetClientWindow", (PyCFunction)_wrap_AuiMDIParentFrame_GetClientWindow, METH_O, NULL}, { (char *)"AuiMDIParentFrame_OnCreateClient", (PyCFunction)_wrap_AuiMDIParentFrame_OnCreateClient, METH_O, NULL}, { (char *)"AuiMDIParentFrame_Cascade", (PyCFunction)_wrap_AuiMDIParentFrame_Cascade, METH_O, NULL}, { (char *)"AuiMDIParentFrame_Tile", (PyCFunction) _wrap_AuiMDIParentFrame_Tile, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"AuiMDIParentFrame_ArrangeIcons", (PyCFunction)_wrap_AuiMDIParentFrame_ArrangeIcons, METH_O, NULL}, { (char *)"AuiMDIParentFrame_ActivateNext", (PyCFunction)_wrap_AuiMDIParentFrame_ActivateNext, METH_O, NULL}, { (char *)"AuiMDIParentFrame_ActivatePrevious", (PyCFunction)_wrap_AuiMDIParentFrame_ActivatePrevious, METH_O, NULL}, + { (char *)"AuiMDIParentFrame_GetNotebook", (PyCFunction)_wrap_AuiMDIParentFrame_GetNotebook, METH_O, NULL}, + { (char *)"AuiMDIParentFrame_GetActiveChild", (PyCFunction)_wrap_AuiMDIParentFrame_GetActiveChild, METH_O, NULL}, + { (char *)"AuiMDIParentFrame_GetClientWindow", (PyCFunction)_wrap_AuiMDIParentFrame_GetClientWindow, METH_O, NULL}, { (char *)"AuiMDIParentFrame_swigregister", AuiMDIParentFrame_swigregister, METH_VARARGS, NULL}, { (char *)"AuiMDIParentFrame_swiginit", AuiMDIParentFrame_swiginit, METH_VARARGS, NULL}, { (char *)"new_PreAuiMDIChildFrame", (PyCFunction)_wrap_new_PreAuiMDIChildFrame, METH_NOARGS, NULL}, @@ -18614,7 +18651,9 @@ static PyMethodDef SwigMethods[] = { { (char *)"AuiMDIClientWindow_SetSelection", (PyCFunction) _wrap_AuiMDIClientWindow_SetSelection, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"AuiMDIClientWindow_swigregister", AuiMDIClientWindow_swigregister, METH_VARARGS, NULL}, { (char *)"AuiMDIClientWindow_swiginit", AuiMDIClientWindow_swiginit, METH_VARARGS, NULL}, + { (char *)"new_PyAuiDockArt", (PyCFunction)_wrap_new_PyAuiDockArt, METH_NOARGS, NULL}, { (char *)"PyAuiDockArt_swigregister", PyAuiDockArt_swigregister, METH_VARARGS, NULL}, + { (char *)"PyAuiDockArt_swiginit", PyAuiDockArt_swiginit, METH_VARARGS, NULL}, { (char *)"new_PyAuiTabArt", (PyCFunction)_wrap_new_PyAuiTabArt, METH_NOARGS, NULL}, { (char *)"PyAuiTabArt_swigregister", PyAuiTabArt_swigregister, METH_VARARGS, NULL}, { (char *)"PyAuiTabArt_swiginit", PyAuiTabArt_swiginit, METH_VARARGS, NULL}, diff --git a/wxPython/src/gtk/combo.py b/wxPython/src/gtk/combo.py index c9ed717e85..17854ae6d5 100644 --- a/wxPython/src/gtk/combo.py +++ b/wxPython/src/gtk/combo.py @@ -65,6 +65,9 @@ __docfilter__ = wx.__DocFilter(globals()) CC_BUTTON_OUTSIDE_BORDER = _combo.CC_BUTTON_OUTSIDE_BORDER CC_POPUP_ON_MOUSE_UP = _combo.CC_POPUP_ON_MOUSE_UP CC_NO_TEXT_AUTO_SELECT = _combo.CC_NO_TEXT_AUTO_SELECT +CC_BUTTON_STAYS_DOWN = _combo.CC_BUTTON_STAYS_DOWN +CC_FULL_BUTTON = _combo.CC_FULL_BUTTON +CC_BUTTON_COVERS_BORDER = _combo.CC_BUTTON_COVERS_BORDER CC_MF_ON_BUTTON = _combo.CC_MF_ON_BUTTON CC_MF_ON_CLICK_AREA = _combo.CC_MF_ON_CLICK_AREA class ComboCtrlFeatures(object): diff --git a/wxPython/src/gtk/combo_wrap.cpp b/wxPython/src/gtk/combo_wrap.cpp index a3a110403a..acf80f4a2b 100644 --- a/wxPython/src/gtk/combo_wrap.cpp +++ b/wxPython/src/gtk/combo_wrap.cpp @@ -9335,6 +9335,9 @@ SWIGEXPORT void SWIG_init(void) { SWIG_Python_SetConstant(d, "CC_BUTTON_OUTSIDE_BORDER",SWIG_From_int(static_cast< int >(wxCC_BUTTON_OUTSIDE_BORDER))); SWIG_Python_SetConstant(d, "CC_POPUP_ON_MOUSE_UP",SWIG_From_int(static_cast< int >(wxCC_POPUP_ON_MOUSE_UP))); SWIG_Python_SetConstant(d, "CC_NO_TEXT_AUTO_SELECT",SWIG_From_int(static_cast< int >(wxCC_NO_TEXT_AUTO_SELECT))); + SWIG_Python_SetConstant(d, "CC_BUTTON_STAYS_DOWN",SWIG_From_int(static_cast< int >(wxCC_BUTTON_STAYS_DOWN))); + SWIG_Python_SetConstant(d, "CC_FULL_BUTTON",SWIG_From_int(static_cast< int >(wxCC_FULL_BUTTON))); + SWIG_Python_SetConstant(d, "CC_BUTTON_COVERS_BORDER",SWIG_From_int(static_cast< int >(wxCC_BUTTON_COVERS_BORDER))); SWIG_Python_SetConstant(d, "CC_MF_ON_BUTTON",SWIG_From_int(static_cast< int >(wxCC_MF_ON_BUTTON))); SWIG_Python_SetConstant(d, "CC_MF_ON_CLICK_AREA",SWIG_From_int(static_cast< int >(wxCC_MF_ON_CLICK_AREA))); SWIG_Python_SetConstant(d, "ComboCtrlFeatures_MovableButton",SWIG_From_int(static_cast< int >(wxComboCtrlFeatures::MovableButton))); diff --git a/wxPython/src/gtk/grid.py b/wxPython/src/gtk/grid.py index 2c4c942c79..1e70f0dedd 100644 --- a/wxPython/src/gtk/grid.py +++ b/wxPython/src/gtk/grid.py @@ -68,6 +68,9 @@ GRID_VALUE_TEXT = _grid.GRID_VALUE_TEXT GRID_VALUE_LONG = _grid.GRID_VALUE_LONG GRID_VALUE_CHOICEINT = _grid.GRID_VALUE_CHOICEINT GRID_VALUE_DATETIME = _grid.GRID_VALUE_DATETIME +GRID_AUTOSIZE = _grid.GRID_AUTOSIZE +GRID_COLUMN = _grid.GRID_COLUMN +GRID_ROW = _grid.GRID_ROW GRID_DEFAULT_NUMBER_ROWS = _grid.GRID_DEFAULT_NUMBER_ROWS GRID_DEFAULT_NUMBER_COLS = _grid.GRID_DEFAULT_NUMBER_COLS GRID_DEFAULT_ROW_HEIGHT = _grid.GRID_DEFAULT_ROW_HEIGHT @@ -2094,6 +2097,21 @@ def Grid_GetClassDefaultAttributes(*args, **kwargs): """ return _grid.Grid_GetClassDefaultAttributes(*args, **kwargs) +class GridUpdateLocker(object): + """Proxy of C++ GridUpdateLocker class""" + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + __repr__ = _swig_repr + def __init__(self, *args, **kwargs): + """__init__(self, Grid grid=None) -> GridUpdateLocker""" + _grid.GridUpdateLocker_swiginit(self,_grid.new_GridUpdateLocker(*args, **kwargs)) + __swig_destroy__ = _grid.delete_GridUpdateLocker + __del__ = lambda self : None; + def Create(*args, **kwargs): + """Create(self, Grid grid)""" + return _grid.GridUpdateLocker_Create(*args, **kwargs) + +_grid.GridUpdateLocker_swigregister(GridUpdateLocker) + class GridEvent(_core.NotifyEvent): """Proxy of C++ GridEvent class""" thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') diff --git a/wxPython/src/gtk/grid_wrap.cpp b/wxPython/src/gtk/grid_wrap.cpp index fda9acf726..0264e7eb24 100644 --- a/wxPython/src/gtk/grid_wrap.cpp +++ b/wxPython/src/gtk/grid_wrap.cpp @@ -2543,122 +2543,123 @@ SWIG_Python_MustGetPtr(PyObject *obj, swig_type_info *ty, int argnum, int flags) #define SWIGTYPE_p_wxGridStringTable swig_types[77] #define SWIGTYPE_p_wxGridTableBase swig_types[78] #define SWIGTYPE_p_wxGridTableMessage swig_types[79] -#define SWIGTYPE_p_wxICOHandler swig_types[80] -#define SWIGTYPE_p_wxIconizeEvent swig_types[81] -#define SWIGTYPE_p_wxIdleEvent swig_types[82] -#define SWIGTYPE_p_wxImage swig_types[83] -#define SWIGTYPE_p_wxImageHandler swig_types[84] -#define SWIGTYPE_p_wxIndividualLayoutConstraint swig_types[85] -#define SWIGTYPE_p_wxInitDialogEvent swig_types[86] -#define SWIGTYPE_p_wxJPEGHandler swig_types[87] -#define SWIGTYPE_p_wxKeyEvent swig_types[88] -#define SWIGTYPE_p_wxLayoutAlgorithm swig_types[89] -#define SWIGTYPE_p_wxLayoutConstraints swig_types[90] -#define SWIGTYPE_p_wxMDIChildFrame swig_types[91] -#define SWIGTYPE_p_wxMDIClientWindow swig_types[92] -#define SWIGTYPE_p_wxMDIParentFrame swig_types[93] -#define SWIGTYPE_p_wxMaximizeEvent swig_types[94] -#define SWIGTYPE_p_wxMenu swig_types[95] -#define SWIGTYPE_p_wxMenuBar swig_types[96] -#define SWIGTYPE_p_wxMenuEvent swig_types[97] -#define SWIGTYPE_p_wxMenuItem swig_types[98] -#define SWIGTYPE_p_wxMessageDialog swig_types[99] -#define SWIGTYPE_p_wxMiniFrame swig_types[100] -#define SWIGTYPE_p_wxMouseCaptureChangedEvent swig_types[101] -#define SWIGTYPE_p_wxMouseCaptureLostEvent swig_types[102] -#define SWIGTYPE_p_wxMouseEvent swig_types[103] -#define SWIGTYPE_p_wxMoveEvent swig_types[104] -#define SWIGTYPE_p_wxMultiChoiceDialog swig_types[105] -#define SWIGTYPE_p_wxNavigationKeyEvent swig_types[106] -#define SWIGTYPE_p_wxNcPaintEvent swig_types[107] -#define SWIGTYPE_p_wxNotifyEvent swig_types[108] -#define SWIGTYPE_p_wxNumberEntryDialog swig_types[109] -#define SWIGTYPE_p_wxObject swig_types[110] -#define SWIGTYPE_p_wxPCXHandler swig_types[111] -#define SWIGTYPE_p_wxPNGHandler swig_types[112] -#define SWIGTYPE_p_wxPNMHandler swig_types[113] -#define SWIGTYPE_p_wxPageSetupDialog swig_types[114] -#define SWIGTYPE_p_wxPageSetupDialogData swig_types[115] -#define SWIGTYPE_p_wxPaintEvent swig_types[116] -#define SWIGTYPE_p_wxPaletteChangedEvent swig_types[117] -#define SWIGTYPE_p_wxPanel swig_types[118] -#define SWIGTYPE_p_wxPaperSize swig_types[119] -#define SWIGTYPE_p_wxPasswordEntryDialog swig_types[120] -#define SWIGTYPE_p_wxPen swig_types[121] -#define SWIGTYPE_p_wxPoint swig_types[122] -#define SWIGTYPE_p_wxPopupWindow swig_types[123] -#define SWIGTYPE_p_wxPreviewCanvas swig_types[124] -#define SWIGTYPE_p_wxPreviewControlBar swig_types[125] -#define SWIGTYPE_p_wxPreviewFrame swig_types[126] -#define SWIGTYPE_p_wxPrintData swig_types[127] -#define SWIGTYPE_p_wxPrintDialog swig_types[128] -#define SWIGTYPE_p_wxPrintDialogData swig_types[129] -#define SWIGTYPE_p_wxPrintPreview swig_types[130] -#define SWIGTYPE_p_wxPrinter swig_types[131] -#define SWIGTYPE_p_wxProgressDialog swig_types[132] -#define SWIGTYPE_p_wxPyApp swig_types[133] -#define SWIGTYPE_p_wxPyCommandEvent swig_types[134] -#define SWIGTYPE_p_wxPyEvent swig_types[135] -#define SWIGTYPE_p_wxPyGridCellAttrProvider swig_types[136] -#define SWIGTYPE_p_wxPyGridCellEditor swig_types[137] -#define SWIGTYPE_p_wxPyGridCellRenderer swig_types[138] -#define SWIGTYPE_p_wxPyGridTableBase swig_types[139] -#define SWIGTYPE_p_wxPyHtmlListBox swig_types[140] -#define SWIGTYPE_p_wxPyImageHandler swig_types[141] -#define SWIGTYPE_p_wxPyPanel swig_types[142] -#define SWIGTYPE_p_wxPyPopupTransientWindow swig_types[143] -#define SWIGTYPE_p_wxPyPreviewControlBar swig_types[144] -#define SWIGTYPE_p_wxPyPreviewFrame swig_types[145] -#define SWIGTYPE_p_wxPyPrintPreview swig_types[146] -#define SWIGTYPE_p_wxPyPrintout swig_types[147] -#define SWIGTYPE_p_wxPyScrolledWindow swig_types[148] -#define SWIGTYPE_p_wxPySizer swig_types[149] -#define SWIGTYPE_p_wxPyTaskBarIcon swig_types[150] -#define SWIGTYPE_p_wxPyVListBox swig_types[151] -#define SWIGTYPE_p_wxPyVScrolledWindow swig_types[152] -#define SWIGTYPE_p_wxPyValidator swig_types[153] -#define SWIGTYPE_p_wxPyWindow swig_types[154] -#define SWIGTYPE_p_wxQueryLayoutInfoEvent swig_types[155] -#define SWIGTYPE_p_wxQueryNewPaletteEvent swig_types[156] -#define SWIGTYPE_p_wxRect swig_types[157] -#define SWIGTYPE_p_wxSashEvent swig_types[158] -#define SWIGTYPE_p_wxSashLayoutWindow swig_types[159] -#define SWIGTYPE_p_wxSashWindow swig_types[160] -#define SWIGTYPE_p_wxScrollEvent swig_types[161] -#define SWIGTYPE_p_wxScrollWinEvent swig_types[162] -#define SWIGTYPE_p_wxScrolledWindow swig_types[163] -#define SWIGTYPE_p_wxSetCursorEvent swig_types[164] -#define SWIGTYPE_p_wxShowEvent swig_types[165] -#define SWIGTYPE_p_wxSimpleHtmlListBox swig_types[166] -#define SWIGTYPE_p_wxSingleChoiceDialog swig_types[167] -#define SWIGTYPE_p_wxSize swig_types[168] -#define SWIGTYPE_p_wxSizeEvent swig_types[169] -#define SWIGTYPE_p_wxSizer swig_types[170] -#define SWIGTYPE_p_wxSizerItem swig_types[171] -#define SWIGTYPE_p_wxSplashScreen swig_types[172] -#define SWIGTYPE_p_wxSplashScreenWindow swig_types[173] -#define SWIGTYPE_p_wxSplitterEvent swig_types[174] -#define SWIGTYPE_p_wxSplitterWindow swig_types[175] -#define SWIGTYPE_p_wxStaticBoxSizer swig_types[176] -#define SWIGTYPE_p_wxStatusBar swig_types[177] -#define SWIGTYPE_p_wxStdDialogButtonSizer swig_types[178] -#define SWIGTYPE_p_wxString swig_types[179] -#define SWIGTYPE_p_wxSysColourChangedEvent swig_types[180] -#define SWIGTYPE_p_wxTGAHandler swig_types[181] -#define SWIGTYPE_p_wxTIFFHandler swig_types[182] -#define SWIGTYPE_p_wxTaskBarIconEvent swig_types[183] -#define SWIGTYPE_p_wxTextEntryDialog swig_types[184] -#define SWIGTYPE_p_wxTipWindow swig_types[185] -#define SWIGTYPE_p_wxTopLevelWindow swig_types[186] -#define SWIGTYPE_p_wxUpdateUIEvent swig_types[187] -#define SWIGTYPE_p_wxValidator swig_types[188] -#define SWIGTYPE_p_wxVisualAttributes swig_types[189] -#define SWIGTYPE_p_wxWindow swig_types[190] -#define SWIGTYPE_p_wxWindowCreateEvent swig_types[191] -#define SWIGTYPE_p_wxWindowDestroyEvent swig_types[192] -#define SWIGTYPE_p_wxXPMHandler swig_types[193] -static swig_type_info *swig_types[195]; -static swig_module_info swig_module = {swig_types, 194, 0, 0, 0, 0}; +#define SWIGTYPE_p_wxGridUpdateLocker swig_types[80] +#define SWIGTYPE_p_wxICOHandler swig_types[81] +#define SWIGTYPE_p_wxIconizeEvent swig_types[82] +#define SWIGTYPE_p_wxIdleEvent swig_types[83] +#define SWIGTYPE_p_wxImage swig_types[84] +#define SWIGTYPE_p_wxImageHandler swig_types[85] +#define SWIGTYPE_p_wxIndividualLayoutConstraint swig_types[86] +#define SWIGTYPE_p_wxInitDialogEvent swig_types[87] +#define SWIGTYPE_p_wxJPEGHandler swig_types[88] +#define SWIGTYPE_p_wxKeyEvent swig_types[89] +#define SWIGTYPE_p_wxLayoutAlgorithm swig_types[90] +#define SWIGTYPE_p_wxLayoutConstraints swig_types[91] +#define SWIGTYPE_p_wxMDIChildFrame swig_types[92] +#define SWIGTYPE_p_wxMDIClientWindow swig_types[93] +#define SWIGTYPE_p_wxMDIParentFrame swig_types[94] +#define SWIGTYPE_p_wxMaximizeEvent swig_types[95] +#define SWIGTYPE_p_wxMenu swig_types[96] +#define SWIGTYPE_p_wxMenuBar swig_types[97] +#define SWIGTYPE_p_wxMenuEvent swig_types[98] +#define SWIGTYPE_p_wxMenuItem swig_types[99] +#define SWIGTYPE_p_wxMessageDialog swig_types[100] +#define SWIGTYPE_p_wxMiniFrame swig_types[101] +#define SWIGTYPE_p_wxMouseCaptureChangedEvent swig_types[102] +#define SWIGTYPE_p_wxMouseCaptureLostEvent swig_types[103] +#define SWIGTYPE_p_wxMouseEvent swig_types[104] +#define SWIGTYPE_p_wxMoveEvent swig_types[105] +#define SWIGTYPE_p_wxMultiChoiceDialog swig_types[106] +#define SWIGTYPE_p_wxNavigationKeyEvent swig_types[107] +#define SWIGTYPE_p_wxNcPaintEvent swig_types[108] +#define SWIGTYPE_p_wxNotifyEvent swig_types[109] +#define SWIGTYPE_p_wxNumberEntryDialog swig_types[110] +#define SWIGTYPE_p_wxObject swig_types[111] +#define SWIGTYPE_p_wxPCXHandler swig_types[112] +#define SWIGTYPE_p_wxPNGHandler swig_types[113] +#define SWIGTYPE_p_wxPNMHandler swig_types[114] +#define SWIGTYPE_p_wxPageSetupDialog swig_types[115] +#define SWIGTYPE_p_wxPageSetupDialogData swig_types[116] +#define SWIGTYPE_p_wxPaintEvent swig_types[117] +#define SWIGTYPE_p_wxPaletteChangedEvent swig_types[118] +#define SWIGTYPE_p_wxPanel swig_types[119] +#define SWIGTYPE_p_wxPaperSize swig_types[120] +#define SWIGTYPE_p_wxPasswordEntryDialog swig_types[121] +#define SWIGTYPE_p_wxPen swig_types[122] +#define SWIGTYPE_p_wxPoint swig_types[123] +#define SWIGTYPE_p_wxPopupWindow swig_types[124] +#define SWIGTYPE_p_wxPreviewCanvas swig_types[125] +#define SWIGTYPE_p_wxPreviewControlBar swig_types[126] +#define SWIGTYPE_p_wxPreviewFrame swig_types[127] +#define SWIGTYPE_p_wxPrintData swig_types[128] +#define SWIGTYPE_p_wxPrintDialog swig_types[129] +#define SWIGTYPE_p_wxPrintDialogData swig_types[130] +#define SWIGTYPE_p_wxPrintPreview swig_types[131] +#define SWIGTYPE_p_wxPrinter swig_types[132] +#define SWIGTYPE_p_wxProgressDialog swig_types[133] +#define SWIGTYPE_p_wxPyApp swig_types[134] +#define SWIGTYPE_p_wxPyCommandEvent swig_types[135] +#define SWIGTYPE_p_wxPyEvent swig_types[136] +#define SWIGTYPE_p_wxPyGridCellAttrProvider swig_types[137] +#define SWIGTYPE_p_wxPyGridCellEditor swig_types[138] +#define SWIGTYPE_p_wxPyGridCellRenderer swig_types[139] +#define SWIGTYPE_p_wxPyGridTableBase swig_types[140] +#define SWIGTYPE_p_wxPyHtmlListBox swig_types[141] +#define SWIGTYPE_p_wxPyImageHandler swig_types[142] +#define SWIGTYPE_p_wxPyPanel swig_types[143] +#define SWIGTYPE_p_wxPyPopupTransientWindow swig_types[144] +#define SWIGTYPE_p_wxPyPreviewControlBar swig_types[145] +#define SWIGTYPE_p_wxPyPreviewFrame swig_types[146] +#define SWIGTYPE_p_wxPyPrintPreview swig_types[147] +#define SWIGTYPE_p_wxPyPrintout swig_types[148] +#define SWIGTYPE_p_wxPyScrolledWindow swig_types[149] +#define SWIGTYPE_p_wxPySizer swig_types[150] +#define SWIGTYPE_p_wxPyTaskBarIcon swig_types[151] +#define SWIGTYPE_p_wxPyVListBox swig_types[152] +#define SWIGTYPE_p_wxPyVScrolledWindow swig_types[153] +#define SWIGTYPE_p_wxPyValidator swig_types[154] +#define SWIGTYPE_p_wxPyWindow swig_types[155] +#define SWIGTYPE_p_wxQueryLayoutInfoEvent swig_types[156] +#define SWIGTYPE_p_wxQueryNewPaletteEvent swig_types[157] +#define SWIGTYPE_p_wxRect swig_types[158] +#define SWIGTYPE_p_wxSashEvent swig_types[159] +#define SWIGTYPE_p_wxSashLayoutWindow swig_types[160] +#define SWIGTYPE_p_wxSashWindow swig_types[161] +#define SWIGTYPE_p_wxScrollEvent swig_types[162] +#define SWIGTYPE_p_wxScrollWinEvent swig_types[163] +#define SWIGTYPE_p_wxScrolledWindow swig_types[164] +#define SWIGTYPE_p_wxSetCursorEvent swig_types[165] +#define SWIGTYPE_p_wxShowEvent swig_types[166] +#define SWIGTYPE_p_wxSimpleHtmlListBox swig_types[167] +#define SWIGTYPE_p_wxSingleChoiceDialog swig_types[168] +#define SWIGTYPE_p_wxSize swig_types[169] +#define SWIGTYPE_p_wxSizeEvent swig_types[170] +#define SWIGTYPE_p_wxSizer swig_types[171] +#define SWIGTYPE_p_wxSizerItem swig_types[172] +#define SWIGTYPE_p_wxSplashScreen swig_types[173] +#define SWIGTYPE_p_wxSplashScreenWindow swig_types[174] +#define SWIGTYPE_p_wxSplitterEvent swig_types[175] +#define SWIGTYPE_p_wxSplitterWindow swig_types[176] +#define SWIGTYPE_p_wxStaticBoxSizer swig_types[177] +#define SWIGTYPE_p_wxStatusBar swig_types[178] +#define SWIGTYPE_p_wxStdDialogButtonSizer swig_types[179] +#define SWIGTYPE_p_wxString swig_types[180] +#define SWIGTYPE_p_wxSysColourChangedEvent swig_types[181] +#define SWIGTYPE_p_wxTGAHandler swig_types[182] +#define SWIGTYPE_p_wxTIFFHandler swig_types[183] +#define SWIGTYPE_p_wxTaskBarIconEvent swig_types[184] +#define SWIGTYPE_p_wxTextEntryDialog swig_types[185] +#define SWIGTYPE_p_wxTipWindow swig_types[186] +#define SWIGTYPE_p_wxTopLevelWindow swig_types[187] +#define SWIGTYPE_p_wxUpdateUIEvent swig_types[188] +#define SWIGTYPE_p_wxValidator swig_types[189] +#define SWIGTYPE_p_wxVisualAttributes swig_types[190] +#define SWIGTYPE_p_wxWindow swig_types[191] +#define SWIGTYPE_p_wxWindowCreateEvent swig_types[192] +#define SWIGTYPE_p_wxWindowDestroyEvent swig_types[193] +#define SWIGTYPE_p_wxXPMHandler swig_types[194] +static swig_type_info *swig_types[196]; +static swig_module_info swig_module = {swig_types, 195, 0, 0, 0, 0}; #define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name) #define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name) @@ -3186,6 +3187,16 @@ SWIG_FromCharPtr(const char *cptr) } + #define SWIG_From_long PyInt_FromLong + + +SWIGINTERNINLINE PyObject * +SWIG_From_int (int value) +{ + return SWIG_From_long (value); +} + + #define wxGRID_DEFAULT_NUMBER_ROWS WXGRID_DEFAULT_NUMBER_ROWS #define wxGRID_DEFAULT_NUMBER_COLS WXGRID_DEFAULT_NUMBER_COLS #define wxGRID_DEFAULT_ROW_HEIGHT WXGRID_DEFAULT_ROW_HEIGHT @@ -3197,16 +3208,6 @@ SWIG_FromCharPtr(const char *cptr) #define wxGRID_MIN_COL_WIDTH WXGRID_MIN_COL_WIDTH #define wxGRID_DEFAULT_SCROLLBAR_WIDTH WXGRID_DEFAULT_SCROLLBAR_WIDTH - - #define SWIG_From_long PyInt_FromLong - - -SWIGINTERNINLINE PyObject * -SWIG_From_int (int value) -{ - return SWIG_From_long (value); -} - SWIGINTERN void wxGridCellWorker__setOORInfo(wxGridCellWorker *self,PyObject *_self){ if (!self->GetClientObject()) self->SetClientObject(new wxPyOORClientData(_self)); @@ -19096,6 +19097,115 @@ SWIGINTERN PyObject *Grid_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *arg return SWIG_Python_InitShadowInstance(args); } +SWIGINTERN PyObject *_wrap_new_GridUpdateLocker(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + wxGrid *arg1 = (wxGrid *) NULL ; + wxGridUpdateLocker *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + char * kwnames[] = { + (char *) "grid", NULL + }; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"|O:new_GridUpdateLocker",kwnames,&obj0)) SWIG_fail; + if (obj0) { + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_wxGrid, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_GridUpdateLocker" "', expected argument " "1"" of type '" "wxGrid *""'"); + } + arg1 = reinterpret_cast< wxGrid * >(argp1); + } + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + result = (wxGridUpdateLocker *)new wxGridUpdateLocker(arg1); + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_wxGridUpdateLocker, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_GridUpdateLocker(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + wxGridUpdateLocker *arg1 = (wxGridUpdateLocker *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_wxGridUpdateLocker, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_GridUpdateLocker" "', expected argument " "1"" of type '" "wxGridUpdateLocker *""'"); + } + arg1 = reinterpret_cast< wxGridUpdateLocker * >(argp1); + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + delete arg1; + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_GridUpdateLocker_Create(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + wxGridUpdateLocker *arg1 = (wxGridUpdateLocker *) 0 ; + wxGrid *arg2 = (wxGrid *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "grid", NULL + }; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:GridUpdateLocker_Create",kwnames,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_wxGridUpdateLocker, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GridUpdateLocker_Create" "', expected argument " "1"" of type '" "wxGridUpdateLocker *""'"); + } + arg1 = reinterpret_cast< wxGridUpdateLocker * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_wxGrid, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GridUpdateLocker_Create" "', expected argument " "2"" of type '" "wxGrid *""'"); + } + arg2 = reinterpret_cast< wxGrid * >(argp2); + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + (arg1)->Create(arg2); + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *GridUpdateLocker_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_wxGridUpdateLocker, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *GridUpdateLocker_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} + SWIGINTERN PyObject *_wrap_new_GridEvent(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { PyObject *resultobj = 0; int arg1 ; @@ -21048,6 +21158,11 @@ static PyMethodDef SwigMethods[] = { { (char *)"Grid_GetClassDefaultAttributes", (PyCFunction) _wrap_Grid_GetClassDefaultAttributes, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"Grid_swigregister", Grid_swigregister, METH_VARARGS, NULL}, { (char *)"Grid_swiginit", Grid_swiginit, METH_VARARGS, NULL}, + { (char *)"new_GridUpdateLocker", (PyCFunction) _wrap_new_GridUpdateLocker, METH_VARARGS | METH_KEYWORDS, NULL}, + { (char *)"delete_GridUpdateLocker", (PyCFunction)_wrap_delete_GridUpdateLocker, METH_O, NULL}, + { (char *)"GridUpdateLocker_Create", (PyCFunction) _wrap_GridUpdateLocker_Create, METH_VARARGS | METH_KEYWORDS, NULL}, + { (char *)"GridUpdateLocker_swigregister", GridUpdateLocker_swigregister, METH_VARARGS, NULL}, + { (char *)"GridUpdateLocker_swiginit", GridUpdateLocker_swiginit, METH_VARARGS, NULL}, { (char *)"new_GridEvent", (PyCFunction) _wrap_new_GridEvent, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"GridEvent_GetRow", (PyCFunction)_wrap_GridEvent_GetRow, METH_O, NULL}, { (char *)"GridEvent_GetCol", (PyCFunction)_wrap_GridEvent_GetCol, METH_O, NULL}, @@ -22370,6 +22485,7 @@ static swig_type_info _swigt__p_wxGridSizeEvent = {"_p_wxGridSizeEvent", "wxGrid static swig_type_info _swigt__p_wxGridStringTable = {"_p_wxGridStringTable", "wxGridStringTable *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_wxGridTableBase = {"_p_wxGridTableBase", "wxGridTableBase *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_wxGridTableMessage = {"_p_wxGridTableMessage", "wxGridTableMessage *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_wxGridUpdateLocker = {"_p_wxGridUpdateLocker", "wxGridUpdateLocker *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_wxKeyEvent = {"_p_wxKeyEvent", "wxKeyEvent *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_wxNotifyEvent = {"_p_wxNotifyEvent", "wxNotifyEvent *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_wxObject = {"_p_wxObject", "wxObject *", 0, 0, (void*)0, 0}; @@ -22513,6 +22629,7 @@ static swig_type_info *swig_type_initial[] = { &_swigt__p_wxGridStringTable, &_swigt__p_wxGridTableBase, &_swigt__p_wxGridTableMessage, + &_swigt__p_wxGridUpdateLocker, &_swigt__p_wxICOHandler, &_swigt__p_wxIconizeEvent, &_swigt__p_wxIdleEvent, @@ -22762,6 +22879,7 @@ static swig_cast_info _swigc__p_wxGridSizeEvent[] = { {&_swigt__p_wxGridSizeEve static swig_cast_info _swigc__p_wxGridStringTable[] = { {&_swigt__p_wxGridStringTable, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_wxGridTableBase[] = { {&_swigt__p_wxGridStringTable, _p_wxGridStringTableTo_p_wxGridTableBase, 0, 0}, {&_swigt__p_wxGridTableBase, 0, 0, 0}, {&_swigt__p_wxPyGridTableBase, _p_wxPyGridTableBaseTo_p_wxGridTableBase, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_wxGridTableMessage[] = { {&_swigt__p_wxGridTableMessage, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_wxGridUpdateLocker[] = { {&_swigt__p_wxGridUpdateLocker, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_wxKeyEvent[] = { {&_swigt__p_wxKeyEvent, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_wxNotifyEvent[] = { {&_swigt__p_wxGridSizeEvent, _p_wxGridSizeEventTo_p_wxNotifyEvent, 0, 0}, {&_swigt__p_wxGridRangeSelectEvent, _p_wxGridRangeSelectEventTo_p_wxNotifyEvent, 0, 0}, {&_swigt__p_wxSplitterEvent, _p_wxSplitterEventTo_p_wxNotifyEvent, 0, 0}, {&_swigt__p_wxGridEvent, _p_wxGridEventTo_p_wxNotifyEvent, 0, 0}, {&_swigt__p_wxNotifyEvent, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_wxLayoutConstraints[] = {{&_swigt__p_wxLayoutConstraints, 0, 0, 0},{0, 0, 0, 0}}; @@ -22905,6 +23023,7 @@ static swig_cast_info *swig_cast_initial[] = { _swigc__p_wxGridStringTable, _swigc__p_wxGridTableBase, _swigc__p_wxGridTableMessage, + _swigc__p_wxGridUpdateLocker, _swigc__p_wxICOHandler, _swigc__p_wxIconizeEvent, _swigc__p_wxIdleEvent, @@ -23531,6 +23650,9 @@ SWIGEXPORT void SWIG_init(void) { SWIG_Python_SetConstant(d, "GRID_VALUE_LONG",SWIG_FromCharPtr("long")); SWIG_Python_SetConstant(d, "GRID_VALUE_CHOICEINT",SWIG_FromCharPtr("choiceint")); SWIG_Python_SetConstant(d, "GRID_VALUE_DATETIME",SWIG_FromCharPtr("datetime")); + SWIG_Python_SetConstant(d, "GRID_AUTOSIZE",SWIG_From_int(static_cast< int >(wxGRID_AUTOSIZE))); + SWIG_Python_SetConstant(d, "GRID_COLUMN",SWIG_From_int(static_cast< int >(wxGRID_COLUMN))); + SWIG_Python_SetConstant(d, "GRID_ROW",SWIG_From_int(static_cast< int >(wxGRID_ROW))); PyDict_SetItemString(d,(char*)"cvar", SWIG_globals()); SWIG_addvarlink(SWIG_globals(),(char*)"GridNoCellCoords",GridNoCellCoords_get, GridNoCellCoords_set); SWIG_addvarlink(SWIG_globals(),(char*)"GridNoCellRect",GridNoCellRect_get, GridNoCellRect_set); diff --git a/wxPython/src/gtk/html.py b/wxPython/src/gtk/html.py index d7fbfda36b..a02bcdbafc 100644 --- a/wxPython/src/gtk/html.py +++ b/wxPython/src/gtk/html.py @@ -255,11 +255,6 @@ class HtmlWinParser(HtmlParser): """GetCharWidth(self) -> int""" return _html.HtmlWinParser_GetCharWidth(*args, **kwargs) - def GetWindow(*args, **kwargs): - """GetWindow(self) -> HtmlWindow""" - return _html.HtmlWinParser_GetWindow(*args, **kwargs) - - GetWindow = wx._deprecated(GetWindow) def GetWindowInterface(*args, **kwargs): """GetWindowInterface(self) -> HtmlWindowInterface""" return _html.HtmlWinParser_GetWindowInterface(*args, **kwargs) @@ -676,11 +671,6 @@ class HtmlCell(_core.Object): """GetMouseCursor(self, HtmlWindowInterface window) -> Cursor""" return _html.HtmlCell_GetMouseCursor(*args, **kwargs) - def GetCursor(*args, **kwargs): - """GetCursor(self) -> Cursor""" - return _html.HtmlCell_GetCursor(*args, **kwargs) - - GetCursor = wx._deprecated(GetCursor) def IsFormattingCell(*args, **kwargs): """IsFormattingCell(self) -> bool""" return _html.HtmlCell_IsFormattingCell(*args, **kwargs) @@ -765,7 +755,6 @@ class HtmlCell(_core.Object): """ConvertToText(self, HtmlSelection sel) -> String""" return _html.HtmlCell_ConvertToText(*args, **kwargs) - Cursor = property(GetCursor,doc="See `GetCursor`") Depth = property(GetDepth,doc="See `GetDepth`") Descent = property(GetDescent,doc="See `GetDescent`") FirstChild = property(GetFirstChild,doc="See `GetFirstChild`") diff --git a/wxPython/src/gtk/html_wrap.cpp b/wxPython/src/gtk/html_wrap.cpp index eacb9ad6ca..bbceb8d1ea 100644 --- a/wxPython/src/gtk/html_wrap.cpp +++ b/wxPython/src/gtk/html_wrap.cpp @@ -4451,36 +4451,6 @@ fail: } -SWIGINTERN PyObject *_wrap_HtmlWinParser_GetWindow(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - wxHtmlWinParser *arg1 = (wxHtmlWinParser *) 0 ; - wxPyHtmlWindow *result = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_wxHtmlWinParser, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HtmlWinParser_GetWindow" "', expected argument " "1"" of type '" "wxHtmlWinParser *""'"); - } - arg1 = reinterpret_cast< wxHtmlWinParser * >(argp1); - { - PyThreadState* __tstate = wxPyBeginAllowThreads(); - result = (wxPyHtmlWindow *)(arg1)->GetWindow(); - wxPyEndAllowThreads(__tstate); - if (PyErr_Occurred()) SWIG_fail; - } - { - resultobj = wxPyMake_wxObject(result, (bool)0); - } - return resultobj; -fail: - return NULL; -} - - SWIGINTERN PyObject *_wrap_HtmlWinParser_GetWindowInterface(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; wxHtmlWinParser *arg1 = (wxHtmlWinParser *) 0 ; @@ -7280,34 +7250,6 @@ fail: } -SWIGINTERN PyObject *_wrap_HtmlCell_GetCursor(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - wxHtmlCell *arg1 = (wxHtmlCell *) 0 ; - wxCursor result; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_wxHtmlCell, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HtmlCell_GetCursor" "', expected argument " "1"" of type '" "wxHtmlCell const *""'"); - } - arg1 = reinterpret_cast< wxHtmlCell * >(argp1); - { - PyThreadState* __tstate = wxPyBeginAllowThreads(); - result = ((wxHtmlCell const *)arg1)->GetCursor(); - wxPyEndAllowThreads(__tstate); - if (PyErr_Occurred()) SWIG_fail; - } - resultobj = SWIG_NewPointerObj((new wxCursor(static_cast< const wxCursor& >(result))), SWIGTYPE_p_wxCursor, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - SWIGINTERN PyObject *_wrap_HtmlCell_IsFormattingCell(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; wxHtmlCell *arg1 = (wxHtmlCell *) 0 ; @@ -17780,7 +17722,6 @@ static PyMethodDef SwigMethods[] = { { (char *)"HtmlWinParser_GetDC", (PyCFunction)_wrap_HtmlWinParser_GetDC, METH_O, NULL}, { (char *)"HtmlWinParser_GetCharHeight", (PyCFunction)_wrap_HtmlWinParser_GetCharHeight, METH_O, NULL}, { (char *)"HtmlWinParser_GetCharWidth", (PyCFunction)_wrap_HtmlWinParser_GetCharWidth, METH_O, NULL}, - { (char *)"HtmlWinParser_GetWindow", (PyCFunction)_wrap_HtmlWinParser_GetWindow, METH_O, NULL}, { (char *)"HtmlWinParser_GetWindowInterface", (PyCFunction)_wrap_HtmlWinParser_GetWindowInterface, METH_O, NULL}, { (char *)"HtmlWinParser_SetFonts", (PyCFunction) _wrap_HtmlWinParser_SetFonts, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"HtmlWinParser_SetStandardFonts", (PyCFunction) _wrap_HtmlWinParser_SetStandardFonts, METH_VARARGS | METH_KEYWORDS, NULL}, @@ -17878,7 +17819,6 @@ static PyMethodDef SwigMethods[] = { { (char *)"HtmlCell_GetParent", (PyCFunction)_wrap_HtmlCell_GetParent, METH_O, NULL}, { (char *)"HtmlCell_GetFirstChild", (PyCFunction)_wrap_HtmlCell_GetFirstChild, METH_O, NULL}, { (char *)"HtmlCell_GetMouseCursor", (PyCFunction) _wrap_HtmlCell_GetMouseCursor, METH_VARARGS | METH_KEYWORDS, NULL}, - { (char *)"HtmlCell_GetCursor", (PyCFunction)_wrap_HtmlCell_GetCursor, METH_O, NULL}, { (char *)"HtmlCell_IsFormattingCell", (PyCFunction)_wrap_HtmlCell_IsFormattingCell, METH_O, NULL}, { (char *)"HtmlCell_SetLink", (PyCFunction) _wrap_HtmlCell_SetLink, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"HtmlCell_SetNext", (PyCFunction) _wrap_HtmlCell_SetNext, METH_VARARGS | METH_KEYWORDS, NULL}, diff --git a/wxPython/src/gtk/wizard_wrap.cpp b/wxPython/src/gtk/wizard_wrap.cpp index e3e7b9fb6e..2af5d83a28 100644 --- a/wxPython/src/gtk/wizard_wrap.cpp +++ b/wxPython/src/gtk/wizard_wrap.cpp @@ -2799,9 +2799,9 @@ SWIG_AsVal_bool (PyObject *obj, bool *val) } SWIGINTERN bool wxWizardPage_Create(wxWizardPage *self,wxWizard *parent,wxBitmap const &bitmap=wxNullBitmap,wxString const &resource=wxPyEmptyString){ - wxChar* res = NULL; + const wxChar* res = NULL; if (resource.length()) - res = (wxChar*)resource.c_str(); + res = (const wxChar*)resource.c_str(); return self->Create(parent, bitmap, res); } // C++ Version of a Python aware class @@ -2878,15 +2878,15 @@ IMP_PYCALLBACK_VOID_WXWINBASE(wxPyWizardPage, wxWizardPage, RemoveChild); SWIGINTERN wxPyWizardPage *new_wxPyWizardPage(wxWizard *parent,wxBitmap const *bitmap=&wxNullBitmap,wxString const *resource=&wxPyEmptyString){ - wxChar* res = NULL; + const wxChar* res = NULL; if (resource->length()) - res = (wxChar*)resource->c_str(); + res = (const wxChar*)resource->c_str(); return new wxPyWizardPage(parent, *bitmap, res); } SWIGINTERN bool wxPyWizardPage_Create(wxPyWizardPage *self,wxWizard *parent,wxBitmap const &bitmap=wxNullBitmap,wxString const &resource=wxPyEmptyString){ - wxChar* res = NULL; + const wxChar* res = NULL; if (resource.length()) - res = (wxChar*)resource.c_str(); + res = (const wxChar*)resource.c_str(); return self->Create(parent, bitmap, res); } #ifdef __cplusplus diff --git a/wxPython/src/html.i b/wxPython/src/html.i index 28afc3d5fb..205d710c40 100644 --- a/wxPython/src/html.i +++ b/wxPython/src/html.i @@ -196,8 +196,6 @@ public: wxDC* GetDC(); int GetCharHeight(); int GetCharWidth(); - wxPyHtmlWindow* GetWindow(); - %pythoncode { GetWindow = wx._deprecated(GetWindow) } wxHtmlWindowInterface *GetWindowInterface(); @@ -576,10 +574,6 @@ public: // Returns cursor to be used when mouse is over the cell: virtual wxCursor GetMouseCursor(wxHtmlWindowInterface *window) const; - // Returns cursor to be used when mouse is over the cell: - wxCursor GetCursor() const; - %pythoncode { GetCursor = wx._deprecated(GetCursor) } - // Formatting cells are not visible on the screen, they only alter // renderer's state. bool IsFormattingCell() const; @@ -651,7 +645,6 @@ public: // only part of the cell inside the selection is converted. wxString ConvertToText(wxHtmlSelection *sel) const; - %property(Cursor, GetCursor, doc="See `GetCursor`"); %property(Depth, GetDepth, doc="See `GetDepth`"); %property(Descent, GetDescent, doc="See `GetDescent`"); %property(FirstChild, GetFirstChild, doc="See `GetFirstChild`"); diff --git a/wxPython/src/mac/_controls.py b/wxPython/src/mac/_controls.py index dfeb35ba6b..16a5428b5a 100644 --- a/wxPython/src/mac/_controls.py +++ b/wxPython/src/mac/_controls.py @@ -1493,6 +1493,9 @@ TE_BESTWRAP = _controls_.TE_BESTWRAP TE_RICH2 = _controls_.TE_RICH2 TE_CAPITALIZE = _controls_.TE_CAPITALIZE TE_LINEWRAP = TE_CHARWRAP +PROCESS_ENTER = TE_PROCESS_ENTER +PASSWORD = TE_PASSWORD + TEXT_ALIGNMENT_DEFAULT = _controls_.TEXT_ALIGNMENT_DEFAULT TEXT_ALIGNMENT_LEFT = _controls_.TEXT_ALIGNMENT_LEFT TEXT_ALIGNMENT_CENTRE = _controls_.TEXT_ALIGNMENT_CENTRE @@ -3771,11 +3774,11 @@ class ToolBarBase(_core.Control): return _controls_.ToolBarBase_InsertToolItem(*args, **kwargs) def AddControl(*args, **kwargs): - """AddControl(self, Control control) -> ToolBarToolBase""" + """AddControl(self, Control control, String label=wxEmptyString) -> ToolBarToolBase""" return _controls_.ToolBarBase_AddControl(*args, **kwargs) def InsertControl(*args, **kwargs): - """InsertControl(self, size_t pos, Control control) -> ToolBarToolBase""" + """InsertControl(self, size_t pos, Control control, String label=wxEmptyString) -> ToolBarToolBase""" return _controls_.ToolBarBase_InsertControl(*args, **kwargs) def FindControl(*args, **kwargs): diff --git a/wxPython/src/mac/_controls_wrap.cpp b/wxPython/src/mac/_controls_wrap.cpp index 26c67e9c7a..93cbabd1ae 100644 --- a/wxPython/src/mac/_controls_wrap.cpp +++ b/wxPython/src/mac/_controls_wrap.cpp @@ -24190,18 +24190,22 @@ SWIGINTERN PyObject *_wrap_ToolBarBase_AddControl(PyObject *SWIGUNUSEDPARM(self) PyObject *resultobj = 0; wxToolBarBase *arg1 = (wxToolBarBase *) 0 ; wxControl *arg2 = (wxControl *) 0 ; + wxString const &arg3_defvalue = wxEmptyString ; + wxString *arg3 = (wxString *) &arg3_defvalue ; wxToolBarToolBase *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; + bool temp3 = false ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; char * kwnames[] = { - (char *) "self",(char *) "control", NULL + (char *) "self",(char *) "control",(char *) "label", NULL }; - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:ToolBarBase_AddControl",kwnames,&obj0,&obj1)) SWIG_fail; + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|O:ToolBarBase_AddControl",kwnames,&obj0,&obj1,&obj2)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_wxToolBarBase, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ToolBarBase_AddControl" "', expected argument " "1"" of type '" "wxToolBarBase *""'"); @@ -24212,17 +24216,32 @@ SWIGINTERN PyObject *_wrap_ToolBarBase_AddControl(PyObject *SWIGUNUSEDPARM(self) SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ToolBarBase_AddControl" "', expected argument " "2"" of type '" "wxControl *""'"); } arg2 = reinterpret_cast< wxControl * >(argp2); + if (obj2) { + { + arg3 = wxString_in_helper(obj2); + if (arg3 == NULL) SWIG_fail; + temp3 = true; + } + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - result = (wxToolBarToolBase *)(arg1)->AddControl(arg2); + result = (wxToolBarToolBase *)(arg1)->AddControl(arg2,(wxString const &)*arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) SWIG_fail; } { resultobj = wxPyMake_wxObject(result, (bool)0); } + { + if (temp3) + delete arg3; + } return resultobj; fail: + { + if (temp3) + delete arg3; + } return NULL; } @@ -24232,6 +24251,8 @@ SWIGINTERN PyObject *_wrap_ToolBarBase_InsertControl(PyObject *SWIGUNUSEDPARM(se wxToolBarBase *arg1 = (wxToolBarBase *) 0 ; size_t arg2 ; wxControl *arg3 = (wxControl *) 0 ; + wxString const &arg4_defvalue = wxEmptyString ; + wxString *arg4 = (wxString *) &arg4_defvalue ; wxToolBarToolBase *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; @@ -24239,14 +24260,16 @@ SWIGINTERN PyObject *_wrap_ToolBarBase_InsertControl(PyObject *SWIGUNUSEDPARM(se int ecode2 = 0 ; void *argp3 = 0 ; int res3 = 0 ; + bool temp4 = false ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; char * kwnames[] = { - (char *) "self",(char *) "pos",(char *) "control", NULL + (char *) "self",(char *) "pos",(char *) "control",(char *) "label", NULL }; - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:ToolBarBase_InsertControl",kwnames,&obj0,&obj1,&obj2)) SWIG_fail; + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO|O:ToolBarBase_InsertControl",kwnames,&obj0,&obj1,&obj2,&obj3)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_wxToolBarBase, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ToolBarBase_InsertControl" "', expected argument " "1"" of type '" "wxToolBarBase *""'"); @@ -24262,17 +24285,32 @@ SWIGINTERN PyObject *_wrap_ToolBarBase_InsertControl(PyObject *SWIGUNUSEDPARM(se SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ToolBarBase_InsertControl" "', expected argument " "3"" of type '" "wxControl *""'"); } arg3 = reinterpret_cast< wxControl * >(argp3); + if (obj3) { + { + arg4 = wxString_in_helper(obj3); + if (arg4 == NULL) SWIG_fail; + temp4 = true; + } + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - result = (wxToolBarToolBase *)(arg1)->InsertControl(arg2,arg3); + result = (wxToolBarToolBase *)(arg1)->InsertControl(arg2,arg3,(wxString const &)*arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) SWIG_fail; } { resultobj = wxPyMake_wxObject(result, (bool)0); } + { + if (temp4) + delete arg4; + } return resultobj; fail: + { + if (temp4) + delete arg4; + } return NULL; } diff --git a/wxPython/src/mac/_core.py b/wxPython/src/mac/_core.py index ff70743710..c6b4dfcf25 100644 --- a/wxPython/src/mac/_core.py +++ b/wxPython/src/mac/_core.py @@ -116,8 +116,6 @@ LB_MULTIPLE = _core_.LB_MULTIPLE LB_EXTENDED = _core_.LB_EXTENDED LB_OWNERDRAW = _core_.LB_OWNERDRAW LB_HSCROLL = _core_.LB_HSCROLL -PROCESS_ENTER = _core_.PROCESS_ENTER -PASSWORD = _core_.PASSWORD CB_SIMPLE = _core_.CB_SIMPLE CB_DROPDOWN = _core_.CB_DROPDOWN CB_SORT = _core_.CB_SORT @@ -334,7 +332,7 @@ EXPAND = _core_.EXPAND SHAPED = _core_.SHAPED FIXED_MINSIZE = _core_.FIXED_MINSIZE TILE = _core_.TILE -ADJUST_MINSIZE = _core_.ADJUST_MINSIZE +ADJUST_MINSIZE = 0 BORDER_DEFAULT = _core_.BORDER_DEFAULT BORDER_NONE = _core_.BORDER_NONE BORDER_STATIC = _core_.BORDER_STATIC @@ -416,8 +414,6 @@ WXK_CONTROL = _core_.WXK_CONTROL WXK_MENU = _core_.WXK_MENU WXK_PAUSE = _core_.WXK_PAUSE WXK_CAPITAL = _core_.WXK_CAPITAL -WXK_PRIOR = _core_.WXK_PRIOR -WXK_NEXT = _core_.WXK_NEXT WXK_END = _core_.WXK_END WXK_HOME = _core_.WXK_HOME WXK_LEFT = _core_.WXK_LEFT @@ -486,9 +482,7 @@ WXK_NUMPAD_LEFT = _core_.WXK_NUMPAD_LEFT WXK_NUMPAD_UP = _core_.WXK_NUMPAD_UP WXK_NUMPAD_RIGHT = _core_.WXK_NUMPAD_RIGHT WXK_NUMPAD_DOWN = _core_.WXK_NUMPAD_DOWN -WXK_NUMPAD_PRIOR = _core_.WXK_NUMPAD_PRIOR WXK_NUMPAD_PAGEUP = _core_.WXK_NUMPAD_PAGEUP -WXK_NUMPAD_NEXT = _core_.WXK_NUMPAD_NEXT WXK_NUMPAD_PAGEDOWN = _core_.WXK_NUMPAD_PAGEDOWN WXK_NUMPAD_END = _core_.WXK_NUMPAD_END WXK_NUMPAD_BEGIN = _core_.WXK_NUMPAD_BEGIN @@ -525,6 +519,11 @@ WXK_SPECIAL17 = _core_.WXK_SPECIAL17 WXK_SPECIAL18 = _core_.WXK_SPECIAL18 WXK_SPECIAL19 = _core_.WXK_SPECIAL19 WXK_SPECIAL20 = _core_.WXK_SPECIAL20 +WXK_PRIOR = WXK_PAGEUP +WXK_NEXT = WXK_PAGEDOWN +WXK_NUMPAD_PRIOR = WXK_NUMPAD_PAGEUP +WXK_NUMPAD_NEXT = WXK_NUMPAD_PAGEDOWN + PAPER_NONE = _core_.PAPER_NONE PAPER_LETTER = _core_.PAPER_LETTER PAPER_LEGAL = _core_.PAPER_LEGAL @@ -4581,7 +4580,7 @@ class ScrollEvent(CommandEvent): """ A scroll event holds information about events sent from stand-alone scrollbars and sliders. Note that scrolled windows do not send - instnaces of this event class, but send the `wx.ScrollWinEvent` + instances of this event class, but send the `wx.ScrollWinEvent` instead. """ thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') @@ -8124,10 +8123,11 @@ class AcceleratorTable(Object): Ok = IsOk _core_.AcceleratorTable_swigregister(AcceleratorTable) +def GetAccelFromString(label): + entry = AcceleratorEntry() + entry.FromString(label) + return entry -def GetAccelFromString(*args, **kwargs): - """GetAccelFromString(String label) -> AcceleratorEntry""" - return _core_.GetAccelFromString(*args, **kwargs) #--------------------------------------------------------------------------- class VisualAttributes(object): @@ -8909,9 +8909,21 @@ class Window(EvtHandler): IsEnabled(self) -> bool Returns true if the window is enabled for input, false otherwise. + This method takes into account the enabled state of parent windows up + to the top-level window. """ return _core_.Window_IsEnabled(*args, **kwargs) + def IsThisEnabled(*args, **kwargs): + """ + IsThisEnabled(self) -> bool + + Returns the internal enabled state independent of the parent(s) state, + i.e. the state in which the window would be if all of its parents are + enabled. Use `IsEnabled` to get the effective window state. + """ + return _core_.Window_IsThisEnabled(*args, **kwargs) + def IsShownOnScreen(*args, **kwargs): """ IsShownOnScreen(self) -> bool @@ -9056,6 +9068,14 @@ class Window(EvtHandler): """ return _core_.Window_AcceptsFocus(*args, **kwargs) + def CanAcceptFocus(*args, **kwargs): + """ + CanAcceptFocus(self) -> bool + + Can this window have focus right now? + """ + return _core_.Window_CanAcceptFocus(*args, **kwargs) + def AcceptsFocusFromKeyboard(*args, **kwargs): """ AcceptsFocusFromKeyboard(self) -> bool @@ -9066,12 +9086,28 @@ class Window(EvtHandler): """ return _core_.Window_AcceptsFocusFromKeyboard(*args, **kwargs) + def CanAcceptFocusFromKeyboard(*args, **kwargs): + """ + CanAcceptFocusFromKeyboard(self) -> bool + + Can this window be assigned focus from keyboard right now? + """ + return _core_.Window_CanAcceptFocusFromKeyboard(*args, **kwargs) + + def NavigateIn(*args, **kwargs): + """ + NavigateIn(self, int flags=NavigationKeyEvent.IsForward) -> bool + + Navigates inside this window. + """ + return _core_.Window_NavigateIn(*args, **kwargs) + def Navigate(*args, **kwargs): """ Navigate(self, int flags=NavigationKeyEvent.IsForward) -> bool - Does keyboard navigation from this window to another, by sending a - `wx.NavigationKeyEvent`. + Does keyboard navigation starting from this window to another. This is + equivalient to self.GetParent().NavigateIn(). """ return _core_.Window_Navigate(*args, **kwargs) @@ -9127,6 +9163,14 @@ class Window(EvtHandler): """ return _core_.Window_GetGrandParent(*args, **kwargs) + def GetTopLevelParent(*args, **kwargs): + """ + GetTopLevelParent(self) -> Window + + Returns the first frame or dialog in this window's parental hierarchy. + """ + return _core_.Window_GetTopLevelParent(*args, **kwargs) + def IsTopLevel(*args, **kwargs): """ IsTopLevel(self) -> bool @@ -10423,6 +10467,7 @@ class Window(EvtHandler): Font = property(GetFont,SetFont,doc="See `GetFont` and `SetFont`") ForegroundColour = property(GetForegroundColour,SetForegroundColour,doc="See `GetForegroundColour` and `SetForegroundColour`") GrandParent = property(GetGrandParent,doc="See `GetGrandParent`") + TopLevelParent = property(GetTopLevelParent,doc="See `GetTopLevelParent`") Handle = property(GetHandle,doc="See `GetHandle`") HelpText = property(GetHelpText,SetHelpText,doc="See `GetHelpText` and `SetHelpText`") Id = property(GetId,SetId,doc="See `GetId` and `SetId`") @@ -11066,7 +11111,6 @@ class MenuBar(Window): self.Append(m, l) Frame = property(GetFrame,doc="See `GetFrame`") - Menu = property(GetMenu,doc="See `GetMenu`") MenuCount = property(GetMenuCount,doc="See `GetMenuCount`") Menus = property(GetMenus,SetMenus,doc="See `GetMenus` and `SetMenus`") _core_.MenuBar_swigregister(MenuBar) @@ -11601,6 +11645,222 @@ _core_.ControlWithItems_swigregister(ControlWithItems) #--------------------------------------------------------------------------- +class SizerFlags(object): + """ + Normally, when you add an item to a sizer via `wx.Sizer.Add`, you have + to specify a lot of flags and parameters which can be unwieldy. This + is where wx.SizerFlags comes in: it allows you to specify all + parameters using the named methods instead. For example, instead of:: + + sizer.Add(ctrl, 0, wx.EXPAND | wx.ALL, 10) + + you can now write:: + + sizer.AddF(ctrl, wx.SizerFlags().Expand().Border(wx.ALL, 10)) + + This is more readable and also allows you to create wx.SizerFlags + objects which can be reused for several sizer items.:: + + flagsExpand = wx.SizerFlags(1) + flagsExpand.Expand().Border(wx.ALL, 10) + sizer.AddF(ctrl1, flagsExpand) + sizer.AddF(ctrl2, flagsExpand) + + Note that by specification, all methods of wx.SizerFlags return the + wx.SizerFlags object itself allowing chaining multiple method calls + like in the examples above. + """ + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + __repr__ = _swig_repr + def __init__(self, *args, **kwargs): + """ + __init__(self, int proportion=0) -> SizerFlags + + Constructs the flags object with the specified proportion. + """ + _core_.SizerFlags_swiginit(self,_core_.new_SizerFlags(*args, **kwargs)) + __swig_destroy__ = _core_.delete_SizerFlags + __del__ = lambda self : None; + def Proportion(*args, **kwargs): + """ + Proportion(self, int proportion) -> SizerFlags + + Sets the item's proportion value. + """ + return _core_.SizerFlags_Proportion(*args, **kwargs) + + def Align(*args, **kwargs): + """ + Align(self, int alignment) -> SizerFlags + + Sets the item's alignment + """ + return _core_.SizerFlags_Align(*args, **kwargs) + + def Expand(*args, **kwargs): + """ + Expand(self) -> SizerFlags + + Sets the wx.EXPAND flag, which will cause the item to be expanded to + fill as much space as it is given by the sizer. + """ + return _core_.SizerFlags_Expand(*args, **kwargs) + + def Centre(*args, **kwargs): + """ + Centre(self) -> SizerFlags + + Same as `Center` for those with an alternate dialect of English. + """ + return _core_.SizerFlags_Centre(*args, **kwargs) + + def Center(*args, **kwargs): + """ + Center(self) -> SizerFlags + + Sets the centering alignment flags. + """ + return _core_.SizerFlags_Center(*args, **kwargs) + + def Left(*args, **kwargs): + """ + Left(self) -> SizerFlags + + Aligns the object to the left, a shortcut for calling + Align(wx.ALIGN_LEFT) + """ + return _core_.SizerFlags_Left(*args, **kwargs) + + def Right(*args, **kwargs): + """ + Right(self) -> SizerFlags + + Aligns the object to the right, a shortcut for calling + Align(wx.ALIGN_RIGHT) + """ + return _core_.SizerFlags_Right(*args, **kwargs) + + def Top(*args, **kwargs): + """ + Top(self) -> SizerFlags + + Aligns the object to the top of the available space, a shortcut for + calling Align(wx.ALIGN_TOP) + """ + return _core_.SizerFlags_Top(*args, **kwargs) + + def Bottom(*args, **kwargs): + """ + Bottom(self) -> SizerFlags + + Aligns the object to the bottom of the available space, a shortcut for + calling Align(wx.ALIGN_BOTTOM) + """ + return _core_.SizerFlags_Bottom(*args, **kwargs) + + def Shaped(*args, **kwargs): + """ + Shaped(self) -> SizerFlags + + Sets the wx.SHAPED flag. + """ + return _core_.SizerFlags_Shaped(*args, **kwargs) + + def FixedMinSize(*args, **kwargs): + """ + FixedMinSize(self) -> SizerFlags + + Sets the wx.FIXED_MINSIZE flag. + """ + return _core_.SizerFlags_FixedMinSize(*args, **kwargs) + + def Border(*args, **kwargs): + """ + Border(self, int direction=ALL, int borderInPixels=-1) -> SizerFlags + + Sets the border of the item in the direction(s) or sides given by the + direction parameter. If the borderInPixels value is not given then + the default border size (see `GetDefaultBorder`) will be used. + """ + return _core_.SizerFlags_Border(*args, **kwargs) + + def DoubleBorder(*args, **kwargs): + """ + DoubleBorder(self, int direction=ALL) -> SizerFlags + + Sets the border in the given direction to twice the default border + size. + """ + return _core_.SizerFlags_DoubleBorder(*args, **kwargs) + + def TripleBorder(*args, **kwargs): + """ + TripleBorder(self, int direction=ALL) -> SizerFlags + + Sets the border in the given direction to three times the default + border size. + """ + return _core_.SizerFlags_TripleBorder(*args, **kwargs) + + def HorzBorder(*args, **kwargs): + """ + HorzBorder(self) -> SizerFlags + + Sets the left and right borders to the default border size. + """ + return _core_.SizerFlags_HorzBorder(*args, **kwargs) + + def DoubleHorzBorder(*args, **kwargs): + """ + DoubleHorzBorder(self) -> SizerFlags + + Sets the left and right borders to twice the default border size. + """ + return _core_.SizerFlags_DoubleHorzBorder(*args, **kwargs) + + def GetDefaultBorder(*args, **kwargs): + """ + GetDefaultBorder() -> int + + Returns the default border size used by the other border methods + """ + return _core_.SizerFlags_GetDefaultBorder(*args, **kwargs) + + GetDefaultBorder = staticmethod(GetDefaultBorder) + def GetProportion(*args, **kwargs): + """ + GetProportion(self) -> int + + Returns the proportion value to be used in the sizer item. + """ + return _core_.SizerFlags_GetProportion(*args, **kwargs) + + def GetFlags(*args, **kwargs): + """ + GetFlags(self) -> int + + Returns the flags value to be used in the sizer item. + """ + return _core_.SizerFlags_GetFlags(*args, **kwargs) + + def GetBorderInPixels(*args, **kwargs): + """ + GetBorderInPixels(self) -> int + + Returns the border value in pixels to be used in the sizer item. + """ + return _core_.SizerFlags_GetBorderInPixels(*args, **kwargs) + +_core_.SizerFlags_swigregister(SizerFlags) + +def SizerFlags_GetDefaultBorder(*args): + """ + SizerFlags_GetDefaultBorder() -> int + + Returns the default border size used by the other border methods + """ + return _core_.SizerFlags_GetDefaultBorder(*args) + class SizerItem(Object): """ The wx.SizerItem class is used to track the position, size and other @@ -11996,6 +12256,15 @@ class Sizer(Object): """ return _core_.Sizer_Add(*args, **kwargs) + def AddF(*args, **kwargs): + """ + AddF(self, item, wx.SizerFlags flags) -> wx.SizerItem + + Similar to `Add` but uses the `wx.SizerFlags` convenience class for + setting the various flags, options and borders. + """ + return _core_.Sizer_AddF(*args, **kwargs) + def Insert(*args, **kwargs): """ Insert(self, int before, item, int proportion=0, int flag=0, int border=0, @@ -12006,6 +12275,15 @@ class Sizer(Object): """ return _core_.Sizer_Insert(*args, **kwargs) + def InsertF(*args, **kwargs): + """ + InsertF(self, int before, item, wx.SizerFlags flags) -> wx.SizerItem + + Similar to `Insert`, but uses the `wx.SizerFlags` convenience class + for setting the various flags, options and borders. + """ + return _core_.Sizer_InsertF(*args, **kwargs) + def Prepend(*args, **kwargs): """ Prepend(self, item, int proportion=0, int flag=0, int border=0, @@ -12016,6 +12294,15 @@ class Sizer(Object): """ return _core_.Sizer_Prepend(*args, **kwargs) + def PrependF(*args, **kwargs): + """ + PrependF(self, item, wx.SizerFlags flags) -> wx.SizerItem + + Similar to `Prepend` but uses the `wx.SizerFlags` convenience class + for setting the various flags, options and borders. + """ + return _core_.Sizer_PrependF(*args, **kwargs) + def Remove(*args, **kwargs): """ Remove(self, item) -> bool @@ -12043,7 +12330,7 @@ class Sizer(Object): def GetItem(*args, **kwargs): """ - GetItem(self, item) -> wx.SizerItem + GetItem(self, item, recursive=False) -> wx.SizerItem Returns the `wx.SizerItem` which holds the *item* given. The *item* parameter can be either a window, a sizer, or the zero-based index of @@ -12083,9 +12370,9 @@ class Sizer(Object): """ if isinstance(olditem, wx.Window): return self._ReplaceWin(olditem, item, recursive) - elif isinstnace(olditem, wx.Sizer): + elif isinstance(olditem, wx.Sizer): return self._ReplaceSizer(olditem, item, recursive) - elif isinstnace(olditem, int): + elif isinstance(olditem, int): return self._ReplaceItem(olditem, item) else: raise TypeError("Expected Window, Sizer, or integer for first parameter.") diff --git a/wxPython/src/mac/_core_wrap.cpp b/wxPython/src/mac/_core_wrap.cpp index 36f5b4a8d7..4faa7e06c5 100644 --- a/wxPython/src/mac/_core_wrap.cpp +++ b/wxPython/src/mac/_core_wrap.cpp @@ -2583,24 +2583,25 @@ SWIG_Python_MustGetPtr(PyObject *obj, swig_type_info *ty, int argnum, int flags) #define SWIGTYPE_p_wxSize swig_types[117] #define SWIGTYPE_p_wxSizeEvent swig_types[118] #define SWIGTYPE_p_wxSizer swig_types[119] -#define SWIGTYPE_p_wxSizerItem swig_types[120] -#define SWIGTYPE_p_wxStaticBox swig_types[121] -#define SWIGTYPE_p_wxStaticBoxSizer swig_types[122] -#define SWIGTYPE_p_wxStdDialogButtonSizer swig_types[123] -#define SWIGTYPE_p_wxSysColourChangedEvent swig_types[124] -#define SWIGTYPE_p_wxTGAHandler swig_types[125] -#define SWIGTYPE_p_wxTIFFHandler swig_types[126] -#define SWIGTYPE_p_wxToolTip swig_types[127] -#define SWIGTYPE_p_wxUpdateUIEvent swig_types[128] -#define SWIGTYPE_p_wxValidator swig_types[129] -#define SWIGTYPE_p_wxVisualAttributes swig_types[130] -#define SWIGTYPE_p_wxWindow swig_types[131] -#define SWIGTYPE_p_wxWindowCreateEvent swig_types[132] -#define SWIGTYPE_p_wxWindowDestroyEvent swig_types[133] -#define SWIGTYPE_p_wxXPMHandler swig_types[134] -#define SWIGTYPE_p_wxZipFSHandler swig_types[135] -static swig_type_info *swig_types[137]; -static swig_module_info swig_module = {swig_types, 136, 0, 0, 0, 0}; +#define SWIGTYPE_p_wxSizerFlags swig_types[120] +#define SWIGTYPE_p_wxSizerItem swig_types[121] +#define SWIGTYPE_p_wxStaticBox swig_types[122] +#define SWIGTYPE_p_wxStaticBoxSizer swig_types[123] +#define SWIGTYPE_p_wxStdDialogButtonSizer swig_types[124] +#define SWIGTYPE_p_wxSysColourChangedEvent swig_types[125] +#define SWIGTYPE_p_wxTGAHandler swig_types[126] +#define SWIGTYPE_p_wxTIFFHandler swig_types[127] +#define SWIGTYPE_p_wxToolTip swig_types[128] +#define SWIGTYPE_p_wxUpdateUIEvent swig_types[129] +#define SWIGTYPE_p_wxValidator swig_types[130] +#define SWIGTYPE_p_wxVisualAttributes swig_types[131] +#define SWIGTYPE_p_wxWindow swig_types[132] +#define SWIGTYPE_p_wxWindowCreateEvent swig_types[133] +#define SWIGTYPE_p_wxWindowDestroyEvent swig_types[134] +#define SWIGTYPE_p_wxXPMHandler swig_types[135] +#define SWIGTYPE_p_wxZipFSHandler swig_types[136] +static swig_type_info *swig_types[138]; +static swig_module_info swig_module = {swig_types, 137, 0, 0, 0, 0}; #define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name) #define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name) @@ -3885,6 +3886,9 @@ SWIGINTERN PyObject *wxWindow_GetChildren(wxWindow *self){ wxWindowList& list = self->GetChildren(); return wxPy_ConvertList(&list); } +SWIGINTERN wxWindow *wxWindow_GetTopLevelParent(wxWindow *self){ + return wxGetTopLevelParent(self); + } SWIGINTERN void wxWindow_SetDoubleBuffered(wxWindow *self,bool on){} SWIGINTERN bool wxWindow_RegisterHotKey(wxWindow *self,int hotkeyId,int modifiers,int keycode){ #if wxUSE_HOTKEY @@ -4021,6 +4025,12 @@ SWIGINTERN void wxItemContainer_SetClientData(wxItemContainer *self,int n,PyObje } +SWIGINTERN wxSizerFlags &wxSizerFlags_Border(wxSizerFlags *self,int direction=wxALL,int borderInPixels=-1){ + if (borderInPixels == -1) + return self->Border(direction); + else + return self->Border(direction, borderInPixels); + } SWIGINTERN wxSizerItem *new_wxSizerItem(wxWindow *window,int proportion,int flag,int border,PyObject *userData=NULL){ wxPyUserData* data = NULL; if ( userData ) { @@ -4164,6 +4174,27 @@ SWIGINTERN wxSizerItem *wxSizer_Add(wxSizer *self,PyObject *item,int proportion= else return NULL; } +SWIGINTERN wxSizerItem *wxSizer_AddF(wxSizer *self,PyObject *item,wxSizerFlags &flags){ + + wxPyBlock_t blocked = wxPyBeginBlockThreads(); + wxPySizerItemInfo info = wxPySizerItemTypeHelper(item, true, false); + if ( info.sizer ) + PyObject_SetAttrString(item,"thisown",Py_False); + wxPyEndBlockThreads(blocked); + + // Now call the real Add method if a valid item type was found + if ( info.window ) + return self->Add(info.window, flags); + else if ( info.sizer ) + return self->Add(info.sizer, flags); + else if (info.gotSize) + return self->Add(info.size.GetWidth(), info.size.GetHeight(), + flags.GetProportion(), + flags.GetFlags(), + flags.GetBorderInPixels()); + else + return NULL; + } SWIGINTERN wxSizerItem *wxSizer_Insert(wxSizer *self,int before,PyObject *item,int proportion=0,int flag=0,int border=0,PyObject *userData=NULL){ wxPyUserData* data = NULL; @@ -4186,6 +4217,27 @@ SWIGINTERN wxSizerItem *wxSizer_Insert(wxSizer *self,int before,PyObject *item,i else return NULL; } +SWIGINTERN wxSizerItem *wxSizer_InsertF(wxSizer *self,int before,PyObject *item,wxSizerFlags &flags){ + + wxPyBlock_t blocked = wxPyBeginBlockThreads(); + wxPySizerItemInfo info = wxPySizerItemTypeHelper(item, true, false); + if ( info.sizer ) + PyObject_SetAttrString(item,"thisown",Py_False); + wxPyEndBlockThreads(blocked); + + // Now call the real Insert method if a valid item type was found + if ( info.window ) + return self->Insert(before, info.window, flags); + else if ( info.sizer ) + return self->Insert(before, info.sizer, flags); + else if (info.gotSize) + return self->Insert(before, info.size.GetWidth(), info.size.GetHeight(), + flags.GetProportion(), + flags.GetFlags(), + flags.GetBorderInPixels()); + else + return NULL; + } SWIGINTERN wxSizerItem *wxSizer_Prepend(wxSizer *self,PyObject *item,int proportion=0,int flag=0,int border=0,PyObject *userData=NULL){ wxPyUserData* data = NULL; @@ -4208,12 +4260,33 @@ SWIGINTERN wxSizerItem *wxSizer_Prepend(wxSizer *self,PyObject *item,int proport else return NULL; } +SWIGINTERN wxSizerItem *wxSizer_PrependF(wxSizer *self,PyObject *item,wxSizerFlags &flags){ + + wxPyBlock_t blocked = wxPyBeginBlockThreads(); + wxPySizerItemInfo info = wxPySizerItemTypeHelper(item, true, false); + if ( info.sizer ) + PyObject_SetAttrString(item,"thisown",Py_False); + wxPyEndBlockThreads(blocked); + + // Now call the real Add method if a valid item type was found + if ( info.window ) + return self->Prepend(info.window, flags); + else if ( info.sizer ) + return self->Prepend(info.sizer, flags); + else if (info.gotSize) + return self->Prepend(info.size.GetWidth(), info.size.GetHeight(), + flags.GetProportion(), + flags.GetFlags(), + flags.GetBorderInPixels()); + else + return NULL; + } SWIGINTERN bool wxSizer_Remove(wxSizer *self,PyObject *item){ wxPyBlock_t blocked = wxPyBeginBlockThreads(); wxPySizerItemInfo info = wxPySizerItemTypeHelper(item, false, true); wxPyEndBlockThreads(blocked); if ( info.window ) - return self->Remove(info.window); + return false; //self->Remove(info.window); else if ( info.sizer ) return self->Remove(info.sizer); else if ( info.gotPos ) @@ -4234,14 +4307,14 @@ SWIGINTERN bool wxSizer_Detach(wxSizer *self,PyObject *item){ else return false; } -SWIGINTERN wxSizerItem *wxSizer_GetItem(wxSizer *self,PyObject *item){ +SWIGINTERN wxSizerItem *wxSizer_GetItem(wxSizer *self,PyObject *item,bool recursive=false){ wxPyBlock_t blocked = wxPyBeginBlockThreads(); wxPySizerItemInfo info = wxPySizerItemTypeHelper(item, false, true); wxPyEndBlockThreads(blocked); if ( info.window ) - return self->GetItem(info.window); + return self->GetItem(info.window, recursive); else if ( info.sizer ) - return self->GetItem(info.sizer); + return self->GetItem(info.sizer, recursive); else if ( info.gotPos ) return self->GetItem(info.pos); else @@ -32553,43 +32626,6 @@ SWIGINTERN PyObject *NullAcceleratorTable_get(void) { } -SWIGINTERN PyObject *_wrap_GetAccelFromString(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - wxString *arg1 = 0 ; - wxAcceleratorEntry *result = 0 ; - bool temp1 = false ; - PyObject * obj0 = 0 ; - char * kwnames[] = { - (char *) "label", NULL - }; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:GetAccelFromString",kwnames,&obj0)) SWIG_fail; - { - arg1 = wxString_in_helper(obj0); - if (arg1 == NULL) SWIG_fail; - temp1 = true; - } - { - PyThreadState* __tstate = wxPyBeginAllowThreads(); - result = (wxAcceleratorEntry *)wxGetAccelFromString((wxString const &)*arg1); - wxPyEndAllowThreads(__tstate); - if (PyErr_Occurred()) SWIG_fail; - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_wxAcceleratorEntry, 0 | 0 ); - { - if (temp1) - delete arg1; - } - return resultobj; -fail: - { - if (temp1) - delete arg1; - } - return NULL; -} - - SWIGINTERN int PanelNameStr_set(PyObject *) { SWIG_Error(SWIG_AttributeError,"Variable PanelNameStr is read-only."); return 1; @@ -35820,6 +35856,36 @@ fail: } +SWIGINTERN PyObject *_wrap_Window_IsThisEnabled(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + wxWindow *arg1 = (wxWindow *) 0 ; + bool result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_wxWindow, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Window_IsThisEnabled" "', expected argument " "1"" of type '" "wxWindow const *""'"); + } + arg1 = reinterpret_cast< wxWindow * >(argp1); + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + result = (bool)((wxWindow const *)arg1)->IsThisEnabled(); + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + { + resultobj = result ? Py_True : Py_False; Py_INCREF(resultobj); + } + return resultobj; +fail: + return NULL; +} + + SWIGINTERN PyObject *_wrap_Window_IsShownOnScreen(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; wxWindow *arg1 = (wxWindow *) 0 ; @@ -36307,6 +36373,36 @@ fail: } +SWIGINTERN PyObject *_wrap_Window_CanAcceptFocus(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + wxWindow *arg1 = (wxWindow *) 0 ; + bool result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_wxWindow, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Window_CanAcceptFocus" "', expected argument " "1"" of type '" "wxWindow const *""'"); + } + arg1 = reinterpret_cast< wxWindow * >(argp1); + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + result = (bool)((wxWindow const *)arg1)->CanAcceptFocus(); + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + { + resultobj = result ? Py_True : Py_False; Py_INCREF(resultobj); + } + return resultobj; +fail: + return NULL; +} + + SWIGINTERN PyObject *_wrap_Window_AcceptsFocusFromKeyboard(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; wxWindow *arg1 = (wxWindow *) 0 ; @@ -36337,6 +36433,79 @@ fail: } +SWIGINTERN PyObject *_wrap_Window_CanAcceptFocusFromKeyboard(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + wxWindow *arg1 = (wxWindow *) 0 ; + bool result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_wxWindow, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Window_CanAcceptFocusFromKeyboard" "', expected argument " "1"" of type '" "wxWindow const *""'"); + } + arg1 = reinterpret_cast< wxWindow * >(argp1); + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + result = (bool)((wxWindow const *)arg1)->CanAcceptFocusFromKeyboard(); + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + { + resultobj = result ? Py_True : Py_False; Py_INCREF(resultobj); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Window_NavigateIn(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + wxWindow *arg1 = (wxWindow *) 0 ; + int arg2 = (int) wxNavigationKeyEvent::IsForward ; + bool result; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "flags", NULL + }; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:Window_NavigateIn",kwnames,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_wxWindow, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Window_NavigateIn" "', expected argument " "1"" of type '" "wxWindow *""'"); + } + arg1 = reinterpret_cast< wxWindow * >(argp1); + if (obj1) { + ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Window_NavigateIn" "', expected argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + } + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + result = (bool)(arg1)->NavigateIn(arg2); + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + { + resultobj = result ? Py_True : Py_False; Py_INCREF(resultobj); + } + return resultobj; +fail: + return NULL; +} + + SWIGINTERN PyObject *_wrap_Window_Navigate(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { PyObject *resultobj = 0; wxWindow *arg1 = (wxWindow *) 0 ; @@ -36544,6 +36713,36 @@ fail: } +SWIGINTERN PyObject *_wrap_Window_GetTopLevelParent(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + wxWindow *arg1 = (wxWindow *) 0 ; + wxWindow *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_wxWindow, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Window_GetTopLevelParent" "', expected argument " "1"" of type '" "wxWindow *""'"); + } + arg1 = reinterpret_cast< wxWindow * >(argp1); + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + result = (wxWindow *)wxWindow_GetTopLevelParent(arg1); + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + { + resultobj = wxPyMake_wxObject(result, 0); + } + return resultobj; +fail: + return NULL; +} + + SWIGINTERN PyObject *_wrap_Window_IsTopLevel(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; wxWindow *arg1 = (wxWindow *) 0 ; @@ -48537,6 +48736,779 @@ SWIGINTERN PyObject *ControlWithItems_swigregister(PyObject *SWIGUNUSEDPARM(self return SWIG_Py_Void(); } +SWIGINTERN PyObject *_wrap_new_SizerFlags(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + int arg1 = (int) 0 ; + wxSizerFlags *result = 0 ; + int val1 ; + int ecode1 = 0 ; + PyObject * obj0 = 0 ; + char * kwnames[] = { + (char *) "proportion", NULL + }; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"|O:new_SizerFlags",kwnames,&obj0)) SWIG_fail; + if (obj0) { + ecode1 = SWIG_AsVal_int(obj0, &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_SizerFlags" "', expected argument " "1"" of type '" "int""'"); + } + arg1 = static_cast< int >(val1); + } + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + result = (wxSizerFlags *)new wxSizerFlags(arg1); + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_wxSizerFlags, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_SizerFlags(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + wxSizerFlags *arg1 = (wxSizerFlags *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_wxSizerFlags, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_SizerFlags" "', expected argument " "1"" of type '" "wxSizerFlags *""'"); + } + arg1 = reinterpret_cast< wxSizerFlags * >(argp1); + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + delete arg1; + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SizerFlags_Proportion(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + wxSizerFlags *arg1 = (wxSizerFlags *) 0 ; + int arg2 ; + wxSizerFlags *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "proportion", NULL + }; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:SizerFlags_Proportion",kwnames,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_wxSizerFlags, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SizerFlags_Proportion" "', expected argument " "1"" of type '" "wxSizerFlags *""'"); + } + arg1 = reinterpret_cast< wxSizerFlags * >(argp1); + ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SizerFlags_Proportion" "', expected argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + { + wxSizerFlags &_result_ref = (arg1)->Proportion(arg2); + result = (wxSizerFlags *) &_result_ref; + } + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + { + resultobj = obj0; Py_INCREF(resultobj); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SizerFlags_Align(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + wxSizerFlags *arg1 = (wxSizerFlags *) 0 ; + int arg2 ; + wxSizerFlags *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "alignment", NULL + }; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:SizerFlags_Align",kwnames,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_wxSizerFlags, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SizerFlags_Align" "', expected argument " "1"" of type '" "wxSizerFlags *""'"); + } + arg1 = reinterpret_cast< wxSizerFlags * >(argp1); + ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SizerFlags_Align" "', expected argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + { + wxSizerFlags &_result_ref = (arg1)->Align(arg2); + result = (wxSizerFlags *) &_result_ref; + } + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + { + resultobj = obj0; Py_INCREF(resultobj); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SizerFlags_Expand(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + wxSizerFlags *arg1 = (wxSizerFlags *) 0 ; + wxSizerFlags *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_wxSizerFlags, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SizerFlags_Expand" "', expected argument " "1"" of type '" "wxSizerFlags *""'"); + } + arg1 = reinterpret_cast< wxSizerFlags * >(argp1); + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + { + wxSizerFlags &_result_ref = (arg1)->Expand(); + result = (wxSizerFlags *) &_result_ref; + } + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + { + resultobj = swig_obj[0]; Py_INCREF(resultobj); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SizerFlags_Centre(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + wxSizerFlags *arg1 = (wxSizerFlags *) 0 ; + wxSizerFlags *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_wxSizerFlags, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SizerFlags_Centre" "', expected argument " "1"" of type '" "wxSizerFlags *""'"); + } + arg1 = reinterpret_cast< wxSizerFlags * >(argp1); + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + { + wxSizerFlags &_result_ref = (arg1)->Centre(); + result = (wxSizerFlags *) &_result_ref; + } + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + { + resultobj = swig_obj[0]; Py_INCREF(resultobj); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SizerFlags_Center(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + wxSizerFlags *arg1 = (wxSizerFlags *) 0 ; + wxSizerFlags *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_wxSizerFlags, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SizerFlags_Center" "', expected argument " "1"" of type '" "wxSizerFlags *""'"); + } + arg1 = reinterpret_cast< wxSizerFlags * >(argp1); + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + { + wxSizerFlags &_result_ref = (arg1)->Center(); + result = (wxSizerFlags *) &_result_ref; + } + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + { + resultobj = swig_obj[0]; Py_INCREF(resultobj); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SizerFlags_Left(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + wxSizerFlags *arg1 = (wxSizerFlags *) 0 ; + wxSizerFlags *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_wxSizerFlags, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SizerFlags_Left" "', expected argument " "1"" of type '" "wxSizerFlags *""'"); + } + arg1 = reinterpret_cast< wxSizerFlags * >(argp1); + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + { + wxSizerFlags &_result_ref = (arg1)->Left(); + result = (wxSizerFlags *) &_result_ref; + } + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + { + resultobj = swig_obj[0]; Py_INCREF(resultobj); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SizerFlags_Right(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + wxSizerFlags *arg1 = (wxSizerFlags *) 0 ; + wxSizerFlags *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_wxSizerFlags, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SizerFlags_Right" "', expected argument " "1"" of type '" "wxSizerFlags *""'"); + } + arg1 = reinterpret_cast< wxSizerFlags * >(argp1); + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + { + wxSizerFlags &_result_ref = (arg1)->Right(); + result = (wxSizerFlags *) &_result_ref; + } + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + { + resultobj = swig_obj[0]; Py_INCREF(resultobj); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SizerFlags_Top(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + wxSizerFlags *arg1 = (wxSizerFlags *) 0 ; + wxSizerFlags *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_wxSizerFlags, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SizerFlags_Top" "', expected argument " "1"" of type '" "wxSizerFlags *""'"); + } + arg1 = reinterpret_cast< wxSizerFlags * >(argp1); + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + { + wxSizerFlags &_result_ref = (arg1)->Top(); + result = (wxSizerFlags *) &_result_ref; + } + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + { + resultobj = swig_obj[0]; Py_INCREF(resultobj); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SizerFlags_Bottom(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + wxSizerFlags *arg1 = (wxSizerFlags *) 0 ; + wxSizerFlags *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_wxSizerFlags, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SizerFlags_Bottom" "', expected argument " "1"" of type '" "wxSizerFlags *""'"); + } + arg1 = reinterpret_cast< wxSizerFlags * >(argp1); + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + { + wxSizerFlags &_result_ref = (arg1)->Bottom(); + result = (wxSizerFlags *) &_result_ref; + } + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + { + resultobj = swig_obj[0]; Py_INCREF(resultobj); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SizerFlags_Shaped(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + wxSizerFlags *arg1 = (wxSizerFlags *) 0 ; + wxSizerFlags *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_wxSizerFlags, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SizerFlags_Shaped" "', expected argument " "1"" of type '" "wxSizerFlags *""'"); + } + arg1 = reinterpret_cast< wxSizerFlags * >(argp1); + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + { + wxSizerFlags &_result_ref = (arg1)->Shaped(); + result = (wxSizerFlags *) &_result_ref; + } + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + { + resultobj = swig_obj[0]; Py_INCREF(resultobj); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SizerFlags_FixedMinSize(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + wxSizerFlags *arg1 = (wxSizerFlags *) 0 ; + wxSizerFlags *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_wxSizerFlags, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SizerFlags_FixedMinSize" "', expected argument " "1"" of type '" "wxSizerFlags *""'"); + } + arg1 = reinterpret_cast< wxSizerFlags * >(argp1); + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + { + wxSizerFlags &_result_ref = (arg1)->FixedMinSize(); + result = (wxSizerFlags *) &_result_ref; + } + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + { + resultobj = swig_obj[0]; Py_INCREF(resultobj); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SizerFlags_Border(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + wxSizerFlags *arg1 = (wxSizerFlags *) 0 ; + int arg2 = (int) wxALL ; + int arg3 = (int) -1 ; + wxSizerFlags *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + int val3 ; + int ecode3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "direction",(char *) "borderInPixels", NULL + }; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|OO:SizerFlags_Border",kwnames,&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_wxSizerFlags, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SizerFlags_Border" "', expected argument " "1"" of type '" "wxSizerFlags *""'"); + } + arg1 = reinterpret_cast< wxSizerFlags * >(argp1); + if (obj1) { + ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SizerFlags_Border" "', expected argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + } + if (obj2) { + ecode3 = SWIG_AsVal_int(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SizerFlags_Border" "', expected argument " "3"" of type '" "int""'"); + } + arg3 = static_cast< int >(val3); + } + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + { + wxSizerFlags &_result_ref = wxSizerFlags_Border(arg1,arg2,arg3); + result = (wxSizerFlags *) &_result_ref; + } + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + { + resultobj = obj0; Py_INCREF(resultobj); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SizerFlags_DoubleBorder(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + wxSizerFlags *arg1 = (wxSizerFlags *) 0 ; + int arg2 = (int) wxALL ; + wxSizerFlags *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "direction", NULL + }; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:SizerFlags_DoubleBorder",kwnames,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_wxSizerFlags, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SizerFlags_DoubleBorder" "', expected argument " "1"" of type '" "wxSizerFlags *""'"); + } + arg1 = reinterpret_cast< wxSizerFlags * >(argp1); + if (obj1) { + ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SizerFlags_DoubleBorder" "', expected argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + } + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + { + wxSizerFlags &_result_ref = (arg1)->DoubleBorder(arg2); + result = (wxSizerFlags *) &_result_ref; + } + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + { + resultobj = obj0; Py_INCREF(resultobj); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SizerFlags_TripleBorder(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + wxSizerFlags *arg1 = (wxSizerFlags *) 0 ; + int arg2 = (int) wxALL ; + wxSizerFlags *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "direction", NULL + }; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:SizerFlags_TripleBorder",kwnames,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_wxSizerFlags, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SizerFlags_TripleBorder" "', expected argument " "1"" of type '" "wxSizerFlags *""'"); + } + arg1 = reinterpret_cast< wxSizerFlags * >(argp1); + if (obj1) { + ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SizerFlags_TripleBorder" "', expected argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + } + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + { + wxSizerFlags &_result_ref = (arg1)->TripleBorder(arg2); + result = (wxSizerFlags *) &_result_ref; + } + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + { + resultobj = obj0; Py_INCREF(resultobj); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SizerFlags_HorzBorder(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + wxSizerFlags *arg1 = (wxSizerFlags *) 0 ; + wxSizerFlags *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_wxSizerFlags, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SizerFlags_HorzBorder" "', expected argument " "1"" of type '" "wxSizerFlags *""'"); + } + arg1 = reinterpret_cast< wxSizerFlags * >(argp1); + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + { + wxSizerFlags &_result_ref = (arg1)->HorzBorder(); + result = (wxSizerFlags *) &_result_ref; + } + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + { + resultobj = swig_obj[0]; Py_INCREF(resultobj); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SizerFlags_DoubleHorzBorder(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + wxSizerFlags *arg1 = (wxSizerFlags *) 0 ; + wxSizerFlags *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_wxSizerFlags, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SizerFlags_DoubleHorzBorder" "', expected argument " "1"" of type '" "wxSizerFlags *""'"); + } + arg1 = reinterpret_cast< wxSizerFlags * >(argp1); + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + { + wxSizerFlags &_result_ref = (arg1)->DoubleHorzBorder(); + result = (wxSizerFlags *) &_result_ref; + } + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + { + resultobj = swig_obj[0]; Py_INCREF(resultobj); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SizerFlags_GetDefaultBorder(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + int result; + + if (!SWIG_Python_UnpackTuple(args,"SizerFlags_GetDefaultBorder",0,0,0)) SWIG_fail; + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + result = (int)wxSizerFlags::GetDefaultBorder(); + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SizerFlags_GetProportion(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + wxSizerFlags *arg1 = (wxSizerFlags *) 0 ; + int result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_wxSizerFlags, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SizerFlags_GetProportion" "', expected argument " "1"" of type '" "wxSizerFlags const *""'"); + } + arg1 = reinterpret_cast< wxSizerFlags * >(argp1); + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + result = (int)((wxSizerFlags const *)arg1)->GetProportion(); + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SizerFlags_GetFlags(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + wxSizerFlags *arg1 = (wxSizerFlags *) 0 ; + int result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_wxSizerFlags, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SizerFlags_GetFlags" "', expected argument " "1"" of type '" "wxSizerFlags const *""'"); + } + arg1 = reinterpret_cast< wxSizerFlags * >(argp1); + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + result = (int)((wxSizerFlags const *)arg1)->GetFlags(); + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SizerFlags_GetBorderInPixels(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + wxSizerFlags *arg1 = (wxSizerFlags *) 0 ; + int result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_wxSizerFlags, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SizerFlags_GetBorderInPixels" "', expected argument " "1"" of type '" "wxSizerFlags const *""'"); + } + arg1 = reinterpret_cast< wxSizerFlags * >(argp1); + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + result = (int)((wxSizerFlags const *)arg1)->GetBorderInPixels(); + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *SizerFlags_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_wxSizerFlags, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *SizerFlags_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} + SWIGINTERN PyObject *_wrap_new_SizerItem(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; wxSizerItem *result = 0 ; @@ -49993,6 +50965,51 @@ fail: } +SWIGINTERN PyObject *_wrap_Sizer_AddF(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + wxSizer *arg1 = (wxSizer *) 0 ; + PyObject *arg2 = (PyObject *) 0 ; + wxSizerFlags *arg3 = 0 ; + wxSizerItem *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp3 = 0 ; + int res3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "item",(char *) "flags", NULL + }; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:Sizer_AddF",kwnames,&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_wxSizer, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Sizer_AddF" "', expected argument " "1"" of type '" "wxSizer *""'"); + } + arg1 = reinterpret_cast< wxSizer * >(argp1); + arg2 = obj1; + res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_wxSizerFlags, 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Sizer_AddF" "', expected argument " "3"" of type '" "wxSizerFlags &""'"); + } + if (!argp3) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Sizer_AddF" "', expected argument " "3"" of type '" "wxSizerFlags &""'"); + } + arg3 = reinterpret_cast< wxSizerFlags * >(argp3); + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + result = (wxSizerItem *)wxSizer_AddF(arg1,arg2,*arg3); + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_wxSizerItem, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + SWIGINTERN PyObject *_wrap_Sizer_Insert(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { PyObject *resultobj = 0; wxSizer *arg1 = (wxSizer *) 0 ; @@ -50073,6 +51090,60 @@ fail: } +SWIGINTERN PyObject *_wrap_Sizer_InsertF(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + wxSizer *arg1 = (wxSizer *) 0 ; + int arg2 ; + PyObject *arg3 = (PyObject *) 0 ; + wxSizerFlags *arg4 = 0 ; + wxSizerItem *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + void *argp4 = 0 ; + int res4 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "before",(char *) "item",(char *) "flags", NULL + }; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOO:Sizer_InsertF",kwnames,&obj0,&obj1,&obj2,&obj3)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_wxSizer, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Sizer_InsertF" "', expected argument " "1"" of type '" "wxSizer *""'"); + } + arg1 = reinterpret_cast< wxSizer * >(argp1); + ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Sizer_InsertF" "', expected argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + arg3 = obj2; + res4 = SWIG_ConvertPtr(obj3, &argp4, SWIGTYPE_p_wxSizerFlags, 0 ); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "Sizer_InsertF" "', expected argument " "4"" of type '" "wxSizerFlags &""'"); + } + if (!argp4) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Sizer_InsertF" "', expected argument " "4"" of type '" "wxSizerFlags &""'"); + } + arg4 = reinterpret_cast< wxSizerFlags * >(argp4); + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + result = (wxSizerItem *)wxSizer_InsertF(arg1,arg2,arg3,*arg4); + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_wxSizerItem, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + SWIGINTERN PyObject *_wrap_Sizer_Prepend(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { PyObject *resultobj = 0; wxSizer *arg1 = (wxSizer *) 0 ; @@ -50144,6 +51215,51 @@ fail: } +SWIGINTERN PyObject *_wrap_Sizer_PrependF(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + wxSizer *arg1 = (wxSizer *) 0 ; + PyObject *arg2 = (PyObject *) 0 ; + wxSizerFlags *arg3 = 0 ; + wxSizerItem *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp3 = 0 ; + int res3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "item",(char *) "flags", NULL + }; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:Sizer_PrependF",kwnames,&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_wxSizer, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Sizer_PrependF" "', expected argument " "1"" of type '" "wxSizer *""'"); + } + arg1 = reinterpret_cast< wxSizer * >(argp1); + arg2 = obj1; + res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_wxSizerFlags, 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Sizer_PrependF" "', expected argument " "3"" of type '" "wxSizerFlags &""'"); + } + if (!argp3) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Sizer_PrependF" "', expected argument " "3"" of type '" "wxSizerFlags &""'"); + } + arg3 = reinterpret_cast< wxSizerFlags * >(argp3); + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + result = (wxSizerItem *)wxSizer_PrependF(arg1,arg2,*arg3); + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_wxSizerItem, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + SWIGINTERN PyObject *_wrap_Sizer_Remove(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { PyObject *resultobj = 0; wxSizer *arg1 = (wxSizer *) 0 ; @@ -50218,25 +51334,36 @@ SWIGINTERN PyObject *_wrap_Sizer_GetItem(PyObject *SWIGUNUSEDPARM(self), PyObjec PyObject *resultobj = 0; wxSizer *arg1 = (wxSizer *) 0 ; PyObject *arg2 = (PyObject *) 0 ; + bool arg3 = (bool) false ; wxSizerItem *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; + bool val3 ; + int ecode3 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; char * kwnames[] = { - (char *) "self",(char *) "item", NULL + (char *) "self",(char *) "item",(char *) "recursive", NULL }; - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:Sizer_GetItem",kwnames,&obj0,&obj1)) SWIG_fail; + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|O:Sizer_GetItem",kwnames,&obj0,&obj1,&obj2)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_wxSizer, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Sizer_GetItem" "', expected argument " "1"" of type '" "wxSizer *""'"); } arg1 = reinterpret_cast< wxSizer * >(argp1); arg2 = obj1; + if (obj2) { + ecode3 = SWIG_AsVal_bool(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Sizer_GetItem" "', expected argument " "3"" of type '" "bool""'"); + } + arg3 = static_cast< bool >(val3); + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - result = (wxSizerItem *)wxSizer_GetItem(arg1,arg2); + result = (wxSizerItem *)wxSizer_GetItem(arg1,arg2,arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) SWIG_fail; } @@ -57487,7 +58614,6 @@ static PyMethodDef SwigMethods[] = { { (char *)"AcceleratorTable_IsOk", (PyCFunction)_wrap_AcceleratorTable_IsOk, METH_O, NULL}, { (char *)"AcceleratorTable_swigregister", AcceleratorTable_swigregister, METH_VARARGS, NULL}, { (char *)"AcceleratorTable_swiginit", AcceleratorTable_swiginit, METH_VARARGS, NULL}, - { (char *)"GetAccelFromString", (PyCFunction) _wrap_GetAccelFromString, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"new_VisualAttributes", (PyCFunction)_wrap_new_VisualAttributes, METH_NOARGS, NULL}, { (char *)"delete_VisualAttributes", (PyCFunction)_wrap_delete_VisualAttributes, METH_O, NULL}, { (char *)"VisualAttributes_font_set", _wrap_VisualAttributes_font_set, METH_VARARGS, NULL}, @@ -57576,6 +58702,7 @@ static PyMethodDef SwigMethods[] = { { (char *)"Window_Disable", (PyCFunction)_wrap_Window_Disable, METH_O, NULL}, { (char *)"Window_IsShown", (PyCFunction)_wrap_Window_IsShown, METH_O, NULL}, { (char *)"Window_IsEnabled", (PyCFunction)_wrap_Window_IsEnabled, METH_O, NULL}, + { (char *)"Window_IsThisEnabled", (PyCFunction)_wrap_Window_IsThisEnabled, METH_O, NULL}, { (char *)"Window_IsShownOnScreen", (PyCFunction)_wrap_Window_IsShownOnScreen, METH_O, NULL}, { (char *)"Window_SetWindowStyleFlag", (PyCFunction) _wrap_Window_SetWindowStyleFlag, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"Window_GetWindowStyleFlag", (PyCFunction)_wrap_Window_GetWindowStyleFlag, METH_O, NULL}, @@ -57591,13 +58718,17 @@ static PyMethodDef SwigMethods[] = { { (char *)"Window_SetFocusFromKbd", (PyCFunction)_wrap_Window_SetFocusFromKbd, METH_O, NULL}, { (char *)"Window_FindFocus", (PyCFunction)_wrap_Window_FindFocus, METH_NOARGS, NULL}, { (char *)"Window_AcceptsFocus", (PyCFunction)_wrap_Window_AcceptsFocus, METH_O, NULL}, + { (char *)"Window_CanAcceptFocus", (PyCFunction)_wrap_Window_CanAcceptFocus, METH_O, NULL}, { (char *)"Window_AcceptsFocusFromKeyboard", (PyCFunction)_wrap_Window_AcceptsFocusFromKeyboard, METH_O, NULL}, + { (char *)"Window_CanAcceptFocusFromKeyboard", (PyCFunction)_wrap_Window_CanAcceptFocusFromKeyboard, METH_O, NULL}, + { (char *)"Window_NavigateIn", (PyCFunction) _wrap_Window_NavigateIn, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"Window_Navigate", (PyCFunction) _wrap_Window_Navigate, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"Window_MoveAfterInTabOrder", (PyCFunction) _wrap_Window_MoveAfterInTabOrder, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"Window_MoveBeforeInTabOrder", (PyCFunction) _wrap_Window_MoveBeforeInTabOrder, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"Window_GetChildren", (PyCFunction)_wrap_Window_GetChildren, METH_O, NULL}, { (char *)"Window_GetParent", (PyCFunction)_wrap_Window_GetParent, METH_O, NULL}, { (char *)"Window_GetGrandParent", (PyCFunction)_wrap_Window_GetGrandParent, METH_O, NULL}, + { (char *)"Window_GetTopLevelParent", (PyCFunction)_wrap_Window_GetTopLevelParent, METH_O, NULL}, { (char *)"Window_IsTopLevel", (PyCFunction)_wrap_Window_IsTopLevel, METH_O, NULL}, { (char *)"Window_Reparent", (PyCFunction) _wrap_Window_Reparent, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"Window_AddChild", (PyCFunction) _wrap_Window_AddChild, METH_VARARGS | METH_KEYWORDS, NULL}, @@ -57905,6 +59036,30 @@ static PyMethodDef SwigMethods[] = { { (char *)"ItemContainer_Select", (PyCFunction) _wrap_ItemContainer_Select, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"ItemContainer_swigregister", ItemContainer_swigregister, METH_VARARGS, NULL}, { (char *)"ControlWithItems_swigregister", ControlWithItems_swigregister, METH_VARARGS, NULL}, + { (char *)"new_SizerFlags", (PyCFunction) _wrap_new_SizerFlags, METH_VARARGS | METH_KEYWORDS, NULL}, + { (char *)"delete_SizerFlags", (PyCFunction)_wrap_delete_SizerFlags, METH_O, NULL}, + { (char *)"SizerFlags_Proportion", (PyCFunction) _wrap_SizerFlags_Proportion, METH_VARARGS | METH_KEYWORDS, NULL}, + { (char *)"SizerFlags_Align", (PyCFunction) _wrap_SizerFlags_Align, METH_VARARGS | METH_KEYWORDS, NULL}, + { (char *)"SizerFlags_Expand", (PyCFunction)_wrap_SizerFlags_Expand, METH_O, NULL}, + { (char *)"SizerFlags_Centre", (PyCFunction)_wrap_SizerFlags_Centre, METH_O, NULL}, + { (char *)"SizerFlags_Center", (PyCFunction)_wrap_SizerFlags_Center, METH_O, NULL}, + { (char *)"SizerFlags_Left", (PyCFunction)_wrap_SizerFlags_Left, METH_O, NULL}, + { (char *)"SizerFlags_Right", (PyCFunction)_wrap_SizerFlags_Right, METH_O, NULL}, + { (char *)"SizerFlags_Top", (PyCFunction)_wrap_SizerFlags_Top, METH_O, NULL}, + { (char *)"SizerFlags_Bottom", (PyCFunction)_wrap_SizerFlags_Bottom, METH_O, NULL}, + { (char *)"SizerFlags_Shaped", (PyCFunction)_wrap_SizerFlags_Shaped, METH_O, NULL}, + { (char *)"SizerFlags_FixedMinSize", (PyCFunction)_wrap_SizerFlags_FixedMinSize, METH_O, NULL}, + { (char *)"SizerFlags_Border", (PyCFunction) _wrap_SizerFlags_Border, METH_VARARGS | METH_KEYWORDS, NULL}, + { (char *)"SizerFlags_DoubleBorder", (PyCFunction) _wrap_SizerFlags_DoubleBorder, METH_VARARGS | METH_KEYWORDS, NULL}, + { (char *)"SizerFlags_TripleBorder", (PyCFunction) _wrap_SizerFlags_TripleBorder, METH_VARARGS | METH_KEYWORDS, NULL}, + { (char *)"SizerFlags_HorzBorder", (PyCFunction)_wrap_SizerFlags_HorzBorder, METH_O, NULL}, + { (char *)"SizerFlags_DoubleHorzBorder", (PyCFunction)_wrap_SizerFlags_DoubleHorzBorder, METH_O, NULL}, + { (char *)"SizerFlags_GetDefaultBorder", (PyCFunction)_wrap_SizerFlags_GetDefaultBorder, METH_NOARGS, NULL}, + { (char *)"SizerFlags_GetProportion", (PyCFunction)_wrap_SizerFlags_GetProportion, METH_O, NULL}, + { (char *)"SizerFlags_GetFlags", (PyCFunction)_wrap_SizerFlags_GetFlags, METH_O, NULL}, + { (char *)"SizerFlags_GetBorderInPixels", (PyCFunction)_wrap_SizerFlags_GetBorderInPixels, METH_O, NULL}, + { (char *)"SizerFlags_swigregister", SizerFlags_swigregister, METH_VARARGS, NULL}, + { (char *)"SizerFlags_swiginit", SizerFlags_swiginit, METH_VARARGS, NULL}, { (char *)"new_SizerItem", (PyCFunction)_wrap_new_SizerItem, METH_NOARGS, NULL}, { (char *)"delete_SizerItem", (PyCFunction)_wrap_delete_SizerItem, METH_O, NULL}, { (char *)"new_SizerItemWindow", (PyCFunction) _wrap_new_SizerItemWindow, METH_VARARGS | METH_KEYWORDS, NULL}, @@ -57948,8 +59103,11 @@ static PyMethodDef SwigMethods[] = { { (char *)"delete_Sizer", (PyCFunction)_wrap_delete_Sizer, METH_O, NULL}, { (char *)"Sizer__setOORInfo", (PyCFunction) _wrap_Sizer__setOORInfo, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"Sizer_Add", (PyCFunction) _wrap_Sizer_Add, METH_VARARGS | METH_KEYWORDS, NULL}, + { (char *)"Sizer_AddF", (PyCFunction) _wrap_Sizer_AddF, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"Sizer_Insert", (PyCFunction) _wrap_Sizer_Insert, METH_VARARGS | METH_KEYWORDS, NULL}, + { (char *)"Sizer_InsertF", (PyCFunction) _wrap_Sizer_InsertF, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"Sizer_Prepend", (PyCFunction) _wrap_Sizer_Prepend, METH_VARARGS | METH_KEYWORDS, NULL}, + { (char *)"Sizer_PrependF", (PyCFunction) _wrap_Sizer_PrependF, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"Sizer_Remove", (PyCFunction) _wrap_Sizer_Remove, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"Sizer_Detach", (PyCFunction) _wrap_Sizer_Detach, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"Sizer_GetItem", (PyCFunction) _wrap_Sizer_GetItem, METH_VARARGS | METH_KEYWORDS, NULL}, @@ -58135,36 +59293,6 @@ static PyMethodDef SwigMethods[] = { /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */ -static void *_p_wxGBSizerItemTo_p_wxSizerItem(void *x) { - return (void *)((wxSizerItem *) ((wxGBSizerItem *) x)); -} -static void *_p_wxBoxSizerTo_p_wxSizer(void *x) { - return (void *)((wxSizer *) ((wxBoxSizer *) x)); -} -static void *_p_wxStaticBoxSizerTo_p_wxSizer(void *x) { - return (void *)((wxSizer *) (wxBoxSizer *) ((wxStaticBoxSizer *) x)); -} -static void *_p_wxStdDialogButtonSizerTo_p_wxSizer(void *x) { - return (void *)((wxSizer *) (wxBoxSizer *) ((wxStdDialogButtonSizer *) x)); -} -static void *_p_wxGridBagSizerTo_p_wxSizer(void *x) { - return (void *)((wxSizer *) (wxGridSizer *)(wxFlexGridSizer *) ((wxGridBagSizer *) x)); -} -static void *_p_wxGridSizerTo_p_wxSizer(void *x) { - return (void *)((wxSizer *) ((wxGridSizer *) x)); -} -static void *_p_wxFlexGridSizerTo_p_wxSizer(void *x) { - return (void *)((wxSizer *) (wxGridSizer *) ((wxFlexGridSizer *) x)); -} -static void *_p_wxPySizerTo_p_wxSizer(void *x) { - return (void *)((wxSizer *) ((wxPySizer *) x)); -} -static void *_p_wxStaticBoxSizerTo_p_wxBoxSizer(void *x) { - return (void *)((wxBoxSizer *) ((wxStaticBoxSizer *) x)); -} -static void *_p_wxStdDialogButtonSizerTo_p_wxBoxSizer(void *x) { - return (void *)((wxBoxSizer *) ((wxStdDialogButtonSizer *) x)); -} static void *_p_wxContextMenuEventTo_p_wxEvent(void *x) { return (void *)((wxEvent *) (wxCommandEvent *) ((wxContextMenuEvent *) x)); } @@ -58279,116 +59407,8 @@ static void *_p_wxKeyEventTo_p_wxEvent(void *x) { static void *_p_wxScrollWinEventTo_p_wxEvent(void *x) { return (void *)((wxEvent *) ((wxScrollWinEvent *) x)); } -static void *_p_wxGridBagSizerTo_p_wxGridSizer(void *x) { - return (void *)((wxGridSizer *) (wxFlexGridSizer *) ((wxGridBagSizer *) x)); -} -static void *_p_wxFlexGridSizerTo_p_wxGridSizer(void *x) { - return (void *)((wxGridSizer *) ((wxFlexGridSizer *) x)); -} -static void *_p_wxGridBagSizerTo_p_wxFlexGridSizer(void *x) { - return (void *)((wxFlexGridSizer *) ((wxGridBagSizer *) x)); -} -static void *_p_wxControlWithItemsTo_p_wxItemContainer(void *x) { - return (void *)((wxItemContainer *) ((wxControlWithItems *) x)); -} -static void *_p_wxControlWithItemsTo_p_wxControl(void *x) { - return (void *)((wxControl *) ((wxControlWithItems *) x)); -} -static void *_p_wxControlTo_p_wxEvtHandler(void *x) { - return (void *)((wxEvtHandler *) (wxWindow *) ((wxControl *) x)); -} -static void *_p_wxWindowTo_p_wxEvtHandler(void *x) { - return (void *)((wxEvtHandler *) ((wxWindow *) x)); -} -static void *_p_wxControlWithItemsTo_p_wxEvtHandler(void *x) { - return (void *)((wxEvtHandler *) (wxWindow *)(wxControl *) ((wxControlWithItems *) x)); -} -static void *_p_wxPyAppTo_p_wxEvtHandler(void *x) { - return (void *)((wxEvtHandler *) ((wxPyApp *) x)); -} -static void *_p_wxValidatorTo_p_wxEvtHandler(void *x) { - return (void *)((wxEvtHandler *) ((wxValidator *) x)); -} -static void *_p_wxPyValidatorTo_p_wxEvtHandler(void *x) { - return (void *)((wxEvtHandler *) (wxValidator *) ((wxPyValidator *) x)); -} -static void *_p_wxMenuBarTo_p_wxEvtHandler(void *x) { - return (void *)((wxEvtHandler *) (wxWindow *) ((wxMenuBar *) x)); -} -static void *_p_wxEventBlockerTo_p_wxEvtHandler(void *x) { - return (void *)((wxEvtHandler *) ((wxEventBlocker *) x)); -} -static void *_p_wxMenuTo_p_wxEvtHandler(void *x) { - return (void *)((wxEvtHandler *) ((wxMenu *) x)); -} -static void *_p_wxANIHandlerTo_p_wxCURHandler(void *x) { - return (void *)((wxCURHandler *) ((wxANIHandler *) x)); -} -static void *_p_wxCURHandlerTo_p_wxICOHandler(void *x) { - return (void *)((wxICOHandler *) ((wxCURHandler *) x)); -} -static void *_p_wxANIHandlerTo_p_wxICOHandler(void *x) { - return (void *)((wxICOHandler *) (wxCURHandler *) ((wxANIHandler *) x)); -} -static void *_p_wxICOHandlerTo_p_wxBMPHandler(void *x) { - return (void *)((wxBMPHandler *) ((wxICOHandler *) x)); -} -static void *_p_wxCURHandlerTo_p_wxBMPHandler(void *x) { - return (void *)((wxBMPHandler *) (wxICOHandler *) ((wxCURHandler *) x)); -} -static void *_p_wxANIHandlerTo_p_wxBMPHandler(void *x) { - return (void *)((wxBMPHandler *) (wxICOHandler *)(wxCURHandler *) ((wxANIHandler *) x)); -} -static void *_p_wxPyImageHandlerTo_p_wxImageHandler(void *x) { - return (void *)((wxImageHandler *) ((wxPyImageHandler *) x)); -} -static void *_p_wxBMPHandlerTo_p_wxImageHandler(void *x) { - return (void *)((wxImageHandler *) ((wxBMPHandler *) x)); -} -static void *_p_wxICOHandlerTo_p_wxImageHandler(void *x) { - return (void *)((wxImageHandler *) (wxBMPHandler *) ((wxICOHandler *) x)); -} -static void *_p_wxCURHandlerTo_p_wxImageHandler(void *x) { - return (void *)((wxImageHandler *) (wxBMPHandler *)(wxICOHandler *) ((wxCURHandler *) x)); -} -static void *_p_wxANIHandlerTo_p_wxImageHandler(void *x) { - return (void *)((wxImageHandler *) (wxBMPHandler *)(wxICOHandler *)(wxCURHandler *) ((wxANIHandler *) x)); -} -static void *_p_wxPNGHandlerTo_p_wxImageHandler(void *x) { - return (void *)((wxImageHandler *) ((wxPNGHandler *) x)); -} -static void *_p_wxGIFHandlerTo_p_wxImageHandler(void *x) { - return (void *)((wxImageHandler *) ((wxGIFHandler *) x)); -} -static void *_p_wxPCXHandlerTo_p_wxImageHandler(void *x) { - return (void *)((wxImageHandler *) ((wxPCXHandler *) x)); -} -static void *_p_wxJPEGHandlerTo_p_wxImageHandler(void *x) { - return (void *)((wxImageHandler *) ((wxJPEGHandler *) x)); -} -static void *_p_wxPNMHandlerTo_p_wxImageHandler(void *x) { - return (void *)((wxImageHandler *) ((wxPNMHandler *) x)); -} -static void *_p_wxXPMHandlerTo_p_wxImageHandler(void *x) { - return (void *)((wxImageHandler *) ((wxXPMHandler *) x)); -} -static void *_p_wxTIFFHandlerTo_p_wxImageHandler(void *x) { - return (void *)((wxImageHandler *) ((wxTIFFHandler *) x)); -} -static void *_p_wxTGAHandlerTo_p_wxImageHandler(void *x) { - return (void *)((wxImageHandler *) ((wxTGAHandler *) x)); -} -static void *_p_wxPyFileSystemHandlerTo_p_wxFileSystemHandler(void *x) { - return (void *)((wxFileSystemHandler *) ((wxPyFileSystemHandler *) x)); -} -static void *_p_wxInternetFSHandlerTo_p_wxFileSystemHandler(void *x) { - return (void *)((wxFileSystemHandler *) ((wxInternetFSHandler *) x)); -} -static void *_p_wxZipFSHandlerTo_p_wxFileSystemHandler(void *x) { - return (void *)((wxFileSystemHandler *) ((wxZipFSHandler *) x)); -} -static void *_p_wxMemoryFSHandlerTo_p_wxFileSystemHandler(void *x) { - return (void *)((wxFileSystemHandler *) ((wxMemoryFSHandler *) x)); +static void *_p_wxPyValidatorTo_p_wxValidator(void *x) { + return (void *)((wxValidator *) ((wxPyValidator *) x)); } static void *_p_wxLayoutConstraintsTo_p_wxObject(void *x) { return (void *)((wxObject *) ((wxLayoutConstraints *) x)); @@ -58630,6 +59650,147 @@ static void *_p_wxPyValidatorTo_p_wxObject(void *x) { static void *_p_wxValidatorTo_p_wxObject(void *x) { return (void *)((wxObject *) (wxEvtHandler *) ((wxValidator *) x)); } +static void *_p_wxGridBagSizerTo_p_wxFlexGridSizer(void *x) { + return (void *)((wxFlexGridSizer *) ((wxGridBagSizer *) x)); +} +static void *_p_wxGridBagSizerTo_p_wxGridSizer(void *x) { + return (void *)((wxGridSizer *) (wxFlexGridSizer *) ((wxGridBagSizer *) x)); +} +static void *_p_wxFlexGridSizerTo_p_wxGridSizer(void *x) { + return (void *)((wxGridSizer *) ((wxFlexGridSizer *) x)); +} +static void *_p_wxControlWithItemsTo_p_wxControl(void *x) { + return (void *)((wxControl *) ((wxControlWithItems *) x)); +} +static void *_p_wxControlWithItemsTo_p_wxItemContainer(void *x) { + return (void *)((wxItemContainer *) ((wxControlWithItems *) x)); +} +static void *_p_wxStaticBoxSizerTo_p_wxBoxSizer(void *x) { + return (void *)((wxBoxSizer *) ((wxStaticBoxSizer *) x)); +} +static void *_p_wxStdDialogButtonSizerTo_p_wxBoxSizer(void *x) { + return (void *)((wxBoxSizer *) ((wxStdDialogButtonSizer *) x)); +} +static void *_p_wxBoxSizerTo_p_wxSizer(void *x) { + return (void *)((wxSizer *) ((wxBoxSizer *) x)); +} +static void *_p_wxStaticBoxSizerTo_p_wxSizer(void *x) { + return (void *)((wxSizer *) (wxBoxSizer *) ((wxStaticBoxSizer *) x)); +} +static void *_p_wxStdDialogButtonSizerTo_p_wxSizer(void *x) { + return (void *)((wxSizer *) (wxBoxSizer *) ((wxStdDialogButtonSizer *) x)); +} +static void *_p_wxGridBagSizerTo_p_wxSizer(void *x) { + return (void *)((wxSizer *) (wxGridSizer *)(wxFlexGridSizer *) ((wxGridBagSizer *) x)); +} +static void *_p_wxGridSizerTo_p_wxSizer(void *x) { + return (void *)((wxSizer *) ((wxGridSizer *) x)); +} +static void *_p_wxFlexGridSizerTo_p_wxSizer(void *x) { + return (void *)((wxSizer *) (wxGridSizer *) ((wxFlexGridSizer *) x)); +} +static void *_p_wxPySizerTo_p_wxSizer(void *x) { + return (void *)((wxSizer *) ((wxPySizer *) x)); +} +static void *_p_wxGBSizerItemTo_p_wxSizerItem(void *x) { + return (void *)((wxSizerItem *) ((wxGBSizerItem *) x)); +} +static void *_p_wxPyFileSystemHandlerTo_p_wxFileSystemHandler(void *x) { + return (void *)((wxFileSystemHandler *) ((wxPyFileSystemHandler *) x)); +} +static void *_p_wxInternetFSHandlerTo_p_wxFileSystemHandler(void *x) { + return (void *)((wxFileSystemHandler *) ((wxInternetFSHandler *) x)); +} +static void *_p_wxZipFSHandlerTo_p_wxFileSystemHandler(void *x) { + return (void *)((wxFileSystemHandler *) ((wxZipFSHandler *) x)); +} +static void *_p_wxMemoryFSHandlerTo_p_wxFileSystemHandler(void *x) { + return (void *)((wxFileSystemHandler *) ((wxMemoryFSHandler *) x)); +} +static void *_p_wxPyImageHandlerTo_p_wxImageHandler(void *x) { + return (void *)((wxImageHandler *) ((wxPyImageHandler *) x)); +} +static void *_p_wxBMPHandlerTo_p_wxImageHandler(void *x) { + return (void *)((wxImageHandler *) ((wxBMPHandler *) x)); +} +static void *_p_wxICOHandlerTo_p_wxImageHandler(void *x) { + return (void *)((wxImageHandler *) (wxBMPHandler *) ((wxICOHandler *) x)); +} +static void *_p_wxCURHandlerTo_p_wxImageHandler(void *x) { + return (void *)((wxImageHandler *) (wxBMPHandler *)(wxICOHandler *) ((wxCURHandler *) x)); +} +static void *_p_wxANIHandlerTo_p_wxImageHandler(void *x) { + return (void *)((wxImageHandler *) (wxBMPHandler *)(wxICOHandler *)(wxCURHandler *) ((wxANIHandler *) x)); +} +static void *_p_wxPNGHandlerTo_p_wxImageHandler(void *x) { + return (void *)((wxImageHandler *) ((wxPNGHandler *) x)); +} +static void *_p_wxGIFHandlerTo_p_wxImageHandler(void *x) { + return (void *)((wxImageHandler *) ((wxGIFHandler *) x)); +} +static void *_p_wxPCXHandlerTo_p_wxImageHandler(void *x) { + return (void *)((wxImageHandler *) ((wxPCXHandler *) x)); +} +static void *_p_wxJPEGHandlerTo_p_wxImageHandler(void *x) { + return (void *)((wxImageHandler *) ((wxJPEGHandler *) x)); +} +static void *_p_wxPNMHandlerTo_p_wxImageHandler(void *x) { + return (void *)((wxImageHandler *) ((wxPNMHandler *) x)); +} +static void *_p_wxXPMHandlerTo_p_wxImageHandler(void *x) { + return (void *)((wxImageHandler *) ((wxXPMHandler *) x)); +} +static void *_p_wxTIFFHandlerTo_p_wxImageHandler(void *x) { + return (void *)((wxImageHandler *) ((wxTIFFHandler *) x)); +} +static void *_p_wxTGAHandlerTo_p_wxImageHandler(void *x) { + return (void *)((wxImageHandler *) ((wxTGAHandler *) x)); +} +static void *_p_wxICOHandlerTo_p_wxBMPHandler(void *x) { + return (void *)((wxBMPHandler *) ((wxICOHandler *) x)); +} +static void *_p_wxCURHandlerTo_p_wxBMPHandler(void *x) { + return (void *)((wxBMPHandler *) (wxICOHandler *) ((wxCURHandler *) x)); +} +static void *_p_wxANIHandlerTo_p_wxBMPHandler(void *x) { + return (void *)((wxBMPHandler *) (wxICOHandler *)(wxCURHandler *) ((wxANIHandler *) x)); +} +static void *_p_wxCURHandlerTo_p_wxICOHandler(void *x) { + return (void *)((wxICOHandler *) ((wxCURHandler *) x)); +} +static void *_p_wxANIHandlerTo_p_wxICOHandler(void *x) { + return (void *)((wxICOHandler *) (wxCURHandler *) ((wxANIHandler *) x)); +} +static void *_p_wxANIHandlerTo_p_wxCURHandler(void *x) { + return (void *)((wxCURHandler *) ((wxANIHandler *) x)); +} +static void *_p_wxControlTo_p_wxEvtHandler(void *x) { + return (void *)((wxEvtHandler *) (wxWindow *) ((wxControl *) x)); +} +static void *_p_wxWindowTo_p_wxEvtHandler(void *x) { + return (void *)((wxEvtHandler *) ((wxWindow *) x)); +} +static void *_p_wxControlWithItemsTo_p_wxEvtHandler(void *x) { + return (void *)((wxEvtHandler *) (wxWindow *)(wxControl *) ((wxControlWithItems *) x)); +} +static void *_p_wxPyAppTo_p_wxEvtHandler(void *x) { + return (void *)((wxEvtHandler *) ((wxPyApp *) x)); +} +static void *_p_wxValidatorTo_p_wxEvtHandler(void *x) { + return (void *)((wxEvtHandler *) ((wxValidator *) x)); +} +static void *_p_wxPyValidatorTo_p_wxEvtHandler(void *x) { + return (void *)((wxEvtHandler *) (wxValidator *) ((wxPyValidator *) x)); +} +static void *_p_wxMenuBarTo_p_wxEvtHandler(void *x) { + return (void *)((wxEvtHandler *) (wxWindow *) ((wxMenuBar *) x)); +} +static void *_p_wxEventBlockerTo_p_wxEvtHandler(void *x) { + return (void *)((wxEvtHandler *) ((wxEventBlocker *) x)); +} +static void *_p_wxMenuTo_p_wxEvtHandler(void *x) { + return (void *)((wxEvtHandler *) ((wxMenu *) x)); +} static void *_p_wxControlTo_p_wxWindow(void *x) { return (void *)((wxWindow *) ((wxControl *) x)); } @@ -58669,9 +59830,6 @@ static void *_p_wxNotifyEventTo_p_wxCommandEvent(void *x) { static void *_p_wxPyCommandEventTo_p_wxCommandEvent(void *x) { return (void *)((wxCommandEvent *) ((wxPyCommandEvent *) x)); } -static void *_p_wxPyValidatorTo_p_wxValidator(void *x) { - return (void *)((wxValidator *) ((wxPyValidator *) x)); -} static swig_type_info _swigt__p_buffer = {"_p_buffer", "buffer *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_char = {"_p_char", "char *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_form_ops_t = {"_p_form_ops_t", "enum form_ops_t *|form_ops_t *", 0, 0, (void*)0, 0}; @@ -58792,6 +59950,7 @@ static swig_type_info _swigt__p_wxShowEvent = {"_p_wxShowEvent", "wxShowEvent *" static swig_type_info _swigt__p_wxSize = {"_p_wxSize", "wxSize *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_wxSizeEvent = {"_p_wxSizeEvent", "wxSizeEvent *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_wxSizer = {"_p_wxSizer", "wxSizer *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_wxSizerFlags = {"_p_wxSizerFlags", "wxSizerFlags *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_wxSizerItem = {"_p_wxSizerItem", "wxSizerItem *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_wxStaticBox = {"_p_wxStaticBox", "wxStaticBox *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_wxStaticBoxSizer = {"_p_wxStaticBoxSizer", "wxStaticBoxSizer *", 0, 0, (void*)0, 0}; @@ -58930,6 +60089,7 @@ static swig_type_info *swig_type_initial[] = { &_swigt__p_wxSize, &_swigt__p_wxSizeEvent, &_swigt__p_wxSizer, + &_swigt__p_wxSizerFlags, &_swigt__p_wxSizerItem, &_swigt__p_wxStaticBox, &_swigt__p_wxStaticBoxSizer, @@ -59068,6 +60228,7 @@ static swig_cast_info _swigc__p_wxShowEvent[] = { {&_swigt__p_wxShowEvent, 0, 0 static swig_cast_info _swigc__p_wxSize[] = { {&_swigt__p_wxSize, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_wxSizeEvent[] = { {&_swigt__p_wxSizeEvent, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_wxSizer[] = { {&_swigt__p_wxSizer, 0, 0, 0}, {&_swigt__p_wxBoxSizer, _p_wxBoxSizerTo_p_wxSizer, 0, 0}, {&_swigt__p_wxStaticBoxSizer, _p_wxStaticBoxSizerTo_p_wxSizer, 0, 0}, {&_swigt__p_wxStdDialogButtonSizer, _p_wxStdDialogButtonSizerTo_p_wxSizer, 0, 0}, {&_swigt__p_wxGridBagSizer, _p_wxGridBagSizerTo_p_wxSizer, 0, 0}, {&_swigt__p_wxGridSizer, _p_wxGridSizerTo_p_wxSizer, 0, 0}, {&_swigt__p_wxFlexGridSizer, _p_wxFlexGridSizerTo_p_wxSizer, 0, 0}, {&_swigt__p_wxPySizer, _p_wxPySizerTo_p_wxSizer, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_wxSizerFlags[] = { {&_swigt__p_wxSizerFlags, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_wxSizerItem[] = { {&_swigt__p_wxSizerItem, 0, 0, 0}, {&_swigt__p_wxGBSizerItem, _p_wxGBSizerItemTo_p_wxSizerItem, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_wxStaticBox[] = { {&_swigt__p_wxStaticBox, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_wxStaticBoxSizer[] = { {&_swigt__p_wxStaticBoxSizer, 0, 0, 0},{0, 0, 0, 0}}; @@ -59206,6 +60367,7 @@ static swig_cast_info *swig_cast_initial[] = { _swigc__p_wxSize, _swigc__p_wxSizeEvent, _swigc__p_wxSizer, + _swigc__p_wxSizerFlags, _swigc__p_wxSizerItem, _swigc__p_wxStaticBox, _swigc__p_wxStaticBoxSizer, @@ -59770,8 +60932,6 @@ SWIGEXPORT void SWIG_init(void) { SWIG_Python_SetConstant(d, "LB_EXTENDED",SWIG_From_int(static_cast< int >(wxLB_EXTENDED))); SWIG_Python_SetConstant(d, "LB_OWNERDRAW",SWIG_From_int(static_cast< int >(wxLB_OWNERDRAW))); SWIG_Python_SetConstant(d, "LB_HSCROLL",SWIG_From_int(static_cast< int >(wxLB_HSCROLL))); - SWIG_Python_SetConstant(d, "PROCESS_ENTER",SWIG_From_int(static_cast< int >(wxPROCESS_ENTER))); - SWIG_Python_SetConstant(d, "PASSWORD",SWIG_From_int(static_cast< int >(wxPASSWORD))); SWIG_Python_SetConstant(d, "CB_SIMPLE",SWIG_From_int(static_cast< int >(wxCB_SIMPLE))); SWIG_Python_SetConstant(d, "CB_DROPDOWN",SWIG_From_int(static_cast< int >(wxCB_DROPDOWN))); SWIG_Python_SetConstant(d, "CB_SORT",SWIG_From_int(static_cast< int >(wxCB_SORT))); @@ -59988,7 +61148,6 @@ SWIGEXPORT void SWIG_init(void) { SWIG_Python_SetConstant(d, "SHAPED",SWIG_From_int(static_cast< int >(wxSHAPED))); SWIG_Python_SetConstant(d, "FIXED_MINSIZE",SWIG_From_int(static_cast< int >(wxFIXED_MINSIZE))); SWIG_Python_SetConstant(d, "TILE",SWIG_From_int(static_cast< int >(wxTILE))); - SWIG_Python_SetConstant(d, "ADJUST_MINSIZE",SWIG_From_int(static_cast< int >(wxADJUST_MINSIZE))); SWIG_Python_SetConstant(d, "BORDER_DEFAULT",SWIG_From_int(static_cast< int >(wxBORDER_DEFAULT))); SWIG_Python_SetConstant(d, "BORDER_NONE",SWIG_From_int(static_cast< int >(wxBORDER_NONE))); SWIG_Python_SetConstant(d, "BORDER_STATIC",SWIG_From_int(static_cast< int >(wxBORDER_STATIC))); @@ -60070,8 +61229,6 @@ SWIGEXPORT void SWIG_init(void) { SWIG_Python_SetConstant(d, "WXK_MENU",SWIG_From_int(static_cast< int >(WXK_MENU))); SWIG_Python_SetConstant(d, "WXK_PAUSE",SWIG_From_int(static_cast< int >(WXK_PAUSE))); SWIG_Python_SetConstant(d, "WXK_CAPITAL",SWIG_From_int(static_cast< int >(WXK_CAPITAL))); - SWIG_Python_SetConstant(d, "WXK_PRIOR",SWIG_From_int(static_cast< int >(WXK_PRIOR))); - SWIG_Python_SetConstant(d, "WXK_NEXT",SWIG_From_int(static_cast< int >(WXK_NEXT))); SWIG_Python_SetConstant(d, "WXK_END",SWIG_From_int(static_cast< int >(WXK_END))); SWIG_Python_SetConstant(d, "WXK_HOME",SWIG_From_int(static_cast< int >(WXK_HOME))); SWIG_Python_SetConstant(d, "WXK_LEFT",SWIG_From_int(static_cast< int >(WXK_LEFT))); @@ -60140,9 +61297,7 @@ SWIGEXPORT void SWIG_init(void) { SWIG_Python_SetConstant(d, "WXK_NUMPAD_UP",SWIG_From_int(static_cast< int >(WXK_NUMPAD_UP))); SWIG_Python_SetConstant(d, "WXK_NUMPAD_RIGHT",SWIG_From_int(static_cast< int >(WXK_NUMPAD_RIGHT))); SWIG_Python_SetConstant(d, "WXK_NUMPAD_DOWN",SWIG_From_int(static_cast< int >(WXK_NUMPAD_DOWN))); - SWIG_Python_SetConstant(d, "WXK_NUMPAD_PRIOR",SWIG_From_int(static_cast< int >(WXK_NUMPAD_PRIOR))); SWIG_Python_SetConstant(d, "WXK_NUMPAD_PAGEUP",SWIG_From_int(static_cast< int >(WXK_NUMPAD_PAGEUP))); - SWIG_Python_SetConstant(d, "WXK_NUMPAD_NEXT",SWIG_From_int(static_cast< int >(WXK_NUMPAD_NEXT))); SWIG_Python_SetConstant(d, "WXK_NUMPAD_PAGEDOWN",SWIG_From_int(static_cast< int >(WXK_NUMPAD_PAGEDOWN))); SWIG_Python_SetConstant(d, "WXK_NUMPAD_END",SWIG_From_int(static_cast< int >(WXK_NUMPAD_END))); SWIG_Python_SetConstant(d, "WXK_NUMPAD_BEGIN",SWIG_From_int(static_cast< int >(WXK_NUMPAD_BEGIN))); diff --git a/wxPython/src/mac/_gdi.py b/wxPython/src/mac/_gdi.py index a322e52842..c7fe77a981 100644 --- a/wxPython/src/mac/_gdi.py +++ b/wxPython/src/mac/_gdi.py @@ -676,7 +676,7 @@ class Bitmap(GDIObject): CopyFromBuffer(self, buffer data) Copy data from a RGB buffer object to replace the bitmap pixel data. - See `wxBitmapFromBuffer` for more . + See `wx.BitmapFromBuffer` for more . """ return _gdi_.Bitmap_CopyFromBuffer(*args, **kwargs) @@ -685,7 +685,7 @@ class Bitmap(GDIObject): CopyFromBufferRGBA(self, buffer data) Copy data from a RGBA buffer object to replace the bitmap pixel data. - See `wxBitmapFromBufferRGBA` for more . + See `wx.BitmapFromBufferRGBA` for more . """ return _gdi_.Bitmap_CopyFromBufferRGBA(*args, **kwargs) @@ -2633,9 +2633,8 @@ class Locale(object): __del__ = lambda self : None; def Init1(*args, **kwargs): """ - Init1(self, String szName, String szShort=EmptyString, String szLocale=EmptyString, - bool bLoadDefault=True, - bool bConvertEncoding=False) -> bool + Init1(self, String name, String shortName=EmptyString, String locale=EmptyString, + bool bLoadDefault=True, bool bConvertEncoding=False) -> bool """ return _gdi_.Locale_Init1(*args, **kwargs) @@ -2692,7 +2691,7 @@ class Locale(object): AddCatalogLookupPathPrefix = staticmethod(AddCatalogLookupPathPrefix) def AddCatalog(*args, **kwargs): - """AddCatalog(self, String szDomain) -> bool""" + """AddCatalog(self, String domain) -> bool""" return _gdi_.Locale_AddCatalog(*args, **kwargs) def IsAvailable(*args, **kwargs): @@ -2701,7 +2700,7 @@ class Locale(object): IsAvailable = staticmethod(IsAvailable) def IsLoaded(*args, **kwargs): - """IsLoaded(self, String szDomain) -> bool""" + """IsLoaded(self, String domain) -> bool""" return _gdi_.Locale_IsLoaded(*args, **kwargs) def GetLanguageInfo(*args, **kwargs): @@ -2725,7 +2724,7 @@ class Locale(object): AddLanguage = staticmethod(AddLanguage) def GetString(*args, **kwargs): - """GetString(self, String szOrigString, String szDomain=EmptyString) -> String""" + """GetString(self, String origString, String domain=EmptyString) -> String""" return _gdi_.Locale_GetString(*args, **kwargs) def GetName(*args, **kwargs): @@ -2792,14 +2791,11 @@ class PyLocale(Locale): return _gdi_.PyLocale__setCallbackInfo(*args, **kwargs) def GetSingularString(*args, **kwargs): - """GetSingularString(self, wxChar szOrigString, wxChar szDomain=None) -> wxChar""" + """GetSingularString(self, String origString, String domain=EmptyString) -> String""" return _gdi_.PyLocale_GetSingularString(*args, **kwargs) def GetPluralString(*args, **kwargs): - """ - GetPluralString(self, wxChar szOrigString, wxChar szOrigString2, size_t n, - wxChar szDomain=None) -> wxChar - """ + """GetPluralString(self, String origString, String origString2, size_t n, String domain=EmptyString) -> String""" return _gdi_.PyLocale_GetPluralString(*args, **kwargs) _gdi_.PyLocale_swigregister(PyLocale) @@ -3384,6 +3380,35 @@ class DC(_core.Object): """ return _gdi_.DC_BlitPointSize(*args, **kwargs) + def StretchBlit(*args, **kwargs): + """ + StretchBlit(self, int dstX, int dstY, int dstWidth, int dstHeight, DC source, + int srcX, int srcY, int srcWidth, int srcHeight, + int rop=COPY, bool useMask=False, + int srcMaskX=wxDefaultCoord, int srcMaskY=wxDefaultCoord) -> bool + + Copy from a source DC to this DC, specifying the destination + coordinates, destination size, source DC, source coordinates, size of + source area to copy, logical function, whether to use a bitmap mask, + and mask source position. + """ + return _gdi_.DC_StretchBlit(*args, **kwargs) + + def StretchBlitPointSize(*args, **kwargs): + """ + StretchBlitPointSize(self, Point dstPt, Size dstSize, DC source, Point srcPt, + Size srcSize, int rop=COPY, bool useMask=False, + Point srcMaskPt=DefaultPosition) -> bool + + Copy from a source DC to this DC, specifying the destination + coordinates, destination size, source DC, source coordinates, size of + source area to copy, logical function, whether to use a bitmap mask, + and mask source position. This version is the same as `StretchBlit` + except `wx.Point` and `wx.Size` objects are used instead of individual + position and size components. + """ + return _gdi_.DC_StretchBlitPointSize(*args, **kwargs) + def GetAsBitmap(*args, **kwargs): """GetAsBitmap(self, Rect subrect=None) -> Bitmap""" return _gdi_.DC_GetAsBitmap(*args, **kwargs) @@ -4692,6 +4717,7 @@ def MemoryDCFromDC(*args, **kwargs): BUFFER_VIRTUAL_AREA = _gdi_.BUFFER_VIRTUAL_AREA BUFFER_CLIENT_AREA = _gdi_.BUFFER_CLIENT_AREA +BUFFER_USES_SHARED_BUFFER = _gdi_.BUFFER_USES_SHARED_BUFFER class BufferedDC(MemoryDC): """ This simple class provides a simple way to avoid flicker: when drawing @@ -5418,7 +5444,8 @@ class GraphicsContext(GraphicsObject): Creates a wx.GraphicsContext from a native context. This native context must be eg a CGContextRef for Core Graphics, a Graphics - pointer for GDIPlus or a cairo_t pointer for Cairo. + pointer for GDIPlus or a cairo_t pointer for Cairo. NOTE: For + wxPython we still need a way to make this value usable. """ return _gdi_.GraphicsContext_CreateFromNative(*args, **kwargs) @@ -5427,7 +5454,8 @@ class GraphicsContext(GraphicsObject): """ CreateFromNativeWindow(void window) -> GraphicsContext - Creates a wx.GraphicsContext from a native window. + Creates a wx.GraphicsContext from a native window. NOTE: For wxPython + we still need a way to make this value usable. """ return _gdi_.GraphicsContext_CreateFromNativeWindow(*args, **kwargs) @@ -5746,7 +5774,7 @@ class GraphicsContext(GraphicsObject): def StrokeLineSegements(*args, **kwargs): """ - StrokeLineSegements(self, PyObject beginPoints, PyObject endPoints) + StrokeLineSegments(self, List beginPoints, List endPoints) Stroke disconnected lines from begin to end points """ @@ -5827,7 +5855,8 @@ def GraphicsContext_CreateFromNative(*args, **kwargs): Creates a wx.GraphicsContext from a native context. This native context must be eg a CGContextRef for Core Graphics, a Graphics - pointer for GDIPlus or a cairo_t pointer for Cairo. + pointer for GDIPlus or a cairo_t pointer for Cairo. NOTE: For + wxPython we still need a way to make this value usable. """ return _gdi_.GraphicsContext_CreateFromNative(*args, **kwargs) @@ -5835,7 +5864,8 @@ def GraphicsContext_CreateFromNativeWindow(*args, **kwargs): """ GraphicsContext_CreateFromNativeWindow(void window) -> GraphicsContext - Creates a wx.GraphicsContext from a native window. + Creates a wx.GraphicsContext from a native window. NOTE: For wxPython + we still need a way to make this value usable. """ return _gdi_.GraphicsContext_CreateFromNativeWindow(*args, **kwargs) @@ -6265,17 +6295,6 @@ class PenList(GDIObjListBase): """FindOrCreatePen(self, Colour colour, int width, int style) -> Pen""" return _gdi_.PenList_FindOrCreatePen(*args, **kwargs) - def AddPen(*args, **kwargs): - """AddPen(self, Pen pen)""" - return _gdi_.PenList_AddPen(*args, **kwargs) - - def RemovePen(*args, **kwargs): - """RemovePen(self, Pen pen)""" - return _gdi_.PenList_RemovePen(*args, **kwargs) - - AddPen = wx._deprecated(AddPen) - RemovePen = wx._deprecated(RemovePen) - _gdi_.PenList_swigregister(PenList) class BrushList(GDIObjListBase): @@ -6287,17 +6306,6 @@ class BrushList(GDIObjListBase): """FindOrCreateBrush(self, Colour colour, int style=SOLID) -> Brush""" return _gdi_.BrushList_FindOrCreateBrush(*args, **kwargs) - def AddBrush(*args, **kwargs): - """AddBrush(self, Brush brush)""" - return _gdi_.BrushList_AddBrush(*args, **kwargs) - - def RemoveBrush(*args, **kwargs): - """RemoveBrush(self, Brush brush)""" - return _gdi_.BrushList_RemoveBrush(*args, **kwargs) - - AddBrush = wx._deprecated(AddBrush) - RemoveBrush = wx._deprecated(RemoveBrush) - _gdi_.BrushList_swigregister(BrushList) class FontList(GDIObjListBase): @@ -6313,17 +6321,6 @@ class FontList(GDIObjListBase): """ return _gdi_.FontList_FindOrCreateFont(*args, **kwargs) - def AddFont(*args, **kwargs): - """AddFont(self, Font font)""" - return _gdi_.FontList_AddFont(*args, **kwargs) - - def RemoveFont(*args, **kwargs): - """RemoveFont(self, Font font)""" - return _gdi_.FontList_RemoveFont(*args, **kwargs) - - AddFont = wx._deprecated(AddFont) - RemoveFont = wx._deprecated(RemoveFont) - _gdi_.FontList_swigregister(FontList) class ColourDatabase(object): diff --git a/wxPython/src/mac/_gdi_wrap.cpp b/wxPython/src/mac/_gdi_wrap.cpp index 6b4e49788f..edf6af9b78 100644 --- a/wxPython/src/mac/_gdi_wrap.cpp +++ b/wxPython/src/mac/_gdi_wrap.cpp @@ -2486,155 +2486,154 @@ SWIG_Python_MustGetPtr(PyObject *obj, swig_type_info *ty, int argnum, int flags) #define SWIGTYPE_p_wxBufferedDC swig_types[20] #define SWIGTYPE_p_wxBufferedPaintDC swig_types[21] #define SWIGTYPE_p_wxCURHandler swig_types[22] -#define SWIGTYPE_p_wxChar swig_types[23] -#define SWIGTYPE_p_wxChildFocusEvent swig_types[24] -#define SWIGTYPE_p_wxClientDC swig_types[25] -#define SWIGTYPE_p_wxClipboardTextEvent swig_types[26] -#define SWIGTYPE_p_wxCloseEvent swig_types[27] -#define SWIGTYPE_p_wxColour swig_types[28] -#define SWIGTYPE_p_wxColourDatabase swig_types[29] -#define SWIGTYPE_p_wxCommandEvent swig_types[30] -#define SWIGTYPE_p_wxContextMenuEvent swig_types[31] -#define SWIGTYPE_p_wxControl swig_types[32] -#define SWIGTYPE_p_wxControlWithItems swig_types[33] -#define SWIGTYPE_p_wxCursor swig_types[34] -#define SWIGTYPE_p_wxDC swig_types[35] -#define SWIGTYPE_p_wxDCBrushChanger swig_types[36] -#define SWIGTYPE_p_wxDCClipper swig_types[37] -#define SWIGTYPE_p_wxDCOverlay swig_types[38] -#define SWIGTYPE_p_wxDCPenChanger swig_types[39] -#define SWIGTYPE_p_wxDCTextColourChanger swig_types[40] -#define SWIGTYPE_p_wxDash swig_types[41] -#define SWIGTYPE_p_wxDateEvent swig_types[42] -#define SWIGTYPE_p_wxDisplayChangedEvent swig_types[43] -#define SWIGTYPE_p_wxDropFilesEvent swig_types[44] -#define SWIGTYPE_p_wxDuplexMode swig_types[45] -#define SWIGTYPE_p_wxEffects swig_types[46] -#define SWIGTYPE_p_wxEncodingConverter swig_types[47] -#define SWIGTYPE_p_wxEraseEvent swig_types[48] -#define SWIGTYPE_p_wxEvent swig_types[49] -#define SWIGTYPE_p_wxEventBlocker swig_types[50] -#define SWIGTYPE_p_wxEvtHandler swig_types[51] -#define SWIGTYPE_p_wxFSFile swig_types[52] -#define SWIGTYPE_p_wxFileSystem swig_types[53] -#define SWIGTYPE_p_wxFlexGridSizer swig_types[54] -#define SWIGTYPE_p_wxFocusEvent swig_types[55] -#define SWIGTYPE_p_wxFont swig_types[56] -#define SWIGTYPE_p_wxFontList swig_types[57] -#define SWIGTYPE_p_wxFontMapper swig_types[58] -#define SWIGTYPE_p_wxGBSizerItem swig_types[59] -#define SWIGTYPE_p_wxGCDC swig_types[60] -#define SWIGTYPE_p_wxGDIObjListBase swig_types[61] -#define SWIGTYPE_p_wxGDIObject swig_types[62] -#define SWIGTYPE_p_wxGIFHandler swig_types[63] -#define SWIGTYPE_p_wxGraphicsBrush swig_types[64] -#define SWIGTYPE_p_wxGraphicsContext swig_types[65] -#define SWIGTYPE_p_wxGraphicsFont swig_types[66] -#define SWIGTYPE_p_wxGraphicsMatrix swig_types[67] -#define SWIGTYPE_p_wxGraphicsObject swig_types[68] -#define SWIGTYPE_p_wxGraphicsPath swig_types[69] -#define SWIGTYPE_p_wxGraphicsPen swig_types[70] -#define SWIGTYPE_p_wxGraphicsRenderer swig_types[71] -#define SWIGTYPE_p_wxGridBagSizer swig_types[72] -#define SWIGTYPE_p_wxGridSizer swig_types[73] -#define SWIGTYPE_p_wxHeaderButtonParams swig_types[74] -#define SWIGTYPE_p_wxICOHandler swig_types[75] -#define SWIGTYPE_p_wxIcon swig_types[76] -#define SWIGTYPE_p_wxIconBundle swig_types[77] -#define SWIGTYPE_p_wxIconLocation swig_types[78] -#define SWIGTYPE_p_wxIconizeEvent swig_types[79] -#define SWIGTYPE_p_wxIdleEvent swig_types[80] -#define SWIGTYPE_p_wxImage swig_types[81] -#define SWIGTYPE_p_wxImageHandler swig_types[82] -#define SWIGTYPE_p_wxImageList swig_types[83] -#define SWIGTYPE_p_wxIndividualLayoutConstraint swig_types[84] -#define SWIGTYPE_p_wxInitDialogEvent swig_types[85] -#define SWIGTYPE_p_wxJPEGHandler swig_types[86] -#define SWIGTYPE_p_wxKeyEvent swig_types[87] -#define SWIGTYPE_p_wxLanguageInfo swig_types[88] -#define SWIGTYPE_p_wxLayoutConstraints swig_types[89] -#define SWIGTYPE_p_wxLocale swig_types[90] -#define SWIGTYPE_p_wxMask swig_types[91] -#define SWIGTYPE_p_wxMaximizeEvent swig_types[92] -#define SWIGTYPE_p_wxMemoryDC swig_types[93] -#define SWIGTYPE_p_wxMenu swig_types[94] -#define SWIGTYPE_p_wxMenuBar swig_types[95] -#define SWIGTYPE_p_wxMenuEvent swig_types[96] -#define SWIGTYPE_p_wxMenuItem swig_types[97] -#define SWIGTYPE_p_wxMetaFile swig_types[98] -#define SWIGTYPE_p_wxMetaFileDC swig_types[99] -#define SWIGTYPE_p_wxMirrorDC swig_types[100] -#define SWIGTYPE_p_wxMouseCaptureChangedEvent swig_types[101] -#define SWIGTYPE_p_wxMouseCaptureLostEvent swig_types[102] -#define SWIGTYPE_p_wxMouseEvent swig_types[103] -#define SWIGTYPE_p_wxMoveEvent swig_types[104] -#define SWIGTYPE_p_wxNativeEncodingInfo swig_types[105] -#define SWIGTYPE_p_wxNativeFontInfo swig_types[106] -#define SWIGTYPE_p_wxNativePixelData swig_types[107] -#define SWIGTYPE_p_wxNativePixelData_Accessor swig_types[108] -#define SWIGTYPE_p_wxNavigationKeyEvent swig_types[109] -#define SWIGTYPE_p_wxNcPaintEvent swig_types[110] -#define SWIGTYPE_p_wxNotifyEvent swig_types[111] -#define SWIGTYPE_p_wxObject swig_types[112] -#define SWIGTYPE_p_wxOverlay swig_types[113] -#define SWIGTYPE_p_wxPCXHandler swig_types[114] -#define SWIGTYPE_p_wxPNGHandler swig_types[115] -#define SWIGTYPE_p_wxPNMHandler swig_types[116] -#define SWIGTYPE_p_wxPaintDC swig_types[117] -#define SWIGTYPE_p_wxPaintEvent swig_types[118] -#define SWIGTYPE_p_wxPalette swig_types[119] -#define SWIGTYPE_p_wxPaletteChangedEvent swig_types[120] -#define SWIGTYPE_p_wxPaperSize swig_types[121] -#define SWIGTYPE_p_wxPen swig_types[122] -#define SWIGTYPE_p_wxPenList swig_types[123] -#define SWIGTYPE_p_wxPixelDataBase swig_types[124] -#define SWIGTYPE_p_wxPoint swig_types[125] -#define SWIGTYPE_p_wxPoint2D swig_types[126] -#define SWIGTYPE_p_wxPostScriptDC swig_types[127] -#define SWIGTYPE_p_wxPrintData swig_types[128] -#define SWIGTYPE_p_wxPrinterDC swig_types[129] -#define SWIGTYPE_p_wxPseudoDC swig_types[130] -#define SWIGTYPE_p_wxPyApp swig_types[131] -#define SWIGTYPE_p_wxPyCommandEvent swig_types[132] -#define SWIGTYPE_p_wxPyEvent swig_types[133] -#define SWIGTYPE_p_wxPyFontEnumerator swig_types[134] -#define SWIGTYPE_p_wxPyImageHandler swig_types[135] -#define SWIGTYPE_p_wxPyLocale swig_types[136] -#define SWIGTYPE_p_wxPySizer swig_types[137] -#define SWIGTYPE_p_wxPyValidator swig_types[138] -#define SWIGTYPE_p_wxQueryNewPaletteEvent swig_types[139] -#define SWIGTYPE_p_wxRect swig_types[140] -#define SWIGTYPE_p_wxRect2D swig_types[141] -#define SWIGTYPE_p_wxRegion swig_types[142] -#define SWIGTYPE_p_wxRegionIterator swig_types[143] -#define SWIGTYPE_p_wxRendererNative swig_types[144] -#define SWIGTYPE_p_wxRendererVersion swig_types[145] -#define SWIGTYPE_p_wxScreenDC swig_types[146] -#define SWIGTYPE_p_wxScrollEvent swig_types[147] -#define SWIGTYPE_p_wxScrollWinEvent swig_types[148] -#define SWIGTYPE_p_wxSetCursorEvent swig_types[149] -#define SWIGTYPE_p_wxShowEvent swig_types[150] -#define SWIGTYPE_p_wxSize swig_types[151] -#define SWIGTYPE_p_wxSizeEvent swig_types[152] -#define SWIGTYPE_p_wxSizer swig_types[153] -#define SWIGTYPE_p_wxSizerItem swig_types[154] -#define SWIGTYPE_p_wxSplitterRenderParams swig_types[155] -#define SWIGTYPE_p_wxStaticBoxSizer swig_types[156] -#define SWIGTYPE_p_wxStdDialogButtonSizer swig_types[157] -#define SWIGTYPE_p_wxStockGDI swig_types[158] -#define SWIGTYPE_p_wxString swig_types[159] -#define SWIGTYPE_p_wxSysColourChangedEvent swig_types[160] -#define SWIGTYPE_p_wxTGAHandler swig_types[161] -#define SWIGTYPE_p_wxTIFFHandler swig_types[162] -#define SWIGTYPE_p_wxUpdateUIEvent swig_types[163] -#define SWIGTYPE_p_wxValidator swig_types[164] -#define SWIGTYPE_p_wxWindow swig_types[165] -#define SWIGTYPE_p_wxWindowCreateEvent swig_types[166] -#define SWIGTYPE_p_wxWindowDC swig_types[167] -#define SWIGTYPE_p_wxWindowDestroyEvent swig_types[168] -#define SWIGTYPE_p_wxXPMHandler swig_types[169] -static swig_type_info *swig_types[171]; -static swig_module_info swig_module = {swig_types, 170, 0, 0, 0, 0}; +#define SWIGTYPE_p_wxChildFocusEvent swig_types[23] +#define SWIGTYPE_p_wxClientDC swig_types[24] +#define SWIGTYPE_p_wxClipboardTextEvent swig_types[25] +#define SWIGTYPE_p_wxCloseEvent swig_types[26] +#define SWIGTYPE_p_wxColour swig_types[27] +#define SWIGTYPE_p_wxColourDatabase swig_types[28] +#define SWIGTYPE_p_wxCommandEvent swig_types[29] +#define SWIGTYPE_p_wxContextMenuEvent swig_types[30] +#define SWIGTYPE_p_wxControl swig_types[31] +#define SWIGTYPE_p_wxControlWithItems swig_types[32] +#define SWIGTYPE_p_wxCursor swig_types[33] +#define SWIGTYPE_p_wxDC swig_types[34] +#define SWIGTYPE_p_wxDCBrushChanger swig_types[35] +#define SWIGTYPE_p_wxDCClipper swig_types[36] +#define SWIGTYPE_p_wxDCOverlay swig_types[37] +#define SWIGTYPE_p_wxDCPenChanger swig_types[38] +#define SWIGTYPE_p_wxDCTextColourChanger swig_types[39] +#define SWIGTYPE_p_wxDash swig_types[40] +#define SWIGTYPE_p_wxDateEvent swig_types[41] +#define SWIGTYPE_p_wxDisplayChangedEvent swig_types[42] +#define SWIGTYPE_p_wxDropFilesEvent swig_types[43] +#define SWIGTYPE_p_wxDuplexMode swig_types[44] +#define SWIGTYPE_p_wxEffects swig_types[45] +#define SWIGTYPE_p_wxEncodingConverter swig_types[46] +#define SWIGTYPE_p_wxEraseEvent swig_types[47] +#define SWIGTYPE_p_wxEvent swig_types[48] +#define SWIGTYPE_p_wxEventBlocker swig_types[49] +#define SWIGTYPE_p_wxEvtHandler swig_types[50] +#define SWIGTYPE_p_wxFSFile swig_types[51] +#define SWIGTYPE_p_wxFileSystem swig_types[52] +#define SWIGTYPE_p_wxFlexGridSizer swig_types[53] +#define SWIGTYPE_p_wxFocusEvent swig_types[54] +#define SWIGTYPE_p_wxFont swig_types[55] +#define SWIGTYPE_p_wxFontList swig_types[56] +#define SWIGTYPE_p_wxFontMapper swig_types[57] +#define SWIGTYPE_p_wxGBSizerItem swig_types[58] +#define SWIGTYPE_p_wxGCDC swig_types[59] +#define SWIGTYPE_p_wxGDIObjListBase swig_types[60] +#define SWIGTYPE_p_wxGDIObject swig_types[61] +#define SWIGTYPE_p_wxGIFHandler swig_types[62] +#define SWIGTYPE_p_wxGraphicsBrush swig_types[63] +#define SWIGTYPE_p_wxGraphicsContext swig_types[64] +#define SWIGTYPE_p_wxGraphicsFont swig_types[65] +#define SWIGTYPE_p_wxGraphicsMatrix swig_types[66] +#define SWIGTYPE_p_wxGraphicsObject swig_types[67] +#define SWIGTYPE_p_wxGraphicsPath swig_types[68] +#define SWIGTYPE_p_wxGraphicsPen swig_types[69] +#define SWIGTYPE_p_wxGraphicsRenderer swig_types[70] +#define SWIGTYPE_p_wxGridBagSizer swig_types[71] +#define SWIGTYPE_p_wxGridSizer swig_types[72] +#define SWIGTYPE_p_wxHeaderButtonParams swig_types[73] +#define SWIGTYPE_p_wxICOHandler swig_types[74] +#define SWIGTYPE_p_wxIcon swig_types[75] +#define SWIGTYPE_p_wxIconBundle swig_types[76] +#define SWIGTYPE_p_wxIconLocation swig_types[77] +#define SWIGTYPE_p_wxIconizeEvent swig_types[78] +#define SWIGTYPE_p_wxIdleEvent swig_types[79] +#define SWIGTYPE_p_wxImage swig_types[80] +#define SWIGTYPE_p_wxImageHandler swig_types[81] +#define SWIGTYPE_p_wxImageList swig_types[82] +#define SWIGTYPE_p_wxIndividualLayoutConstraint swig_types[83] +#define SWIGTYPE_p_wxInitDialogEvent swig_types[84] +#define SWIGTYPE_p_wxJPEGHandler swig_types[85] +#define SWIGTYPE_p_wxKeyEvent swig_types[86] +#define SWIGTYPE_p_wxLanguageInfo swig_types[87] +#define SWIGTYPE_p_wxLayoutConstraints swig_types[88] +#define SWIGTYPE_p_wxLocale swig_types[89] +#define SWIGTYPE_p_wxMask swig_types[90] +#define SWIGTYPE_p_wxMaximizeEvent swig_types[91] +#define SWIGTYPE_p_wxMemoryDC swig_types[92] +#define SWIGTYPE_p_wxMenu swig_types[93] +#define SWIGTYPE_p_wxMenuBar swig_types[94] +#define SWIGTYPE_p_wxMenuEvent swig_types[95] +#define SWIGTYPE_p_wxMenuItem swig_types[96] +#define SWIGTYPE_p_wxMetaFile swig_types[97] +#define SWIGTYPE_p_wxMetaFileDC swig_types[98] +#define SWIGTYPE_p_wxMirrorDC swig_types[99] +#define SWIGTYPE_p_wxMouseCaptureChangedEvent swig_types[100] +#define SWIGTYPE_p_wxMouseCaptureLostEvent swig_types[101] +#define SWIGTYPE_p_wxMouseEvent swig_types[102] +#define SWIGTYPE_p_wxMoveEvent swig_types[103] +#define SWIGTYPE_p_wxNativeEncodingInfo swig_types[104] +#define SWIGTYPE_p_wxNativeFontInfo swig_types[105] +#define SWIGTYPE_p_wxNativePixelData swig_types[106] +#define SWIGTYPE_p_wxNativePixelData_Accessor swig_types[107] +#define SWIGTYPE_p_wxNavigationKeyEvent swig_types[108] +#define SWIGTYPE_p_wxNcPaintEvent swig_types[109] +#define SWIGTYPE_p_wxNotifyEvent swig_types[110] +#define SWIGTYPE_p_wxObject swig_types[111] +#define SWIGTYPE_p_wxOverlay swig_types[112] +#define SWIGTYPE_p_wxPCXHandler swig_types[113] +#define SWIGTYPE_p_wxPNGHandler swig_types[114] +#define SWIGTYPE_p_wxPNMHandler swig_types[115] +#define SWIGTYPE_p_wxPaintDC swig_types[116] +#define SWIGTYPE_p_wxPaintEvent swig_types[117] +#define SWIGTYPE_p_wxPalette swig_types[118] +#define SWIGTYPE_p_wxPaletteChangedEvent swig_types[119] +#define SWIGTYPE_p_wxPaperSize swig_types[120] +#define SWIGTYPE_p_wxPen swig_types[121] +#define SWIGTYPE_p_wxPenList swig_types[122] +#define SWIGTYPE_p_wxPixelDataBase swig_types[123] +#define SWIGTYPE_p_wxPoint swig_types[124] +#define SWIGTYPE_p_wxPoint2D swig_types[125] +#define SWIGTYPE_p_wxPostScriptDC swig_types[126] +#define SWIGTYPE_p_wxPrintData swig_types[127] +#define SWIGTYPE_p_wxPrinterDC swig_types[128] +#define SWIGTYPE_p_wxPseudoDC swig_types[129] +#define SWIGTYPE_p_wxPyApp swig_types[130] +#define SWIGTYPE_p_wxPyCommandEvent swig_types[131] +#define SWIGTYPE_p_wxPyEvent swig_types[132] +#define SWIGTYPE_p_wxPyFontEnumerator swig_types[133] +#define SWIGTYPE_p_wxPyImageHandler swig_types[134] +#define SWIGTYPE_p_wxPyLocale swig_types[135] +#define SWIGTYPE_p_wxPySizer swig_types[136] +#define SWIGTYPE_p_wxPyValidator swig_types[137] +#define SWIGTYPE_p_wxQueryNewPaletteEvent swig_types[138] +#define SWIGTYPE_p_wxRect swig_types[139] +#define SWIGTYPE_p_wxRect2D swig_types[140] +#define SWIGTYPE_p_wxRegion swig_types[141] +#define SWIGTYPE_p_wxRegionIterator swig_types[142] +#define SWIGTYPE_p_wxRendererNative swig_types[143] +#define SWIGTYPE_p_wxRendererVersion swig_types[144] +#define SWIGTYPE_p_wxScreenDC swig_types[145] +#define SWIGTYPE_p_wxScrollEvent swig_types[146] +#define SWIGTYPE_p_wxScrollWinEvent swig_types[147] +#define SWIGTYPE_p_wxSetCursorEvent swig_types[148] +#define SWIGTYPE_p_wxShowEvent swig_types[149] +#define SWIGTYPE_p_wxSize swig_types[150] +#define SWIGTYPE_p_wxSizeEvent swig_types[151] +#define SWIGTYPE_p_wxSizer swig_types[152] +#define SWIGTYPE_p_wxSizerItem swig_types[153] +#define SWIGTYPE_p_wxSplitterRenderParams swig_types[154] +#define SWIGTYPE_p_wxStaticBoxSizer swig_types[155] +#define SWIGTYPE_p_wxStdDialogButtonSizer swig_types[156] +#define SWIGTYPE_p_wxStockGDI swig_types[157] +#define SWIGTYPE_p_wxString swig_types[158] +#define SWIGTYPE_p_wxSysColourChangedEvent swig_types[159] +#define SWIGTYPE_p_wxTGAHandler swig_types[160] +#define SWIGTYPE_p_wxTIFFHandler swig_types[161] +#define SWIGTYPE_p_wxUpdateUIEvent swig_types[162] +#define SWIGTYPE_p_wxValidator swig_types[163] +#define SWIGTYPE_p_wxWindow swig_types[164] +#define SWIGTYPE_p_wxWindowCreateEvent swig_types[165] +#define SWIGTYPE_p_wxWindowDC swig_types[166] +#define SWIGTYPE_p_wxWindowDestroyEvent swig_types[167] +#define SWIGTYPE_p_wxXPMHandler swig_types[168] +static swig_type_info *swig_types[170]; +static swig_module_info swig_module = {swig_types, 169, 0, 0, 0, 0}; #define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name) #define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name) @@ -3394,8 +3393,8 @@ SWIGINTERN wxLocale *new_wxLocale(int language=-1,int flags=wxLOCALE_LOAD_DEFAUL #endif return loc; } -SWIGINTERN bool wxLocale_Init1(wxLocale *self,wxString const &szName,wxString const &szShort=wxPyEmptyString,wxString const &szLocale=wxPyEmptyString,bool bLoadDefault=true,bool bConvertEncoding=false){ - bool rc = self->Init(szName, szShort, szLocale, bLoadDefault, bConvertEncoding); +SWIGINTERN bool wxLocale_Init1(wxLocale *self,wxString const &name,wxString const &shortName=wxPyEmptyString,wxString const &locale=wxPyEmptyString,bool bLoadDefault=true,bool bConvertEncoding=false){ + bool rc = self->Init(name, shortName, locale, bLoadDefault, bConvertEncoding); // Python before 2.4 needs to have LC_NUMERIC set to "C" in order // for the floating point conversions and such to work right. #if PY_VERSION_HEX < 0x02040000 @@ -3418,28 +3417,31 @@ class wxPyLocale : public wxLocale public: wxPyLocale(); - wxPyLocale(const wxChar *szName, // name (for messages) - const wxChar *szShort = (const wxChar *) NULL, // dir prefix (for msg files) - const wxChar *szLocale = (const wxChar *) NULL, // locale (for setlocale) - bool bLoadDefault = true, // preload wxstd.mo? - bool bConvertEncoding = false); // convert Win<->Unix if necessary? + wxPyLocale(const wxString& name, // name (for messages) + const wxString& shortName = wxPyEmptyString, // dir prefix (for msg files) + const wxString& locale = wxPyEmptyString, // locale (for setlocale) + bool bLoadDefault = true, // preload wxstd.mo? + bool bConvertEncoding = false); // convert Win<->Unix if necessary? wxPyLocale(int language, // wxLanguage id or custom language - int flags = wxLOCALE_LOAD_DEFAULT | wxLOCALE_CONV_ENCODING); + int flags = wxLOCALE_LOAD_DEFAULT | wxLOCALE_CONV_ENCODING); ~wxPyLocale(); - virtual const wxChar *GetString(const wxChar *szOrigString, - const wxChar *szDomain = NULL) const; - virtual const wxChar *GetString(const wxChar *szOrigString, - const wxChar *szOrigString2, size_t n, - const wxChar *szDomain = NULL) const; - - virtual wxChar *GetSingularString(const wxChar *szOrigString, - const wxChar *szDomain = NULL) const; - virtual wxChar *GetPluralString(const wxChar *szOrigString, - const wxChar *szOrigString2, size_t n, - const wxChar *szDomain = NULL) const; + virtual const wxString& GetString(const wxString& origString, + const wxString& domain = wxPyEmptyString) const; + virtual const wxString& GetString(const wxString& origString, + const wxString& origString2, + size_t n, + const wxString& domain = wxPyEmptyString) const; + + virtual const wxString& GetSingularString(const wxString& origString, + const wxString& domain = wxPyEmptyString) const; + virtual const wxString& GetPluralString(const wxString& origString, + const wxString& origString2, + size_t n, + const wxString& domain = wxPyEmptyString) const; + PYPRIVATE; private: @@ -3450,12 +3452,12 @@ wxPyLocale::wxPyLocale() : wxLocale() { } -wxPyLocale::wxPyLocale(const wxChar *szName, // name (for messages) - const wxChar *szShort, // dir prefix (for msg files) - const wxChar *szLocale, // locale (for setlocale) - bool bLoadDefault, // preload wxstd.mo? - bool bConvertEncoding) // convert Win<->Unix if necessary? - : wxLocale(szName, szShort, szLocale, bLoadDefault, bConvertEncoding) +wxPyLocale::wxPyLocale(const wxString& name, // name (for messages) + const wxString& shortName, // dir prefix (for msg files) + const wxString& locale, // locale (for setlocale) + bool bLoadDefault, // preload wxstd.mo? + bool bConvertEncoding) // convert Win<->Unix if necessary? + : wxLocale(name, shortName, locale, bLoadDefault, bConvertEncoding) { } @@ -3468,31 +3470,29 @@ wxPyLocale::~wxPyLocale() { } -const wxChar *wxPyLocale::GetString(const wxChar *szOrigString, - const wxChar *szDomain) const +const wxString& wxPyLocale::GetString(const wxString& origString, + const wxString& domain) const { - wxChar *str = GetSingularString(szOrigString, szDomain); - return (str != NULL) ? str : wxLocale::GetString(szOrigString, szDomain); + return GetSingularString(origString, domain); } -const wxChar *wxPyLocale::GetString(const wxChar *szOrigString, - const wxChar *szOrigString2, size_t n, - const wxChar *szDomain) const +const wxString& wxPyLocale::GetString(const wxString& origString, + const wxString& origString2, + size_t n, + const wxString& domain) const { - wxChar *str = GetPluralString(szOrigString, szOrigString2, n, szDomain); - return (str != NULL) ? str : wxLocale::GetString(szOrigString, szOrigString2, n, szDomain); + return GetPluralString(origString, origString2, n, domain); } -wxChar *wxPyLocale::GetSingularString(const wxChar *szOrigString, - const wxChar *szDomain) const +const wxString& wxPyLocale::GetSingularString(const wxString& origString, + const wxString& domain) const { bool found; - static wxString str; - str = _T("error in translation"); // when the first if condition is true but the second if condition is not we do not want to return the previously queried string. + wxString str( _T("error in translation")); wxPyBlock_t blocked = wxPyBeginBlockThreads(); - if((found=wxPyCBH_findCallback(m_myInst, "GetSingularString"))) { - PyObject* param1 = wx2PyString(szOrigString); - PyObject* param2 = wx2PyString(szDomain); + if ((found=wxPyCBH_findCallback(m_myInst, "GetSingularString"))) { + PyObject* param1 = wx2PyString(origString); + PyObject* param2 = wx2PyString(domain); PyObject* ret = wxPyCBH_callCallbackObj(m_myInst, Py_BuildValue("(OO)", param1, param2)); Py_DECREF(param1); Py_DECREF(param2); @@ -3502,22 +3502,24 @@ wxChar *wxPyLocale::GetSingularString(const wxChar *szOrigString, } } wxPyEndBlockThreads(blocked); - return (found ? (wxChar*)str.c_str() : NULL); + return (found ? str : wxLocale::GetString(origString, domain)); } -wxChar *wxPyLocale::GetPluralString(const wxChar *szOrigString, - const wxChar *szOrigString2, size_t n, - const wxChar *szDomain) const +const wxString& wxPyLocale::GetPluralString(const wxString& origString, + const wxString& origString2, size_t n, + const wxString& domain) const { bool found; - static wxString str; - str = _T("error in translation"); // when the first if condition is true but the second if condition is not we do not want to return the previously queried string. + wxString str( _T("error in translation")); wxPyBlock_t blocked = wxPyBeginBlockThreads(); - if((found=wxPyCBH_findCallback(m_myInst, "GetPluralString"))) { - PyObject* param1 = wx2PyString(szOrigString); - PyObject* param2 = wx2PyString(szOrigString2); - PyObject* param4 = wx2PyString(szDomain); - PyObject* ret = wxPyCBH_callCallbackObj(m_myInst, Py_BuildValue("(OOiO)", param1, param2, (int)n, param4)); + if ((found=wxPyCBH_findCallback(m_myInst, "GetPluralString"))) { + PyObject* param1 = wx2PyString(origString); + PyObject* param2 = wx2PyString(origString2); + PyObject* param4 = wx2PyString(domain); + PyObject* ret = wxPyCBH_callCallbackObj(m_myInst, + Py_BuildValue("(OOiO)", + param1, param2, + (int)n, param4)); Py_DECREF(param1); Py_DECREF(param2); Py_DECREF(param4); @@ -3527,7 +3529,7 @@ wxChar *wxPyLocale::GetPluralString(const wxChar *szOrigString, } } wxPyEndBlockThreads(blocked); - return (found ? (wxChar*)str.c_str() : NULL); + return (found ? str : wxLocale::GetString(origString, origString2, n, domain) ); } SWIGINTERN wxPyLocale *new_wxPyLocale(int language=-1,int flags=wxLOCALE_LOAD_DEFAULT|wxLOCALE_CONV_ENCODING){ @@ -15969,7 +15971,7 @@ SWIGINTERN PyObject *_wrap_Locale_Init1(PyObject *SWIGUNUSEDPARM(self), PyObject PyObject * obj4 = 0 ; PyObject * obj5 = 0 ; char * kwnames[] = { - (char *) "self",(char *) "szName",(char *) "szShort",(char *) "szLocale",(char *) "bLoadDefault",(char *) "bConvertEncoding", NULL + (char *) "self",(char *) "name",(char *) "shortName",(char *) "locale",(char *) "bLoadDefault",(char *) "bConvertEncoding", NULL }; if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|OOOO:Locale_Init1",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail; @@ -16371,7 +16373,7 @@ SWIGINTERN PyObject *_wrap_Locale_AddCatalog(PyObject *SWIGUNUSEDPARM(self), PyO PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; char * kwnames[] = { - (char *) "self",(char *) "szDomain", NULL + (char *) "self",(char *) "domain", NULL }; if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:Locale_AddCatalog",kwnames,&obj0,&obj1)) SWIG_fail; @@ -16451,7 +16453,7 @@ SWIGINTERN PyObject *_wrap_Locale_IsLoaded(PyObject *SWIGUNUSEDPARM(self), PyObj PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; char * kwnames[] = { - (char *) "self",(char *) "szDomain", NULL + (char *) "self",(char *) "domain", NULL }; if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:Locale_IsLoaded",kwnames,&obj0,&obj1)) SWIG_fail; @@ -16638,7 +16640,7 @@ SWIGINTERN PyObject *_wrap_Locale_GetString(PyObject *SWIGUNUSEDPARM(self), PyOb PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; char * kwnames[] = { - (char *) "self",(char *) "szOrigString",(char *) "szDomain", NULL + (char *) "self",(char *) "origString",(char *) "domain", NULL }; if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|O:Locale_GetString",kwnames,&obj0,&obj1,&obj2)) SWIG_fail; @@ -16851,20 +16853,19 @@ fail: SWIGINTERN PyObject *_wrap_PyLocale_GetSingularString(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { PyObject *resultobj = 0; wxPyLocale *arg1 = (wxPyLocale *) 0 ; - wxChar *arg2 = (wxChar *) 0 ; - wxChar *arg3 = (wxChar *) NULL ; - wxChar *result = 0 ; + wxString *arg2 = 0 ; + wxString const &arg3_defvalue = wxPyEmptyString ; + wxString *arg3 = (wxString *) &arg3_defvalue ; + wxString *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - void *argp3 = 0 ; - int res3 = 0 ; + bool temp2 = false ; + bool temp3 = false ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; char * kwnames[] = { - (char *) "self",(char *) "szOrigString",(char *) "szDomain", NULL + (char *) "self",(char *) "origString",(char *) "domain", NULL }; if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|O:PyLocale_GetSingularString",kwnames,&obj0,&obj1,&obj2)) SWIG_fail; @@ -16873,27 +16874,52 @@ SWIGINTERN PyObject *_wrap_PyLocale_GetSingularString(PyObject *SWIGUNUSEDPARM(s SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PyLocale_GetSingularString" "', expected argument " "1"" of type '" "wxPyLocale const *""'"); } arg1 = reinterpret_cast< wxPyLocale * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_wxChar, 0 | 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "PyLocale_GetSingularString" "', expected argument " "2"" of type '" "wxChar const *""'"); + { + arg2 = wxString_in_helper(obj1); + if (arg2 == NULL) SWIG_fail; + temp2 = true; } - arg2 = reinterpret_cast< wxChar * >(argp2); if (obj2) { - res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_wxChar, 0 | 0 ); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "PyLocale_GetSingularString" "', expected argument " "3"" of type '" "wxChar const *""'"); + { + arg3 = wxString_in_helper(obj2); + if (arg3 == NULL) SWIG_fail; + temp3 = true; } - arg3 = reinterpret_cast< wxChar * >(argp3); } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - result = (wxChar *)((wxPyLocale const *)arg1)->GetSingularString((wxChar const *)arg2,(wxChar const *)arg3); + { + wxString const &_result_ref = ((wxPyLocale const *)arg1)->GetSingularString((wxString const &)*arg2,(wxString const &)*arg3); + result = (wxString *) &_result_ref; + } wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) SWIG_fail; } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_wxChar, 0 | 0 ); + { +#if wxUSE_UNICODE + resultobj = PyUnicode_FromWideChar(result->c_str(), result->Len()); +#else + resultobj = PyString_FromStringAndSize(result->c_str(), result->Len()); +#endif + } + { + if (temp2) + delete arg2; + } + { + if (temp3) + delete arg3; + } return resultobj; fail: + { + if (temp2) + delete arg2; + } + { + if (temp3) + delete arg3; + } return NULL; } @@ -16901,28 +16927,26 @@ fail: SWIGINTERN PyObject *_wrap_PyLocale_GetPluralString(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { PyObject *resultobj = 0; wxPyLocale *arg1 = (wxPyLocale *) 0 ; - wxChar *arg2 = (wxChar *) 0 ; - wxChar *arg3 = (wxChar *) 0 ; + wxString *arg2 = 0 ; + wxString *arg3 = 0 ; size_t arg4 ; - wxChar *arg5 = (wxChar *) NULL ; - wxChar *result = 0 ; + wxString const &arg5_defvalue = wxPyEmptyString ; + wxString *arg5 = (wxString *) &arg5_defvalue ; + wxString *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - void *argp3 = 0 ; - int res3 = 0 ; + bool temp2 = false ; + bool temp3 = false ; size_t val4 ; int ecode4 = 0 ; - void *argp5 = 0 ; - int res5 = 0 ; + bool temp5 = false ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; PyObject * obj4 = 0 ; char * kwnames[] = { - (char *) "self",(char *) "szOrigString",(char *) "szOrigString2",(char *) "n",(char *) "szDomain", NULL + (char *) "self",(char *) "origString",(char *) "origString2",(char *) "n",(char *) "domain", NULL }; if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOO|O:PyLocale_GetPluralString",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail; @@ -16931,37 +16955,70 @@ SWIGINTERN PyObject *_wrap_PyLocale_GetPluralString(PyObject *SWIGUNUSEDPARM(sel SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PyLocale_GetPluralString" "', expected argument " "1"" of type '" "wxPyLocale const *""'"); } arg1 = reinterpret_cast< wxPyLocale * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_wxChar, 0 | 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "PyLocale_GetPluralString" "', expected argument " "2"" of type '" "wxChar const *""'"); + { + arg2 = wxString_in_helper(obj1); + if (arg2 == NULL) SWIG_fail; + temp2 = true; } - arg2 = reinterpret_cast< wxChar * >(argp2); - res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_wxChar, 0 | 0 ); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "PyLocale_GetPluralString" "', expected argument " "3"" of type '" "wxChar const *""'"); + { + arg3 = wxString_in_helper(obj2); + if (arg3 == NULL) SWIG_fail; + temp3 = true; } - arg3 = reinterpret_cast< wxChar * >(argp3); ecode4 = SWIG_AsVal_size_t(obj3, &val4); if (!SWIG_IsOK(ecode4)) { SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "PyLocale_GetPluralString" "', expected argument " "4"" of type '" "size_t""'"); } arg4 = static_cast< size_t >(val4); if (obj4) { - res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_wxChar, 0 | 0 ); - if (!SWIG_IsOK(res5)) { - SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "PyLocale_GetPluralString" "', expected argument " "5"" of type '" "wxChar const *""'"); + { + arg5 = wxString_in_helper(obj4); + if (arg5 == NULL) SWIG_fail; + temp5 = true; } - arg5 = reinterpret_cast< wxChar * >(argp5); } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - result = (wxChar *)((wxPyLocale const *)arg1)->GetPluralString((wxChar const *)arg2,(wxChar const *)arg3,arg4,(wxChar const *)arg5); + { + wxString const &_result_ref = ((wxPyLocale const *)arg1)->GetPluralString((wxString const &)*arg2,(wxString const &)*arg3,arg4,(wxString const &)*arg5); + result = (wxString *) &_result_ref; + } wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) SWIG_fail; } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_wxChar, 0 | 0 ); + { +#if wxUSE_UNICODE + resultobj = PyUnicode_FromWideChar(result->c_str(), result->Len()); +#else + resultobj = PyString_FromStringAndSize(result->c_str(), result->Len()); +#endif + } + { + if (temp2) + delete arg2; + } + { + if (temp3) + delete arg3; + } + { + if (temp5) + delete arg5; + } return resultobj; fail: + { + if (temp2) + delete arg2; + } + { + if (temp3) + delete arg3; + } + { + if (temp5) + delete arg5; + } return NULL; } @@ -19833,6 +19890,264 @@ fail: } +SWIGINTERN PyObject *_wrap_DC_StretchBlit(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + wxDC *arg1 = (wxDC *) 0 ; + int arg2 ; + int arg3 ; + int arg4 ; + int arg5 ; + wxDC *arg6 = (wxDC *) 0 ; + int arg7 ; + int arg8 ; + int arg9 ; + int arg10 ; + int arg11 = (int) wxCOPY ; + bool arg12 = (bool) false ; + int arg13 = (int) wxDefaultCoord ; + int arg14 = (int) wxDefaultCoord ; + bool result; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + int val3 ; + int ecode3 = 0 ; + int val4 ; + int ecode4 = 0 ; + int val5 ; + int ecode5 = 0 ; + void *argp6 = 0 ; + int res6 = 0 ; + int val7 ; + int ecode7 = 0 ; + int val8 ; + int ecode8 = 0 ; + int val9 ; + int ecode9 = 0 ; + int val10 ; + int ecode10 = 0 ; + int val11 ; + int ecode11 = 0 ; + bool val12 ; + int ecode12 = 0 ; + int val13 ; + int ecode13 = 0 ; + int val14 ; + int ecode14 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; + PyObject * obj4 = 0 ; + PyObject * obj5 = 0 ; + PyObject * obj6 = 0 ; + PyObject * obj7 = 0 ; + PyObject * obj8 = 0 ; + PyObject * obj9 = 0 ; + PyObject * obj10 = 0 ; + PyObject * obj11 = 0 ; + PyObject * obj12 = 0 ; + PyObject * obj13 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "dstX",(char *) "dstY",(char *) "dstWidth",(char *) "dstHeight",(char *) "source",(char *) "srcX",(char *) "srcY",(char *) "srcWidth",(char *) "srcHeight",(char *) "rop",(char *) "useMask",(char *) "srcMaskX",(char *) "srcMaskY", NULL + }; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOOOOOOOO|OOOO:DC_StretchBlit",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8,&obj9,&obj10,&obj11,&obj12,&obj13)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_wxDC, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DC_StretchBlit" "', expected argument " "1"" of type '" "wxDC *""'"); + } + arg1 = reinterpret_cast< wxDC * >(argp1); + ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "DC_StretchBlit" "', expected argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + ecode3 = SWIG_AsVal_int(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "DC_StretchBlit" "', expected argument " "3"" of type '" "int""'"); + } + arg3 = static_cast< int >(val3); + ecode4 = SWIG_AsVal_int(obj3, &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "DC_StretchBlit" "', expected argument " "4"" of type '" "int""'"); + } + arg4 = static_cast< int >(val4); + ecode5 = SWIG_AsVal_int(obj4, &val5); + if (!SWIG_IsOK(ecode5)) { + SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "DC_StretchBlit" "', expected argument " "5"" of type '" "int""'"); + } + arg5 = static_cast< int >(val5); + res6 = SWIG_ConvertPtr(obj5, &argp6,SWIGTYPE_p_wxDC, 0 | 0 ); + if (!SWIG_IsOK(res6)) { + SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "DC_StretchBlit" "', expected argument " "6"" of type '" "wxDC *""'"); + } + arg6 = reinterpret_cast< wxDC * >(argp6); + ecode7 = SWIG_AsVal_int(obj6, &val7); + if (!SWIG_IsOK(ecode7)) { + SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "DC_StretchBlit" "', expected argument " "7"" of type '" "int""'"); + } + arg7 = static_cast< int >(val7); + ecode8 = SWIG_AsVal_int(obj7, &val8); + if (!SWIG_IsOK(ecode8)) { + SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "DC_StretchBlit" "', expected argument " "8"" of type '" "int""'"); + } + arg8 = static_cast< int >(val8); + ecode9 = SWIG_AsVal_int(obj8, &val9); + if (!SWIG_IsOK(ecode9)) { + SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "DC_StretchBlit" "', expected argument " "9"" of type '" "int""'"); + } + arg9 = static_cast< int >(val9); + ecode10 = SWIG_AsVal_int(obj9, &val10); + if (!SWIG_IsOK(ecode10)) { + SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "DC_StretchBlit" "', expected argument " "10"" of type '" "int""'"); + } + arg10 = static_cast< int >(val10); + if (obj10) { + ecode11 = SWIG_AsVal_int(obj10, &val11); + if (!SWIG_IsOK(ecode11)) { + SWIG_exception_fail(SWIG_ArgError(ecode11), "in method '" "DC_StretchBlit" "', expected argument " "11"" of type '" "int""'"); + } + arg11 = static_cast< int >(val11); + } + if (obj11) { + ecode12 = SWIG_AsVal_bool(obj11, &val12); + if (!SWIG_IsOK(ecode12)) { + SWIG_exception_fail(SWIG_ArgError(ecode12), "in method '" "DC_StretchBlit" "', expected argument " "12"" of type '" "bool""'"); + } + arg12 = static_cast< bool >(val12); + } + if (obj12) { + ecode13 = SWIG_AsVal_int(obj12, &val13); + if (!SWIG_IsOK(ecode13)) { + SWIG_exception_fail(SWIG_ArgError(ecode13), "in method '" "DC_StretchBlit" "', expected argument " "13"" of type '" "int""'"); + } + arg13 = static_cast< int >(val13); + } + if (obj13) { + ecode14 = SWIG_AsVal_int(obj13, &val14); + if (!SWIG_IsOK(ecode14)) { + SWIG_exception_fail(SWIG_ArgError(ecode14), "in method '" "DC_StretchBlit" "', expected argument " "14"" of type '" "int""'"); + } + arg14 = static_cast< int >(val14); + } + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + result = (bool)(arg1)->StretchBlit(arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12,arg13,arg14); + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + { + resultobj = result ? Py_True : Py_False; Py_INCREF(resultobj); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_DC_StretchBlitPointSize(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + wxDC *arg1 = (wxDC *) 0 ; + wxPoint *arg2 = 0 ; + wxSize *arg3 = 0 ; + wxDC *arg4 = (wxDC *) 0 ; + wxPoint *arg5 = 0 ; + wxSize *arg6 = 0 ; + int arg7 = (int) wxCOPY ; + bool arg8 = (bool) false ; + wxPoint const &arg9_defvalue = wxDefaultPosition ; + wxPoint *arg9 = (wxPoint *) &arg9_defvalue ; + bool result; + void *argp1 = 0 ; + int res1 = 0 ; + wxPoint temp2 ; + wxSize temp3 ; + void *argp4 = 0 ; + int res4 = 0 ; + wxPoint temp5 ; + wxSize temp6 ; + int val7 ; + int ecode7 = 0 ; + bool val8 ; + int ecode8 = 0 ; + wxPoint temp9 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; + PyObject * obj4 = 0 ; + PyObject * obj5 = 0 ; + PyObject * obj6 = 0 ; + PyObject * obj7 = 0 ; + PyObject * obj8 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "dstPt",(char *) "dstSize",(char *) "source",(char *) "srcPt",(char *) "srcSize",(char *) "rop",(char *) "useMask",(char *) "srcMaskPt", NULL + }; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOOOO|OOO:DC_StretchBlitPointSize",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_wxDC, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DC_StretchBlitPointSize" "', expected argument " "1"" of type '" "wxDC *""'"); + } + arg1 = reinterpret_cast< wxDC * >(argp1); + { + arg2 = &temp2; + if ( ! wxPoint_helper(obj1, &arg2)) SWIG_fail; + } + { + arg3 = &temp3; + if ( ! wxSize_helper(obj2, &arg3)) SWIG_fail; + } + res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_wxDC, 0 | 0 ); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "DC_StretchBlitPointSize" "', expected argument " "4"" of type '" "wxDC *""'"); + } + arg4 = reinterpret_cast< wxDC * >(argp4); + { + arg5 = &temp5; + if ( ! wxPoint_helper(obj4, &arg5)) SWIG_fail; + } + { + arg6 = &temp6; + if ( ! wxSize_helper(obj5, &arg6)) SWIG_fail; + } + if (obj6) { + ecode7 = SWIG_AsVal_int(obj6, &val7); + if (!SWIG_IsOK(ecode7)) { + SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "DC_StretchBlitPointSize" "', expected argument " "7"" of type '" "int""'"); + } + arg7 = static_cast< int >(val7); + } + if (obj7) { + ecode8 = SWIG_AsVal_bool(obj7, &val8); + if (!SWIG_IsOK(ecode8)) { + SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "DC_StretchBlitPointSize" "', expected argument " "8"" of type '" "bool""'"); + } + arg8 = static_cast< bool >(val8); + } + if (obj8) { + { + arg9 = &temp9; + if ( ! wxPoint_helper(obj8, &arg9)) SWIG_fail; + } + } + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + result = (bool)(arg1)->StretchBlit((wxPoint const &)*arg2,(wxSize const &)*arg3,arg4,(wxPoint const &)*arg5,(wxSize const &)*arg6,arg7,arg8,(wxPoint const &)*arg9); + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + { + resultobj = result ? Py_True : Py_False; Py_INCREF(resultobj); + } + return resultobj; +fail: + return NULL; +} + + SWIGINTERN PyObject *_wrap_DC_GetAsBitmap(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { PyObject *resultobj = 0; wxDC *arg1 = (wxDC *) 0 ; @@ -32282,82 +32597,6 @@ fail: } -SWIGINTERN PyObject *_wrap_PenList_AddPen(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - wxPenList *arg1 = (wxPenList *) 0 ; - wxPen *arg2 = (wxPen *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "pen", NULL - }; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:PenList_AddPen",kwnames,&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_wxPenList, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PenList_AddPen" "', expected argument " "1"" of type '" "wxPenList *""'"); - } - arg1 = reinterpret_cast< wxPenList * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_wxPen, 0 | 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "PenList_AddPen" "', expected argument " "2"" of type '" "wxPen *""'"); - } - arg2 = reinterpret_cast< wxPen * >(argp2); - { - PyThreadState* __tstate = wxPyBeginAllowThreads(); - (arg1)->AddPen(arg2); - wxPyEndAllowThreads(__tstate); - if (PyErr_Occurred()) SWIG_fail; - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_PenList_RemovePen(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - wxPenList *arg1 = (wxPenList *) 0 ; - wxPen *arg2 = (wxPen *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "pen", NULL - }; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:PenList_RemovePen",kwnames,&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_wxPenList, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PenList_RemovePen" "', expected argument " "1"" of type '" "wxPenList *""'"); - } - arg1 = reinterpret_cast< wxPenList * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_wxPen, 0 | 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "PenList_RemovePen" "', expected argument " "2"" of type '" "wxPen *""'"); - } - arg2 = reinterpret_cast< wxPen * >(argp2); - { - PyThreadState* __tstate = wxPyBeginAllowThreads(); - (arg1)->RemovePen(arg2); - wxPyEndAllowThreads(__tstate); - if (PyErr_Occurred()) SWIG_fail; - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - SWIGINTERN PyObject *PenList_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; if (!SWIG_Python_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return NULL; @@ -32413,82 +32652,6 @@ fail: } -SWIGINTERN PyObject *_wrap_BrushList_AddBrush(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - wxBrushList *arg1 = (wxBrushList *) 0 ; - wxBrush *arg2 = (wxBrush *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "brush", NULL - }; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:BrushList_AddBrush",kwnames,&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_wxBrushList, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BrushList_AddBrush" "', expected argument " "1"" of type '" "wxBrushList *""'"); - } - arg1 = reinterpret_cast< wxBrushList * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_wxBrush, 0 | 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "BrushList_AddBrush" "', expected argument " "2"" of type '" "wxBrush *""'"); - } - arg2 = reinterpret_cast< wxBrush * >(argp2); - { - PyThreadState* __tstate = wxPyBeginAllowThreads(); - (arg1)->AddBrush(arg2); - wxPyEndAllowThreads(__tstate); - if (PyErr_Occurred()) SWIG_fail; - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_BrushList_RemoveBrush(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - wxBrushList *arg1 = (wxBrushList *) 0 ; - wxBrush *arg2 = (wxBrush *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "brush", NULL - }; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:BrushList_RemoveBrush",kwnames,&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_wxBrushList, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BrushList_RemoveBrush" "', expected argument " "1"" of type '" "wxBrushList *""'"); - } - arg1 = reinterpret_cast< wxBrushList * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_wxBrush, 0 | 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "BrushList_RemoveBrush" "', expected argument " "2"" of type '" "wxBrush *""'"); - } - arg2 = reinterpret_cast< wxBrush * >(argp2); - { - PyThreadState* __tstate = wxPyBeginAllowThreads(); - (arg1)->RemoveBrush(arg2); - wxPyEndAllowThreads(__tstate); - if (PyErr_Occurred()) SWIG_fail; - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - SWIGINTERN PyObject *BrushList_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; if (!SWIG_Python_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return NULL; @@ -32603,82 +32766,6 @@ fail: } -SWIGINTERN PyObject *_wrap_FontList_AddFont(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - wxFontList *arg1 = (wxFontList *) 0 ; - wxFont *arg2 = (wxFont *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "font", NULL - }; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:FontList_AddFont",kwnames,&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_wxFontList, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FontList_AddFont" "', expected argument " "1"" of type '" "wxFontList *""'"); - } - arg1 = reinterpret_cast< wxFontList * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_wxFont, 0 | 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FontList_AddFont" "', expected argument " "2"" of type '" "wxFont *""'"); - } - arg2 = reinterpret_cast< wxFont * >(argp2); - { - PyThreadState* __tstate = wxPyBeginAllowThreads(); - (arg1)->AddFont(arg2); - wxPyEndAllowThreads(__tstate); - if (PyErr_Occurred()) SWIG_fail; - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FontList_RemoveFont(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - wxFontList *arg1 = (wxFontList *) 0 ; - wxFont *arg2 = (wxFont *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "font", NULL - }; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:FontList_RemoveFont",kwnames,&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_wxFontList, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FontList_RemoveFont" "', expected argument " "1"" of type '" "wxFontList *""'"); - } - arg1 = reinterpret_cast< wxFontList * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_wxFont, 0 | 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FontList_RemoveFont" "', expected argument " "2"" of type '" "wxFont *""'"); - } - arg2 = reinterpret_cast< wxFont * >(argp2); - { - PyThreadState* __tstate = wxPyBeginAllowThreads(); - (arg1)->RemoveFont(arg2); - wxPyEndAllowThreads(__tstate); - if (PyErr_Occurred()) SWIG_fail; - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - SWIGINTERN PyObject *FontList_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; if (!SWIG_Python_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return NULL; @@ -39044,6 +39131,8 @@ static PyMethodDef SwigMethods[] = { { (char *)"DC_DrawRotatedTextPoint", (PyCFunction) _wrap_DC_DrawRotatedTextPoint, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"DC_Blit", (PyCFunction) _wrap_DC_Blit, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"DC_BlitPointSize", (PyCFunction) _wrap_DC_BlitPointSize, METH_VARARGS | METH_KEYWORDS, NULL}, + { (char *)"DC_StretchBlit", (PyCFunction) _wrap_DC_StretchBlit, METH_VARARGS | METH_KEYWORDS, NULL}, + { (char *)"DC_StretchBlitPointSize", (PyCFunction) _wrap_DC_StretchBlitPointSize, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"DC_GetAsBitmap", (PyCFunction) _wrap_DC_GetAsBitmap, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"DC_SetClippingRegion", (PyCFunction) _wrap_DC_SetClippingRegion, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"DC_SetClippingRegionPointSize", (PyCFunction) _wrap_DC_SetClippingRegionPointSize, METH_VARARGS | METH_KEYWORDS, NULL}, @@ -39373,16 +39462,10 @@ static PyMethodDef SwigMethods[] = { { (char *)"GDIObjListBase_swigregister", GDIObjListBase_swigregister, METH_VARARGS, NULL}, { (char *)"GDIObjListBase_swiginit", GDIObjListBase_swiginit, METH_VARARGS, NULL}, { (char *)"PenList_FindOrCreatePen", (PyCFunction) _wrap_PenList_FindOrCreatePen, METH_VARARGS | METH_KEYWORDS, NULL}, - { (char *)"PenList_AddPen", (PyCFunction) _wrap_PenList_AddPen, METH_VARARGS | METH_KEYWORDS, NULL}, - { (char *)"PenList_RemovePen", (PyCFunction) _wrap_PenList_RemovePen, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"PenList_swigregister", PenList_swigregister, METH_VARARGS, NULL}, { (char *)"BrushList_FindOrCreateBrush", (PyCFunction) _wrap_BrushList_FindOrCreateBrush, METH_VARARGS | METH_KEYWORDS, NULL}, - { (char *)"BrushList_AddBrush", (PyCFunction) _wrap_BrushList_AddBrush, METH_VARARGS | METH_KEYWORDS, NULL}, - { (char *)"BrushList_RemoveBrush", (PyCFunction) _wrap_BrushList_RemoveBrush, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"BrushList_swigregister", BrushList_swigregister, METH_VARARGS, NULL}, { (char *)"FontList_FindOrCreateFont", (PyCFunction) _wrap_FontList_FindOrCreateFont, METH_VARARGS | METH_KEYWORDS, NULL}, - { (char *)"FontList_AddFont", (PyCFunction) _wrap_FontList_AddFont, METH_VARARGS | METH_KEYWORDS, NULL}, - { (char *)"FontList_RemoveFont", (PyCFunction) _wrap_FontList_RemoveFont, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"FontList_swigregister", FontList_swigregister, METH_VARARGS, NULL}, { (char *)"new_ColourDatabase", (PyCFunction)_wrap_new_ColourDatabase, METH_NOARGS, NULL}, { (char *)"delete_ColourDatabase", (PyCFunction)_wrap_delete_ColourDatabase, METH_O, NULL}, @@ -40047,7 +40130,6 @@ static swig_type_info _swigt__p_wxBrush = {"_p_wxBrush", "wxBrush *", 0, 0, (voi static swig_type_info _swigt__p_wxBrushList = {"_p_wxBrushList", "wxBrushList *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_wxBufferedDC = {"_p_wxBufferedDC", "wxBufferedDC *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_wxBufferedPaintDC = {"_p_wxBufferedPaintDC", "wxBufferedPaintDC *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_wxChar = {"_p_wxChar", "wxChar *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_wxClientDC = {"_p_wxClientDC", "wxClientDC *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_wxColour = {"_p_wxColour", "wxColour *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_wxColourDatabase = {"_p_wxColourDatabase", "wxColourDatabase *", 0, 0, (void*)0, 0}; @@ -40225,7 +40307,6 @@ static swig_type_info *swig_type_initial[] = { &_swigt__p_wxBufferedDC, &_swigt__p_wxBufferedPaintDC, &_swigt__p_wxCURHandler, - &_swigt__p_wxChar, &_swigt__p_wxChildFocusEvent, &_swigt__p_wxClientDC, &_swigt__p_wxClipboardTextEvent, @@ -40391,7 +40472,6 @@ static swig_cast_info _swigc__p_wxBrush[] = { {&_swigt__p_wxBrush, 0, 0, 0},{0, static swig_cast_info _swigc__p_wxBrushList[] = { {&_swigt__p_wxBrushList, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_wxBufferedDC[] = { {&_swigt__p_wxBufferedDC, 0, 0, 0}, {&_swigt__p_wxBufferedPaintDC, _p_wxBufferedPaintDCTo_p_wxBufferedDC, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_wxBufferedPaintDC[] = { {&_swigt__p_wxBufferedPaintDC, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_wxChar[] = { {&_swigt__p_wxChar, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_wxClientDC[] = { {&_swigt__p_wxClientDC, 0, 0, 0}, {&_swigt__p_wxPaintDC, _p_wxPaintDCTo_p_wxClientDC, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_wxColour[] = { {&_swigt__p_wxColour, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_wxColourDatabase[] = { {&_swigt__p_wxColourDatabase, 0, 0, 0},{0, 0, 0, 0}}; @@ -40569,7 +40649,6 @@ static swig_cast_info *swig_cast_initial[] = { _swigc__p_wxBufferedDC, _swigc__p_wxBufferedPaintDC, _swigc__p_wxCURHandler, - _swigc__p_wxChar, _swigc__p_wxChildFocusEvent, _swigc__p_wxClientDC, _swigc__p_wxClipboardTextEvent, @@ -41602,6 +41681,7 @@ SWIGEXPORT void SWIG_init(void) { SWIG_Python_SetConstant(d, "PLATFORM_MAC",SWIG_From_int(static_cast< int >(wxPLATFORM_MAC))); SWIG_Python_SetConstant(d, "BUFFER_VIRTUAL_AREA",SWIG_From_int(static_cast< int >(wxBUFFER_VIRTUAL_AREA))); SWIG_Python_SetConstant(d, "BUFFER_CLIENT_AREA",SWIG_From_int(static_cast< int >(wxBUFFER_CLIENT_AREA))); + SWIG_Python_SetConstant(d, "BUFFER_USES_SHARED_BUFFER",SWIG_From_int(static_cast< int >(wxBUFFER_USES_SHARED_BUFFER))); PyDict_SetItemString(d,(char*)"cvar", SWIG_globals()); SWIG_addvarlink(SWIG_globals(),(char*)"NullGraphicsPen",NullGraphicsPen_get, NullGraphicsPen_set); SWIG_addvarlink(SWIG_globals(),(char*)"NullGraphicsBrush",NullGraphicsBrush_get, NullGraphicsBrush_set); diff --git a/wxPython/src/mac/_misc.py b/wxPython/src/mac/_misc.py index 6ac360873b..b4494a0615 100644 --- a/wxPython/src/mac/_misc.py +++ b/wxPython/src/mac/_misc.py @@ -316,11 +316,6 @@ def EndBusyCursor(*args): """EndBusyCursor()""" return _misc_.EndBusyCursor(*args) -def GetElapsedTime(*args, **kwargs): - """GetElapsedTime(bool resetTimer=True) -> long""" - return _misc_.GetElapsedTime(*args, **kwargs) -GetElapsedTime = wx._deprecated(GetElapsedTime) - def IsBusy(*args): """IsBusy() -> bool""" return _misc_.IsBusy(*args) @@ -333,10 +328,6 @@ def Shell(*args, **kwargs): """Shell(String command=EmptyString) -> bool""" return _misc_.Shell(*args, **kwargs) -def StartTimer(*args): - """StartTimer()""" - return _misc_.StartTimer(*args) - def GetOsVersion(*args): """GetOsVersion() -> (platform, major, minor)""" return _misc_.GetOsVersion(*args) @@ -3307,8 +3298,26 @@ class FileConfig(ConfigBase): _misc_.FileConfig_swiginit(self,_misc_.new_FileConfig(*args, **kwargs)) __swig_destroy__ = _misc_.delete_FileConfig __del__ = lambda self : None; + def GetGlobalFileName(*args, **kwargs): + """GetGlobalFileName(String szFile) -> String""" + return _misc_.FileConfig_GetGlobalFileName(*args, **kwargs) + + GetGlobalFileName = staticmethod(GetGlobalFileName) + def GetLocalFileName(*args, **kwargs): + """GetLocalFileName(String szFile, int style=0) -> String""" + return _misc_.FileConfig_GetLocalFileName(*args, **kwargs) + + GetLocalFileName = staticmethod(GetLocalFileName) _misc_.FileConfig_swigregister(FileConfig) +def FileConfig_GetGlobalFileName(*args, **kwargs): + """FileConfig_GetGlobalFileName(String szFile) -> String""" + return _misc_.FileConfig_GetGlobalFileName(*args, **kwargs) + +def FileConfig_GetLocalFileName(*args, **kwargs): + """FileConfig_GetLocalFileName(String szFile, int style=0) -> String""" + return _misc_.FileConfig_GetLocalFileName(*args, **kwargs) + class ConfigPathChanger(object): """ A handy little class which changes current path to the path of given @@ -3707,17 +3716,6 @@ class DateTime(object): """GetLastWeekDay(self, int weekday, int month=Inv_Month, int year=Inv_Year) -> DateTime""" return _misc_.DateTime_GetLastWeekDay(*args, **kwargs) - def SetToTheWeek(*args, **kwargs): - """SetToTheWeek(self, int numWeek, int weekday=Mon, int flags=Monday_First) -> bool""" - return _misc_.DateTime_SetToTheWeek(*args, **kwargs) - - def GetWeek(*args, **kwargs): - """GetWeek(self, int numWeek, int weekday=Mon, int flags=Monday_First) -> DateTime""" - return _misc_.DateTime_GetWeek(*args, **kwargs) - - SetToTheWeek = wx._deprecated(SetToTheWeek, "SetToTheWeek is deprecated, use (static) SetToWeekOfYear instead") - GetWeek = wx._deprecated(GetWeek, "GetWeek is deprecated, use GetWeekOfYear instead") - def SetToWeekOfYear(*args, **kwargs): """SetToWeekOfYear(int year, int numWeek, int weekday=Mon) -> DateTime""" return _misc_.DateTime_SetToWeekOfYear(*args, **kwargs) @@ -4036,7 +4034,6 @@ class DateTime(object): RataDie = property(GetRataDie,doc="See `GetRataDie`") Second = property(GetSecond,SetSecond,doc="See `GetSecond` and `SetSecond`") Ticks = property(GetTicks,doc="See `GetTicks`") - Week = property(GetWeek,doc="See `GetWeek`") WeekDay = property(GetWeekDay,doc="See `GetWeekDay`") WeekDayInSameWeek = property(GetWeekDayInSameWeek,doc="See `GetWeekDayInSameWeek`") WeekOfMonth = property(GetWeekOfMonth,doc="See `GetWeekOfMonth`") diff --git a/wxPython/src/mac/_misc_wrap.cpp b/wxPython/src/mac/_misc_wrap.cpp index f901e63267..a4a6c9bc9f 100644 --- a/wxPython/src/mac/_misc_wrap.cpp +++ b/wxPython/src/mac/_misc_wrap.cpp @@ -2802,6 +2802,19 @@ SWIG_AsVal_int (PyObject * obj, int *val) static const wxString wxPyFileSelectorDefaultWildcardStr(wxFileSelectorDefaultWildcardStr); static const wxString wxPyDirSelectorPromptStr(wxDirSelectorPromptStr); +SWIGINTERN int +SWIG_AsVal_unsigned_SS_long (PyObject* obj, unsigned long* val) +{ + long v = 0; + if (SWIG_AsVal_long(obj, &v) && v < 0) { + return SWIG_TypeError; + } + else if (val) + *val = (unsigned long)v; + return SWIG_OK; +} + + SWIGINTERN int SWIG_AsVal_bool (PyObject *obj, bool *val) { @@ -2820,19 +2833,6 @@ SWIG_AsVal_bool (PyObject *obj, bool *val) } -SWIGINTERN int -SWIG_AsVal_unsigned_SS_long (PyObject* obj, unsigned long* val) -{ - long v = 0; - if (SWIG_AsVal_long(obj, &v) && v < 0) { - return SWIG_TypeError; - } - else if (val) - *val = (unsigned long)v; - return SWIG_OK; -} - - SWIGINTERNINLINE PyObject* SWIG_From_unsigned_SS_long (unsigned long value) { @@ -4929,38 +4929,6 @@ fail: } -SWIGINTERN PyObject *_wrap_GetElapsedTime(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - bool arg1 = (bool) true ; - long result; - bool val1 ; - int ecode1 = 0 ; - PyObject * obj0 = 0 ; - char * kwnames[] = { - (char *) "resetTimer", NULL - }; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"|O:GetElapsedTime",kwnames,&obj0)) SWIG_fail; - if (obj0) { - ecode1 = SWIG_AsVal_bool(obj0, &val1); - if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "GetElapsedTime" "', expected argument " "1"" of type '" "bool""'"); - } - arg1 = static_cast< bool >(val1); - } - { - PyThreadState* __tstate = wxPyBeginAllowThreads(); - result = (long)wxGetElapsedTime(arg1); - wxPyEndAllowThreads(__tstate); - if (PyErr_Occurred()) SWIG_fail; - } - resultobj = SWIG_From_long(static_cast< long >(result)); - return resultobj; -fail: - return NULL; -} - - SWIGINTERN PyObject *_wrap_IsBusy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; bool result; @@ -5047,23 +5015,6 @@ fail: } -SWIGINTERN PyObject *_wrap_StartTimer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - - if (!SWIG_Python_UnpackTuple(args,"StartTimer",0,0,0)) SWIG_fail; - { - PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStartTimer(); - wxPyEndAllowThreads(__tstate); - if (PyErr_Occurred()) SWIG_fail; - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - SWIGINTERN PyObject *_wrap_GetOsVersion(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; int *arg1 = (int *) 0 ; @@ -22966,6 +22917,103 @@ fail: } +SWIGINTERN PyObject *_wrap_FileConfig_GetGlobalFileName(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + wxString *arg1 = 0 ; + wxString result; + bool temp1 = false ; + PyObject * obj0 = 0 ; + char * kwnames[] = { + (char *) "szFile", NULL + }; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:FileConfig_GetGlobalFileName",kwnames,&obj0)) SWIG_fail; + { + arg1 = wxString_in_helper(obj0); + if (arg1 == NULL) SWIG_fail; + temp1 = true; + } + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + result = wxFileConfig::GetGlobalFileName((wxString const &)*arg1); + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + { +#if wxUSE_UNICODE + resultobj = PyUnicode_FromWideChar((&result)->c_str(), (&result)->Len()); +#else + resultobj = PyString_FromStringAndSize((&result)->c_str(), (&result)->Len()); +#endif + } + { + if (temp1) + delete arg1; + } + return resultobj; +fail: + { + if (temp1) + delete arg1; + } + return NULL; +} + + +SWIGINTERN PyObject *_wrap_FileConfig_GetLocalFileName(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + wxString *arg1 = 0 ; + int arg2 = (int) 0 ; + wxString result; + bool temp1 = false ; + int val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "szFile",(char *) "style", NULL + }; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:FileConfig_GetLocalFileName",kwnames,&obj0,&obj1)) SWIG_fail; + { + arg1 = wxString_in_helper(obj0); + if (arg1 == NULL) SWIG_fail; + temp1 = true; + } + if (obj1) { + ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FileConfig_GetLocalFileName" "', expected argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + } + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + result = wxFileConfig::GetLocalFileName((wxString const &)*arg1,arg2); + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + { +#if wxUSE_UNICODE + resultobj = PyUnicode_FromWideChar((&result)->c_str(), (&result)->Len()); +#else + resultobj = PyString_FromStringAndSize((&result)->c_str(), (&result)->Len()); +#endif + } + { + if (temp1) + delete arg1; + } + return resultobj; +fail: + { + if (temp1) + delete arg1; + } + return NULL; +} + + SWIGINTERN PyObject *FileConfig_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; if (!SWIG_Python_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return NULL; @@ -25236,130 +25284,6 @@ fail: } -SWIGINTERN PyObject *_wrap_DateTime_SetToTheWeek(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - wxDateTime *arg1 = (wxDateTime *) 0 ; - int arg2 ; - wxDateTime::WeekDay arg3 = (wxDateTime::WeekDay) wxDateTime::Mon ; - wxDateTime::WeekFlags arg4 = (wxDateTime::WeekFlags) wxDateTime::Monday_First ; - bool result; - void *argp1 = 0 ; - int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - int val3 ; - int ecode3 = 0 ; - int val4 ; - int ecode4 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "numWeek",(char *) "weekday",(char *) "flags", NULL - }; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|OO:DateTime_SetToTheWeek",kwnames,&obj0,&obj1,&obj2,&obj3)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_wxDateTime, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DateTime_SetToTheWeek" "', expected argument " "1"" of type '" "wxDateTime *""'"); - } - arg1 = reinterpret_cast< wxDateTime * >(argp1); - ecode2 = SWIG_AsVal_int(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "DateTime_SetToTheWeek" "', expected argument " "2"" of type '" "int""'"); - } - arg2 = static_cast< int >(val2); - if (obj2) { - ecode3 = SWIG_AsVal_int(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "DateTime_SetToTheWeek" "', expected argument " "3"" of type '" "wxDateTime::WeekDay""'"); - } - arg3 = static_cast< wxDateTime::WeekDay >(val3); - } - if (obj3) { - ecode4 = SWIG_AsVal_int(obj3, &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "DateTime_SetToTheWeek" "', expected argument " "4"" of type '" "wxDateTime::WeekFlags""'"); - } - arg4 = static_cast< wxDateTime::WeekFlags >(val4); - } - { - PyThreadState* __tstate = wxPyBeginAllowThreads(); - result = (bool)(arg1)->SetToTheWeek(arg2,arg3,arg4); - wxPyEndAllowThreads(__tstate); - if (PyErr_Occurred()) SWIG_fail; - } - { - resultobj = result ? Py_True : Py_False; Py_INCREF(resultobj); - } - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_DateTime_GetWeek(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - wxDateTime *arg1 = (wxDateTime *) 0 ; - int arg2 ; - wxDateTime::WeekDay arg3 = (wxDateTime::WeekDay) wxDateTime::Mon ; - wxDateTime::WeekFlags arg4 = (wxDateTime::WeekFlags) wxDateTime::Monday_First ; - wxDateTime result; - void *argp1 = 0 ; - int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - int val3 ; - int ecode3 = 0 ; - int val4 ; - int ecode4 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "numWeek",(char *) "weekday",(char *) "flags", NULL - }; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|OO:DateTime_GetWeek",kwnames,&obj0,&obj1,&obj2,&obj3)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_wxDateTime, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DateTime_GetWeek" "', expected argument " "1"" of type '" "wxDateTime *""'"); - } - arg1 = reinterpret_cast< wxDateTime * >(argp1); - ecode2 = SWIG_AsVal_int(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "DateTime_GetWeek" "', expected argument " "2"" of type '" "int""'"); - } - arg2 = static_cast< int >(val2); - if (obj2) { - ecode3 = SWIG_AsVal_int(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "DateTime_GetWeek" "', expected argument " "3"" of type '" "wxDateTime::WeekDay""'"); - } - arg3 = static_cast< wxDateTime::WeekDay >(val3); - } - if (obj3) { - ecode4 = SWIG_AsVal_int(obj3, &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "DateTime_GetWeek" "', expected argument " "4"" of type '" "wxDateTime::WeekFlags""'"); - } - arg4 = static_cast< wxDateTime::WeekFlags >(val4); - } - { - PyThreadState* __tstate = wxPyBeginAllowThreads(); - result = (arg1)->GetWeek(arg2,arg3,arg4); - wxPyEndAllowThreads(__tstate); - if (PyErr_Occurred()) SWIG_fail; - } - resultobj = SWIG_NewPointerObj((new wxDateTime(static_cast< const wxDateTime& >(result))), SWIGTYPE_p_wxDateTime, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - SWIGINTERN PyObject *_wrap_DateTime_SetToWeekOfYear(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { PyObject *resultobj = 0; int arg1 ; @@ -36608,12 +36532,12 @@ SWIGINTERN PyObject *_wrap_Display_GetFromWindow(PyObject *SWIGUNUSEDPARM(self), if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:Display_GetFromWindow",kwnames,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_wxWindow, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Display_GetFromWindow" "', expected argument " "1"" of type '" "wxWindow *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Display_GetFromWindow" "', expected argument " "1"" of type '" "wxWindow const *""'"); } arg1 = reinterpret_cast< wxWindow * >(argp1); { PyThreadState* __tstate = wxPyBeginAllowThreads(); - result = (int)wxDisplay::GetFromWindow(arg1); + result = (int)wxDisplay::GetFromWindow((wxWindow const *)arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) SWIG_fail; } @@ -39259,11 +39183,9 @@ static PyMethodDef SwigMethods[] = { { (char *)"GetStockHelpString", (PyCFunction) _wrap_GetStockHelpString, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"Bell", (PyCFunction)_wrap_Bell, METH_NOARGS, NULL}, { (char *)"EndBusyCursor", (PyCFunction)_wrap_EndBusyCursor, METH_NOARGS, NULL}, - { (char *)"GetElapsedTime", (PyCFunction) _wrap_GetElapsedTime, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"IsBusy", (PyCFunction)_wrap_IsBusy, METH_NOARGS, NULL}, { (char *)"Now", (PyCFunction)_wrap_Now, METH_NOARGS, NULL}, { (char *)"Shell", (PyCFunction) _wrap_Shell, METH_VARARGS | METH_KEYWORDS, NULL}, - { (char *)"StartTimer", (PyCFunction)_wrap_StartTimer, METH_NOARGS, NULL}, { (char *)"GetOsVersion", (PyCFunction)_wrap_GetOsVersion, METH_NOARGS, NULL}, { (char *)"GetOsDescription", (PyCFunction)_wrap_GetOsDescription, METH_NOARGS, NULL}, { (char *)"IsPlatformLittleEndian", (PyCFunction)_wrap_IsPlatformLittleEndian, METH_NOARGS, NULL}, @@ -39781,6 +39703,8 @@ static PyMethodDef SwigMethods[] = { { (char *)"Config_swiginit", Config_swiginit, METH_VARARGS, NULL}, { (char *)"new_FileConfig", (PyCFunction) _wrap_new_FileConfig, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"delete_FileConfig", (PyCFunction)_wrap_delete_FileConfig, METH_O, NULL}, + { (char *)"FileConfig_GetGlobalFileName", (PyCFunction) _wrap_FileConfig_GetGlobalFileName, METH_VARARGS | METH_KEYWORDS, NULL}, + { (char *)"FileConfig_GetLocalFileName", (PyCFunction) _wrap_FileConfig_GetLocalFileName, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"FileConfig_swigregister", FileConfig_swigregister, METH_VARARGS, NULL}, { (char *)"FileConfig_swiginit", FileConfig_swiginit, METH_VARARGS, NULL}, { (char *)"new_ConfigPathChanger", (PyCFunction) _wrap_new_ConfigPathChanger, METH_VARARGS | METH_KEYWORDS, NULL}, @@ -39838,8 +39762,6 @@ static PyMethodDef SwigMethods[] = { { (char *)"DateTime_SetToWeekDay", (PyCFunction) _wrap_DateTime_SetToWeekDay, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"DateTime_SetToLastWeekDay", (PyCFunction) _wrap_DateTime_SetToLastWeekDay, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"DateTime_GetLastWeekDay", (PyCFunction) _wrap_DateTime_GetLastWeekDay, METH_VARARGS | METH_KEYWORDS, NULL}, - { (char *)"DateTime_SetToTheWeek", (PyCFunction) _wrap_DateTime_SetToTheWeek, METH_VARARGS | METH_KEYWORDS, NULL}, - { (char *)"DateTime_GetWeek", (PyCFunction) _wrap_DateTime_GetWeek, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"DateTime_SetToWeekOfYear", (PyCFunction) _wrap_DateTime_SetToWeekOfYear, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"DateTime_SetToLastMonthDay", (PyCFunction) _wrap_DateTime_SetToLastMonthDay, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"DateTime_GetLastMonthDay", (PyCFunction) _wrap_DateTime_GetLastMonthDay, METH_VARARGS | METH_KEYWORDS, NULL}, diff --git a/wxPython/src/mac/_windows.py b/wxPython/src/mac/_windows.py index c566783951..2f21fc208b 100644 --- a/wxPython/src/mac/_windows.py +++ b/wxPython/src/mac/_windows.py @@ -313,13 +313,11 @@ ICONIZE = _windows_.ICONIZE MINIMIZE = _windows_.MINIMIZE MAXIMIZE = _windows_.MAXIMIZE CLOSE_BOX = _windows_.CLOSE_BOX -THICK_FRAME = _windows_.THICK_FRAME SYSTEM_MENU = _windows_.SYSTEM_MENU MINIMIZE_BOX = _windows_.MINIMIZE_BOX MAXIMIZE_BOX = _windows_.MAXIMIZE_BOX TINY_CAPTION_HORIZ = _windows_.TINY_CAPTION_HORIZ TINY_CAPTION_VERT = _windows_.TINY_CAPTION_VERT -RESIZE_BOX = _windows_.RESIZE_BOX RESIZE_BORDER = _windows_.RESIZE_BORDER DIALOG_NO_PARENT = _windows_.DIALOG_NO_PARENT DEFAULT_FRAME_STYLE = _windows_.DEFAULT_FRAME_STYLE @@ -333,12 +331,18 @@ FRAME_DRAWER = _windows_.FRAME_DRAWER FRAME_EX_METAL = _windows_.FRAME_EX_METAL DIALOG_EX_METAL = _windows_.DIALOG_EX_METAL WS_EX_CONTEXTHELP = _windows_.WS_EX_CONTEXTHELP -DIALOG_MODAL = _windows_.DIALOG_MODAL -DIALOG_MODELESS = _windows_.DIALOG_MODELESS -USER_COLOURS = _windows_.USER_COLOURS -NO_3D = _windows_.NO_3D FRAME_EX_CONTEXTHELP = _windows_.FRAME_EX_CONTEXTHELP DIALOG_EX_CONTEXTHELP = _windows_.DIALOG_EX_CONTEXTHELP +# deprecated +RESIZE_BOX = MAXIMIZE_BOX +THICK_FRAME = RESIZE_BORDER + +# Obsolete +wxDIALOG_MODAL = 0 +wxDIALOG_MODELESS = 0 +wxUSER_COLOURS = 0 +wxNO_3D = 0 + FULLSCREEN_NOMENUBAR = _windows_.FULLSCREEN_NOMENUBAR FULLSCREEN_NOTOOLBAR = _windows_.FULLSCREEN_NOTOOLBAR FULLSCREEN_NOSTATUSBAR = _windows_.FULLSCREEN_NOSTATUSBAR @@ -1426,14 +1430,6 @@ class SashWindow(_core.Window): """GetSashVisible(self, int edge) -> bool""" return _windows_.SashWindow_GetSashVisible(*args, **kwargs) - def SetSashBorder(*args, **kwargs): - """SetSashBorder(self, int edge, bool border)""" - return _windows_.SashWindow_SetSashBorder(*args, **kwargs) - - def HasBorder(*args, **kwargs): - """HasBorder(self, int edge) -> bool""" - return _windows_.SashWindow_HasBorder(*args, **kwargs) - def GetEdgeMargin(*args, **kwargs): """GetEdgeMargin(self, int edge) -> int""" return _windows_.SashWindow_GetEdgeMargin(*args, **kwargs) @@ -1991,6 +1987,10 @@ class VListBox(VScrolledWindow): """SetSelectionBackground(self, Colour col)""" return _windows_.VListBox_SetSelectionBackground(*args, **kwargs) + def RefreshSelected(*args, **kwargs): + """RefreshSelected(self)""" + return _windows_.VListBox_RefreshSelected(*args, **kwargs) + def OnDrawSeparator(*args, **kwargs): """OnDrawSeparator(self, DC dc, Rect rect, size_t n)""" return _windows_.VListBox_OnDrawSeparator(*args, **kwargs) @@ -2285,9 +2285,10 @@ def GetColourFromUser(*args, **kwargs): String caption=EmptyString) -> Colour """ return _windows_.GetColourFromUser(*args, **kwargs) +DD_CHANGE_DIR = _windows_.DD_CHANGE_DIR +DD_DIR_MUST_EXIST = _windows_.DD_DIR_MUST_EXIST DD_NEW_DIR_BUTTON = _windows_.DD_NEW_DIR_BUTTON DD_DEFAULT_STYLE = _windows_.DD_DEFAULT_STYLE -DD_CHANGE_DIR = _windows_.DD_CHANGE_DIR class DirDialog(Dialog): """ wx.DirDialog allows the user to select a directory by browising the @@ -2343,13 +2344,6 @@ class DirDialog(Dialog): Path = property(GetPath,SetPath,doc="See `GetPath` and `SetPath`") _windows_.DirDialog_swigregister(DirDialog) -OPEN = _windows_.OPEN -SAVE = _windows_.SAVE -OVERWRITE_PROMPT = _windows_.OVERWRITE_PROMPT -FILE_MUST_EXIST = _windows_.FILE_MUST_EXIST -MULTIPLE = _windows_.MULTIPLE -CHANGE_DIR = _windows_.CHANGE_DIR -HIDE_READONLY = _windows_.HIDE_READONLY FD_OPEN = _windows_.FD_OPEN FD_SAVE = _windows_.FD_SAVE FD_OVERWRITE_PROMPT = _windows_.FD_OVERWRITE_PROMPT @@ -2358,6 +2352,14 @@ FD_MULTIPLE = _windows_.FD_MULTIPLE FD_CHANGE_DIR = _windows_.FD_CHANGE_DIR FD_PREVIEW = _windows_.FD_PREVIEW FD_DEFAULT_STYLE = _windows_.FD_DEFAULT_STYLE +# deprecated names +OPEN = FD_OPEN, +SAVE = FD_SAVE, +OVERWRITE_PROMPT = FD_OVERWRITE_PROMPT, +FILE_MUST_EXIST = FD_FILE_MUST_EXIST, +MULTIPLE = FD_MULTIPLE, +CHANGE_DIR = FD_CHANGE_DIR + class FileDialog(Dialog): """ wx.FileDialog allows the user to select one or more files from the diff --git a/wxPython/src/mac/_windows_wrap.cpp b/wxPython/src/mac/_windows_wrap.cpp index 46bec27a38..1413024c4f 100644 --- a/wxPython/src/mac/_windows_wrap.cpp +++ b/wxPython/src/mac/_windows_wrap.cpp @@ -11169,94 +11169,6 @@ fail: } -SWIGINTERN PyObject *_wrap_SashWindow_SetSashBorder(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - wxSashWindow *arg1 = (wxSashWindow *) 0 ; - wxSashEdgePosition arg2 ; - bool arg3 ; - void *argp1 = 0 ; - int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - bool val3 ; - int ecode3 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "edge",(char *) "border", NULL - }; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:SashWindow_SetSashBorder",kwnames,&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_wxSashWindow, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SashWindow_SetSashBorder" "', expected argument " "1"" of type '" "wxSashWindow *""'"); - } - arg1 = reinterpret_cast< wxSashWindow * >(argp1); - ecode2 = SWIG_AsVal_int(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SashWindow_SetSashBorder" "', expected argument " "2"" of type '" "wxSashEdgePosition""'"); - } - arg2 = static_cast< wxSashEdgePosition >(val2); - ecode3 = SWIG_AsVal_bool(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SashWindow_SetSashBorder" "', expected argument " "3"" of type '" "bool""'"); - } - arg3 = static_cast< bool >(val3); - { - PyThreadState* __tstate = wxPyBeginAllowThreads(); - (arg1)->SetSashBorder(arg2,arg3); - wxPyEndAllowThreads(__tstate); - if (PyErr_Occurred()) SWIG_fail; - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_SashWindow_HasBorder(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - wxSashWindow *arg1 = (wxSashWindow *) 0 ; - wxSashEdgePosition arg2 ; - bool result; - void *argp1 = 0 ; - int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "edge", NULL - }; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:SashWindow_HasBorder",kwnames,&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_wxSashWindow, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SashWindow_HasBorder" "', expected argument " "1"" of type '" "wxSashWindow const *""'"); - } - arg1 = reinterpret_cast< wxSashWindow * >(argp1); - ecode2 = SWIG_AsVal_int(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SashWindow_HasBorder" "', expected argument " "2"" of type '" "wxSashEdgePosition""'"); - } - arg2 = static_cast< wxSashEdgePosition >(val2); - { - PyThreadState* __tstate = wxPyBeginAllowThreads(); - result = (bool)((wxSashWindow const *)arg1)->HasBorder(arg2); - wxPyEndAllowThreads(__tstate); - if (PyErr_Occurred()) SWIG_fail; - } - { - resultobj = result ? Py_True : Py_False; Py_INCREF(resultobj); - } - return resultobj; -fail: - return NULL; -} - - SWIGINTERN PyObject *_wrap_SashWindow_GetEdgeMargin(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { PyObject *resultobj = 0; wxSashWindow *arg1 = (wxSashWindow *) 0 ; @@ -15297,6 +15209,33 @@ fail: } +SWIGINTERN PyObject *_wrap_VListBox_RefreshSelected(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + wxPyVListBox *arg1 = (wxPyVListBox *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_wxPyVListBox, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VListBox_RefreshSelected" "', expected argument " "1"" of type '" "wxPyVListBox *""'"); + } + arg1 = reinterpret_cast< wxPyVListBox * >(argp1); + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + (arg1)->RefreshSelected(); + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + SWIGINTERN PyObject *_wrap_VListBox_OnDrawSeparator(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { PyObject *resultobj = 0; wxPyVListBox *arg1 = (wxPyVListBox *) 0 ; @@ -31844,8 +31783,6 @@ static PyMethodDef SwigMethods[] = { { (char *)"SashWindow_Create", (PyCFunction) _wrap_SashWindow_Create, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"SashWindow_SetSashVisible", (PyCFunction) _wrap_SashWindow_SetSashVisible, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"SashWindow_GetSashVisible", (PyCFunction) _wrap_SashWindow_GetSashVisible, METH_VARARGS | METH_KEYWORDS, NULL}, - { (char *)"SashWindow_SetSashBorder", (PyCFunction) _wrap_SashWindow_SetSashBorder, METH_VARARGS | METH_KEYWORDS, NULL}, - { (char *)"SashWindow_HasBorder", (PyCFunction) _wrap_SashWindow_HasBorder, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"SashWindow_GetEdgeMargin", (PyCFunction) _wrap_SashWindow_GetEdgeMargin, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"SashWindow_SetDefaultBorderSize", (PyCFunction) _wrap_SashWindow_SetDefaultBorderSize, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"SashWindow_GetDefaultBorderSize", (PyCFunction)_wrap_SashWindow_GetDefaultBorderSize, METH_O, NULL}, @@ -31968,6 +31905,7 @@ static PyMethodDef SwigMethods[] = { { (char *)"VListBox_SetMargins", (PyCFunction) _wrap_VListBox_SetMargins, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"VListBox_SetMarginsXY", (PyCFunction) _wrap_VListBox_SetMarginsXY, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"VListBox_SetSelectionBackground", (PyCFunction) _wrap_VListBox_SetSelectionBackground, METH_VARARGS | METH_KEYWORDS, NULL}, + { (char *)"VListBox_RefreshSelected", (PyCFunction)_wrap_VListBox_RefreshSelected, METH_O, NULL}, { (char *)"VListBox_OnDrawSeparator", (PyCFunction) _wrap_VListBox_OnDrawSeparator, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"VListBox_OnDrawBackground", (PyCFunction) _wrap_VListBox_OnDrawBackground, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"VListBox_swigregister", VListBox_swigregister, METH_VARARGS, NULL}, @@ -34727,13 +34665,11 @@ SWIGEXPORT void SWIG_init(void) { SWIG_Python_SetConstant(d, "MINIMIZE",SWIG_From_int(static_cast< int >(wxMINIMIZE))); SWIG_Python_SetConstant(d, "MAXIMIZE",SWIG_From_int(static_cast< int >(wxMAXIMIZE))); SWIG_Python_SetConstant(d, "CLOSE_BOX",SWIG_From_int(static_cast< int >(wxCLOSE_BOX))); - SWIG_Python_SetConstant(d, "THICK_FRAME",SWIG_From_int(static_cast< int >(wxTHICK_FRAME))); SWIG_Python_SetConstant(d, "SYSTEM_MENU",SWIG_From_int(static_cast< int >(wxSYSTEM_MENU))); SWIG_Python_SetConstant(d, "MINIMIZE_BOX",SWIG_From_int(static_cast< int >(wxMINIMIZE_BOX))); SWIG_Python_SetConstant(d, "MAXIMIZE_BOX",SWIG_From_int(static_cast< int >(wxMAXIMIZE_BOX))); SWIG_Python_SetConstant(d, "TINY_CAPTION_HORIZ",SWIG_From_int(static_cast< int >(wxTINY_CAPTION_HORIZ))); SWIG_Python_SetConstant(d, "TINY_CAPTION_VERT",SWIG_From_int(static_cast< int >(wxTINY_CAPTION_VERT))); - SWIG_Python_SetConstant(d, "RESIZE_BOX",SWIG_From_int(static_cast< int >(wxRESIZE_BOX))); SWIG_Python_SetConstant(d, "RESIZE_BORDER",SWIG_From_int(static_cast< int >(wxRESIZE_BORDER))); SWIG_Python_SetConstant(d, "DIALOG_NO_PARENT",SWIG_From_int(static_cast< int >(wxDIALOG_NO_PARENT))); SWIG_Python_SetConstant(d, "DEFAULT_FRAME_STYLE",SWIG_From_int(static_cast< int >(wxDEFAULT_FRAME_STYLE))); @@ -34747,10 +34683,6 @@ SWIGEXPORT void SWIG_init(void) { SWIG_Python_SetConstant(d, "FRAME_EX_METAL",SWIG_From_int(static_cast< int >(wxFRAME_EX_METAL))); SWIG_Python_SetConstant(d, "DIALOG_EX_METAL",SWIG_From_int(static_cast< int >(wxDIALOG_EX_METAL))); SWIG_Python_SetConstant(d, "WS_EX_CONTEXTHELP",SWIG_From_int(static_cast< int >(wxWS_EX_CONTEXTHELP))); - SWIG_Python_SetConstant(d, "DIALOG_MODAL",SWIG_From_int(static_cast< int >(wxDIALOG_MODAL))); - SWIG_Python_SetConstant(d, "DIALOG_MODELESS",SWIG_From_int(static_cast< int >(wxDIALOG_MODELESS))); - SWIG_Python_SetConstant(d, "USER_COLOURS",SWIG_From_int(static_cast< int >(wxUSER_COLOURS))); - SWIG_Python_SetConstant(d, "NO_3D",SWIG_From_int(static_cast< int >(wxNO_3D))); SWIG_Python_SetConstant(d, "FRAME_EX_CONTEXTHELP",SWIG_From_int(static_cast< int >(wxFRAME_EX_CONTEXTHELP))); SWIG_Python_SetConstant(d, "DIALOG_EX_CONTEXTHELP",SWIG_From_int(static_cast< int >(wxDIALOG_EX_CONTEXTHELP))); SWIG_Python_SetConstant(d, "FULLSCREEN_NOMENUBAR",SWIG_From_int(static_cast< int >(wxFULLSCREEN_NOMENUBAR))); @@ -34846,16 +34778,10 @@ SWIGEXPORT void SWIG_init(void) { SWIG_addvarlink(SWIG_globals(),(char*)"FileSelectorDefaultWildcardStr",FileSelectorDefaultWildcardStr_get, FileSelectorDefaultWildcardStr_set); SWIG_addvarlink(SWIG_globals(),(char*)"GetTextFromUserPromptStr",GetTextFromUserPromptStr_get, GetTextFromUserPromptStr_set); SWIG_addvarlink(SWIG_globals(),(char*)"MessageBoxCaptionStr",MessageBoxCaptionStr_get, MessageBoxCaptionStr_set); + SWIG_Python_SetConstant(d, "DD_CHANGE_DIR",SWIG_From_int(static_cast< int >(wxDD_CHANGE_DIR))); + SWIG_Python_SetConstant(d, "DD_DIR_MUST_EXIST",SWIG_From_int(static_cast< int >(wxDD_DIR_MUST_EXIST))); SWIG_Python_SetConstant(d, "DD_NEW_DIR_BUTTON",SWIG_From_int(static_cast< int >(wxDD_NEW_DIR_BUTTON))); SWIG_Python_SetConstant(d, "DD_DEFAULT_STYLE",SWIG_From_int(static_cast< int >(wxDD_DEFAULT_STYLE))); - SWIG_Python_SetConstant(d, "DD_CHANGE_DIR",SWIG_From_int(static_cast< int >(wxDD_CHANGE_DIR))); - SWIG_Python_SetConstant(d, "OPEN",SWIG_From_int(static_cast< int >(wxOPEN))); - SWIG_Python_SetConstant(d, "SAVE",SWIG_From_int(static_cast< int >(wxSAVE))); - SWIG_Python_SetConstant(d, "OVERWRITE_PROMPT",SWIG_From_int(static_cast< int >(wxOVERWRITE_PROMPT))); - SWIG_Python_SetConstant(d, "FILE_MUST_EXIST",SWIG_From_int(static_cast< int >(wxFILE_MUST_EXIST))); - SWIG_Python_SetConstant(d, "MULTIPLE",SWIG_From_int(static_cast< int >(wxMULTIPLE))); - SWIG_Python_SetConstant(d, "CHANGE_DIR",SWIG_From_int(static_cast< int >(wxCHANGE_DIR))); - SWIG_Python_SetConstant(d, "HIDE_READONLY",SWIG_From_int(static_cast< int >(wxHIDE_READONLY))); SWIG_Python_SetConstant(d, "FD_OPEN",SWIG_From_int(static_cast< int >(wxFD_OPEN))); SWIG_Python_SetConstant(d, "FD_SAVE",SWIG_From_int(static_cast< int >(wxFD_SAVE))); SWIG_Python_SetConstant(d, "FD_OVERWRITE_PROMPT",SWIG_From_int(static_cast< int >(wxFD_OVERWRITE_PROMPT))); diff --git a/wxPython/src/mac/aui.py b/wxPython/src/mac/aui.py index 6c0cacb656..13e292c270 100644 --- a/wxPython/src/mac/aui.py +++ b/wxPython/src/mac/aui.py @@ -1495,10 +1495,6 @@ class AuiMDIParentFrame(_windows.Frame): """GetArtProvider(self) -> AuiTabArt""" return _aui.AuiMDIParentFrame_GetArtProvider(*args, **kwargs) - def GetNotebook(*args, **kwargs): - """GetNotebook(self) -> AuiNotebook""" - return _aui.AuiMDIParentFrame_GetNotebook(*args, **kwargs) - def GetWindowMenu(*args, **kwargs): """GetWindowMenu(self) -> Menu""" return _aui.AuiMDIParentFrame_GetWindowMenu(*args, **kwargs) @@ -1515,18 +1511,10 @@ class AuiMDIParentFrame(_windows.Frame): """ProcessEvent(self, Event event) -> bool""" return _aui.AuiMDIParentFrame_ProcessEvent(*args, **kwargs) - def GetActiveChild(*args, **kwargs): - """GetActiveChild(self) -> AuiMDIChildFrame""" - return _aui.AuiMDIParentFrame_GetActiveChild(*args, **kwargs) - def SetActiveChild(*args, **kwargs): """SetActiveChild(self, AuiMDIChildFrame pChildFrame)""" return _aui.AuiMDIParentFrame_SetActiveChild(*args, **kwargs) - def GetClientWindow(*args, **kwargs): - """GetClientWindow(self) -> AuiMDIClientWindow""" - return _aui.AuiMDIParentFrame_GetClientWindow(*args, **kwargs) - def OnCreateClient(*args, **kwargs): """OnCreateClient(self) -> AuiMDIClientWindow""" return _aui.AuiMDIParentFrame_OnCreateClient(*args, **kwargs) @@ -1551,6 +1539,18 @@ class AuiMDIParentFrame(_windows.Frame): """ActivatePrevious(self)""" return _aui.AuiMDIParentFrame_ActivatePrevious(*args, **kwargs) + def GetNotebook(*args, **kwargs): + """GetNotebook(self) -> AuiNotebook""" + return _aui.AuiMDIParentFrame_GetNotebook(*args, **kwargs) + + def GetActiveChild(*args, **kwargs): + """GetActiveChild(self) -> AuiMDIChildFrame""" + return _aui.AuiMDIParentFrame_GetActiveChild(*args, **kwargs) + + def GetClientWindow(*args, **kwargs): + """GetClientWindow(self) -> AuiMDIClientWindow""" + return _aui.AuiMDIParentFrame_GetClientWindow(*args, **kwargs) + _aui.AuiMDIParentFrame_swigregister(AuiMDIParentFrame) def PreAuiMDIParentFrame(*args, **kwargs): @@ -1719,8 +1719,18 @@ class PyAuiDockArt(AuiDefaultDockArt): methods to the Python methods implemented in the derived class. """ thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') - def __init__(self): raise AttributeError, "No constructor defined" __repr__ = _swig_repr + def __init__(self, *args, **kwargs): + """ + __init__(self) -> PyAuiDockArt + + This version of the `AuiDockArt` class has been instrumented to be + subclassable in Python and to reflect all calls to the C++ base class + methods to the Python methods implemented in the derived class. + """ + _aui.PyAuiDockArt_swiginit(self,_aui.new_PyAuiDockArt(*args, **kwargs)) + PyAuiDockArt._setCallbackInfo(self, self, PyAuiDockArt) + _aui.PyAuiDockArt_swigregister(PyAuiDockArt) class PyAuiTabArt(AuiDefaultTabArt): diff --git a/wxPython/src/mac/aui_wrap.cpp b/wxPython/src/mac/aui_wrap.cpp index 7646ca6ff2..6b5f69b785 100644 --- a/wxPython/src/mac/aui_wrap.cpp +++ b/wxPython/src/mac/aui_wrap.cpp @@ -2926,6 +2926,15 @@ SWIG_From_size_t (size_t value) return SWIG_From_unsigned_SS_long (static_cast< unsigned long >(value)); } +SWIGINTERN wxAuiNotebook *wxAuiMDIParentFrame__GetNotebook(wxAuiMDIParentFrame const *self){ + return self->GetNotebook(); + } +SWIGINTERN wxAuiMDIChildFrame *wxAuiMDIParentFrame__GetActiveChild(wxAuiMDIParentFrame const *self){ + return self->GetActiveChild(); + } +SWIGINTERN wxAuiMDIClientWindow *wxAuiMDIParentFrame__GetClientWindow(wxAuiMDIParentFrame const *self){ + return self->GetClientWindow(); + } // A wxDocArt class that knows how to forward virtuals to Python methods class wxPyAuiDockArt : public wxAuiDefaultDockArt @@ -16363,34 +16372,6 @@ fail: } -SWIGINTERN PyObject *_wrap_AuiMDIParentFrame_GetNotebook(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - wxAuiMDIParentFrame *arg1 = (wxAuiMDIParentFrame *) 0 ; - wxAuiNotebook *result = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_wxAuiMDIParentFrame, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AuiMDIParentFrame_GetNotebook" "', expected argument " "1"" of type '" "wxAuiMDIParentFrame const *""'"); - } - arg1 = reinterpret_cast< wxAuiMDIParentFrame * >(argp1); - { - PyThreadState* __tstate = wxPyBeginAllowThreads(); - result = (wxAuiNotebook *)((wxAuiMDIParentFrame const *)arg1)->GetNotebook(); - wxPyEndAllowThreads(__tstate); - if (PyErr_Occurred()) SWIG_fail; - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_wxAuiNotebook, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - SWIGINTERN PyObject *_wrap_AuiMDIParentFrame_GetWindowMenu(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; wxAuiMDIParentFrame *arg1 = (wxAuiMDIParentFrame *) 0 ; @@ -16541,34 +16522,6 @@ fail: } -SWIGINTERN PyObject *_wrap_AuiMDIParentFrame_GetActiveChild(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - wxAuiMDIParentFrame *arg1 = (wxAuiMDIParentFrame *) 0 ; - wxAuiMDIChildFrame *result = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_wxAuiMDIParentFrame, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AuiMDIParentFrame_GetActiveChild" "', expected argument " "1"" of type '" "wxAuiMDIParentFrame const *""'"); - } - arg1 = reinterpret_cast< wxAuiMDIParentFrame * >(argp1); - { - PyThreadState* __tstate = wxPyBeginAllowThreads(); - result = (wxAuiMDIChildFrame *)((wxAuiMDIParentFrame const *)arg1)->GetActiveChild(); - wxPyEndAllowThreads(__tstate); - if (PyErr_Occurred()) SWIG_fail; - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_wxAuiMDIChildFrame, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - SWIGINTERN PyObject *_wrap_AuiMDIParentFrame_SetActiveChild(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { PyObject *resultobj = 0; wxAuiMDIParentFrame *arg1 = (wxAuiMDIParentFrame *) 0 ; @@ -16607,34 +16560,6 @@ fail: } -SWIGINTERN PyObject *_wrap_AuiMDIParentFrame_GetClientWindow(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - wxAuiMDIParentFrame *arg1 = (wxAuiMDIParentFrame *) 0 ; - wxAuiMDIClientWindow *result = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_wxAuiMDIParentFrame, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AuiMDIParentFrame_GetClientWindow" "', expected argument " "1"" of type '" "wxAuiMDIParentFrame const *""'"); - } - arg1 = reinterpret_cast< wxAuiMDIParentFrame * >(argp1); - { - PyThreadState* __tstate = wxPyBeginAllowThreads(); - result = (wxAuiMDIClientWindow *)((wxAuiMDIParentFrame const *)arg1)->GetClientWindow(); - wxPyEndAllowThreads(__tstate); - if (PyErr_Occurred()) SWIG_fail; - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_wxAuiMDIClientWindow, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - SWIGINTERN PyObject *_wrap_AuiMDIParentFrame_OnCreateClient(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; wxAuiMDIParentFrame *arg1 = (wxAuiMDIParentFrame *) 0 ; @@ -16811,6 +16736,96 @@ fail: } +SWIGINTERN PyObject *_wrap_AuiMDIParentFrame_GetNotebook(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + wxAuiMDIParentFrame *arg1 = (wxAuiMDIParentFrame *) 0 ; + wxAuiNotebook *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_wxAuiMDIParentFrame, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AuiMDIParentFrame_GetNotebook" "', expected argument " "1"" of type '" "wxAuiMDIParentFrame const *""'"); + } + arg1 = reinterpret_cast< wxAuiMDIParentFrame * >(argp1); + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + result = (wxAuiNotebook *)wxAuiMDIParentFrame__GetNotebook((wxAuiMDIParentFrame const *)arg1); + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + { + resultobj = wxPyMake_wxObject(result, 0); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_AuiMDIParentFrame_GetActiveChild(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + wxAuiMDIParentFrame *arg1 = (wxAuiMDIParentFrame *) 0 ; + wxAuiMDIChildFrame *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_wxAuiMDIParentFrame, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AuiMDIParentFrame_GetActiveChild" "', expected argument " "1"" of type '" "wxAuiMDIParentFrame const *""'"); + } + arg1 = reinterpret_cast< wxAuiMDIParentFrame * >(argp1); + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + result = (wxAuiMDIChildFrame *)wxAuiMDIParentFrame__GetActiveChild((wxAuiMDIParentFrame const *)arg1); + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + { + resultobj = wxPyMake_wxObject(result, 0); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_AuiMDIParentFrame_GetClientWindow(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + wxAuiMDIParentFrame *arg1 = (wxAuiMDIParentFrame *) 0 ; + wxAuiMDIClientWindow *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_wxAuiMDIParentFrame, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AuiMDIParentFrame_GetClientWindow" "', expected argument " "1"" of type '" "wxAuiMDIParentFrame const *""'"); + } + arg1 = reinterpret_cast< wxAuiMDIParentFrame * >(argp1); + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + result = (wxAuiMDIClientWindow *)wxAuiMDIParentFrame__GetClientWindow((wxAuiMDIParentFrame const *)arg1); + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + { + resultobj = wxPyMake_wxObject(result, 0); + } + return resultobj; +fail: + return NULL; +} + + SWIGINTERN PyObject *AuiMDIParentFrame_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; if (!SWIG_Python_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return NULL; @@ -18146,6 +18161,24 @@ SWIGINTERN PyObject *AuiMDIClientWindow_swiginit(PyObject *SWIGUNUSEDPARM(self), return SWIG_Python_InitShadowInstance(args); } +SWIGINTERN PyObject *_wrap_new_PyAuiDockArt(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + wxPyAuiDockArt *result = 0 ; + + if (!SWIG_Python_UnpackTuple(args,"new_PyAuiDockArt",0,0,0)) SWIG_fail; + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + result = (wxPyAuiDockArt *)new wxPyAuiDockArt(); + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_wxPyAuiDockArt, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + SWIGINTERN PyObject *PyAuiDockArt_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; if (!SWIG_Python_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return NULL; @@ -18153,6 +18186,10 @@ SWIGINTERN PyObject *PyAuiDockArt_swigregister(PyObject *SWIGUNUSEDPARM(self), P return SWIG_Py_Void(); } +SWIGINTERN PyObject *PyAuiDockArt_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} + SWIGINTERN PyObject *_wrap_new_PyAuiTabArt(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; wxPyAuiTabArt *result = 0 ; @@ -18563,20 +18600,20 @@ static PyMethodDef SwigMethods[] = { { (char *)"AuiMDIParentFrame_Create", (PyCFunction) _wrap_AuiMDIParentFrame_Create, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"AuiMDIParentFrame_SetArtProvider", (PyCFunction) _wrap_AuiMDIParentFrame_SetArtProvider, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"AuiMDIParentFrame_GetArtProvider", (PyCFunction)_wrap_AuiMDIParentFrame_GetArtProvider, METH_O, NULL}, - { (char *)"AuiMDIParentFrame_GetNotebook", (PyCFunction)_wrap_AuiMDIParentFrame_GetNotebook, METH_O, NULL}, { (char *)"AuiMDIParentFrame_GetWindowMenu", (PyCFunction)_wrap_AuiMDIParentFrame_GetWindowMenu, METH_O, NULL}, { (char *)"AuiMDIParentFrame_SetWindowMenu", (PyCFunction) _wrap_AuiMDIParentFrame_SetWindowMenu, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"AuiMDIParentFrame_SetChildMenuBar", (PyCFunction) _wrap_AuiMDIParentFrame_SetChildMenuBar, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"AuiMDIParentFrame_ProcessEvent", (PyCFunction) _wrap_AuiMDIParentFrame_ProcessEvent, METH_VARARGS | METH_KEYWORDS, NULL}, - { (char *)"AuiMDIParentFrame_GetActiveChild", (PyCFunction)_wrap_AuiMDIParentFrame_GetActiveChild, METH_O, NULL}, { (char *)"AuiMDIParentFrame_SetActiveChild", (PyCFunction) _wrap_AuiMDIParentFrame_SetActiveChild, METH_VARARGS | METH_KEYWORDS, NULL}, - { (char *)"AuiMDIParentFrame_GetClientWindow", (PyCFunction)_wrap_AuiMDIParentFrame_GetClientWindow, METH_O, NULL}, { (char *)"AuiMDIParentFrame_OnCreateClient", (PyCFunction)_wrap_AuiMDIParentFrame_OnCreateClient, METH_O, NULL}, { (char *)"AuiMDIParentFrame_Cascade", (PyCFunction)_wrap_AuiMDIParentFrame_Cascade, METH_O, NULL}, { (char *)"AuiMDIParentFrame_Tile", (PyCFunction) _wrap_AuiMDIParentFrame_Tile, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"AuiMDIParentFrame_ArrangeIcons", (PyCFunction)_wrap_AuiMDIParentFrame_ArrangeIcons, METH_O, NULL}, { (char *)"AuiMDIParentFrame_ActivateNext", (PyCFunction)_wrap_AuiMDIParentFrame_ActivateNext, METH_O, NULL}, { (char *)"AuiMDIParentFrame_ActivatePrevious", (PyCFunction)_wrap_AuiMDIParentFrame_ActivatePrevious, METH_O, NULL}, + { (char *)"AuiMDIParentFrame_GetNotebook", (PyCFunction)_wrap_AuiMDIParentFrame_GetNotebook, METH_O, NULL}, + { (char *)"AuiMDIParentFrame_GetActiveChild", (PyCFunction)_wrap_AuiMDIParentFrame_GetActiveChild, METH_O, NULL}, + { (char *)"AuiMDIParentFrame_GetClientWindow", (PyCFunction)_wrap_AuiMDIParentFrame_GetClientWindow, METH_O, NULL}, { (char *)"AuiMDIParentFrame_swigregister", AuiMDIParentFrame_swigregister, METH_VARARGS, NULL}, { (char *)"AuiMDIParentFrame_swiginit", AuiMDIParentFrame_swiginit, METH_VARARGS, NULL}, { (char *)"new_PreAuiMDIChildFrame", (PyCFunction)_wrap_new_PreAuiMDIChildFrame, METH_NOARGS, NULL}, @@ -18614,7 +18651,9 @@ static PyMethodDef SwigMethods[] = { { (char *)"AuiMDIClientWindow_SetSelection", (PyCFunction) _wrap_AuiMDIClientWindow_SetSelection, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"AuiMDIClientWindow_swigregister", AuiMDIClientWindow_swigregister, METH_VARARGS, NULL}, { (char *)"AuiMDIClientWindow_swiginit", AuiMDIClientWindow_swiginit, METH_VARARGS, NULL}, + { (char *)"new_PyAuiDockArt", (PyCFunction)_wrap_new_PyAuiDockArt, METH_NOARGS, NULL}, { (char *)"PyAuiDockArt_swigregister", PyAuiDockArt_swigregister, METH_VARARGS, NULL}, + { (char *)"PyAuiDockArt_swiginit", PyAuiDockArt_swiginit, METH_VARARGS, NULL}, { (char *)"new_PyAuiTabArt", (PyCFunction)_wrap_new_PyAuiTabArt, METH_NOARGS, NULL}, { (char *)"PyAuiTabArt_swigregister", PyAuiTabArt_swigregister, METH_VARARGS, NULL}, { (char *)"PyAuiTabArt_swiginit", PyAuiTabArt_swiginit, METH_VARARGS, NULL}, diff --git a/wxPython/src/mac/combo.py b/wxPython/src/mac/combo.py index c9ed717e85..17854ae6d5 100644 --- a/wxPython/src/mac/combo.py +++ b/wxPython/src/mac/combo.py @@ -65,6 +65,9 @@ __docfilter__ = wx.__DocFilter(globals()) CC_BUTTON_OUTSIDE_BORDER = _combo.CC_BUTTON_OUTSIDE_BORDER CC_POPUP_ON_MOUSE_UP = _combo.CC_POPUP_ON_MOUSE_UP CC_NO_TEXT_AUTO_SELECT = _combo.CC_NO_TEXT_AUTO_SELECT +CC_BUTTON_STAYS_DOWN = _combo.CC_BUTTON_STAYS_DOWN +CC_FULL_BUTTON = _combo.CC_FULL_BUTTON +CC_BUTTON_COVERS_BORDER = _combo.CC_BUTTON_COVERS_BORDER CC_MF_ON_BUTTON = _combo.CC_MF_ON_BUTTON CC_MF_ON_CLICK_AREA = _combo.CC_MF_ON_CLICK_AREA class ComboCtrlFeatures(object): diff --git a/wxPython/src/mac/combo_wrap.cpp b/wxPython/src/mac/combo_wrap.cpp index afbb1ceeb3..e9e27a736d 100644 --- a/wxPython/src/mac/combo_wrap.cpp +++ b/wxPython/src/mac/combo_wrap.cpp @@ -9335,6 +9335,9 @@ SWIGEXPORT void SWIG_init(void) { SWIG_Python_SetConstant(d, "CC_BUTTON_OUTSIDE_BORDER",SWIG_From_int(static_cast< int >(wxCC_BUTTON_OUTSIDE_BORDER))); SWIG_Python_SetConstant(d, "CC_POPUP_ON_MOUSE_UP",SWIG_From_int(static_cast< int >(wxCC_POPUP_ON_MOUSE_UP))); SWIG_Python_SetConstant(d, "CC_NO_TEXT_AUTO_SELECT",SWIG_From_int(static_cast< int >(wxCC_NO_TEXT_AUTO_SELECT))); + SWIG_Python_SetConstant(d, "CC_BUTTON_STAYS_DOWN",SWIG_From_int(static_cast< int >(wxCC_BUTTON_STAYS_DOWN))); + SWIG_Python_SetConstant(d, "CC_FULL_BUTTON",SWIG_From_int(static_cast< int >(wxCC_FULL_BUTTON))); + SWIG_Python_SetConstant(d, "CC_BUTTON_COVERS_BORDER",SWIG_From_int(static_cast< int >(wxCC_BUTTON_COVERS_BORDER))); SWIG_Python_SetConstant(d, "CC_MF_ON_BUTTON",SWIG_From_int(static_cast< int >(wxCC_MF_ON_BUTTON))); SWIG_Python_SetConstant(d, "CC_MF_ON_CLICK_AREA",SWIG_From_int(static_cast< int >(wxCC_MF_ON_CLICK_AREA))); SWIG_Python_SetConstant(d, "ComboCtrlFeatures_MovableButton",SWIG_From_int(static_cast< int >(wxComboCtrlFeatures::MovableButton))); diff --git a/wxPython/src/mac/grid.py b/wxPython/src/mac/grid.py index 2c4c942c79..1e70f0dedd 100644 --- a/wxPython/src/mac/grid.py +++ b/wxPython/src/mac/grid.py @@ -68,6 +68,9 @@ GRID_VALUE_TEXT = _grid.GRID_VALUE_TEXT GRID_VALUE_LONG = _grid.GRID_VALUE_LONG GRID_VALUE_CHOICEINT = _grid.GRID_VALUE_CHOICEINT GRID_VALUE_DATETIME = _grid.GRID_VALUE_DATETIME +GRID_AUTOSIZE = _grid.GRID_AUTOSIZE +GRID_COLUMN = _grid.GRID_COLUMN +GRID_ROW = _grid.GRID_ROW GRID_DEFAULT_NUMBER_ROWS = _grid.GRID_DEFAULT_NUMBER_ROWS GRID_DEFAULT_NUMBER_COLS = _grid.GRID_DEFAULT_NUMBER_COLS GRID_DEFAULT_ROW_HEIGHT = _grid.GRID_DEFAULT_ROW_HEIGHT @@ -2094,6 +2097,21 @@ def Grid_GetClassDefaultAttributes(*args, **kwargs): """ return _grid.Grid_GetClassDefaultAttributes(*args, **kwargs) +class GridUpdateLocker(object): + """Proxy of C++ GridUpdateLocker class""" + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + __repr__ = _swig_repr + def __init__(self, *args, **kwargs): + """__init__(self, Grid grid=None) -> GridUpdateLocker""" + _grid.GridUpdateLocker_swiginit(self,_grid.new_GridUpdateLocker(*args, **kwargs)) + __swig_destroy__ = _grid.delete_GridUpdateLocker + __del__ = lambda self : None; + def Create(*args, **kwargs): + """Create(self, Grid grid)""" + return _grid.GridUpdateLocker_Create(*args, **kwargs) + +_grid.GridUpdateLocker_swigregister(GridUpdateLocker) + class GridEvent(_core.NotifyEvent): """Proxy of C++ GridEvent class""" thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') diff --git a/wxPython/src/mac/grid_wrap.cpp b/wxPython/src/mac/grid_wrap.cpp index 3345056f87..2fe5336cfb 100644 --- a/wxPython/src/mac/grid_wrap.cpp +++ b/wxPython/src/mac/grid_wrap.cpp @@ -2543,122 +2543,123 @@ SWIG_Python_MustGetPtr(PyObject *obj, swig_type_info *ty, int argnum, int flags) #define SWIGTYPE_p_wxGridStringTable swig_types[77] #define SWIGTYPE_p_wxGridTableBase swig_types[78] #define SWIGTYPE_p_wxGridTableMessage swig_types[79] -#define SWIGTYPE_p_wxICOHandler swig_types[80] -#define SWIGTYPE_p_wxIconizeEvent swig_types[81] -#define SWIGTYPE_p_wxIdleEvent swig_types[82] -#define SWIGTYPE_p_wxImage swig_types[83] -#define SWIGTYPE_p_wxImageHandler swig_types[84] -#define SWIGTYPE_p_wxIndividualLayoutConstraint swig_types[85] -#define SWIGTYPE_p_wxInitDialogEvent swig_types[86] -#define SWIGTYPE_p_wxJPEGHandler swig_types[87] -#define SWIGTYPE_p_wxKeyEvent swig_types[88] -#define SWIGTYPE_p_wxLayoutAlgorithm swig_types[89] -#define SWIGTYPE_p_wxLayoutConstraints swig_types[90] -#define SWIGTYPE_p_wxMDIChildFrame swig_types[91] -#define SWIGTYPE_p_wxMDIClientWindow swig_types[92] -#define SWIGTYPE_p_wxMDIParentFrame swig_types[93] -#define SWIGTYPE_p_wxMaximizeEvent swig_types[94] -#define SWIGTYPE_p_wxMenu swig_types[95] -#define SWIGTYPE_p_wxMenuBar swig_types[96] -#define SWIGTYPE_p_wxMenuEvent swig_types[97] -#define SWIGTYPE_p_wxMenuItem swig_types[98] -#define SWIGTYPE_p_wxMessageDialog swig_types[99] -#define SWIGTYPE_p_wxMiniFrame swig_types[100] -#define SWIGTYPE_p_wxMouseCaptureChangedEvent swig_types[101] -#define SWIGTYPE_p_wxMouseCaptureLostEvent swig_types[102] -#define SWIGTYPE_p_wxMouseEvent swig_types[103] -#define SWIGTYPE_p_wxMoveEvent swig_types[104] -#define SWIGTYPE_p_wxMultiChoiceDialog swig_types[105] -#define SWIGTYPE_p_wxNavigationKeyEvent swig_types[106] -#define SWIGTYPE_p_wxNcPaintEvent swig_types[107] -#define SWIGTYPE_p_wxNotifyEvent swig_types[108] -#define SWIGTYPE_p_wxNumberEntryDialog swig_types[109] -#define SWIGTYPE_p_wxObject swig_types[110] -#define SWIGTYPE_p_wxPCXHandler swig_types[111] -#define SWIGTYPE_p_wxPNGHandler swig_types[112] -#define SWIGTYPE_p_wxPNMHandler swig_types[113] -#define SWIGTYPE_p_wxPageSetupDialog swig_types[114] -#define SWIGTYPE_p_wxPageSetupDialogData swig_types[115] -#define SWIGTYPE_p_wxPaintEvent swig_types[116] -#define SWIGTYPE_p_wxPaletteChangedEvent swig_types[117] -#define SWIGTYPE_p_wxPanel swig_types[118] -#define SWIGTYPE_p_wxPaperSize swig_types[119] -#define SWIGTYPE_p_wxPasswordEntryDialog swig_types[120] -#define SWIGTYPE_p_wxPen swig_types[121] -#define SWIGTYPE_p_wxPoint swig_types[122] -#define SWIGTYPE_p_wxPopupWindow swig_types[123] -#define SWIGTYPE_p_wxPreviewCanvas swig_types[124] -#define SWIGTYPE_p_wxPreviewControlBar swig_types[125] -#define SWIGTYPE_p_wxPreviewFrame swig_types[126] -#define SWIGTYPE_p_wxPrintData swig_types[127] -#define SWIGTYPE_p_wxPrintDialog swig_types[128] -#define SWIGTYPE_p_wxPrintDialogData swig_types[129] -#define SWIGTYPE_p_wxPrintPreview swig_types[130] -#define SWIGTYPE_p_wxPrinter swig_types[131] -#define SWIGTYPE_p_wxProgressDialog swig_types[132] -#define SWIGTYPE_p_wxPyApp swig_types[133] -#define SWIGTYPE_p_wxPyCommandEvent swig_types[134] -#define SWIGTYPE_p_wxPyEvent swig_types[135] -#define SWIGTYPE_p_wxPyGridCellAttrProvider swig_types[136] -#define SWIGTYPE_p_wxPyGridCellEditor swig_types[137] -#define SWIGTYPE_p_wxPyGridCellRenderer swig_types[138] -#define SWIGTYPE_p_wxPyGridTableBase swig_types[139] -#define SWIGTYPE_p_wxPyHtmlListBox swig_types[140] -#define SWIGTYPE_p_wxPyImageHandler swig_types[141] -#define SWIGTYPE_p_wxPyPanel swig_types[142] -#define SWIGTYPE_p_wxPyPopupTransientWindow swig_types[143] -#define SWIGTYPE_p_wxPyPreviewControlBar swig_types[144] -#define SWIGTYPE_p_wxPyPreviewFrame swig_types[145] -#define SWIGTYPE_p_wxPyPrintPreview swig_types[146] -#define SWIGTYPE_p_wxPyPrintout swig_types[147] -#define SWIGTYPE_p_wxPyScrolledWindow swig_types[148] -#define SWIGTYPE_p_wxPySizer swig_types[149] -#define SWIGTYPE_p_wxPyTaskBarIcon swig_types[150] -#define SWIGTYPE_p_wxPyVListBox swig_types[151] -#define SWIGTYPE_p_wxPyVScrolledWindow swig_types[152] -#define SWIGTYPE_p_wxPyValidator swig_types[153] -#define SWIGTYPE_p_wxPyWindow swig_types[154] -#define SWIGTYPE_p_wxQueryLayoutInfoEvent swig_types[155] -#define SWIGTYPE_p_wxQueryNewPaletteEvent swig_types[156] -#define SWIGTYPE_p_wxRect swig_types[157] -#define SWIGTYPE_p_wxSashEvent swig_types[158] -#define SWIGTYPE_p_wxSashLayoutWindow swig_types[159] -#define SWIGTYPE_p_wxSashWindow swig_types[160] -#define SWIGTYPE_p_wxScrollEvent swig_types[161] -#define SWIGTYPE_p_wxScrollWinEvent swig_types[162] -#define SWIGTYPE_p_wxScrolledWindow swig_types[163] -#define SWIGTYPE_p_wxSetCursorEvent swig_types[164] -#define SWIGTYPE_p_wxShowEvent swig_types[165] -#define SWIGTYPE_p_wxSimpleHtmlListBox swig_types[166] -#define SWIGTYPE_p_wxSingleChoiceDialog swig_types[167] -#define SWIGTYPE_p_wxSize swig_types[168] -#define SWIGTYPE_p_wxSizeEvent swig_types[169] -#define SWIGTYPE_p_wxSizer swig_types[170] -#define SWIGTYPE_p_wxSizerItem swig_types[171] -#define SWIGTYPE_p_wxSplashScreen swig_types[172] -#define SWIGTYPE_p_wxSplashScreenWindow swig_types[173] -#define SWIGTYPE_p_wxSplitterEvent swig_types[174] -#define SWIGTYPE_p_wxSplitterWindow swig_types[175] -#define SWIGTYPE_p_wxStaticBoxSizer swig_types[176] -#define SWIGTYPE_p_wxStatusBar swig_types[177] -#define SWIGTYPE_p_wxStdDialogButtonSizer swig_types[178] -#define SWIGTYPE_p_wxString swig_types[179] -#define SWIGTYPE_p_wxSysColourChangedEvent swig_types[180] -#define SWIGTYPE_p_wxTGAHandler swig_types[181] -#define SWIGTYPE_p_wxTIFFHandler swig_types[182] -#define SWIGTYPE_p_wxTaskBarIconEvent swig_types[183] -#define SWIGTYPE_p_wxTextEntryDialog swig_types[184] -#define SWIGTYPE_p_wxTipWindow swig_types[185] -#define SWIGTYPE_p_wxTopLevelWindow swig_types[186] -#define SWIGTYPE_p_wxUpdateUIEvent swig_types[187] -#define SWIGTYPE_p_wxValidator swig_types[188] -#define SWIGTYPE_p_wxVisualAttributes swig_types[189] -#define SWIGTYPE_p_wxWindow swig_types[190] -#define SWIGTYPE_p_wxWindowCreateEvent swig_types[191] -#define SWIGTYPE_p_wxWindowDestroyEvent swig_types[192] -#define SWIGTYPE_p_wxXPMHandler swig_types[193] -static swig_type_info *swig_types[195]; -static swig_module_info swig_module = {swig_types, 194, 0, 0, 0, 0}; +#define SWIGTYPE_p_wxGridUpdateLocker swig_types[80] +#define SWIGTYPE_p_wxICOHandler swig_types[81] +#define SWIGTYPE_p_wxIconizeEvent swig_types[82] +#define SWIGTYPE_p_wxIdleEvent swig_types[83] +#define SWIGTYPE_p_wxImage swig_types[84] +#define SWIGTYPE_p_wxImageHandler swig_types[85] +#define SWIGTYPE_p_wxIndividualLayoutConstraint swig_types[86] +#define SWIGTYPE_p_wxInitDialogEvent swig_types[87] +#define SWIGTYPE_p_wxJPEGHandler swig_types[88] +#define SWIGTYPE_p_wxKeyEvent swig_types[89] +#define SWIGTYPE_p_wxLayoutAlgorithm swig_types[90] +#define SWIGTYPE_p_wxLayoutConstraints swig_types[91] +#define SWIGTYPE_p_wxMDIChildFrame swig_types[92] +#define SWIGTYPE_p_wxMDIClientWindow swig_types[93] +#define SWIGTYPE_p_wxMDIParentFrame swig_types[94] +#define SWIGTYPE_p_wxMaximizeEvent swig_types[95] +#define SWIGTYPE_p_wxMenu swig_types[96] +#define SWIGTYPE_p_wxMenuBar swig_types[97] +#define SWIGTYPE_p_wxMenuEvent swig_types[98] +#define SWIGTYPE_p_wxMenuItem swig_types[99] +#define SWIGTYPE_p_wxMessageDialog swig_types[100] +#define SWIGTYPE_p_wxMiniFrame swig_types[101] +#define SWIGTYPE_p_wxMouseCaptureChangedEvent swig_types[102] +#define SWIGTYPE_p_wxMouseCaptureLostEvent swig_types[103] +#define SWIGTYPE_p_wxMouseEvent swig_types[104] +#define SWIGTYPE_p_wxMoveEvent swig_types[105] +#define SWIGTYPE_p_wxMultiChoiceDialog swig_types[106] +#define SWIGTYPE_p_wxNavigationKeyEvent swig_types[107] +#define SWIGTYPE_p_wxNcPaintEvent swig_types[108] +#define SWIGTYPE_p_wxNotifyEvent swig_types[109] +#define SWIGTYPE_p_wxNumberEntryDialog swig_types[110] +#define SWIGTYPE_p_wxObject swig_types[111] +#define SWIGTYPE_p_wxPCXHandler swig_types[112] +#define SWIGTYPE_p_wxPNGHandler swig_types[113] +#define SWIGTYPE_p_wxPNMHandler swig_types[114] +#define SWIGTYPE_p_wxPageSetupDialog swig_types[115] +#define SWIGTYPE_p_wxPageSetupDialogData swig_types[116] +#define SWIGTYPE_p_wxPaintEvent swig_types[117] +#define SWIGTYPE_p_wxPaletteChangedEvent swig_types[118] +#define SWIGTYPE_p_wxPanel swig_types[119] +#define SWIGTYPE_p_wxPaperSize swig_types[120] +#define SWIGTYPE_p_wxPasswordEntryDialog swig_types[121] +#define SWIGTYPE_p_wxPen swig_types[122] +#define SWIGTYPE_p_wxPoint swig_types[123] +#define SWIGTYPE_p_wxPopupWindow swig_types[124] +#define SWIGTYPE_p_wxPreviewCanvas swig_types[125] +#define SWIGTYPE_p_wxPreviewControlBar swig_types[126] +#define SWIGTYPE_p_wxPreviewFrame swig_types[127] +#define SWIGTYPE_p_wxPrintData swig_types[128] +#define SWIGTYPE_p_wxPrintDialog swig_types[129] +#define SWIGTYPE_p_wxPrintDialogData swig_types[130] +#define SWIGTYPE_p_wxPrintPreview swig_types[131] +#define SWIGTYPE_p_wxPrinter swig_types[132] +#define SWIGTYPE_p_wxProgressDialog swig_types[133] +#define SWIGTYPE_p_wxPyApp swig_types[134] +#define SWIGTYPE_p_wxPyCommandEvent swig_types[135] +#define SWIGTYPE_p_wxPyEvent swig_types[136] +#define SWIGTYPE_p_wxPyGridCellAttrProvider swig_types[137] +#define SWIGTYPE_p_wxPyGridCellEditor swig_types[138] +#define SWIGTYPE_p_wxPyGridCellRenderer swig_types[139] +#define SWIGTYPE_p_wxPyGridTableBase swig_types[140] +#define SWIGTYPE_p_wxPyHtmlListBox swig_types[141] +#define SWIGTYPE_p_wxPyImageHandler swig_types[142] +#define SWIGTYPE_p_wxPyPanel swig_types[143] +#define SWIGTYPE_p_wxPyPopupTransientWindow swig_types[144] +#define SWIGTYPE_p_wxPyPreviewControlBar swig_types[145] +#define SWIGTYPE_p_wxPyPreviewFrame swig_types[146] +#define SWIGTYPE_p_wxPyPrintPreview swig_types[147] +#define SWIGTYPE_p_wxPyPrintout swig_types[148] +#define SWIGTYPE_p_wxPyScrolledWindow swig_types[149] +#define SWIGTYPE_p_wxPySizer swig_types[150] +#define SWIGTYPE_p_wxPyTaskBarIcon swig_types[151] +#define SWIGTYPE_p_wxPyVListBox swig_types[152] +#define SWIGTYPE_p_wxPyVScrolledWindow swig_types[153] +#define SWIGTYPE_p_wxPyValidator swig_types[154] +#define SWIGTYPE_p_wxPyWindow swig_types[155] +#define SWIGTYPE_p_wxQueryLayoutInfoEvent swig_types[156] +#define SWIGTYPE_p_wxQueryNewPaletteEvent swig_types[157] +#define SWIGTYPE_p_wxRect swig_types[158] +#define SWIGTYPE_p_wxSashEvent swig_types[159] +#define SWIGTYPE_p_wxSashLayoutWindow swig_types[160] +#define SWIGTYPE_p_wxSashWindow swig_types[161] +#define SWIGTYPE_p_wxScrollEvent swig_types[162] +#define SWIGTYPE_p_wxScrollWinEvent swig_types[163] +#define SWIGTYPE_p_wxScrolledWindow swig_types[164] +#define SWIGTYPE_p_wxSetCursorEvent swig_types[165] +#define SWIGTYPE_p_wxShowEvent swig_types[166] +#define SWIGTYPE_p_wxSimpleHtmlListBox swig_types[167] +#define SWIGTYPE_p_wxSingleChoiceDialog swig_types[168] +#define SWIGTYPE_p_wxSize swig_types[169] +#define SWIGTYPE_p_wxSizeEvent swig_types[170] +#define SWIGTYPE_p_wxSizer swig_types[171] +#define SWIGTYPE_p_wxSizerItem swig_types[172] +#define SWIGTYPE_p_wxSplashScreen swig_types[173] +#define SWIGTYPE_p_wxSplashScreenWindow swig_types[174] +#define SWIGTYPE_p_wxSplitterEvent swig_types[175] +#define SWIGTYPE_p_wxSplitterWindow swig_types[176] +#define SWIGTYPE_p_wxStaticBoxSizer swig_types[177] +#define SWIGTYPE_p_wxStatusBar swig_types[178] +#define SWIGTYPE_p_wxStdDialogButtonSizer swig_types[179] +#define SWIGTYPE_p_wxString swig_types[180] +#define SWIGTYPE_p_wxSysColourChangedEvent swig_types[181] +#define SWIGTYPE_p_wxTGAHandler swig_types[182] +#define SWIGTYPE_p_wxTIFFHandler swig_types[183] +#define SWIGTYPE_p_wxTaskBarIconEvent swig_types[184] +#define SWIGTYPE_p_wxTextEntryDialog swig_types[185] +#define SWIGTYPE_p_wxTipWindow swig_types[186] +#define SWIGTYPE_p_wxTopLevelWindow swig_types[187] +#define SWIGTYPE_p_wxUpdateUIEvent swig_types[188] +#define SWIGTYPE_p_wxValidator swig_types[189] +#define SWIGTYPE_p_wxVisualAttributes swig_types[190] +#define SWIGTYPE_p_wxWindow swig_types[191] +#define SWIGTYPE_p_wxWindowCreateEvent swig_types[192] +#define SWIGTYPE_p_wxWindowDestroyEvent swig_types[193] +#define SWIGTYPE_p_wxXPMHandler swig_types[194] +static swig_type_info *swig_types[196]; +static swig_module_info swig_module = {swig_types, 195, 0, 0, 0, 0}; #define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name) #define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name) @@ -3186,6 +3187,16 @@ SWIG_FromCharPtr(const char *cptr) } + #define SWIG_From_long PyInt_FromLong + + +SWIGINTERNINLINE PyObject * +SWIG_From_int (int value) +{ + return SWIG_From_long (value); +} + + #define wxGRID_DEFAULT_NUMBER_ROWS WXGRID_DEFAULT_NUMBER_ROWS #define wxGRID_DEFAULT_NUMBER_COLS WXGRID_DEFAULT_NUMBER_COLS #define wxGRID_DEFAULT_ROW_HEIGHT WXGRID_DEFAULT_ROW_HEIGHT @@ -3197,16 +3208,6 @@ SWIG_FromCharPtr(const char *cptr) #define wxGRID_MIN_COL_WIDTH WXGRID_MIN_COL_WIDTH #define wxGRID_DEFAULT_SCROLLBAR_WIDTH WXGRID_DEFAULT_SCROLLBAR_WIDTH - - #define SWIG_From_long PyInt_FromLong - - -SWIGINTERNINLINE PyObject * -SWIG_From_int (int value) -{ - return SWIG_From_long (value); -} - SWIGINTERN void wxGridCellWorker__setOORInfo(wxGridCellWorker *self,PyObject *_self){ if (!self->GetClientObject()) self->SetClientObject(new wxPyOORClientData(_self)); @@ -19096,6 +19097,115 @@ SWIGINTERN PyObject *Grid_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *arg return SWIG_Python_InitShadowInstance(args); } +SWIGINTERN PyObject *_wrap_new_GridUpdateLocker(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + wxGrid *arg1 = (wxGrid *) NULL ; + wxGridUpdateLocker *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + char * kwnames[] = { + (char *) "grid", NULL + }; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"|O:new_GridUpdateLocker",kwnames,&obj0)) SWIG_fail; + if (obj0) { + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_wxGrid, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_GridUpdateLocker" "', expected argument " "1"" of type '" "wxGrid *""'"); + } + arg1 = reinterpret_cast< wxGrid * >(argp1); + } + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + result = (wxGridUpdateLocker *)new wxGridUpdateLocker(arg1); + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_wxGridUpdateLocker, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_GridUpdateLocker(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + wxGridUpdateLocker *arg1 = (wxGridUpdateLocker *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_wxGridUpdateLocker, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_GridUpdateLocker" "', expected argument " "1"" of type '" "wxGridUpdateLocker *""'"); + } + arg1 = reinterpret_cast< wxGridUpdateLocker * >(argp1); + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + delete arg1; + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_GridUpdateLocker_Create(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + wxGridUpdateLocker *arg1 = (wxGridUpdateLocker *) 0 ; + wxGrid *arg2 = (wxGrid *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "grid", NULL + }; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:GridUpdateLocker_Create",kwnames,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_wxGridUpdateLocker, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GridUpdateLocker_Create" "', expected argument " "1"" of type '" "wxGridUpdateLocker *""'"); + } + arg1 = reinterpret_cast< wxGridUpdateLocker * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_wxGrid, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GridUpdateLocker_Create" "', expected argument " "2"" of type '" "wxGrid *""'"); + } + arg2 = reinterpret_cast< wxGrid * >(argp2); + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + (arg1)->Create(arg2); + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *GridUpdateLocker_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_wxGridUpdateLocker, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *GridUpdateLocker_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} + SWIGINTERN PyObject *_wrap_new_GridEvent(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { PyObject *resultobj = 0; int arg1 ; @@ -21048,6 +21158,11 @@ static PyMethodDef SwigMethods[] = { { (char *)"Grid_GetClassDefaultAttributes", (PyCFunction) _wrap_Grid_GetClassDefaultAttributes, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"Grid_swigregister", Grid_swigregister, METH_VARARGS, NULL}, { (char *)"Grid_swiginit", Grid_swiginit, METH_VARARGS, NULL}, + { (char *)"new_GridUpdateLocker", (PyCFunction) _wrap_new_GridUpdateLocker, METH_VARARGS | METH_KEYWORDS, NULL}, + { (char *)"delete_GridUpdateLocker", (PyCFunction)_wrap_delete_GridUpdateLocker, METH_O, NULL}, + { (char *)"GridUpdateLocker_Create", (PyCFunction) _wrap_GridUpdateLocker_Create, METH_VARARGS | METH_KEYWORDS, NULL}, + { (char *)"GridUpdateLocker_swigregister", GridUpdateLocker_swigregister, METH_VARARGS, NULL}, + { (char *)"GridUpdateLocker_swiginit", GridUpdateLocker_swiginit, METH_VARARGS, NULL}, { (char *)"new_GridEvent", (PyCFunction) _wrap_new_GridEvent, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"GridEvent_GetRow", (PyCFunction)_wrap_GridEvent_GetRow, METH_O, NULL}, { (char *)"GridEvent_GetCol", (PyCFunction)_wrap_GridEvent_GetCol, METH_O, NULL}, @@ -22370,6 +22485,7 @@ static swig_type_info _swigt__p_wxGridSizeEvent = {"_p_wxGridSizeEvent", "wxGrid static swig_type_info _swigt__p_wxGridStringTable = {"_p_wxGridStringTable", "wxGridStringTable *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_wxGridTableBase = {"_p_wxGridTableBase", "wxGridTableBase *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_wxGridTableMessage = {"_p_wxGridTableMessage", "wxGridTableMessage *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_wxGridUpdateLocker = {"_p_wxGridUpdateLocker", "wxGridUpdateLocker *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_wxKeyEvent = {"_p_wxKeyEvent", "wxKeyEvent *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_wxNotifyEvent = {"_p_wxNotifyEvent", "wxNotifyEvent *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_wxObject = {"_p_wxObject", "wxObject *", 0, 0, (void*)0, 0}; @@ -22513,6 +22629,7 @@ static swig_type_info *swig_type_initial[] = { &_swigt__p_wxGridStringTable, &_swigt__p_wxGridTableBase, &_swigt__p_wxGridTableMessage, + &_swigt__p_wxGridUpdateLocker, &_swigt__p_wxICOHandler, &_swigt__p_wxIconizeEvent, &_swigt__p_wxIdleEvent, @@ -22762,6 +22879,7 @@ static swig_cast_info _swigc__p_wxGridSizeEvent[] = { {&_swigt__p_wxGridSizeEve static swig_cast_info _swigc__p_wxGridStringTable[] = { {&_swigt__p_wxGridStringTable, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_wxGridTableBase[] = { {&_swigt__p_wxGridStringTable, _p_wxGridStringTableTo_p_wxGridTableBase, 0, 0}, {&_swigt__p_wxGridTableBase, 0, 0, 0}, {&_swigt__p_wxPyGridTableBase, _p_wxPyGridTableBaseTo_p_wxGridTableBase, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_wxGridTableMessage[] = { {&_swigt__p_wxGridTableMessage, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_wxGridUpdateLocker[] = { {&_swigt__p_wxGridUpdateLocker, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_wxKeyEvent[] = { {&_swigt__p_wxKeyEvent, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_wxNotifyEvent[] = { {&_swigt__p_wxGridSizeEvent, _p_wxGridSizeEventTo_p_wxNotifyEvent, 0, 0}, {&_swigt__p_wxGridRangeSelectEvent, _p_wxGridRangeSelectEventTo_p_wxNotifyEvent, 0, 0}, {&_swigt__p_wxSplitterEvent, _p_wxSplitterEventTo_p_wxNotifyEvent, 0, 0}, {&_swigt__p_wxGridEvent, _p_wxGridEventTo_p_wxNotifyEvent, 0, 0}, {&_swigt__p_wxNotifyEvent, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_wxLayoutConstraints[] = {{&_swigt__p_wxLayoutConstraints, 0, 0, 0},{0, 0, 0, 0}}; @@ -22905,6 +23023,7 @@ static swig_cast_info *swig_cast_initial[] = { _swigc__p_wxGridStringTable, _swigc__p_wxGridTableBase, _swigc__p_wxGridTableMessage, + _swigc__p_wxGridUpdateLocker, _swigc__p_wxICOHandler, _swigc__p_wxIconizeEvent, _swigc__p_wxIdleEvent, @@ -23531,6 +23650,9 @@ SWIGEXPORT void SWIG_init(void) { SWIG_Python_SetConstant(d, "GRID_VALUE_LONG",SWIG_FromCharPtr("long")); SWIG_Python_SetConstant(d, "GRID_VALUE_CHOICEINT",SWIG_FromCharPtr("choiceint")); SWIG_Python_SetConstant(d, "GRID_VALUE_DATETIME",SWIG_FromCharPtr("datetime")); + SWIG_Python_SetConstant(d, "GRID_AUTOSIZE",SWIG_From_int(static_cast< int >(wxGRID_AUTOSIZE))); + SWIG_Python_SetConstant(d, "GRID_COLUMN",SWIG_From_int(static_cast< int >(wxGRID_COLUMN))); + SWIG_Python_SetConstant(d, "GRID_ROW",SWIG_From_int(static_cast< int >(wxGRID_ROW))); PyDict_SetItemString(d,(char*)"cvar", SWIG_globals()); SWIG_addvarlink(SWIG_globals(),(char*)"GridNoCellCoords",GridNoCellCoords_get, GridNoCellCoords_set); SWIG_addvarlink(SWIG_globals(),(char*)"GridNoCellRect",GridNoCellRect_get, GridNoCellRect_set); diff --git a/wxPython/src/mac/html.py b/wxPython/src/mac/html.py index d7fbfda36b..a02bcdbafc 100644 --- a/wxPython/src/mac/html.py +++ b/wxPython/src/mac/html.py @@ -255,11 +255,6 @@ class HtmlWinParser(HtmlParser): """GetCharWidth(self) -> int""" return _html.HtmlWinParser_GetCharWidth(*args, **kwargs) - def GetWindow(*args, **kwargs): - """GetWindow(self) -> HtmlWindow""" - return _html.HtmlWinParser_GetWindow(*args, **kwargs) - - GetWindow = wx._deprecated(GetWindow) def GetWindowInterface(*args, **kwargs): """GetWindowInterface(self) -> HtmlWindowInterface""" return _html.HtmlWinParser_GetWindowInterface(*args, **kwargs) @@ -676,11 +671,6 @@ class HtmlCell(_core.Object): """GetMouseCursor(self, HtmlWindowInterface window) -> Cursor""" return _html.HtmlCell_GetMouseCursor(*args, **kwargs) - def GetCursor(*args, **kwargs): - """GetCursor(self) -> Cursor""" - return _html.HtmlCell_GetCursor(*args, **kwargs) - - GetCursor = wx._deprecated(GetCursor) def IsFormattingCell(*args, **kwargs): """IsFormattingCell(self) -> bool""" return _html.HtmlCell_IsFormattingCell(*args, **kwargs) @@ -765,7 +755,6 @@ class HtmlCell(_core.Object): """ConvertToText(self, HtmlSelection sel) -> String""" return _html.HtmlCell_ConvertToText(*args, **kwargs) - Cursor = property(GetCursor,doc="See `GetCursor`") Depth = property(GetDepth,doc="See `GetDepth`") Descent = property(GetDescent,doc="See `GetDescent`") FirstChild = property(GetFirstChild,doc="See `GetFirstChild`") diff --git a/wxPython/src/mac/html_wrap.cpp b/wxPython/src/mac/html_wrap.cpp index 39fab5fbf1..c86dcf6241 100644 --- a/wxPython/src/mac/html_wrap.cpp +++ b/wxPython/src/mac/html_wrap.cpp @@ -4451,36 +4451,6 @@ fail: } -SWIGINTERN PyObject *_wrap_HtmlWinParser_GetWindow(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - wxHtmlWinParser *arg1 = (wxHtmlWinParser *) 0 ; - wxPyHtmlWindow *result = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_wxHtmlWinParser, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HtmlWinParser_GetWindow" "', expected argument " "1"" of type '" "wxHtmlWinParser *""'"); - } - arg1 = reinterpret_cast< wxHtmlWinParser * >(argp1); - { - PyThreadState* __tstate = wxPyBeginAllowThreads(); - result = (wxPyHtmlWindow *)(arg1)->GetWindow(); - wxPyEndAllowThreads(__tstate); - if (PyErr_Occurred()) SWIG_fail; - } - { - resultobj = wxPyMake_wxObject(result, (bool)0); - } - return resultobj; -fail: - return NULL; -} - - SWIGINTERN PyObject *_wrap_HtmlWinParser_GetWindowInterface(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; wxHtmlWinParser *arg1 = (wxHtmlWinParser *) 0 ; @@ -7280,34 +7250,6 @@ fail: } -SWIGINTERN PyObject *_wrap_HtmlCell_GetCursor(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - wxHtmlCell *arg1 = (wxHtmlCell *) 0 ; - wxCursor result; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_wxHtmlCell, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HtmlCell_GetCursor" "', expected argument " "1"" of type '" "wxHtmlCell const *""'"); - } - arg1 = reinterpret_cast< wxHtmlCell * >(argp1); - { - PyThreadState* __tstate = wxPyBeginAllowThreads(); - result = ((wxHtmlCell const *)arg1)->GetCursor(); - wxPyEndAllowThreads(__tstate); - if (PyErr_Occurred()) SWIG_fail; - } - resultobj = SWIG_NewPointerObj((new wxCursor(static_cast< const wxCursor& >(result))), SWIGTYPE_p_wxCursor, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - SWIGINTERN PyObject *_wrap_HtmlCell_IsFormattingCell(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; wxHtmlCell *arg1 = (wxHtmlCell *) 0 ; @@ -17780,7 +17722,6 @@ static PyMethodDef SwigMethods[] = { { (char *)"HtmlWinParser_GetDC", (PyCFunction)_wrap_HtmlWinParser_GetDC, METH_O, NULL}, { (char *)"HtmlWinParser_GetCharHeight", (PyCFunction)_wrap_HtmlWinParser_GetCharHeight, METH_O, NULL}, { (char *)"HtmlWinParser_GetCharWidth", (PyCFunction)_wrap_HtmlWinParser_GetCharWidth, METH_O, NULL}, - { (char *)"HtmlWinParser_GetWindow", (PyCFunction)_wrap_HtmlWinParser_GetWindow, METH_O, NULL}, { (char *)"HtmlWinParser_GetWindowInterface", (PyCFunction)_wrap_HtmlWinParser_GetWindowInterface, METH_O, NULL}, { (char *)"HtmlWinParser_SetFonts", (PyCFunction) _wrap_HtmlWinParser_SetFonts, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"HtmlWinParser_SetStandardFonts", (PyCFunction) _wrap_HtmlWinParser_SetStandardFonts, METH_VARARGS | METH_KEYWORDS, NULL}, @@ -17878,7 +17819,6 @@ static PyMethodDef SwigMethods[] = { { (char *)"HtmlCell_GetParent", (PyCFunction)_wrap_HtmlCell_GetParent, METH_O, NULL}, { (char *)"HtmlCell_GetFirstChild", (PyCFunction)_wrap_HtmlCell_GetFirstChild, METH_O, NULL}, { (char *)"HtmlCell_GetMouseCursor", (PyCFunction) _wrap_HtmlCell_GetMouseCursor, METH_VARARGS | METH_KEYWORDS, NULL}, - { (char *)"HtmlCell_GetCursor", (PyCFunction)_wrap_HtmlCell_GetCursor, METH_O, NULL}, { (char *)"HtmlCell_IsFormattingCell", (PyCFunction)_wrap_HtmlCell_IsFormattingCell, METH_O, NULL}, { (char *)"HtmlCell_SetLink", (PyCFunction) _wrap_HtmlCell_SetLink, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"HtmlCell_SetNext", (PyCFunction) _wrap_HtmlCell_SetNext, METH_VARARGS | METH_KEYWORDS, NULL}, diff --git a/wxPython/src/mac/wizard_wrap.cpp b/wxPython/src/mac/wizard_wrap.cpp index a23ddaccc6..d37a4282ab 100644 --- a/wxPython/src/mac/wizard_wrap.cpp +++ b/wxPython/src/mac/wizard_wrap.cpp @@ -2799,9 +2799,9 @@ SWIG_AsVal_bool (PyObject *obj, bool *val) } SWIGINTERN bool wxWizardPage_Create(wxWizardPage *self,wxWizard *parent,wxBitmap const &bitmap=wxNullBitmap,wxString const &resource=wxPyEmptyString){ - wxChar* res = NULL; + const wxChar* res = NULL; if (resource.length()) - res = (wxChar*)resource.c_str(); + res = (const wxChar*)resource.c_str(); return self->Create(parent, bitmap, res); } // C++ Version of a Python aware class @@ -2878,15 +2878,15 @@ IMP_PYCALLBACK_VOID_WXWINBASE(wxPyWizardPage, wxWizardPage, RemoveChild); SWIGINTERN wxPyWizardPage *new_wxPyWizardPage(wxWizard *parent,wxBitmap const *bitmap=&wxNullBitmap,wxString const *resource=&wxPyEmptyString){ - wxChar* res = NULL; + const wxChar* res = NULL; if (resource->length()) - res = (wxChar*)resource->c_str(); + res = (const wxChar*)resource->c_str(); return new wxPyWizardPage(parent, *bitmap, res); } SWIGINTERN bool wxPyWizardPage_Create(wxPyWizardPage *self,wxWizard *parent,wxBitmap const &bitmap=wxNullBitmap,wxString const &resource=wxPyEmptyString){ - wxChar* res = NULL; + const wxChar* res = NULL; if (resource.length()) - res = (wxChar*)resource.c_str(); + res = (const wxChar*)resource.c_str(); return self->Create(parent, bitmap, res); } #ifdef __cplusplus diff --git a/wxPython/src/msw/_controls.py b/wxPython/src/msw/_controls.py index eb1ed041fc..d257bdaefb 100644 --- a/wxPython/src/msw/_controls.py +++ b/wxPython/src/msw/_controls.py @@ -1500,6 +1500,9 @@ TE_BESTWRAP = _controls_.TE_BESTWRAP TE_RICH2 = _controls_.TE_RICH2 TE_CAPITALIZE = _controls_.TE_CAPITALIZE TE_LINEWRAP = TE_CHARWRAP +PROCESS_ENTER = TE_PROCESS_ENTER +PASSWORD = TE_PASSWORD + TEXT_ALIGNMENT_DEFAULT = _controls_.TEXT_ALIGNMENT_DEFAULT TEXT_ALIGNMENT_LEFT = _controls_.TEXT_ALIGNMENT_LEFT TEXT_ALIGNMENT_CENTRE = _controls_.TEXT_ALIGNMENT_CENTRE @@ -3786,11 +3789,11 @@ class ToolBarBase(_core.Control): return _controls_.ToolBarBase_InsertToolItem(*args, **kwargs) def AddControl(*args, **kwargs): - """AddControl(self, Control control) -> ToolBarToolBase""" + """AddControl(self, Control control, String label=wxEmptyString) -> ToolBarToolBase""" return _controls_.ToolBarBase_AddControl(*args, **kwargs) def InsertControl(*args, **kwargs): - """InsertControl(self, size_t pos, Control control) -> ToolBarToolBase""" + """InsertControl(self, size_t pos, Control control, String label=wxEmptyString) -> ToolBarToolBase""" return _controls_.ToolBarBase_InsertControl(*args, **kwargs) def FindControl(*args, **kwargs): diff --git a/wxPython/src/msw/_controls_wrap.cpp b/wxPython/src/msw/_controls_wrap.cpp index 2098c569c0..82cdc2ef87 100644 --- a/wxPython/src/msw/_controls_wrap.cpp +++ b/wxPython/src/msw/_controls_wrap.cpp @@ -24336,18 +24336,22 @@ SWIGINTERN PyObject *_wrap_ToolBarBase_AddControl(PyObject *SWIGUNUSEDPARM(self) PyObject *resultobj = 0; wxToolBarBase *arg1 = (wxToolBarBase *) 0 ; wxControl *arg2 = (wxControl *) 0 ; + wxString const &arg3_defvalue = wxEmptyString ; + wxString *arg3 = (wxString *) &arg3_defvalue ; wxToolBarToolBase *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; + bool temp3 = false ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; char * kwnames[] = { - (char *) "self",(char *) "control", NULL + (char *) "self",(char *) "control",(char *) "label", NULL }; - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:ToolBarBase_AddControl",kwnames,&obj0,&obj1)) SWIG_fail; + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|O:ToolBarBase_AddControl",kwnames,&obj0,&obj1,&obj2)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_wxToolBarBase, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ToolBarBase_AddControl" "', expected argument " "1"" of type '" "wxToolBarBase *""'"); @@ -24358,17 +24362,32 @@ SWIGINTERN PyObject *_wrap_ToolBarBase_AddControl(PyObject *SWIGUNUSEDPARM(self) SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ToolBarBase_AddControl" "', expected argument " "2"" of type '" "wxControl *""'"); } arg2 = reinterpret_cast< wxControl * >(argp2); + if (obj2) { + { + arg3 = wxString_in_helper(obj2); + if (arg3 == NULL) SWIG_fail; + temp3 = true; + } + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - result = (wxToolBarToolBase *)(arg1)->AddControl(arg2); + result = (wxToolBarToolBase *)(arg1)->AddControl(arg2,(wxString const &)*arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) SWIG_fail; } { resultobj = wxPyMake_wxObject(result, (bool)0); } + { + if (temp3) + delete arg3; + } return resultobj; fail: + { + if (temp3) + delete arg3; + } return NULL; } @@ -24378,6 +24397,8 @@ SWIGINTERN PyObject *_wrap_ToolBarBase_InsertControl(PyObject *SWIGUNUSEDPARM(se wxToolBarBase *arg1 = (wxToolBarBase *) 0 ; size_t arg2 ; wxControl *arg3 = (wxControl *) 0 ; + wxString const &arg4_defvalue = wxEmptyString ; + wxString *arg4 = (wxString *) &arg4_defvalue ; wxToolBarToolBase *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; @@ -24385,14 +24406,16 @@ SWIGINTERN PyObject *_wrap_ToolBarBase_InsertControl(PyObject *SWIGUNUSEDPARM(se int ecode2 = 0 ; void *argp3 = 0 ; int res3 = 0 ; + bool temp4 = false ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; char * kwnames[] = { - (char *) "self",(char *) "pos",(char *) "control", NULL + (char *) "self",(char *) "pos",(char *) "control",(char *) "label", NULL }; - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:ToolBarBase_InsertControl",kwnames,&obj0,&obj1,&obj2)) SWIG_fail; + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO|O:ToolBarBase_InsertControl",kwnames,&obj0,&obj1,&obj2,&obj3)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_wxToolBarBase, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ToolBarBase_InsertControl" "', expected argument " "1"" of type '" "wxToolBarBase *""'"); @@ -24408,17 +24431,32 @@ SWIGINTERN PyObject *_wrap_ToolBarBase_InsertControl(PyObject *SWIGUNUSEDPARM(se SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ToolBarBase_InsertControl" "', expected argument " "3"" of type '" "wxControl *""'"); } arg3 = reinterpret_cast< wxControl * >(argp3); + if (obj3) { + { + arg4 = wxString_in_helper(obj3); + if (arg4 == NULL) SWIG_fail; + temp4 = true; + } + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - result = (wxToolBarToolBase *)(arg1)->InsertControl(arg2,arg3); + result = (wxToolBarToolBase *)(arg1)->InsertControl(arg2,arg3,(wxString const &)*arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) SWIG_fail; } { resultobj = wxPyMake_wxObject(result, (bool)0); } + { + if (temp4) + delete arg4; + } return resultobj; fail: + { + if (temp4) + delete arg4; + } return NULL; } diff --git a/wxPython/src/msw/_core.py b/wxPython/src/msw/_core.py index 2756e8b96b..4355426b88 100644 --- a/wxPython/src/msw/_core.py +++ b/wxPython/src/msw/_core.py @@ -116,8 +116,6 @@ LB_MULTIPLE = _core_.LB_MULTIPLE LB_EXTENDED = _core_.LB_EXTENDED LB_OWNERDRAW = _core_.LB_OWNERDRAW LB_HSCROLL = _core_.LB_HSCROLL -PROCESS_ENTER = _core_.PROCESS_ENTER -PASSWORD = _core_.PASSWORD CB_SIMPLE = _core_.CB_SIMPLE CB_DROPDOWN = _core_.CB_DROPDOWN CB_SORT = _core_.CB_SORT @@ -334,7 +332,7 @@ EXPAND = _core_.EXPAND SHAPED = _core_.SHAPED FIXED_MINSIZE = _core_.FIXED_MINSIZE TILE = _core_.TILE -ADJUST_MINSIZE = _core_.ADJUST_MINSIZE +ADJUST_MINSIZE = 0 BORDER_DEFAULT = _core_.BORDER_DEFAULT BORDER_NONE = _core_.BORDER_NONE BORDER_STATIC = _core_.BORDER_STATIC @@ -416,8 +414,6 @@ WXK_CONTROL = _core_.WXK_CONTROL WXK_MENU = _core_.WXK_MENU WXK_PAUSE = _core_.WXK_PAUSE WXK_CAPITAL = _core_.WXK_CAPITAL -WXK_PRIOR = _core_.WXK_PRIOR -WXK_NEXT = _core_.WXK_NEXT WXK_END = _core_.WXK_END WXK_HOME = _core_.WXK_HOME WXK_LEFT = _core_.WXK_LEFT @@ -486,9 +482,7 @@ WXK_NUMPAD_LEFT = _core_.WXK_NUMPAD_LEFT WXK_NUMPAD_UP = _core_.WXK_NUMPAD_UP WXK_NUMPAD_RIGHT = _core_.WXK_NUMPAD_RIGHT WXK_NUMPAD_DOWN = _core_.WXK_NUMPAD_DOWN -WXK_NUMPAD_PRIOR = _core_.WXK_NUMPAD_PRIOR WXK_NUMPAD_PAGEUP = _core_.WXK_NUMPAD_PAGEUP -WXK_NUMPAD_NEXT = _core_.WXK_NUMPAD_NEXT WXK_NUMPAD_PAGEDOWN = _core_.WXK_NUMPAD_PAGEDOWN WXK_NUMPAD_END = _core_.WXK_NUMPAD_END WXK_NUMPAD_BEGIN = _core_.WXK_NUMPAD_BEGIN @@ -525,6 +519,11 @@ WXK_SPECIAL17 = _core_.WXK_SPECIAL17 WXK_SPECIAL18 = _core_.WXK_SPECIAL18 WXK_SPECIAL19 = _core_.WXK_SPECIAL19 WXK_SPECIAL20 = _core_.WXK_SPECIAL20 +WXK_PRIOR = WXK_PAGEUP +WXK_NEXT = WXK_PAGEDOWN +WXK_NUMPAD_PRIOR = WXK_NUMPAD_PAGEUP +WXK_NUMPAD_NEXT = WXK_NUMPAD_PAGEDOWN + PAPER_NONE = _core_.PAPER_NONE PAPER_LETTER = _core_.PAPER_LETTER PAPER_LEGAL = _core_.PAPER_LEGAL @@ -4581,7 +4580,7 @@ class ScrollEvent(CommandEvent): """ A scroll event holds information about events sent from stand-alone scrollbars and sliders. Note that scrolled windows do not send - instnaces of this event class, but send the `wx.ScrollWinEvent` + instances of this event class, but send the `wx.ScrollWinEvent` instead. """ thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') @@ -8124,10 +8123,11 @@ class AcceleratorTable(Object): Ok = IsOk _core_.AcceleratorTable_swigregister(AcceleratorTable) +def GetAccelFromString(label): + entry = AcceleratorEntry() + entry.FromString(label) + return entry -def GetAccelFromString(*args, **kwargs): - """GetAccelFromString(String label) -> AcceleratorEntry""" - return _core_.GetAccelFromString(*args, **kwargs) #--------------------------------------------------------------------------- class VisualAttributes(object): @@ -8909,9 +8909,21 @@ class Window(EvtHandler): IsEnabled(self) -> bool Returns true if the window is enabled for input, false otherwise. + This method takes into account the enabled state of parent windows up + to the top-level window. """ return _core_.Window_IsEnabled(*args, **kwargs) + def IsThisEnabled(*args, **kwargs): + """ + IsThisEnabled(self) -> bool + + Returns the internal enabled state independent of the parent(s) state, + i.e. the state in which the window would be if all of its parents are + enabled. Use `IsEnabled` to get the effective window state. + """ + return _core_.Window_IsThisEnabled(*args, **kwargs) + def IsShownOnScreen(*args, **kwargs): """ IsShownOnScreen(self) -> bool @@ -9056,6 +9068,14 @@ class Window(EvtHandler): """ return _core_.Window_AcceptsFocus(*args, **kwargs) + def CanAcceptFocus(*args, **kwargs): + """ + CanAcceptFocus(self) -> bool + + Can this window have focus right now? + """ + return _core_.Window_CanAcceptFocus(*args, **kwargs) + def AcceptsFocusFromKeyboard(*args, **kwargs): """ AcceptsFocusFromKeyboard(self) -> bool @@ -9066,12 +9086,28 @@ class Window(EvtHandler): """ return _core_.Window_AcceptsFocusFromKeyboard(*args, **kwargs) + def CanAcceptFocusFromKeyboard(*args, **kwargs): + """ + CanAcceptFocusFromKeyboard(self) -> bool + + Can this window be assigned focus from keyboard right now? + """ + return _core_.Window_CanAcceptFocusFromKeyboard(*args, **kwargs) + + def NavigateIn(*args, **kwargs): + """ + NavigateIn(self, int flags=NavigationKeyEvent.IsForward) -> bool + + Navigates inside this window. + """ + return _core_.Window_NavigateIn(*args, **kwargs) + def Navigate(*args, **kwargs): """ Navigate(self, int flags=NavigationKeyEvent.IsForward) -> bool - Does keyboard navigation from this window to another, by sending a - `wx.NavigationKeyEvent`. + Does keyboard navigation starting from this window to another. This is + equivalient to self.GetParent().NavigateIn(). """ return _core_.Window_Navigate(*args, **kwargs) @@ -9127,6 +9163,14 @@ class Window(EvtHandler): """ return _core_.Window_GetGrandParent(*args, **kwargs) + def GetTopLevelParent(*args, **kwargs): + """ + GetTopLevelParent(self) -> Window + + Returns the first frame or dialog in this window's parental hierarchy. + """ + return _core_.Window_GetTopLevelParent(*args, **kwargs) + def IsTopLevel(*args, **kwargs): """ IsTopLevel(self) -> bool @@ -10427,6 +10471,7 @@ class Window(EvtHandler): Font = property(GetFont,SetFont,doc="See `GetFont` and `SetFont`") ForegroundColour = property(GetForegroundColour,SetForegroundColour,doc="See `GetForegroundColour` and `SetForegroundColour`") GrandParent = property(GetGrandParent,doc="See `GetGrandParent`") + TopLevelParent = property(GetTopLevelParent,doc="See `GetTopLevelParent`") Handle = property(GetHandle,doc="See `GetHandle`") HelpText = property(GetHelpText,SetHelpText,doc="See `GetHelpText` and `SetHelpText`") Id = property(GetId,SetId,doc="See `GetId` and `SetId`") @@ -11070,7 +11115,6 @@ class MenuBar(Window): self.Append(m, l) Frame = property(GetFrame,doc="See `GetFrame`") - Menu = property(GetMenu,doc="See `GetMenu`") MenuCount = property(GetMenuCount,doc="See `GetMenuCount`") Menus = property(GetMenus,SetMenus,doc="See `GetMenus` and `SetMenus`") _core_.MenuBar_swigregister(MenuBar) @@ -11605,6 +11649,222 @@ _core_.ControlWithItems_swigregister(ControlWithItems) #--------------------------------------------------------------------------- +class SizerFlags(object): + """ + Normally, when you add an item to a sizer via `wx.Sizer.Add`, you have + to specify a lot of flags and parameters which can be unwieldy. This + is where wx.SizerFlags comes in: it allows you to specify all + parameters using the named methods instead. For example, instead of:: + + sizer.Add(ctrl, 0, wx.EXPAND | wx.ALL, 10) + + you can now write:: + + sizer.AddF(ctrl, wx.SizerFlags().Expand().Border(wx.ALL, 10)) + + This is more readable and also allows you to create wx.SizerFlags + objects which can be reused for several sizer items.:: + + flagsExpand = wx.SizerFlags(1) + flagsExpand.Expand().Border(wx.ALL, 10) + sizer.AddF(ctrl1, flagsExpand) + sizer.AddF(ctrl2, flagsExpand) + + Note that by specification, all methods of wx.SizerFlags return the + wx.SizerFlags object itself allowing chaining multiple method calls + like in the examples above. + """ + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + __repr__ = _swig_repr + def __init__(self, *args, **kwargs): + """ + __init__(self, int proportion=0) -> SizerFlags + + Constructs the flags object with the specified proportion. + """ + _core_.SizerFlags_swiginit(self,_core_.new_SizerFlags(*args, **kwargs)) + __swig_destroy__ = _core_.delete_SizerFlags + __del__ = lambda self : None; + def Proportion(*args, **kwargs): + """ + Proportion(self, int proportion) -> SizerFlags + + Sets the item's proportion value. + """ + return _core_.SizerFlags_Proportion(*args, **kwargs) + + def Align(*args, **kwargs): + """ + Align(self, int alignment) -> SizerFlags + + Sets the item's alignment + """ + return _core_.SizerFlags_Align(*args, **kwargs) + + def Expand(*args, **kwargs): + """ + Expand(self) -> SizerFlags + + Sets the wx.EXPAND flag, which will cause the item to be expanded to + fill as much space as it is given by the sizer. + """ + return _core_.SizerFlags_Expand(*args, **kwargs) + + def Centre(*args, **kwargs): + """ + Centre(self) -> SizerFlags + + Same as `Center` for those with an alternate dialect of English. + """ + return _core_.SizerFlags_Centre(*args, **kwargs) + + def Center(*args, **kwargs): + """ + Center(self) -> SizerFlags + + Sets the centering alignment flags. + """ + return _core_.SizerFlags_Center(*args, **kwargs) + + def Left(*args, **kwargs): + """ + Left(self) -> SizerFlags + + Aligns the object to the left, a shortcut for calling + Align(wx.ALIGN_LEFT) + """ + return _core_.SizerFlags_Left(*args, **kwargs) + + def Right(*args, **kwargs): + """ + Right(self) -> SizerFlags + + Aligns the object to the right, a shortcut for calling + Align(wx.ALIGN_RIGHT) + """ + return _core_.SizerFlags_Right(*args, **kwargs) + + def Top(*args, **kwargs): + """ + Top(self) -> SizerFlags + + Aligns the object to the top of the available space, a shortcut for + calling Align(wx.ALIGN_TOP) + """ + return _core_.SizerFlags_Top(*args, **kwargs) + + def Bottom(*args, **kwargs): + """ + Bottom(self) -> SizerFlags + + Aligns the object to the bottom of the available space, a shortcut for + calling Align(wx.ALIGN_BOTTOM) + """ + return _core_.SizerFlags_Bottom(*args, **kwargs) + + def Shaped(*args, **kwargs): + """ + Shaped(self) -> SizerFlags + + Sets the wx.SHAPED flag. + """ + return _core_.SizerFlags_Shaped(*args, **kwargs) + + def FixedMinSize(*args, **kwargs): + """ + FixedMinSize(self) -> SizerFlags + + Sets the wx.FIXED_MINSIZE flag. + """ + return _core_.SizerFlags_FixedMinSize(*args, **kwargs) + + def Border(*args, **kwargs): + """ + Border(self, int direction=ALL, int borderInPixels=-1) -> SizerFlags + + Sets the border of the item in the direction(s) or sides given by the + direction parameter. If the borderInPixels value is not given then + the default border size (see `GetDefaultBorder`) will be used. + """ + return _core_.SizerFlags_Border(*args, **kwargs) + + def DoubleBorder(*args, **kwargs): + """ + DoubleBorder(self, int direction=ALL) -> SizerFlags + + Sets the border in the given direction to twice the default border + size. + """ + return _core_.SizerFlags_DoubleBorder(*args, **kwargs) + + def TripleBorder(*args, **kwargs): + """ + TripleBorder(self, int direction=ALL) -> SizerFlags + + Sets the border in the given direction to three times the default + border size. + """ + return _core_.SizerFlags_TripleBorder(*args, **kwargs) + + def HorzBorder(*args, **kwargs): + """ + HorzBorder(self) -> SizerFlags + + Sets the left and right borders to the default border size. + """ + return _core_.SizerFlags_HorzBorder(*args, **kwargs) + + def DoubleHorzBorder(*args, **kwargs): + """ + DoubleHorzBorder(self) -> SizerFlags + + Sets the left and right borders to twice the default border size. + """ + return _core_.SizerFlags_DoubleHorzBorder(*args, **kwargs) + + def GetDefaultBorder(*args, **kwargs): + """ + GetDefaultBorder() -> int + + Returns the default border size used by the other border methods + """ + return _core_.SizerFlags_GetDefaultBorder(*args, **kwargs) + + GetDefaultBorder = staticmethod(GetDefaultBorder) + def GetProportion(*args, **kwargs): + """ + GetProportion(self) -> int + + Returns the proportion value to be used in the sizer item. + """ + return _core_.SizerFlags_GetProportion(*args, **kwargs) + + def GetFlags(*args, **kwargs): + """ + GetFlags(self) -> int + + Returns the flags value to be used in the sizer item. + """ + return _core_.SizerFlags_GetFlags(*args, **kwargs) + + def GetBorderInPixels(*args, **kwargs): + """ + GetBorderInPixels(self) -> int + + Returns the border value in pixels to be used in the sizer item. + """ + return _core_.SizerFlags_GetBorderInPixels(*args, **kwargs) + +_core_.SizerFlags_swigregister(SizerFlags) + +def SizerFlags_GetDefaultBorder(*args): + """ + SizerFlags_GetDefaultBorder() -> int + + Returns the default border size used by the other border methods + """ + return _core_.SizerFlags_GetDefaultBorder(*args) + class SizerItem(Object): """ The wx.SizerItem class is used to track the position, size and other @@ -12000,6 +12260,15 @@ class Sizer(Object): """ return _core_.Sizer_Add(*args, **kwargs) + def AddF(*args, **kwargs): + """ + AddF(self, item, wx.SizerFlags flags) -> wx.SizerItem + + Similar to `Add` but uses the `wx.SizerFlags` convenience class for + setting the various flags, options and borders. + """ + return _core_.Sizer_AddF(*args, **kwargs) + def Insert(*args, **kwargs): """ Insert(self, int before, item, int proportion=0, int flag=0, int border=0, @@ -12010,6 +12279,15 @@ class Sizer(Object): """ return _core_.Sizer_Insert(*args, **kwargs) + def InsertF(*args, **kwargs): + """ + InsertF(self, int before, item, wx.SizerFlags flags) -> wx.SizerItem + + Similar to `Insert`, but uses the `wx.SizerFlags` convenience class + for setting the various flags, options and borders. + """ + return _core_.Sizer_InsertF(*args, **kwargs) + def Prepend(*args, **kwargs): """ Prepend(self, item, int proportion=0, int flag=0, int border=0, @@ -12020,6 +12298,15 @@ class Sizer(Object): """ return _core_.Sizer_Prepend(*args, **kwargs) + def PrependF(*args, **kwargs): + """ + PrependF(self, item, wx.SizerFlags flags) -> wx.SizerItem + + Similar to `Prepend` but uses the `wx.SizerFlags` convenience class + for setting the various flags, options and borders. + """ + return _core_.Sizer_PrependF(*args, **kwargs) + def Remove(*args, **kwargs): """ Remove(self, item) -> bool @@ -12047,7 +12334,7 @@ class Sizer(Object): def GetItem(*args, **kwargs): """ - GetItem(self, item) -> wx.SizerItem + GetItem(self, item, recursive=False) -> wx.SizerItem Returns the `wx.SizerItem` which holds the *item* given. The *item* parameter can be either a window, a sizer, or the zero-based index of @@ -12087,9 +12374,9 @@ class Sizer(Object): """ if isinstance(olditem, wx.Window): return self._ReplaceWin(olditem, item, recursive) - elif isinstnace(olditem, wx.Sizer): + elif isinstance(olditem, wx.Sizer): return self._ReplaceSizer(olditem, item, recursive) - elif isinstnace(olditem, int): + elif isinstance(olditem, int): return self._ReplaceItem(olditem, item) else: raise TypeError("Expected Window, Sizer, or integer for first parameter.") diff --git a/wxPython/src/msw/_core_wrap.cpp b/wxPython/src/msw/_core_wrap.cpp index b3340c308b..0772ab4928 100644 --- a/wxPython/src/msw/_core_wrap.cpp +++ b/wxPython/src/msw/_core_wrap.cpp @@ -2583,24 +2583,25 @@ SWIG_Python_MustGetPtr(PyObject *obj, swig_type_info *ty, int argnum, int flags) #define SWIGTYPE_p_wxSize swig_types[117] #define SWIGTYPE_p_wxSizeEvent swig_types[118] #define SWIGTYPE_p_wxSizer swig_types[119] -#define SWIGTYPE_p_wxSizerItem swig_types[120] -#define SWIGTYPE_p_wxStaticBox swig_types[121] -#define SWIGTYPE_p_wxStaticBoxSizer swig_types[122] -#define SWIGTYPE_p_wxStdDialogButtonSizer swig_types[123] -#define SWIGTYPE_p_wxSysColourChangedEvent swig_types[124] -#define SWIGTYPE_p_wxTGAHandler swig_types[125] -#define SWIGTYPE_p_wxTIFFHandler swig_types[126] -#define SWIGTYPE_p_wxToolTip swig_types[127] -#define SWIGTYPE_p_wxUpdateUIEvent swig_types[128] -#define SWIGTYPE_p_wxValidator swig_types[129] -#define SWIGTYPE_p_wxVisualAttributes swig_types[130] -#define SWIGTYPE_p_wxWindow swig_types[131] -#define SWIGTYPE_p_wxWindowCreateEvent swig_types[132] -#define SWIGTYPE_p_wxWindowDestroyEvent swig_types[133] -#define SWIGTYPE_p_wxXPMHandler swig_types[134] -#define SWIGTYPE_p_wxZipFSHandler swig_types[135] -static swig_type_info *swig_types[137]; -static swig_module_info swig_module = {swig_types, 136, 0, 0, 0, 0}; +#define SWIGTYPE_p_wxSizerFlags swig_types[120] +#define SWIGTYPE_p_wxSizerItem swig_types[121] +#define SWIGTYPE_p_wxStaticBox swig_types[122] +#define SWIGTYPE_p_wxStaticBoxSizer swig_types[123] +#define SWIGTYPE_p_wxStdDialogButtonSizer swig_types[124] +#define SWIGTYPE_p_wxSysColourChangedEvent swig_types[125] +#define SWIGTYPE_p_wxTGAHandler swig_types[126] +#define SWIGTYPE_p_wxTIFFHandler swig_types[127] +#define SWIGTYPE_p_wxToolTip swig_types[128] +#define SWIGTYPE_p_wxUpdateUIEvent swig_types[129] +#define SWIGTYPE_p_wxValidator swig_types[130] +#define SWIGTYPE_p_wxVisualAttributes swig_types[131] +#define SWIGTYPE_p_wxWindow swig_types[132] +#define SWIGTYPE_p_wxWindowCreateEvent swig_types[133] +#define SWIGTYPE_p_wxWindowDestroyEvent swig_types[134] +#define SWIGTYPE_p_wxXPMHandler swig_types[135] +#define SWIGTYPE_p_wxZipFSHandler swig_types[136] +static swig_type_info *swig_types[138]; +static swig_module_info swig_module = {swig_types, 137, 0, 0, 0, 0}; #define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name) #define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name) @@ -3884,6 +3885,9 @@ SWIGINTERN PyObject *wxWindow_GetChildren(wxWindow *self){ wxWindowList& list = self->GetChildren(); return wxPy_ConvertList(&list); } +SWIGINTERN wxWindow *wxWindow_GetTopLevelParent(wxWindow *self){ + return wxGetTopLevelParent(self); + } SWIGINTERN void wxWindow_SetDoubleBuffered(wxWindow *self,bool on){} SWIGINTERN bool wxWindow_RegisterHotKey(wxWindow *self,int hotkeyId,int modifiers,int keycode){ #if wxUSE_HOTKEY @@ -4006,6 +4010,12 @@ SWIGINTERN void wxItemContainer_SetClientData(wxItemContainer *self,int n,PyObje } +SWIGINTERN wxSizerFlags &wxSizerFlags_Border(wxSizerFlags *self,int direction=wxALL,int borderInPixels=-1){ + if (borderInPixels == -1) + return self->Border(direction); + else + return self->Border(direction, borderInPixels); + } SWIGINTERN wxSizerItem *new_wxSizerItem(wxWindow *window,int proportion,int flag,int border,PyObject *userData=NULL){ wxPyUserData* data = NULL; if ( userData ) { @@ -4149,6 +4159,27 @@ SWIGINTERN wxSizerItem *wxSizer_Add(wxSizer *self,PyObject *item,int proportion= else return NULL; } +SWIGINTERN wxSizerItem *wxSizer_AddF(wxSizer *self,PyObject *item,wxSizerFlags &flags){ + + wxPyBlock_t blocked = wxPyBeginBlockThreads(); + wxPySizerItemInfo info = wxPySizerItemTypeHelper(item, true, false); + if ( info.sizer ) + PyObject_SetAttrString(item,"thisown",Py_False); + wxPyEndBlockThreads(blocked); + + // Now call the real Add method if a valid item type was found + if ( info.window ) + return self->Add(info.window, flags); + else if ( info.sizer ) + return self->Add(info.sizer, flags); + else if (info.gotSize) + return self->Add(info.size.GetWidth(), info.size.GetHeight(), + flags.GetProportion(), + flags.GetFlags(), + flags.GetBorderInPixels()); + else + return NULL; + } SWIGINTERN wxSizerItem *wxSizer_Insert(wxSizer *self,int before,PyObject *item,int proportion=0,int flag=0,int border=0,PyObject *userData=NULL){ wxPyUserData* data = NULL; @@ -4171,6 +4202,27 @@ SWIGINTERN wxSizerItem *wxSizer_Insert(wxSizer *self,int before,PyObject *item,i else return NULL; } +SWIGINTERN wxSizerItem *wxSizer_InsertF(wxSizer *self,int before,PyObject *item,wxSizerFlags &flags){ + + wxPyBlock_t blocked = wxPyBeginBlockThreads(); + wxPySizerItemInfo info = wxPySizerItemTypeHelper(item, true, false); + if ( info.sizer ) + PyObject_SetAttrString(item,"thisown",Py_False); + wxPyEndBlockThreads(blocked); + + // Now call the real Insert method if a valid item type was found + if ( info.window ) + return self->Insert(before, info.window, flags); + else if ( info.sizer ) + return self->Insert(before, info.sizer, flags); + else if (info.gotSize) + return self->Insert(before, info.size.GetWidth(), info.size.GetHeight(), + flags.GetProportion(), + flags.GetFlags(), + flags.GetBorderInPixels()); + else + return NULL; + } SWIGINTERN wxSizerItem *wxSizer_Prepend(wxSizer *self,PyObject *item,int proportion=0,int flag=0,int border=0,PyObject *userData=NULL){ wxPyUserData* data = NULL; @@ -4193,12 +4245,33 @@ SWIGINTERN wxSizerItem *wxSizer_Prepend(wxSizer *self,PyObject *item,int proport else return NULL; } +SWIGINTERN wxSizerItem *wxSizer_PrependF(wxSizer *self,PyObject *item,wxSizerFlags &flags){ + + wxPyBlock_t blocked = wxPyBeginBlockThreads(); + wxPySizerItemInfo info = wxPySizerItemTypeHelper(item, true, false); + if ( info.sizer ) + PyObject_SetAttrString(item,"thisown",Py_False); + wxPyEndBlockThreads(blocked); + + // Now call the real Add method if a valid item type was found + if ( info.window ) + return self->Prepend(info.window, flags); + else if ( info.sizer ) + return self->Prepend(info.sizer, flags); + else if (info.gotSize) + return self->Prepend(info.size.GetWidth(), info.size.GetHeight(), + flags.GetProportion(), + flags.GetFlags(), + flags.GetBorderInPixels()); + else + return NULL; + } SWIGINTERN bool wxSizer_Remove(wxSizer *self,PyObject *item){ wxPyBlock_t blocked = wxPyBeginBlockThreads(); wxPySizerItemInfo info = wxPySizerItemTypeHelper(item, false, true); wxPyEndBlockThreads(blocked); if ( info.window ) - return self->Remove(info.window); + return false; //self->Remove(info.window); else if ( info.sizer ) return self->Remove(info.sizer); else if ( info.gotPos ) @@ -4219,14 +4292,14 @@ SWIGINTERN bool wxSizer_Detach(wxSizer *self,PyObject *item){ else return false; } -SWIGINTERN wxSizerItem *wxSizer_GetItem(wxSizer *self,PyObject *item){ +SWIGINTERN wxSizerItem *wxSizer_GetItem(wxSizer *self,PyObject *item,bool recursive=false){ wxPyBlock_t blocked = wxPyBeginBlockThreads(); wxPySizerItemInfo info = wxPySizerItemTypeHelper(item, false, true); wxPyEndBlockThreads(blocked); if ( info.window ) - return self->GetItem(info.window); + return self->GetItem(info.window, recursive); else if ( info.sizer ) - return self->GetItem(info.sizer); + return self->GetItem(info.sizer, recursive); else if ( info.gotPos ) return self->GetItem(info.pos); else @@ -32538,43 +32611,6 @@ SWIGINTERN PyObject *NullAcceleratorTable_get(void) { } -SWIGINTERN PyObject *_wrap_GetAccelFromString(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - wxString *arg1 = 0 ; - wxAcceleratorEntry *result = 0 ; - bool temp1 = false ; - PyObject * obj0 = 0 ; - char * kwnames[] = { - (char *) "label", NULL - }; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:GetAccelFromString",kwnames,&obj0)) SWIG_fail; - { - arg1 = wxString_in_helper(obj0); - if (arg1 == NULL) SWIG_fail; - temp1 = true; - } - { - PyThreadState* __tstate = wxPyBeginAllowThreads(); - result = (wxAcceleratorEntry *)wxGetAccelFromString((wxString const &)*arg1); - wxPyEndAllowThreads(__tstate); - if (PyErr_Occurred()) SWIG_fail; - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_wxAcceleratorEntry, 0 | 0 ); - { - if (temp1) - delete arg1; - } - return resultobj; -fail: - { - if (temp1) - delete arg1; - } - return NULL; -} - - SWIGINTERN int PanelNameStr_set(PyObject *) { SWIG_Error(SWIG_AttributeError,"Variable PanelNameStr is read-only."); return 1; @@ -35805,6 +35841,36 @@ fail: } +SWIGINTERN PyObject *_wrap_Window_IsThisEnabled(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + wxWindow *arg1 = (wxWindow *) 0 ; + bool result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_wxWindow, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Window_IsThisEnabled" "', expected argument " "1"" of type '" "wxWindow const *""'"); + } + arg1 = reinterpret_cast< wxWindow * >(argp1); + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + result = (bool)((wxWindow const *)arg1)->IsThisEnabled(); + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + { + resultobj = result ? Py_True : Py_False; Py_INCREF(resultobj); + } + return resultobj; +fail: + return NULL; +} + + SWIGINTERN PyObject *_wrap_Window_IsShownOnScreen(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; wxWindow *arg1 = (wxWindow *) 0 ; @@ -36292,6 +36358,36 @@ fail: } +SWIGINTERN PyObject *_wrap_Window_CanAcceptFocus(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + wxWindow *arg1 = (wxWindow *) 0 ; + bool result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_wxWindow, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Window_CanAcceptFocus" "', expected argument " "1"" of type '" "wxWindow const *""'"); + } + arg1 = reinterpret_cast< wxWindow * >(argp1); + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + result = (bool)((wxWindow const *)arg1)->CanAcceptFocus(); + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + { + resultobj = result ? Py_True : Py_False; Py_INCREF(resultobj); + } + return resultobj; +fail: + return NULL; +} + + SWIGINTERN PyObject *_wrap_Window_AcceptsFocusFromKeyboard(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; wxWindow *arg1 = (wxWindow *) 0 ; @@ -36322,6 +36418,79 @@ fail: } +SWIGINTERN PyObject *_wrap_Window_CanAcceptFocusFromKeyboard(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + wxWindow *arg1 = (wxWindow *) 0 ; + bool result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_wxWindow, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Window_CanAcceptFocusFromKeyboard" "', expected argument " "1"" of type '" "wxWindow const *""'"); + } + arg1 = reinterpret_cast< wxWindow * >(argp1); + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + result = (bool)((wxWindow const *)arg1)->CanAcceptFocusFromKeyboard(); + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + { + resultobj = result ? Py_True : Py_False; Py_INCREF(resultobj); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Window_NavigateIn(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + wxWindow *arg1 = (wxWindow *) 0 ; + int arg2 = (int) wxNavigationKeyEvent::IsForward ; + bool result; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "flags", NULL + }; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:Window_NavigateIn",kwnames,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_wxWindow, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Window_NavigateIn" "', expected argument " "1"" of type '" "wxWindow *""'"); + } + arg1 = reinterpret_cast< wxWindow * >(argp1); + if (obj1) { + ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Window_NavigateIn" "', expected argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + } + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + result = (bool)(arg1)->NavigateIn(arg2); + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + { + resultobj = result ? Py_True : Py_False; Py_INCREF(resultobj); + } + return resultobj; +fail: + return NULL; +} + + SWIGINTERN PyObject *_wrap_Window_Navigate(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { PyObject *resultobj = 0; wxWindow *arg1 = (wxWindow *) 0 ; @@ -36529,6 +36698,36 @@ fail: } +SWIGINTERN PyObject *_wrap_Window_GetTopLevelParent(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + wxWindow *arg1 = (wxWindow *) 0 ; + wxWindow *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_wxWindow, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Window_GetTopLevelParent" "', expected argument " "1"" of type '" "wxWindow *""'"); + } + arg1 = reinterpret_cast< wxWindow * >(argp1); + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + result = (wxWindow *)wxWindow_GetTopLevelParent(arg1); + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + { + resultobj = wxPyMake_wxObject(result, 0); + } + return resultobj; +fail: + return NULL; +} + + SWIGINTERN PyObject *_wrap_Window_IsTopLevel(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; wxWindow *arg1 = (wxWindow *) 0 ; @@ -48563,6 +48762,779 @@ SWIGINTERN PyObject *ControlWithItems_swigregister(PyObject *SWIGUNUSEDPARM(self return SWIG_Py_Void(); } +SWIGINTERN PyObject *_wrap_new_SizerFlags(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + int arg1 = (int) 0 ; + wxSizerFlags *result = 0 ; + int val1 ; + int ecode1 = 0 ; + PyObject * obj0 = 0 ; + char * kwnames[] = { + (char *) "proportion", NULL + }; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"|O:new_SizerFlags",kwnames,&obj0)) SWIG_fail; + if (obj0) { + ecode1 = SWIG_AsVal_int(obj0, &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_SizerFlags" "', expected argument " "1"" of type '" "int""'"); + } + arg1 = static_cast< int >(val1); + } + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + result = (wxSizerFlags *)new wxSizerFlags(arg1); + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_wxSizerFlags, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_SizerFlags(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + wxSizerFlags *arg1 = (wxSizerFlags *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_wxSizerFlags, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_SizerFlags" "', expected argument " "1"" of type '" "wxSizerFlags *""'"); + } + arg1 = reinterpret_cast< wxSizerFlags * >(argp1); + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + delete arg1; + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SizerFlags_Proportion(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + wxSizerFlags *arg1 = (wxSizerFlags *) 0 ; + int arg2 ; + wxSizerFlags *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "proportion", NULL + }; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:SizerFlags_Proportion",kwnames,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_wxSizerFlags, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SizerFlags_Proportion" "', expected argument " "1"" of type '" "wxSizerFlags *""'"); + } + arg1 = reinterpret_cast< wxSizerFlags * >(argp1); + ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SizerFlags_Proportion" "', expected argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + { + wxSizerFlags &_result_ref = (arg1)->Proportion(arg2); + result = (wxSizerFlags *) &_result_ref; + } + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + { + resultobj = obj0; Py_INCREF(resultobj); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SizerFlags_Align(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + wxSizerFlags *arg1 = (wxSizerFlags *) 0 ; + int arg2 ; + wxSizerFlags *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "alignment", NULL + }; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:SizerFlags_Align",kwnames,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_wxSizerFlags, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SizerFlags_Align" "', expected argument " "1"" of type '" "wxSizerFlags *""'"); + } + arg1 = reinterpret_cast< wxSizerFlags * >(argp1); + ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SizerFlags_Align" "', expected argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + { + wxSizerFlags &_result_ref = (arg1)->Align(arg2); + result = (wxSizerFlags *) &_result_ref; + } + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + { + resultobj = obj0; Py_INCREF(resultobj); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SizerFlags_Expand(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + wxSizerFlags *arg1 = (wxSizerFlags *) 0 ; + wxSizerFlags *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_wxSizerFlags, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SizerFlags_Expand" "', expected argument " "1"" of type '" "wxSizerFlags *""'"); + } + arg1 = reinterpret_cast< wxSizerFlags * >(argp1); + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + { + wxSizerFlags &_result_ref = (arg1)->Expand(); + result = (wxSizerFlags *) &_result_ref; + } + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + { + resultobj = swig_obj[0]; Py_INCREF(resultobj); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SizerFlags_Centre(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + wxSizerFlags *arg1 = (wxSizerFlags *) 0 ; + wxSizerFlags *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_wxSizerFlags, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SizerFlags_Centre" "', expected argument " "1"" of type '" "wxSizerFlags *""'"); + } + arg1 = reinterpret_cast< wxSizerFlags * >(argp1); + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + { + wxSizerFlags &_result_ref = (arg1)->Centre(); + result = (wxSizerFlags *) &_result_ref; + } + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + { + resultobj = swig_obj[0]; Py_INCREF(resultobj); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SizerFlags_Center(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + wxSizerFlags *arg1 = (wxSizerFlags *) 0 ; + wxSizerFlags *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_wxSizerFlags, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SizerFlags_Center" "', expected argument " "1"" of type '" "wxSizerFlags *""'"); + } + arg1 = reinterpret_cast< wxSizerFlags * >(argp1); + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + { + wxSizerFlags &_result_ref = (arg1)->Center(); + result = (wxSizerFlags *) &_result_ref; + } + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + { + resultobj = swig_obj[0]; Py_INCREF(resultobj); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SizerFlags_Left(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + wxSizerFlags *arg1 = (wxSizerFlags *) 0 ; + wxSizerFlags *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_wxSizerFlags, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SizerFlags_Left" "', expected argument " "1"" of type '" "wxSizerFlags *""'"); + } + arg1 = reinterpret_cast< wxSizerFlags * >(argp1); + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + { + wxSizerFlags &_result_ref = (arg1)->Left(); + result = (wxSizerFlags *) &_result_ref; + } + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + { + resultobj = swig_obj[0]; Py_INCREF(resultobj); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SizerFlags_Right(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + wxSizerFlags *arg1 = (wxSizerFlags *) 0 ; + wxSizerFlags *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_wxSizerFlags, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SizerFlags_Right" "', expected argument " "1"" of type '" "wxSizerFlags *""'"); + } + arg1 = reinterpret_cast< wxSizerFlags * >(argp1); + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + { + wxSizerFlags &_result_ref = (arg1)->Right(); + result = (wxSizerFlags *) &_result_ref; + } + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + { + resultobj = swig_obj[0]; Py_INCREF(resultobj); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SizerFlags_Top(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + wxSizerFlags *arg1 = (wxSizerFlags *) 0 ; + wxSizerFlags *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_wxSizerFlags, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SizerFlags_Top" "', expected argument " "1"" of type '" "wxSizerFlags *""'"); + } + arg1 = reinterpret_cast< wxSizerFlags * >(argp1); + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + { + wxSizerFlags &_result_ref = (arg1)->Top(); + result = (wxSizerFlags *) &_result_ref; + } + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + { + resultobj = swig_obj[0]; Py_INCREF(resultobj); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SizerFlags_Bottom(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + wxSizerFlags *arg1 = (wxSizerFlags *) 0 ; + wxSizerFlags *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_wxSizerFlags, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SizerFlags_Bottom" "', expected argument " "1"" of type '" "wxSizerFlags *""'"); + } + arg1 = reinterpret_cast< wxSizerFlags * >(argp1); + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + { + wxSizerFlags &_result_ref = (arg1)->Bottom(); + result = (wxSizerFlags *) &_result_ref; + } + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + { + resultobj = swig_obj[0]; Py_INCREF(resultobj); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SizerFlags_Shaped(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + wxSizerFlags *arg1 = (wxSizerFlags *) 0 ; + wxSizerFlags *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_wxSizerFlags, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SizerFlags_Shaped" "', expected argument " "1"" of type '" "wxSizerFlags *""'"); + } + arg1 = reinterpret_cast< wxSizerFlags * >(argp1); + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + { + wxSizerFlags &_result_ref = (arg1)->Shaped(); + result = (wxSizerFlags *) &_result_ref; + } + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + { + resultobj = swig_obj[0]; Py_INCREF(resultobj); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SizerFlags_FixedMinSize(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + wxSizerFlags *arg1 = (wxSizerFlags *) 0 ; + wxSizerFlags *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_wxSizerFlags, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SizerFlags_FixedMinSize" "', expected argument " "1"" of type '" "wxSizerFlags *""'"); + } + arg1 = reinterpret_cast< wxSizerFlags * >(argp1); + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + { + wxSizerFlags &_result_ref = (arg1)->FixedMinSize(); + result = (wxSizerFlags *) &_result_ref; + } + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + { + resultobj = swig_obj[0]; Py_INCREF(resultobj); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SizerFlags_Border(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + wxSizerFlags *arg1 = (wxSizerFlags *) 0 ; + int arg2 = (int) wxALL ; + int arg3 = (int) -1 ; + wxSizerFlags *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + int val3 ; + int ecode3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "direction",(char *) "borderInPixels", NULL + }; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|OO:SizerFlags_Border",kwnames,&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_wxSizerFlags, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SizerFlags_Border" "', expected argument " "1"" of type '" "wxSizerFlags *""'"); + } + arg1 = reinterpret_cast< wxSizerFlags * >(argp1); + if (obj1) { + ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SizerFlags_Border" "', expected argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + } + if (obj2) { + ecode3 = SWIG_AsVal_int(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SizerFlags_Border" "', expected argument " "3"" of type '" "int""'"); + } + arg3 = static_cast< int >(val3); + } + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + { + wxSizerFlags &_result_ref = wxSizerFlags_Border(arg1,arg2,arg3); + result = (wxSizerFlags *) &_result_ref; + } + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + { + resultobj = obj0; Py_INCREF(resultobj); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SizerFlags_DoubleBorder(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + wxSizerFlags *arg1 = (wxSizerFlags *) 0 ; + int arg2 = (int) wxALL ; + wxSizerFlags *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "direction", NULL + }; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:SizerFlags_DoubleBorder",kwnames,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_wxSizerFlags, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SizerFlags_DoubleBorder" "', expected argument " "1"" of type '" "wxSizerFlags *""'"); + } + arg1 = reinterpret_cast< wxSizerFlags * >(argp1); + if (obj1) { + ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SizerFlags_DoubleBorder" "', expected argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + } + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + { + wxSizerFlags &_result_ref = (arg1)->DoubleBorder(arg2); + result = (wxSizerFlags *) &_result_ref; + } + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + { + resultobj = obj0; Py_INCREF(resultobj); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SizerFlags_TripleBorder(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + wxSizerFlags *arg1 = (wxSizerFlags *) 0 ; + int arg2 = (int) wxALL ; + wxSizerFlags *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "direction", NULL + }; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:SizerFlags_TripleBorder",kwnames,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_wxSizerFlags, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SizerFlags_TripleBorder" "', expected argument " "1"" of type '" "wxSizerFlags *""'"); + } + arg1 = reinterpret_cast< wxSizerFlags * >(argp1); + if (obj1) { + ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SizerFlags_TripleBorder" "', expected argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + } + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + { + wxSizerFlags &_result_ref = (arg1)->TripleBorder(arg2); + result = (wxSizerFlags *) &_result_ref; + } + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + { + resultobj = obj0; Py_INCREF(resultobj); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SizerFlags_HorzBorder(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + wxSizerFlags *arg1 = (wxSizerFlags *) 0 ; + wxSizerFlags *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_wxSizerFlags, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SizerFlags_HorzBorder" "', expected argument " "1"" of type '" "wxSizerFlags *""'"); + } + arg1 = reinterpret_cast< wxSizerFlags * >(argp1); + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + { + wxSizerFlags &_result_ref = (arg1)->HorzBorder(); + result = (wxSizerFlags *) &_result_ref; + } + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + { + resultobj = swig_obj[0]; Py_INCREF(resultobj); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SizerFlags_DoubleHorzBorder(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + wxSizerFlags *arg1 = (wxSizerFlags *) 0 ; + wxSizerFlags *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_wxSizerFlags, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SizerFlags_DoubleHorzBorder" "', expected argument " "1"" of type '" "wxSizerFlags *""'"); + } + arg1 = reinterpret_cast< wxSizerFlags * >(argp1); + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + { + wxSizerFlags &_result_ref = (arg1)->DoubleHorzBorder(); + result = (wxSizerFlags *) &_result_ref; + } + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + { + resultobj = swig_obj[0]; Py_INCREF(resultobj); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SizerFlags_GetDefaultBorder(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + int result; + + if (!SWIG_Python_UnpackTuple(args,"SizerFlags_GetDefaultBorder",0,0,0)) SWIG_fail; + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + result = (int)wxSizerFlags::GetDefaultBorder(); + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SizerFlags_GetProportion(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + wxSizerFlags *arg1 = (wxSizerFlags *) 0 ; + int result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_wxSizerFlags, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SizerFlags_GetProportion" "', expected argument " "1"" of type '" "wxSizerFlags const *""'"); + } + arg1 = reinterpret_cast< wxSizerFlags * >(argp1); + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + result = (int)((wxSizerFlags const *)arg1)->GetProportion(); + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SizerFlags_GetFlags(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + wxSizerFlags *arg1 = (wxSizerFlags *) 0 ; + int result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_wxSizerFlags, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SizerFlags_GetFlags" "', expected argument " "1"" of type '" "wxSizerFlags const *""'"); + } + arg1 = reinterpret_cast< wxSizerFlags * >(argp1); + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + result = (int)((wxSizerFlags const *)arg1)->GetFlags(); + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SizerFlags_GetBorderInPixels(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + wxSizerFlags *arg1 = (wxSizerFlags *) 0 ; + int result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_wxSizerFlags, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SizerFlags_GetBorderInPixels" "', expected argument " "1"" of type '" "wxSizerFlags const *""'"); + } + arg1 = reinterpret_cast< wxSizerFlags * >(argp1); + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + result = (int)((wxSizerFlags const *)arg1)->GetBorderInPixels(); + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *SizerFlags_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_wxSizerFlags, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *SizerFlags_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} + SWIGINTERN PyObject *_wrap_new_SizerItem(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; wxSizerItem *result = 0 ; @@ -50019,6 +50991,51 @@ fail: } +SWIGINTERN PyObject *_wrap_Sizer_AddF(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + wxSizer *arg1 = (wxSizer *) 0 ; + PyObject *arg2 = (PyObject *) 0 ; + wxSizerFlags *arg3 = 0 ; + wxSizerItem *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp3 = 0 ; + int res3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "item",(char *) "flags", NULL + }; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:Sizer_AddF",kwnames,&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_wxSizer, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Sizer_AddF" "', expected argument " "1"" of type '" "wxSizer *""'"); + } + arg1 = reinterpret_cast< wxSizer * >(argp1); + arg2 = obj1; + res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_wxSizerFlags, 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Sizer_AddF" "', expected argument " "3"" of type '" "wxSizerFlags &""'"); + } + if (!argp3) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Sizer_AddF" "', expected argument " "3"" of type '" "wxSizerFlags &""'"); + } + arg3 = reinterpret_cast< wxSizerFlags * >(argp3); + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + result = (wxSizerItem *)wxSizer_AddF(arg1,arg2,*arg3); + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_wxSizerItem, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + SWIGINTERN PyObject *_wrap_Sizer_Insert(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { PyObject *resultobj = 0; wxSizer *arg1 = (wxSizer *) 0 ; @@ -50099,6 +51116,60 @@ fail: } +SWIGINTERN PyObject *_wrap_Sizer_InsertF(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + wxSizer *arg1 = (wxSizer *) 0 ; + int arg2 ; + PyObject *arg3 = (PyObject *) 0 ; + wxSizerFlags *arg4 = 0 ; + wxSizerItem *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + void *argp4 = 0 ; + int res4 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "before",(char *) "item",(char *) "flags", NULL + }; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOO:Sizer_InsertF",kwnames,&obj0,&obj1,&obj2,&obj3)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_wxSizer, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Sizer_InsertF" "', expected argument " "1"" of type '" "wxSizer *""'"); + } + arg1 = reinterpret_cast< wxSizer * >(argp1); + ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Sizer_InsertF" "', expected argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + arg3 = obj2; + res4 = SWIG_ConvertPtr(obj3, &argp4, SWIGTYPE_p_wxSizerFlags, 0 ); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "Sizer_InsertF" "', expected argument " "4"" of type '" "wxSizerFlags &""'"); + } + if (!argp4) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Sizer_InsertF" "', expected argument " "4"" of type '" "wxSizerFlags &""'"); + } + arg4 = reinterpret_cast< wxSizerFlags * >(argp4); + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + result = (wxSizerItem *)wxSizer_InsertF(arg1,arg2,arg3,*arg4); + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_wxSizerItem, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + SWIGINTERN PyObject *_wrap_Sizer_Prepend(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { PyObject *resultobj = 0; wxSizer *arg1 = (wxSizer *) 0 ; @@ -50170,6 +51241,51 @@ fail: } +SWIGINTERN PyObject *_wrap_Sizer_PrependF(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + wxSizer *arg1 = (wxSizer *) 0 ; + PyObject *arg2 = (PyObject *) 0 ; + wxSizerFlags *arg3 = 0 ; + wxSizerItem *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp3 = 0 ; + int res3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "item",(char *) "flags", NULL + }; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:Sizer_PrependF",kwnames,&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_wxSizer, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Sizer_PrependF" "', expected argument " "1"" of type '" "wxSizer *""'"); + } + arg1 = reinterpret_cast< wxSizer * >(argp1); + arg2 = obj1; + res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_wxSizerFlags, 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Sizer_PrependF" "', expected argument " "3"" of type '" "wxSizerFlags &""'"); + } + if (!argp3) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Sizer_PrependF" "', expected argument " "3"" of type '" "wxSizerFlags &""'"); + } + arg3 = reinterpret_cast< wxSizerFlags * >(argp3); + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + result = (wxSizerItem *)wxSizer_PrependF(arg1,arg2,*arg3); + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_wxSizerItem, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + SWIGINTERN PyObject *_wrap_Sizer_Remove(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { PyObject *resultobj = 0; wxSizer *arg1 = (wxSizer *) 0 ; @@ -50244,25 +51360,36 @@ SWIGINTERN PyObject *_wrap_Sizer_GetItem(PyObject *SWIGUNUSEDPARM(self), PyObjec PyObject *resultobj = 0; wxSizer *arg1 = (wxSizer *) 0 ; PyObject *arg2 = (PyObject *) 0 ; + bool arg3 = (bool) false ; wxSizerItem *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; + bool val3 ; + int ecode3 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; char * kwnames[] = { - (char *) "self",(char *) "item", NULL + (char *) "self",(char *) "item",(char *) "recursive", NULL }; - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:Sizer_GetItem",kwnames,&obj0,&obj1)) SWIG_fail; + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|O:Sizer_GetItem",kwnames,&obj0,&obj1,&obj2)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_wxSizer, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Sizer_GetItem" "', expected argument " "1"" of type '" "wxSizer *""'"); } arg1 = reinterpret_cast< wxSizer * >(argp1); arg2 = obj1; + if (obj2) { + ecode3 = SWIG_AsVal_bool(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Sizer_GetItem" "', expected argument " "3"" of type '" "bool""'"); + } + arg3 = static_cast< bool >(val3); + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - result = (wxSizerItem *)wxSizer_GetItem(arg1,arg2); + result = (wxSizerItem *)wxSizer_GetItem(arg1,arg2,arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) SWIG_fail; } @@ -57513,7 +58640,6 @@ static PyMethodDef SwigMethods[] = { { (char *)"AcceleratorTable_IsOk", (PyCFunction)_wrap_AcceleratorTable_IsOk, METH_O, NULL}, { (char *)"AcceleratorTable_swigregister", AcceleratorTable_swigregister, METH_VARARGS, NULL}, { (char *)"AcceleratorTable_swiginit", AcceleratorTable_swiginit, METH_VARARGS, NULL}, - { (char *)"GetAccelFromString", (PyCFunction) _wrap_GetAccelFromString, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"new_VisualAttributes", (PyCFunction)_wrap_new_VisualAttributes, METH_NOARGS, NULL}, { (char *)"delete_VisualAttributes", (PyCFunction)_wrap_delete_VisualAttributes, METH_O, NULL}, { (char *)"VisualAttributes_font_set", _wrap_VisualAttributes_font_set, METH_VARARGS, NULL}, @@ -57602,6 +58728,7 @@ static PyMethodDef SwigMethods[] = { { (char *)"Window_Disable", (PyCFunction)_wrap_Window_Disable, METH_O, NULL}, { (char *)"Window_IsShown", (PyCFunction)_wrap_Window_IsShown, METH_O, NULL}, { (char *)"Window_IsEnabled", (PyCFunction)_wrap_Window_IsEnabled, METH_O, NULL}, + { (char *)"Window_IsThisEnabled", (PyCFunction)_wrap_Window_IsThisEnabled, METH_O, NULL}, { (char *)"Window_IsShownOnScreen", (PyCFunction)_wrap_Window_IsShownOnScreen, METH_O, NULL}, { (char *)"Window_SetWindowStyleFlag", (PyCFunction) _wrap_Window_SetWindowStyleFlag, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"Window_GetWindowStyleFlag", (PyCFunction)_wrap_Window_GetWindowStyleFlag, METH_O, NULL}, @@ -57617,13 +58744,17 @@ static PyMethodDef SwigMethods[] = { { (char *)"Window_SetFocusFromKbd", (PyCFunction)_wrap_Window_SetFocusFromKbd, METH_O, NULL}, { (char *)"Window_FindFocus", (PyCFunction)_wrap_Window_FindFocus, METH_NOARGS, NULL}, { (char *)"Window_AcceptsFocus", (PyCFunction)_wrap_Window_AcceptsFocus, METH_O, NULL}, + { (char *)"Window_CanAcceptFocus", (PyCFunction)_wrap_Window_CanAcceptFocus, METH_O, NULL}, { (char *)"Window_AcceptsFocusFromKeyboard", (PyCFunction)_wrap_Window_AcceptsFocusFromKeyboard, METH_O, NULL}, + { (char *)"Window_CanAcceptFocusFromKeyboard", (PyCFunction)_wrap_Window_CanAcceptFocusFromKeyboard, METH_O, NULL}, + { (char *)"Window_NavigateIn", (PyCFunction) _wrap_Window_NavigateIn, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"Window_Navigate", (PyCFunction) _wrap_Window_Navigate, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"Window_MoveAfterInTabOrder", (PyCFunction) _wrap_Window_MoveAfterInTabOrder, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"Window_MoveBeforeInTabOrder", (PyCFunction) _wrap_Window_MoveBeforeInTabOrder, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"Window_GetChildren", (PyCFunction)_wrap_Window_GetChildren, METH_O, NULL}, { (char *)"Window_GetParent", (PyCFunction)_wrap_Window_GetParent, METH_O, NULL}, { (char *)"Window_GetGrandParent", (PyCFunction)_wrap_Window_GetGrandParent, METH_O, NULL}, + { (char *)"Window_GetTopLevelParent", (PyCFunction)_wrap_Window_GetTopLevelParent, METH_O, NULL}, { (char *)"Window_IsTopLevel", (PyCFunction)_wrap_Window_IsTopLevel, METH_O, NULL}, { (char *)"Window_Reparent", (PyCFunction) _wrap_Window_Reparent, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"Window_AddChild", (PyCFunction) _wrap_Window_AddChild, METH_VARARGS | METH_KEYWORDS, NULL}, @@ -57932,6 +59063,30 @@ static PyMethodDef SwigMethods[] = { { (char *)"ItemContainer_Select", (PyCFunction) _wrap_ItemContainer_Select, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"ItemContainer_swigregister", ItemContainer_swigregister, METH_VARARGS, NULL}, { (char *)"ControlWithItems_swigregister", ControlWithItems_swigregister, METH_VARARGS, NULL}, + { (char *)"new_SizerFlags", (PyCFunction) _wrap_new_SizerFlags, METH_VARARGS | METH_KEYWORDS, NULL}, + { (char *)"delete_SizerFlags", (PyCFunction)_wrap_delete_SizerFlags, METH_O, NULL}, + { (char *)"SizerFlags_Proportion", (PyCFunction) _wrap_SizerFlags_Proportion, METH_VARARGS | METH_KEYWORDS, NULL}, + { (char *)"SizerFlags_Align", (PyCFunction) _wrap_SizerFlags_Align, METH_VARARGS | METH_KEYWORDS, NULL}, + { (char *)"SizerFlags_Expand", (PyCFunction)_wrap_SizerFlags_Expand, METH_O, NULL}, + { (char *)"SizerFlags_Centre", (PyCFunction)_wrap_SizerFlags_Centre, METH_O, NULL}, + { (char *)"SizerFlags_Center", (PyCFunction)_wrap_SizerFlags_Center, METH_O, NULL}, + { (char *)"SizerFlags_Left", (PyCFunction)_wrap_SizerFlags_Left, METH_O, NULL}, + { (char *)"SizerFlags_Right", (PyCFunction)_wrap_SizerFlags_Right, METH_O, NULL}, + { (char *)"SizerFlags_Top", (PyCFunction)_wrap_SizerFlags_Top, METH_O, NULL}, + { (char *)"SizerFlags_Bottom", (PyCFunction)_wrap_SizerFlags_Bottom, METH_O, NULL}, + { (char *)"SizerFlags_Shaped", (PyCFunction)_wrap_SizerFlags_Shaped, METH_O, NULL}, + { (char *)"SizerFlags_FixedMinSize", (PyCFunction)_wrap_SizerFlags_FixedMinSize, METH_O, NULL}, + { (char *)"SizerFlags_Border", (PyCFunction) _wrap_SizerFlags_Border, METH_VARARGS | METH_KEYWORDS, NULL}, + { (char *)"SizerFlags_DoubleBorder", (PyCFunction) _wrap_SizerFlags_DoubleBorder, METH_VARARGS | METH_KEYWORDS, NULL}, + { (char *)"SizerFlags_TripleBorder", (PyCFunction) _wrap_SizerFlags_TripleBorder, METH_VARARGS | METH_KEYWORDS, NULL}, + { (char *)"SizerFlags_HorzBorder", (PyCFunction)_wrap_SizerFlags_HorzBorder, METH_O, NULL}, + { (char *)"SizerFlags_DoubleHorzBorder", (PyCFunction)_wrap_SizerFlags_DoubleHorzBorder, METH_O, NULL}, + { (char *)"SizerFlags_GetDefaultBorder", (PyCFunction)_wrap_SizerFlags_GetDefaultBorder, METH_NOARGS, NULL}, + { (char *)"SizerFlags_GetProportion", (PyCFunction)_wrap_SizerFlags_GetProportion, METH_O, NULL}, + { (char *)"SizerFlags_GetFlags", (PyCFunction)_wrap_SizerFlags_GetFlags, METH_O, NULL}, + { (char *)"SizerFlags_GetBorderInPixels", (PyCFunction)_wrap_SizerFlags_GetBorderInPixels, METH_O, NULL}, + { (char *)"SizerFlags_swigregister", SizerFlags_swigregister, METH_VARARGS, NULL}, + { (char *)"SizerFlags_swiginit", SizerFlags_swiginit, METH_VARARGS, NULL}, { (char *)"new_SizerItem", (PyCFunction)_wrap_new_SizerItem, METH_NOARGS, NULL}, { (char *)"delete_SizerItem", (PyCFunction)_wrap_delete_SizerItem, METH_O, NULL}, { (char *)"new_SizerItemWindow", (PyCFunction) _wrap_new_SizerItemWindow, METH_VARARGS | METH_KEYWORDS, NULL}, @@ -57975,8 +59130,11 @@ static PyMethodDef SwigMethods[] = { { (char *)"delete_Sizer", (PyCFunction)_wrap_delete_Sizer, METH_O, NULL}, { (char *)"Sizer__setOORInfo", (PyCFunction) _wrap_Sizer__setOORInfo, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"Sizer_Add", (PyCFunction) _wrap_Sizer_Add, METH_VARARGS | METH_KEYWORDS, NULL}, + { (char *)"Sizer_AddF", (PyCFunction) _wrap_Sizer_AddF, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"Sizer_Insert", (PyCFunction) _wrap_Sizer_Insert, METH_VARARGS | METH_KEYWORDS, NULL}, + { (char *)"Sizer_InsertF", (PyCFunction) _wrap_Sizer_InsertF, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"Sizer_Prepend", (PyCFunction) _wrap_Sizer_Prepend, METH_VARARGS | METH_KEYWORDS, NULL}, + { (char *)"Sizer_PrependF", (PyCFunction) _wrap_Sizer_PrependF, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"Sizer_Remove", (PyCFunction) _wrap_Sizer_Remove, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"Sizer_Detach", (PyCFunction) _wrap_Sizer_Detach, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"Sizer_GetItem", (PyCFunction) _wrap_Sizer_GetItem, METH_VARARGS | METH_KEYWORDS, NULL}, @@ -58819,6 +59977,7 @@ static swig_type_info _swigt__p_wxShowEvent = {"_p_wxShowEvent", "wxShowEvent *" static swig_type_info _swigt__p_wxSize = {"_p_wxSize", "wxSize *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_wxSizeEvent = {"_p_wxSizeEvent", "wxSizeEvent *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_wxSizer = {"_p_wxSizer", "wxSizer *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_wxSizerFlags = {"_p_wxSizerFlags", "wxSizerFlags *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_wxSizerItem = {"_p_wxSizerItem", "wxSizerItem *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_wxStaticBox = {"_p_wxStaticBox", "wxStaticBox *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_wxStaticBoxSizer = {"_p_wxStaticBoxSizer", "wxStaticBoxSizer *", 0, 0, (void*)0, 0}; @@ -58957,6 +60116,7 @@ static swig_type_info *swig_type_initial[] = { &_swigt__p_wxSize, &_swigt__p_wxSizeEvent, &_swigt__p_wxSizer, + &_swigt__p_wxSizerFlags, &_swigt__p_wxSizerItem, &_swigt__p_wxStaticBox, &_swigt__p_wxStaticBoxSizer, @@ -59095,6 +60255,7 @@ static swig_cast_info _swigc__p_wxShowEvent[] = { {&_swigt__p_wxShowEvent, 0, 0 static swig_cast_info _swigc__p_wxSize[] = { {&_swigt__p_wxSize, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_wxSizeEvent[] = { {&_swigt__p_wxSizeEvent, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_wxSizer[] = { {&_swigt__p_wxSizer, 0, 0, 0}, {&_swigt__p_wxBoxSizer, _p_wxBoxSizerTo_p_wxSizer, 0, 0}, {&_swigt__p_wxStaticBoxSizer, _p_wxStaticBoxSizerTo_p_wxSizer, 0, 0}, {&_swigt__p_wxStdDialogButtonSizer, _p_wxStdDialogButtonSizerTo_p_wxSizer, 0, 0}, {&_swigt__p_wxGridBagSizer, _p_wxGridBagSizerTo_p_wxSizer, 0, 0}, {&_swigt__p_wxGridSizer, _p_wxGridSizerTo_p_wxSizer, 0, 0}, {&_swigt__p_wxFlexGridSizer, _p_wxFlexGridSizerTo_p_wxSizer, 0, 0}, {&_swigt__p_wxPySizer, _p_wxPySizerTo_p_wxSizer, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_wxSizerFlags[] = { {&_swigt__p_wxSizerFlags, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_wxSizerItem[] = { {&_swigt__p_wxSizerItem, 0, 0, 0}, {&_swigt__p_wxGBSizerItem, _p_wxGBSizerItemTo_p_wxSizerItem, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_wxStaticBox[] = { {&_swigt__p_wxStaticBox, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_wxStaticBoxSizer[] = { {&_swigt__p_wxStaticBoxSizer, 0, 0, 0},{0, 0, 0, 0}}; @@ -59233,6 +60394,7 @@ static swig_cast_info *swig_cast_initial[] = { _swigc__p_wxSize, _swigc__p_wxSizeEvent, _swigc__p_wxSizer, + _swigc__p_wxSizerFlags, _swigc__p_wxSizerItem, _swigc__p_wxStaticBox, _swigc__p_wxStaticBoxSizer, @@ -59797,8 +60959,6 @@ SWIGEXPORT void SWIG_init(void) { SWIG_Python_SetConstant(d, "LB_EXTENDED",SWIG_From_int(static_cast< int >(wxLB_EXTENDED))); SWIG_Python_SetConstant(d, "LB_OWNERDRAW",SWIG_From_int(static_cast< int >(wxLB_OWNERDRAW))); SWIG_Python_SetConstant(d, "LB_HSCROLL",SWIG_From_int(static_cast< int >(wxLB_HSCROLL))); - SWIG_Python_SetConstant(d, "PROCESS_ENTER",SWIG_From_int(static_cast< int >(wxPROCESS_ENTER))); - SWIG_Python_SetConstant(d, "PASSWORD",SWIG_From_int(static_cast< int >(wxPASSWORD))); SWIG_Python_SetConstant(d, "CB_SIMPLE",SWIG_From_int(static_cast< int >(wxCB_SIMPLE))); SWIG_Python_SetConstant(d, "CB_DROPDOWN",SWIG_From_int(static_cast< int >(wxCB_DROPDOWN))); SWIG_Python_SetConstant(d, "CB_SORT",SWIG_From_int(static_cast< int >(wxCB_SORT))); @@ -60015,7 +61175,6 @@ SWIGEXPORT void SWIG_init(void) { SWIG_Python_SetConstant(d, "SHAPED",SWIG_From_int(static_cast< int >(wxSHAPED))); SWIG_Python_SetConstant(d, "FIXED_MINSIZE",SWIG_From_int(static_cast< int >(wxFIXED_MINSIZE))); SWIG_Python_SetConstant(d, "TILE",SWIG_From_int(static_cast< int >(wxTILE))); - SWIG_Python_SetConstant(d, "ADJUST_MINSIZE",SWIG_From_int(static_cast< int >(wxADJUST_MINSIZE))); SWIG_Python_SetConstant(d, "BORDER_DEFAULT",SWIG_From_int(static_cast< int >(wxBORDER_DEFAULT))); SWIG_Python_SetConstant(d, "BORDER_NONE",SWIG_From_int(static_cast< int >(wxBORDER_NONE))); SWIG_Python_SetConstant(d, "BORDER_STATIC",SWIG_From_int(static_cast< int >(wxBORDER_STATIC))); @@ -60097,8 +61256,6 @@ SWIGEXPORT void SWIG_init(void) { SWIG_Python_SetConstant(d, "WXK_MENU",SWIG_From_int(static_cast< int >(WXK_MENU))); SWIG_Python_SetConstant(d, "WXK_PAUSE",SWIG_From_int(static_cast< int >(WXK_PAUSE))); SWIG_Python_SetConstant(d, "WXK_CAPITAL",SWIG_From_int(static_cast< int >(WXK_CAPITAL))); - SWIG_Python_SetConstant(d, "WXK_PRIOR",SWIG_From_int(static_cast< int >(WXK_PRIOR))); - SWIG_Python_SetConstant(d, "WXK_NEXT",SWIG_From_int(static_cast< int >(WXK_NEXT))); SWIG_Python_SetConstant(d, "WXK_END",SWIG_From_int(static_cast< int >(WXK_END))); SWIG_Python_SetConstant(d, "WXK_HOME",SWIG_From_int(static_cast< int >(WXK_HOME))); SWIG_Python_SetConstant(d, "WXK_LEFT",SWIG_From_int(static_cast< int >(WXK_LEFT))); @@ -60167,9 +61324,7 @@ SWIGEXPORT void SWIG_init(void) { SWIG_Python_SetConstant(d, "WXK_NUMPAD_UP",SWIG_From_int(static_cast< int >(WXK_NUMPAD_UP))); SWIG_Python_SetConstant(d, "WXK_NUMPAD_RIGHT",SWIG_From_int(static_cast< int >(WXK_NUMPAD_RIGHT))); SWIG_Python_SetConstant(d, "WXK_NUMPAD_DOWN",SWIG_From_int(static_cast< int >(WXK_NUMPAD_DOWN))); - SWIG_Python_SetConstant(d, "WXK_NUMPAD_PRIOR",SWIG_From_int(static_cast< int >(WXK_NUMPAD_PRIOR))); SWIG_Python_SetConstant(d, "WXK_NUMPAD_PAGEUP",SWIG_From_int(static_cast< int >(WXK_NUMPAD_PAGEUP))); - SWIG_Python_SetConstant(d, "WXK_NUMPAD_NEXT",SWIG_From_int(static_cast< int >(WXK_NUMPAD_NEXT))); SWIG_Python_SetConstant(d, "WXK_NUMPAD_PAGEDOWN",SWIG_From_int(static_cast< int >(WXK_NUMPAD_PAGEDOWN))); SWIG_Python_SetConstant(d, "WXK_NUMPAD_END",SWIG_From_int(static_cast< int >(WXK_NUMPAD_END))); SWIG_Python_SetConstant(d, "WXK_NUMPAD_BEGIN",SWIG_From_int(static_cast< int >(WXK_NUMPAD_BEGIN))); diff --git a/wxPython/src/msw/_gdi.py b/wxPython/src/msw/_gdi.py index 9d7fc06e6a..eeed44bce8 100644 --- a/wxPython/src/msw/_gdi.py +++ b/wxPython/src/msw/_gdi.py @@ -698,7 +698,7 @@ class Bitmap(GDIObject): CopyFromBuffer(self, buffer data) Copy data from a RGB buffer object to replace the bitmap pixel data. - See `wxBitmapFromBuffer` for more . + See `wx.BitmapFromBuffer` for more . """ return _gdi_.Bitmap_CopyFromBuffer(*args, **kwargs) @@ -707,7 +707,7 @@ class Bitmap(GDIObject): CopyFromBufferRGBA(self, buffer data) Copy data from a RGBA buffer object to replace the bitmap pixel data. - See `wxBitmapFromBufferRGBA` for more . + See `wx.BitmapFromBufferRGBA` for more . """ return _gdi_.Bitmap_CopyFromBufferRGBA(*args, **kwargs) @@ -2723,9 +2723,8 @@ class Locale(object): __del__ = lambda self : None; def Init1(*args, **kwargs): """ - Init1(self, String szName, String szShort=EmptyString, String szLocale=EmptyString, - bool bLoadDefault=True, - bool bConvertEncoding=False) -> bool + Init1(self, String name, String shortName=EmptyString, String locale=EmptyString, + bool bLoadDefault=True, bool bConvertEncoding=False) -> bool """ return _gdi_.Locale_Init1(*args, **kwargs) @@ -2782,7 +2781,7 @@ class Locale(object): AddCatalogLookupPathPrefix = staticmethod(AddCatalogLookupPathPrefix) def AddCatalog(*args, **kwargs): - """AddCatalog(self, String szDomain) -> bool""" + """AddCatalog(self, String domain) -> bool""" return _gdi_.Locale_AddCatalog(*args, **kwargs) def IsAvailable(*args, **kwargs): @@ -2791,7 +2790,7 @@ class Locale(object): IsAvailable = staticmethod(IsAvailable) def IsLoaded(*args, **kwargs): - """IsLoaded(self, String szDomain) -> bool""" + """IsLoaded(self, String domain) -> bool""" return _gdi_.Locale_IsLoaded(*args, **kwargs) def GetLanguageInfo(*args, **kwargs): @@ -2815,7 +2814,7 @@ class Locale(object): AddLanguage = staticmethod(AddLanguage) def GetString(*args, **kwargs): - """GetString(self, String szOrigString, String szDomain=EmptyString) -> String""" + """GetString(self, String origString, String domain=EmptyString) -> String""" return _gdi_.Locale_GetString(*args, **kwargs) def GetName(*args, **kwargs): @@ -2882,14 +2881,11 @@ class PyLocale(Locale): return _gdi_.PyLocale__setCallbackInfo(*args, **kwargs) def GetSingularString(*args, **kwargs): - """GetSingularString(self, wxChar szOrigString, wxChar szDomain=None) -> wxChar""" + """GetSingularString(self, String origString, String domain=EmptyString) -> String""" return _gdi_.PyLocale_GetSingularString(*args, **kwargs) def GetPluralString(*args, **kwargs): - """ - GetPluralString(self, wxChar szOrigString, wxChar szOrigString2, size_t n, - wxChar szDomain=None) -> wxChar - """ + """GetPluralString(self, String origString, String origString2, size_t n, String domain=EmptyString) -> String""" return _gdi_.PyLocale_GetPluralString(*args, **kwargs) _gdi_.PyLocale_swigregister(PyLocale) @@ -3474,6 +3470,35 @@ class DC(_core.Object): """ return _gdi_.DC_BlitPointSize(*args, **kwargs) + def StretchBlit(*args, **kwargs): + """ + StretchBlit(self, int dstX, int dstY, int dstWidth, int dstHeight, DC source, + int srcX, int srcY, int srcWidth, int srcHeight, + int rop=COPY, bool useMask=False, + int srcMaskX=wxDefaultCoord, int srcMaskY=wxDefaultCoord) -> bool + + Copy from a source DC to this DC, specifying the destination + coordinates, destination size, source DC, source coordinates, size of + source area to copy, logical function, whether to use a bitmap mask, + and mask source position. + """ + return _gdi_.DC_StretchBlit(*args, **kwargs) + + def StretchBlitPointSize(*args, **kwargs): + """ + StretchBlitPointSize(self, Point dstPt, Size dstSize, DC source, Point srcPt, + Size srcSize, int rop=COPY, bool useMask=False, + Point srcMaskPt=DefaultPosition) -> bool + + Copy from a source DC to this DC, specifying the destination + coordinates, destination size, source DC, source coordinates, size of + source area to copy, logical function, whether to use a bitmap mask, + and mask source position. This version is the same as `StretchBlit` + except `wx.Point` and `wx.Size` objects are used instead of individual + position and size components. + """ + return _gdi_.DC_StretchBlitPointSize(*args, **kwargs) + def GetAsBitmap(*args, **kwargs): """GetAsBitmap(self, Rect subrect=None) -> Bitmap""" return _gdi_.DC_GetAsBitmap(*args, **kwargs) @@ -4786,6 +4811,7 @@ def MemoryDCFromDC(*args, **kwargs): BUFFER_VIRTUAL_AREA = _gdi_.BUFFER_VIRTUAL_AREA BUFFER_CLIENT_AREA = _gdi_.BUFFER_CLIENT_AREA +BUFFER_USES_SHARED_BUFFER = _gdi_.BUFFER_USES_SHARED_BUFFER class BufferedDC(MemoryDC): """ This simple class provides a simple way to avoid flicker: when drawing @@ -5516,7 +5542,8 @@ class GraphicsContext(GraphicsObject): Creates a wx.GraphicsContext from a native context. This native context must be eg a CGContextRef for Core Graphics, a Graphics - pointer for GDIPlus or a cairo_t pointer for Cairo. + pointer for GDIPlus or a cairo_t pointer for Cairo. NOTE: For + wxPython we still need a way to make this value usable. """ return _gdi_.GraphicsContext_CreateFromNative(*args, **kwargs) @@ -5525,7 +5552,8 @@ class GraphicsContext(GraphicsObject): """ CreateFromNativeWindow(void window) -> GraphicsContext - Creates a wx.GraphicsContext from a native window. + Creates a wx.GraphicsContext from a native window. NOTE: For wxPython + we still need a way to make this value usable. """ return _gdi_.GraphicsContext_CreateFromNativeWindow(*args, **kwargs) @@ -5844,7 +5872,7 @@ class GraphicsContext(GraphicsObject): def StrokeLineSegements(*args, **kwargs): """ - StrokeLineSegements(self, PyObject beginPoints, PyObject endPoints) + StrokeLineSegments(self, List beginPoints, List endPoints) Stroke disconnected lines from begin to end points """ @@ -5925,7 +5953,8 @@ def GraphicsContext_CreateFromNative(*args, **kwargs): Creates a wx.GraphicsContext from a native context. This native context must be eg a CGContextRef for Core Graphics, a Graphics - pointer for GDIPlus or a cairo_t pointer for Cairo. + pointer for GDIPlus or a cairo_t pointer for Cairo. NOTE: For + wxPython we still need a way to make this value usable. """ return _gdi_.GraphicsContext_CreateFromNative(*args, **kwargs) @@ -5933,7 +5962,8 @@ def GraphicsContext_CreateFromNativeWindow(*args, **kwargs): """ GraphicsContext_CreateFromNativeWindow(void window) -> GraphicsContext - Creates a wx.GraphicsContext from a native window. + Creates a wx.GraphicsContext from a native window. NOTE: For wxPython + we still need a way to make this value usable. """ return _gdi_.GraphicsContext_CreateFromNativeWindow(*args, **kwargs) @@ -6363,17 +6393,6 @@ class PenList(GDIObjListBase): """FindOrCreatePen(self, Colour colour, int width, int style) -> Pen""" return _gdi_.PenList_FindOrCreatePen(*args, **kwargs) - def AddPen(*args, **kwargs): - """AddPen(self, Pen pen)""" - return _gdi_.PenList_AddPen(*args, **kwargs) - - def RemovePen(*args, **kwargs): - """RemovePen(self, Pen pen)""" - return _gdi_.PenList_RemovePen(*args, **kwargs) - - AddPen = wx._deprecated(AddPen) - RemovePen = wx._deprecated(RemovePen) - _gdi_.PenList_swigregister(PenList) class BrushList(GDIObjListBase): @@ -6385,17 +6404,6 @@ class BrushList(GDIObjListBase): """FindOrCreateBrush(self, Colour colour, int style=SOLID) -> Brush""" return _gdi_.BrushList_FindOrCreateBrush(*args, **kwargs) - def AddBrush(*args, **kwargs): - """AddBrush(self, Brush brush)""" - return _gdi_.BrushList_AddBrush(*args, **kwargs) - - def RemoveBrush(*args, **kwargs): - """RemoveBrush(self, Brush brush)""" - return _gdi_.BrushList_RemoveBrush(*args, **kwargs) - - AddBrush = wx._deprecated(AddBrush) - RemoveBrush = wx._deprecated(RemoveBrush) - _gdi_.BrushList_swigregister(BrushList) class FontList(GDIObjListBase): @@ -6411,17 +6419,6 @@ class FontList(GDIObjListBase): """ return _gdi_.FontList_FindOrCreateFont(*args, **kwargs) - def AddFont(*args, **kwargs): - """AddFont(self, Font font)""" - return _gdi_.FontList_AddFont(*args, **kwargs) - - def RemoveFont(*args, **kwargs): - """RemoveFont(self, Font font)""" - return _gdi_.FontList_RemoveFont(*args, **kwargs) - - AddFont = wx._deprecated(AddFont) - RemoveFont = wx._deprecated(RemoveFont) - _gdi_.FontList_swigregister(FontList) class ColourDatabase(object): diff --git a/wxPython/src/msw/_gdi_wrap.cpp b/wxPython/src/msw/_gdi_wrap.cpp index 7f7dde9b3b..6de3de8aad 100644 --- a/wxPython/src/msw/_gdi_wrap.cpp +++ b/wxPython/src/msw/_gdi_wrap.cpp @@ -2486,155 +2486,154 @@ SWIG_Python_MustGetPtr(PyObject *obj, swig_type_info *ty, int argnum, int flags) #define SWIGTYPE_p_wxBufferedDC swig_types[20] #define SWIGTYPE_p_wxBufferedPaintDC swig_types[21] #define SWIGTYPE_p_wxCURHandler swig_types[22] -#define SWIGTYPE_p_wxChar swig_types[23] -#define SWIGTYPE_p_wxChildFocusEvent swig_types[24] -#define SWIGTYPE_p_wxClientDC swig_types[25] -#define SWIGTYPE_p_wxClipboardTextEvent swig_types[26] -#define SWIGTYPE_p_wxCloseEvent swig_types[27] -#define SWIGTYPE_p_wxColour swig_types[28] -#define SWIGTYPE_p_wxColourDatabase swig_types[29] -#define SWIGTYPE_p_wxCommandEvent swig_types[30] -#define SWIGTYPE_p_wxContextMenuEvent swig_types[31] -#define SWIGTYPE_p_wxControl swig_types[32] -#define SWIGTYPE_p_wxControlWithItems swig_types[33] -#define SWIGTYPE_p_wxCursor swig_types[34] -#define SWIGTYPE_p_wxDC swig_types[35] -#define SWIGTYPE_p_wxDCBrushChanger swig_types[36] -#define SWIGTYPE_p_wxDCClipper swig_types[37] -#define SWIGTYPE_p_wxDCOverlay swig_types[38] -#define SWIGTYPE_p_wxDCPenChanger swig_types[39] -#define SWIGTYPE_p_wxDCTextColourChanger swig_types[40] -#define SWIGTYPE_p_wxDash swig_types[41] -#define SWIGTYPE_p_wxDateEvent swig_types[42] -#define SWIGTYPE_p_wxDisplayChangedEvent swig_types[43] -#define SWIGTYPE_p_wxDropFilesEvent swig_types[44] -#define SWIGTYPE_p_wxDuplexMode swig_types[45] -#define SWIGTYPE_p_wxEffects swig_types[46] -#define SWIGTYPE_p_wxEncodingConverter swig_types[47] -#define SWIGTYPE_p_wxEraseEvent swig_types[48] -#define SWIGTYPE_p_wxEvent swig_types[49] -#define SWIGTYPE_p_wxEventBlocker swig_types[50] -#define SWIGTYPE_p_wxEvtHandler swig_types[51] -#define SWIGTYPE_p_wxFSFile swig_types[52] -#define SWIGTYPE_p_wxFileSystem swig_types[53] -#define SWIGTYPE_p_wxFlexGridSizer swig_types[54] -#define SWIGTYPE_p_wxFocusEvent swig_types[55] -#define SWIGTYPE_p_wxFont swig_types[56] -#define SWIGTYPE_p_wxFontList swig_types[57] -#define SWIGTYPE_p_wxFontMapper swig_types[58] -#define SWIGTYPE_p_wxGBSizerItem swig_types[59] -#define SWIGTYPE_p_wxGCDC swig_types[60] -#define SWIGTYPE_p_wxGDIObjListBase swig_types[61] -#define SWIGTYPE_p_wxGDIObject swig_types[62] -#define SWIGTYPE_p_wxGIFHandler swig_types[63] -#define SWIGTYPE_p_wxGraphicsBrush swig_types[64] -#define SWIGTYPE_p_wxGraphicsContext swig_types[65] -#define SWIGTYPE_p_wxGraphicsFont swig_types[66] -#define SWIGTYPE_p_wxGraphicsMatrix swig_types[67] -#define SWIGTYPE_p_wxGraphicsObject swig_types[68] -#define SWIGTYPE_p_wxGraphicsPath swig_types[69] -#define SWIGTYPE_p_wxGraphicsPen swig_types[70] -#define SWIGTYPE_p_wxGraphicsRenderer swig_types[71] -#define SWIGTYPE_p_wxGridBagSizer swig_types[72] -#define SWIGTYPE_p_wxGridSizer swig_types[73] -#define SWIGTYPE_p_wxHeaderButtonParams swig_types[74] -#define SWIGTYPE_p_wxICOHandler swig_types[75] -#define SWIGTYPE_p_wxIcon swig_types[76] -#define SWIGTYPE_p_wxIconBundle swig_types[77] -#define SWIGTYPE_p_wxIconLocation swig_types[78] -#define SWIGTYPE_p_wxIconizeEvent swig_types[79] -#define SWIGTYPE_p_wxIdleEvent swig_types[80] -#define SWIGTYPE_p_wxImage swig_types[81] -#define SWIGTYPE_p_wxImageHandler swig_types[82] -#define SWIGTYPE_p_wxImageList swig_types[83] -#define SWIGTYPE_p_wxIndividualLayoutConstraint swig_types[84] -#define SWIGTYPE_p_wxInitDialogEvent swig_types[85] -#define SWIGTYPE_p_wxJPEGHandler swig_types[86] -#define SWIGTYPE_p_wxKeyEvent swig_types[87] -#define SWIGTYPE_p_wxLanguageInfo swig_types[88] -#define SWIGTYPE_p_wxLayoutConstraints swig_types[89] -#define SWIGTYPE_p_wxLocale swig_types[90] -#define SWIGTYPE_p_wxMask swig_types[91] -#define SWIGTYPE_p_wxMaximizeEvent swig_types[92] -#define SWIGTYPE_p_wxMemoryDC swig_types[93] -#define SWIGTYPE_p_wxMenu swig_types[94] -#define SWIGTYPE_p_wxMenuBar swig_types[95] -#define SWIGTYPE_p_wxMenuEvent swig_types[96] -#define SWIGTYPE_p_wxMenuItem swig_types[97] -#define SWIGTYPE_p_wxMetaFile swig_types[98] -#define SWIGTYPE_p_wxMetaFileDC swig_types[99] -#define SWIGTYPE_p_wxMirrorDC swig_types[100] -#define SWIGTYPE_p_wxMouseCaptureChangedEvent swig_types[101] -#define SWIGTYPE_p_wxMouseCaptureLostEvent swig_types[102] -#define SWIGTYPE_p_wxMouseEvent swig_types[103] -#define SWIGTYPE_p_wxMoveEvent swig_types[104] -#define SWIGTYPE_p_wxNativeEncodingInfo swig_types[105] -#define SWIGTYPE_p_wxNativeFontInfo swig_types[106] -#define SWIGTYPE_p_wxNativePixelData swig_types[107] -#define SWIGTYPE_p_wxNativePixelData_Accessor swig_types[108] -#define SWIGTYPE_p_wxNavigationKeyEvent swig_types[109] -#define SWIGTYPE_p_wxNcPaintEvent swig_types[110] -#define SWIGTYPE_p_wxNotifyEvent swig_types[111] -#define SWIGTYPE_p_wxObject swig_types[112] -#define SWIGTYPE_p_wxOverlay swig_types[113] -#define SWIGTYPE_p_wxPCXHandler swig_types[114] -#define SWIGTYPE_p_wxPNGHandler swig_types[115] -#define SWIGTYPE_p_wxPNMHandler swig_types[116] -#define SWIGTYPE_p_wxPaintDC swig_types[117] -#define SWIGTYPE_p_wxPaintEvent swig_types[118] -#define SWIGTYPE_p_wxPalette swig_types[119] -#define SWIGTYPE_p_wxPaletteChangedEvent swig_types[120] -#define SWIGTYPE_p_wxPaperSize swig_types[121] -#define SWIGTYPE_p_wxPen swig_types[122] -#define SWIGTYPE_p_wxPenList swig_types[123] -#define SWIGTYPE_p_wxPixelDataBase swig_types[124] -#define SWIGTYPE_p_wxPoint swig_types[125] -#define SWIGTYPE_p_wxPoint2D swig_types[126] -#define SWIGTYPE_p_wxPostScriptDC swig_types[127] -#define SWIGTYPE_p_wxPrintData swig_types[128] -#define SWIGTYPE_p_wxPrinterDC swig_types[129] -#define SWIGTYPE_p_wxPseudoDC swig_types[130] -#define SWIGTYPE_p_wxPyApp swig_types[131] -#define SWIGTYPE_p_wxPyCommandEvent swig_types[132] -#define SWIGTYPE_p_wxPyEvent swig_types[133] -#define SWIGTYPE_p_wxPyFontEnumerator swig_types[134] -#define SWIGTYPE_p_wxPyImageHandler swig_types[135] -#define SWIGTYPE_p_wxPyLocale swig_types[136] -#define SWIGTYPE_p_wxPySizer swig_types[137] -#define SWIGTYPE_p_wxPyValidator swig_types[138] -#define SWIGTYPE_p_wxQueryNewPaletteEvent swig_types[139] -#define SWIGTYPE_p_wxRect swig_types[140] -#define SWIGTYPE_p_wxRect2D swig_types[141] -#define SWIGTYPE_p_wxRegion swig_types[142] -#define SWIGTYPE_p_wxRegionIterator swig_types[143] -#define SWIGTYPE_p_wxRendererNative swig_types[144] -#define SWIGTYPE_p_wxRendererVersion swig_types[145] -#define SWIGTYPE_p_wxScreenDC swig_types[146] -#define SWIGTYPE_p_wxScrollEvent swig_types[147] -#define SWIGTYPE_p_wxScrollWinEvent swig_types[148] -#define SWIGTYPE_p_wxSetCursorEvent swig_types[149] -#define SWIGTYPE_p_wxShowEvent swig_types[150] -#define SWIGTYPE_p_wxSize swig_types[151] -#define SWIGTYPE_p_wxSizeEvent swig_types[152] -#define SWIGTYPE_p_wxSizer swig_types[153] -#define SWIGTYPE_p_wxSizerItem swig_types[154] -#define SWIGTYPE_p_wxSplitterRenderParams swig_types[155] -#define SWIGTYPE_p_wxStaticBoxSizer swig_types[156] -#define SWIGTYPE_p_wxStdDialogButtonSizer swig_types[157] -#define SWIGTYPE_p_wxStockGDI swig_types[158] -#define SWIGTYPE_p_wxString swig_types[159] -#define SWIGTYPE_p_wxSysColourChangedEvent swig_types[160] -#define SWIGTYPE_p_wxTGAHandler swig_types[161] -#define SWIGTYPE_p_wxTIFFHandler swig_types[162] -#define SWIGTYPE_p_wxUpdateUIEvent swig_types[163] -#define SWIGTYPE_p_wxValidator swig_types[164] -#define SWIGTYPE_p_wxWindow swig_types[165] -#define SWIGTYPE_p_wxWindowCreateEvent swig_types[166] -#define SWIGTYPE_p_wxWindowDC swig_types[167] -#define SWIGTYPE_p_wxWindowDestroyEvent swig_types[168] -#define SWIGTYPE_p_wxXPMHandler swig_types[169] -static swig_type_info *swig_types[171]; -static swig_module_info swig_module = {swig_types, 170, 0, 0, 0, 0}; +#define SWIGTYPE_p_wxChildFocusEvent swig_types[23] +#define SWIGTYPE_p_wxClientDC swig_types[24] +#define SWIGTYPE_p_wxClipboardTextEvent swig_types[25] +#define SWIGTYPE_p_wxCloseEvent swig_types[26] +#define SWIGTYPE_p_wxColour swig_types[27] +#define SWIGTYPE_p_wxColourDatabase swig_types[28] +#define SWIGTYPE_p_wxCommandEvent swig_types[29] +#define SWIGTYPE_p_wxContextMenuEvent swig_types[30] +#define SWIGTYPE_p_wxControl swig_types[31] +#define SWIGTYPE_p_wxControlWithItems swig_types[32] +#define SWIGTYPE_p_wxCursor swig_types[33] +#define SWIGTYPE_p_wxDC swig_types[34] +#define SWIGTYPE_p_wxDCBrushChanger swig_types[35] +#define SWIGTYPE_p_wxDCClipper swig_types[36] +#define SWIGTYPE_p_wxDCOverlay swig_types[37] +#define SWIGTYPE_p_wxDCPenChanger swig_types[38] +#define SWIGTYPE_p_wxDCTextColourChanger swig_types[39] +#define SWIGTYPE_p_wxDash swig_types[40] +#define SWIGTYPE_p_wxDateEvent swig_types[41] +#define SWIGTYPE_p_wxDisplayChangedEvent swig_types[42] +#define SWIGTYPE_p_wxDropFilesEvent swig_types[43] +#define SWIGTYPE_p_wxDuplexMode swig_types[44] +#define SWIGTYPE_p_wxEffects swig_types[45] +#define SWIGTYPE_p_wxEncodingConverter swig_types[46] +#define SWIGTYPE_p_wxEraseEvent swig_types[47] +#define SWIGTYPE_p_wxEvent swig_types[48] +#define SWIGTYPE_p_wxEventBlocker swig_types[49] +#define SWIGTYPE_p_wxEvtHandler swig_types[50] +#define SWIGTYPE_p_wxFSFile swig_types[51] +#define SWIGTYPE_p_wxFileSystem swig_types[52] +#define SWIGTYPE_p_wxFlexGridSizer swig_types[53] +#define SWIGTYPE_p_wxFocusEvent swig_types[54] +#define SWIGTYPE_p_wxFont swig_types[55] +#define SWIGTYPE_p_wxFontList swig_types[56] +#define SWIGTYPE_p_wxFontMapper swig_types[57] +#define SWIGTYPE_p_wxGBSizerItem swig_types[58] +#define SWIGTYPE_p_wxGCDC swig_types[59] +#define SWIGTYPE_p_wxGDIObjListBase swig_types[60] +#define SWIGTYPE_p_wxGDIObject swig_types[61] +#define SWIGTYPE_p_wxGIFHandler swig_types[62] +#define SWIGTYPE_p_wxGraphicsBrush swig_types[63] +#define SWIGTYPE_p_wxGraphicsContext swig_types[64] +#define SWIGTYPE_p_wxGraphicsFont swig_types[65] +#define SWIGTYPE_p_wxGraphicsMatrix swig_types[66] +#define SWIGTYPE_p_wxGraphicsObject swig_types[67] +#define SWIGTYPE_p_wxGraphicsPath swig_types[68] +#define SWIGTYPE_p_wxGraphicsPen swig_types[69] +#define SWIGTYPE_p_wxGraphicsRenderer swig_types[70] +#define SWIGTYPE_p_wxGridBagSizer swig_types[71] +#define SWIGTYPE_p_wxGridSizer swig_types[72] +#define SWIGTYPE_p_wxHeaderButtonParams swig_types[73] +#define SWIGTYPE_p_wxICOHandler swig_types[74] +#define SWIGTYPE_p_wxIcon swig_types[75] +#define SWIGTYPE_p_wxIconBundle swig_types[76] +#define SWIGTYPE_p_wxIconLocation swig_types[77] +#define SWIGTYPE_p_wxIconizeEvent swig_types[78] +#define SWIGTYPE_p_wxIdleEvent swig_types[79] +#define SWIGTYPE_p_wxImage swig_types[80] +#define SWIGTYPE_p_wxImageHandler swig_types[81] +#define SWIGTYPE_p_wxImageList swig_types[82] +#define SWIGTYPE_p_wxIndividualLayoutConstraint swig_types[83] +#define SWIGTYPE_p_wxInitDialogEvent swig_types[84] +#define SWIGTYPE_p_wxJPEGHandler swig_types[85] +#define SWIGTYPE_p_wxKeyEvent swig_types[86] +#define SWIGTYPE_p_wxLanguageInfo swig_types[87] +#define SWIGTYPE_p_wxLayoutConstraints swig_types[88] +#define SWIGTYPE_p_wxLocale swig_types[89] +#define SWIGTYPE_p_wxMask swig_types[90] +#define SWIGTYPE_p_wxMaximizeEvent swig_types[91] +#define SWIGTYPE_p_wxMemoryDC swig_types[92] +#define SWIGTYPE_p_wxMenu swig_types[93] +#define SWIGTYPE_p_wxMenuBar swig_types[94] +#define SWIGTYPE_p_wxMenuEvent swig_types[95] +#define SWIGTYPE_p_wxMenuItem swig_types[96] +#define SWIGTYPE_p_wxMetaFile swig_types[97] +#define SWIGTYPE_p_wxMetaFileDC swig_types[98] +#define SWIGTYPE_p_wxMirrorDC swig_types[99] +#define SWIGTYPE_p_wxMouseCaptureChangedEvent swig_types[100] +#define SWIGTYPE_p_wxMouseCaptureLostEvent swig_types[101] +#define SWIGTYPE_p_wxMouseEvent swig_types[102] +#define SWIGTYPE_p_wxMoveEvent swig_types[103] +#define SWIGTYPE_p_wxNativeEncodingInfo swig_types[104] +#define SWIGTYPE_p_wxNativeFontInfo swig_types[105] +#define SWIGTYPE_p_wxNativePixelData swig_types[106] +#define SWIGTYPE_p_wxNativePixelData_Accessor swig_types[107] +#define SWIGTYPE_p_wxNavigationKeyEvent swig_types[108] +#define SWIGTYPE_p_wxNcPaintEvent swig_types[109] +#define SWIGTYPE_p_wxNotifyEvent swig_types[110] +#define SWIGTYPE_p_wxObject swig_types[111] +#define SWIGTYPE_p_wxOverlay swig_types[112] +#define SWIGTYPE_p_wxPCXHandler swig_types[113] +#define SWIGTYPE_p_wxPNGHandler swig_types[114] +#define SWIGTYPE_p_wxPNMHandler swig_types[115] +#define SWIGTYPE_p_wxPaintDC swig_types[116] +#define SWIGTYPE_p_wxPaintEvent swig_types[117] +#define SWIGTYPE_p_wxPalette swig_types[118] +#define SWIGTYPE_p_wxPaletteChangedEvent swig_types[119] +#define SWIGTYPE_p_wxPaperSize swig_types[120] +#define SWIGTYPE_p_wxPen swig_types[121] +#define SWIGTYPE_p_wxPenList swig_types[122] +#define SWIGTYPE_p_wxPixelDataBase swig_types[123] +#define SWIGTYPE_p_wxPoint swig_types[124] +#define SWIGTYPE_p_wxPoint2D swig_types[125] +#define SWIGTYPE_p_wxPostScriptDC swig_types[126] +#define SWIGTYPE_p_wxPrintData swig_types[127] +#define SWIGTYPE_p_wxPrinterDC swig_types[128] +#define SWIGTYPE_p_wxPseudoDC swig_types[129] +#define SWIGTYPE_p_wxPyApp swig_types[130] +#define SWIGTYPE_p_wxPyCommandEvent swig_types[131] +#define SWIGTYPE_p_wxPyEvent swig_types[132] +#define SWIGTYPE_p_wxPyFontEnumerator swig_types[133] +#define SWIGTYPE_p_wxPyImageHandler swig_types[134] +#define SWIGTYPE_p_wxPyLocale swig_types[135] +#define SWIGTYPE_p_wxPySizer swig_types[136] +#define SWIGTYPE_p_wxPyValidator swig_types[137] +#define SWIGTYPE_p_wxQueryNewPaletteEvent swig_types[138] +#define SWIGTYPE_p_wxRect swig_types[139] +#define SWIGTYPE_p_wxRect2D swig_types[140] +#define SWIGTYPE_p_wxRegion swig_types[141] +#define SWIGTYPE_p_wxRegionIterator swig_types[142] +#define SWIGTYPE_p_wxRendererNative swig_types[143] +#define SWIGTYPE_p_wxRendererVersion swig_types[144] +#define SWIGTYPE_p_wxScreenDC swig_types[145] +#define SWIGTYPE_p_wxScrollEvent swig_types[146] +#define SWIGTYPE_p_wxScrollWinEvent swig_types[147] +#define SWIGTYPE_p_wxSetCursorEvent swig_types[148] +#define SWIGTYPE_p_wxShowEvent swig_types[149] +#define SWIGTYPE_p_wxSize swig_types[150] +#define SWIGTYPE_p_wxSizeEvent swig_types[151] +#define SWIGTYPE_p_wxSizer swig_types[152] +#define SWIGTYPE_p_wxSizerItem swig_types[153] +#define SWIGTYPE_p_wxSplitterRenderParams swig_types[154] +#define SWIGTYPE_p_wxStaticBoxSizer swig_types[155] +#define SWIGTYPE_p_wxStdDialogButtonSizer swig_types[156] +#define SWIGTYPE_p_wxStockGDI swig_types[157] +#define SWIGTYPE_p_wxString swig_types[158] +#define SWIGTYPE_p_wxSysColourChangedEvent swig_types[159] +#define SWIGTYPE_p_wxTGAHandler swig_types[160] +#define SWIGTYPE_p_wxTIFFHandler swig_types[161] +#define SWIGTYPE_p_wxUpdateUIEvent swig_types[162] +#define SWIGTYPE_p_wxValidator swig_types[163] +#define SWIGTYPE_p_wxWindow swig_types[164] +#define SWIGTYPE_p_wxWindowCreateEvent swig_types[165] +#define SWIGTYPE_p_wxWindowDC swig_types[166] +#define SWIGTYPE_p_wxWindowDestroyEvent swig_types[167] +#define SWIGTYPE_p_wxXPMHandler swig_types[168] +static swig_type_info *swig_types[170]; +static swig_module_info swig_module = {swig_types, 169, 0, 0, 0, 0}; #define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name) #define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name) @@ -3372,8 +3371,8 @@ SWIGINTERN wxLocale *new_wxLocale(int language=-1,int flags=wxLOCALE_LOAD_DEFAUL #endif return loc; } -SWIGINTERN bool wxLocale_Init1(wxLocale *self,wxString const &szName,wxString const &szShort=wxPyEmptyString,wxString const &szLocale=wxPyEmptyString,bool bLoadDefault=true,bool bConvertEncoding=false){ - bool rc = self->Init(szName, szShort, szLocale, bLoadDefault, bConvertEncoding); +SWIGINTERN bool wxLocale_Init1(wxLocale *self,wxString const &name,wxString const &shortName=wxPyEmptyString,wxString const &locale=wxPyEmptyString,bool bLoadDefault=true,bool bConvertEncoding=false){ + bool rc = self->Init(name, shortName, locale, bLoadDefault, bConvertEncoding); // Python before 2.4 needs to have LC_NUMERIC set to "C" in order // for the floating point conversions and such to work right. #if PY_VERSION_HEX < 0x02040000 @@ -3396,28 +3395,31 @@ class wxPyLocale : public wxLocale public: wxPyLocale(); - wxPyLocale(const wxChar *szName, // name (for messages) - const wxChar *szShort = (const wxChar *) NULL, // dir prefix (for msg files) - const wxChar *szLocale = (const wxChar *) NULL, // locale (for setlocale) - bool bLoadDefault = true, // preload wxstd.mo? - bool bConvertEncoding = false); // convert Win<->Unix if necessary? + wxPyLocale(const wxString& name, // name (for messages) + const wxString& shortName = wxPyEmptyString, // dir prefix (for msg files) + const wxString& locale = wxPyEmptyString, // locale (for setlocale) + bool bLoadDefault = true, // preload wxstd.mo? + bool bConvertEncoding = false); // convert Win<->Unix if necessary? wxPyLocale(int language, // wxLanguage id or custom language - int flags = wxLOCALE_LOAD_DEFAULT | wxLOCALE_CONV_ENCODING); + int flags = wxLOCALE_LOAD_DEFAULT | wxLOCALE_CONV_ENCODING); ~wxPyLocale(); - virtual const wxChar *GetString(const wxChar *szOrigString, - const wxChar *szDomain = NULL) const; - virtual const wxChar *GetString(const wxChar *szOrigString, - const wxChar *szOrigString2, size_t n, - const wxChar *szDomain = NULL) const; - - virtual wxChar *GetSingularString(const wxChar *szOrigString, - const wxChar *szDomain = NULL) const; - virtual wxChar *GetPluralString(const wxChar *szOrigString, - const wxChar *szOrigString2, size_t n, - const wxChar *szDomain = NULL) const; + virtual const wxString& GetString(const wxString& origString, + const wxString& domain = wxPyEmptyString) const; + virtual const wxString& GetString(const wxString& origString, + const wxString& origString2, + size_t n, + const wxString& domain = wxPyEmptyString) const; + + virtual const wxString& GetSingularString(const wxString& origString, + const wxString& domain = wxPyEmptyString) const; + virtual const wxString& GetPluralString(const wxString& origString, + const wxString& origString2, + size_t n, + const wxString& domain = wxPyEmptyString) const; + PYPRIVATE; private: @@ -3428,12 +3430,12 @@ wxPyLocale::wxPyLocale() : wxLocale() { } -wxPyLocale::wxPyLocale(const wxChar *szName, // name (for messages) - const wxChar *szShort, // dir prefix (for msg files) - const wxChar *szLocale, // locale (for setlocale) - bool bLoadDefault, // preload wxstd.mo? - bool bConvertEncoding) // convert Win<->Unix if necessary? - : wxLocale(szName, szShort, szLocale, bLoadDefault, bConvertEncoding) +wxPyLocale::wxPyLocale(const wxString& name, // name (for messages) + const wxString& shortName, // dir prefix (for msg files) + const wxString& locale, // locale (for setlocale) + bool bLoadDefault, // preload wxstd.mo? + bool bConvertEncoding) // convert Win<->Unix if necessary? + : wxLocale(name, shortName, locale, bLoadDefault, bConvertEncoding) { } @@ -3446,31 +3448,29 @@ wxPyLocale::~wxPyLocale() { } -const wxChar *wxPyLocale::GetString(const wxChar *szOrigString, - const wxChar *szDomain) const +const wxString& wxPyLocale::GetString(const wxString& origString, + const wxString& domain) const { - wxChar *str = GetSingularString(szOrigString, szDomain); - return (str != NULL) ? str : wxLocale::GetString(szOrigString, szDomain); + return GetSingularString(origString, domain); } -const wxChar *wxPyLocale::GetString(const wxChar *szOrigString, - const wxChar *szOrigString2, size_t n, - const wxChar *szDomain) const +const wxString& wxPyLocale::GetString(const wxString& origString, + const wxString& origString2, + size_t n, + const wxString& domain) const { - wxChar *str = GetPluralString(szOrigString, szOrigString2, n, szDomain); - return (str != NULL) ? str : wxLocale::GetString(szOrigString, szOrigString2, n, szDomain); + return GetPluralString(origString, origString2, n, domain); } -wxChar *wxPyLocale::GetSingularString(const wxChar *szOrigString, - const wxChar *szDomain) const +const wxString& wxPyLocale::GetSingularString(const wxString& origString, + const wxString& domain) const { bool found; - static wxString str; - str = _T("error in translation"); // when the first if condition is true but the second if condition is not we do not want to return the previously queried string. + wxString str( _T("error in translation")); wxPyBlock_t blocked = wxPyBeginBlockThreads(); - if((found=wxPyCBH_findCallback(m_myInst, "GetSingularString"))) { - PyObject* param1 = wx2PyString(szOrigString); - PyObject* param2 = wx2PyString(szDomain); + if ((found=wxPyCBH_findCallback(m_myInst, "GetSingularString"))) { + PyObject* param1 = wx2PyString(origString); + PyObject* param2 = wx2PyString(domain); PyObject* ret = wxPyCBH_callCallbackObj(m_myInst, Py_BuildValue("(OO)", param1, param2)); Py_DECREF(param1); Py_DECREF(param2); @@ -3480,22 +3480,24 @@ wxChar *wxPyLocale::GetSingularString(const wxChar *szOrigString, } } wxPyEndBlockThreads(blocked); - return (found ? (wxChar*)str.c_str() : NULL); + return (found ? str : wxLocale::GetString(origString, domain)); } -wxChar *wxPyLocale::GetPluralString(const wxChar *szOrigString, - const wxChar *szOrigString2, size_t n, - const wxChar *szDomain) const +const wxString& wxPyLocale::GetPluralString(const wxString& origString, + const wxString& origString2, size_t n, + const wxString& domain) const { bool found; - static wxString str; - str = _T("error in translation"); // when the first if condition is true but the second if condition is not we do not want to return the previously queried string. + wxString str( _T("error in translation")); wxPyBlock_t blocked = wxPyBeginBlockThreads(); - if((found=wxPyCBH_findCallback(m_myInst, "GetPluralString"))) { - PyObject* param1 = wx2PyString(szOrigString); - PyObject* param2 = wx2PyString(szOrigString2); - PyObject* param4 = wx2PyString(szDomain); - PyObject* ret = wxPyCBH_callCallbackObj(m_myInst, Py_BuildValue("(OOiO)", param1, param2, (int)n, param4)); + if ((found=wxPyCBH_findCallback(m_myInst, "GetPluralString"))) { + PyObject* param1 = wx2PyString(origString); + PyObject* param2 = wx2PyString(origString2); + PyObject* param4 = wx2PyString(domain); + PyObject* ret = wxPyCBH_callCallbackObj(m_myInst, + Py_BuildValue("(OOiO)", + param1, param2, + (int)n, param4)); Py_DECREF(param1); Py_DECREF(param2); Py_DECREF(param4); @@ -3505,7 +3507,7 @@ wxChar *wxPyLocale::GetPluralString(const wxChar *szOrigString, } } wxPyEndBlockThreads(blocked); - return (found ? (wxChar*)str.c_str() : NULL); + return (found ? str : wxLocale::GetString(origString, origString2, n, domain) ); } SWIGINTERN wxPyLocale *new_wxPyLocale(int language=-1,int flags=wxLOCALE_LOAD_DEFAULT|wxLOCALE_CONV_ENCODING){ @@ -16644,7 +16646,7 @@ SWIGINTERN PyObject *_wrap_Locale_Init1(PyObject *SWIGUNUSEDPARM(self), PyObject PyObject * obj4 = 0 ; PyObject * obj5 = 0 ; char * kwnames[] = { - (char *) "self",(char *) "szName",(char *) "szShort",(char *) "szLocale",(char *) "bLoadDefault",(char *) "bConvertEncoding", NULL + (char *) "self",(char *) "name",(char *) "shortName",(char *) "locale",(char *) "bLoadDefault",(char *) "bConvertEncoding", NULL }; if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|OOOO:Locale_Init1",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail; @@ -17046,7 +17048,7 @@ SWIGINTERN PyObject *_wrap_Locale_AddCatalog(PyObject *SWIGUNUSEDPARM(self), PyO PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; char * kwnames[] = { - (char *) "self",(char *) "szDomain", NULL + (char *) "self",(char *) "domain", NULL }; if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:Locale_AddCatalog",kwnames,&obj0,&obj1)) SWIG_fail; @@ -17126,7 +17128,7 @@ SWIGINTERN PyObject *_wrap_Locale_IsLoaded(PyObject *SWIGUNUSEDPARM(self), PyObj PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; char * kwnames[] = { - (char *) "self",(char *) "szDomain", NULL + (char *) "self",(char *) "domain", NULL }; if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:Locale_IsLoaded",kwnames,&obj0,&obj1)) SWIG_fail; @@ -17313,7 +17315,7 @@ SWIGINTERN PyObject *_wrap_Locale_GetString(PyObject *SWIGUNUSEDPARM(self), PyOb PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; char * kwnames[] = { - (char *) "self",(char *) "szOrigString",(char *) "szDomain", NULL + (char *) "self",(char *) "origString",(char *) "domain", NULL }; if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|O:Locale_GetString",kwnames,&obj0,&obj1,&obj2)) SWIG_fail; @@ -17526,20 +17528,19 @@ fail: SWIGINTERN PyObject *_wrap_PyLocale_GetSingularString(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { PyObject *resultobj = 0; wxPyLocale *arg1 = (wxPyLocale *) 0 ; - wxChar *arg2 = (wxChar *) 0 ; - wxChar *arg3 = (wxChar *) NULL ; - wxChar *result = 0 ; + wxString *arg2 = 0 ; + wxString const &arg3_defvalue = wxPyEmptyString ; + wxString *arg3 = (wxString *) &arg3_defvalue ; + wxString *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - void *argp3 = 0 ; - int res3 = 0 ; + bool temp2 = false ; + bool temp3 = false ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; char * kwnames[] = { - (char *) "self",(char *) "szOrigString",(char *) "szDomain", NULL + (char *) "self",(char *) "origString",(char *) "domain", NULL }; if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|O:PyLocale_GetSingularString",kwnames,&obj0,&obj1,&obj2)) SWIG_fail; @@ -17548,27 +17549,52 @@ SWIGINTERN PyObject *_wrap_PyLocale_GetSingularString(PyObject *SWIGUNUSEDPARM(s SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PyLocale_GetSingularString" "', expected argument " "1"" of type '" "wxPyLocale const *""'"); } arg1 = reinterpret_cast< wxPyLocale * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_wxChar, 0 | 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "PyLocale_GetSingularString" "', expected argument " "2"" of type '" "wxChar const *""'"); + { + arg2 = wxString_in_helper(obj1); + if (arg2 == NULL) SWIG_fail; + temp2 = true; } - arg2 = reinterpret_cast< wxChar * >(argp2); if (obj2) { - res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_wxChar, 0 | 0 ); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "PyLocale_GetSingularString" "', expected argument " "3"" of type '" "wxChar const *""'"); + { + arg3 = wxString_in_helper(obj2); + if (arg3 == NULL) SWIG_fail; + temp3 = true; } - arg3 = reinterpret_cast< wxChar * >(argp3); } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - result = (wxChar *)((wxPyLocale const *)arg1)->GetSingularString((wxChar const *)arg2,(wxChar const *)arg3); + { + wxString const &_result_ref = ((wxPyLocale const *)arg1)->GetSingularString((wxString const &)*arg2,(wxString const &)*arg3); + result = (wxString *) &_result_ref; + } wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) SWIG_fail; } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_wxChar, 0 | 0 ); + { +#if wxUSE_UNICODE + resultobj = PyUnicode_FromWideChar(result->c_str(), result->Len()); +#else + resultobj = PyString_FromStringAndSize(result->c_str(), result->Len()); +#endif + } + { + if (temp2) + delete arg2; + } + { + if (temp3) + delete arg3; + } return resultobj; fail: + { + if (temp2) + delete arg2; + } + { + if (temp3) + delete arg3; + } return NULL; } @@ -17576,28 +17602,26 @@ fail: SWIGINTERN PyObject *_wrap_PyLocale_GetPluralString(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { PyObject *resultobj = 0; wxPyLocale *arg1 = (wxPyLocale *) 0 ; - wxChar *arg2 = (wxChar *) 0 ; - wxChar *arg3 = (wxChar *) 0 ; + wxString *arg2 = 0 ; + wxString *arg3 = 0 ; size_t arg4 ; - wxChar *arg5 = (wxChar *) NULL ; - wxChar *result = 0 ; + wxString const &arg5_defvalue = wxPyEmptyString ; + wxString *arg5 = (wxString *) &arg5_defvalue ; + wxString *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - void *argp3 = 0 ; - int res3 = 0 ; + bool temp2 = false ; + bool temp3 = false ; size_t val4 ; int ecode4 = 0 ; - void *argp5 = 0 ; - int res5 = 0 ; + bool temp5 = false ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; PyObject * obj4 = 0 ; char * kwnames[] = { - (char *) "self",(char *) "szOrigString",(char *) "szOrigString2",(char *) "n",(char *) "szDomain", NULL + (char *) "self",(char *) "origString",(char *) "origString2",(char *) "n",(char *) "domain", NULL }; if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOO|O:PyLocale_GetPluralString",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail; @@ -17606,37 +17630,70 @@ SWIGINTERN PyObject *_wrap_PyLocale_GetPluralString(PyObject *SWIGUNUSEDPARM(sel SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PyLocale_GetPluralString" "', expected argument " "1"" of type '" "wxPyLocale const *""'"); } arg1 = reinterpret_cast< wxPyLocale * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_wxChar, 0 | 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "PyLocale_GetPluralString" "', expected argument " "2"" of type '" "wxChar const *""'"); + { + arg2 = wxString_in_helper(obj1); + if (arg2 == NULL) SWIG_fail; + temp2 = true; } - arg2 = reinterpret_cast< wxChar * >(argp2); - res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_wxChar, 0 | 0 ); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "PyLocale_GetPluralString" "', expected argument " "3"" of type '" "wxChar const *""'"); + { + arg3 = wxString_in_helper(obj2); + if (arg3 == NULL) SWIG_fail; + temp3 = true; } - arg3 = reinterpret_cast< wxChar * >(argp3); ecode4 = SWIG_AsVal_size_t(obj3, &val4); if (!SWIG_IsOK(ecode4)) { SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "PyLocale_GetPluralString" "', expected argument " "4"" of type '" "size_t""'"); } arg4 = static_cast< size_t >(val4); if (obj4) { - res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_wxChar, 0 | 0 ); - if (!SWIG_IsOK(res5)) { - SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "PyLocale_GetPluralString" "', expected argument " "5"" of type '" "wxChar const *""'"); + { + arg5 = wxString_in_helper(obj4); + if (arg5 == NULL) SWIG_fail; + temp5 = true; } - arg5 = reinterpret_cast< wxChar * >(argp5); } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - result = (wxChar *)((wxPyLocale const *)arg1)->GetPluralString((wxChar const *)arg2,(wxChar const *)arg3,arg4,(wxChar const *)arg5); + { + wxString const &_result_ref = ((wxPyLocale const *)arg1)->GetPluralString((wxString const &)*arg2,(wxString const &)*arg3,arg4,(wxString const &)*arg5); + result = (wxString *) &_result_ref; + } wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) SWIG_fail; } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_wxChar, 0 | 0 ); + { +#if wxUSE_UNICODE + resultobj = PyUnicode_FromWideChar(result->c_str(), result->Len()); +#else + resultobj = PyString_FromStringAndSize(result->c_str(), result->Len()); +#endif + } + { + if (temp2) + delete arg2; + } + { + if (temp3) + delete arg3; + } + { + if (temp5) + delete arg5; + } return resultobj; fail: + { + if (temp2) + delete arg2; + } + { + if (temp3) + delete arg3; + } + { + if (temp5) + delete arg5; + } return NULL; } @@ -20508,6 +20565,264 @@ fail: } +SWIGINTERN PyObject *_wrap_DC_StretchBlit(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + wxDC *arg1 = (wxDC *) 0 ; + int arg2 ; + int arg3 ; + int arg4 ; + int arg5 ; + wxDC *arg6 = (wxDC *) 0 ; + int arg7 ; + int arg8 ; + int arg9 ; + int arg10 ; + int arg11 = (int) wxCOPY ; + bool arg12 = (bool) false ; + int arg13 = (int) wxDefaultCoord ; + int arg14 = (int) wxDefaultCoord ; + bool result; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + int val3 ; + int ecode3 = 0 ; + int val4 ; + int ecode4 = 0 ; + int val5 ; + int ecode5 = 0 ; + void *argp6 = 0 ; + int res6 = 0 ; + int val7 ; + int ecode7 = 0 ; + int val8 ; + int ecode8 = 0 ; + int val9 ; + int ecode9 = 0 ; + int val10 ; + int ecode10 = 0 ; + int val11 ; + int ecode11 = 0 ; + bool val12 ; + int ecode12 = 0 ; + int val13 ; + int ecode13 = 0 ; + int val14 ; + int ecode14 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; + PyObject * obj4 = 0 ; + PyObject * obj5 = 0 ; + PyObject * obj6 = 0 ; + PyObject * obj7 = 0 ; + PyObject * obj8 = 0 ; + PyObject * obj9 = 0 ; + PyObject * obj10 = 0 ; + PyObject * obj11 = 0 ; + PyObject * obj12 = 0 ; + PyObject * obj13 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "dstX",(char *) "dstY",(char *) "dstWidth",(char *) "dstHeight",(char *) "source",(char *) "srcX",(char *) "srcY",(char *) "srcWidth",(char *) "srcHeight",(char *) "rop",(char *) "useMask",(char *) "srcMaskX",(char *) "srcMaskY", NULL + }; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOOOOOOOO|OOOO:DC_StretchBlit",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8,&obj9,&obj10,&obj11,&obj12,&obj13)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_wxDC, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DC_StretchBlit" "', expected argument " "1"" of type '" "wxDC *""'"); + } + arg1 = reinterpret_cast< wxDC * >(argp1); + ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "DC_StretchBlit" "', expected argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + ecode3 = SWIG_AsVal_int(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "DC_StretchBlit" "', expected argument " "3"" of type '" "int""'"); + } + arg3 = static_cast< int >(val3); + ecode4 = SWIG_AsVal_int(obj3, &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "DC_StretchBlit" "', expected argument " "4"" of type '" "int""'"); + } + arg4 = static_cast< int >(val4); + ecode5 = SWIG_AsVal_int(obj4, &val5); + if (!SWIG_IsOK(ecode5)) { + SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "DC_StretchBlit" "', expected argument " "5"" of type '" "int""'"); + } + arg5 = static_cast< int >(val5); + res6 = SWIG_ConvertPtr(obj5, &argp6,SWIGTYPE_p_wxDC, 0 | 0 ); + if (!SWIG_IsOK(res6)) { + SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "DC_StretchBlit" "', expected argument " "6"" of type '" "wxDC *""'"); + } + arg6 = reinterpret_cast< wxDC * >(argp6); + ecode7 = SWIG_AsVal_int(obj6, &val7); + if (!SWIG_IsOK(ecode7)) { + SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "DC_StretchBlit" "', expected argument " "7"" of type '" "int""'"); + } + arg7 = static_cast< int >(val7); + ecode8 = SWIG_AsVal_int(obj7, &val8); + if (!SWIG_IsOK(ecode8)) { + SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "DC_StretchBlit" "', expected argument " "8"" of type '" "int""'"); + } + arg8 = static_cast< int >(val8); + ecode9 = SWIG_AsVal_int(obj8, &val9); + if (!SWIG_IsOK(ecode9)) { + SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "DC_StretchBlit" "', expected argument " "9"" of type '" "int""'"); + } + arg9 = static_cast< int >(val9); + ecode10 = SWIG_AsVal_int(obj9, &val10); + if (!SWIG_IsOK(ecode10)) { + SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "DC_StretchBlit" "', expected argument " "10"" of type '" "int""'"); + } + arg10 = static_cast< int >(val10); + if (obj10) { + ecode11 = SWIG_AsVal_int(obj10, &val11); + if (!SWIG_IsOK(ecode11)) { + SWIG_exception_fail(SWIG_ArgError(ecode11), "in method '" "DC_StretchBlit" "', expected argument " "11"" of type '" "int""'"); + } + arg11 = static_cast< int >(val11); + } + if (obj11) { + ecode12 = SWIG_AsVal_bool(obj11, &val12); + if (!SWIG_IsOK(ecode12)) { + SWIG_exception_fail(SWIG_ArgError(ecode12), "in method '" "DC_StretchBlit" "', expected argument " "12"" of type '" "bool""'"); + } + arg12 = static_cast< bool >(val12); + } + if (obj12) { + ecode13 = SWIG_AsVal_int(obj12, &val13); + if (!SWIG_IsOK(ecode13)) { + SWIG_exception_fail(SWIG_ArgError(ecode13), "in method '" "DC_StretchBlit" "', expected argument " "13"" of type '" "int""'"); + } + arg13 = static_cast< int >(val13); + } + if (obj13) { + ecode14 = SWIG_AsVal_int(obj13, &val14); + if (!SWIG_IsOK(ecode14)) { + SWIG_exception_fail(SWIG_ArgError(ecode14), "in method '" "DC_StretchBlit" "', expected argument " "14"" of type '" "int""'"); + } + arg14 = static_cast< int >(val14); + } + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + result = (bool)(arg1)->StretchBlit(arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12,arg13,arg14); + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + { + resultobj = result ? Py_True : Py_False; Py_INCREF(resultobj); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_DC_StretchBlitPointSize(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + wxDC *arg1 = (wxDC *) 0 ; + wxPoint *arg2 = 0 ; + wxSize *arg3 = 0 ; + wxDC *arg4 = (wxDC *) 0 ; + wxPoint *arg5 = 0 ; + wxSize *arg6 = 0 ; + int arg7 = (int) wxCOPY ; + bool arg8 = (bool) false ; + wxPoint const &arg9_defvalue = wxDefaultPosition ; + wxPoint *arg9 = (wxPoint *) &arg9_defvalue ; + bool result; + void *argp1 = 0 ; + int res1 = 0 ; + wxPoint temp2 ; + wxSize temp3 ; + void *argp4 = 0 ; + int res4 = 0 ; + wxPoint temp5 ; + wxSize temp6 ; + int val7 ; + int ecode7 = 0 ; + bool val8 ; + int ecode8 = 0 ; + wxPoint temp9 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; + PyObject * obj4 = 0 ; + PyObject * obj5 = 0 ; + PyObject * obj6 = 0 ; + PyObject * obj7 = 0 ; + PyObject * obj8 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "dstPt",(char *) "dstSize",(char *) "source",(char *) "srcPt",(char *) "srcSize",(char *) "rop",(char *) "useMask",(char *) "srcMaskPt", NULL + }; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOOOO|OOO:DC_StretchBlitPointSize",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_wxDC, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DC_StretchBlitPointSize" "', expected argument " "1"" of type '" "wxDC *""'"); + } + arg1 = reinterpret_cast< wxDC * >(argp1); + { + arg2 = &temp2; + if ( ! wxPoint_helper(obj1, &arg2)) SWIG_fail; + } + { + arg3 = &temp3; + if ( ! wxSize_helper(obj2, &arg3)) SWIG_fail; + } + res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_wxDC, 0 | 0 ); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "DC_StretchBlitPointSize" "', expected argument " "4"" of type '" "wxDC *""'"); + } + arg4 = reinterpret_cast< wxDC * >(argp4); + { + arg5 = &temp5; + if ( ! wxPoint_helper(obj4, &arg5)) SWIG_fail; + } + { + arg6 = &temp6; + if ( ! wxSize_helper(obj5, &arg6)) SWIG_fail; + } + if (obj6) { + ecode7 = SWIG_AsVal_int(obj6, &val7); + if (!SWIG_IsOK(ecode7)) { + SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "DC_StretchBlitPointSize" "', expected argument " "7"" of type '" "int""'"); + } + arg7 = static_cast< int >(val7); + } + if (obj7) { + ecode8 = SWIG_AsVal_bool(obj7, &val8); + if (!SWIG_IsOK(ecode8)) { + SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "DC_StretchBlitPointSize" "', expected argument " "8"" of type '" "bool""'"); + } + arg8 = static_cast< bool >(val8); + } + if (obj8) { + { + arg9 = &temp9; + if ( ! wxPoint_helper(obj8, &arg9)) SWIG_fail; + } + } + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + result = (bool)(arg1)->StretchBlit((wxPoint const &)*arg2,(wxSize const &)*arg3,arg4,(wxPoint const &)*arg5,(wxSize const &)*arg6,arg7,arg8,(wxPoint const &)*arg9); + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + { + resultobj = result ? Py_True : Py_False; Py_INCREF(resultobj); + } + return resultobj; +fail: + return NULL; +} + + SWIGINTERN PyObject *_wrap_DC_GetAsBitmap(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { PyObject *resultobj = 0; wxDC *arg1 = (wxDC *) 0 ; @@ -33022,82 +33337,6 @@ fail: } -SWIGINTERN PyObject *_wrap_PenList_AddPen(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - wxPenList *arg1 = (wxPenList *) 0 ; - wxPen *arg2 = (wxPen *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "pen", NULL - }; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:PenList_AddPen",kwnames,&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_wxPenList, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PenList_AddPen" "', expected argument " "1"" of type '" "wxPenList *""'"); - } - arg1 = reinterpret_cast< wxPenList * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_wxPen, 0 | 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "PenList_AddPen" "', expected argument " "2"" of type '" "wxPen *""'"); - } - arg2 = reinterpret_cast< wxPen * >(argp2); - { - PyThreadState* __tstate = wxPyBeginAllowThreads(); - (arg1)->AddPen(arg2); - wxPyEndAllowThreads(__tstate); - if (PyErr_Occurred()) SWIG_fail; - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_PenList_RemovePen(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - wxPenList *arg1 = (wxPenList *) 0 ; - wxPen *arg2 = (wxPen *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "pen", NULL - }; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:PenList_RemovePen",kwnames,&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_wxPenList, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PenList_RemovePen" "', expected argument " "1"" of type '" "wxPenList *""'"); - } - arg1 = reinterpret_cast< wxPenList * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_wxPen, 0 | 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "PenList_RemovePen" "', expected argument " "2"" of type '" "wxPen *""'"); - } - arg2 = reinterpret_cast< wxPen * >(argp2); - { - PyThreadState* __tstate = wxPyBeginAllowThreads(); - (arg1)->RemovePen(arg2); - wxPyEndAllowThreads(__tstate); - if (PyErr_Occurred()) SWIG_fail; - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - SWIGINTERN PyObject *PenList_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; if (!SWIG_Python_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return NULL; @@ -33153,82 +33392,6 @@ fail: } -SWIGINTERN PyObject *_wrap_BrushList_AddBrush(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - wxBrushList *arg1 = (wxBrushList *) 0 ; - wxBrush *arg2 = (wxBrush *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "brush", NULL - }; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:BrushList_AddBrush",kwnames,&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_wxBrushList, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BrushList_AddBrush" "', expected argument " "1"" of type '" "wxBrushList *""'"); - } - arg1 = reinterpret_cast< wxBrushList * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_wxBrush, 0 | 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "BrushList_AddBrush" "', expected argument " "2"" of type '" "wxBrush *""'"); - } - arg2 = reinterpret_cast< wxBrush * >(argp2); - { - PyThreadState* __tstate = wxPyBeginAllowThreads(); - (arg1)->AddBrush(arg2); - wxPyEndAllowThreads(__tstate); - if (PyErr_Occurred()) SWIG_fail; - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_BrushList_RemoveBrush(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - wxBrushList *arg1 = (wxBrushList *) 0 ; - wxBrush *arg2 = (wxBrush *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "brush", NULL - }; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:BrushList_RemoveBrush",kwnames,&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_wxBrushList, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BrushList_RemoveBrush" "', expected argument " "1"" of type '" "wxBrushList *""'"); - } - arg1 = reinterpret_cast< wxBrushList * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_wxBrush, 0 | 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "BrushList_RemoveBrush" "', expected argument " "2"" of type '" "wxBrush *""'"); - } - arg2 = reinterpret_cast< wxBrush * >(argp2); - { - PyThreadState* __tstate = wxPyBeginAllowThreads(); - (arg1)->RemoveBrush(arg2); - wxPyEndAllowThreads(__tstate); - if (PyErr_Occurred()) SWIG_fail; - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - SWIGINTERN PyObject *BrushList_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; if (!SWIG_Python_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return NULL; @@ -33343,82 +33506,6 @@ fail: } -SWIGINTERN PyObject *_wrap_FontList_AddFont(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - wxFontList *arg1 = (wxFontList *) 0 ; - wxFont *arg2 = (wxFont *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "font", NULL - }; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:FontList_AddFont",kwnames,&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_wxFontList, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FontList_AddFont" "', expected argument " "1"" of type '" "wxFontList *""'"); - } - arg1 = reinterpret_cast< wxFontList * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_wxFont, 0 | 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FontList_AddFont" "', expected argument " "2"" of type '" "wxFont *""'"); - } - arg2 = reinterpret_cast< wxFont * >(argp2); - { - PyThreadState* __tstate = wxPyBeginAllowThreads(); - (arg1)->AddFont(arg2); - wxPyEndAllowThreads(__tstate); - if (PyErr_Occurred()) SWIG_fail; - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FontList_RemoveFont(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - wxFontList *arg1 = (wxFontList *) 0 ; - wxFont *arg2 = (wxFont *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "font", NULL - }; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:FontList_RemoveFont",kwnames,&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_wxFontList, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FontList_RemoveFont" "', expected argument " "1"" of type '" "wxFontList *""'"); - } - arg1 = reinterpret_cast< wxFontList * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_wxFont, 0 | 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FontList_RemoveFont" "', expected argument " "2"" of type '" "wxFont *""'"); - } - arg2 = reinterpret_cast< wxFont * >(argp2); - { - PyThreadState* __tstate = wxPyBeginAllowThreads(); - (arg1)->RemoveFont(arg2); - wxPyEndAllowThreads(__tstate); - if (PyErr_Occurred()) SWIG_fail; - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - SWIGINTERN PyObject *FontList_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; if (!SWIG_Python_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return NULL; @@ -39804,6 +39891,8 @@ static PyMethodDef SwigMethods[] = { { (char *)"DC_DrawRotatedTextPoint", (PyCFunction) _wrap_DC_DrawRotatedTextPoint, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"DC_Blit", (PyCFunction) _wrap_DC_Blit, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"DC_BlitPointSize", (PyCFunction) _wrap_DC_BlitPointSize, METH_VARARGS | METH_KEYWORDS, NULL}, + { (char *)"DC_StretchBlit", (PyCFunction) _wrap_DC_StretchBlit, METH_VARARGS | METH_KEYWORDS, NULL}, + { (char *)"DC_StretchBlitPointSize", (PyCFunction) _wrap_DC_StretchBlitPointSize, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"DC_GetAsBitmap", (PyCFunction) _wrap_DC_GetAsBitmap, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"DC_SetClippingRegion", (PyCFunction) _wrap_DC_SetClippingRegion, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"DC_SetClippingRegionPointSize", (PyCFunction) _wrap_DC_SetClippingRegionPointSize, METH_VARARGS | METH_KEYWORDS, NULL}, @@ -40135,16 +40224,10 @@ static PyMethodDef SwigMethods[] = { { (char *)"GDIObjListBase_swigregister", GDIObjListBase_swigregister, METH_VARARGS, NULL}, { (char *)"GDIObjListBase_swiginit", GDIObjListBase_swiginit, METH_VARARGS, NULL}, { (char *)"PenList_FindOrCreatePen", (PyCFunction) _wrap_PenList_FindOrCreatePen, METH_VARARGS | METH_KEYWORDS, NULL}, - { (char *)"PenList_AddPen", (PyCFunction) _wrap_PenList_AddPen, METH_VARARGS | METH_KEYWORDS, NULL}, - { (char *)"PenList_RemovePen", (PyCFunction) _wrap_PenList_RemovePen, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"PenList_swigregister", PenList_swigregister, METH_VARARGS, NULL}, { (char *)"BrushList_FindOrCreateBrush", (PyCFunction) _wrap_BrushList_FindOrCreateBrush, METH_VARARGS | METH_KEYWORDS, NULL}, - { (char *)"BrushList_AddBrush", (PyCFunction) _wrap_BrushList_AddBrush, METH_VARARGS | METH_KEYWORDS, NULL}, - { (char *)"BrushList_RemoveBrush", (PyCFunction) _wrap_BrushList_RemoveBrush, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"BrushList_swigregister", BrushList_swigregister, METH_VARARGS, NULL}, { (char *)"FontList_FindOrCreateFont", (PyCFunction) _wrap_FontList_FindOrCreateFont, METH_VARARGS | METH_KEYWORDS, NULL}, - { (char *)"FontList_AddFont", (PyCFunction) _wrap_FontList_AddFont, METH_VARARGS | METH_KEYWORDS, NULL}, - { (char *)"FontList_RemoveFont", (PyCFunction) _wrap_FontList_RemoveFont, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"FontList_swigregister", FontList_swigregister, METH_VARARGS, NULL}, { (char *)"new_ColourDatabase", (PyCFunction)_wrap_new_ColourDatabase, METH_NOARGS, NULL}, { (char *)"delete_ColourDatabase", (PyCFunction)_wrap_delete_ColourDatabase, METH_O, NULL}, @@ -40809,7 +40892,6 @@ static swig_type_info _swigt__p_wxBrush = {"_p_wxBrush", "wxBrush *", 0, 0, (voi static swig_type_info _swigt__p_wxBrushList = {"_p_wxBrushList", "wxBrushList *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_wxBufferedDC = {"_p_wxBufferedDC", "wxBufferedDC *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_wxBufferedPaintDC = {"_p_wxBufferedPaintDC", "wxBufferedPaintDC *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_wxChar = {"_p_wxChar", "wxChar *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_wxClientDC = {"_p_wxClientDC", "wxClientDC *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_wxColour = {"_p_wxColour", "wxColour *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_wxColourDatabase = {"_p_wxColourDatabase", "wxColourDatabase *", 0, 0, (void*)0, 0}; @@ -40987,7 +41069,6 @@ static swig_type_info *swig_type_initial[] = { &_swigt__p_wxBufferedDC, &_swigt__p_wxBufferedPaintDC, &_swigt__p_wxCURHandler, - &_swigt__p_wxChar, &_swigt__p_wxChildFocusEvent, &_swigt__p_wxClientDC, &_swigt__p_wxClipboardTextEvent, @@ -41153,7 +41234,6 @@ static swig_cast_info _swigc__p_wxBrush[] = { {&_swigt__p_wxBrush, 0, 0, 0},{0, static swig_cast_info _swigc__p_wxBrushList[] = { {&_swigt__p_wxBrushList, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_wxBufferedDC[] = { {&_swigt__p_wxBufferedDC, 0, 0, 0}, {&_swigt__p_wxBufferedPaintDC, _p_wxBufferedPaintDCTo_p_wxBufferedDC, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_wxBufferedPaintDC[] = { {&_swigt__p_wxBufferedPaintDC, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_wxChar[] = { {&_swigt__p_wxChar, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_wxClientDC[] = { {&_swigt__p_wxClientDC, 0, 0, 0}, {&_swigt__p_wxPaintDC, _p_wxPaintDCTo_p_wxClientDC, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_wxColour[] = { {&_swigt__p_wxColour, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_wxColourDatabase[] = { {&_swigt__p_wxColourDatabase, 0, 0, 0},{0, 0, 0, 0}}; @@ -41331,7 +41411,6 @@ static swig_cast_info *swig_cast_initial[] = { _swigc__p_wxBufferedDC, _swigc__p_wxBufferedPaintDC, _swigc__p_wxCURHandler, - _swigc__p_wxChar, _swigc__p_wxChildFocusEvent, _swigc__p_wxClientDC, _swigc__p_wxClipboardTextEvent, @@ -42364,6 +42443,7 @@ SWIGEXPORT void SWIG_init(void) { SWIG_Python_SetConstant(d, "PLATFORM_MAC",SWIG_From_int(static_cast< int >(wxPLATFORM_MAC))); SWIG_Python_SetConstant(d, "BUFFER_VIRTUAL_AREA",SWIG_From_int(static_cast< int >(wxBUFFER_VIRTUAL_AREA))); SWIG_Python_SetConstant(d, "BUFFER_CLIENT_AREA",SWIG_From_int(static_cast< int >(wxBUFFER_CLIENT_AREA))); + SWIG_Python_SetConstant(d, "BUFFER_USES_SHARED_BUFFER",SWIG_From_int(static_cast< int >(wxBUFFER_USES_SHARED_BUFFER))); PyDict_SetItemString(d,(char*)"cvar", SWIG_globals()); SWIG_addvarlink(SWIG_globals(),(char*)"NullGraphicsPen",NullGraphicsPen_get, NullGraphicsPen_set); SWIG_addvarlink(SWIG_globals(),(char*)"NullGraphicsBrush",NullGraphicsBrush_get, NullGraphicsBrush_set); diff --git a/wxPython/src/msw/_misc.py b/wxPython/src/msw/_misc.py index 6ac360873b..b4494a0615 100644 --- a/wxPython/src/msw/_misc.py +++ b/wxPython/src/msw/_misc.py @@ -316,11 +316,6 @@ def EndBusyCursor(*args): """EndBusyCursor()""" return _misc_.EndBusyCursor(*args) -def GetElapsedTime(*args, **kwargs): - """GetElapsedTime(bool resetTimer=True) -> long""" - return _misc_.GetElapsedTime(*args, **kwargs) -GetElapsedTime = wx._deprecated(GetElapsedTime) - def IsBusy(*args): """IsBusy() -> bool""" return _misc_.IsBusy(*args) @@ -333,10 +328,6 @@ def Shell(*args, **kwargs): """Shell(String command=EmptyString) -> bool""" return _misc_.Shell(*args, **kwargs) -def StartTimer(*args): - """StartTimer()""" - return _misc_.StartTimer(*args) - def GetOsVersion(*args): """GetOsVersion() -> (platform, major, minor)""" return _misc_.GetOsVersion(*args) @@ -3307,8 +3298,26 @@ class FileConfig(ConfigBase): _misc_.FileConfig_swiginit(self,_misc_.new_FileConfig(*args, **kwargs)) __swig_destroy__ = _misc_.delete_FileConfig __del__ = lambda self : None; + def GetGlobalFileName(*args, **kwargs): + """GetGlobalFileName(String szFile) -> String""" + return _misc_.FileConfig_GetGlobalFileName(*args, **kwargs) + + GetGlobalFileName = staticmethod(GetGlobalFileName) + def GetLocalFileName(*args, **kwargs): + """GetLocalFileName(String szFile, int style=0) -> String""" + return _misc_.FileConfig_GetLocalFileName(*args, **kwargs) + + GetLocalFileName = staticmethod(GetLocalFileName) _misc_.FileConfig_swigregister(FileConfig) +def FileConfig_GetGlobalFileName(*args, **kwargs): + """FileConfig_GetGlobalFileName(String szFile) -> String""" + return _misc_.FileConfig_GetGlobalFileName(*args, **kwargs) + +def FileConfig_GetLocalFileName(*args, **kwargs): + """FileConfig_GetLocalFileName(String szFile, int style=0) -> String""" + return _misc_.FileConfig_GetLocalFileName(*args, **kwargs) + class ConfigPathChanger(object): """ A handy little class which changes current path to the path of given @@ -3707,17 +3716,6 @@ class DateTime(object): """GetLastWeekDay(self, int weekday, int month=Inv_Month, int year=Inv_Year) -> DateTime""" return _misc_.DateTime_GetLastWeekDay(*args, **kwargs) - def SetToTheWeek(*args, **kwargs): - """SetToTheWeek(self, int numWeek, int weekday=Mon, int flags=Monday_First) -> bool""" - return _misc_.DateTime_SetToTheWeek(*args, **kwargs) - - def GetWeek(*args, **kwargs): - """GetWeek(self, int numWeek, int weekday=Mon, int flags=Monday_First) -> DateTime""" - return _misc_.DateTime_GetWeek(*args, **kwargs) - - SetToTheWeek = wx._deprecated(SetToTheWeek, "SetToTheWeek is deprecated, use (static) SetToWeekOfYear instead") - GetWeek = wx._deprecated(GetWeek, "GetWeek is deprecated, use GetWeekOfYear instead") - def SetToWeekOfYear(*args, **kwargs): """SetToWeekOfYear(int year, int numWeek, int weekday=Mon) -> DateTime""" return _misc_.DateTime_SetToWeekOfYear(*args, **kwargs) @@ -4036,7 +4034,6 @@ class DateTime(object): RataDie = property(GetRataDie,doc="See `GetRataDie`") Second = property(GetSecond,SetSecond,doc="See `GetSecond` and `SetSecond`") Ticks = property(GetTicks,doc="See `GetTicks`") - Week = property(GetWeek,doc="See `GetWeek`") WeekDay = property(GetWeekDay,doc="See `GetWeekDay`") WeekDayInSameWeek = property(GetWeekDayInSameWeek,doc="See `GetWeekDayInSameWeek`") WeekOfMonth = property(GetWeekOfMonth,doc="See `GetWeekOfMonth`") diff --git a/wxPython/src/msw/_misc_wrap.cpp b/wxPython/src/msw/_misc_wrap.cpp index 3979c0cea4..f76433047e 100644 --- a/wxPython/src/msw/_misc_wrap.cpp +++ b/wxPython/src/msw/_misc_wrap.cpp @@ -2802,6 +2802,19 @@ SWIG_AsVal_int (PyObject * obj, int *val) static const wxString wxPyFileSelectorDefaultWildcardStr(wxFileSelectorDefaultWildcardStr); static const wxString wxPyDirSelectorPromptStr(wxDirSelectorPromptStr); +SWIGINTERN int +SWIG_AsVal_unsigned_SS_long (PyObject* obj, unsigned long* val) +{ + long v = 0; + if (SWIG_AsVal_long(obj, &v) && v < 0) { + return SWIG_TypeError; + } + else if (val) + *val = (unsigned long)v; + return SWIG_OK; +} + + SWIGINTERN int SWIG_AsVal_bool (PyObject *obj, bool *val) { @@ -2820,19 +2833,6 @@ SWIG_AsVal_bool (PyObject *obj, bool *val) } -SWIGINTERN int -SWIG_AsVal_unsigned_SS_long (PyObject* obj, unsigned long* val) -{ - long v = 0; - if (SWIG_AsVal_long(obj, &v) && v < 0) { - return SWIG_TypeError; - } - else if (val) - *val = (unsigned long)v; - return SWIG_OK; -} - - SWIGINTERNINLINE PyObject* SWIG_From_unsigned_SS_long (unsigned long value) { @@ -4929,38 +4929,6 @@ fail: } -SWIGINTERN PyObject *_wrap_GetElapsedTime(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - bool arg1 = (bool) true ; - long result; - bool val1 ; - int ecode1 = 0 ; - PyObject * obj0 = 0 ; - char * kwnames[] = { - (char *) "resetTimer", NULL - }; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"|O:GetElapsedTime",kwnames,&obj0)) SWIG_fail; - if (obj0) { - ecode1 = SWIG_AsVal_bool(obj0, &val1); - if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "GetElapsedTime" "', expected argument " "1"" of type '" "bool""'"); - } - arg1 = static_cast< bool >(val1); - } - { - PyThreadState* __tstate = wxPyBeginAllowThreads(); - result = (long)wxGetElapsedTime(arg1); - wxPyEndAllowThreads(__tstate); - if (PyErr_Occurred()) SWIG_fail; - } - resultobj = SWIG_From_long(static_cast< long >(result)); - return resultobj; -fail: - return NULL; -} - - SWIGINTERN PyObject *_wrap_IsBusy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; bool result; @@ -5047,23 +5015,6 @@ fail: } -SWIGINTERN PyObject *_wrap_StartTimer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - - if (!SWIG_Python_UnpackTuple(args,"StartTimer",0,0,0)) SWIG_fail; - { - PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStartTimer(); - wxPyEndAllowThreads(__tstate); - if (PyErr_Occurred()) SWIG_fail; - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - SWIGINTERN PyObject *_wrap_GetOsVersion(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; int *arg1 = (int *) 0 ; @@ -22966,6 +22917,103 @@ fail: } +SWIGINTERN PyObject *_wrap_FileConfig_GetGlobalFileName(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + wxString *arg1 = 0 ; + wxString result; + bool temp1 = false ; + PyObject * obj0 = 0 ; + char * kwnames[] = { + (char *) "szFile", NULL + }; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:FileConfig_GetGlobalFileName",kwnames,&obj0)) SWIG_fail; + { + arg1 = wxString_in_helper(obj0); + if (arg1 == NULL) SWIG_fail; + temp1 = true; + } + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + result = wxFileConfig::GetGlobalFileName((wxString const &)*arg1); + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + { +#if wxUSE_UNICODE + resultobj = PyUnicode_FromWideChar((&result)->c_str(), (&result)->Len()); +#else + resultobj = PyString_FromStringAndSize((&result)->c_str(), (&result)->Len()); +#endif + } + { + if (temp1) + delete arg1; + } + return resultobj; +fail: + { + if (temp1) + delete arg1; + } + return NULL; +} + + +SWIGINTERN PyObject *_wrap_FileConfig_GetLocalFileName(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + wxString *arg1 = 0 ; + int arg2 = (int) 0 ; + wxString result; + bool temp1 = false ; + int val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "szFile",(char *) "style", NULL + }; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:FileConfig_GetLocalFileName",kwnames,&obj0,&obj1)) SWIG_fail; + { + arg1 = wxString_in_helper(obj0); + if (arg1 == NULL) SWIG_fail; + temp1 = true; + } + if (obj1) { + ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FileConfig_GetLocalFileName" "', expected argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + } + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + result = wxFileConfig::GetLocalFileName((wxString const &)*arg1,arg2); + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + { +#if wxUSE_UNICODE + resultobj = PyUnicode_FromWideChar((&result)->c_str(), (&result)->Len()); +#else + resultobj = PyString_FromStringAndSize((&result)->c_str(), (&result)->Len()); +#endif + } + { + if (temp1) + delete arg1; + } + return resultobj; +fail: + { + if (temp1) + delete arg1; + } + return NULL; +} + + SWIGINTERN PyObject *FileConfig_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; if (!SWIG_Python_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return NULL; @@ -25236,130 +25284,6 @@ fail: } -SWIGINTERN PyObject *_wrap_DateTime_SetToTheWeek(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - wxDateTime *arg1 = (wxDateTime *) 0 ; - int arg2 ; - wxDateTime::WeekDay arg3 = (wxDateTime::WeekDay) wxDateTime::Mon ; - wxDateTime::WeekFlags arg4 = (wxDateTime::WeekFlags) wxDateTime::Monday_First ; - bool result; - void *argp1 = 0 ; - int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - int val3 ; - int ecode3 = 0 ; - int val4 ; - int ecode4 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "numWeek",(char *) "weekday",(char *) "flags", NULL - }; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|OO:DateTime_SetToTheWeek",kwnames,&obj0,&obj1,&obj2,&obj3)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_wxDateTime, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DateTime_SetToTheWeek" "', expected argument " "1"" of type '" "wxDateTime *""'"); - } - arg1 = reinterpret_cast< wxDateTime * >(argp1); - ecode2 = SWIG_AsVal_int(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "DateTime_SetToTheWeek" "', expected argument " "2"" of type '" "int""'"); - } - arg2 = static_cast< int >(val2); - if (obj2) { - ecode3 = SWIG_AsVal_int(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "DateTime_SetToTheWeek" "', expected argument " "3"" of type '" "wxDateTime::WeekDay""'"); - } - arg3 = static_cast< wxDateTime::WeekDay >(val3); - } - if (obj3) { - ecode4 = SWIG_AsVal_int(obj3, &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "DateTime_SetToTheWeek" "', expected argument " "4"" of type '" "wxDateTime::WeekFlags""'"); - } - arg4 = static_cast< wxDateTime::WeekFlags >(val4); - } - { - PyThreadState* __tstate = wxPyBeginAllowThreads(); - result = (bool)(arg1)->SetToTheWeek(arg2,arg3,arg4); - wxPyEndAllowThreads(__tstate); - if (PyErr_Occurred()) SWIG_fail; - } - { - resultobj = result ? Py_True : Py_False; Py_INCREF(resultobj); - } - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_DateTime_GetWeek(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - wxDateTime *arg1 = (wxDateTime *) 0 ; - int arg2 ; - wxDateTime::WeekDay arg3 = (wxDateTime::WeekDay) wxDateTime::Mon ; - wxDateTime::WeekFlags arg4 = (wxDateTime::WeekFlags) wxDateTime::Monday_First ; - wxDateTime result; - void *argp1 = 0 ; - int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - int val3 ; - int ecode3 = 0 ; - int val4 ; - int ecode4 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "numWeek",(char *) "weekday",(char *) "flags", NULL - }; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|OO:DateTime_GetWeek",kwnames,&obj0,&obj1,&obj2,&obj3)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_wxDateTime, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DateTime_GetWeek" "', expected argument " "1"" of type '" "wxDateTime *""'"); - } - arg1 = reinterpret_cast< wxDateTime * >(argp1); - ecode2 = SWIG_AsVal_int(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "DateTime_GetWeek" "', expected argument " "2"" of type '" "int""'"); - } - arg2 = static_cast< int >(val2); - if (obj2) { - ecode3 = SWIG_AsVal_int(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "DateTime_GetWeek" "', expected argument " "3"" of type '" "wxDateTime::WeekDay""'"); - } - arg3 = static_cast< wxDateTime::WeekDay >(val3); - } - if (obj3) { - ecode4 = SWIG_AsVal_int(obj3, &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "DateTime_GetWeek" "', expected argument " "4"" of type '" "wxDateTime::WeekFlags""'"); - } - arg4 = static_cast< wxDateTime::WeekFlags >(val4); - } - { - PyThreadState* __tstate = wxPyBeginAllowThreads(); - result = (arg1)->GetWeek(arg2,arg3,arg4); - wxPyEndAllowThreads(__tstate); - if (PyErr_Occurred()) SWIG_fail; - } - resultobj = SWIG_NewPointerObj((new wxDateTime(static_cast< const wxDateTime& >(result))), SWIGTYPE_p_wxDateTime, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - SWIGINTERN PyObject *_wrap_DateTime_SetToWeekOfYear(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { PyObject *resultobj = 0; int arg1 ; @@ -36608,12 +36532,12 @@ SWIGINTERN PyObject *_wrap_Display_GetFromWindow(PyObject *SWIGUNUSEDPARM(self), if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:Display_GetFromWindow",kwnames,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_wxWindow, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Display_GetFromWindow" "', expected argument " "1"" of type '" "wxWindow *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Display_GetFromWindow" "', expected argument " "1"" of type '" "wxWindow const *""'"); } arg1 = reinterpret_cast< wxWindow * >(argp1); { PyThreadState* __tstate = wxPyBeginAllowThreads(); - result = (int)wxDisplay::GetFromWindow(arg1); + result = (int)wxDisplay::GetFromWindow((wxWindow const *)arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) SWIG_fail; } @@ -39259,11 +39183,9 @@ static PyMethodDef SwigMethods[] = { { (char *)"GetStockHelpString", (PyCFunction) _wrap_GetStockHelpString, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"Bell", (PyCFunction)_wrap_Bell, METH_NOARGS, NULL}, { (char *)"EndBusyCursor", (PyCFunction)_wrap_EndBusyCursor, METH_NOARGS, NULL}, - { (char *)"GetElapsedTime", (PyCFunction) _wrap_GetElapsedTime, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"IsBusy", (PyCFunction)_wrap_IsBusy, METH_NOARGS, NULL}, { (char *)"Now", (PyCFunction)_wrap_Now, METH_NOARGS, NULL}, { (char *)"Shell", (PyCFunction) _wrap_Shell, METH_VARARGS | METH_KEYWORDS, NULL}, - { (char *)"StartTimer", (PyCFunction)_wrap_StartTimer, METH_NOARGS, NULL}, { (char *)"GetOsVersion", (PyCFunction)_wrap_GetOsVersion, METH_NOARGS, NULL}, { (char *)"GetOsDescription", (PyCFunction)_wrap_GetOsDescription, METH_NOARGS, NULL}, { (char *)"IsPlatformLittleEndian", (PyCFunction)_wrap_IsPlatformLittleEndian, METH_NOARGS, NULL}, @@ -39781,6 +39703,8 @@ static PyMethodDef SwigMethods[] = { { (char *)"Config_swiginit", Config_swiginit, METH_VARARGS, NULL}, { (char *)"new_FileConfig", (PyCFunction) _wrap_new_FileConfig, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"delete_FileConfig", (PyCFunction)_wrap_delete_FileConfig, METH_O, NULL}, + { (char *)"FileConfig_GetGlobalFileName", (PyCFunction) _wrap_FileConfig_GetGlobalFileName, METH_VARARGS | METH_KEYWORDS, NULL}, + { (char *)"FileConfig_GetLocalFileName", (PyCFunction) _wrap_FileConfig_GetLocalFileName, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"FileConfig_swigregister", FileConfig_swigregister, METH_VARARGS, NULL}, { (char *)"FileConfig_swiginit", FileConfig_swiginit, METH_VARARGS, NULL}, { (char *)"new_ConfigPathChanger", (PyCFunction) _wrap_new_ConfigPathChanger, METH_VARARGS | METH_KEYWORDS, NULL}, @@ -39838,8 +39762,6 @@ static PyMethodDef SwigMethods[] = { { (char *)"DateTime_SetToWeekDay", (PyCFunction) _wrap_DateTime_SetToWeekDay, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"DateTime_SetToLastWeekDay", (PyCFunction) _wrap_DateTime_SetToLastWeekDay, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"DateTime_GetLastWeekDay", (PyCFunction) _wrap_DateTime_GetLastWeekDay, METH_VARARGS | METH_KEYWORDS, NULL}, - { (char *)"DateTime_SetToTheWeek", (PyCFunction) _wrap_DateTime_SetToTheWeek, METH_VARARGS | METH_KEYWORDS, NULL}, - { (char *)"DateTime_GetWeek", (PyCFunction) _wrap_DateTime_GetWeek, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"DateTime_SetToWeekOfYear", (PyCFunction) _wrap_DateTime_SetToWeekOfYear, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"DateTime_SetToLastMonthDay", (PyCFunction) _wrap_DateTime_SetToLastMonthDay, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"DateTime_GetLastMonthDay", (PyCFunction) _wrap_DateTime_GetLastMonthDay, METH_VARARGS | METH_KEYWORDS, NULL}, diff --git a/wxPython/src/msw/_windows.py b/wxPython/src/msw/_windows.py index 353b8cd112..3f6b371091 100644 --- a/wxPython/src/msw/_windows.py +++ b/wxPython/src/msw/_windows.py @@ -313,13 +313,11 @@ ICONIZE = _windows_.ICONIZE MINIMIZE = _windows_.MINIMIZE MAXIMIZE = _windows_.MAXIMIZE CLOSE_BOX = _windows_.CLOSE_BOX -THICK_FRAME = _windows_.THICK_FRAME SYSTEM_MENU = _windows_.SYSTEM_MENU MINIMIZE_BOX = _windows_.MINIMIZE_BOX MAXIMIZE_BOX = _windows_.MAXIMIZE_BOX TINY_CAPTION_HORIZ = _windows_.TINY_CAPTION_HORIZ TINY_CAPTION_VERT = _windows_.TINY_CAPTION_VERT -RESIZE_BOX = _windows_.RESIZE_BOX RESIZE_BORDER = _windows_.RESIZE_BORDER DIALOG_NO_PARENT = _windows_.DIALOG_NO_PARENT DEFAULT_FRAME_STYLE = _windows_.DEFAULT_FRAME_STYLE @@ -333,12 +331,18 @@ FRAME_DRAWER = _windows_.FRAME_DRAWER FRAME_EX_METAL = _windows_.FRAME_EX_METAL DIALOG_EX_METAL = _windows_.DIALOG_EX_METAL WS_EX_CONTEXTHELP = _windows_.WS_EX_CONTEXTHELP -DIALOG_MODAL = _windows_.DIALOG_MODAL -DIALOG_MODELESS = _windows_.DIALOG_MODELESS -USER_COLOURS = _windows_.USER_COLOURS -NO_3D = _windows_.NO_3D FRAME_EX_CONTEXTHELP = _windows_.FRAME_EX_CONTEXTHELP DIALOG_EX_CONTEXTHELP = _windows_.DIALOG_EX_CONTEXTHELP +# deprecated +RESIZE_BOX = MAXIMIZE_BOX +THICK_FRAME = RESIZE_BORDER + +# Obsolete +wxDIALOG_MODAL = 0 +wxDIALOG_MODELESS = 0 +wxUSER_COLOURS = 0 +wxNO_3D = 0 + FULLSCREEN_NOMENUBAR = _windows_.FULLSCREEN_NOMENUBAR FULLSCREEN_NOTOOLBAR = _windows_.FULLSCREEN_NOTOOLBAR FULLSCREEN_NOSTATUSBAR = _windows_.FULLSCREEN_NOSTATUSBAR @@ -1426,14 +1430,6 @@ class SashWindow(_core.Window): """GetSashVisible(self, int edge) -> bool""" return _windows_.SashWindow_GetSashVisible(*args, **kwargs) - def SetSashBorder(*args, **kwargs): - """SetSashBorder(self, int edge, bool border)""" - return _windows_.SashWindow_SetSashBorder(*args, **kwargs) - - def HasBorder(*args, **kwargs): - """HasBorder(self, int edge) -> bool""" - return _windows_.SashWindow_HasBorder(*args, **kwargs) - def GetEdgeMargin(*args, **kwargs): """GetEdgeMargin(self, int edge) -> int""" return _windows_.SashWindow_GetEdgeMargin(*args, **kwargs) @@ -2019,6 +2015,10 @@ class VListBox(VScrolledWindow): """SetSelectionBackground(self, Colour col)""" return _windows_.VListBox_SetSelectionBackground(*args, **kwargs) + def RefreshSelected(*args, **kwargs): + """RefreshSelected(self)""" + return _windows_.VListBox_RefreshSelected(*args, **kwargs) + def OnDrawSeparator(*args, **kwargs): """OnDrawSeparator(self, DC dc, Rect rect, size_t n)""" return _windows_.VListBox_OnDrawSeparator(*args, **kwargs) @@ -2313,9 +2313,10 @@ def GetColourFromUser(*args, **kwargs): String caption=EmptyString) -> Colour """ return _windows_.GetColourFromUser(*args, **kwargs) +DD_CHANGE_DIR = _windows_.DD_CHANGE_DIR +DD_DIR_MUST_EXIST = _windows_.DD_DIR_MUST_EXIST DD_NEW_DIR_BUTTON = _windows_.DD_NEW_DIR_BUTTON DD_DEFAULT_STYLE = _windows_.DD_DEFAULT_STYLE -DD_CHANGE_DIR = _windows_.DD_CHANGE_DIR class DirDialog(Dialog): """ wx.DirDialog allows the user to select a directory by browising the @@ -2371,13 +2372,6 @@ class DirDialog(Dialog): Path = property(GetPath,SetPath,doc="See `GetPath` and `SetPath`") _windows_.DirDialog_swigregister(DirDialog) -OPEN = _windows_.OPEN -SAVE = _windows_.SAVE -OVERWRITE_PROMPT = _windows_.OVERWRITE_PROMPT -FILE_MUST_EXIST = _windows_.FILE_MUST_EXIST -MULTIPLE = _windows_.MULTIPLE -CHANGE_DIR = _windows_.CHANGE_DIR -HIDE_READONLY = _windows_.HIDE_READONLY FD_OPEN = _windows_.FD_OPEN FD_SAVE = _windows_.FD_SAVE FD_OVERWRITE_PROMPT = _windows_.FD_OVERWRITE_PROMPT @@ -2386,6 +2380,14 @@ FD_MULTIPLE = _windows_.FD_MULTIPLE FD_CHANGE_DIR = _windows_.FD_CHANGE_DIR FD_PREVIEW = _windows_.FD_PREVIEW FD_DEFAULT_STYLE = _windows_.FD_DEFAULT_STYLE +# deprecated names +OPEN = FD_OPEN, +SAVE = FD_SAVE, +OVERWRITE_PROMPT = FD_OVERWRITE_PROMPT, +FILE_MUST_EXIST = FD_FILE_MUST_EXIST, +MULTIPLE = FD_MULTIPLE, +CHANGE_DIR = FD_CHANGE_DIR + class FileDialog(Dialog): """ wx.FileDialog allows the user to select one or more files from the diff --git a/wxPython/src/msw/_windows_wrap.cpp b/wxPython/src/msw/_windows_wrap.cpp index 9520bfe2f3..21101e1a8a 100644 --- a/wxPython/src/msw/_windows_wrap.cpp +++ b/wxPython/src/msw/_windows_wrap.cpp @@ -11168,94 +11168,6 @@ fail: } -SWIGINTERN PyObject *_wrap_SashWindow_SetSashBorder(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - wxSashWindow *arg1 = (wxSashWindow *) 0 ; - wxSashEdgePosition arg2 ; - bool arg3 ; - void *argp1 = 0 ; - int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - bool val3 ; - int ecode3 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "edge",(char *) "border", NULL - }; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:SashWindow_SetSashBorder",kwnames,&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_wxSashWindow, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SashWindow_SetSashBorder" "', expected argument " "1"" of type '" "wxSashWindow *""'"); - } - arg1 = reinterpret_cast< wxSashWindow * >(argp1); - ecode2 = SWIG_AsVal_int(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SashWindow_SetSashBorder" "', expected argument " "2"" of type '" "wxSashEdgePosition""'"); - } - arg2 = static_cast< wxSashEdgePosition >(val2); - ecode3 = SWIG_AsVal_bool(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SashWindow_SetSashBorder" "', expected argument " "3"" of type '" "bool""'"); - } - arg3 = static_cast< bool >(val3); - { - PyThreadState* __tstate = wxPyBeginAllowThreads(); - (arg1)->SetSashBorder(arg2,arg3); - wxPyEndAllowThreads(__tstate); - if (PyErr_Occurred()) SWIG_fail; - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_SashWindow_HasBorder(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - wxSashWindow *arg1 = (wxSashWindow *) 0 ; - wxSashEdgePosition arg2 ; - bool result; - void *argp1 = 0 ; - int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "edge", NULL - }; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:SashWindow_HasBorder",kwnames,&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_wxSashWindow, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SashWindow_HasBorder" "', expected argument " "1"" of type '" "wxSashWindow const *""'"); - } - arg1 = reinterpret_cast< wxSashWindow * >(argp1); - ecode2 = SWIG_AsVal_int(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SashWindow_HasBorder" "', expected argument " "2"" of type '" "wxSashEdgePosition""'"); - } - arg2 = static_cast< wxSashEdgePosition >(val2); - { - PyThreadState* __tstate = wxPyBeginAllowThreads(); - result = (bool)((wxSashWindow const *)arg1)->HasBorder(arg2); - wxPyEndAllowThreads(__tstate); - if (PyErr_Occurred()) SWIG_fail; - } - { - resultobj = result ? Py_True : Py_False; Py_INCREF(resultobj); - } - return resultobj; -fail: - return NULL; -} - - SWIGINTERN PyObject *_wrap_SashWindow_GetEdgeMargin(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { PyObject *resultobj = 0; wxSashWindow *arg1 = (wxSashWindow *) 0 ; @@ -15497,6 +15409,33 @@ fail: } +SWIGINTERN PyObject *_wrap_VListBox_RefreshSelected(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + wxPyVListBox *arg1 = (wxPyVListBox *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_wxPyVListBox, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VListBox_RefreshSelected" "', expected argument " "1"" of type '" "wxPyVListBox *""'"); + } + arg1 = reinterpret_cast< wxPyVListBox * >(argp1); + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + (arg1)->RefreshSelected(); + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + SWIGINTERN PyObject *_wrap_VListBox_OnDrawSeparator(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { PyObject *resultobj = 0; wxPyVListBox *arg1 = (wxPyVListBox *) 0 ; @@ -32112,8 +32051,6 @@ static PyMethodDef SwigMethods[] = { { (char *)"SashWindow_Create", (PyCFunction) _wrap_SashWindow_Create, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"SashWindow_SetSashVisible", (PyCFunction) _wrap_SashWindow_SetSashVisible, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"SashWindow_GetSashVisible", (PyCFunction) _wrap_SashWindow_GetSashVisible, METH_VARARGS | METH_KEYWORDS, NULL}, - { (char *)"SashWindow_SetSashBorder", (PyCFunction) _wrap_SashWindow_SetSashBorder, METH_VARARGS | METH_KEYWORDS, NULL}, - { (char *)"SashWindow_HasBorder", (PyCFunction) _wrap_SashWindow_HasBorder, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"SashWindow_GetEdgeMargin", (PyCFunction) _wrap_SashWindow_GetEdgeMargin, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"SashWindow_SetDefaultBorderSize", (PyCFunction) _wrap_SashWindow_SetDefaultBorderSize, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"SashWindow_GetDefaultBorderSize", (PyCFunction)_wrap_SashWindow_GetDefaultBorderSize, METH_O, NULL}, @@ -32241,6 +32178,7 @@ static PyMethodDef SwigMethods[] = { { (char *)"VListBox_SetMargins", (PyCFunction) _wrap_VListBox_SetMargins, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"VListBox_SetMarginsXY", (PyCFunction) _wrap_VListBox_SetMarginsXY, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"VListBox_SetSelectionBackground", (PyCFunction) _wrap_VListBox_SetSelectionBackground, METH_VARARGS | METH_KEYWORDS, NULL}, + { (char *)"VListBox_RefreshSelected", (PyCFunction)_wrap_VListBox_RefreshSelected, METH_O, NULL}, { (char *)"VListBox_OnDrawSeparator", (PyCFunction) _wrap_VListBox_OnDrawSeparator, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"VListBox_OnDrawBackground", (PyCFunction) _wrap_VListBox_OnDrawBackground, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"VListBox_swigregister", VListBox_swigregister, METH_VARARGS, NULL}, @@ -35002,13 +34940,11 @@ SWIGEXPORT void SWIG_init(void) { SWIG_Python_SetConstant(d, "MINIMIZE",SWIG_From_int(static_cast< int >(wxMINIMIZE))); SWIG_Python_SetConstant(d, "MAXIMIZE",SWIG_From_int(static_cast< int >(wxMAXIMIZE))); SWIG_Python_SetConstant(d, "CLOSE_BOX",SWIG_From_int(static_cast< int >(wxCLOSE_BOX))); - SWIG_Python_SetConstant(d, "THICK_FRAME",SWIG_From_int(static_cast< int >(wxTHICK_FRAME))); SWIG_Python_SetConstant(d, "SYSTEM_MENU",SWIG_From_int(static_cast< int >(wxSYSTEM_MENU))); SWIG_Python_SetConstant(d, "MINIMIZE_BOX",SWIG_From_int(static_cast< int >(wxMINIMIZE_BOX))); SWIG_Python_SetConstant(d, "MAXIMIZE_BOX",SWIG_From_int(static_cast< int >(wxMAXIMIZE_BOX))); SWIG_Python_SetConstant(d, "TINY_CAPTION_HORIZ",SWIG_From_int(static_cast< int >(wxTINY_CAPTION_HORIZ))); SWIG_Python_SetConstant(d, "TINY_CAPTION_VERT",SWIG_From_int(static_cast< int >(wxTINY_CAPTION_VERT))); - SWIG_Python_SetConstant(d, "RESIZE_BOX",SWIG_From_int(static_cast< int >(wxRESIZE_BOX))); SWIG_Python_SetConstant(d, "RESIZE_BORDER",SWIG_From_int(static_cast< int >(wxRESIZE_BORDER))); SWIG_Python_SetConstant(d, "DIALOG_NO_PARENT",SWIG_From_int(static_cast< int >(wxDIALOG_NO_PARENT))); SWIG_Python_SetConstant(d, "DEFAULT_FRAME_STYLE",SWIG_From_int(static_cast< int >(wxDEFAULT_FRAME_STYLE))); @@ -35022,10 +34958,6 @@ SWIGEXPORT void SWIG_init(void) { SWIG_Python_SetConstant(d, "FRAME_EX_METAL",SWIG_From_int(static_cast< int >(wxFRAME_EX_METAL))); SWIG_Python_SetConstant(d, "DIALOG_EX_METAL",SWIG_From_int(static_cast< int >(wxDIALOG_EX_METAL))); SWIG_Python_SetConstant(d, "WS_EX_CONTEXTHELP",SWIG_From_int(static_cast< int >(wxWS_EX_CONTEXTHELP))); - SWIG_Python_SetConstant(d, "DIALOG_MODAL",SWIG_From_int(static_cast< int >(wxDIALOG_MODAL))); - SWIG_Python_SetConstant(d, "DIALOG_MODELESS",SWIG_From_int(static_cast< int >(wxDIALOG_MODELESS))); - SWIG_Python_SetConstant(d, "USER_COLOURS",SWIG_From_int(static_cast< int >(wxUSER_COLOURS))); - SWIG_Python_SetConstant(d, "NO_3D",SWIG_From_int(static_cast< int >(wxNO_3D))); SWIG_Python_SetConstant(d, "FRAME_EX_CONTEXTHELP",SWIG_From_int(static_cast< int >(wxFRAME_EX_CONTEXTHELP))); SWIG_Python_SetConstant(d, "DIALOG_EX_CONTEXTHELP",SWIG_From_int(static_cast< int >(wxDIALOG_EX_CONTEXTHELP))); SWIG_Python_SetConstant(d, "FULLSCREEN_NOMENUBAR",SWIG_From_int(static_cast< int >(wxFULLSCREEN_NOMENUBAR))); @@ -35121,16 +35053,10 @@ SWIGEXPORT void SWIG_init(void) { SWIG_addvarlink(SWIG_globals(),(char*)"FileSelectorDefaultWildcardStr",FileSelectorDefaultWildcardStr_get, FileSelectorDefaultWildcardStr_set); SWIG_addvarlink(SWIG_globals(),(char*)"GetTextFromUserPromptStr",GetTextFromUserPromptStr_get, GetTextFromUserPromptStr_set); SWIG_addvarlink(SWIG_globals(),(char*)"MessageBoxCaptionStr",MessageBoxCaptionStr_get, MessageBoxCaptionStr_set); + SWIG_Python_SetConstant(d, "DD_CHANGE_DIR",SWIG_From_int(static_cast< int >(wxDD_CHANGE_DIR))); + SWIG_Python_SetConstant(d, "DD_DIR_MUST_EXIST",SWIG_From_int(static_cast< int >(wxDD_DIR_MUST_EXIST))); SWIG_Python_SetConstant(d, "DD_NEW_DIR_BUTTON",SWIG_From_int(static_cast< int >(wxDD_NEW_DIR_BUTTON))); SWIG_Python_SetConstant(d, "DD_DEFAULT_STYLE",SWIG_From_int(static_cast< int >(wxDD_DEFAULT_STYLE))); - SWIG_Python_SetConstant(d, "DD_CHANGE_DIR",SWIG_From_int(static_cast< int >(wxDD_CHANGE_DIR))); - SWIG_Python_SetConstant(d, "OPEN",SWIG_From_int(static_cast< int >(wxOPEN))); - SWIG_Python_SetConstant(d, "SAVE",SWIG_From_int(static_cast< int >(wxSAVE))); - SWIG_Python_SetConstant(d, "OVERWRITE_PROMPT",SWIG_From_int(static_cast< int >(wxOVERWRITE_PROMPT))); - SWIG_Python_SetConstant(d, "FILE_MUST_EXIST",SWIG_From_int(static_cast< int >(wxFILE_MUST_EXIST))); - SWIG_Python_SetConstant(d, "MULTIPLE",SWIG_From_int(static_cast< int >(wxMULTIPLE))); - SWIG_Python_SetConstant(d, "CHANGE_DIR",SWIG_From_int(static_cast< int >(wxCHANGE_DIR))); - SWIG_Python_SetConstant(d, "HIDE_READONLY",SWIG_From_int(static_cast< int >(wxHIDE_READONLY))); SWIG_Python_SetConstant(d, "FD_OPEN",SWIG_From_int(static_cast< int >(wxFD_OPEN))); SWIG_Python_SetConstant(d, "FD_SAVE",SWIG_From_int(static_cast< int >(wxFD_SAVE))); SWIG_Python_SetConstant(d, "FD_OVERWRITE_PROMPT",SWIG_From_int(static_cast< int >(wxFD_OVERWRITE_PROMPT))); diff --git a/wxPython/src/msw/aui.py b/wxPython/src/msw/aui.py index 6c0cacb656..13e292c270 100644 --- a/wxPython/src/msw/aui.py +++ b/wxPython/src/msw/aui.py @@ -1495,10 +1495,6 @@ class AuiMDIParentFrame(_windows.Frame): """GetArtProvider(self) -> AuiTabArt""" return _aui.AuiMDIParentFrame_GetArtProvider(*args, **kwargs) - def GetNotebook(*args, **kwargs): - """GetNotebook(self) -> AuiNotebook""" - return _aui.AuiMDIParentFrame_GetNotebook(*args, **kwargs) - def GetWindowMenu(*args, **kwargs): """GetWindowMenu(self) -> Menu""" return _aui.AuiMDIParentFrame_GetWindowMenu(*args, **kwargs) @@ -1515,18 +1511,10 @@ class AuiMDIParentFrame(_windows.Frame): """ProcessEvent(self, Event event) -> bool""" return _aui.AuiMDIParentFrame_ProcessEvent(*args, **kwargs) - def GetActiveChild(*args, **kwargs): - """GetActiveChild(self) -> AuiMDIChildFrame""" - return _aui.AuiMDIParentFrame_GetActiveChild(*args, **kwargs) - def SetActiveChild(*args, **kwargs): """SetActiveChild(self, AuiMDIChildFrame pChildFrame)""" return _aui.AuiMDIParentFrame_SetActiveChild(*args, **kwargs) - def GetClientWindow(*args, **kwargs): - """GetClientWindow(self) -> AuiMDIClientWindow""" - return _aui.AuiMDIParentFrame_GetClientWindow(*args, **kwargs) - def OnCreateClient(*args, **kwargs): """OnCreateClient(self) -> AuiMDIClientWindow""" return _aui.AuiMDIParentFrame_OnCreateClient(*args, **kwargs) @@ -1551,6 +1539,18 @@ class AuiMDIParentFrame(_windows.Frame): """ActivatePrevious(self)""" return _aui.AuiMDIParentFrame_ActivatePrevious(*args, **kwargs) + def GetNotebook(*args, **kwargs): + """GetNotebook(self) -> AuiNotebook""" + return _aui.AuiMDIParentFrame_GetNotebook(*args, **kwargs) + + def GetActiveChild(*args, **kwargs): + """GetActiveChild(self) -> AuiMDIChildFrame""" + return _aui.AuiMDIParentFrame_GetActiveChild(*args, **kwargs) + + def GetClientWindow(*args, **kwargs): + """GetClientWindow(self) -> AuiMDIClientWindow""" + return _aui.AuiMDIParentFrame_GetClientWindow(*args, **kwargs) + _aui.AuiMDIParentFrame_swigregister(AuiMDIParentFrame) def PreAuiMDIParentFrame(*args, **kwargs): @@ -1719,8 +1719,18 @@ class PyAuiDockArt(AuiDefaultDockArt): methods to the Python methods implemented in the derived class. """ thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') - def __init__(self): raise AttributeError, "No constructor defined" __repr__ = _swig_repr + def __init__(self, *args, **kwargs): + """ + __init__(self) -> PyAuiDockArt + + This version of the `AuiDockArt` class has been instrumented to be + subclassable in Python and to reflect all calls to the C++ base class + methods to the Python methods implemented in the derived class. + """ + _aui.PyAuiDockArt_swiginit(self,_aui.new_PyAuiDockArt(*args, **kwargs)) + PyAuiDockArt._setCallbackInfo(self, self, PyAuiDockArt) + _aui.PyAuiDockArt_swigregister(PyAuiDockArt) class PyAuiTabArt(AuiDefaultTabArt): diff --git a/wxPython/src/msw/aui_wrap.cpp b/wxPython/src/msw/aui_wrap.cpp index e45e57f673..27926af981 100644 --- a/wxPython/src/msw/aui_wrap.cpp +++ b/wxPython/src/msw/aui_wrap.cpp @@ -2926,6 +2926,15 @@ SWIG_From_size_t (size_t value) return SWIG_From_unsigned_SS_long (static_cast< unsigned long >(value)); } +SWIGINTERN wxAuiNotebook *wxAuiMDIParentFrame__GetNotebook(wxAuiMDIParentFrame const *self){ + return self->GetNotebook(); + } +SWIGINTERN wxAuiMDIChildFrame *wxAuiMDIParentFrame__GetActiveChild(wxAuiMDIParentFrame const *self){ + return self->GetActiveChild(); + } +SWIGINTERN wxAuiMDIClientWindow *wxAuiMDIParentFrame__GetClientWindow(wxAuiMDIParentFrame const *self){ + return self->GetClientWindow(); + } // A wxDocArt class that knows how to forward virtuals to Python methods class wxPyAuiDockArt : public wxAuiDefaultDockArt @@ -16363,34 +16372,6 @@ fail: } -SWIGINTERN PyObject *_wrap_AuiMDIParentFrame_GetNotebook(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - wxAuiMDIParentFrame *arg1 = (wxAuiMDIParentFrame *) 0 ; - wxAuiNotebook *result = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_wxAuiMDIParentFrame, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AuiMDIParentFrame_GetNotebook" "', expected argument " "1"" of type '" "wxAuiMDIParentFrame const *""'"); - } - arg1 = reinterpret_cast< wxAuiMDIParentFrame * >(argp1); - { - PyThreadState* __tstate = wxPyBeginAllowThreads(); - result = (wxAuiNotebook *)((wxAuiMDIParentFrame const *)arg1)->GetNotebook(); - wxPyEndAllowThreads(__tstate); - if (PyErr_Occurred()) SWIG_fail; - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_wxAuiNotebook, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - SWIGINTERN PyObject *_wrap_AuiMDIParentFrame_GetWindowMenu(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; wxAuiMDIParentFrame *arg1 = (wxAuiMDIParentFrame *) 0 ; @@ -16541,34 +16522,6 @@ fail: } -SWIGINTERN PyObject *_wrap_AuiMDIParentFrame_GetActiveChild(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - wxAuiMDIParentFrame *arg1 = (wxAuiMDIParentFrame *) 0 ; - wxAuiMDIChildFrame *result = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_wxAuiMDIParentFrame, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AuiMDIParentFrame_GetActiveChild" "', expected argument " "1"" of type '" "wxAuiMDIParentFrame const *""'"); - } - arg1 = reinterpret_cast< wxAuiMDIParentFrame * >(argp1); - { - PyThreadState* __tstate = wxPyBeginAllowThreads(); - result = (wxAuiMDIChildFrame *)((wxAuiMDIParentFrame const *)arg1)->GetActiveChild(); - wxPyEndAllowThreads(__tstate); - if (PyErr_Occurred()) SWIG_fail; - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_wxAuiMDIChildFrame, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - SWIGINTERN PyObject *_wrap_AuiMDIParentFrame_SetActiveChild(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { PyObject *resultobj = 0; wxAuiMDIParentFrame *arg1 = (wxAuiMDIParentFrame *) 0 ; @@ -16607,34 +16560,6 @@ fail: } -SWIGINTERN PyObject *_wrap_AuiMDIParentFrame_GetClientWindow(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - wxAuiMDIParentFrame *arg1 = (wxAuiMDIParentFrame *) 0 ; - wxAuiMDIClientWindow *result = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_wxAuiMDIParentFrame, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AuiMDIParentFrame_GetClientWindow" "', expected argument " "1"" of type '" "wxAuiMDIParentFrame const *""'"); - } - arg1 = reinterpret_cast< wxAuiMDIParentFrame * >(argp1); - { - PyThreadState* __tstate = wxPyBeginAllowThreads(); - result = (wxAuiMDIClientWindow *)((wxAuiMDIParentFrame const *)arg1)->GetClientWindow(); - wxPyEndAllowThreads(__tstate); - if (PyErr_Occurred()) SWIG_fail; - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_wxAuiMDIClientWindow, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - SWIGINTERN PyObject *_wrap_AuiMDIParentFrame_OnCreateClient(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; wxAuiMDIParentFrame *arg1 = (wxAuiMDIParentFrame *) 0 ; @@ -16811,6 +16736,96 @@ fail: } +SWIGINTERN PyObject *_wrap_AuiMDIParentFrame_GetNotebook(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + wxAuiMDIParentFrame *arg1 = (wxAuiMDIParentFrame *) 0 ; + wxAuiNotebook *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_wxAuiMDIParentFrame, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AuiMDIParentFrame_GetNotebook" "', expected argument " "1"" of type '" "wxAuiMDIParentFrame const *""'"); + } + arg1 = reinterpret_cast< wxAuiMDIParentFrame * >(argp1); + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + result = (wxAuiNotebook *)wxAuiMDIParentFrame__GetNotebook((wxAuiMDIParentFrame const *)arg1); + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + { + resultobj = wxPyMake_wxObject(result, 0); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_AuiMDIParentFrame_GetActiveChild(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + wxAuiMDIParentFrame *arg1 = (wxAuiMDIParentFrame *) 0 ; + wxAuiMDIChildFrame *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_wxAuiMDIParentFrame, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AuiMDIParentFrame_GetActiveChild" "', expected argument " "1"" of type '" "wxAuiMDIParentFrame const *""'"); + } + arg1 = reinterpret_cast< wxAuiMDIParentFrame * >(argp1); + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + result = (wxAuiMDIChildFrame *)wxAuiMDIParentFrame__GetActiveChild((wxAuiMDIParentFrame const *)arg1); + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + { + resultobj = wxPyMake_wxObject(result, 0); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_AuiMDIParentFrame_GetClientWindow(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + wxAuiMDIParentFrame *arg1 = (wxAuiMDIParentFrame *) 0 ; + wxAuiMDIClientWindow *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_wxAuiMDIParentFrame, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AuiMDIParentFrame_GetClientWindow" "', expected argument " "1"" of type '" "wxAuiMDIParentFrame const *""'"); + } + arg1 = reinterpret_cast< wxAuiMDIParentFrame * >(argp1); + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + result = (wxAuiMDIClientWindow *)wxAuiMDIParentFrame__GetClientWindow((wxAuiMDIParentFrame const *)arg1); + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + { + resultobj = wxPyMake_wxObject(result, 0); + } + return resultobj; +fail: + return NULL; +} + + SWIGINTERN PyObject *AuiMDIParentFrame_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; if (!SWIG_Python_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return NULL; @@ -18146,6 +18161,24 @@ SWIGINTERN PyObject *AuiMDIClientWindow_swiginit(PyObject *SWIGUNUSEDPARM(self), return SWIG_Python_InitShadowInstance(args); } +SWIGINTERN PyObject *_wrap_new_PyAuiDockArt(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + wxPyAuiDockArt *result = 0 ; + + if (!SWIG_Python_UnpackTuple(args,"new_PyAuiDockArt",0,0,0)) SWIG_fail; + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + result = (wxPyAuiDockArt *)new wxPyAuiDockArt(); + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_wxPyAuiDockArt, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + SWIGINTERN PyObject *PyAuiDockArt_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; if (!SWIG_Python_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return NULL; @@ -18153,6 +18186,10 @@ SWIGINTERN PyObject *PyAuiDockArt_swigregister(PyObject *SWIGUNUSEDPARM(self), P return SWIG_Py_Void(); } +SWIGINTERN PyObject *PyAuiDockArt_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} + SWIGINTERN PyObject *_wrap_new_PyAuiTabArt(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; wxPyAuiTabArt *result = 0 ; @@ -18563,20 +18600,20 @@ static PyMethodDef SwigMethods[] = { { (char *)"AuiMDIParentFrame_Create", (PyCFunction) _wrap_AuiMDIParentFrame_Create, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"AuiMDIParentFrame_SetArtProvider", (PyCFunction) _wrap_AuiMDIParentFrame_SetArtProvider, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"AuiMDIParentFrame_GetArtProvider", (PyCFunction)_wrap_AuiMDIParentFrame_GetArtProvider, METH_O, NULL}, - { (char *)"AuiMDIParentFrame_GetNotebook", (PyCFunction)_wrap_AuiMDIParentFrame_GetNotebook, METH_O, NULL}, { (char *)"AuiMDIParentFrame_GetWindowMenu", (PyCFunction)_wrap_AuiMDIParentFrame_GetWindowMenu, METH_O, NULL}, { (char *)"AuiMDIParentFrame_SetWindowMenu", (PyCFunction) _wrap_AuiMDIParentFrame_SetWindowMenu, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"AuiMDIParentFrame_SetChildMenuBar", (PyCFunction) _wrap_AuiMDIParentFrame_SetChildMenuBar, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"AuiMDIParentFrame_ProcessEvent", (PyCFunction) _wrap_AuiMDIParentFrame_ProcessEvent, METH_VARARGS | METH_KEYWORDS, NULL}, - { (char *)"AuiMDIParentFrame_GetActiveChild", (PyCFunction)_wrap_AuiMDIParentFrame_GetActiveChild, METH_O, NULL}, { (char *)"AuiMDIParentFrame_SetActiveChild", (PyCFunction) _wrap_AuiMDIParentFrame_SetActiveChild, METH_VARARGS | METH_KEYWORDS, NULL}, - { (char *)"AuiMDIParentFrame_GetClientWindow", (PyCFunction)_wrap_AuiMDIParentFrame_GetClientWindow, METH_O, NULL}, { (char *)"AuiMDIParentFrame_OnCreateClient", (PyCFunction)_wrap_AuiMDIParentFrame_OnCreateClient, METH_O, NULL}, { (char *)"AuiMDIParentFrame_Cascade", (PyCFunction)_wrap_AuiMDIParentFrame_Cascade, METH_O, NULL}, { (char *)"AuiMDIParentFrame_Tile", (PyCFunction) _wrap_AuiMDIParentFrame_Tile, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"AuiMDIParentFrame_ArrangeIcons", (PyCFunction)_wrap_AuiMDIParentFrame_ArrangeIcons, METH_O, NULL}, { (char *)"AuiMDIParentFrame_ActivateNext", (PyCFunction)_wrap_AuiMDIParentFrame_ActivateNext, METH_O, NULL}, { (char *)"AuiMDIParentFrame_ActivatePrevious", (PyCFunction)_wrap_AuiMDIParentFrame_ActivatePrevious, METH_O, NULL}, + { (char *)"AuiMDIParentFrame_GetNotebook", (PyCFunction)_wrap_AuiMDIParentFrame_GetNotebook, METH_O, NULL}, + { (char *)"AuiMDIParentFrame_GetActiveChild", (PyCFunction)_wrap_AuiMDIParentFrame_GetActiveChild, METH_O, NULL}, + { (char *)"AuiMDIParentFrame_GetClientWindow", (PyCFunction)_wrap_AuiMDIParentFrame_GetClientWindow, METH_O, NULL}, { (char *)"AuiMDIParentFrame_swigregister", AuiMDIParentFrame_swigregister, METH_VARARGS, NULL}, { (char *)"AuiMDIParentFrame_swiginit", AuiMDIParentFrame_swiginit, METH_VARARGS, NULL}, { (char *)"new_PreAuiMDIChildFrame", (PyCFunction)_wrap_new_PreAuiMDIChildFrame, METH_NOARGS, NULL}, @@ -18614,7 +18651,9 @@ static PyMethodDef SwigMethods[] = { { (char *)"AuiMDIClientWindow_SetSelection", (PyCFunction) _wrap_AuiMDIClientWindow_SetSelection, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"AuiMDIClientWindow_swigregister", AuiMDIClientWindow_swigregister, METH_VARARGS, NULL}, { (char *)"AuiMDIClientWindow_swiginit", AuiMDIClientWindow_swiginit, METH_VARARGS, NULL}, + { (char *)"new_PyAuiDockArt", (PyCFunction)_wrap_new_PyAuiDockArt, METH_NOARGS, NULL}, { (char *)"PyAuiDockArt_swigregister", PyAuiDockArt_swigregister, METH_VARARGS, NULL}, + { (char *)"PyAuiDockArt_swiginit", PyAuiDockArt_swiginit, METH_VARARGS, NULL}, { (char *)"new_PyAuiTabArt", (PyCFunction)_wrap_new_PyAuiTabArt, METH_NOARGS, NULL}, { (char *)"PyAuiTabArt_swigregister", PyAuiTabArt_swigregister, METH_VARARGS, NULL}, { (char *)"PyAuiTabArt_swiginit", PyAuiTabArt_swiginit, METH_VARARGS, NULL}, diff --git a/wxPython/src/msw/combo.py b/wxPython/src/msw/combo.py index c9ed717e85..17854ae6d5 100644 --- a/wxPython/src/msw/combo.py +++ b/wxPython/src/msw/combo.py @@ -65,6 +65,9 @@ __docfilter__ = wx.__DocFilter(globals()) CC_BUTTON_OUTSIDE_BORDER = _combo.CC_BUTTON_OUTSIDE_BORDER CC_POPUP_ON_MOUSE_UP = _combo.CC_POPUP_ON_MOUSE_UP CC_NO_TEXT_AUTO_SELECT = _combo.CC_NO_TEXT_AUTO_SELECT +CC_BUTTON_STAYS_DOWN = _combo.CC_BUTTON_STAYS_DOWN +CC_FULL_BUTTON = _combo.CC_FULL_BUTTON +CC_BUTTON_COVERS_BORDER = _combo.CC_BUTTON_COVERS_BORDER CC_MF_ON_BUTTON = _combo.CC_MF_ON_BUTTON CC_MF_ON_CLICK_AREA = _combo.CC_MF_ON_CLICK_AREA class ComboCtrlFeatures(object): diff --git a/wxPython/src/msw/combo_wrap.cpp b/wxPython/src/msw/combo_wrap.cpp index a3a110403a..acf80f4a2b 100644 --- a/wxPython/src/msw/combo_wrap.cpp +++ b/wxPython/src/msw/combo_wrap.cpp @@ -9335,6 +9335,9 @@ SWIGEXPORT void SWIG_init(void) { SWIG_Python_SetConstant(d, "CC_BUTTON_OUTSIDE_BORDER",SWIG_From_int(static_cast< int >(wxCC_BUTTON_OUTSIDE_BORDER))); SWIG_Python_SetConstant(d, "CC_POPUP_ON_MOUSE_UP",SWIG_From_int(static_cast< int >(wxCC_POPUP_ON_MOUSE_UP))); SWIG_Python_SetConstant(d, "CC_NO_TEXT_AUTO_SELECT",SWIG_From_int(static_cast< int >(wxCC_NO_TEXT_AUTO_SELECT))); + SWIG_Python_SetConstant(d, "CC_BUTTON_STAYS_DOWN",SWIG_From_int(static_cast< int >(wxCC_BUTTON_STAYS_DOWN))); + SWIG_Python_SetConstant(d, "CC_FULL_BUTTON",SWIG_From_int(static_cast< int >(wxCC_FULL_BUTTON))); + SWIG_Python_SetConstant(d, "CC_BUTTON_COVERS_BORDER",SWIG_From_int(static_cast< int >(wxCC_BUTTON_COVERS_BORDER))); SWIG_Python_SetConstant(d, "CC_MF_ON_BUTTON",SWIG_From_int(static_cast< int >(wxCC_MF_ON_BUTTON))); SWIG_Python_SetConstant(d, "CC_MF_ON_CLICK_AREA",SWIG_From_int(static_cast< int >(wxCC_MF_ON_CLICK_AREA))); SWIG_Python_SetConstant(d, "ComboCtrlFeatures_MovableButton",SWIG_From_int(static_cast< int >(wxComboCtrlFeatures::MovableButton))); diff --git a/wxPython/src/msw/grid.py b/wxPython/src/msw/grid.py index 2c4c942c79..1e70f0dedd 100644 --- a/wxPython/src/msw/grid.py +++ b/wxPython/src/msw/grid.py @@ -68,6 +68,9 @@ GRID_VALUE_TEXT = _grid.GRID_VALUE_TEXT GRID_VALUE_LONG = _grid.GRID_VALUE_LONG GRID_VALUE_CHOICEINT = _grid.GRID_VALUE_CHOICEINT GRID_VALUE_DATETIME = _grid.GRID_VALUE_DATETIME +GRID_AUTOSIZE = _grid.GRID_AUTOSIZE +GRID_COLUMN = _grid.GRID_COLUMN +GRID_ROW = _grid.GRID_ROW GRID_DEFAULT_NUMBER_ROWS = _grid.GRID_DEFAULT_NUMBER_ROWS GRID_DEFAULT_NUMBER_COLS = _grid.GRID_DEFAULT_NUMBER_COLS GRID_DEFAULT_ROW_HEIGHT = _grid.GRID_DEFAULT_ROW_HEIGHT @@ -2094,6 +2097,21 @@ def Grid_GetClassDefaultAttributes(*args, **kwargs): """ return _grid.Grid_GetClassDefaultAttributes(*args, **kwargs) +class GridUpdateLocker(object): + """Proxy of C++ GridUpdateLocker class""" + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + __repr__ = _swig_repr + def __init__(self, *args, **kwargs): + """__init__(self, Grid grid=None) -> GridUpdateLocker""" + _grid.GridUpdateLocker_swiginit(self,_grid.new_GridUpdateLocker(*args, **kwargs)) + __swig_destroy__ = _grid.delete_GridUpdateLocker + __del__ = lambda self : None; + def Create(*args, **kwargs): + """Create(self, Grid grid)""" + return _grid.GridUpdateLocker_Create(*args, **kwargs) + +_grid.GridUpdateLocker_swigregister(GridUpdateLocker) + class GridEvent(_core.NotifyEvent): """Proxy of C++ GridEvent class""" thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') diff --git a/wxPython/src/msw/grid_wrap.cpp b/wxPython/src/msw/grid_wrap.cpp index fda9acf726..0264e7eb24 100644 --- a/wxPython/src/msw/grid_wrap.cpp +++ b/wxPython/src/msw/grid_wrap.cpp @@ -2543,122 +2543,123 @@ SWIG_Python_MustGetPtr(PyObject *obj, swig_type_info *ty, int argnum, int flags) #define SWIGTYPE_p_wxGridStringTable swig_types[77] #define SWIGTYPE_p_wxGridTableBase swig_types[78] #define SWIGTYPE_p_wxGridTableMessage swig_types[79] -#define SWIGTYPE_p_wxICOHandler swig_types[80] -#define SWIGTYPE_p_wxIconizeEvent swig_types[81] -#define SWIGTYPE_p_wxIdleEvent swig_types[82] -#define SWIGTYPE_p_wxImage swig_types[83] -#define SWIGTYPE_p_wxImageHandler swig_types[84] -#define SWIGTYPE_p_wxIndividualLayoutConstraint swig_types[85] -#define SWIGTYPE_p_wxInitDialogEvent swig_types[86] -#define SWIGTYPE_p_wxJPEGHandler swig_types[87] -#define SWIGTYPE_p_wxKeyEvent swig_types[88] -#define SWIGTYPE_p_wxLayoutAlgorithm swig_types[89] -#define SWIGTYPE_p_wxLayoutConstraints swig_types[90] -#define SWIGTYPE_p_wxMDIChildFrame swig_types[91] -#define SWIGTYPE_p_wxMDIClientWindow swig_types[92] -#define SWIGTYPE_p_wxMDIParentFrame swig_types[93] -#define SWIGTYPE_p_wxMaximizeEvent swig_types[94] -#define SWIGTYPE_p_wxMenu swig_types[95] -#define SWIGTYPE_p_wxMenuBar swig_types[96] -#define SWIGTYPE_p_wxMenuEvent swig_types[97] -#define SWIGTYPE_p_wxMenuItem swig_types[98] -#define SWIGTYPE_p_wxMessageDialog swig_types[99] -#define SWIGTYPE_p_wxMiniFrame swig_types[100] -#define SWIGTYPE_p_wxMouseCaptureChangedEvent swig_types[101] -#define SWIGTYPE_p_wxMouseCaptureLostEvent swig_types[102] -#define SWIGTYPE_p_wxMouseEvent swig_types[103] -#define SWIGTYPE_p_wxMoveEvent swig_types[104] -#define SWIGTYPE_p_wxMultiChoiceDialog swig_types[105] -#define SWIGTYPE_p_wxNavigationKeyEvent swig_types[106] -#define SWIGTYPE_p_wxNcPaintEvent swig_types[107] -#define SWIGTYPE_p_wxNotifyEvent swig_types[108] -#define SWIGTYPE_p_wxNumberEntryDialog swig_types[109] -#define SWIGTYPE_p_wxObject swig_types[110] -#define SWIGTYPE_p_wxPCXHandler swig_types[111] -#define SWIGTYPE_p_wxPNGHandler swig_types[112] -#define SWIGTYPE_p_wxPNMHandler swig_types[113] -#define SWIGTYPE_p_wxPageSetupDialog swig_types[114] -#define SWIGTYPE_p_wxPageSetupDialogData swig_types[115] -#define SWIGTYPE_p_wxPaintEvent swig_types[116] -#define SWIGTYPE_p_wxPaletteChangedEvent swig_types[117] -#define SWIGTYPE_p_wxPanel swig_types[118] -#define SWIGTYPE_p_wxPaperSize swig_types[119] -#define SWIGTYPE_p_wxPasswordEntryDialog swig_types[120] -#define SWIGTYPE_p_wxPen swig_types[121] -#define SWIGTYPE_p_wxPoint swig_types[122] -#define SWIGTYPE_p_wxPopupWindow swig_types[123] -#define SWIGTYPE_p_wxPreviewCanvas swig_types[124] -#define SWIGTYPE_p_wxPreviewControlBar swig_types[125] -#define SWIGTYPE_p_wxPreviewFrame swig_types[126] -#define SWIGTYPE_p_wxPrintData swig_types[127] -#define SWIGTYPE_p_wxPrintDialog swig_types[128] -#define SWIGTYPE_p_wxPrintDialogData swig_types[129] -#define SWIGTYPE_p_wxPrintPreview swig_types[130] -#define SWIGTYPE_p_wxPrinter swig_types[131] -#define SWIGTYPE_p_wxProgressDialog swig_types[132] -#define SWIGTYPE_p_wxPyApp swig_types[133] -#define SWIGTYPE_p_wxPyCommandEvent swig_types[134] -#define SWIGTYPE_p_wxPyEvent swig_types[135] -#define SWIGTYPE_p_wxPyGridCellAttrProvider swig_types[136] -#define SWIGTYPE_p_wxPyGridCellEditor swig_types[137] -#define SWIGTYPE_p_wxPyGridCellRenderer swig_types[138] -#define SWIGTYPE_p_wxPyGridTableBase swig_types[139] -#define SWIGTYPE_p_wxPyHtmlListBox swig_types[140] -#define SWIGTYPE_p_wxPyImageHandler swig_types[141] -#define SWIGTYPE_p_wxPyPanel swig_types[142] -#define SWIGTYPE_p_wxPyPopupTransientWindow swig_types[143] -#define SWIGTYPE_p_wxPyPreviewControlBar swig_types[144] -#define SWIGTYPE_p_wxPyPreviewFrame swig_types[145] -#define SWIGTYPE_p_wxPyPrintPreview swig_types[146] -#define SWIGTYPE_p_wxPyPrintout swig_types[147] -#define SWIGTYPE_p_wxPyScrolledWindow swig_types[148] -#define SWIGTYPE_p_wxPySizer swig_types[149] -#define SWIGTYPE_p_wxPyTaskBarIcon swig_types[150] -#define SWIGTYPE_p_wxPyVListBox swig_types[151] -#define SWIGTYPE_p_wxPyVScrolledWindow swig_types[152] -#define SWIGTYPE_p_wxPyValidator swig_types[153] -#define SWIGTYPE_p_wxPyWindow swig_types[154] -#define SWIGTYPE_p_wxQueryLayoutInfoEvent swig_types[155] -#define SWIGTYPE_p_wxQueryNewPaletteEvent swig_types[156] -#define SWIGTYPE_p_wxRect swig_types[157] -#define SWIGTYPE_p_wxSashEvent swig_types[158] -#define SWIGTYPE_p_wxSashLayoutWindow swig_types[159] -#define SWIGTYPE_p_wxSashWindow swig_types[160] -#define SWIGTYPE_p_wxScrollEvent swig_types[161] -#define SWIGTYPE_p_wxScrollWinEvent swig_types[162] -#define SWIGTYPE_p_wxScrolledWindow swig_types[163] -#define SWIGTYPE_p_wxSetCursorEvent swig_types[164] -#define SWIGTYPE_p_wxShowEvent swig_types[165] -#define SWIGTYPE_p_wxSimpleHtmlListBox swig_types[166] -#define SWIGTYPE_p_wxSingleChoiceDialog swig_types[167] -#define SWIGTYPE_p_wxSize swig_types[168] -#define SWIGTYPE_p_wxSizeEvent swig_types[169] -#define SWIGTYPE_p_wxSizer swig_types[170] -#define SWIGTYPE_p_wxSizerItem swig_types[171] -#define SWIGTYPE_p_wxSplashScreen swig_types[172] -#define SWIGTYPE_p_wxSplashScreenWindow swig_types[173] -#define SWIGTYPE_p_wxSplitterEvent swig_types[174] -#define SWIGTYPE_p_wxSplitterWindow swig_types[175] -#define SWIGTYPE_p_wxStaticBoxSizer swig_types[176] -#define SWIGTYPE_p_wxStatusBar swig_types[177] -#define SWIGTYPE_p_wxStdDialogButtonSizer swig_types[178] -#define SWIGTYPE_p_wxString swig_types[179] -#define SWIGTYPE_p_wxSysColourChangedEvent swig_types[180] -#define SWIGTYPE_p_wxTGAHandler swig_types[181] -#define SWIGTYPE_p_wxTIFFHandler swig_types[182] -#define SWIGTYPE_p_wxTaskBarIconEvent swig_types[183] -#define SWIGTYPE_p_wxTextEntryDialog swig_types[184] -#define SWIGTYPE_p_wxTipWindow swig_types[185] -#define SWIGTYPE_p_wxTopLevelWindow swig_types[186] -#define SWIGTYPE_p_wxUpdateUIEvent swig_types[187] -#define SWIGTYPE_p_wxValidator swig_types[188] -#define SWIGTYPE_p_wxVisualAttributes swig_types[189] -#define SWIGTYPE_p_wxWindow swig_types[190] -#define SWIGTYPE_p_wxWindowCreateEvent swig_types[191] -#define SWIGTYPE_p_wxWindowDestroyEvent swig_types[192] -#define SWIGTYPE_p_wxXPMHandler swig_types[193] -static swig_type_info *swig_types[195]; -static swig_module_info swig_module = {swig_types, 194, 0, 0, 0, 0}; +#define SWIGTYPE_p_wxGridUpdateLocker swig_types[80] +#define SWIGTYPE_p_wxICOHandler swig_types[81] +#define SWIGTYPE_p_wxIconizeEvent swig_types[82] +#define SWIGTYPE_p_wxIdleEvent swig_types[83] +#define SWIGTYPE_p_wxImage swig_types[84] +#define SWIGTYPE_p_wxImageHandler swig_types[85] +#define SWIGTYPE_p_wxIndividualLayoutConstraint swig_types[86] +#define SWIGTYPE_p_wxInitDialogEvent swig_types[87] +#define SWIGTYPE_p_wxJPEGHandler swig_types[88] +#define SWIGTYPE_p_wxKeyEvent swig_types[89] +#define SWIGTYPE_p_wxLayoutAlgorithm swig_types[90] +#define SWIGTYPE_p_wxLayoutConstraints swig_types[91] +#define SWIGTYPE_p_wxMDIChildFrame swig_types[92] +#define SWIGTYPE_p_wxMDIClientWindow swig_types[93] +#define SWIGTYPE_p_wxMDIParentFrame swig_types[94] +#define SWIGTYPE_p_wxMaximizeEvent swig_types[95] +#define SWIGTYPE_p_wxMenu swig_types[96] +#define SWIGTYPE_p_wxMenuBar swig_types[97] +#define SWIGTYPE_p_wxMenuEvent swig_types[98] +#define SWIGTYPE_p_wxMenuItem swig_types[99] +#define SWIGTYPE_p_wxMessageDialog swig_types[100] +#define SWIGTYPE_p_wxMiniFrame swig_types[101] +#define SWIGTYPE_p_wxMouseCaptureChangedEvent swig_types[102] +#define SWIGTYPE_p_wxMouseCaptureLostEvent swig_types[103] +#define SWIGTYPE_p_wxMouseEvent swig_types[104] +#define SWIGTYPE_p_wxMoveEvent swig_types[105] +#define SWIGTYPE_p_wxMultiChoiceDialog swig_types[106] +#define SWIGTYPE_p_wxNavigationKeyEvent swig_types[107] +#define SWIGTYPE_p_wxNcPaintEvent swig_types[108] +#define SWIGTYPE_p_wxNotifyEvent swig_types[109] +#define SWIGTYPE_p_wxNumberEntryDialog swig_types[110] +#define SWIGTYPE_p_wxObject swig_types[111] +#define SWIGTYPE_p_wxPCXHandler swig_types[112] +#define SWIGTYPE_p_wxPNGHandler swig_types[113] +#define SWIGTYPE_p_wxPNMHandler swig_types[114] +#define SWIGTYPE_p_wxPageSetupDialog swig_types[115] +#define SWIGTYPE_p_wxPageSetupDialogData swig_types[116] +#define SWIGTYPE_p_wxPaintEvent swig_types[117] +#define SWIGTYPE_p_wxPaletteChangedEvent swig_types[118] +#define SWIGTYPE_p_wxPanel swig_types[119] +#define SWIGTYPE_p_wxPaperSize swig_types[120] +#define SWIGTYPE_p_wxPasswordEntryDialog swig_types[121] +#define SWIGTYPE_p_wxPen swig_types[122] +#define SWIGTYPE_p_wxPoint swig_types[123] +#define SWIGTYPE_p_wxPopupWindow swig_types[124] +#define SWIGTYPE_p_wxPreviewCanvas swig_types[125] +#define SWIGTYPE_p_wxPreviewControlBar swig_types[126] +#define SWIGTYPE_p_wxPreviewFrame swig_types[127] +#define SWIGTYPE_p_wxPrintData swig_types[128] +#define SWIGTYPE_p_wxPrintDialog swig_types[129] +#define SWIGTYPE_p_wxPrintDialogData swig_types[130] +#define SWIGTYPE_p_wxPrintPreview swig_types[131] +#define SWIGTYPE_p_wxPrinter swig_types[132] +#define SWIGTYPE_p_wxProgressDialog swig_types[133] +#define SWIGTYPE_p_wxPyApp swig_types[134] +#define SWIGTYPE_p_wxPyCommandEvent swig_types[135] +#define SWIGTYPE_p_wxPyEvent swig_types[136] +#define SWIGTYPE_p_wxPyGridCellAttrProvider swig_types[137] +#define SWIGTYPE_p_wxPyGridCellEditor swig_types[138] +#define SWIGTYPE_p_wxPyGridCellRenderer swig_types[139] +#define SWIGTYPE_p_wxPyGridTableBase swig_types[140] +#define SWIGTYPE_p_wxPyHtmlListBox swig_types[141] +#define SWIGTYPE_p_wxPyImageHandler swig_types[142] +#define SWIGTYPE_p_wxPyPanel swig_types[143] +#define SWIGTYPE_p_wxPyPopupTransientWindow swig_types[144] +#define SWIGTYPE_p_wxPyPreviewControlBar swig_types[145] +#define SWIGTYPE_p_wxPyPreviewFrame swig_types[146] +#define SWIGTYPE_p_wxPyPrintPreview swig_types[147] +#define SWIGTYPE_p_wxPyPrintout swig_types[148] +#define SWIGTYPE_p_wxPyScrolledWindow swig_types[149] +#define SWIGTYPE_p_wxPySizer swig_types[150] +#define SWIGTYPE_p_wxPyTaskBarIcon swig_types[151] +#define SWIGTYPE_p_wxPyVListBox swig_types[152] +#define SWIGTYPE_p_wxPyVScrolledWindow swig_types[153] +#define SWIGTYPE_p_wxPyValidator swig_types[154] +#define SWIGTYPE_p_wxPyWindow swig_types[155] +#define SWIGTYPE_p_wxQueryLayoutInfoEvent swig_types[156] +#define SWIGTYPE_p_wxQueryNewPaletteEvent swig_types[157] +#define SWIGTYPE_p_wxRect swig_types[158] +#define SWIGTYPE_p_wxSashEvent swig_types[159] +#define SWIGTYPE_p_wxSashLayoutWindow swig_types[160] +#define SWIGTYPE_p_wxSashWindow swig_types[161] +#define SWIGTYPE_p_wxScrollEvent swig_types[162] +#define SWIGTYPE_p_wxScrollWinEvent swig_types[163] +#define SWIGTYPE_p_wxScrolledWindow swig_types[164] +#define SWIGTYPE_p_wxSetCursorEvent swig_types[165] +#define SWIGTYPE_p_wxShowEvent swig_types[166] +#define SWIGTYPE_p_wxSimpleHtmlListBox swig_types[167] +#define SWIGTYPE_p_wxSingleChoiceDialog swig_types[168] +#define SWIGTYPE_p_wxSize swig_types[169] +#define SWIGTYPE_p_wxSizeEvent swig_types[170] +#define SWIGTYPE_p_wxSizer swig_types[171] +#define SWIGTYPE_p_wxSizerItem swig_types[172] +#define SWIGTYPE_p_wxSplashScreen swig_types[173] +#define SWIGTYPE_p_wxSplashScreenWindow swig_types[174] +#define SWIGTYPE_p_wxSplitterEvent swig_types[175] +#define SWIGTYPE_p_wxSplitterWindow swig_types[176] +#define SWIGTYPE_p_wxStaticBoxSizer swig_types[177] +#define SWIGTYPE_p_wxStatusBar swig_types[178] +#define SWIGTYPE_p_wxStdDialogButtonSizer swig_types[179] +#define SWIGTYPE_p_wxString swig_types[180] +#define SWIGTYPE_p_wxSysColourChangedEvent swig_types[181] +#define SWIGTYPE_p_wxTGAHandler swig_types[182] +#define SWIGTYPE_p_wxTIFFHandler swig_types[183] +#define SWIGTYPE_p_wxTaskBarIconEvent swig_types[184] +#define SWIGTYPE_p_wxTextEntryDialog swig_types[185] +#define SWIGTYPE_p_wxTipWindow swig_types[186] +#define SWIGTYPE_p_wxTopLevelWindow swig_types[187] +#define SWIGTYPE_p_wxUpdateUIEvent swig_types[188] +#define SWIGTYPE_p_wxValidator swig_types[189] +#define SWIGTYPE_p_wxVisualAttributes swig_types[190] +#define SWIGTYPE_p_wxWindow swig_types[191] +#define SWIGTYPE_p_wxWindowCreateEvent swig_types[192] +#define SWIGTYPE_p_wxWindowDestroyEvent swig_types[193] +#define SWIGTYPE_p_wxXPMHandler swig_types[194] +static swig_type_info *swig_types[196]; +static swig_module_info swig_module = {swig_types, 195, 0, 0, 0, 0}; #define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name) #define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name) @@ -3186,6 +3187,16 @@ SWIG_FromCharPtr(const char *cptr) } + #define SWIG_From_long PyInt_FromLong + + +SWIGINTERNINLINE PyObject * +SWIG_From_int (int value) +{ + return SWIG_From_long (value); +} + + #define wxGRID_DEFAULT_NUMBER_ROWS WXGRID_DEFAULT_NUMBER_ROWS #define wxGRID_DEFAULT_NUMBER_COLS WXGRID_DEFAULT_NUMBER_COLS #define wxGRID_DEFAULT_ROW_HEIGHT WXGRID_DEFAULT_ROW_HEIGHT @@ -3197,16 +3208,6 @@ SWIG_FromCharPtr(const char *cptr) #define wxGRID_MIN_COL_WIDTH WXGRID_MIN_COL_WIDTH #define wxGRID_DEFAULT_SCROLLBAR_WIDTH WXGRID_DEFAULT_SCROLLBAR_WIDTH - - #define SWIG_From_long PyInt_FromLong - - -SWIGINTERNINLINE PyObject * -SWIG_From_int (int value) -{ - return SWIG_From_long (value); -} - SWIGINTERN void wxGridCellWorker__setOORInfo(wxGridCellWorker *self,PyObject *_self){ if (!self->GetClientObject()) self->SetClientObject(new wxPyOORClientData(_self)); @@ -19096,6 +19097,115 @@ SWIGINTERN PyObject *Grid_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *arg return SWIG_Python_InitShadowInstance(args); } +SWIGINTERN PyObject *_wrap_new_GridUpdateLocker(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + wxGrid *arg1 = (wxGrid *) NULL ; + wxGridUpdateLocker *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + char * kwnames[] = { + (char *) "grid", NULL + }; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"|O:new_GridUpdateLocker",kwnames,&obj0)) SWIG_fail; + if (obj0) { + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_wxGrid, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_GridUpdateLocker" "', expected argument " "1"" of type '" "wxGrid *""'"); + } + arg1 = reinterpret_cast< wxGrid * >(argp1); + } + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + result = (wxGridUpdateLocker *)new wxGridUpdateLocker(arg1); + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_wxGridUpdateLocker, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_GridUpdateLocker(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + wxGridUpdateLocker *arg1 = (wxGridUpdateLocker *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_wxGridUpdateLocker, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_GridUpdateLocker" "', expected argument " "1"" of type '" "wxGridUpdateLocker *""'"); + } + arg1 = reinterpret_cast< wxGridUpdateLocker * >(argp1); + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + delete arg1; + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_GridUpdateLocker_Create(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + wxGridUpdateLocker *arg1 = (wxGridUpdateLocker *) 0 ; + wxGrid *arg2 = (wxGrid *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "grid", NULL + }; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:GridUpdateLocker_Create",kwnames,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_wxGridUpdateLocker, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GridUpdateLocker_Create" "', expected argument " "1"" of type '" "wxGridUpdateLocker *""'"); + } + arg1 = reinterpret_cast< wxGridUpdateLocker * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_wxGrid, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GridUpdateLocker_Create" "', expected argument " "2"" of type '" "wxGrid *""'"); + } + arg2 = reinterpret_cast< wxGrid * >(argp2); + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + (arg1)->Create(arg2); + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *GridUpdateLocker_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_wxGridUpdateLocker, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *GridUpdateLocker_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} + SWIGINTERN PyObject *_wrap_new_GridEvent(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { PyObject *resultobj = 0; int arg1 ; @@ -21048,6 +21158,11 @@ static PyMethodDef SwigMethods[] = { { (char *)"Grid_GetClassDefaultAttributes", (PyCFunction) _wrap_Grid_GetClassDefaultAttributes, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"Grid_swigregister", Grid_swigregister, METH_VARARGS, NULL}, { (char *)"Grid_swiginit", Grid_swiginit, METH_VARARGS, NULL}, + { (char *)"new_GridUpdateLocker", (PyCFunction) _wrap_new_GridUpdateLocker, METH_VARARGS | METH_KEYWORDS, NULL}, + { (char *)"delete_GridUpdateLocker", (PyCFunction)_wrap_delete_GridUpdateLocker, METH_O, NULL}, + { (char *)"GridUpdateLocker_Create", (PyCFunction) _wrap_GridUpdateLocker_Create, METH_VARARGS | METH_KEYWORDS, NULL}, + { (char *)"GridUpdateLocker_swigregister", GridUpdateLocker_swigregister, METH_VARARGS, NULL}, + { (char *)"GridUpdateLocker_swiginit", GridUpdateLocker_swiginit, METH_VARARGS, NULL}, { (char *)"new_GridEvent", (PyCFunction) _wrap_new_GridEvent, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"GridEvent_GetRow", (PyCFunction)_wrap_GridEvent_GetRow, METH_O, NULL}, { (char *)"GridEvent_GetCol", (PyCFunction)_wrap_GridEvent_GetCol, METH_O, NULL}, @@ -22370,6 +22485,7 @@ static swig_type_info _swigt__p_wxGridSizeEvent = {"_p_wxGridSizeEvent", "wxGrid static swig_type_info _swigt__p_wxGridStringTable = {"_p_wxGridStringTable", "wxGridStringTable *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_wxGridTableBase = {"_p_wxGridTableBase", "wxGridTableBase *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_wxGridTableMessage = {"_p_wxGridTableMessage", "wxGridTableMessage *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_wxGridUpdateLocker = {"_p_wxGridUpdateLocker", "wxGridUpdateLocker *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_wxKeyEvent = {"_p_wxKeyEvent", "wxKeyEvent *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_wxNotifyEvent = {"_p_wxNotifyEvent", "wxNotifyEvent *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_wxObject = {"_p_wxObject", "wxObject *", 0, 0, (void*)0, 0}; @@ -22513,6 +22629,7 @@ static swig_type_info *swig_type_initial[] = { &_swigt__p_wxGridStringTable, &_swigt__p_wxGridTableBase, &_swigt__p_wxGridTableMessage, + &_swigt__p_wxGridUpdateLocker, &_swigt__p_wxICOHandler, &_swigt__p_wxIconizeEvent, &_swigt__p_wxIdleEvent, @@ -22762,6 +22879,7 @@ static swig_cast_info _swigc__p_wxGridSizeEvent[] = { {&_swigt__p_wxGridSizeEve static swig_cast_info _swigc__p_wxGridStringTable[] = { {&_swigt__p_wxGridStringTable, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_wxGridTableBase[] = { {&_swigt__p_wxGridStringTable, _p_wxGridStringTableTo_p_wxGridTableBase, 0, 0}, {&_swigt__p_wxGridTableBase, 0, 0, 0}, {&_swigt__p_wxPyGridTableBase, _p_wxPyGridTableBaseTo_p_wxGridTableBase, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_wxGridTableMessage[] = { {&_swigt__p_wxGridTableMessage, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_wxGridUpdateLocker[] = { {&_swigt__p_wxGridUpdateLocker, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_wxKeyEvent[] = { {&_swigt__p_wxKeyEvent, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_wxNotifyEvent[] = { {&_swigt__p_wxGridSizeEvent, _p_wxGridSizeEventTo_p_wxNotifyEvent, 0, 0}, {&_swigt__p_wxGridRangeSelectEvent, _p_wxGridRangeSelectEventTo_p_wxNotifyEvent, 0, 0}, {&_swigt__p_wxSplitterEvent, _p_wxSplitterEventTo_p_wxNotifyEvent, 0, 0}, {&_swigt__p_wxGridEvent, _p_wxGridEventTo_p_wxNotifyEvent, 0, 0}, {&_swigt__p_wxNotifyEvent, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_wxLayoutConstraints[] = {{&_swigt__p_wxLayoutConstraints, 0, 0, 0},{0, 0, 0, 0}}; @@ -22905,6 +23023,7 @@ static swig_cast_info *swig_cast_initial[] = { _swigc__p_wxGridStringTable, _swigc__p_wxGridTableBase, _swigc__p_wxGridTableMessage, + _swigc__p_wxGridUpdateLocker, _swigc__p_wxICOHandler, _swigc__p_wxIconizeEvent, _swigc__p_wxIdleEvent, @@ -23531,6 +23650,9 @@ SWIGEXPORT void SWIG_init(void) { SWIG_Python_SetConstant(d, "GRID_VALUE_LONG",SWIG_FromCharPtr("long")); SWIG_Python_SetConstant(d, "GRID_VALUE_CHOICEINT",SWIG_FromCharPtr("choiceint")); SWIG_Python_SetConstant(d, "GRID_VALUE_DATETIME",SWIG_FromCharPtr("datetime")); + SWIG_Python_SetConstant(d, "GRID_AUTOSIZE",SWIG_From_int(static_cast< int >(wxGRID_AUTOSIZE))); + SWIG_Python_SetConstant(d, "GRID_COLUMN",SWIG_From_int(static_cast< int >(wxGRID_COLUMN))); + SWIG_Python_SetConstant(d, "GRID_ROW",SWIG_From_int(static_cast< int >(wxGRID_ROW))); PyDict_SetItemString(d,(char*)"cvar", SWIG_globals()); SWIG_addvarlink(SWIG_globals(),(char*)"GridNoCellCoords",GridNoCellCoords_get, GridNoCellCoords_set); SWIG_addvarlink(SWIG_globals(),(char*)"GridNoCellRect",GridNoCellRect_get, GridNoCellRect_set); diff --git a/wxPython/src/msw/html.py b/wxPython/src/msw/html.py index d7fbfda36b..a02bcdbafc 100644 --- a/wxPython/src/msw/html.py +++ b/wxPython/src/msw/html.py @@ -255,11 +255,6 @@ class HtmlWinParser(HtmlParser): """GetCharWidth(self) -> int""" return _html.HtmlWinParser_GetCharWidth(*args, **kwargs) - def GetWindow(*args, **kwargs): - """GetWindow(self) -> HtmlWindow""" - return _html.HtmlWinParser_GetWindow(*args, **kwargs) - - GetWindow = wx._deprecated(GetWindow) def GetWindowInterface(*args, **kwargs): """GetWindowInterface(self) -> HtmlWindowInterface""" return _html.HtmlWinParser_GetWindowInterface(*args, **kwargs) @@ -676,11 +671,6 @@ class HtmlCell(_core.Object): """GetMouseCursor(self, HtmlWindowInterface window) -> Cursor""" return _html.HtmlCell_GetMouseCursor(*args, **kwargs) - def GetCursor(*args, **kwargs): - """GetCursor(self) -> Cursor""" - return _html.HtmlCell_GetCursor(*args, **kwargs) - - GetCursor = wx._deprecated(GetCursor) def IsFormattingCell(*args, **kwargs): """IsFormattingCell(self) -> bool""" return _html.HtmlCell_IsFormattingCell(*args, **kwargs) @@ -765,7 +755,6 @@ class HtmlCell(_core.Object): """ConvertToText(self, HtmlSelection sel) -> String""" return _html.HtmlCell_ConvertToText(*args, **kwargs) - Cursor = property(GetCursor,doc="See `GetCursor`") Depth = property(GetDepth,doc="See `GetDepth`") Descent = property(GetDescent,doc="See `GetDescent`") FirstChild = property(GetFirstChild,doc="See `GetFirstChild`") diff --git a/wxPython/src/msw/html_wrap.cpp b/wxPython/src/msw/html_wrap.cpp index eacb9ad6ca..bbceb8d1ea 100644 --- a/wxPython/src/msw/html_wrap.cpp +++ b/wxPython/src/msw/html_wrap.cpp @@ -4451,36 +4451,6 @@ fail: } -SWIGINTERN PyObject *_wrap_HtmlWinParser_GetWindow(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - wxHtmlWinParser *arg1 = (wxHtmlWinParser *) 0 ; - wxPyHtmlWindow *result = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_wxHtmlWinParser, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HtmlWinParser_GetWindow" "', expected argument " "1"" of type '" "wxHtmlWinParser *""'"); - } - arg1 = reinterpret_cast< wxHtmlWinParser * >(argp1); - { - PyThreadState* __tstate = wxPyBeginAllowThreads(); - result = (wxPyHtmlWindow *)(arg1)->GetWindow(); - wxPyEndAllowThreads(__tstate); - if (PyErr_Occurred()) SWIG_fail; - } - { - resultobj = wxPyMake_wxObject(result, (bool)0); - } - return resultobj; -fail: - return NULL; -} - - SWIGINTERN PyObject *_wrap_HtmlWinParser_GetWindowInterface(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; wxHtmlWinParser *arg1 = (wxHtmlWinParser *) 0 ; @@ -7280,34 +7250,6 @@ fail: } -SWIGINTERN PyObject *_wrap_HtmlCell_GetCursor(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - wxHtmlCell *arg1 = (wxHtmlCell *) 0 ; - wxCursor result; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_wxHtmlCell, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HtmlCell_GetCursor" "', expected argument " "1"" of type '" "wxHtmlCell const *""'"); - } - arg1 = reinterpret_cast< wxHtmlCell * >(argp1); - { - PyThreadState* __tstate = wxPyBeginAllowThreads(); - result = ((wxHtmlCell const *)arg1)->GetCursor(); - wxPyEndAllowThreads(__tstate); - if (PyErr_Occurred()) SWIG_fail; - } - resultobj = SWIG_NewPointerObj((new wxCursor(static_cast< const wxCursor& >(result))), SWIGTYPE_p_wxCursor, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - SWIGINTERN PyObject *_wrap_HtmlCell_IsFormattingCell(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; wxHtmlCell *arg1 = (wxHtmlCell *) 0 ; @@ -17780,7 +17722,6 @@ static PyMethodDef SwigMethods[] = { { (char *)"HtmlWinParser_GetDC", (PyCFunction)_wrap_HtmlWinParser_GetDC, METH_O, NULL}, { (char *)"HtmlWinParser_GetCharHeight", (PyCFunction)_wrap_HtmlWinParser_GetCharHeight, METH_O, NULL}, { (char *)"HtmlWinParser_GetCharWidth", (PyCFunction)_wrap_HtmlWinParser_GetCharWidth, METH_O, NULL}, - { (char *)"HtmlWinParser_GetWindow", (PyCFunction)_wrap_HtmlWinParser_GetWindow, METH_O, NULL}, { (char *)"HtmlWinParser_GetWindowInterface", (PyCFunction)_wrap_HtmlWinParser_GetWindowInterface, METH_O, NULL}, { (char *)"HtmlWinParser_SetFonts", (PyCFunction) _wrap_HtmlWinParser_SetFonts, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"HtmlWinParser_SetStandardFonts", (PyCFunction) _wrap_HtmlWinParser_SetStandardFonts, METH_VARARGS | METH_KEYWORDS, NULL}, @@ -17878,7 +17819,6 @@ static PyMethodDef SwigMethods[] = { { (char *)"HtmlCell_GetParent", (PyCFunction)_wrap_HtmlCell_GetParent, METH_O, NULL}, { (char *)"HtmlCell_GetFirstChild", (PyCFunction)_wrap_HtmlCell_GetFirstChild, METH_O, NULL}, { (char *)"HtmlCell_GetMouseCursor", (PyCFunction) _wrap_HtmlCell_GetMouseCursor, METH_VARARGS | METH_KEYWORDS, NULL}, - { (char *)"HtmlCell_GetCursor", (PyCFunction)_wrap_HtmlCell_GetCursor, METH_O, NULL}, { (char *)"HtmlCell_IsFormattingCell", (PyCFunction)_wrap_HtmlCell_IsFormattingCell, METH_O, NULL}, { (char *)"HtmlCell_SetLink", (PyCFunction) _wrap_HtmlCell_SetLink, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"HtmlCell_SetNext", (PyCFunction) _wrap_HtmlCell_SetNext, METH_VARARGS | METH_KEYWORDS, NULL}, diff --git a/wxPython/src/msw/wizard_wrap.cpp b/wxPython/src/msw/wizard_wrap.cpp index e3e7b9fb6e..2af5d83a28 100644 --- a/wxPython/src/msw/wizard_wrap.cpp +++ b/wxPython/src/msw/wizard_wrap.cpp @@ -2799,9 +2799,9 @@ SWIG_AsVal_bool (PyObject *obj, bool *val) } SWIGINTERN bool wxWizardPage_Create(wxWizardPage *self,wxWizard *parent,wxBitmap const &bitmap=wxNullBitmap,wxString const &resource=wxPyEmptyString){ - wxChar* res = NULL; + const wxChar* res = NULL; if (resource.length()) - res = (wxChar*)resource.c_str(); + res = (const wxChar*)resource.c_str(); return self->Create(parent, bitmap, res); } // C++ Version of a Python aware class @@ -2878,15 +2878,15 @@ IMP_PYCALLBACK_VOID_WXWINBASE(wxPyWizardPage, wxWizardPage, RemoveChild); SWIGINTERN wxPyWizardPage *new_wxPyWizardPage(wxWizard *parent,wxBitmap const *bitmap=&wxNullBitmap,wxString const *resource=&wxPyEmptyString){ - wxChar* res = NULL; + const wxChar* res = NULL; if (resource->length()) - res = (wxChar*)resource->c_str(); + res = (const wxChar*)resource->c_str(); return new wxPyWizardPage(parent, *bitmap, res); } SWIGINTERN bool wxPyWizardPage_Create(wxPyWizardPage *self,wxWizard *parent,wxBitmap const &bitmap=wxNullBitmap,wxString const &resource=wxPyEmptyString){ - wxChar* res = NULL; + const wxChar* res = NULL; if (resource.length()) - res = (wxChar*)resource.c_str(); + res = (const wxChar*)resource.c_str(); return self->Create(parent, bitmap, res); } #ifdef __cplusplus diff --git a/wxPython/src/wizard.i b/wxPython/src/wizard.i index c69c484873..c3ef1b9722 100644 --- a/wxPython/src/wizard.i +++ b/wxPython/src/wizard.i @@ -103,9 +103,9 @@ public: bool Create(wxWizard *parent, const wxBitmap& bitmap = wxNullBitmap, const wxString& resource = wxPyEmptyString) { - wxChar* res = NULL; + const wxChar* res = NULL; if (resource.length()) - res = (wxChar*)resource.c_str(); + res = (const wxChar*)resource.c_str(); return self->Create(parent, bitmap, res); } } @@ -222,9 +222,9 @@ public: wxPyWizardPage(wxWizard *parent, const wxBitmap* bitmap = &wxNullBitmap, const wxString* resource = &wxPyEmptyString) { - wxChar* res = NULL; + const wxChar* res = NULL; if (resource->length()) - res = (wxChar*)resource->c_str(); + res = (const wxChar*)resource->c_str(); return new wxPyWizardPage(parent, *bitmap, res); } } @@ -238,9 +238,9 @@ public: bool Create(wxWizard *parent, const wxBitmap& bitmap = wxNullBitmap, const wxString& resource = wxPyEmptyString) { - wxChar* res = NULL; + const wxChar* res = NULL; if (resource.length()) - res = (wxChar*)resource.c_str(); + res = (const wxChar*)resource.c_str(); return self->Create(parent, bitmap, res); } } diff --git a/wxPython/tests/TreeMixinTest.py b/wxPython/tests/TreeMixinTest.py new file mode 100644 index 0000000000..55a740ae67 --- /dev/null +++ b/wxPython/tests/TreeMixinTest.py @@ -0,0 +1,758 @@ +import wx, wx.gizmos, wx.lib.customtreectrl, unittest +try: + import treemixin +except ImportError: + from wx.lib.mixins import treemixin + + +# VirtualTree tests + +class TreeCtrl(object): + def __init__(self, *args, **kwargs): + self.children = {} + self.font = {} + self.colour = {} + self.bgcolour = {} + self.image = {} + self.type = {} + self.checked = {} + super(TreeCtrl, self).__init__(*args, **kwargs) + + def OnGetItemFont(self, index): + return self.font.get(index, wx.NullFont) + + def PrepareItemFont(self, index, font): + self.font[index] = font + + def OnGetItemTextColour(self, index): + return self.colour.get(index, wx.NullColour) + + def PrepareItemColour(self, index, colour): + self.colour[index] = colour + + def OnGetItemBackgroundColour(self, index): + return self.bgcolour.get(index, wx.NullColour) + + def PrepareItemBackgroundColour(self, index, colour): + self.bgcolour[index] = colour + + def OnGetItemImage(self, index, which): + return self.image.get(index, -1) + + def PrepareImage(self, index, imageIndex): + self.image[index] = imageIndex + + def OnGetItemType(self, index): + return self.type.get(index, 0) + + def PrepareType(self, index, itemType): + self.type[index] = itemType + + def OnGetItemChecked(self, index): + return self.checked.get(index, False) + + def PrepareChecked(self, index, checked): + self.checked[index] = checked + + +class VirtualTreeCtrl(TreeCtrl, treemixin.VirtualTree, + wx.lib.customtreectrl.CustomTreeCtrl): + + def OnGetItemText(self, indices): + return 'item %s'%'.'.join([str(index) for index in indices]) + + def OnGetChildrenCount(self, index=None): + index = index or () + return self.children.get(index, 0) + + def PrepareChildrenCount(self, index, childrenCount): + self.children[index] = childrenCount + + + +class VirtualTreeCtrlTest_NoRootItems(unittest.TestCase): + def setUp(self): + self.frame = wx.Frame(None) + self.tree = VirtualTreeCtrl(self.frame) + self.tree.RefreshItems() + + def testNoRootItems(self): + self.assertEqual(0, self.tree.GetCount()) + + def testAddTwoRootItems(self): + self.tree.PrepareChildrenCount((), 2) + self.tree.RefreshItems() + self.assertEqual(2, self.tree.GetCount()) + + def testAddOneRootItemAndOneChild(self): + self.tree.PrepareChildrenCount((), 1) + self.tree.PrepareChildrenCount((0,), 1) + self.tree.RefreshItems() + self.tree.ExpandAll() + self.assertEqual(2, self.tree.GetCount()) + + def testAddOneRootItemAndTwoChildren(self): + self.tree.PrepareChildrenCount((), 1) + self.tree.PrepareChildrenCount((0,), 2) + self.tree.RefreshItems() + self.tree.ExpandAll() + self.assertEqual(3, self.tree.GetCount()) + + + +class VirtualTreeCtrlTest_OneRoot(unittest.TestCase): + def setUp(self): + self.frame = wx.Frame(None) + self.tree = VirtualTreeCtrl(self.frame) + self.tree.PrepareChildrenCount((), 1) + self.tree.RefreshItems() + + def testOneRoot(self): + self.assertEqual(1, self.tree.GetCount()) + + def testDeleteRootItem(self): + self.tree.PrepareChildrenCount((), 0) + self.tree.RefreshItems() + self.assertEqual(0, self.tree.GetCount()) + + def testAddOneChild(self): + self.tree.PrepareChildrenCount((0,), 1) + self.tree.RefreshItems() + self.tree.ExpandAll() + self.assertEqual(2, self.tree.GetCount()) + + def testAddTwoChildren(self): + self.tree.PrepareChildrenCount((0,), 2) + self.tree.RefreshItems() + self.tree.ExpandAll() + self.assertEqual(3, self.tree.GetCount()) + + def testChangeFont(self): + self.tree.PrepareItemFont((0,), wx.SMALL_FONT) + self.tree.RefreshItems() + item, cookie = self.tree.GetFirstChild(self.tree.GetRootItem()) + self.assertEqual(wx.SMALL_FONT, self.tree.GetItemFont(item)) + + def testChangeColour(self): + self.tree.PrepareItemColour((0,), wx.RED) + self.tree.RefreshItems() + item, cookie = self.tree.GetFirstChild(self.tree.GetRootItem()) + self.assertEqual(wx.RED, self.tree.GetItemTextColour(item)) + + def testChangeBackgroundColour(self): + self.tree.PrepareItemBackgroundColour((0,), wx.RED) + self.tree.RefreshItems() + item, cookie = self.tree.GetFirstChild(self.tree.GetRootItem()) + self.assertEqual(wx.RED, self.tree.GetItemBackgroundColour(item)) + + def testChangeImage(self): + self.tree.PrepareImage((0,), 0) + self.tree.RefreshItems() + item, cookie = self.tree.GetFirstChild(self.tree.GetRootItem()) + self.assertEqual(0, self.tree.GetItemImage(item)) + + def testChangeType(self): + self.tree.PrepareType((0,), 2) + self.tree.PrepareChecked((0,), True) + self.tree.RefreshItems() + item, cookie = self.tree.GetFirstChild(self.tree.GetRootItem()) + self.failUnless(self.tree.IsItemChecked(item)) + + def testChangeTypeAndAddChildren(self): + self.tree.PrepareType((0,), 1) + self.tree.PrepareChildrenCount((0,), 1) + self.tree.RefreshItems() + item, cookie = self.tree.GetFirstChild(self.tree.GetRootItem()) + self.failUnless(self.tree.ItemHasChildren(item)) + + def testRefreshItem(self): + self.tree.PrepareItemColour((0,), wx.RED) + self.tree.RefreshItem((0,)) + item, cookie = self.tree.GetFirstChild(self.tree.GetRootItem()) + self.assertEqual(wx.RED, self.tree.GetItemTextColour(item)) + + +# TreeAPIHarmonizer tests + +class TreeAPIHarmonizerTestCase(unittest.TestCase): + style = wx.TR_DEFAULT_STYLE + + def setUp(self): + self.frame = wx.Frame(None) + class HarmonizedTreeCtrl(treemixin.TreeAPIHarmonizer, self.TreeClass): + pass + self.tree = HarmonizedTreeCtrl(self.frame, style=self.style) + self.eventsReceived = [] + self.populateTree() + + def populateTree(self): + self.root = self.tree.AddRoot('Root') + self.item = self.tree.AppendItem(self.root, 'Item') + self.items = [self.root, self.item] + + def onEvent(self, event): + self.eventsReceived.append(event) + + +class TreeAPIHarmonizerCommonTests(object): + ''' Tests that should succeed for all tree controls and all styles. ''' + + def testGetItemType(self): + self.assertEqual(0, self.tree.GetItemType(self.item)) + + def testGetItemImage_DefaultIcon(self): + self.assertEqual(-1, self.tree.GetItemImage(self.item)) + + def testGetItemImage_SelectedIcon(self): + self.assertEqual(-1, + self.tree.GetItemImage(self.item, wx.TreeItemIcon_Selected)) + + def testGetItemImage_DefaultIcon_OtherColumn(self): + self.assertEqual(-1, self.tree.GetItemImage(self.item, column=1)) + + def testGetItemImage_SelectedIcon_OtherColumn(self): + self.assertEqual(-1, + self.tree.GetItemImage(self.item, wx.TreeItemIcon_Selected, 1)) + + def testSetItemImage_DefaultIcon(self): + self.tree.SetItemImage(self.item, -1) + self.assertEqual(-1, self.tree.GetItemImage(self.item)) + + def testSetItemImage_SelectedIcon(self): + self.tree.SetItemImage(self.item, -1, wx.TreeItemIcon_Selected) + self.assertEqual(-1, + self.tree.GetItemImage(self.item, wx.TreeItemIcon_Selected)) + + def testSetItemImage_DefaultIcon_OtherColumn(self): + self.tree.SetItemImage(self.item, -1, column=1) + self.assertEqual(-1, self.tree.GetItemImage(self.item, column=1)) + + def testSetItemImage_SelectedIcon_OtherColumn(self): + self.tree.SetItemImage(self.item, -1, wx.TreeItemIcon_Selected, 1) + self.assertEqual(-1, + self.tree.GetItemImage(self.item, wx.TreeItemIcon_Selected, 1)) + + def testExpandAll(self): + self.tree.ExpandAll() + + def testExpandAllChildren(self): + self.tree.AppendItem(self.item, 'child') + self.tree.ExpandAllChildren(self.item) + self.failUnless(self.tree.IsExpanded(self.item)) + + +class TreeAPIHarmonizerNoTreeListCtrlCommonTests(object): + ''' Tests that should succeed for all tree controls, except the + TreeListCtrl, and all styles. ''' + + def testGetMainWindow(self): + self.assertEqual(self.tree, self.tree.GetMainWindow()) + + def testGetColumnCount(self): + self.assertEqual(0, self.tree.GetColumnCount()) + + +class TreeAPIHarmonizerSingleSelectionTests(object): + ''' Tests that should succeed for all tree controls when in single + selection mode (which is the default selection mode). ''' + + def testUnselectAll(self): + self.tree.SelectItem(self.item) + self.tree.UnselectAll() + self.assertEqual([], self.tree.GetSelections()) + + def testGetSelections_NoSelection(self): + self.tree.UnselectAll() + self.assertEqual([], self.tree.GetSelections()) + + def testGetSelections_OneSelectedItem(self): + self.tree.UnselectAll() + self.tree.SelectItem(self.item) + self.assertEqual([self.item], self.tree.GetSelections()) + + +class TreeAPIHarmonizerMultipleSelectionTests(object): + ''' Tests that should succeed for all tree controls when in multiple + selection mode. ''' + + style = wx.TR_DEFAULT_STYLE | wx.TR_MULTIPLE + + def testUnselectAll(self): + self.tree.SelectItem(self.item) + self.tree.UnselectAll() + self.assertEqual([], self.tree.GetSelections()) + + def testGetSelections_NoSelection(self): + self.tree.UnselectAll() + self.assertEqual([], self.tree.GetSelections()) + + def testGetSelections_OneSelectedItem(self): + self.tree.UnselectAll() + self.tree.SelectItem(self.item) + self.assertEqual([self.item], self.tree.GetSelections()) + + def testGetSelections_TwoSelectedItems(self): + item2 = self.tree.AppendItem(self.root, 'item 2') + self.tree.ExpandAll() + self.tree.UnselectAll() + self.tree.SelectItem(item2) + self.tree.SelectItem(self.item) + self.assertEqual([self.item, item2], self.tree.GetSelections()) + + +class TreeAPIHarmonizerVisibleRootTests(object): + ''' Tests that should succeed for all tree controls when the root item + is not hidden. ''' + + def testGetCount(self): + self.assertEqual(len(self.items), self.tree.GetCount()) + + def testSelectRoot(self): + self.tree.SelectItem(self.root) + self.assertEqual([self.root], self.tree.GetSelections()) + + +class TreeAPIHarmonizerHiddenRootTests(object): + ''' Tests that should succeed for all tree controls when the root item + is hidden. ''' + + style = wx.TR_DEFAULT_STYLE | wx.TR_HIDE_ROOT + + def testGetCount(self): + self.assertEqual(len(self.items) - 1, self.tree.GetCount()) + + def testSelectRoot(self): + self.tree.SelectItem(self.root) + self.assertEqual([], self.tree.GetSelections()) + + +class TreeAPIHarmonizerWithTreeCtrlTestCase(TreeAPIHarmonizerTestCase): + TreeClass = wx.TreeCtrl + + +class TreeAPIHarmonizerWithTreeCtrlCommonTests( \ + TreeAPIHarmonizerCommonTests, + TreeAPIHarmonizerNoTreeListCtrlCommonTests): + pass + + +class TreeAPIHarmonizerWithTreeCtrl_SingleSelection( \ + TreeAPIHarmonizerWithTreeCtrlCommonTests, + TreeAPIHarmonizerSingleSelectionTests, + TreeAPIHarmonizerWithTreeCtrlTestCase): + pass + + +class TreeAPIHarmonizerWithTreeCtrl_MultipleSelection( \ + TreeAPIHarmonizerWithTreeCtrlCommonTests, + TreeAPIHarmonizerMultipleSelectionTests, + TreeAPIHarmonizerWithTreeCtrlTestCase): + pass + + +class TreeAPIHarmonizerWithTreeCtrl_VisibleRoot( \ + TreeAPIHarmonizerWithTreeCtrlCommonTests, + TreeAPIHarmonizerVisibleRootTests, + TreeAPIHarmonizerWithTreeCtrlTestCase): + pass + + +class TreeAPIHarmonizerWithTreeCtrl_HiddenRoot( \ + TreeAPIHarmonizerWithTreeCtrlCommonTests, + TreeAPIHarmonizerHiddenRootTests, + TreeAPIHarmonizerWithTreeCtrlTestCase): + pass + + +class TreeAPIHarmonizerWithTreeListCtrlTestCase(TreeAPIHarmonizerTestCase): + TreeClass = wx.gizmos.TreeListCtrl + + def populateTree(self): + self.tree.AddColumn('Column') + super(TreeAPIHarmonizerWithTreeListCtrlTestCase, self).populateTree() + + +class TreeAPIHarmonizerWithTreeListCtrlCommonTests( \ + TreeAPIHarmonizerCommonTests): + + def testGetColumnCount(self): + self.assertEqual(1, self.tree.GetColumnCount()) + + def testGetMainWindow(self): + self.assertNotEqual(self.tree, self.tree.GetMainWindow()) + + +class TreeAPIHarmonizerWithTreeListCtrl_SingleSelection( \ + TreeAPIHarmonizerWithTreeListCtrlCommonTests, + TreeAPIHarmonizerSingleSelectionTests, + TreeAPIHarmonizerWithTreeListCtrlTestCase): + pass + + +class TreeAPIHarmonizerWithTreeListCtrl_MultipleSelection( \ + TreeAPIHarmonizerWithTreeListCtrlCommonTests, + TreeAPIHarmonizerMultipleSelectionTests, + TreeAPIHarmonizerWithTreeListCtrlTestCase): + + def testGetSelections_TwoSelectedItems(self): + ''' Override TreeAPIHarmonizerMultipleSelectionTests.- + testGetSelections_TwoSelectedItems, because + TreeListCtrl.SelectItem needs an extra parameter. ''' + self.tree.UnselectAll() + item2 = self.tree.AppendItem(self.root, 'item 2') + self.tree.SelectItem(self.item) + self.tree.SelectItem(item2, unselect_others=False) + self.assertEqual([self.item, item2], self.tree.GetSelections()) + + +class TreeAPIHarmonizerWithTreeListCtrl_VisibleRoot( \ + TreeAPIHarmonizerWithTreeListCtrlCommonTests, + TreeAPIHarmonizerVisibleRootTests, + TreeAPIHarmonizerWithTreeListCtrlTestCase): + pass + + +class TreeAPIHarmonizerWithTreeListCtrl_HiddenRoot( \ + TreeAPIHarmonizerWithTreeListCtrlCommonTests, + TreeAPIHarmonizerHiddenRootTests, + TreeAPIHarmonizerWithTreeListCtrlTestCase): + pass + + +class TreeAPIHarmonizerWithCustomTreeCtrlTestCase(TreeAPIHarmonizerTestCase): + TreeClass = wx.lib.customtreectrl.CustomTreeCtrl + + +class TreeAPIHarmonizerWithCustomTreeCtrlCommonTests( \ + TreeAPIHarmonizerCommonTests, + TreeAPIHarmonizerNoTreeListCtrlCommonTests): + + def testGetCheckItemType(self): + item = self.tree.AppendItem(self.root, 'item', ct_type=1) + self.assertEqual(1, self.tree.GetItemType(item)) + + def testGetRadioItemType(self): + item = self.tree.AppendItem(self.root, 'item', ct_type=2) + self.assertEqual(2, self.tree.GetItemType(item)) + + + +class TreeAPIHarmonizerWithCustomTreeCtrl_SingleSelection( \ + TreeAPIHarmonizerWithCustomTreeCtrlCommonTests, + TreeAPIHarmonizerSingleSelectionTests, + TreeAPIHarmonizerWithCustomTreeCtrlTestCase): + pass + + +class TreeAPIHarmonizerWithCustomTreeCtrl_MultipleSelection( \ + TreeAPIHarmonizerWithCustomTreeCtrlCommonTests, + TreeAPIHarmonizerMultipleSelectionTests, + TreeAPIHarmonizerWithCustomTreeCtrlTestCase): + pass + + +class TreeAPIHarmonizerWithCustomTreeCtrl_VisibleRoot( \ + TreeAPIHarmonizerWithCustomTreeCtrlCommonTests, + TreeAPIHarmonizerVisibleRootTests, + TreeAPIHarmonizerWithCustomTreeCtrlTestCase): + pass + + +class TreeAPIHarmonizerWithCustomTreeCtrl_HiddenRoot( \ + TreeAPIHarmonizerWithCustomTreeCtrlCommonTests, + TreeAPIHarmonizerHiddenRootTests, + TreeAPIHarmonizerWithCustomTreeCtrlTestCase): + pass + + +# TreeHelper tests + +class TreeHelperTestCase(unittest.TestCase): + style = wx.TR_DEFAULT_STYLE + + def setUp(self): + self.frame = wx.Frame(None) + class HelperTreeCtrl(treemixin.TreeHelper, + treemixin.TreeAPIHarmonizer, self.TreeClass): + pass + self.tree = HelperTreeCtrl(self.frame, style=self.style) + self.populateTree() + + def populateTree(self): + self.root = self.tree.AddRoot('Root') + self.item = self.tree.AppendItem(self.root, 'Item') + self.child = self.tree.AppendItem(self.item, 'Child') + + +class TreeHelperCommonTests(object): + def testGetItemChildren_EmptyTree(self): + self.tree.DeleteAllItems() + self.assertEqual([], self.tree.GetItemChildren()) + + def testGetItemChildren_NoParent(self): + self.assertEqual([self.item], self.tree.GetItemChildren()) + + def testGetItemChildren_RootItem(self): + self.assertEqual([self.item], self.tree.GetItemChildren(self.root)) + + def testGetItemChildren_RegularItem(self): + self.assertEqual([self.child], self.tree.GetItemChildren(self.item)) + + def testGetItemChildren_ItemWithoutChildren(self): + self.assertEqual([], self.tree.GetItemChildren(self.child)) + + def testGetItemChildren_NoParent_Recursively(self): + self.assertEqual([self.item, self.child], + self.tree.GetItemChildren(recursively=True)) + + def testGetItemChildren_RootItem_Recursively(self): + self.assertEqual([self.item, self.child], + self.tree.GetItemChildren(self.root, True)) + + def testGetItemChildren_RegularItem_Recursively(self): + self.assertEqual([self.child], + self.tree.GetItemChildren(self.item, True)) + + def testGetItemChildren_ItemWithoutChildren_Recursively(self): + self.assertEqual([], self.tree.GetItemChildren(self.child, True)) + + def testGetItemByIndex_RootItem(self): + self.assertEqual(self.root, self.tree.GetItemByIndex(())) + + def testGetItemByIndex_RegularItem(self): + self.assertEqual(self.item, self.tree.GetItemByIndex((0,))) + + def testGetItemByIndex_Child(self): + self.assertEqual(self.child, self.tree.GetItemByIndex((0,0))) + + def testGetIndexOfItemRootItem(self): + self.assertEqual((), self.tree.GetIndexOfItem(self.root)) + + def testGetIndexOfItemRegularItem(self): + self.assertEqual((0,), self.tree.GetIndexOfItem(self.item)) + + def testGetIndexOfItemChild(self): + self.assertEqual((0,0), self.tree.GetIndexOfItem(self.child)) + + +class TreeHelperWithTreeCtrlTestCase(TreeHelperCommonTests, + TreeHelperTestCase): + TreeClass = wx.TreeCtrl + + +class TreeHelperWithTreeListCtrlTestCase(TreeHelperCommonTests, + TreeHelperTestCase): + TreeClass = wx.gizmos.TreeListCtrl + + def populateTree(self): + self.tree.AddColumn('Column') + super(TreeHelperWithTreeListCtrlTestCase, self).populateTree() + + +class TreeHelperWithCustomTreeCtrlTestCase(TreeHelperCommonTests, + TreeHelperTestCase): + TreeClass = wx.lib.customtreectrl.CustomTreeCtrl + + +# ExpansionState tests + +class ExpansionStateTreeCtrl(treemixin.ExpansionState, wx.TreeCtrl): + pass + + +class GetExpansionStateTestCase(unittest.TestCase): + def setUp(self): + self.frame = wx.Frame(None) + self.tree = ExpansionStateTreeCtrl(self.frame) + + def testEmptyTree(self): + self.assertEqual([], self.tree.GetExpansionState()) + + def testRoot(self): + self.tree.AddRoot('Root item') + self.assertEqual([], self.tree.GetExpansionState()) + + def testRoot_Child(self): + root = self.tree.AddRoot('Root item') + child = self.tree.AppendItem(root, 'Child') + self.assertEqual([], self.tree.GetExpansionState()) + + def testExpandedRoot_Child(self): + root = self.tree.AddRoot('Root item') + child = self.tree.AppendItem(root, 'Child') + self.tree.Expand(root) + self.assertEqual([()], self.tree.GetExpansionState()) + + def testExpandedRoot_Child_Child(self): + root = self.tree.AddRoot('Root item') + child = self.tree.AppendItem(root, 'Child') + grandChild = self.tree.AppendItem(child, 'Grandchild') + self.tree.Expand(root) + # Property should work too: + self.assertEqual([()], self.tree.ExpansionState) + + def testRoot_ExpandedChild_Child(self): + root = self.tree.AddRoot('Root item') + child = self.tree.AppendItem(root, 'Child') + grandChild = self.tree.AppendItem(child, 'Grandchild') + self.tree.Expand(child) + self.assertEqual([], self.tree.GetExpansionState()) + + def testExpandedRoot_ExpandedChild_Child(self): + root = self.tree.AddRoot('Root item') + child = self.tree.AppendItem(root, 'Child') + grandChild = self.tree.AppendItem(child, 'Grandchild') + self.tree.Expand(child) + self.tree.Expand(root) + self.assertEqual([(), (0,)], self.tree.GetExpansionState()) + + def testExpandedRoot_ExpandedChild_ExpandedChild(self): + root = self.tree.AddRoot('Root item') + child = self.tree.AppendItem(root, 'Child') + grandChild = self.tree.AppendItem(child, 'Grandchild') + grandGrandChild = self.tree.AppendItem(grandChild, 'Grandgrandchild') + self.tree.Expand(root) + self.tree.Expand(child) + self.tree.Expand(grandChild) + self.assertEqual([(), (0,), (0,0)], self.tree.GetExpansionState()) + + +class SetExpansionStateTestCase(unittest.TestCase): + def setUp(self): + self.frame = wx.Frame(None) + self.tree = ExpansionStateTreeCtrl(self.frame) + + def testEmptyTree(self): + self.tree.SetExpansionState([]) + + def testRoot(self): + root = self.tree.AddRoot('Root item') + self.tree.SetExpansionState([]) + self.failIf(self.tree.IsExpanded(root)) + + def testRoot_Child(self): + root = self.tree.AddRoot('Root item') + child = self.tree.AppendItem(root, 'Child') + self.tree.SetExpansionState([]) + self.failIf(self.tree.IsExpanded(root)) + + def testExpandedRoot_Child(self): + root = self.tree.AddRoot('Root item') + child = self.tree.AppendItem(root, 'Child') + self.tree.ExpansionState = [()] # Property should work too + self.failUnless(self.tree.IsExpanded(root)) + + def testExpandedRoot_Child_Child(self): + root = self.tree.AddRoot('Root item') + child = self.tree.AppendItem(root, 'Child') + grandChild = self.tree.AppendItem(child, 'Grandchild') + self.tree.SetExpansionState([()]) + self.failIf(self.tree.IsExpanded(child)) + + def testExpandedRoot_ExpandedChild_Child(self): + root = self.tree.AddRoot('Root item') + child = self.tree.AppendItem(root, 'Child') + grandChild = self.tree.AppendItem(child, 'Grandchild') + self.tree.SetExpansionState([(), (0,)]) + self.failUnless(self.tree.IsExpanded(child)) + + def testRoot_ExpandedChild_Child(self): + root = self.tree.AddRoot('Root item') + child = self.tree.AppendItem(root, 'Child') + grandChild = self.tree.AppendItem(child, 'Grandchild') + self.tree.SetExpansionState([(0,)]) + self.failIf(self.tree.IsExpanded(child)) + + def testExpandedRoot_ExpandedChild_ExpandedChild(self): + root = self.tree.AddRoot('Root item') + child = self.tree.AppendItem(root, 'Child') + grandChild = self.tree.AppendItem(child, 'Grandchild') + grandGrandChild = self.tree.AppendItem(grandChild, 'Grandgrandchild') + self.tree.SetExpansionState([(), (0,), (0,0)]) + self.failUnless(self.tree.IsExpanded(grandChild)) + + +# Tests of the tree controls without any mixin, to document behaviour that +# already works, and works the same, for all tree control widgets + +class VanillaTreeTestCase(unittest.TestCase): + style = wx.TR_DEFAULT_STYLE + + def setUp(self): + self.frame = wx.Frame(None) + self.tree = self.TreeClass(self.frame, style=self.style) + self.eventsReceived = [] + self.populateTree() + + def populateTree(self): + self.root = self.tree.AddRoot('Root') + self.item = self.tree.AppendItem(self.root, 'Item') + self.items = [self.root, self.item] + + def onEvent(self, event): + self.eventsReceived.append(event) + + +class VanillaTreeCommonTests(object): + ''' Tests that should succeed for all tree controls and all styles. ''' + + def testSetItemHasChildren(self): + self.tree.SetItemHasChildren(self.item, True) + self.failUnless(self.tree.ItemHasChildren(self.item)) + + def testExpandItemWithPlus(self): + self.tree.Bind(wx.EVT_TREE_ITEM_EXPANDING, self.onEvent) + self.tree.SetItemHasChildren(self.item, True) + self.tree.Expand(self.item) + self.assertEqual(1, len(self.eventsReceived)) + + +class VanillaTreeCtrlTestCase(VanillaTreeCommonTests, VanillaTreeTestCase): + TreeClass = wx.TreeCtrl + + +class VanillaTreeListCtrlTestCase(VanillaTreeCommonTests, VanillaTreeTestCase): + TreeClass = wx.gizmos.TreeListCtrl + + def populateTree(self): + self.tree.AddColumn('Column 0') + super(VanillaTreeListCtrlTestCase, self).populateTree() + + +class VanillaCustomTreeCtrlTestCase(VanillaTreeCommonTests, + VanillaTreeTestCase): + TreeClass = wx.lib.customtreectrl.CustomTreeCtrl + + +# Tests of the tree controls without any mixin, to document behaviour +# that is either different between tree control widgets or undesired +# behaviour. + +class TreeCtrlTestCase(unittest.TestCase): + def setUp(self): + self.frame = wx.Frame(None) + self.tree = wx.TreeCtrl(self.frame, style=wx.TR_HIDE_ROOT) + + def testSelectHiddenRootItem(self): + root = self.tree.AddRoot('Hidden root') + self.tree.SelectItem(root) + self.assertEqual(root, self.tree.GetSelection()) + + +class CustomTreeCtrlTestCase(unittest.TestCase): + def setUp(self): + self.frame = wx.Frame(None) + self.tree = wx.lib.customtreectrl.CustomTreeCtrl(self.frame, + style=wx.TR_HIDE_ROOT) + + def testSelectHiddenRootItem(self): + root = self.tree.AddRoot('Hidden root') + self.tree.SelectItem(root) + self.assertEqual(root, self.tree.GetSelection()) + + +if __name__ == '__main__': + app = wx.App(False) + unittest.main() + + diff --git a/wxPython/tests/test_buttonKeyHandler.py b/wxPython/tests/test_buttonKeyHandler.py new file mode 100644 index 0000000000..19071da84c --- /dev/null +++ b/wxPython/tests/test_buttonKeyHandler.py @@ -0,0 +1,33 @@ +import wx + +BIND_HANDLERS = False +SKIP_EVENT = True + +def OnKeyDown(evt): + print "OnKeyDown", evt.KeyCode + if SKIP_EVENT: + evt.Skip() + +def OnKeyUp(evt): + print "OnKeyUp", evt.KeyCode + if SKIP_EVENT: + evt.Skip() + +def OnChar(evt): + print "OnChar", evt.KeyCode + if SKIP_EVENT: + evt.Skip() + + +app = wx.App(False) +frm = wx.Frame(None, title="test_buttonKeyHandler") +pnl = wx.Panel(frm) + +btn = wx.Button(pnl, label="Focus me and press a key", pos=(20,20)) +if BIND_HANDLERS: + btn.Bind(wx.EVT_KEY_DOWN, OnKeyDown) + btn.Bind(wx.EVT_KEY_UP, OnKeyUp) + btn.Bind(wx.EVT_CHAR, OnChar) + +frm.Show() +app.MainLoop() diff --git a/wxPython/tests/test_gcDrawBitmap.py b/wxPython/tests/test_gcDrawBitmap.py new file mode 100644 index 0000000000..90bcfc2624 --- /dev/null +++ b/wxPython/tests/test_gcDrawBitmap.py @@ -0,0 +1,200 @@ +import wx +import math + +##import os; print "PID:", os.getpid(); raw_input("Press Enter...") + +class TestPanel(wx.Panel): + def __init__(self, *args, **kw): + wx.Panel.__init__(self, *args, **kw) + self.Bind(wx.EVT_PAINT, self.OnPaint) + + self.SetBackgroundColour("white") + + # maskless image + self.bmp1 = getTest2Bitmap() + + # give this one a mask + self.bmp2 = getTest2Bitmap() + self.bmp2.SetMaskColour("blue") + + # now make one in which the opaque pixels from #2 are made + # partially transparent + bmp = getTest2Bitmap() + bmp.SetMaskColour("blue") + img = bmp.ConvertToImage() + img.InitAlpha() + self.bmp3 = img.ConvertToBitmap() + pixelData = wx.AlphaPixelData(self.bmp3) + if not pixelData: + raise RuntimeError("Failed to gain raw access to bitmap data.") + for pixel in pixelData: + red, green, blue, alpha = pixel.Get() + if alpha == 255: + pixel.Set(red, green, blue, 128) + + ##self.bmp3 = wx.Bitmap("bitmaps/toucan.png") + + + def OnPaint(self, evt): + gc = wx.GraphicsContext.Create(wx.PaintDC(self)) + + # draw some lines to use as a background + gc.SetPen(wx.Pen("navy", 1)) + x = y = 0 + sz = self.GetSize() + while x < sz.width*2 or y < sz.height*2: + gc.StrokeLine(x,0, 0,y) + x += 20 + y += 20 + + + for bmp in [self.bmp1, self.bmp2, self.bmp3]: + # draw the plain bitmap + gc.DrawBitmap(bmp, 20,20, + bmp.GetWidth(), bmp.GetHeight()) + + # translate and scale by using the w, and h parameters + gc.Translate(100, 0) + gc.DrawBitmap(bmp, 20,20, + bmp.GetWidth()*1.5, bmp.GetHeight()*1.5) + + # translate and scale using Scale() + gc.Translate(125, 0) + gc.PushState() + gc.Scale(0.75, 0.75) + gc.DrawBitmap(bmp, 20,20, + bmp.GetWidth(), bmp.GetHeight()) + gc.PopState() + + # translate and rotate + gc.Translate(125, 0) + gc.PushState() + gc.Rotate(math.radians(45)) + gc.DrawBitmap(bmp, 20,20, + bmp.GetWidth(), bmp.GetHeight()) + gc.PopState() + + # move back to the left side, and down a row + gc.Translate(-350, 150) + + +def main(): + app = wx.App(False) + frm = wx.Frame(None, size=(500,500)) + pnl = TestPanel(frm) + frm.Show() + app.MainLoop() + + + +#---------------------------------------------------------------------- +from wx import ImageFromStream, BitmapFromImage +from wx import EmptyIcon +import cStringIO + + +def getTest2Data(): + return \ +'\x89PNG\r\n\x1a\n\x00\x00\x00\rIHDR\x00\x00\x00@\x00\x00\x00@\x08\x02\x00\ +\x00\x00%\x0b\xe6\x89\x00\x00\x00\x03sBIT\x08\x08\x08\xdb\xe1O\xe0\x00\x00\ +\x08\xeeIDATh\x81\xd5\x9aKl\x1b\xd7\x15\x86\xbf\xcb\xe1\xf0\xa1\xa1(\x91\x92\ +(\xc9\x96T\xd9q,Ar\xdc\xbarb\xa0F\xd1\xb8\x81\xd3\xa0\xb0\x03gS\x04\xf0>\xd3\ +\x14\x857Aw\x0e\x8a\x00\xc9*\xe821h\x04\xe8&\x01\xb2k\x10\x07E\xd0\x00u\xb2p\ +\x16\x85\x1f\x01\x92\xc8\xae\xe3\x1a\xb2\xe5\xca\xa2%\xd3\xa6D\x89\xb4\x863\ +\xb7\x8b\xa1\xa8!9\x1c\x0ei\xcaA\xff\x15E\xce=\xf7\xff\xcf9\xf71\xe7H\x80\ +\xe4\xff\x19\xc1N\x19\x923\xa2\xa5\xe7\xc5\xa5\xce8NT"\xe0\xcd\xa0~\xbeV\x19\ +\xfb\xb7\xdc\xdap\x9f\x02\xca\xb8\xe8\xf8|\xf0q\xe6\xad\xe3\xd1\xae\x8c\xb2\ +\x00\xbf\xec\xc5k[\x7f\xca\xb3\xe5\x0f\x9dS\xd2\x86\x0c\x7f\x02l\xc7;\xd9;a+\ +\xa9\x96aJ\x0c\x89\xe9\xe0\xa3]\xf1\xcdI\xb4 \xa3\x99\x00o\xeaNl\x06d\xed\ +\x00&\xe4M\xb2&k\x16\xa6\xe4\x17\xd7\x00\xbe\x16/\xdb\x0f(\x044\x82I\xc21T\ +\x05\xa1 T\x02\n\x81-;\x07\xc1w4<\x05\\l\xe6\xf5\xcd_M\xac"\xe6\n\xc6\xb0\ +\xfc\xd0c\xb27\xc5\x01@%\x90 \x048\xd8\x0b\x91\xb6?|\xf5\x95>;\xcb\xca\ +\n##\xcc\xcc\x10\x8d\x12\x89\xb4I\xbdb\xf3\xda5\xfd\xf2e\xee\xdc!\x1e\xe7\ +\xfe}\xd6M\xee\xd1\\C3\x01n\xec\x81\xd9Y.]\xa2X\xa4T\xe2\xe9\xa7\xb1\xac\xaa\ +Av2\x98f\xad1E\xf1\xca\xb7\xc9\xc9\xf4;\xef\xe8W\xaf\x96}\x91\xfe\x17\x7f8\ +\xc4R\x89\xd9\x02\x02\x14AP\xd0\x1f$P\xad\xc1S@\xe3U{\xef\x1e\xcb\xcbHI\xa1\ +\x80a 7\xd7\x99iR,\xb2\xb2\xc2\xfd\xfb\xac\xadUiP\x144\x8d\xbe>\xe2q"\x11w\ +\x19\x85\x02\xab\xab\xe4\xf3\xdc\xbb\xc7\xea*\x7f\xcfp|\x88\xa5\x12\xd7\x8ah\ +\x01\x92\nZ\x00\xadz`\x9b\x07\x99\xab\x83\x9d!r\xe2\xf4i\x1dPU\x12\t\xc6\xc7\ +\x19\x1bcx\x98D\x02Uuy\xd8\x0e\xa6m_J,\xc9\x06,\x97\x98\xdb\xe0\'\x1b\xa4T\ +\xa2\x81\xaa 4\x16\xd0\xca\xa6\x19\x8b\xb9S\xb7\xf1\xf6\xdbi\xe0\xc4\t]\xd3\ +\xb8u\x8b\xf1q\xa6\xa7\x99\x98``\xc0]\x83\x13\xe7W9\xd2\xcd#\x8bE\x83\x9b\ +\x8f\x18\r\x11\xaf\x0eB\x07\xde\x89\x0f\x1f\xf6b_\xc1\'\x9f\xa4\x8f\x1e\xd5s\ +\xb9rv\x01\xc1 \xfd\xfd\xbe\xa60!g2o0\xbf\xc1`u\x10\x1al~\xbe\xddo{\xd7\'\ +\xbe\xf8"](\xb0\xb8\xc8\xb5k|\xff=w\xefR(4\x1fu~\x15Kn\x05!cP\xb0\xc0y\x95\ +\xe8T\x81\xa0\x82\x13\'\xf4\x93\'u\xd7\x9fT\x15\xc3`y\x99\xb99n\xdffe\xc5\ +\xafMg\x10V,\xacM\xcan\x11h%\xfb\xed\x05Z\xc1\x993\xfa[o\xe9\x07\x0ep\xe8\ +\x10\x9f~\xaa_\xb9R+\xe3\xf3\xcf\xd3\xaa\xca\xc6\x06\x8b\x8b\xdc\xbcI&\xe3k\ +\x96J\x102\x06\xb76\xc8\x96\xd8\xd8\x14\xd0\x815p\xe1\x82\xbe\x7f?\xe1p\xf9x\ +\xce\xe7\x81\xad\x1d\xd30tU\xadJ\xb3\xde^\xb2Yr9\xe6\xe7\x99\x9foa"\x13\xf2\ +\x16\xd9\x12y\x8b\xca\xc1S\x8e\xc0\xe3\x16g\x04\xaaJ_\x1fO=\xc5\xbe}\xec\xdb\ +\xc7\x9e=\xa4Rh\x1a\xc1 RV\xc5\xe1\xe3\x8f\xd3\x8a\xc2\xa3Gd2\xdc\xba\xd5\ +\xc2,\x96\xa4$)J\x1eY\x94\\# .\xd9\'R\x9b\x15+E\xf1{\xab\xb3\x05\xe4\xf3d\ +\xb3\xadMa\xcar\xb9 o\x02\x16\xce+\xd8f\x10:So\xeb8\xce\xaf\x02\x94$\x0fL\ +\xeel\xb0\xf3\xdb\xef`\x83\x1f\xeb\x85\xc64Q\x14b1\x92\xc9\x16\x07n.\x03\xc8\ +\x83\xc5\x93\x11Ps\xc5x\xf5U\xbdT"\x18$\x91`d\xa45S\x96\xc4\x94\xfc\xf9\xeei\ +0\xedr\xc4\xb6\x0b\xa8\xbf =|\x88e\x11\n\x91H00\xf0\xb8\xf6\xb7W\x80\xeb\xf5\ +\xce0PU\x92I\x86\x86H$Z\xb6y.w\xdc\xf9g\xc7\xfa\x035ht3}\xe1\x05]U\x19\x18`b\ +\x82\xc9I\xbfw!\x1b_\xe6\x9f\xaf\xffr[\x044b\xff\xe2\x8bz(D\x7f?\x93\x93\xcc\ +\xcc01\xd1N\x04j\xd0y\x01\x8d\xd8\xbf\xf4\x92\xde\xdb\xcb\x8e\x1d\xec\xda\ +\xd5\xc2u\xba):,\xc0\x95}%m\xf6\xeee\xdf>v\xed\xf2z\xa1i\x86\x00(\xa0\x82b\ +\x1fY\x9d\x14\xe0\xcd~j\x8a\x99\x19&\'I&\x1b\xbeR\xfa\x80\x021HB\xcc\xde\x81\ +j\x05\x08!\xa5l~\x18G\xa3\xc4b\xe5\x0f\xaa\x8ah0\xe2\xd81]\x08\xfa\xfa\xcaI?\ +5\xd5$m<\xcc\n\xf1<\xd8\x84\x130\x02\t\x08\xb9\x08\xf0\x89\xf1\xf1\xad\x0f\ +\xf1x\xf9F"\xa5\xee\x0c\xc2\xbb\xef\xeaw\xee\x10\x0e3:\xea7\xe9]\xcdV\xa36\ +\x02[M\xbe\n\xbc#`Y<|\xc8\xc2B\xf9\x1e\x96L\xb2c\x07\xbd\xbd[\x93\t\x91^_\ +\xd7\x17\x16\xf8\xe1\x072\x19\xe2q\xc6\xc6\x18\x19!\x99\xf4bo\x9ad\xb3,,\x90\ +\xcb\x95\x0f\xe9\xa1\xa1\xaaz\xd9\x91n\xbe\xcc\xff\x1a\xe2p\x00~\x03\xcf@\ +\x17m\x1cdB\x10\x8d\x12\x8f\xa3ih\x1a\xf18\xd1hU\xac76\xf4\x95\x15r9L\x93X\ +\x8c\xbe>R\xa9\xe6K\xd6.%I\x89\xa61<\xcc\xce\x9dtw\xd7F\xe0h\xf7?k\xdc\x8fk\ +\ny,\x03;C2\x19}n\x8e\xeb\xd7\x01\xf6\xee%\x12!\x1cF\x88\xaaE\xfc\xfe\xfb\ +\xfa\xe2"\x81\x00\xbbw\x93J\xd5V\xbe\\m\xde\xb8\xc1\xf5\xebH\xc9\x9e=\x84\ +\xc3D\xa3[\xcf\x1c\xe9& \x08\x07xc\xf0\xc3\xbfd~\x07I{\x01\xb8\x0b\xf0\x9e\t\ +\x18\x1cL\x9f9\xa3\x7f\xf3\r@\xa9D\x7f\xbf\x1d\x87\xaa-\xe8\xf2e\x96\x97\xcb\ +kqr\xb2\xa1\x80z\x9bv.\xb1Y\xb3\xa8\x04A\x81\x1e\x85Q\x15\x18\x85x%\x02n)\ +\x94\x16M\x1b\x9d\xd9,\xd9,KK\xe5\x12Z=\xbf\xe5eVW)\x14(\x95\xbc\xdc\xef\xc4\ +\xeb\xaf\xa7\xedep\xe3\x067n\xf0\xe0\x01\x86\x01\x0e\xf7\x0f\xa9\xec\x0e\xb3\ +\xb0\xff\x00lE\xa7A\x04\xd2Mv\xd2d\x92\x9e\x1e\x8aE\x82A\xf7\xba\xb4\x9d\x00\ +\xfd\xfd\xa4R.\xd9\xdc\x08==H\x89\xa2\xd4\xee\xcb\x15\xf7\xdb\x85-\xa7\xdf\ +\xeb\x04lR\xaf_\t\xce]rj\n(W\xa7\xeb\xf7\xbb\x8f>\xd2\xe7\xe6(\x95H\xa5\x98\ +\x9a\xa2\xbf\x9fP\xc8\x9d\xb1\xd3\xa6]\xf1\xcefI&\xd9\xbb\xb7\xbc\xeek\xdcoW\ +\xb5\x9ch\xbc\x06\xdc\x82`\xbf\x9e\xdb\xfd\x81\xbe\xber\x7f \x95"\x14*\xffdY\ +\xe4rd2\xec\xd9\x83\x94\xc4b\x0c\x0c\x90HxE\xa0\xc6f\xa1@4\xba5* \x08\t\xfa\ +\x83\x8c\x87\x18\x0b\x11\x0f\xd4V\xa7\xeb\xce\x81j\xde\xb2A\xb7\xc9\xa3C\xe3\ +\xac\xad{\xd7\xd3\x9b\xda|!NH0\x10d:\xcas\x1a\xd3\x91ry\xddYCi\xb2\x0b\x89\ +\xb3\xee\x1a<\n\x10\xfek\x13\xde\x03+\xec\xa7\xa2\xcct1\x11&Q\xd7\x1c\xc0\ +\xcfA&\xb6\xbd\xb5\xe7\x02\'\xfb\x83]LE\x1a\xb6\x98|\xed\x0eOX\x837\xfb\x9a\ +\x1a\x9c\xdf\xab\xc4\x13\xd3\xe0\xdf\xf76Z\xb8\x0b=\x01\rB\x1c\xed\n0\xa42\ +\xed\x8f=\xad^\xe6\xb6U\x83\x10\xc7 \xf5Y\xee\x8d\x99.\x9e\xd3\xdc\xd9\xd7\ +\xd7p[\xbf\x8d\x9e\xed\xbc\x8c\xe3\xbd\x08q\x12&\xe0Y\xf8\xd5/cL\xfb\xf0\xbd\ +\x8d6_h\xc4Y\xb0\x90\xbfoo\xf4\x16^I\xa0\x05\x98\x88\xf0Y\xeeY\xd8\r\xa30\ +\xf8\xb3\xab\xf9\xd2\xcfc\x8a\xbf"m\x93\x83\xac9\xda\x95q*EL!"H\x04\x19\x0f\ +\xf1\xf2\x7f\xae\xc0 \xc4!\x02\x8a\xeb\x7f\x90\xb9\xf6\x00\\\xde\xc8Z\xd6\ +\x00X`@\x11\xf9\'\xaf\xa7\xde\x1c\x06P\x05\x89 \xa3!\x92\n\xe1\x00Z\x80gf\ +\x17*\xd4+\x0f\xd7kp\x15\xd0\xa1\xaaD\x00\xc2\xa0"\xde\x03\x0bN\xe5 \x0fYX\ +\x83\xaa~\xf2\x85\x89\xc3\x8a(w\xadw~\x9b\x03\xc5Q&\xf1B\xa3\x16L\x87"P\x0f\ +\xbd\x04F\r{\x07|\x91v\x06\xa1\x15\x01<\xb6\x06\xbd\x93mO9#<:`\xdbP\x9d\xee(\ +{\x9a\xf5\xef\x1a\x08h\x9bD\xa7\xd97\xc5\xff\x00n\xb9j)\xe8*\xac\xf1\x00\x00\ +\x00\x00IEND\xaeB`\x82' + +def getTest2Bitmap(): + return BitmapFromImage(getTest2Image()) + +def getTest2Image(): + stream = cStringIO.StringIO(getTest2Data()) + return ImageFromStream(stream) + +#---------------------------------------------------------------------- + +if __name__ == '__main__': + main() diff --git a/wxPython/tests/test_gcMemDC.py b/wxPython/tests/test_gcMemDC.py new file mode 100644 index 0000000000..3b6457547d --- /dev/null +++ b/wxPython/tests/test_gcMemDC.py @@ -0,0 +1,35 @@ +""" +Tests using a memory dc (or a buffered dc) as the target of a +wx.GraphicsContext. +""" + +import wx +#import os; print "PID:", os.getpid(); raw_input("Press Enter...") + + +class TestPanel(wx.Panel): + def __init__(self, *args, **kw): + wx.Panel.__init__(self, *args, **kw) + self.Bind(wx.EVT_PAINT, self.OnPaint) + self.Bind(wx.EVT_SIZE, self.OnSize) + + def OnSize(self, evt): + self.Refresh() + + def OnPaint(self, evt): + #dc = wx.PaintDC(self) + dc = wx.BufferedPaintDC(self) + gcdc = wx.GCDC(dc) + + sz = self.GetSize() + gcdc.SetBackground(wx.Brush(self.GetBackgroundColour())) + gcdc.Clear() + gcdc.DrawLine(0, 0, sz.width, sz.height) + gcdc.DrawLine(sz.width, 0, 0, sz.height) + + +app = wx.App(False) +frm = wx.Frame(None, title="GC/MemoryDC") +pnl = TestPanel(frm) +frm.Show() +app.MainLoop() diff --git a/wxPython/tests/test_gcText.py b/wxPython/tests/test_gcText.py new file mode 100644 index 0000000000..2508b8c6b6 --- /dev/null +++ b/wxPython/tests/test_gcText.py @@ -0,0 +1,77 @@ + +import wx + +#---------------------------------------------------------------------- + + +class TestPanel(wx.Panel): + def __init__(self, parent): + wx.Panel.__init__(self, parent, -1) + self.Bind(wx.EVT_PAINT, self.OnPaint) + + + def OnPaint(self, evt): + dc = wx.PaintDC(self) + try: + gc = wx.GraphicsContext.Create(dc) + except NotImplementedError: + dc.DrawText("This build of wxPython does not support the wx.GraphicsContext " + "family of classes.", + 25, 25) + return + + font = wx.SystemSettings.GetFont(wx.SYS_DEFAULT_GUI_FONT) + font.SetWeight(wx.BOLD) + gc.SetFont(font) + + gc.Translate(10, 10) + self.DrawText(gc, 'normal') + + gc.Translate(0, 25) + gc.PushState() + gc.Scale(2, 2) + self.DrawText(gc, 'scaled') + gc.PopState() + + gc.Translate(0, 35) + self.DrawText(gc, '\nnewline') + + def DrawText(self, gc, txt): + txt = "This is a test: " + txt + w,h,d,e = gc.GetFullTextExtent(txt) + ##print w,h,d,e + + gc.DrawText(txt, 0, 0) + + pen = wx.Pen("red", 1) + gc.SetPen(pen) + + path = gc.CreatePath() + path.MoveToPoint(-1, -1) + self.MakeCrosshair(path) + gc.StrokePath(path) + + path = gc.CreatePath() + path.MoveToPoint(w+1, h+1) + self.MakeCrosshair(path) + gc.StrokePath(path) + + + + + def MakeCrosshair(self, path): + x, y = path.GetCurrentPoint() + path.MoveToPoint(x-5, y) + path.AddLineToPoint(x+5,y) + path.MoveToPoint(x, y-5) + path.AddLineToPoint(x, y+5) + path.MoveToPoint(x,y) + + + + +app = wx.App(False) +frm = wx.Frame(None, title="Testing GC Text") +pnl = TestPanel(frm) +frm.Show() +app.MainLoop() diff --git a/wxPython/tests/test_gcdcDrawEllipticArc.py b/wxPython/tests/test_gcdcDrawEllipticArc.py new file mode 100644 index 0000000000..b66151c1dd --- /dev/null +++ b/wxPython/tests/test_gcdcDrawEllipticArc.py @@ -0,0 +1,41 @@ +import wx + +class Canvas(wx.Panel): + def __init__(self, parent): + wx.Panel.__init__(self, parent) + self.Bind (wx.EVT_PAINT, self.OnPaint) + self.bkg_brush = wx.Brush((190,190,255)) + self.v_pos = 100 + + def OnPaint(self, evt): + dc = wx.PaintDC(self) + dc = wx.GCDC(dc) + dc.SetBackground(self.bkg_brush) + dc.Clear() + dc.DrawEllipticArc(100, 200, 200, 200-self.v_pos, 90,270) + dc.DrawLine(100, 100, 100, 300) + + +class MyFrame(wx.Frame): + def __init__(self): + wx.Frame.__init__(self, None, title="DrawEllipticArc") + self.SetSize((640,480)) + self.canvas = Canvas(self) + self.slider = wx.Slider(self, minValue=0, maxValue=100) + box = wx.BoxSizer(wx.VERTICAL) + box.Add(self.canvas, 1, wx.EXPAND) + box.Add(self.slider, 0, wx.EXPAND) + self.SetSizer(box) + self.Show() + self.CenterOnScreen() + self.slider.Bind (wx.EVT_SLIDER, self.OnSlide) + + def OnSlide(self, evt): + self.canvas.v_pos = 100+self.slider.GetValue() + self.canvas.Refresh(False) + + +if __name__ == "__main__": + app = wx.App(0) + frame = MyFrame() + app.MainLoop() diff --git a/wxPython/tests/test_gcdcDrawRect.py b/wxPython/tests/test_gcdcDrawRect.py new file mode 100644 index 0000000000..5ed24758e5 --- /dev/null +++ b/wxPython/tests/test_gcdcDrawRect.py @@ -0,0 +1,44 @@ + +import wx + +CLIP = True + +class TestPanel(wx.Panel): + def __init__(self, parent, *args): + wx.Panel.__init__(self, parent, *args) + self.Bind(wx.EVT_PAINT, self.OnPaint) + + def OnPaint(self, evt): + pdc = wx.PaintDC(self) + gcdc = wx.GCDC(pdc) + + for dc, y in [(gcdc, 10), (pdc, 40)]: + r = wx.Rect(10, y, 100, 20) + + dc.SetPen(wx.Pen("red", 1)) + dc.SetBrush(wx.Brush("light blue")) + + if CLIP: dc.SetClippingRect(r) + dc.DrawRectangleRect(r) + dc.DestroyClippingRegion() + + r.Offset((120, 0)) + if CLIP: dc.SetClippingRect(r) + dc.DrawRoundedRectangleRect(r, 8) + dc.DestroyClippingRegion() + + + r.Offset((120, 0)) + if CLIP: dc.SetClippingRect(r) + dc.DrawEllipseRect(r) + dc.DestroyClippingRegion() + + +app = wx.App(False) +frm = wx.Frame(None, title="wxGCDC Drawing Rectangles") +pnl = TestPanel(frm) +frm.Show() +app.MainLoop() + + + diff --git a/wxPython/tests/test_logWindow.py b/wxPython/tests/test_logWindow.py new file mode 100755 index 0000000000..88cda7f592 --- /dev/null +++ b/wxPython/tests/test_logWindow.py @@ -0,0 +1,47 @@ +import wx +print wx.VERSION + + +class Frame(wx.Frame): + def __init__(self, *args, **kw): + wx.Frame.__init__(self, *args, **kw) + self.log = wx.LogWindow(self, "Program Log", False, False) + + pnl = wx.Panel(self) + btn1 = wx.Button(pnl, -1, "Toggle Log") + btn2 = wx.Button(pnl, -1, "Log Message") + btn3 = wx.Button(pnl, -1, "Close") + + sizer = wx.BoxSizer(wx.VERTICAL) + sizer.Add(btn1, 0, wx.ALL, 10) + sizer.Add(btn2, 0, wx.ALL, 10) + sizer.Add(btn3, 0, wx.ALL, 10) + pnl.SetSizer(sizer) + + self.Bind(wx.EVT_BUTTON, self.OnToggleLog, btn1) + self.Bind(wx.EVT_BUTTON, self.OnLogMessage, btn2) + self.Bind(wx.EVT_BUTTON, self.OnDoClose, btn3) + self.Bind(wx.EVT_CLOSE, self.OnClose) + + + def OnClose(self, evt): + self.log.this.disown() + wx.Log.SetActiveTarget(None) + self.Destroy() + + + def OnToggleLog(self, evt): + self.log.Show(not self.log.GetFrame().IsShown()) + + def OnLogMessage(self, evt): + wx.LogMessage("This is a test message") + + def OnDoClose(self, evt): + self.Close() + + +app = wx.App(False) +frm = Frame(None, title="Testing wx.LogWindow") +frm.Show() +app.MainLoop() + diff --git a/wxPython/tests/test_mediaCtrl.py b/wxPython/tests/test_mediaCtrl.py new file mode 100644 index 0000000000..d79607919a --- /dev/null +++ b/wxPython/tests/test_mediaCtrl.py @@ -0,0 +1,120 @@ +import wx +import wx.media +from wx.lib.mixins.inspection import InspectableApp + +import os; print os.getpid(); raw_input("press enter...") + +class TestFrame(wx.Frame): + def __init__(self, *args, **kw): + wx.Frame.__init__(self, *args, **kw) + self.CreateStatusBar() + pnl = wx.Panel(self) + + self.mc = wx.media.MediaCtrl(pnl, size=(-1,200)) + #self.fn = "/home/robind/smb4k/BEAST/MyVideos/SageTV/48HoursMystery-6199728-0.mpg" + + self.Bind(wx.media.EVT_MEDIA_PLAY, self.OnMediaPlay, self.mc) + self.Bind(wx.media.EVT_MEDIA_PAUSE, self.OnMediaPause, self.mc) + self.Bind(wx.media.EVT_MEDIA_STOP, self.OnMediaStop, self.mc) + self.Bind(wx.media.EVT_MEDIA_FINISHED, self.OnMediaFinished, self.mc) + self.Bind(wx.media.EVT_MEDIA_LOADED, self.OnMediaLoaded, self.mc) + + selectBtn = wx.Button(pnl, -1, "Select") + loadBtn = wx.Button(pnl, -1, "Load") + playBtn = wx.Button(pnl, -1, "Play") + pauseBtn= wx.Button(pnl, -1, "Pause") + stopBtn = wx.Button(pnl, -1, "Stop") + + self.Bind(wx.EVT_BUTTON, self.OnBtnSelect, selectBtn) + self.Bind(wx.EVT_BUTTON, self.OnBtnLoad, loadBtn) + self.Bind(wx.EVT_BUTTON, self.OnBtnPlay, playBtn) + self.Bind(wx.EVT_BUTTON, self.OnBtnPause, pauseBtn) + self.Bind(wx.EVT_BUTTON, self.OnBtnStop, stopBtn) + + + vbox = wx.BoxSizer(wx.VERTICAL) + vbox.AddF(self.mc, wx.SizerFlags(1).Expand().Border(wx.ALL, 5)) + hbox = wx.BoxSizer(wx.HORIZONTAL) + hbox.AddF(selectBtn, wx.SizerFlags().Border()) + hbox.AddF(loadBtn, wx.SizerFlags().Border()) + hbox.AddF(playBtn, wx.SizerFlags().Border()) + hbox.AddF(pauseBtn, wx.SizerFlags().Border()) + hbox.AddF(stopBtn, wx.SizerFlags().Border()) + vbox.Add(hbox) + pnl.SetSizer(vbox) + + sizer = wx.BoxSizer() + sizer.AddF(pnl, wx.SizerFlags(1).Expand()) + self.SetSizer(sizer) + wx.CallLater(200, self.SetClientSize, pnl.GetBestSize()) + + self.timer = wx.Timer(self) + self.Bind(wx.EVT_TIMER, self.OnShowStatus) + self.timer.Start(500) + + + def OnBtnSelect(self, evt): + name = wx.FileSelector("Choose media file") + if name: + self.fn = name + + def OnBtnLoad(self, evt): + print "Loading %s..." % self.fn + print "Load:", self.mc.Load(self.fn) + + def OnBtnPlay(self, evt): + print "Play:", self.mc.Play() + + def OnBtnPause(self, evt): + print "Pause:", self.mc.Pause() + + def OnBtnStop(self, evt): + print "Stop:", self.mc.Stop() + + + def OnShowStatus(self, evt): + current = self.mc.Tell() + length = self.mc.Length() + + dl_current = self.mc.GetDownloadProgress() + dl_length = self.mc.GetDownloadTotal() + + cw,ch = self.mc.GetSize() + bw,bh = self.mc.GetBestSize() + + vol = self.mc.GetVolume() + + stateMap = { wx.media.MEDIASTATE_PLAYING : "Playing", + wx.media.MEDIASTATE_PAUSED : "Paused", + wx.media.MEDIASTATE_STOPPED : "Stopped", } + state = stateMap.get(self.mc.GetState(), "Other") + + st = "Size:%d,%d BSize:%d,%d Pos:%d/%d DL:%d/%d V:%d %s" % ( + cw,ch, bw,bh, current, length, dl_current, dl_length, vol*100, state) + + self.SetStatusText(st) + + + + def OnMediaPlay(self, evt): + print "OnMediaPlay" + + def OnMediaPause(self, evt): + print "OnMediaPause" + + def OnMediaStop(self, evt): + print "OnMediaStop" + + def OnMediaFinished(self, evt): + print "OnMediaFinished" + + def OnMediaLoaded(self, evt): + print "OnMediaLoaded" + + + +app = InspectableApp(False) +frm = TestFrame(None, title="simple wxMediaCtrl test") +frm.Show() +app.MainLoop() + diff --git a/wxPython/tests/test_scaleText.py b/wxPython/tests/test_scaleText.py new file mode 100644 index 0000000000..1c55829295 --- /dev/null +++ b/wxPython/tests/test_scaleText.py @@ -0,0 +1,71 @@ +import wx + +METHOD = 1 +SCALE = 0.5 + +class TestPanel(wx.Panel): + """ + Shows some ways to scale text down + """ + def __init__(self, *args, **kw): + wx.Panel.__init__(self, *args, **kw) + self.Bind(wx.EVT_PAINT, self.OnPaint) + + def OnPaint(self, evt): + pdc = wx.PaintDC(self) + font = wx.FFont(28, wx.SWISS) + pdc.SetFont(font) + txt = "Here is some text" + + # draw the original unscaled text + pdc.DrawText(txt, 10, 10) + + if METHOD == 0: + # Create a new font that is scaled + points = font.GetPointSize() * SCALE + font.SetPointSize(points) + pdc.SetFont(font) + pdc.DrawText(txt, 10, 100) + + if METHOD == 1: + # Draw to a bitmap and scale that + w,h = pdc.GetTextExtent(txt) + bmp = wx.EmptyBitmap(w, h) + mdc = wx.MemoryDC(bmp) + mdc.SetBackground(wx.Brush(self.GetBackgroundColour())) + mdc.Clear() + mdc.SetFont(font) + mdc.DrawText(txt, 0,0) + del mdc + + image = bmp.ConvertToImage() + image = image.Scale(w*SCALE, h*SCALE, wx.IMAGE_QUALITY_HIGH) + bmp = wx.BitmapFromImage(image) + bmp.SetMaskColour(self.GetBackgroundColour()) + + pdc.DrawBitmap(bmp, 10,100) + + + elif METHOD == 2: + # Just scale the DC and draw the text again + pdc.SetUserScale(SCALE, SCALE) + pdc.DrawText(txt, 10/SCALE, 100/SCALE) + + + elif METHOD == 3: + # Use a GraphicsContext for scaling. Since it uses a + # floating point coordinate system, it can be more + # accurate. + gc = wx.GraphicsContext.Create(pdc) + gc.Scale(SCALE, SCALE) + gc.SetFont(font) + gc.DrawText(txt, 10/SCALE, 100/SCALE) + + + +app = wx.App() +frm = wx.Frame(None, title="test_scaleText") +pnl = TestPanel(frm) +frm.Show() +app.MainLoop() + diff --git a/wxPython/wx/lib/buttonpanel.py b/wxPython/wx/lib/buttonpanel.py index 7df01da87d..703474a94b 100644 --- a/wxPython/wx/lib/buttonpanel.py +++ b/wxPython/wx/lib/buttonpanel.py @@ -1584,7 +1584,7 @@ class ButtonPanel(wx.PyPanel): def OnPaint(self, event): """ Handles the wx.EVT_PAINT event for ButtonPanel. """ - + dc = wx.BufferedPaintDC(self) rect = self.GetClientRect() @@ -1744,7 +1744,7 @@ class ButtonPanel(wx.PyPanel): def OnMouseMove(self, event): """ Handles the wx.EVT_MOTION event for ButtonPanel. """ - + # Check to see if we are hovering a button tabId, flags = self.HitTest(event.GetPosition()) @@ -1765,7 +1765,8 @@ class ButtonPanel(wx.PyPanel): self.RepaintOldSelection() if btn.GetRect().Contains(event.GetPosition()): - btn.SetStatus("Hover") + if btn.GetStatus() != "Pressed": + btn.SetStatus("Hover") else: btn.SetStatus("Normal") @@ -1808,21 +1809,21 @@ class ButtonPanel(wx.PyPanel): btn.SetFocus(False) if hit.GetStatus() == "Pressed": - # Fire a button click event - btnEvent = wx.CommandEvent(wx.wxEVT_COMMAND_BUTTON_CLICKED, hit.GetId()) - self.GetEventHandler().ProcessEvent(btnEvent) - hit.SetToggled(not hit.GetToggled()) # Update the button status to be hovered hit.SetStatus("Hover") hit.SetFocus() self._currentButton = tabId + + # Fire a button click event + btnEvent = wx.CommandEvent(wx.wxEVT_COMMAND_BUTTON_CLICKED, hit.GetId()) + self.GetEventHandler().ProcessEvent(btnEvent) def OnMouseLeave(self, event): """ Handles the wx.EVT_LEAVE_WINDOW event for ButtonPanel. """ - + # Reset all buttons statuses for btn in self._vButtons: if not btn.IsEnabled(): diff --git a/wxPython/wx/lib/buttons.py b/wxPython/wx/lib/buttons.py index a7290cbbde..53c908a53f 100644 --- a/wxPython/wx/lib/buttons.py +++ b/wxPython/wx/lib/buttons.py @@ -589,6 +589,8 @@ class ThemedGenButton(GenButton): state = 0 else: state = wx.CONTROL_PRESSED + if not self.IsEnabled(): + state = wx.CONTROL_DISABLED wx.RendererNative.Get().DrawPushButton(self, dc, rect, state) class ThemedGenBitmapButton(ThemedGenButton, GenBitmapButton): diff --git a/wxPython/wx/lib/customtreectrl.py b/wxPython/wx/lib/customtreectrl.py index 87313192a2..dd05d7227a 100644 --- a/wxPython/wx/lib/customtreectrl.py +++ b/wxPython/wx/lib/customtreectrl.py @@ -3,7 +3,7 @@ # Inspired By And Heavily Based On wxGenericTreeCtrl. # # Andrea Gavana, @ 17 May 2006 -# Latest Revision: 26 May 2006, 22.30 CET +# Latest Revision: 02 Mar 2007, 22.30 CET # # # TODO List @@ -134,8 +134,8 @@ CustomTreeCtrl has been tested on the following platforms: * Mac OS (Thanks to John Jackson). -Latest Revision: Andrea Gavana @ 26 May 2006, 22.30 CET -Version 0.8 +Latest Revision: Andrea Gavana @ 02 Mar 2007, 22.30 CET +Version 0.9 """ @@ -1736,7 +1736,7 @@ def EventFlagsToSelType(style, shiftDown=False, ctrlDown=False): class CustomTreeCtrl(wx.PyScrolledWindow): def __init__(self, parent, id=wx.ID_ANY, pos=wx.DefaultPosition, size=wx.DefaultSize, - style=0, ctstyle=TR_DEFAULT_STYLE, validator=wx.DefaultValidator, + style=TR_DEFAULT_STYLE, ctstyle=0, validator=wx.DefaultValidator, name="CustomTreeCtrl"): """ Default class constructor. @@ -1749,9 +1749,8 @@ class CustomTreeCtrl(wx.PyScrolledWindow): size: window size. If the default size (-1, -1) is specified then the window is sized appropriately. - style: the underlying wx.ScrolledWindow style + style: the underlying wx.ScrolledWindow style + CustomTreeCtrl window style. This can be one of: - ctstyle: CustomTreeCtrl window style. This can be one of: TR_NO_BUTTONS TR_HAS_BUTTONS # draw collapsed/expanded btns TR_NO_LINES # don't draw lines at all @@ -1769,10 +1768,14 @@ class CustomTreeCtrl(wx.PyScrolledWindow): TR_AUTO_CHECK_PARENT # only meaningful for checkboxes TR_AUTO_TOGGLE_CHILD # only meaningful for checkboxes + ctstyle: kept for backward compatibility. + validator: window validator. name: window name. """ + + style = style | ctstyle self._current = self._key_current = self._anchor = self._select_me = None self._hasFocus = False @@ -1873,14 +1876,14 @@ class CustomTreeCtrl(wx.PyScrolledWindow): self._itemWithWindow = [] if wx.Platform == "__WXMAC__": - ctstyle &= ~TR_LINES_AT_ROOT - ctstyle |= TR_NO_LINES + style &= ~TR_LINES_AT_ROOT + style |= TR_NO_LINES platform, major, minor = wx.GetOsVersion() if major < 10: - ctstyle |= TR_ROW_LINES + style |= TR_ROW_LINES - self._windowStyle = ctstyle + self._windowStyle = style # Create the default check image list self.SetImageListCheck(13, 13) @@ -2370,7 +2373,7 @@ class CustomTreeCtrl(wx.PyScrolledWindow): return item.GetText() - def GetItemImage(self, item, which): + def GetItemImage(self, item, which=TreeItemIcon_Normal): """Returns the item image.""" if not item: @@ -3467,8 +3470,8 @@ class CustomTreeCtrl(wx.PyScrolledWindow): self.ProcessEvent(event) - def ExpandAll(self, item): - """Expands all the items.""" + def ExpandAllChildren(self, item): + """Expands all the items children of the input item.""" if not item: raise Exception("\nERROR: Invalid Tree Item. ") @@ -3481,10 +3484,17 @@ class CustomTreeCtrl(wx.PyScrolledWindow): child, cookie = self.GetFirstChild(item) while child: - self.ExpandAll(child) + self.ExpandAllChildren(child) child, cookie = self.GetNextChild(item, cookie) + def ExpandAll(self): + """Expands all CustomTreeCtrl items.""" + + if self._anchor: + self.ExpandAllChildren(self._anchor) + + def Collapse(self, item): """ Collapse an item, sending a EVT_TREE_ITEM_COLLAPSING and @@ -3578,7 +3588,8 @@ class CustomTreeCtrl(wx.PyScrolledWindow): # the tree might not have the root item at all if rootItem: self.UnselectAllChildren(rootItem) - + + self.Unselect() # Recursive function ! # To stop we must have crt_item= 0: window = oldNotebook.GetPage(nTabPage) @@ -4623,6 +4626,12 @@ class PageContainer(wx.Panel): self._ImageList = imglist + def AssignImageList(self, imglist): + """ Assigns the image list for the page control. """ + + self._ImageList = imglist + + def GetImageList(self): """ Returns the image list for the page control. """ diff --git a/wxPython/wx/lib/inspection.py b/wxPython/wx/lib/inspection.py new file mode 100644 index 0000000000..38137ea606 --- /dev/null +++ b/wxPython/wx/lib/inspection.py @@ -0,0 +1,901 @@ +#---------------------------------------------------------------------------- +# Name: wx.lib.inspection +# Purpose: A widget inspection tool that allows easy introspection of +# all the live widgets and sizers in an application. +# +# Author: Robin Dunn +# +# Created: 26-Jan-2007 +# RCS-ID: $Id$ +# Copyright: (c) 2007 by Total Control Software +# Licence: wxWindows license +#---------------------------------------------------------------------------- + +# NOTE: This class was originally based on ideas sent to the +# wxPython-users mail list by Dan Eloff. See also +# wx.lib.mixins.inspect for a class that can be mixed-in with wx.App +# to provide Hot-Key access to the inspection tool. + +import wx +import wx.py +import wx.stc +import wx.aui +import sys + +#---------------------------------------------------------------------------- + +class InspectionTool: + """ + The InspectionTool is a singleton that manages creating and + showing an InspectionFrame. + """ + + # Note: This is the Borg design pattern which ensures that all + # instances of this class are actually using the same set of + # instance data. See + # http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/66531 + __shared_state = {} + def __init__(self): + self.__dict__ = self.__shared_state + if not hasattr(self, 'initialized'): + self.initialized = False + + def Init(self, pos=wx.DefaultPosition, size=wx.Size(850,700), + config=None, locals=None, app=None): + """ + Init is used to set some parameters that will be used later + when the inspection tool is shown. Suitable defaults will be + used for all of these parameters if they are not provided. + + :param pos: The default position to show the frame at + :param size: The default size of the frame + :param config: A wx.Config object to be used to store layout + and other info to when the inspection frame is closed. + This info will be restored the next time the inspection + frame is used. + :param locals: A dictionary of names to be added to the PyCrust + namespace. + :param app: A reference to the wx.App object. + """ + self._frame = None + self._pos = pos + self._size = size + self._config = config + self._locals = locals + self._app = app + if not self._app: + self._app = wx.GetApp() + self.initialized = True + + + def Show(self, selectObj=None, refreshTree=False): + """ + Creates the inspection frame if it hasn't been already, and + raises it if neccessary. Pass a widget or sizer in selectObj + to have that object be preselected in widget tree. If + refreshTree is True then the widget tree will be rebuilt, + otherwise if the tree has already been built it will be left + alone. + """ + if not self.initialized: + self.Init() + + parent = self._app.GetTopWindow() + if not selectObj: + selectObj = parent + if not self._frame: + self._frame = InspectionFrame( parent=parent, + pos=self._pos, + size=self._size, + config=self._config, + locals=self._locals, + app=self._app) + if selectObj: + self._frame.SetObj(selectObj) + if refreshTree: + self._frame.RefreshTree() + self._frame.Show() + if self._frame.IsIconized(): + self._frame.Iconize(False) + self._frame.Raise() + + +#---------------------------------------------------------------------------- + + +class InspectionFrame(wx.Frame): + """ + This class is the frame that holds the wxPython inspection tools. + The toolbar and AUI splitters/floating panes are also managed + here. The contents of the tool windows are handled by other + classes. + """ + def __init__(self, wnd=None, locals=None, config=None, + app=None, title="wxPython Widget Inspection Tool", + *args, **kw): + kw['title'] = title + wx.Frame.__init__(self, *args, **kw) + + self.includeSizers = False + self.started = False + + self.SetIcon(getIconIcon()) + self.MacSetMetalAppearance(True) + self.MakeToolBar() + panel = wx.Panel(self, size=self.GetClientSize()) + + # tell FrameManager to manage this frame + self.mgr = wx.aui.AuiManager(panel, + wx.aui.AUI_MGR_DEFAULT + | wx.aui.AUI_MGR_TRANSPARENT_DRAG + | wx.aui.AUI_MGR_ALLOW_ACTIVE_PANE) + + # make the child tools + self.tree = InspectionTree(panel) + self.info = InspectionInfoPanel(panel, + style=wx.NO_BORDER, + ) + + if not locals: + locals = {} + myIntroText = ( + "Python %s on %s\nNOTE: The 'obj' variable refers to the object selected in the tree." + % (sys.version.split()[0], sys.platform)) + self.crust = wx.py.crust.Crust(panel, locals=locals, + intro=myIntroText, + showInterpIntro=False, + style=wx.NO_BORDER, + ) + self.locals = self.crust.shell.interp.locals + self.crust.shell.interp.introText = '' + self.locals['obj'] = self.obj = wnd + self.locals['app'] = app + self.locals['wx'] = wx + wx.CallAfter(self._postStartup) + + # put the chlid tools in AUI panes + self.mgr.AddPane(self.info, + wx.aui.AuiPaneInfo().Name("info").Caption("Object Info"). + CenterPane().CaptionVisible(True). + CloseButton(False).MaximizeButton(True) + ) + self.mgr.AddPane(self.tree, + wx.aui.AuiPaneInfo().Name("tree").Caption("Widget Tree"). + CaptionVisible(True).Left().Dockable(True).Floatable(True). + BestSize((280,200)).CloseButton(False).MaximizeButton(True) + ) + self.mgr.AddPane(self.crust, + wx.aui.AuiPaneInfo().Name("crust").Caption("PyCrust"). + CaptionVisible(True).Bottom().Dockable(True).Floatable(True). + BestSize((400,200)).CloseButton(False).MaximizeButton(True) + ) + + self.mgr.Update() + + if config is None: + config = wx.Config('wxpyinspector') + self.config = config + self.Bind(wx.EVT_CLOSE, self.OnClose) + self.LoadSettings(self.config) + self.crust.shell.lineNumbers = False + self.crust.shell.setDisplayLineNumbers(False) + self.crust.shell.SetMarginWidth(1, 0) + + + def MakeToolBar(self): + tbar = self.CreateToolBar(wx.TB_HORIZONTAL | wx.TB_FLAT | wx.TB_TEXT | wx.NO_BORDER ) + tbar.SetToolBitmapSize((24,24)) + + refreshBmp = getRefreshBitmap() + findWidgetBmp = getFindBitmap() + showSizersBmp = getShowSizersBitmap() + toggleFillingBmp = getShowFillingBitmap() + + refreshTool = tbar.AddLabelTool(-1, 'Refresh', refreshBmp, + shortHelp = 'Refresh widget tree') + findWidgetTool = tbar.AddLabelTool(-1, 'Find', findWidgetBmp, + shortHelp='Find new target widget. Click here and\nthen on another widget in the app.') + showSizersTool = tbar.AddLabelTool(-1, 'Sizers', showSizersBmp, + shortHelp='Include sizers in widget tree', + kind=wx.ITEM_CHECK) + toggleFillingTool = tbar.AddLabelTool(-1, 'Filling', toggleFillingBmp, + shortHelp='Show PyCrust \'filling\'', + kind=wx.ITEM_CHECK) + tbar.Realize() + + self.Bind(wx.EVT_TOOL, self.OnRefreshTree, refreshTool) + self.Bind(wx.EVT_TOOL, self.OnFindWidget, findWidgetTool) + self.Bind(wx.EVT_TOOL, self.OnShowSizers, showSizersTool) + self.Bind(wx.EVT_TOOL, self.OnToggleFilling, toggleFillingTool) + self.Bind(wx.EVT_UPDATE_UI, self.OnShowSizersUI, showSizersTool) + self.Bind(wx.EVT_UPDATE_UI, self.OnToggleFillingUI, toggleFillingTool) + + + + def _postStartup(self): + if self.crust.ToolsShown(): + self.crust.ToggleTools() + self.UpdateInfo() + self.started = True + + + def OnClose(self, evt): + self.SaveSettings(self.config) + evt.Skip() + + + def UpdateInfo(self): + self.info.Update(self.obj) + + + def SetObj(self, obj): + if self.obj is obj: + return + self.locals['obj'] = self.obj = obj + self.UpdateInfo() + if not self.tree.built: + self.tree.BuildTree(obj, includeSizers=self.includeSizers) + else: + self.tree.SelectObj(obj) + + + def RefreshTree(self): + self.tree.BuildTree(self.obj, includeSizers=self.includeSizers) + + + def OnRefreshTree(self, evt): + self.RefreshTree() + self.UpdateInfo() + + + def OnFindWidget(self, evt): + self.Bind(wx.EVT_LEFT_DOWN, self.OnLeftDown) + self.Bind(wx.EVT_MOUSE_CAPTURE_LOST, self.OnCaptureLost) + self.CaptureMouse() + self.finding = wx.BusyInfo("Click on any widget in the app...") + + + def OnCaptureLost(self, evt): + self.Unbind(wx.EVT_LEFT_DOWN) + self.Unbind(wx.EVT_MOUSE_CAPTURE_LOST) + del self.finding + + def OnLeftDown(self, evt): + self.ReleaseMouse() + wnd = wx.FindWindowAtPointer() + if wnd is not None: + self.SetObj(wnd) + else: + wx.Bell() + self.OnCaptureLost(evt) + + + def OnShowSizers(self, evt): + self.includeSizers = not self.includeSizers + self.RefreshTree() + + + def OnToggleFilling(self, evt): + self.crust.ToggleTools() + + + def OnShowSizersUI(self, evt): + evt.Check(self.includeSizers) + + + def OnToggleFillingUI(self, evt): + if self.started: + evt.Check(self.crust.ToolsShown()) + + + def LoadSettings(self, config): + self.crust.LoadSettings(config) + + pos = wx.Point(config.ReadInt('Window/PosX', -1), + config.ReadInt('Window/PosY', -1)) + + size = wx.Size(config.ReadInt('Window/Width', -1), + config.ReadInt('Window/Height', -1)) + self.SetSize(size) + self.Move(pos) + + perspective = config.Read('perspective', '') + if perspective: + self.mgr.LoadPerspective(perspective) + self.includeSizers = config.ReadBool('includeSizers', False) + + + def SaveSettings(self, config): + self.crust.SaveSettings(config) + + if not self.IsIconized() and not self.IsMaximized(): + w, h = self.GetSize() + config.WriteInt('Window/Width', w) + config.WriteInt('Window/Height', h) + + px, py = self.GetPosition() + config.WriteInt('Window/PosX', px) + config.WriteInt('Window/PosY', py) + + perspective = self.mgr.SavePerspective() + config.Write('perspective', perspective) + config.WriteBool('includeSizers', self.includeSizers) + +#--------------------------------------------------------------------------- + +# should inspection frame (and children) be includeed in the tree? +INCLUDE_INSPECTOR = True + +class InspectionTree(wx.TreeCtrl): + """ + All of the widgets in the app, and optionally their sizers, are + loaded into this tree. + """ + def __init__(self, *args, **kw): + #s = kw.get('style', 0) + #kw['style'] = s | wx.TR_DEFAULT_STYLE | wx.TR_HIDE_ROOT + wx.TreeCtrl.__init__(self, *args, **kw) + self.roots = [] + self.built = False + self.Bind(wx.EVT_TREE_SEL_CHANGED, self.OnSelectionChanged) + self.toolFrame = wx.GetTopLevelParent(self) + if 'wxMac' in wx.PlatformInfo: + self.SetWindowVariant(wx.WINDOW_VARIANT_SMALL) + + + def BuildTree(self, startWidget, includeSizers=False): + if self.GetCount(): + self.DeleteAllItems() + self.roots = [] + self.built = False + + realRoot = self.AddRoot('Top-level Windows') + + for w in wx.GetTopLevelWindows(): + if w is wx.GetTopLevelParent(self) and not INCLUDE_INSPECTOR: + continue + root = self._AddWidget(realRoot, w, includeSizers) + self.roots.append(root) + + # Expand the subtree containing the startWidget, and select it. + if not startWidget or not isinstance(startWidget, wx.Window): + startWidget = wx.GetApp().GetTopWindow() + top = wx.GetTopLevelParent(startWidget) + topItem = self.FindWidgetItem(top) + if topItem: + self.ExpandAllChildren(topItem) + self.SelectObj(startWidget) + self.built = True + + + def _AddWidget(self, parentItem, widget, includeSizers): + text = self.GetTextForWidget(widget) + item = self.AppendItem(parentItem, text) + self.SetItemPyData(item, widget) + + # Add the sizer and widgets in the sizer, if we're showing them + widgetsInSizer = [] + if includeSizers and widget.GetSizer() is not None: + widgetsInSizer = self._AddSizer(item, widget.GetSizer()) + + # Add any children not in the sizer, or all children if we're + # not showing the sizers + for child in widget.GetChildren(): + if not child in widgetsInSizer and not child.IsTopLevel(): + self._AddWidget(item, child, includeSizers) + + return item + + + def _AddSizer(self, parentItem, sizer): + widgets = [] + text = self.GetTextForSizer(sizer) + item = self.AppendItem(parentItem, text) + self.SetItemPyData(item, sizer) + self.SetItemTextColour(item, "blue") + + for si in sizer.GetChildren(): + if si.IsWindow(): + w = si.GetWindow() + self._AddWidget(item, w, True) + widgets.append(w) + elif si.IsSizer(): + widgets += self._AddSizer(item, si.GetSizer()) + else: + i = self.AppendItem(item, "Spacer") + self.SetItemPyData(i, si) + self.SetItemTextColour(i, "blue") + return widgets + + + def FindWidgetItem(self, widget): + """ + Find the tree item for a widget. + """ + for item in self.roots: + found = self._FindWidgetItem(widget, item) + if found: + return found + return None + + def _FindWidgetItem(self, widget, item): + if self.GetItemPyData(item) is widget: + return item + child, cookie = self.GetFirstChild(item) + while child: + found = self._FindWidgetItem(widget, child) + if found: + return found + child, cookie = self.GetNextChild(item, cookie) + return None + + + def GetTextForWidget(self, widget): + """ + Returns the string to be used in the tree for a widget + """ + return "%s (\"%s\")" % (widget.__class__.__name__, widget.GetName()) + + def GetTextForSizer(self, sizer): + """ + Returns the string to be used in the tree for a sizer + """ + return "%s" % sizer.__class__.__name__ + + + def SelectObj(self, obj): + item = self.FindWidgetItem(obj) + if item: + self.EnsureVisible(item) + self.SelectItem(item) + + + def OnSelectionChanged(self, evt): + obj = self.GetItemPyData(evt.GetItem()) + self.toolFrame.SetObj(obj) + + +#--------------------------------------------------------------------------- + +class InspectionInfoPanel(wx.stc.StyledTextCtrl): + """ + Used to display information about the currently selected items. + Currently just a read-only wx.stc.StyledTextCtrl with some plain + text. Should probably add some styles to make things easier to + read. + """ + def __init__(self, *args, **kw): + wx.stc.StyledTextCtrl.__init__(self, *args, **kw) + + from wx.py.editwindow import FACES + self.StyleSetSpec(wx.stc.STC_STYLE_DEFAULT, + "face:%(mono)s,size:%(size)d,back:%(backcol)s" % FACES) + self.StyleClearAll() + self.SetReadOnly(True) + self.SetMarginType(1, 0) + self.SetMarginWidth(1, 0) + self.SetSelForeground(True, wx.SystemSettings.GetColour(wx.SYS_COLOUR_HIGHLIGHTTEXT)) + self.SetSelBackground(True, wx.SystemSettings.GetColour(wx.SYS_COLOUR_HIGHLIGHT)) + + + def Update(self, obj): + st = [] + if not obj: + st.append("Item is None or has been destroyed.") + + elif isinstance(obj, wx.Window): + st += self.FmtWidget(obj) + + elif isinstance(obj, wx.Sizer): + st += self.FmtSizer(obj) + + elif isinstance(obj, wx.SizerItem): + st += self.FmtSizerItem(obj) + + self.SetReadOnly(False) + self.SetText('\n'.join(st)) + self.SetReadOnly(True) + + + def Fmt(self, name, value): + if isinstance(value, (str, unicode)): + return " %s = '%s'" % (name, value) + else: + return " %s = %s" % (name, value) + + + def FmtWidget(self, obj): + st = ["Widget:"] + st.append(self.Fmt('name', obj.GetName())) + st.append(self.Fmt('class', obj.__class__)) + st.append(self.Fmt('bases', obj.__class__.__bases__)) + st.append(self.Fmt('id', obj.GetId())) + st.append(self.Fmt('style', obj.GetWindowStyle())) + st.append(self.Fmt('pos', obj.GetPosition())) + st.append(self.Fmt('size', obj.GetSize())) + st.append(self.Fmt('minsize', obj.GetMinSize())) + st.append(self.Fmt('bestsize', obj.GetBestSize())) + st.append(self.Fmt('client size',obj.GetClientSize())) + st.append(self.Fmt('IsEnabled', obj.IsEnabled())) + st.append(self.Fmt('IsShown', obj.IsShown())) + st.append(self.Fmt('fg color', obj.GetForegroundColour())) + st.append(self.Fmt('bg color', obj.GetBackgroundColour())) + st.append(self.Fmt('label', obj.GetLabel())) + if hasattr(obj, 'GetTitle'): + st.append(self.Fmt('title', obj.GetTitle())) + if hasattr(obj, 'GetValue'): + st.append(self.Fmt('value', obj.GetValue())) + if obj.GetContainingSizer() is not None: + st.append('') + sizer = obj.GetContainingSizer() + st += self.FmtSizerItem(sizer.GetItem(obj)) + return st + + + def FmtSizerItem(self, obj): + st = ['SizerItem:'] + st.append(self.Fmt('proportion', obj.GetProportion())) + st.append(self.Fmt('flag', + FlagsFormatter(itemFlags, obj.GetFlag()))) + st.append(self.Fmt('border', obj.GetBorder())) + st.append(self.Fmt('pos', obj.GetPosition())) + st.append(self.Fmt('size', obj.GetSize())) + st.append(self.Fmt('minsize', obj.GetMinSize())) + st.append(self.Fmt('ratio', obj.GetRatio())) + st.append(self.Fmt('IsWindow', obj.IsWindow())) + st.append(self.Fmt('IsSizer', obj.IsSizer())) + st.append(self.Fmt('IsSpacer', obj.IsSpacer())) + st.append(self.Fmt('IsShown', obj.IsShown())) + if isinstance(obj, wx.GBSizerItem): + st.append(self.Fmt('cellpos', obj.GetPos())) + st.append(self.Fmt('cellspan', obj.GetSpan())) + st.append(self.Fmt('endpos', obj.GetEndPos())) + return st + + + def FmtSizer(self, obj): + st = ['Sizer:'] + st.append(self.Fmt('class', obj.__class__)) + st.append(self.Fmt('pos', obj.GetPosition())) + st.append(self.Fmt('size', obj.GetSize())) + st.append(self.Fmt('minsize', obj.GetMinSize())) + if isinstance(obj, wx.BoxSizer): + st.append(self.Fmt('orientation', + FlagsFormatter(orientFlags, obj.GetOrientation()))) + if isinstance(obj, wx.GridSizer): + st.append(self.Fmt('cols', obj.GetCols())) + st.append(self.Fmt('rows', obj.GetRows())) + st.append(self.Fmt('vgap', obj.GetVGap())) + st.append(self.Fmt('hgap', obj.GetHGap())) + if isinstance(obj, wx.FlexGridSizer): + st.append(self.Fmt('rowheights', obj.GetRowHeights())) + st.append(self.Fmt('colwidths', obj.GetColWidths())) + st.append(self.Fmt('flexdir', + FlagsFormatter(orientFlags, obj.GetFlexibleDirection()))) + st.append(self.Fmt('nonflexmode', + FlagsFormatter(flexmodeFlags, obj.GetNonFlexibleGrowMode()))) + if isinstance(obj, wx.GridBagSizer): + st.append(self.Fmt('emptycell', obj.GetEmptyCellSize())) + + if obj.GetContainingWindow(): + si = obj.GetContainingWindow().GetSizer().GetItem(obj) + if si: + st.append('') + st += self.FmtSizerItem(si) + return st + + +class FlagsFormatter(object): + def __init__(self, d, val): + self.d = d + self.val = val + + def __str__(self): + st = [] + for k in self.d.keys(): + if self.val & k: + st.append(self.d[k]) + if st: + return '|'.join(st) + else: + return '0' + +orientFlags = { + wx.HORIZONTAL : 'wx.HORIZONTAL', + wx.VERTICAL : 'wx.VERTICAL', + } + +itemFlags = { + wx.TOP : 'wx.TOP', + wx.BOTTOM : 'wx.BOTTOM', + wx.LEFT : 'wx.LEFT', + wx.RIGHT : 'wx.RIGHT', +# wx.ALL : 'wx.ALL', + wx.EXPAND : 'wx.EXPAND', +# wx.GROW : 'wx.GROW', + wx.SHAPED : 'wx.SHAPED', + wx.STRETCH_NOT : 'wx.STRETCH_NOT', + wx.ALIGN_CENTER : 'wx.ALIGN_CENTER', + wx.ALIGN_LEFT : 'wx.ALIGN_LEFT', + wx.ALIGN_RIGHT : 'wx.ALIGN_RIGHT', + wx.ALIGN_TOP : 'wx.ALIGN_TOP', + wx.ALIGN_BOTTOM : 'wx.ALIGN_BOTTOM', + wx.ALIGN_CENTER_VERTICAL : 'wx.ALIGN_CENTER_VERTICAL', + wx.ALIGN_CENTER_HORIZONTAL : 'wx.ALIGN_CENTER_HORIZONTAL', + wx.ADJUST_MINSIZE : 'wx.ADJUST_MINSIZE', + wx.FIXED_MINSIZE : 'wx.FIXED_MINSIZE', + } + +flexmodeFlags = { + wx.FLEX_GROWMODE_NONE : 'wx.FLEX_GROWMODE_NONE', + wx.FLEX_GROWMODE_SPECIFIED : 'wx.FLEX_GROWMODE_SPECIFIED', + wx.FLEX_GROWMODE_ALL : 'wx.FLEX_GROWMODE_ALL', + } + +#--------------------------------------------------------------------------- +from wx import ImageFromStream, BitmapFromImage +from wx import EmptyIcon +import cStringIO + + +def getRefreshData(): + return \ +'\x89PNG\r\n\x1a\n\x00\x00\x00\rIHDR\x00\x00\x00\x18\x00\x00\x00\x18\x08\x06\ +\x00\x00\x00\xe0w=\xf8\x00\x00\x00\x04sBIT\x08\x08\x08\x08|\x08d\x88\x00\x00\ +\x05\xe8IDATH\x89\x9d\x96]h\x94\xd9\x19\xc7\x7f\xefG21\x93\x99Il\xcc&\x18w\ +\x1c?\xe2GK\xa5kb\x8d\xd3(+\xcb\xd2-\x0b-4A\xf1\xc6\xcb\x8a\xdaz\xa7\xd8\x9b\ +zQ\xe8\x85R\xd3\xd0\x1a\x97\x06w\xad\xa8\x14/z%\x85\xd2\x85\xe2\x17\xedEK\ +\x83\xd4\xc4X\x1b\x9bL\x98L\xdf\xc9d\xbe\'\x99\xc9{\xfe\xbd\xc8$\xc4e\xa1\ +\xd0\x07\x0e\x1c\x0e\xcf\xc7y\xfe\xe7\xff<\xcf\xb1\xf8\xdfr\x008\x03|\x0bp\ +\x00\x0b\xf0\x81\xa7\xc0\'\xc0\xdf\xbe\xccH\xabz\xb8\x1b\xce\x9c\xba!\xc0\ +\x07\xc0\xbf\x81\x92\xe38\xef\xf8\xbe\xff.\xf0\xb5\xae\xae\xae%\x80d2\xd9\ +\xd4\xd0\xd0\x90\xd9\xb9s\xe7\xf6\xc9\xc9\xc9y\xa0\x19\x88\x01\x9f\x03\x06p,\ +\xf0\x05\x96\xfb\x05\xe7[\x80\x9f\xb9\xae{d\xeb\xd6\xad%\xd7u\x7f\xf0\xfa\ +\xf5\xeb\xd7\xb6m[\x03\x03\x03\x0c\x0e\x0e6Y\x96\xc5\x83\x07\x0f\x98\x98\x98\ +h\xf4}?\x01\x84c\xb1\xd8\'\xb3\xb3\xb3\x1d+++\x7f\x06~\x0c$\xd7\x82l\xccj\ +\x8b\xe38\xf7W\xb3[_\x9f\x02W\x81\x7f\x0e\r\r)\x95J\xa9\\.\xeb\xf4\xe9\xd3\ +\x02fC\xa1\xd0\xcd\xb6\xb6\xb6\xcf6\xda\xd8\xb6\xfd\x00\xe8\xfc2\xd8\xc6\x00\ +\x85B!\xf5\xf6\xf6\x9aC\x87\x0e\x99\xd6\xd6V\x01joo\xd7\xcd\x9b7\xfdt:\xadR\ +\xa9\xa4\xb1\xb11?\x14\n\t\xd0\xbe}\xfb\xd4\xdb\xdb\xab\xde\xde^\x13\x0e\x87\ +\xd7\x02\xfd\xa6\x8e\xca\xba|\xe08\xce?\x00\x1d\xda\x18\xa0g\xfb\xf6\xed\xcf\ +\x00\xf5\xf5\xf5\xc9\xf3<%\x12\t%\x93I\xcd\xcc\xcc(\x95J\xa9T*)\x9f\xcf+\x97\ +\xcb\xa9X,*\x95JiffF\xc9dR\x89DB\x8b\x8b\x8b\x1a\x18\x180\x80\xa2\xd1\xe8\ +\xdf\x81\xfdlH\xa31\x9b\xcd~\xde\xd6\xd6\x16\t\x04\x02_\xf7<\x8fx\x81e\xd7\x03lO\ +\xcc\xcdm^#M\xa5R!\x18\x0cr\xfd\xfau\xa2\xd1(W\xaf^\xa5\xa5\xa5\x85r\xb9\x0c\ +@KK\x0b7n\xdc \x1a\x8dr\xed\xda5\x9a\x9a\x9aXZZB\x92\x00\x12\x89\xc4\x16 f\ +\x81\x10XC\xab=\xe9\xd3:\x86\xea\xef\xef7\xf1x\xdc\xec\xdf\xbf_\x80ZZZ466\ +\xe6\xe7\xf3ye\xb3Y\xdd\xb9s\xc7\xef\xec\xec\x14\xa0\xd6\xd6V\xc5\xe3q\xc5\ +\xe3\xf1\xf5\xf6\x0e\xdc\x05\x1aW\xaf[\xaf\x03\xa0\xab>,\xd6\x0b\xaa\xb5\xb5\ +\xf5\xb7\xe1p\xf8\xd7\xc0\xec\x89\x13\'\x94\xcb\xe5\x94\xc9dt\xea\xd4)\x01o\ +\x80_\x02\x9fm\xb4q]\xf7w@\xf7\x9ao\x17\xe0 4\xfc\x15\x92\xc6\x98\x1f\x02\ +\x15\xd7u\xbf\xd9\xdd\xdd\x9d\x7f\xf3\xe6\xcdOw\xef\xde\xed477\xefK&\x93\xdd\ +w\xef\xde\xc5u]<\xcf\xc3\xb6\xed\x97\xc6\x98\x91X,\xd6$\xe9\xabsssm\xb5Z\xed\ +/+++\x97\x80\x04\xab\xa8\x18~\x02v=\x8b\x8d\xf3\xf9\xa3:m\xb7\xf6\xf4\xf4|/\ +\x10\x08\xfc\tPww\xf7\xf2\xb6m\xdb\x96\x1d\xc7\x11\xf0\x07\xc7q\xbe\r\xbc\ +\x0b\xec\x05\xbe\xb3\x0eK}\x0c\xacgp\x05,\xad\x0eh\x0b0\x16\xfc~\x8d^SSS\xed\ +\xc0\x04\xf0\x95D"\xb1\xf1\xdb2\xed\xfb\xfe\x7f\x80\x99\xba\xead\xfd\xa2\x16\ +\xab?\x0b\x0b\xe0\xbf\xf5\x19yJo\xfcW\xe3\x00\x00\x00\x00IEND\xaeB`\x82' + +def getRefreshBitmap(): + return BitmapFromImage(getRefreshImage()) + +def getRefreshImage(): + stream = cStringIO.StringIO(getRefreshData()) + return ImageFromStream(stream) + +#---------------------------------------------------------------------- +def getFindData(): + return \ +'\x89PNG\r\n\x1a\n\x00\x00\x00\rIHDR\x00\x00\x00\x18\x00\x00\x00\x18\x08\x06\ +\x00\x00\x00\xe0w=\xf8\x00\x00\x00\x04sBIT\x08\x08\x08\x08|\x08d\x88\x00\x00\ +\x06\x04IDATH\x89\xb5\x95Mh\x1b\xdb\x15\xc7\xffs\xe7\x8e4\xfa@V%K\xc6\r\x91\ +\x12^\xeb$d\xf3\x08\xc1V\xa8\xc9\xb3i\xe2x\x97\x10(]$\xf0\xc0!i> i\xc0\x8bR(\ +\xcf\xdd\xb4\xf1\xaad\xd7E\x9cdS\x08\xdd\x98.\x82\xbc0\xe9\xc3q)\xc6\xa4v\ +\x82\xbf\x82\x15;\x93\x91,[c\xcb\x965\xdfsgn\x17\x0f\xf9\xb9\xa4o\xd7\x1e\ +\x18\xb8w8s\x7f\xf7\xf0\xff\x9f3\xc0\xff9\x84\xc3\x9b\xb1\xb1\xb1\xdf\xf8\ +\xbe\xff\xc7\xd7\xaf_C\x92$\x00\x80\xe388u\xea\x14\xb2\xd9\xec\xb7\xb7n\xdd\ +\xea\x07\x80\'O\x9e\x145M\x1b\\XX@8\x1c\x06\x00x\x9e\x87\xde\xde^PJ\x7f\x7f\ +\xe3\xc6\x8d\x91\xcfH\xe3\xe3\xe3\xc3\xf7\xee\xddc\xf9|\x9e\x038xB\xa1\x10/\ +\x14\n\xfc\xfa\xf5\xeb\x7fo\xe5^\xbbv\xad\xd8\xdb\xdb{\x90C\x08\xe1\xa2(\xf2\ +\\.\xc7o\xdf\xbe\xcd\xc6\xc7\xc7\x7f\xdb\xca\xa5\xad\x85\xef\xfb_\x11B\xc4\ +\xcd\xcdMv\xf5\xeaUZ(\x14P.\x97\xf1\xfc\xf9s\xcc\xcd\xcdA\x10\x04\xab\x95\ +\xbb\xb6\xb6f\xce\xcc\xcc\xe0\xf4\xe9\xd3\xb8s\xe7\x0e&\'\'Q\xab\xd50;;\xcb\ +\x04A\xa0\x8c\xb1~\x00\x7f\xf8\x0f\x00\xa5t\xbb^\xaf#\x91H\xd0\x0b\x17.\xe0\ +\xca\x95+X[[\xc3\xabW\xaf\xf0\xe9\xd3\'tuu}q\xe6\xcc\x99\xaf\t!\xac\xd9l\x9e\ +x\xf3\xe6\rN\x9e<\x89\x9b7o\x82R\nUUQ*\x95\xe8\xee\xee.(\xa5\xdb\x9fU \xcb2\ +\x18c\xd04\r333\xd8\xda\xda\x82\xef\xfb\xd8\xde\xde\x86,\xcb,\x9dNwy\x9e\xf7\ +\\\x10\x04\xa4R)$\x93Io~~^z\xfc\xf81\x16\x17\x17!\x08\x024M\x83m\xdb\x08\x85\ +B\xf8\x0c\xe0\xba.8\xe7 \x84@\x14E\xd4\xebuX\x96\x85 \x08\x10\x04\x01U\x14%0\ +M\xd3\x01\x80X,\x16\xe6\x9cK\xb6mcuu\x15\x9a\xa6!\x9dN\x1f\x18\x831v\x00 \ +\xad\xc5\x87\x0f\x1f\x9a\x8a\xa2@\x14Ed\xb3Yx\x9e\x87b\xb1\x08\xc7q\xd0\xd3\ +\xd3\x83l6\xfb\x8fb\xb1\x18-\x16\x8b\xd1l6\xfb\xea\xdc\xb9s0\x0c\x03\x13\x13\ +\x138v\xec\x18\x18cp]\x17\xd5j\x15+++\x07\x00\x11\x00\xee\xde\xbd\xfb\xbb\ +\xb7o\xdf\xde\x92e9\xd2\xdd\xdd\r]\xd7111\x81J\xa5\x02Y\x96q\xf6\xecY\xd8\ +\xb6M\xdf\xbd{w\x04\xc0\x85\xae\xae\xae\xaf\x92\xc9d\xdb\xd2\xd2\x12j\xb5\ +\x1a4MC>\x9fGGG\x07$I\x82\xaa\xaa\xd3\xa5R\xe9\xe5\x01\xa0\xbb\xbb\xfbo\xab\ +\xab\xab?\xda\xda\xdab\xc9d\x92\xcc\xce\xceBQ\x14\xc8\xb2\x8c\\.\xc7\xc2\xe1\ +0\xd1u=a\x9a\xe6\xb9x<\xfe\xb3x<\xde\xe6\xba.\x0c\xc3`\xf5z\x9d\xec\xed\xedA\ +\x14Ed2\x19\xa8\xaa\x8ar\xb9\xdcv\xff\xfe\xfd\xad\xa9\xa9\xa9E\n\x00\xe1p\ +\xf8c\xa5R\xf9\xd24MZ(\x14\xd0\xdf\xdf\x8fK\x97.AUU\xac\xaf\xaf\xd3\x85\x85\ +\x85R4\x1a-\xa7R\xa9>\x00(\x97\xcbS\x8dF\xa3#\x9f\xcf\x9f\x18\x18\x18\x80(\ +\x8a\xd0u\x1d\xd5j\x15\xef\xdf\xbf\xf7r\xb9\xdcO\x1b\x8d\xc6_\x00\xfc\x15\ +\x00\xf0\xf0\xe1\xc3\xb9T*\xc5\x07\x06\x06x\xadV\xe3\x86a\xf0\xf5\xf5u><<\ +\xcc\xdb\xda\xda8\x80a\x00\x91C\r\x98\x04p\xbb\xaf\xaf\x8f+\x8a\xc2\x9b\xcd&\ +\xd74\x8d\x8f\x8c\x8cpY\x96y.\x97\xe3\x0f\x1ep\x11!\x04\x94R\xe8\xba\x0eU\ +U\x11\x89DP*\x95\xa0\xebz\xcb\x19\x0c\x80{\xa8\xf1=\x00\xbe\xe38PU\x15\x86a`\ +cc\x03{{{\x90$\t\x82 \x80\x10\xf2\xbdM\x1d\xc7qL\xd3\x84\xa6i\xd8\xdc\xdc\ +\x84,\xcbX^^\x86i\x9a\xadY\xf3+\x00\x83\x87\x00\xe3\x00~\xec8\x0e*\x95\n<\ +\xcf\xc3\xca\xca\nvvv`\x9a&$I\x82\xe38.\x00\x88ccc#/^\xbc\xf89\x80x\xa1P@gg\ +\'l\xdbF\xb5ZE\xbd^\xc7\xf2\xf2\xb2\xc79\xef\xe8\xe9\xe9\xf9\xc9\xf1\xe3\xc7\ +\x91\xcf\xe7q\xf4\xe8\xd1/\xca\xe5r6\x91Hx\xdd\xdd\xdd\xa2\xeb\xba(\x97\xcb\ +\x90$\t\xed\xed\xedh4\x1a\xa8T*\xe2\xa3G\x8fb\x941\xf6\xcd\xe2\xe2".^\xbc\ +\xe8\x9f?\x7f^\xacV\xabH&\x93p\x1c\x07\x9cs\xd8\xb6-\xe5r9\x0c\x0e\x0en\xeb\ +\xba\xfe-\x80 \x1e\x8f\xf7U\xab\xd5\xaca\x18\x92i\x9ap\x1c\x07\xba\xae#\x1a\ +\x8d\xe2\xf2\xe5\xcb`\x8c\xf9/_\xbelg\x8c}C\xa6\xa7\xa7\xc19G&\x93\x11=\xcf\ +\xc3\xce\xce\x0el\xdb\xc6\xce\xce\x0e\x18c\xa0\x94\x82\x10\x82\xfd\xfd\xfd\ +\x7f\x8d\x8e\x8e\xfebtt\xf4\x97\xcdf\xf3\x9f\x94R\xb8\xae\x8bz\xbd\x0e\xdb\ +\xb6\xd1h4\xa0(\n,\xcbB&\x93\x11\x01`zz\x1a\xa4%\x8aeY`\x8c\x81\x10\x02\xc7q\ +@\x08\x81 |\xf7\xbb\xe0\x9c\x83s\x1e:\xa4A\xb85V\x04A\x80\xe38\x10\x04\x01\ +\xa1P\x08\x9e\xe7\xc1\xb2\xbe\x1b\xbc\x92$\xa1\xd5\x07(\x95J\x90e\x19\xae\ +\xebbww\x17\x86a\xc0\xf7}\xfcPPJa\x18\x06VWW\x11\n\x85`\x9a&,\xcb\xc2\xdc\ +\xdc\x1cJ\xa5\xd2\xc1\\\xa2\xad\x1b\x8a\xa2\x88T*\x85X,\x86L&\x83\x8f\x1f?"\ +\x08\x02\xc8\xb2\xfc_AA\x10\x80R\x8a\xce\xceNttt@UUloo\x831\x06\xcb\xb2\xbe\ +\xb7i$\x12A\x10\x04PU5XZZ"\xd1h\x14\xf1x\x1c\x8a\xa2 \x08\x02\xd4j5?\x9dN\ +\x8b\x00\xda\x0f\x1d\xdeN)E\xbd^\xf7\xe7\xe7\xe7\xc5t:\rUU\xd1l6\xc19\x87\ +\xa2(\x81\xef\xfb$\x12\x89\x80Z\x965\x7f\xe4\xc8\x91\x13\x1b\x1b\x1b\x91\xa9\ +\xa9)p\xce\x11\x04\xc1A\x89\x92$\x89\xf1x\x1c\x00\xa6Z\x00B\xc8\xebX,vV\x92$\ +qrr\x12\xbe\xefC\x92\xa4\xc3\xba\x91\xce\xceN\xc7\xb2\xace\x01\x00\x86\x86\ +\x86\xe6"\x91\xc8\x97-q\x0eG"\x91@\xa3\xd1\xf8\xf3\xb3g\xcf\xee\x1c~?44\xf4\ +\xa7D"\xf1\xeb\xfd\xfd\xfd\xcf\xbe\x91e\x19\xb6m\xaf<}\xfa\xf4\xd4\x0f\x8a\ +\xf8\xbf\x8a\x7f\x03\x7f_\x17\xc3%\x00\xe7\xe4\x00\x00\x00\x00IEND\xaeB`\x82\ +' + +def getFindBitmap(): + return BitmapFromImage(getFindImage()) + +def getFindImage(): + stream = cStringIO.StringIO(getFindData()) + return ImageFromStream(stream) + +#---------------------------------------------------------------------- +def getShowSizersData(): + return \ +'\x89PNG\r\n\x1a\n\x00\x00\x00\rIHDR\x00\x00\x00\x18\x00\x00\x00\x18\x08\x06\ +\x00\x00\x00\xe0w=\xf8\x00\x00\x00\x04sBIT\x08\x08\x08\x08|\x08d\x88\x00\x00\ +\x04(IDATH\x89\xb5\x95Mh\\U\x14\xc7\x7f\xf7\xdey\xf7\xcd\xbcy\x99\xc9\xb43\ +\x93\x99\xc4iM\x02~\x97R\xa9Q(\x82\x16*\xb5\xeaFP\x8b;\x0b\xe2\xb6\xba(\xa8\ +\xa0\xe0F\x17"\xaeD\xa9\x8a\x04\x84\n]\x16\x05\xadt\xe1B\xa8H\x8a\x0bK\xc4\ +\xd6\x966\xb553\x93\xc9L\xf3\xe6\xcd\xfb\xb8\xd7EZ\x9b\xa6%)-\x1e\xb8\xab\ +\xcb\xff\xfc\xce=\xfc\xcf\xb9\xf0?\x87X\xe7\xfe\xc1R\xa9\xf4\xaa\xeb\xba\xdb\ +\xad\xb5\x8b\xd7\t\x85(\xc6q<\xd3j\xb5\x0e\x02\xbf\xdd\x16}lll\xbf7\xe4\x9d\ +\x92\xc8(Cf\xe1\xdaaAB\x94\xf3\xbd\xd3\xf5z\xfd\xc0Z92k]*\xa5\xee2=\xb3\xd9\ +\xdcg\x94y\xc1\x0c\xb3\x04(`\xae\x08\xdf\x0f\xb0\xcdh\xb3\xde\xa8\x1b\xb7\r\ +\x00B\x81\xe8\xb3\x05\x9f7\x1c\x98-\x816\xf0g\x15~\xbf\x08\xcdN`\x8c\xe9\xdf\ +\t`9b\xe0\xaf\x1c\xfc4\t\x19\x0b\x84`\xe3[\x92\xde\x1a \x05Z1\x9ci\x82\xb2Pr\ +\xc0\xc2\xfa\x1eY\x07 \xa5\xcc\xd9\x8c\xcd\xf3\x03p\xa2\x0f\x97\xcf\x02X\xa4\ +\x15tbp\xdc\xbc\x94\xd2[+\x87Z\xb3\xf04U\xd2\x95%\xdf\xf8\xa1j\x89f\x14\x86U\ +\xc2Tx}\xe7\xe4\x90?4g\xb5:\x11\x06\xfdo\xa2(\x9a\xbd-@\x14E\xedJ\xb9RP\xae\ +\xba\xa7\x9f\x86\x15\xadu\xe48N`\x14*_\xf0\xdb^.\xf7m\xb3\xd9<\x02\x04W$7\ +\xf4l-@\xaeX,N%I\xb2\xa7\xd7\xeb\xedJ\xd3tP.\x97\xa7}\xdf\xff\xb5\xdb\xedn\ +\x1d\x0c\x06\xf7Zk\x17\xb4\xd6\x97\x06\x83\xc1E\x96\xadpS\xc8\xcd\xa2\xa8\ +\x94z\xaeV\xab\x1d\xd2Z[\xaduk\xd3\xa6M\xef\x00\xdb\x81m\x8dF\xe3m\xd7u\xe7\ +\x1d\xc7\xb1###\x87\x95R\xcf\x03\xa5\xf5\x92^%+\xa5\xd4\xee\xb1\xb1\xb1O\x94\ +RK\x9e\xe7\x85\xe5r\xf9K\xe0\xb1\x15/~\xa4R\xa9|\x9e\xcf\xe7\x97\xa4\x94\xc1\ +\xe8\xe8\xe8A\xa5\xd43\\3\xcd\x7f\xaf\xb8\xa1E\xf9|~g\xa1Px\xa5\xd9l\xee\xd5\ +Z\xf7]\xd7=\x94$\xc9g\x83\xc1\xe08W\xcc\t\\\x00\xe6\xb4\xd6J\x081\xd9\xedv\ +\xa7J\xa5\x92\'\x84h\xc7q|ze>\x05\x8c4\x1a\x8d\x1d\xb5Zm\x8b\xef\xfb\x0f\'I\ +\xf2b\xbf\xdf\x7fVJ9_.\x97g\x93$9\xd2\xe9t\x8e\xb2<\r\xe2juq\x1c7\xb3\xd9l\ +\xb1T*\xd5\xc20TI\x92l\xd5Z\xfb\xd5j5;222\xe1\xfb\xfe\xf8\xe2\xe2bOx\x9ew\ +\xc0q\x9c\x971\xe9\x03\x12\xd3\t\x07Q\xa1\x1f%\xee\xb0\xe2g<\xbf\x90\x085c\ +\x92\xf8\xa3 \x08fVV\xe6y\xde\xd6\x8c\x94\xfbQj\xaa/M\x10/\xf4\xb6\x93u\x02\ +\'\xe7-(c6d\x91\xa7\xa38\x9e\xa6^\xaf\x1f\x93B$\x08eqr-\x94\x9e\xc7\xcd\xcfS\ +\x1a\xb5 \xedP\xde\xebOLL\xbc\xb6\xba\x95\xe3\xe3\xe3\xfb\xfc\xc2P\x1f\xb0%T\ +\xb8\x91Lg\x18uy\x03*\xc8\x81E\x8a\xb4^\xaf\x1f\xcb\x18c\x02a\xad\xe2\xa1]_\ +\xf1\xe9w\xd3\xfc8\x93\xc5u\xef\xc6\xcd|\xc8\xc7/y\x9c=\x11\x00\xd1ML\x11-\ +\xd94\xad\x91\xe9\x9fdj\xda`\x92\x90T\x8cR\xe8\xbd\xc9\xc9G?\x10\x17\x9e0\ +\xc6\x04\xd7V\x85\x10\x97\xd8\x81\xcf?\xdb\x9e$%O\x7fI!\xd7\x9cC,\x08\t\xf10\ +C\x01dw\x82\xaat\t\x83K\xc8\n\x10\xc2\xca]\x94\xda9R&\xb1\xbc\x8e\xa4\xcdP^#\ +\xe4\x9a\x00@d\x10)x\xe1,K\x93\x92\x8c? %\x8b\x06\xe8\x01d\x84\x109\x0bp\xfa\ +\xf8n\xf6\xbe\xe7S\x19\x85\xe0\xf2\x06\x10\xd0\x9e\x83\x0c\x1e,+\xae\xcb,\ +\x84\xa3\x85t:\xc4\xb9\xb7\xf8\xe5\xf1S\xa4n\x04lD3K\x0f,Y!D.c\x8c9\xa7\xb4>\ +C\xd8\xde#\x0e\xbf\x0b\xb0\xc0\x95\xf9\xb0\x90\xb7\xc5\xe1\xb3I\x92\xb4V\x03\ +\xe28n\xe7\x90\x7f,Jq\xff\xfb\xe2\xfc\x0e`\x89\xe5\x9d$\xb0hW\xe9\xb61\xe6\ +\x9c\x00\x9e\xaeV\xab{\xa5\x94\rk\xedu\xbf\x93\x10\xa2\x10\x04\xc1\xd1n\xb7\ +\xfb\x05p~\x15c\xd4\xf7\xfd}\xbe\xef?e\xad\xed\xad\xd2e\xd34\xfd{~~\xfe\xeb\ +\xf5z|\xc7\xf1/Y%\x9eF\x90EP\xda\x00\x00\x00\x00IEND\xaeB`\x82' + +def getShowSizersBitmap(): + return BitmapFromImage(getShowSizersImage()) + +def getShowSizersImage(): + stream = cStringIO.StringIO(getShowSizersData()) + return ImageFromStream(stream) + +#---------------------------------------------------------------------- +def getShowFillingData(): + return \ +"\x89PNG\r\n\x1a\n\x00\x00\x00\rIHDR\x00\x00\x00\x18\x00\x00\x00\x18\x08\x06\ +\x00\x00\x00\xe0w=\xf8\x00\x00\x00\x04sBIT\x08\x08\x08\x08|\x08d\x88\x00\x00\ +\x01\x9eIDATH\x89\xed\x95\xcfJ\x02A\x1c\xc7?\xad\xbb\xb3\xb1-\x14\xae\x19E\ +\xed!\xf5)\xbaE\xbd@\x97\x0e\xdez\x84.\x82\xd7.\xbd\x81\xb7\x8e\xddD\x10*\ +\x83\x12z\x06\xa30<\x97\xb4\x14Ibh\xb3k\x17\x15u\xcdv\xadc\xdf\xd303\xdf\xef\ +g\x86\xdf\xfc\x81\x7f\xfd\xa0\xb9\xa1\xf6\x0e\xb0\x0b\xac\x00\xed\x19\xf3\ +\x04\xf0\x02\x94\x80+\x00uhp_U\xd5m)\xe52\xd0\x99\x11\xa0)\x8a\xfa\xeayrq\ +\x12`CJ\xb9~tt(67\xf78?\x7f\xc64\x83'\x9b\xe62\xb7\xb7g\\^\x1e/\x00\x1b\xfd\ +\xfea\xc0\x07\xf0a\x18I\xb1\xba\xba\x85m?b\x18\xc1\x01KKk<==\x0cr&\x01\x00\ +\xb8\xb9\xb9G\xd3\xae\xb1,\x07\xcf\x0b\x0e\xd0u\x0bM\xbb\x03\xe8~7\xa7\x00\ +\xbc\x15\n\xf9\xee\xac\xba\xb88\xeb\x02\xef\xbd,\x00\x94qJ\xbb\xfd\x19|\xd9\ +\x01\xbc>\x80\x10bf\xc0$\xaf\xaf\x06\x8dF\x03\x80f\xb3\x19*\xdc4\xcd\x81w* \ +\x97\xcbQ.\x97i\xb5Z\xa1\x00\x86aP\xab\xd5`\xac\xc8>@\xa5R\xa1Z\xad\xe2\x859\ +B\x80\xa2(t:\xfe\xfb\xe9\x03d2\x19\xd2\xe94\xf5z=\x14 \x1e\x8f\x93\xcf\xe7\ +\xc9f\xb3\xd3\x01\x89D\x82d2\x89m\xdb\xa1\x00B\x08R\xa9\x14\x8c\xbeo~\x80\ +\xae\xeb\x03CX\xf5\xbc#5\xf0\x1d\xd3h4\x1a:\xb8/\xcb\xb2`\xca\x0e\xe6\x81\ +\xf9b\xb1\x08\x80\xe38\xa1\xc2c\xb1\x18\xa5R\t@\xefe1N;\xf9\x8b\xe7:\x12\x89\ +\xbc\xba\xae{\x05\x1c\xc0\xe8\x0eN\xa5\x94\x0e\xbf\xfcp\\\xd7\xed\x7f8\xff\n\ +\xa6/8\xf7\xb7\xf5\xb4m\x07\xcd\x00\x00\x00\x00IEND\xaeB`\x82" + +def getShowFillingBitmap(): + return BitmapFromImage(getShowFillingImage()) + +def getShowFillingImage(): + stream = cStringIO.StringIO(getShowFillingData()) + return ImageFromStream(stream) + +#--------------------------------------------------------------------------- + +def getIconData(): + return \ +'\x89PNG\r\n\x1a\n\x00\x00\x00\rIHDR\x00\x00\x00 \x00\x00\x00 \x08\x06\x00\ +\x00\x00szz\xf4\x00\x00\x00\x04sBIT\x08\x08\x08\x08|\x08d\x88\x00\x00\x00\ +\xb8IDATX\x85\xed\x97\xcd\x12\x83 \x0c\x84w\x91\xf7\xd6>x\x9b\x1e,\x07Gl\x93\ +4N8\xb07gH\xf8\xc8\x1fB\x96\x05\x99*\xa9\xbbO\x80\x11\x00\xea\xaf\x05\xf2z\ +\x8a\xc71\xcb\xc2\x10\x80]\x9bq{\xfd\xfa\xf4\x14\xa8\x01DV\x88\xacy\x00w)\ +\x1d@Y\x84\x1am\x87/m\xf7\x04\x02\x00blX\x12\xa8\xde>\x8fR\x05\x80o\x04\xaai\ +rP\xf3\xa6\xb3\x1c\xa8\x08[\x02\xd9\'\'\x1f\xb7\x00\xa4G\x80hg\xbf\x88\x80\ +\xa5\x06>\x8e\xd4\x96\xa4\xe66\xec\x19\xe2|\xdby\xbb)=\x05\xe9\x00\xa1\x93p\ +\x97mr\x0c\x14\x81\x8b\xfe\xb7\xc8\xe3",\x05\xda\x7f\xc0.\xc0\xffg\xf7\x8b\ +\xf3i6\x01\xb2\x01\xde\x86\xde%]y\x9b\xef$\x00\x00\x00\x00IEND\xaeB`\x82' + +def getIconBitmap(): + return BitmapFromImage(getIconImage()) + +def getIconImage(): + stream = cStringIO.StringIO(getIconData()) + return ImageFromStream(stream) + +def getIconIcon(): + icon = EmptyIcon() + icon.CopyFromBitmap(getIconBitmap()) + return icon + +#--------------------------------------------------------------------------- + + diff --git a/wxPython/wx/lib/masked/maskededit.py b/wxPython/wx/lib/masked/maskededit.py index 77776d7737..b5696c7e1a 100644 --- a/wxPython/wx/lib/masked/maskededit.py +++ b/wxPython/wx/lib/masked/maskededit.py @@ -841,11 +841,15 @@ WXK_CTRL_Z = (ord('Z')+1) - ord('A') nav = ( wx.WXK_BACK, wx.WXK_LEFT, wx.WXK_RIGHT, wx.WXK_UP, wx.WXK_DOWN, wx.WXK_TAB, - wx.WXK_HOME, wx.WXK_END, wx.WXK_RETURN, wx.WXK_PRIOR, wx.WXK_NEXT + wx.WXK_HOME, wx.WXK_END, wx.WXK_RETURN, wx.WXK_PRIOR, wx.WXK_NEXT, + wx.WXK_NUMPAD_LEFT, wx.WXK_NUMPAD_RIGHT, wx.WXK_NUMPAD_UP, wx.WXK_NUMPAD_DOWN, + wx.WXK_NUMPAD_HOME, wx.WXK_NUMPAD_END, wx.WXK_NUMPAD_ENTER, wx.WXK_NUMPAD_PRIOR, wx.WXK_NUMPAD_NEXT ) control = ( - wx.WXK_BACK, wx.WXK_DELETE, wx.WXK_INSERT, WXK_CTRL_A, WXK_CTRL_C, WXK_CTRL_S, WXK_CTRL_V, + wx.WXK_BACK, wx.WXK_DELETE, wx.WXK_INSERT, + wx.WXK_NUMPAD_DELETE, wx.WXK_NUMPAD_INSERT, + WXK_CTRL_A, WXK_CTRL_C, WXK_CTRL_S, WXK_CTRL_V, WXK_CTRL_X, WXK_CTRL_Z ) @@ -1761,27 +1765,39 @@ class MaskedEditMixin: ## Initially populated with navigation and function control keys: self._keyhandlers = { # default navigation keys and handlers: - wx.WXK_BACK: self._OnErase, - wx.WXK_LEFT: self._OnArrow, - wx.WXK_RIGHT: self._OnArrow, - wx.WXK_UP: self._OnAutoCompleteField, - wx.WXK_DOWN: self._OnAutoCompleteField, - wx.WXK_TAB: self._OnChangeField, - wx.WXK_HOME: self._OnHome, - wx.WXK_END: self._OnEnd, - wx.WXK_RETURN: self._OnReturn, - wx.WXK_PRIOR: self._OnAutoCompleteField, - wx.WXK_NEXT: self._OnAutoCompleteField, + wx.WXK_BACK: self._OnErase, + wx.WXK_LEFT: self._OnArrow, + wx.WXK_NUMPAD_LEFT: self._OnArrow, + wx.WXK_RIGHT: self._OnArrow, + wx.WXK_NUMPAD_RIGHT: self._OnArrow, + wx.WXK_UP: self._OnAutoCompleteField, + wx.WXK_NUMPAD_UP: self._OnAutoCompleteField, + wx.WXK_DOWN: self._OnAutoCompleteField, + wx.WXK_NUMPAD_DOWN: self._OnAutoCompleteField, + wx.WXK_TAB: self._OnChangeField, + wx.WXK_HOME: self._OnHome, + wx.WXK_NUMPAD_HOME: self._OnHome, + wx.WXK_END: self._OnEnd, + wx.WXK_NUMPAD_END: self._OnEnd, + wx.WXK_RETURN: self._OnReturn, + wx.WXK_NUMPAD_ENTER: self._OnReturn, + wx.WXK_PRIOR: self._OnAutoCompleteField, + wx.WXK_NUMPAD_PRIOR: self._OnAutoCompleteField, + wx.WXK_NEXT: self._OnAutoCompleteField, + wx.WXK_NUMPAD_NEXT: self._OnAutoCompleteField, # default function control keys and handlers: - wx.WXK_DELETE: self._OnDelete, - wx.WXK_INSERT: self._OnInsert, - WXK_CTRL_A: self._OnCtrl_A, - WXK_CTRL_C: self._OnCtrl_C, - WXK_CTRL_S: self._OnCtrl_S, - WXK_CTRL_V: self._OnCtrl_V, - WXK_CTRL_X: self._OnCtrl_X, - WXK_CTRL_Z: self._OnCtrl_Z, + wx.WXK_DELETE: self._OnDelete, + wx.WXK_NUMPAD_DELETE: self._OnDelete, + wx.WXK_INSERT: self._OnInsert, + wx.WXK_NUMPAD_INSERT: self._OnInsert, + + WXK_CTRL_A: self._OnCtrl_A, + WXK_CTRL_C: self._OnCtrl_C, + WXK_CTRL_S: self._OnCtrl_S, + WXK_CTRL_V: self._OnCtrl_V, + WXK_CTRL_X: self._OnCtrl_X, + WXK_CTRL_Z: self._OnCtrl_Z, } ## bind standard navigational and control keycodes to this instance, @@ -2780,8 +2796,12 @@ class MaskedEditMixin: #### dbg('Registering numeric navigation and control handlers (if not already set)') if not self._keyhandlers.has_key(wx.WXK_DOWN): self._SetKeycodeHandler(wx.WXK_DOWN, self._OnChangeField) + if not self._keyhandlers.has_key(wx.WXK_NUMPAD_DOWN): + self._SetKeycodeHandler(wx.WXK_DOWN, self._OnChangeField) if not self._keyhandlers.has_key(wx.WXK_UP): self._SetKeycodeHandler(wx.WXK_UP, self._OnUpNumeric) # (adds "shift" to up arrow, and calls _OnChangeField) + if not self._keyhandlers.has_key(wx.WXK_NUMPAD_UP): + self._SetKeycodeHandler(wx.WXK_UP, self._OnUpNumeric) # (adds "shift" to up arrow, and calls _OnChangeField) # On ., truncate contents right of cursor to decimal point (if any) # leaves cursor after decimal point if floating point, otherwise at 0. @@ -3205,25 +3225,25 @@ class MaskedEditMixin: keycode = event.GetKeyCode() sel_start, sel_to = self._GetSelection() entry_end = self._goEnd(getPosOnly=True) - if keycode in (wx.WXK_RIGHT, wx.WXK_DOWN): + if keycode in (wx.WXK_RIGHT, wx.WXK_DOWN, wx.WXK_NUMPAD_RIGHT, wx.WXK_NUMPAD_DOWN): if( ( not self._isTemplateChar(pos) and pos+1 > entry_end) or ( self._isTemplateChar(pos) and pos >= entry_end) ): ## dbg("can't advance", indent=0) return False elif self._isTemplateChar(pos): self._AdjustField(pos) - elif keycode in (wx.WXK_LEFT,wx.WXK_UP) and sel_start == sel_to and pos > 0 and self._isTemplateChar(pos-1): + elif keycode in (wx.WXK_LEFT, wx.WXK_UP, wx.WXK_NUMPAD_LEFT, wx.WXK_NUMPAD_UP) and sel_start == sel_to and pos > 0 and self._isTemplateChar(pos-1): ## dbg('adjusting field') self._AdjustField(pos) # treat as shifted up/down arrows as tab/reverse tab: - if event.ShiftDown() and keycode in (wx.WXK_UP, wx.WXK_DOWN): + if event.ShiftDown() and keycode in (wx.WXK_UP, wx.WXK_DOWN, wx.WXK_NUMPAD_UP, wx.WXK_NUMPAD_DOWN): # remove "shifting" and treat as (forward) tab: event.m_shiftDown = False keep_processing = self._OnChangeField(event) elif self._FindField(pos)._selectOnFieldEntry: - if( keycode in (wx.WXK_UP, wx.WXK_LEFT) + if( keycode in (wx.WXK_UP, wx.WXK_LEFT, wx.WXK_NUMPAD_UP, wx.WXK_NUMPAD_LEFT) and sel_start != 0 and self._isTemplateChar(sel_start-1) and sel_start != self._masklength @@ -3234,7 +3254,7 @@ class MaskedEditMixin: event.m_shiftDown = True event.m_ControlDown = True keep_processing = self._OnChangeField(event) - elif( keycode in (wx.WXK_DOWN, wx.WXK_RIGHT) + elif( keycode in (wx.WXK_DOWN, wx.WXK_RIGHT, wx.WXK_NUMPAD_DOWN, wx.WXK_NUMPAD_RIGHT) and sel_to != self._masklength and self._isTemplateChar(sel_to)): @@ -3247,8 +3267,8 @@ class MaskedEditMixin: ## dbg('using base ctrl event processing') event.Skip() else: - if( (sel_to == self._fields[0]._extent[0] and keycode == wx.WXK_LEFT) - or (sel_to == self._masklength and keycode == wx.WXK_RIGHT) ): + if( (sel_to == self._fields[0]._extent[0] and keycode in (wx.WXK_LEFT, wx.WXK_NUMPAD_LEFT) ) + or (sel_to == self._masklength and keycode in (wx.WXK_RIGHT, wx.WXK_NUMPAD_RIGHT) ) ): if not wx.Validator_IsSilent(): wx.Bell() else: @@ -3358,11 +3378,11 @@ class MaskedEditMixin: # If trying to erase beyond "legal" bounds, disallow operation: if( (sel_to == 0 and key == wx.WXK_BACK) or (self._signOk and sel_to == 1 and value[0] == ' ' and key == wx.WXK_BACK) - or (sel_to == self._masklength and sel_start == sel_to and key == wx.WXK_DELETE and not field._insertRight) + or (sel_to == self._masklength and sel_start == sel_to and key in (wx.WXK_DELETE, wx.WXK_NUMPAD_DELETE) and not field._insertRight) or (self._signOk and self._useParens and sel_start == sel_to and sel_to == self._masklength - 1 - and value[sel_to] == ' ' and key == wx.WXK_DELETE and not field._insertRight) ): + and value[sel_to] == ' ' and key in (wx.WXK_DELETE, wx.WXK_NUMPAD_DELETE) and not field._insertRight) ): if not wx.Validator_IsSilent(): wx.Bell() ## dbg(indent=0) @@ -3374,7 +3394,7 @@ class MaskedEditMixin: and sel_start >= start # and selection starts in field and ((sel_to == sel_start # and no selection and sel_to == end # and cursor at right edge - and key in (wx.WXK_BACK, wx.WXK_DELETE)) # and either delete or backspace key + and key in (wx.WXK_BACK, wx.WXK_DELETE, wx.WXK_NUMPAD_DELETE)) # and either delete or backspace key or # or (key == wx.WXK_BACK # backspacing and (sel_to == end # and selection ends at right edge @@ -4050,21 +4070,21 @@ class MaskedEditMixin: ## dbg('choices:', field._choices) ## dbg('compareChoices:', field._compareChoices) choices, choice_required = field._compareChoices, field._choiceRequired - if keycode in (wx.WXK_PRIOR, wx.WXK_UP): + if keycode in (wx.WXK_PRIOR, wx.WXK_UP, wx.WXK_NUMPAD_PRIOR, wx.WXK_NUMPAD_UP): direction = -1 else: direction = 1 match_index, partial_match = self._autoComplete(direction, choices, text, compareNoCase=field._compareNoCase, current_index = field._autoCompleteIndex) if( match_index is None - and (keycode in self._autoCompleteKeycodes + [wx.WXK_PRIOR, wx.WXK_NEXT] - or (keycode in [wx.WXK_UP, wx.WXK_DOWN] and event.ShiftDown() ) ) ): + and (keycode in self._autoCompleteKeycodes + [wx.WXK_PRIOR, wx.WXK_NEXT, wx.WXK_NUMPAD_PRIOR, wx.WXK_NUMPAD_NEXT] + or (keycode in [wx.WXK_UP, wx.WXK_DOWN, wx.WXK_NUMPAD_UP, wx.WXK_NUMPAD_DOWN] and event.ShiftDown() ) ) ): # Select the 1st thing from the list: match_index = 0 if( match_index is not None - and ( keycode in self._autoCompleteKeycodes + [wx.WXK_PRIOR, wx.WXK_NEXT] - or (keycode in [wx.WXK_UP, wx.WXK_DOWN] and event.ShiftDown()) - or (keycode == wx.WXK_DOWN and partial_match) ) ): + and ( keycode in self._autoCompleteKeycodes + [wx.WXK_PRIOR, wx.WXK_NEXT, wx.WXK_NUMPAD_PRIOR, wx.WXK_NUMPAD_NEXT] + or (keycode in [wx.WXK_UP, wx.WXK_DOWN, wx.WXK_NUMPAD_UP, wx.WXK_NUMPAD_DOWN] and event.ShiftDown()) + or (keycode in [wx.WXK_DOWN, wx.WXK_NUMPAD_DOWN] and partial_match) ) ): # We're allowed to auto-complete: ## dbg('match found') @@ -4077,10 +4097,11 @@ class MaskedEditMixin: self._CheckValid() # recolor as appopriate - if keycode in (wx.WXK_UP, wx.WXK_DOWN, wx.WXK_LEFT, wx.WXK_RIGHT): + if keycode in (wx.WXK_UP, wx.WXK_DOWN, wx.WXK_LEFT, wx.WXK_RIGHT, + wx.WXK_NUMPAD_UP, wx.WXK_NUMPAD_DOWN, wx.WXK_NUMPAD_LEFT, wx.WXK_NUMPAD_RIGHT): # treat as left right arrow if unshifted, tab/shift tab if shifted. if event.ShiftDown(): - if keycode in (wx.WXK_DOWN, wx.WXK_RIGHT): + if keycode in (wx.WXK_DOWN, wx.WXK_RIGHT, wx.WXK_NUMPAD_DOWN, wx.WXK_NUMPAD_RIGHT): # remove "shifting" and treat as (forward) tab: event.m_shiftDown = False keep_processing = self._OnChangeField(event) @@ -6702,6 +6723,9 @@ __i=0 ## CHANGELOG: ## ==================== +## Version 1.12 +## 1. Added proper support for NUMPAD keypad keycodes for navigation and control. +## ## Version 1.11 ## 1. Added value member to ValueError exceptions, so that people can catch them ## and then display their own errors, and added attribute raiseOnInvalidPaste, diff --git a/wxPython/wx/lib/mixins/inspect.py b/wxPython/wx/lib/mixins/inspection.py similarity index 97% rename from wxPython/wx/lib/mixins/inspect.py rename to wxPython/wx/lib/mixins/inspection.py index b6a5f82c61..1a364fa2e3 100644 --- a/wxPython/wx/lib/mixins/inspect.py +++ b/wxPython/wx/lib/mixins/inspection.py @@ -1,5 +1,5 @@ #---------------------------------------------------------------------------- -# Name: wx.lib.mixins.inspect +# Name: wx.lib.mixins.inspection # Purpose: A mix-in class that can add PyCrust-based inspection of the # app's widgets and sizers. # @@ -15,7 +15,7 @@ # wxPython-users mail list by Dan Eloff. import wx -from wx.lib.inspect import InspectionTool +from wx.lib.inspection import InspectionTool #---------------------------------------------------------------------------- diff --git a/wxPython/wx/lib/mixins/listctrl.py b/wxPython/wx/lib/mixins/listctrl.py index 921e250415..a28a164f79 100644 --- a/wxPython/wx/lib/mixins/listctrl.py +++ b/wxPython/wx/lib/mixins/listctrl.py @@ -120,6 +120,15 @@ class ColumnSorterMixin: if wx.Platform != "__WXMAC__" or wx.SystemOptions.GetOptionInt("mac.listctrl.always_use_generic") == 1: self.__updateImages(oldCol) evt.Skip() + self.OnSortOrderChanged() + + + def OnSortOrderChanged(self): + """ + Callback called after sort order has changed (whenever user + clicked column header). + """ + pass def __ColumnSorter(self, key1, key2): diff --git a/wxPython/wx/lib/mixins/treemixin.py b/wxPython/wx/lib/mixins/treemixin.py new file mode 100644 index 0000000000..f3a840708f --- /dev/null +++ b/wxPython/wx/lib/mixins/treemixin.py @@ -0,0 +1,646 @@ +''' +treemixin.py + +This module provides three mixin classes that can be used with tree +controls: + +- VirtualTree is a class that, when mixed in with a tree control, + makes the tree control virtual, similar to a ListCtrl in virtual mode. + A virtual tree control builds the tree itself by means of callbacks, + so the programmer is freed from the burden of building the tree herself. + +- DragAndDrop is a mixin class that helps with dragging and dropping of + items. The graphical part of dragging and dropping tree items is done by + this mixin class. You only need to implement the OnDrop method that is + called when the drop happens. + +- ExpansionState is a mixin that can be queried for the expansion state of + all items in the tree to restore it later. + +All mixin classes work with wx.TreeCtrl, wx.gizmos.TreeListCtrl, +and wx.lib.customtree.CustomTreeCtrl. They can be used together or +separately. + +The VirtualTree and DragAndDrop mixins force the wx.TR_HIDE_ROOT style. + +Author: Frank Niessink +License: wxWidgets license +Version: 0.9.1 +Date: 26 March 2007 + +ExpansionState is based on code and ideas from Karsten Hilbert. +Andrea Gavana provided help with the CustomTreeCtrl integration. +''' + + +import wx, wx.lib.customtreectrl + + +class TreeAPIHarmonizer(object): + ''' This class attempts to hide the differences in API between the + different tree controls that are part of wxPython. ''' + + def __init__(self, *args, **kwargs): + # CustomTreeCtrl uses a different keyword for the window style + # argument ('ctstyle'). To hide this, we replace the 'style' keyword + # by 'ctstyle' if we're mixed in with CustomTreeCtrl. + if isinstance(self, wx.lib.customtreectrl.CustomTreeCtrl): + kwargs['ctstyle'] = kwargs.pop('style', wx.TR_DEFAULT_STYLE) + super(TreeAPIHarmonizer, self).__init__(*args, **kwargs) + + def __callSuper(self, methodName, default, *args, **kwargs): + # If our super class has a method called methodName, call it, + # otherwise return the default value. + superClass = super(TreeAPIHarmonizer, self) + if hasattr(superClass, methodName): + return getattr(superClass, methodName)(*args, **kwargs) + else: + return default + + def GetColumnCount(self, *args, **kwargs): + # Only TreeListCtrl has columns, return 0 if we are mixed in + # with another tree control. + return self.__callSuper('GetColumnCount', 0, *args, **kwargs) + + def GetItemType(self, *args, **kwargs): + # Only CustomTreeCtrl has different item types, return the + # default item type if we are mixed in with another tree control. + return self.__callSuper('GetItemType', 0, *args, **kwargs) + + def SetItemType(self, item, newType): + # CustomTreeCtrl doesn't support changing the item type on the fly, + # so we create a new item and delete the old one. We currently only + # keep the item text, would be nicer to also retain other attributes. + text = self.GetItemText(item) + newItem = self.InsertItem(self.GetItemParent(item), item, text, + ct_type=newType) + self.Delete(item) + return newItem + + def IsItemChecked(self, *args, **kwargs): + # Only CustomTreeCtrl supports checkable items, return False if + # we are mixed in with another tree control. + return self.__callSuper('IsItemChecked', False, *args, **kwargs) + + def GetItemChecked(self, *args, **kwargs): + # For consistency's sake, provide a 'Get' and 'Set' method for + # checkable items. + return self.IsItemChecked(*args, **kwargs) + + def SetItemChecked(self, *args, **kwargs): + # For consistency's sake, provide a 'Get' and 'Set' method for + # checkable items. + return self.CheckItem(*args, **kwargs) + + def GetMainWindow(self, *args, **kwargs): + # Only TreeListCtrl has a separate main window, return self if we are + # mixed in with another tree control. + return self.__callSuper('GetMainWindow', self, *args, **kwargs) + + def GetItemImage(self, item, which=wx.TreeItemIcon_Normal, column=-1): + # CustomTreeCtrl always wants the which argument, so provide it + # TreeListCtr.GetItemImage has a different order of arguments than + # the other tree controls. Hide the differenes. + if self.GetColumnCount(): + args = (item, column, which) + else: + args = (item, which) + return super(TreeAPIHarmonizer, self).GetItemImage(*args) + + def SetItemImage(self, item, imageIndex, which=wx.TreeItemIcon_Normal, + column=-1): + # The SetItemImage signature is different for TreeListCtrl and + # other tree controls. This adapter method hides the differences. + if self.GetColumnCount(): + args = (item, imageIndex, column, which) + else: + args = (item, imageIndex, which) + super(TreeAPIHarmonizer, self).SetItemImage(*args) + + def UnselectAll(self): + # Unselect all items, regardless of whether we are in multiple + # selection mode or not. + if self.HasFlag(wx.TR_MULTIPLE): + super(TreeAPIHarmonizer, self).UnselectAll() + else: + # CustomTreeCtrl Unselect() doesn't seem to work in all cases, + # also invoke UnselectAll just to be sure. + self.Unselect() + super(TreeAPIHarmonizer, self).UnselectAll() + + def GetCount(self): + # TreeListCtrl correctly ignores the root item when it is hidden, + # but doesn't count the root item when it is visible + itemCount = super(TreeAPIHarmonizer, self).GetCount() + if self.GetColumnCount() and not self.HasFlag(wx.TR_HIDE_ROOT): + itemCount += 1 + return itemCount + + def GetSelections(self): + # Always return a list of selected items, regardless of whether + # we are in multiple selection mode or not. + if self.HasFlag(wx.TR_MULTIPLE): + selections = super(TreeAPIHarmonizer, self).GetSelections() + else: + selection = self.GetSelection() + if selection: + selections = [selection] + else: + selections = [] + # If the root item is hidden, it should never be selected, + # unfortunately, CustomTreeCtrl and TreeCtrl allow it to be selected. + if self.HasFlag(wx.TR_HIDE_ROOT): + rootItem = self.GetRootItem() + if rootItem and rootItem in selections: + selections.remove(rootItem) + return selections + + def SelectItem(self, item, *args, **kwargs): + # Prevent the hidden root from being selected, otherwise TreeCtrl + # crashes + if self.HasFlag(wx.TR_HIDE_ROOT) and item == self.GetRootItem(): + return + else: + return super(TreeAPIHarmonizer, self).SelectItem(item, *args, + **kwargs) + + def HitTest(self, *args, **kwargs): + ''' HitTest returns a two-tuple (item, flags) for tree controls + without columns and a three-tuple (item, flags, column) for tree + controls with columns. Our caller can indicate this method to + always return a three-tuple no matter what tree control we're mixed + in with by specifying the optional argument 'alwaysReturnColumn' + to be True. ''' + alwaysReturnColumn = kwargs.pop('alwaysReturnColumn', False) + hitTestResult = super(TreeAPIHarmonizer, self).HitTest(*args, **kwargs) + if len(hitTestResult) == 2 and alwaysReturnColumn: + hitTestResult += (0,) + return hitTestResult + + def ExpandAll(self, item=None): + # TreeListCtrl wants an item as argument. That's an inconsistency with + # the TreeCtrl API. Also, TreeCtrl doesn't allow invoking ExpandAll + # on a tree with hidden root node, so prevent that. + if self.HasFlag(wx.TR_HIDE_ROOT): + rootItem = self.GetRootItem() + if rootItem: + child, cookie = self.GetFirstChild(rootItem) + while child: + self.ExpandAllChildren(child) + child, cookie = self.GetNextChild(rootItem, cookie) + else: + try: + super(TreeAPIHarmonizer, self).ExpandAll() + except TypeError: + if item is None: + item = self.GetRootItem() + super(TreeAPIHarmonizer, self).ExpandAll(item) + + def ExpandAllChildren(self, item): + # TreeListCtrl doesn't have ExpandallChildren + try: + super(TreeAPIHarmonizer, self).ExpandAllChildren(item) + except AttributeError: + self.Expand(item) + child, cookie = self.GetFirstChild(item) + while child: + self.ExpandAllChildren(child) + child, cookie = self.GetNextChild(item, cookie) + + +class TreeHelper(object): + ''' This class provides methods that are not part of the API of any + tree control, but are convenient to have available. ''' + + def GetItemChildren(self, item=None, recursively=False): + ''' Return the children of item as a list. ''' + if not item: + item = self.GetRootItem() + if not item: + return [] + children = [] + child, cookie = self.GetFirstChild(item) + while child: + children.append(child) + if recursively: + children.extend(self.GetItemChildren(child, True)) + child, cookie = self.GetNextChild(item, cookie) + return children + + def GetIndexOfItem(self, item): + ''' Return the index of item. ''' + parent = self.GetItemParent(item) + if parent: + parentIndices = self.GetIndexOfItem(parent) + ownIndex = self.GetItemChildren(parent).index(item) + return parentIndices + (ownIndex,) + else: + return () + + def GetItemByIndex(self, index): + ''' Return the item specified by index. ''' + item = self.GetRootItem() + for i in index: + children = self.GetItemChildren(item) + item = children[i] + return item + + +class VirtualTree(TreeAPIHarmonizer, TreeHelper): + ''' This is a mixin class that can be used to allow for virtual tree + controls. It can be mixed in with wx.TreeCtrl, wx.gizmos.TreeListCtrl, + wx.lib.customtree.CustomTreeCtrl. + + To use it derive a new class from this class and one of the tree + controls, e.g.: + class MyTree(VirtualTree, wx.TreeCtrl): + ... + + VirtualTree uses several callbacks (such as OnGetItemText) to + retrieve information needed to construct the tree and render the + items. To specify what item the callback needs information about, + the callback passes an item index. Whereas for list controls a simple + integer index can be used, for tree controls indicating a specific + item is a little bit more complicated. See below for a more detailed + explanation of the how index works. + + Note that VirtualTree forces the wx.TR_HIDE_ROOT style. + + In your subclass you *must* override OnGetItemText and + OnGetChildrenCount. These two methods are the minimum needed to + construct the tree and render the item labels. If you want to add + images, change fonts our colours, etc., you need to override the + appropriate OnGetXXX method as well. + + About indices: your callbacks are passed a tuple of integers that + identifies the item the VirtualTree wants information about. An + empty tuple, i.e. (), represents the hidden root item. A tuple with + one integer, e.g. (3,), represents a visible root item, in this case + the fourth one. A tuple with two integers, e.g. (3,0), represents a + child of a visible root item, in this case the first child of the + fourth root item. + ''' + + def __init__(self, *args, **kwargs): + kwargs['style'] = kwargs.get('style', wx.TR_DEFAULT_STYLE) | \ + wx.TR_HIDE_ROOT + super(VirtualTree, self).__init__(*args, **kwargs) + self.Bind(wx.EVT_TREE_ITEM_EXPANDING, self.OnItemExpanding) + self.Bind(wx.EVT_TREE_ITEM_COLLAPSED, self.OnItemCollapsed) + + def OnGetChildrenCount(self, index): + ''' This function *must* be overloaded in the derived class. + It should return the number of child items of the item with the + provided index. If index == () it should return the number of + root items. ''' + raise NotImplementedError + + def OnGetItemText(self, index, column=0): + ''' This function *must* be overloaded in the derived class. It + should return the string containing the text of the specified + item. ''' + raise NotImplementedError + + def OnGetItemFont(self, index): + ''' This function may be overloaded in the derived class. It + should return the wx.Font to be used for the specified item. ''' + return wx.NullFont + + def OnGetItemTextColour(self, index): + ''' This function may be overloaded in the derived class. It + should return the wx.Colour to be used as text colour for the + specified item. ''' + return wx.NullColour + + def OnGetItemBackgroundColour(self, index): + ''' This function may be overloaded in the derived class. It + should return the wx.Colour to be used as background colour for + the specified item. ''' + return wx.NullColour + + def OnGetItemImage(self, index, which=wx.TreeItemIcon_Normal, column=0): + ''' This function may be overloaded in the derived class. It + should return the index of the image to be used. Don't forget + to associate an ImageList with the tree control. ''' + return -1 + + def OnGetItemType(self, index): + ''' This function may be overloaded in the derived class, but + that only makes sense when this class is mixed in with a tree + control that supports checkable items, i.e. CustomTreeCtrl. + This method should return whether the item is to be normal (0, + the default), a checkbox (1) or a radiobutton (2). + Note that OnGetItemChecked needs to be implemented as well; it + should return whether the item is actually checked. ''' + return 0 + + def OnGetItemChecked(self, index): + ''' This function may be overloaded in the derived class, but + that only makes sense when this class is mixed in with a tree + control that supports checkable items, i.e. CustomTreeCtrl. + This method should return whether the item is to be checked. + Note that OnGetItemType should return 1 (checkbox) or 2 + (radiobutton) for this item. ''' + return False + + def RefreshItems(self): + ''' Redraws all visible items. ''' + rootItem = self.GetRootItem() + if not rootItem: + rootItem = self.AddRoot('Hidden root') + self.RefreshChildrenRecursively(rootItem) + + def RefreshItem(self, index): + ''' Redraws the item with the specified index. ''' + item = self.GetItemByIndex(index) + hasChildren = bool(self.OnGetChildrenCount(index)) + self.DoRefreshItem(item, index, hasChildren) + + def RefreshChildrenRecursively(self, item, itemIndex=None): + ''' Refresh the children of item, reusing as much of the + existing items in the tree as possible. ''' + if itemIndex is None: + itemIndex = self.GetIndexOfItem(item) + reusableChildren = self.GetItemChildren(item) + for childIndex in self.ChildIndices(itemIndex): + if reusableChildren: + child = reusableChildren.pop(0) + else: + child = self.AppendItem(item, '') + self.RefreshItemRecursively(child, childIndex) + for child in reusableChildren: + self.Delete(child) + + def RefreshItemRecursively(self, item, itemIndex): + ''' Refresh the item and its children recursively. ''' + hasChildren = bool(self.OnGetChildrenCount(itemIndex)) + item = self.DoRefreshItem(item, itemIndex, hasChildren) + # We need to refresh the children when the item is expanded and + # when the item has no children, because in the latter case we + # might have to delete old children from the tree: + if self.IsExpanded(item) or not hasChildren: + self.RefreshChildrenRecursively(item, itemIndex) + self.SetItemHasChildren(item, hasChildren) + + def DoRefreshItem(self, item, index, hasChildren): + ''' Refresh one item. ''' + item = self.RefreshItemType(item, index) + self.RefreshItemText(item, index) + self.RefreshColumns(item, index) + self.RefreshItemFont(item, index) + self.RefreshTextColour(item, index) + self.RefreshBackgroundColour(item, index) + self.RefreshItemImage(item, index, hasChildren) + self.RefreshCheckedState(item, index) + return item + + def RefreshItemText(self, item, index): + self.__refreshAttribute(item, index, 'ItemText') + + def RefreshColumns(self, item, index): + for columnIndex in range(1, self.GetColumnCount()): + self.__refreshAttribute(item, index, 'ItemText', columnIndex) + + def RefreshItemFont(self, item, index): + self.__refreshAttribute(item, index, 'ItemFont') + + def RefreshTextColour(self, item, index): + self.__refreshAttribute(item, index, 'ItemTextColour') + + def RefreshBackgroundColour(self, item, index): + self.__refreshAttribute(item, index, 'ItemBackgroundColour') + + def RefreshItemImage(self, item, index, hasChildren): + regularIcons = [wx.TreeItemIcon_Normal, wx.TreeItemIcon_Selected] + expandedIcons = [wx.TreeItemIcon_Expanded, + wx.TreeItemIcon_SelectedExpanded] + # Refresh images in first column: + for icon in regularIcons: + self.__refreshAttribute(item, index, 'ItemImage', icon) + for icon in expandedIcons: + if hasChildren: + imageIndex = self.OnGetItemImage(index, icon) + else: + imageIndex = -1 + if self.GetItemImage(item, icon) != imageIndex or imageIndex == -1: + self.SetItemImage(item, imageIndex, icon) + # Refresh images in remaining columns, if any: + for columnIndex in range(1, self.GetColumnCount()): + for icon in regularIcons: + self.__refreshAttribute(item, index, 'ItemImage', icon, + columnIndex) + + def RefreshItemType(self, item, index): + return self.__refreshAttribute(item, index, 'ItemType') + + def RefreshCheckedState(self, item, index): + self.__refreshAttribute(item, index, 'ItemChecked') + + def ChildIndices(self, itemIndex): + childrenCount = self.OnGetChildrenCount(itemIndex) + return [itemIndex + (childNumber,) for childNumber \ + in range(childrenCount)] + + def OnItemExpanding(self, event): + self.RefreshChildrenRecursively(event.GetItem()) + event.Skip() + + def OnItemCollapsed(self, event): + parent = self.GetItemParent(event.GetItem()) + if not parent: + parent = self.GetRootItem() + self.RefreshChildrenRecursively(parent) + event.Skip() + + def __refreshAttribute(self, item, index, attribute, *args): + ''' Refresh the specified attribute if necessary. ''' + value = getattr(self, 'OnGet%s'%attribute)(index, *args) + if getattr(self, 'Get%s'%attribute)(item, *args) != value: + return getattr(self, 'Set%s'%attribute)(item, value, *args) + else: + return item + + +class DragAndDrop(TreeAPIHarmonizer, TreeHelper): + ''' This is a mixin class that can be used to easily implement + dragging and dropping of tree items. It can be mixed in with + wx.TreeCtrl, wx.gizmos.TreeListCtrl, or wx.lib.customtree.CustomTreeCtrl. + + To use it derive a new class from this class and one of the tree + controls, e.g.: + class MyTree(DragAndDrop, wx.TreeCtrl): + ... + + You *must* implement OnDrop. OnDrop is called when the user has + dropped an item on top of another item. It's up to you to decide how + to handle the drop. If you are using this mixin together with the + VirtualTree mixin, it makes sense to rearrange your underlying data + and then call RefreshItems to let the virtual tree refresh itself. ''' + + def __init__(self, *args, **kwargs): + kwargs['style'] = kwargs.get('style', wx.TR_DEFAULT_STYLE) | \ + wx.TR_HIDE_ROOT + super(DragAndDrop, self).__init__(*args, **kwargs) + self.Bind(wx.EVT_TREE_BEGIN_DRAG, self.OnBeginDrag) + + def OnDrop(self, dropItem, dragItem): + ''' This function must be overloaded in the derived class. + dragItem is the item being dragged by the user. dropItem is the + item dragItem is dropped upon. If the user doesn't drop dragItem + on another item, dropItem equals the (hidden) root item of the + tree control. ''' + raise NotImplementedError + + def OnBeginDrag(self, event): + # We allow only one item to be dragged at a time, to keep it simple + self._dragItem = event.GetItem() + if self._dragItem and self._dragItem != self.GetRootItem(): + self.StartDragging() + event.Allow() + else: + event.Veto() + + def OnEndDrag(self, event): + self.StopDragging() + dropTarget = event.GetItem() + if not dropTarget: + dropTarget = self.GetRootItem() + if self.IsValidDropTarget(dropTarget): + self.UnselectAll() + if dropTarget != self.GetRootItem(): + self.SelectItem(dropTarget) + self.OnDrop(dropTarget, self._dragItem) + + def OnDragging(self, event): + if not event.Dragging(): + self.StopDragging() + return + item, flags, column = self.HitTest(wx.Point(event.GetX(), event.GetY()), + alwaysReturnColumn=True) + if not item: + item = self.GetRootItem() + if self.IsValidDropTarget(item): + self.SetCursorToDragging() + else: + self.SetCursorToDroppingImpossible() + if flags & wx.TREE_HITTEST_ONITEMBUTTON: + self.Expand(item) + if self.GetSelections() != [item]: + self.UnselectAll() + if item != self.GetRootItem(): + self.SelectItem(item) + event.Skip() + + def StartDragging(self): + self.GetMainWindow().Bind(wx.EVT_MOTION, self.OnDragging) + self.Bind(wx.EVT_TREE_END_DRAG, self.OnEndDrag) + self.SetCursorToDragging() + + def StopDragging(self): + self.GetMainWindow().Unbind(wx.EVT_MOTION) + self.Unbind(wx.EVT_TREE_END_DRAG) + self.ResetCursor() + self.UnselectAll() + self.SelectItem(self._dragItem) + + def SetCursorToDragging(self): + self.GetMainWindow().SetCursor(wx.StockCursor(wx.CURSOR_HAND)) + + def SetCursorToDroppingImpossible(self): + self.GetMainWindow().SetCursor(wx.StockCursor(wx.CURSOR_NO_ENTRY)) + + def ResetCursor(self): + self.GetMainWindow().SetCursor(wx.NullCursor) + + def IsValidDropTarget(self, dropTarget): + if dropTarget: + allChildren = self.GetItemChildren(self._dragItem, recursively=True) + parent = self.GetItemParent(self._dragItem) + return dropTarget not in [self._dragItem, parent] + allChildren + else: + return True + + +class ExpansionState(TreeAPIHarmonizer, TreeHelper): + ''' This is a mixin class that can be used to save and restore + the expansion state (i.e. which items are expanded and which items + are collapsed) of a tree. It can be mixed in with wx.TreeCtrl, + wx.gizmos.TreeListCtrl, or wx.lib.customtree.CustomTreeCtrl. + + To use it derive a new class from this class and one of the tree + controls, e.g.: + class MyTree(ExpansionState, wx.TreeCtrl): + ... + + By default, ExpansionState uses the position of tree items in the tree + to keep track of which items are expanded. This should be sufficient + for the simple scenario where you save the expansion state of the tree + when the user closes the application or file so that you can restore + the expansion state when the user start the application or loads that + file for the next session. + + If you need to add or remove items between the moments of saving and + restoring the expansion state (e.g. in case of a multi-user application) + you must override GetItemIdentity so that saving and loading of the + expansion doesn't depend on the position of items in the tree, but + rather on some more stable characteristic of the underlying domain + object, e.g. a social security number in case of persons or an isbn + number in case of books. ''' + + def GetItemIdentity(self, item): + ''' Return a hashable object that represents the identity of the + item. By default this returns the position of the item in the + tree. You may want to override this to return the item label + (if you know that labels are unique and don't change), or return + something that represents the underlying domain object, e.g. + a database key. ''' + return self.GetIndexOfItem(item) + + def GetExpansionState(self): + ''' GetExpansionState() -> list of expanded items. Expanded items + are coded as determined by the result of GetItemIdentity(item). ''' + root = self.GetRootItem() + if not root: + return [] + if self.HasFlag(wx.TR_HIDE_ROOT): + return self.GetExpansionStateOfChildren(root) + else: + return self.GetExpansionStateOfItem(root) + + def SetExpansionState(self, listOfExpandedItems): + ''' SetExpansionState(listOfExpandedItems). Expands all tree items + whose identity, as determined by GetItemIdentity(item), is present + in the list and collapses all other tree items. ''' + root = self.GetRootItem() + if not root: + return + if self.HasFlag(wx.TR_HIDE_ROOT): + self.SetExpansionStateOfChildren(listOfExpandedItems, root) + else: + self.SetExpansionStateOfItem(listOfExpandedItems, root) + + ExpansionState = property(GetExpansionState, SetExpansionState) + + def GetExpansionStateOfItem(self, item): + listOfExpandedItems = [] + if self.IsExpanded(item): + listOfExpandedItems.append(self.GetItemIdentity(item)) + listOfExpandedItems.extend(self.GetExpansionStateOfChildren(item)) + return listOfExpandedItems + + def GetExpansionStateOfChildren(self, item): + listOfExpandedItems = [] + for child in self.GetItemChildren(item): + listOfExpandedItems.extend(self.GetExpansionStateOfItem(child)) + return listOfExpandedItems + + def SetExpansionStateOfItem(self, listOfExpandedItems, item): + if self.GetItemIdentity(item) in listOfExpandedItems: + self.Expand(item) + self.SetExpansionStateOfChildren(listOfExpandedItems, item) + else: + self.Collapse(item) + + def SetExpansionStateOfChildren(self, listOfExpandedItems, item): + for child in self.GetItemChildren(item): + self.SetExpansionStateOfItem(listOfExpandedItems, child) diff --git a/wxPython/wx/lib/ogl/_basic.py b/wxPython/wx/lib/ogl/_basic.py index db095dd165..5d5f461fce 100644 --- a/wxPython/wx/lib/ogl/_basic.py +++ b/wxPython/wx/lib/ogl/_basic.py @@ -67,9 +67,6 @@ class ShapeEvtHandler(object): self._previousHandler = prev self._handlerShape = shape - def __del__(self): - pass - def SetShape(self, sh): self._handlerShape = sh @@ -311,9 +308,6 @@ class Shape(ShapeEvtHandler): self.GetEventHandler().OnDelete() self._eventHandler = None - def __del__(self): - ShapeEvtHandler.__del__(self) - def Draggable(self): """TRUE if the shape may be dragged by the user.""" return True diff --git a/wxPython/wx/lib/ogl/_lines.py b/wxPython/wx/lib/ogl/_lines.py index d4da07dbd2..77ce392cac 100644 --- a/wxPython/wx/lib/ogl/_lines.py +++ b/wxPython/wx/lib/ogl/_lines.py @@ -218,16 +218,6 @@ class LineShape(Shape): self._lineControlPoints = [] self._arcArrows = [] - def __del__(self): - if self._lineControlPoints: - self._lineControlPoints = [] - for i in range(3): - if self._labelObjects[i]: - self._labelObjects[i].Select(False) - self._labelObjects[i].RemoveFromCanvas(self._canvas) - self._labelObjects = [] - self.ClearArrowsAtPosition(-1) - def GetFrom(self): """Return the 'from' object.""" return self._from @@ -492,6 +482,11 @@ class LineShape(Shape): self._from.GetLines().remove(self) self._to = None self._from = None + for i in range(3): + if self._labelObjects[i]: + self._labelObjects[i].Select(False) + self._labelObjects[i].RemoveFromCanvas(self._canvas) + self.ClearArrowsAtPosition(-1) def SetEnds(self, x1, y1, x2, y2): """Set the end positions of the line.""" diff --git a/wxPython/wx/lib/plot.py b/wxPython/wx/lib/plot.py index 0e5d01f1ec..96827b67c7 100644 --- a/wxPython/wx/lib/plot.py +++ b/wxPython/wx/lib/plot.py @@ -554,6 +554,7 @@ class PlotCanvas(wx.Panel): self._ySpec= 'auto' self._gridEnabled= False self._legendEnabled= False + self._titleEnabled= True # Fonts self._fontCache = {} @@ -567,6 +568,8 @@ class PlotCanvas(wx.Panel): self._pointLabelFunc= None self.canvas.Bind(wx.EVT_LEAVE_WINDOW, self.OnLeave) + self._useScientificNotation = False + self.canvas.Bind(wx.EVT_PAINT, self.OnPaint) self.canvas.Bind(wx.EVT_SIZE, self.OnSize) # OnSize called to make sure the buffer is initialized. @@ -746,6 +749,12 @@ class PlotCanvas(wx.Panel): """Set True to show scrollbars""" return self.sb_vert.IsShown() + def SetUseScientificNotation(self, useScientificNotation): + self._useScientificNotation = useScientificNotation + + def GetUseScientificNotation(self): + return self._useScientificNotation + def SetEnableDrag(self, value): """Set True to enable drag.""" if value not in [True,False]: @@ -799,6 +808,17 @@ class PlotCanvas(wx.Panel): """True if Legend enabled.""" return self._legendEnabled + def SetEnableTitle(self, value): + """Set True to enable title.""" + if value not in [True,False]: + raise TypeError, "Value should be True or False" + self._titleEnabled= value + self.Redraw() + + def GetEnableTitle(self): + """True if title enabled.""" + return self._titleEnabled + def SetEnablePointLabel(self, value): """Set True to enable pointLabel.""" if value not in [True,False]: @@ -1038,11 +1058,14 @@ class PlotCanvas(wx.Panel): textSize_scale= _Numeric.array([rhsW+lhsW,bottomH+topH]) # make plot area smaller by text size textSize_shift= _Numeric.array([lhsW, bottomH]) # shift plot area by this amount - # drawing title and labels text - dc.SetFont(self._getFont(self._fontSizeTitle)) - titlePos= (self.plotbox_origin[0]+ lhsW + (self.plotbox_size[0]-lhsW-rhsW)/2.- titleWH[0]/2., - self.plotbox_origin[1]- self.plotbox_size[1]) - dc.DrawText(graphics.getTitle(),titlePos[0],titlePos[1]) + # draw title if requested + if self._titleEnabled: + dc.SetFont(self._getFont(self._fontSizeTitle)) + titlePos= (self.plotbox_origin[0]+ lhsW + (self.plotbox_size[0]-lhsW-rhsW)/2.- titleWH[0]/2., + self.plotbox_origin[1]- self.plotbox_size[1]) + dc.DrawText(graphics.getTitle(),titlePos[0],titlePos[1]) + + # draw label text dc.SetFont(self._getFont(self._fontSizeAxis)) xLabelPos= (self.plotbox_origin[0]+ lhsW + (self.plotbox_size[0]-lhsW-rhsW)/2.- xLabelWH[0]/2., self.plotbox_origin[1]- xLabelWH[1]) @@ -1131,7 +1154,7 @@ class PlotCanvas(wx.Panel): l.append(cn) return l - def GetClosetPoint(self, pntXY, pointScaled= True): + def GetClosestPoint(self, pntXY, pointScaled= True): """Returns list with [curveNumber, legend, index of closest point, pointXY, scaledXY, distance] list for only the closest curve. @@ -1151,6 +1174,8 @@ class PlotCanvas(wx.Panel): mdist = min(dists) #Min dist i = dists.index(mdist) #index for min dist return closestPts[i] #this is the closest point on closest curve + + GetClosetPoint = GetClosestPoint def UpdatePointLabel(self, mDataDict): """Updates the pointLabel point on screen with data contained in @@ -1355,8 +1380,11 @@ class PlotCanvas(wx.Panel): """Draws Title and labels and returns width and height for each""" # TextExtents for Title and Axis Labels dc.SetFont(self._getFont(self._fontSizeTitle)) - title= graphics.getTitle() - titleWH= dc.GetTextExtent(title) + if self._titleEnabled: + title= graphics.getTitle() + titleWH= dc.GetTextExtent(title) + else: + titleWH= (0,0) dc.SetFont(self._getFont(self._fontSizeAxis)) xLabel, yLabel= graphics.getXLabel(),graphics.getYLabel() xLabelWH= dc.GetTextExtent(xLabel) @@ -1565,7 +1593,7 @@ class PlotCanvas(wx.Panel): error = e factor = f grid = factor * 10.**power - if power > 4 or power < -4: + if self._useScientificNotation and (power > 4 or power < -4): format = '%+7.1e' elif power >= 0: digits = max(1, int(power)) @@ -2021,7 +2049,7 @@ class TestFrame(wx.Frame): if self.client.GetEnablePointLabel() == True: #make up dict with info for the pointLabel #I've decided to mark the closest point on the closest curve - dlst= self.client.GetClosetPoint( self.client._getXY(event), pointScaled= True) + dlst= self.client.GetClosestPoint( self.client._getXY(event), pointScaled= True) if dlst != []: #returns [] if none curveNum, legend, pIndex, pointXY, scaledXY, distance = dlst #make up dictionary to pass to my user function (see DrawPointLabel) diff --git a/wxPython/wx/lib/wxpTag.py b/wxPython/wx/lib/wxpTag.py index d362fb365f..13d2a172f9 100644 --- a/wxPython/wx/lib/wxpTag.py +++ b/wxPython/wx/lib/wxpTag.py @@ -163,16 +163,13 @@ class wxpTagHandler(wx.html.HtmlWinTagHandler): # create the object parent = self.GetParser().GetWindowInterface().GetHTMLWindow() if parent: - obj = apply(self.ctx.classObj, - (parent,), - self.ctx.kwargs) + obj = self.ctx.classObj(parent, **self.ctx.kwargs) obj.Show(True) # add it to the HtmlWindow self.GetParser().GetContainer().InsertCell( wx.html.HtmlWidgetCell(obj, self.ctx.floatWidth)) self.ctx = None - return True diff --git a/wxPython/wx/tools/XRCed/xrced.py b/wxPython/wx/tools/XRCed/xrced.py index dd60cb3142..e7b91de35b 100644 --- a/wxPython/wx/tools/XRCed/xrced.py +++ b/wxPython/wx/tools/XRCed/xrced.py @@ -1592,7 +1592,8 @@ class PrefsDialog(wx.Dialog): self.PostCreate(pre) self.checkControls = {} # map of check IDs to (control,dict,param) - xxx = sys.modules['xxx'] + ##xxx = sys.modules['xxx'] + import xxx d = xxx.xxxSizerItem.defaults_panel self.check_proportion_panel = xrc.XRCCTRL(self, 'check_proportion_panel') @@ -1716,12 +1717,15 @@ Please upgrade wxWidgets to %d.%d.%d or higher.''' % MinWxVersion) # Preferences conf.allowExec = conf.Read('Prefs/allowExec', 'ask') p = 'Prefs/sizeritem_defaults_panel' + import xxx if conf.HasEntry(p): - sys.modules['xxx'].xxxSizerItem.defaults_panel = ReadDictFromString(conf.Read(p)) + ##sys.modules['xxx'].xxxSizerItem.defaults_panel = ReadDictFromString(conf.Read(p)) + xxx.xxxSizerItem.defaults_panel = ReadDictFromString(conf.Read(p)) p = 'Prefs/sizeritem_defaults_control' if conf.HasEntry(p): - sys.modules['xxx'].xxxSizerItem.defaults_control = ReadDictFromString(conf.Read(p)) - + ##sys.modules['xxx'].xxxSizerItem.defaults_control = ReadDictFromString(conf.Read(p)) + xxx.xxxSizerItem.defaults_control = ReadDictFromString(conf.Read(p)) + # Add handlers wx.FileSystem.AddHandler(wx.MemoryFSHandler()) # Create main frame @@ -1783,9 +1787,12 @@ Please upgrade wxWidgets to %d.%d.%d or higher.''' % MinWxVersion) # Preferences wc.DeleteGroup('Prefs') wc.Write('Prefs/allowExec', conf.allowExec) - v = sys.modules['xxx'].xxxSizerItem.defaults_panel + import xxx + ##v = sys.modules['xxx'].xxxSizerItem.defaults_panel + v = xxx.xxxSizerItem.defaults_panel if v: wc.Write('Prefs/sizeritem_defaults_panel', DictToString(v)) - v = sys.modules['xxx'].xxxSizerItem.defaults_control + ###v = sys.modules['xxx'].xxxSizerItem.defaults_control + v = xxx.xxxSizerItem.defaults_control if v: wc.Write('Prefs/sizeritem_defaults_control', DictToString(v)) wc.Flush() diff --git a/wxPython/wx/tools/helpviewer.py b/wxPython/wx/tools/helpviewer.py index b025eccce1..48fe6ef5c5 100644 --- a/wxPython/wx/tools/helpviewer.py +++ b/wxPython/wx/tools/helpviewer.py @@ -1,5 +1,5 @@ #---------------------------------------------------------------------- -# Name: wxPython.tools.helpviewer +# Name: wx.tools.helpviewer # Purpose: HTML Help viewer # # Author: Robin Dunn @@ -26,6 +26,12 @@ import sys, os #--------------------------------------------------------------------------- +def makeOtherFrame(helpctrl): + import wx + parent = helpctrl.GetFrame() + otherFrame = wx.Frame(parent) + + def main(args=sys.argv): if len(args) < 2: print __doc__ @@ -66,6 +72,14 @@ def main(args=sys.argv): print "Adding %s..." % helpfile helpctrl.AddBook(helpfile, 1) + # The frame used by the HtmlHelpController is set to not prevent + # app exit, so in the case of a standalone helpviewer like this + # when the about box or search box is closed the help frame will + # be the only one left and the app will close unexpectedly. To + # work around this we'll create another frame that is never shown, + # but which will be closed when the helpviewer frame is closed. + wx.CallAfter(makeOtherFrame, helpctrl) + # start it up! helpctrl.DisplayContents() app.MainLoop() diff --git a/wxPython/wx/tools/img2py.py b/wxPython/wx/tools/img2py.py index 71a6099b6d..5d9425054e 100644 --- a/wxPython/wx/tools/img2py.py +++ b/wxPython/wx/tools/img2py.py @@ -10,9 +10,12 @@ #---------------------------------------------------------------------- # 12/21/2003 - Jeff Grimmett (grimmtooth@softhome.net) # -# o V2.5 compatability update # - +# 2/25/2007 - Gianluca Costa (archimede86@katamail.com) +# +# +# o V2.5 compatibility update +# """ img2py.py -- Convert an image to PNG format and embed it in a Python @@ -38,10 +41,12 @@ Options: fucntions, (getNameBitmap, etc.) -c Maintain a catalog of names that can be used to reference - images. Catalog can be accessed via catalog and index attributes - of the module. If the -n option is specified then + images. Catalog can be accessed via catalog and + index attributes of the module. + If the -n option is specified then is used for the catalog key and index value, otherwise - the filename without any path or extension is used as the key. + the filename without any path or extension is used + as the key. -a This flag specifies that the python_file should be appended to instead of overwritten. This in combination with -n will @@ -51,6 +56,9 @@ Options: -i Also output a function to return the image as a wxIcon. + +You can also import this module from your Python scripts, and use its img2py() +function. See its docstring for more info. """ # @@ -60,20 +68,30 @@ Options: # # 12/21/2003 - Jeff Grimmett (grimmtooth@softhome.net) # -# o V2.5 compatability update # - +# 2/25/2007 - Gianluca Costa (archimede86@katamail.com) +# -Refactorization of the script-creation code in a specific "img2py()" function +# -Added regex parsing instead of module importing +# -Added some "try/finally" statements +# -Added default values as named constants +# -Made some parts of code a bit easier to read +# -Updated the module docstring +# -Corrected a bug with EmptyIcon +# +# o V2.5 compatibility update +# import cPickle import cStringIO import getopt import glob import os +import os.path import sys import tempfile import zlib +import re import wx - import img2img @@ -87,7 +105,7 @@ def crunch_data(data, compressed): # This next bit is borrowed from PIL. It is used to wrap the text intelligently. fp = cStringIO.StringIO() - data = data + " " # buffer for the +1 test + data += " " # buffer for the +1 test c = i = 0 word = "" octdigits = "01234567" @@ -95,52 +113,198 @@ def crunch_data(data, compressed): while i < len(data): if data[i] != "\\": word = data[i] - i = i + 1 + i += 1 else: if data[i+1] in octdigits: - for n in range(2, 5): + for n in xrange(2, 5): if data[i+n] not in octdigits: break word = data[i:i+n] - i = i + n + i += n elif data[i+1] == 'x': - for n in range(2, 5): + for n in xrange(2, 5): if data[i+n] not in hexdigits: break word = data[i:i+n] - i = i + n + i += n else: word = data[i:i+2] - i = i + 2 + i += 2 l = len(word) if c + l >= 78-1: fp.write("\\\n") c = 0 fp.write(word) - c = c + l + c += l # return the formatted compressed data return fp.getvalue() app = None +DEFAULT_APPEND = False +DEFAULT_COMPRESSED = True +DEFAULT_MASKCLR = None +DEFAULT_IMGNAME = "" +DEFAULT_ICON = False +DEFAULT_CATALOG = False + +#THIS IS USED TO IDENTIFY, IN THE GENERATED SCRIPT, LINES IN THE FORM "index.append('Image name')" +indexPattern = re.compile(r"\s*index.append\('(.+)'\)\s*") + +def img2py(image_file, python_file, append=DEFAULT_APPEND, compressed=DEFAULT_COMPRESSED, maskClr=DEFAULT_MASKCLR, imgName=DEFAULT_IMGNAME, icon=DEFAULT_ICON, catalog=DEFAULT_CATALOG): + """ + Converts an image file to a data structure written in a Python file + --image_file: string; the path of the source image file + --python_file: string; the path of the destination python file + --other arguments: they are equivalent to the command-line arguments + """ + global app + if not wx.GetApp(): + app = wx.PySimpleApp() + + # convert the image file to a temporary file + tfname = tempfile.mktemp() + try: + ok, msg = img2img.convert(image_file, maskClr, None, tfname, wx.BITMAP_TYPE_PNG, ".png") + if not ok: + print msg + return + + data = open(tfname, "rb").read() + data = crunch_data(data, compressed) + finally: + if os.path.exists(tfname): + os.remove(tfname) + + + old_index = [] + if catalog and append: + # check to see if catalog exists already (file may have been created + # with an earlier version of img2py or without -c option) + pyPath, pyFile = os.path.split(python_file) + + append_catalog = True + + sourcePy = open(python_file, "r") + try: + for line in sourcePy: + + if line == "catalog = {}\n": + append_catalog = False + else: + lineMatcher = indexPattern.match(line) + if lineMatcher: + old_index.append(lineMatcher.groups()[0]) + finally: + sourcePy.close() + + + if append_catalog: + out = open(python_file, "a") + try: + out.write("\n# ***************** Catalog starts here *******************") + out.write("\n\ncatalog = {}\n") + out.write("index = []\n\n") + out.write("class ImageClass: pass\n\n") + finally: + out.close() + + + + if append: + out = open(python_file, "a") + else: + out = open(python_file, "w") + + try: + if catalog: + imgPath, imgFile = os.path.split(image_file) + + if not imgName: + imgName = os.path.splitext(imgFile)[0] + print "\nWarning: -n not specified. Using filename (%s) for catalog entry." % imgName + + out.write("#" + "-" * 70 + "\n") + if not append: + out.write("# This file was generated by %s\n#\n" % sys.argv[0]) + out.write("from wx import ImageFromStream, BitmapFromImage, EmptyIcon\n") + if compressed: + out.write("import cStringIO, zlib\n\n\n") + else: + out.write("import cStringIO\n\n\n") + + if catalog: + out.write("catalog = {}\n") + out.write("index = []\n\n") + out.write("class ImageClass: pass\n\n") + + if compressed: + out.write("def get%sData():\n" + " return zlib.decompress(\n%s)\n\n" + % (imgName, data)) + else: + out.write("def get%sData():\n" + " return \\\n%s\n\n" + % (imgName, data)) + + + out.write("def get%sBitmap():\n" + " return BitmapFromImage(get%sImage())\n\n" + "def get%sImage():\n" + " stream = cStringIO.StringIO(get%sData())\n" + " return ImageFromStream(stream)\n\n" + % tuple([imgName] * 4)) + if icon: + out.write("def get%sIcon():\n" + " icon = EmptyIcon()\n" + " icon.CopyFromBitmap(get%sBitmap())\n" + " return icon\n\n" + % tuple([imgName] * 2)) + + if catalog: + if imgName in old_index: + print "Warning: %s already in catalog." % imgName + print " Only the last entry will be accessible.\n" + old_index.append(imgName) + out.write("index.append('%s')\n" % imgName) + out.write("catalog['%s'] = ImageClass()\n" % imgName) + out.write("catalog['%s'].getData = get%sData\n" % tuple([imgName] * 2)) + out.write("catalog['%s'].getImage = get%sImage\n" % tuple([imgName] * 2)) + out.write("catalog['%s'].getBitmap = get%sBitmap\n" % tuple([imgName] * 2)) + if icon: + out.write("catalog['%s'].getIcon = get%sIcon\n" % tuple([imgName] * 2)) + out.write("\n\n") + + + if imgName: + n_msg = ' using "%s"' % imgName + else: + n_msg = "" + + if maskClr: + m_msg = " with mask %s" % maskClr + else: + m_msg = "" + + print "Embedded %s%s into %s%s" % (image_file, n_msg, python_file, m_msg) + finally: + out.close() + + + def main(args): if not args or ("-h" in args): print __doc__ return - - # some bitmap related things need to have a wxApp initialized... - if wx.GetApp() is None: - global app - app = wx.PySimpleApp() - - append = 0 - compressed = 1 - maskClr = None - imgName = "" - icon = 0 - catalog = 0 + + append = DEFAULT_APPEND + compressed = DEFAULT_COMPRESSED + maskClr = DEFAULT_MASKCLR + imgName = DEFAULT_IMGNAME + icon = DEFAULT_ICON + catalog = DEFAULT_CATALOG try: opts, fileArgs = getopt.getopt(args, "auicn:m:") @@ -150,131 +314,26 @@ def main(args): for opt, val in opts: if opt == "-a": - append = 1 + append = True elif opt == "-u": - compressed = 0 + compressed = False elif opt == "-n": imgName = val elif opt == "-m": maskClr = val elif opt == "-i": - icon = 1 + icon = True elif opt == "-c": - catalog = 1 + catalog = True if len(fileArgs) != 2: print __doc__ return image_file, python_file = fileArgs + img2py(image_file, python_file, append, compressed, maskClr, imgName, icon, catalog) + - # convert the image file to a temporary file - tfname = tempfile.mktemp() - ok, msg = img2img.convert(image_file, maskClr, None, tfname, wx.BITMAP_TYPE_PNG, ".png") - if not ok: - print msg - return - - data = open(tfname, "rb").read() - data = crunch_data(data, compressed) - os.unlink(tfname) - - if append: - out = open(python_file, "a") - else: - out = open(python_file, "w") - - if catalog: - pyPath, pyFile = os.path.split(python_file) - imgPath, imgFile = os.path.split(image_file) - - if not imgName: - imgName = os.path.splitext(imgFile)[0] - print "\nWarning: -n not specified. Using filename (%s) for catalog entry." % imgName - - old_index = [] - if append: - # check to see if catalog exists already (file may have been created - # with an earlier version of img2py or without -c option) - oldSysPath = sys.path[:] - sys.path = [pyPath] # make sure we don't import something else by accident - mod = __import__(os.path.splitext(pyFile)[0]) - if 'index' not in dir(mod): - print "\nWarning: %s was originally created without catalog." % python_file - print " Any images already in file will not be cataloged.\n" - out.write("\n# ***************** Catalog starts here *******************") - out.write("\n\ncatalog = {}\n") - out.write("index = []\n\n") - out.write("class ImageClass: pass\n\n") - else: # save a copy of the old index so we can warn about duplicate names - old_index[:] = mod.index[:] - del mod - sys.path = oldSysPath[:] - - out.write("#" + "-" * 70 + "\n") - if not append: - out.write("# This file was generated by %s\n#\n" % sys.argv[0]) - out.write("from wx import ImageFromStream, BitmapFromImage\n") - if icon: - out.write("from wx import EmptyIcon\n") - if compressed: - out.write("import cStringIO, zlib\n\n\n") - else: - out.write("import cStringIO\n\n\n") - - if catalog: - out.write("catalog = {}\n") - out.write("index = []\n\n") - out.write("class ImageClass: pass\n\n") - - if compressed: - out.write("def get%sData():\n" - " return zlib.decompress(\n%s)\n\n" - % (imgName, data)) - else: - out.write("def get%sData():\n" - " return \\\n%s\n\n" - % (imgName, data)) - - - out.write("def get%sBitmap():\n" - " return BitmapFromImage(get%sImage())\n\n" - "def get%sImage():\n" - " stream = cStringIO.StringIO(get%sData())\n" - " return ImageFromStream(stream)\n\n" - % tuple([imgName] * 4)) - if icon: - out.write("def get%sIcon():\n" - " icon = EmptyIcon()\n" - " icon.CopyFromBitmap(get%sBitmap())\n" - " return icon\n\n" - % tuple([imgName] * 2)) - - if catalog: - if imgName in old_index: - print "Warning: %s already in catalog." % imgName - print " Only the last entry will be accessible.\n" - old_index.append(imgName) - out.write("index.append('%s')\n" % imgName) - out.write("catalog['%s'] = ImageClass()\n" % imgName) - out.write("catalog['%s'].getData = get%sData\n" % tuple([imgName] * 2)) - out.write("catalog['%s'].getImage = get%sImage\n" % tuple([imgName] * 2)) - out.write("catalog['%s'].getBitmap = get%sBitmap\n" % tuple([imgName] * 2)) - if icon: - out.write("catalog['%s'].getIcon = get%sIcon\n" % tuple([imgName] * 2)) - out.write("\n\n") - - if imgName: - n_msg = ' using "%s"' % imgName - else: - n_msg = "" - if maskClr: - m_msg = " with mask %s" % maskClr - else: - m_msg = "" - print "Embedded %s%s into %s%s" % (image_file, n_msg, python_file, m_msg) - - + if __name__ == "__main__": main(sys.argv[1:]) - diff --git a/wxPython/wxPython/__init__.py b/wxPython/wxPython/__init__.py index a984cd13e2..0b59d5bdc1 100644 --- a/wxPython/wxPython/__init__.py +++ b/wxPython/wxPython/__init__.py @@ -3,7 +3,7 @@ import warnings warnings.warn( "The wxPython compatibility package is no longer automatically generated " - "or activly maintained. Please switch to the wx package as soon as possible.", + "or actively maintained. Please switch to the wx package as soon as possible.", DeprecationWarning, stacklevel=2) # We need to be able to import from the wx package, but there is also -- 2.45.2