From: Robin Dunn Date: Fri, 16 Feb 2001 08:19:50 +0000 (+0000) Subject: Copied/merged from the 2.2 branch. X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/1b62f00d8e3ec5437ab780cb3d73d299cc61e20c Copied/merged from the 2.2 branch. Changes needed to build with new event system git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@9374 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/wxPython/BUILD.win32.txt b/wxPython/BUILD.win32.txt index 4944ecebe2..d86ccfa952 100644 --- a/wxPython/BUILD.win32.txt +++ b/wxPython/BUILD.win32.txt @@ -55,10 +55,6 @@ B. You'll usually want to use wxWindows sources that have the same version number as the wxPython sources you are using. (Another advantage of using CVS is that you'll get both at the same time.) - NOTE: There probably isn't going to be an official 2.2.2 release - for wxMSW so I have taken a snapshot of my workspace and made it - available at http://alldunn.com/wxPython/dist/others/ - C. Once you get the sources be sure to put them in a path without a space in it (i.e., NOT c:\Program Files\wx) and set an environment variable named WXWIN to this directory. For example: @@ -93,7 +89,6 @@ D. Change to the wx2\include\wx\msw directory and copy setup0.h to wxUSE_DIALUP_MANAGER 0 wxUSE_DYNLIB_CLASS 0 wxUSE_DOC_VIEW_ARCHITECTURE 0 - wxUSE_MDI_ARCHITECTURE 0 wxUSE_PLOT 0 wxUSE_POSTSCRIPT_ARCHITECTURE_IN_MSW 0 diff --git a/wxPython/CHANGES.txt b/wxPython/CHANGES.txt index 9b96d8c58a..320f184450 100644 --- a/wxPython/CHANGES.txt +++ b/wxPython/CHANGES.txt @@ -2,7 +2,8 @@ CHANGES.txt for wxPython ---------------------------------------------------------------------- -2.3b2 + +2.2.5 ----- New typemaps for wxString when compiling for Python 2.0 and beyond @@ -35,8 +36,8 @@ Fixed GOBS of reference leaks. Massive code changes and cleanup to allow wxPython to be split into multiple extension modules again. A Python CObject is used to allow -the "export" of SWIG and other common helper functions from the wxc -module to other modules, even if they are in separate shared +the "export" of SWIG functions and other common helper functions from +the wxc module to other modules, even if they are in separate shared libraries. Should also be usable from 3rd party code, just include wxPython/src/export.h @@ -44,6 +45,22 @@ Changed the default setup so the following are built as separate extension modules: calendar, glcanvas, grid, html, ogl, stc, and utils. Will probably add more later. +Changed the wxPrinterDC to use the new constructor taking a +wxPrintData object. The old ctor is still there using the +wxPrinterDC2 name. + +Added wxPython.lib.anchors.py from Riaan Booysen. It contains a class +that implements Delphi's Anchors with wxLayoutConstraints. + +Added wxPython.lib.fancytext from Timothy Hochberg. + +Changed the GenericButtons to send their event in idle time, so the +mouse won't be captured when the event handler is called. + +Added wxPython.lib.rpcMixin from Greg Landrum, although it's not +integrated with the demo yet. It allows a wxPython GUI to be an +XML-RPC server. + New in 2.2.2 diff --git a/wxPython/MANIFEST.in b/wxPython/MANIFEST.in index eaffe899e6..2f1074b3fd 100644 --- a/wxPython/MANIFEST.in +++ b/wxPython/MANIFEST.in @@ -2,6 +2,8 @@ include *.txt include my_distutils.py ## include my_install_data.py include licence/*.txt +include b +include b.bat include demo/*.py include demo/bitmaps/*.bmp diff --git a/wxPython/b b/wxPython/b index c6ac5afd3f..7b5f575b73 100755 --- a/wxPython/b +++ b/wxPython/b @@ -33,8 +33,31 @@ elif [ "$1" = "s" ]; then # "r" --> rpm dist elif [ "$1" = "r" ]; then - shift - CMD="$SETUP $OTHERFLAGS bdist_rpm" + + # save the original + cp setup.py setup.py.save + + # fix up setup.py the way we want... + sed "s/BUILD_GLCANVAS = /BUILD_GLCANVAS = 0 #/" < setup.py.save > setup.py.temp + sed "s/GL_ONLY = /GL_ONLY = 1 #/" < setup.py.temp > setup.py + + # build wxPython-gl RPM + $SETUP $OTHERFLAGS bdist_rpm --binary-only --doc-files README.txt + rm dist/wxPython-gl*.tar.gz + + # Build wxPython RPM + cp setup.py setup.py.temp + sed "s/GL_ONLY = /GL_ONLY = 0 #/" < setup.py.temp > setup.py + $SETUP $OTHERFLAGS bdist_rpm + + # put the oringal back + cp setup.py.save setup.py + rm setup.py.* + + # rebuild the source dist without the munched up setup.py + $SETUP $OTHERFLAGS sdist + exit 0 + # (no command arg) --> normal build for development else diff --git a/wxPython/contrib/glcanvas/msw/glcanvas.cpp b/wxPython/contrib/glcanvas/msw/glcanvas.cpp index 0caf44c852..ec3035dbd9 100644 --- a/wxPython/contrib/glcanvas/msw/glcanvas.cpp +++ b/wxPython/contrib/glcanvas/msw/glcanvas.cpp @@ -653,9 +653,9 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxRealPoint","_wxRealPoint",0}, { "_wxNavigationKeyEvent","_class_wxNavigationKeyEvent",0}, { "_wxPNMHandler","_class_wxPNMHandler",0}, - { "_wxPrinterDC","_class_wxPrinterDC",0}, { "_wxWindowCreateEvent","_class_wxWindowCreateEvent",0}, { "_wxLogGui","_class_wxLogGui",0}, + { "_wxPrinterDC","_class_wxPrinterDC",0}, { "_class_wxMenuItem","_wxMenuItem",0}, { "_class_wxPaintEvent","_wxPaintEvent",0}, { "_wxSysColourChangedEvent","_class_wxSysColourChangedEvent",0}, @@ -972,12 +972,12 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxPyApp","_wxPyApp",0}, { "_wxSize","_class_wxSize",0}, { "_wxRegionIterator","_class_wxRegionIterator",0}, - { "_class_wxPrinterDC","_wxPrinterDC",0}, { "_class_wxPyTextDataObject","_wxPyTextDataObject",0}, { "_class_wxLogTextCtrl","_wxLogTextCtrl",0}, { "_class_wxLogGui","_wxLogGui",0}, { "_class_wxMDIParentFrame","_wxMDIParentFrame",0}, { "_wxPyTreeItemData","_class_wxPyTreeItemData",0}, + { "_class_wxPrinterDC","_wxPrinterDC",0}, { "_wxStaticBoxSizer","_class_wxStaticBoxSizer",0}, { "_class_wxTimeSpan","_wxTimeSpan",0}, { "_class_wxPyFileSystemHandler","_wxPyFileSystemHandler",0}, diff --git a/wxPython/contrib/ogl/ogl.cpp b/wxPython/contrib/ogl/ogl.cpp index c4fccd233a..e49f3498ef 100644 --- a/wxPython/contrib/ogl/ogl.cpp +++ b/wxPython/contrib/ogl/ogl.cpp @@ -351,6 +351,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxPNMHandler","_class_wxPNMHandler",0}, { "_wxWindowCreateEvent","_class_wxWindowCreateEvent",0}, { "_wxLogGui","_class_wxLogGui",0}, + { "_wxPrinterDC","_class_wxPrinterDC",0}, { "_class_wxPyShapeEvtHandler","_wxPyShapeEvtHandler",0}, { "_class_wxMenuItem","_wxMenuItem",0}, { "_class_wxPaintEvent","_wxPaintEvent",0}, @@ -360,7 +361,6 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxPySizer","_wxPySizer",0}, { "_class_wxPyCompositeShape","_wxPyCompositeShape",0}, { "_wxPyPolygonShape","_class_wxPyPolygonShape",0}, - { "_class_wxPostScriptDC","_wxPostScriptDC",0}, { "_wxPanel","_class_wxPanel",0}, { "_wxInitDialogEvent","_class_wxInitDialogEvent",0}, { "_wxCheckBox","_class_wxCheckBox",0}, @@ -426,6 +426,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxZipFSHandler","_wxZipFSHandler",0}, { "_char","_wxChar",0}, { "_wxBitmap","_class_wxBitmap",0}, + { "_wxTaskBarIcon","_class_wxTaskBarIcon",0}, { "_wxPrintDialog","_class_wxPrintDialog",0}, { "_wxPyControlPoint","_class_wxPyControlPoint",0}, { "_wxWindowDC","_class_wxWindowDC",0}, @@ -517,6 +518,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxTextCtrl","_wxTextCtrl",0}, { "_class_wxListItemAttr","_wxListItemAttr",0}, { "_wxLayoutConstraints","_class_wxLayoutConstraints",0}, + { "_wxMetaFileDC","_class_wxMetaFileDC",0}, { "_class_wxTextDataObject","_wxTextDataObject",0}, { "_wxMenu","_class_wxMenu",0}, { "_class_wxMoveEvent","_wxMoveEvent",0}, @@ -552,6 +554,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxBusyInfo","_class_wxBusyInfo",0}, { "_class_wxMenuEvent","_wxMenuEvent",0}, { "_wxPaletteChangedEvent","_class_wxPaletteChangedEvent",0}, + { "_wxJoystick","_class_wxJoystick",0}, { "_class_wxPyBitmapDataObject","_wxPyBitmapDataObject",0}, { "_class_wxPyCircleShape","_wxPyCircleShape",0}, { "_wxClientDC","_class_wxClientDC",0}, @@ -569,6 +572,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_signed_short","_short",0}, { "_wxMemoryDC","_class_wxMemoryDC",0}, { "_wxPyTextDataObject","_class_wxPyTextDataObject",0}, + { "_class_wxTaskBarIcon","_wxTaskBarIcon",0}, { "_class_wxPrintDialog","_wxPrintDialog",0}, { "_wxPyFileSystemHandler","_class_wxPyFileSystemHandler",0}, { "_class_wxPyControlPoint","_wxPyControlPoint",0}, @@ -579,7 +583,6 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxStatusBar","_class_wxStatusBar",0}, { "_class_wxAcceleratorEntry","_wxAcceleratorEntry",0}, { "_class_wxCursor","_wxCursor",0}, - { "_wxPostScriptDC","_class_wxPostScriptDC",0}, { "_wxPyFileDropTarget","_class_wxPyFileDropTarget",0}, { "_class_wxPyProcess","_wxPyProcess",0}, { "_class_wxImageHandler","_wxImageHandler",0}, @@ -588,6 +591,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxLog","_wxLog",0}, { "_wxTreeItemId","_class_wxTreeItemId",0}, { "_unsigned_char","_byte",0}, + { "_class_wxMetaFileDC","_wxMetaFileDC",0}, { "_class_wxMenu","_wxMenu",0}, { "_wxControl","_class_wxControl",0}, { "_class_wxListBox","_wxListBox",0}, @@ -680,6 +684,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxLogGui","_wxLogGui",0}, { "_class_wxMDIParentFrame","_wxMDIParentFrame",0}, { "_wxPyTreeItemData","_class_wxPyTreeItemData",0}, + { "_class_wxPrinterDC","_wxPrinterDC",0}, { "_wxStaticBoxSizer","_class_wxStaticBoxSizer",0}, { "_class_wxTimeSpan","_wxTimeSpan",0}, { "_class_wxPyFileSystemHandler","_wxPyFileSystemHandler",0}, @@ -738,6 +743,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxGauge","_class_wxGauge",0}, { "_class_wxCheckListBox","_wxCheckListBox",0}, { "_class_wxBusyInfo","_wxBusyInfo",0}, + { "_class_wxJoystick","_wxJoystick",0}, { "_class_wxCommandEvent","_wxCommandEvent",0}, { "_class_wxClientDC","_wxClientDC",0}, { "_class_wxSizeEvent","_wxSizeEvent",0}, diff --git a/wxPython/contrib/ogl/oglbasic.cpp b/wxPython/contrib/ogl/oglbasic.cpp index 502eb64124..c3355e8420 100644 --- a/wxPython/contrib/ogl/oglbasic.cpp +++ b/wxPython/contrib/ogl/oglbasic.cpp @@ -8466,6 +8466,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxPNMHandler","_class_wxPNMHandler",0}, { "_wxWindowCreateEvent","_class_wxWindowCreateEvent",0}, { "_wxLogGui","_class_wxLogGui",0}, + { "_wxPrinterDC","_class_wxPrinterDC",0}, { "_class_wxPyShapeEvtHandler","_class_wxPyShape",SwigwxPyShapeTowxPyShapeEvtHandler}, { "_class_wxPyShapeEvtHandler","_wxPyShape",SwigwxPyShapeTowxPyShapeEvtHandler}, { "_class_wxPyShapeEvtHandler","_wxPyShapeEvtHandler",0}, @@ -8475,7 +8476,6 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxStatusBar","_wxStatusBar",0}, { "_class_wxGIFHandler","_wxGIFHandler",0}, { "_class_wxPySizer","_wxPySizer",0}, - { "_class_wxPostScriptDC","_wxPostScriptDC",0}, { "_wxPanel","_class_wxPanel",0}, { "_wxInitDialogEvent","_class_wxInitDialogEvent",0}, { "_wxCheckBox","_class_wxCheckBox",0}, @@ -8538,6 +8538,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxZipFSHandler","_wxZipFSHandler",0}, { "_char","_wxChar",0}, { "_wxBitmap","_class_wxBitmap",0}, + { "_wxTaskBarIcon","_class_wxTaskBarIcon",0}, { "_wxPrintDialog","_class_wxPrintDialog",0}, { "_wxWindowDC","_class_wxWindowDC",0}, { "_wxTimerEvent","_class_wxTimerEvent",0}, @@ -8622,6 +8623,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxTextCtrl","_wxTextCtrl",0}, { "_class_wxListItemAttr","_wxListItemAttr",0}, { "_wxLayoutConstraints","_class_wxLayoutConstraints",0}, + { "_wxMetaFileDC","_class_wxMetaFileDC",0}, { "_class_wxTextDataObject","_wxTextDataObject",0}, { "_wxMenu","_class_wxMenu",0}, { "_class_wxMoveEvent","_wxMoveEvent",0}, @@ -8656,6 +8658,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxBusyInfo","_class_wxBusyInfo",0}, { "_class_wxMenuEvent","_wxMenuEvent",0}, { "_wxPaletteChangedEvent","_class_wxPaletteChangedEvent",0}, + { "_wxJoystick","_class_wxJoystick",0}, { "_class_wxPyBitmapDataObject","_wxPyBitmapDataObject",0}, { "_wxClientDC","_class_wxClientDC",0}, { "_wxMouseEvent","_class_wxMouseEvent",0}, @@ -8671,6 +8674,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_signed_short","_short",0}, { "_wxMemoryDC","_class_wxMemoryDC",0}, { "_wxPyTextDataObject","_class_wxPyTextDataObject",0}, + { "_class_wxTaskBarIcon","_wxTaskBarIcon",0}, { "_class_wxPrintDialog","_wxPrintDialog",0}, { "_wxPyFileSystemHandler","_class_wxPyFileSystemHandler",0}, { "_wxPaintDC","_class_wxPaintDC",0}, @@ -8680,7 +8684,6 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxStatusBar","_class_wxStatusBar",0}, { "_class_wxAcceleratorEntry","_wxAcceleratorEntry",0}, { "_class_wxCursor","_wxCursor",0}, - { "_wxPostScriptDC","_class_wxPostScriptDC",0}, { "_wxPyFileDropTarget","_class_wxPyFileDropTarget",0}, { "_class_wxPyProcess","_wxPyProcess",0}, { "_class_wxImageHandler","_wxImageHandler",0}, @@ -8689,6 +8692,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxLog","_wxLog",0}, { "_wxTreeItemId","_class_wxTreeItemId",0}, { "_unsigned_char","_byte",0}, + { "_class_wxMetaFileDC","_wxMetaFileDC",0}, { "_class_wxMenu","_wxMenu",0}, { "_wxControl","_class_wxControl",0}, { "_class_wxListBox","_wxListBox",0}, @@ -8779,6 +8783,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxLogGui","_wxLogGui",0}, { "_class_wxMDIParentFrame","_wxMDIParentFrame",0}, { "_wxPyTreeItemData","_class_wxPyTreeItemData",0}, + { "_class_wxPrinterDC","_wxPrinterDC",0}, { "_wxStaticBoxSizer","_class_wxStaticBoxSizer",0}, { "_class_wxTimeSpan","_wxTimeSpan",0}, { "_class_wxPyFileSystemHandler","_wxPyFileSystemHandler",0}, @@ -8834,6 +8839,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxGauge","_class_wxGauge",0}, { "_class_wxCheckListBox","_wxCheckListBox",0}, { "_class_wxBusyInfo","_wxBusyInfo",0}, + { "_class_wxJoystick","_wxJoystick",0}, { "_class_wxCommandEvent","_wxCommandEvent",0}, { "_class_wxClientDC","_wxClientDC",0}, { "_class_wxSizeEvent","_wxSizeEvent",0}, diff --git a/wxPython/contrib/ogl/oglcanvas.cpp b/wxPython/contrib/ogl/oglcanvas.cpp index 6c53cdc3b8..3a261ff244 100644 --- a/wxPython/contrib/ogl/oglcanvas.cpp +++ b/wxPython/contrib/ogl/oglcanvas.cpp @@ -2107,6 +2107,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxPNMHandler","_class_wxPNMHandler",0}, { "_wxWindowCreateEvent","_class_wxWindowCreateEvent",0}, { "_wxLogGui","_class_wxLogGui",0}, + { "_wxPrinterDC","_class_wxPrinterDC",0}, { "_class_wxPyShapeEvtHandler","_wxPyShapeEvtHandler",0}, { "_class_wxMenuItem","_wxMenuItem",0}, { "_class_wxPaintEvent","_wxPaintEvent",0}, @@ -2114,7 +2115,6 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxStatusBar","_wxStatusBar",0}, { "_class_wxGIFHandler","_wxGIFHandler",0}, { "_class_wxPySizer","_wxPySizer",0}, - { "_class_wxPostScriptDC","_wxPostScriptDC",0}, { "_wxPanel","_class_wxPyShapeCanvas",SwigwxPyShapeCanvasTowxPanel}, { "_wxPanel","_wxPyShapeCanvas",SwigwxPyShapeCanvasTowxPanel}, { "_wxPanel","_class_wxPanel",0}, @@ -2180,6 +2180,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxZipFSHandler","_wxZipFSHandler",0}, { "_char","_wxChar",0}, { "_wxBitmap","_class_wxBitmap",0}, + { "_wxTaskBarIcon","_class_wxTaskBarIcon",0}, { "_wxPrintDialog","_class_wxPrintDialog",0}, { "_wxWindowDC","_class_wxWindowDC",0}, { "_wxTimerEvent","_class_wxTimerEvent",0}, @@ -2267,6 +2268,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxTextCtrl","_wxTextCtrl",0}, { "_class_wxListItemAttr","_wxListItemAttr",0}, { "_wxLayoutConstraints","_class_wxLayoutConstraints",0}, + { "_wxMetaFileDC","_class_wxMetaFileDC",0}, { "_class_wxTextDataObject","_wxTextDataObject",0}, { "_wxMenu","_class_wxMenu",0}, { "_class_wxMoveEvent","_wxMoveEvent",0}, @@ -2303,6 +2305,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxBusyInfo","_class_wxBusyInfo",0}, { "_class_wxMenuEvent","_wxMenuEvent",0}, { "_wxPaletteChangedEvent","_class_wxPaletteChangedEvent",0}, + { "_wxJoystick","_class_wxJoystick",0}, { "_class_wxPyBitmapDataObject","_wxPyBitmapDataObject",0}, { "_wxClientDC","_class_wxClientDC",0}, { "_wxMouseEvent","_class_wxMouseEvent",0}, @@ -2318,6 +2321,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_signed_short","_short",0}, { "_wxMemoryDC","_class_wxMemoryDC",0}, { "_wxPyTextDataObject","_class_wxPyTextDataObject",0}, + { "_class_wxTaskBarIcon","_wxTaskBarIcon",0}, { "_class_wxPrintDialog","_wxPrintDialog",0}, { "_wxPyFileSystemHandler","_class_wxPyFileSystemHandler",0}, { "_wxPaintDC","_class_wxPaintDC",0}, @@ -2327,7 +2331,6 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxStatusBar","_class_wxStatusBar",0}, { "_class_wxAcceleratorEntry","_wxAcceleratorEntry",0}, { "_class_wxCursor","_wxCursor",0}, - { "_wxPostScriptDC","_class_wxPostScriptDC",0}, { "_wxPyFileDropTarget","_class_wxPyFileDropTarget",0}, { "_class_wxPyProcess","_wxPyProcess",0}, { "_class_wxImageHandler","_wxImageHandler",0}, @@ -2338,6 +2341,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxLog","_wxLog",0}, { "_wxTreeItemId","_class_wxTreeItemId",0}, { "_unsigned_char","_byte",0}, + { "_class_wxMetaFileDC","_wxMetaFileDC",0}, { "_class_wxMenu","_wxMenu",0}, { "_wxControl","_class_wxControl",0}, { "_class_wxListBox","_wxListBox",0}, @@ -2428,6 +2432,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxLogGui","_wxLogGui",0}, { "_class_wxMDIParentFrame","_wxMDIParentFrame",0}, { "_wxPyTreeItemData","_class_wxPyTreeItemData",0}, + { "_class_wxPrinterDC","_wxPrinterDC",0}, { "_wxStaticBoxSizer","_class_wxStaticBoxSizer",0}, { "_class_wxTimeSpan","_wxTimeSpan",0}, { "_class_wxPyFileSystemHandler","_wxPyFileSystemHandler",0}, @@ -2484,6 +2489,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxGauge","_class_wxGauge",0}, { "_class_wxCheckListBox","_wxCheckListBox",0}, { "_class_wxBusyInfo","_wxBusyInfo",0}, + { "_class_wxJoystick","_wxJoystick",0}, { "_class_wxCommandEvent","_wxCommandEvent",0}, { "_class_wxClientDC","_wxClientDC",0}, { "_class_wxSizeEvent","_wxSizeEvent",0}, diff --git a/wxPython/contrib/ogl/oglshapes.cpp b/wxPython/contrib/ogl/oglshapes.cpp index 3fa3b83486..9e8fb32054 100644 --- a/wxPython/contrib/ogl/oglshapes.cpp +++ b/wxPython/contrib/ogl/oglshapes.cpp @@ -12663,6 +12663,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxPNMHandler","_class_wxPNMHandler",0}, { "_wxWindowCreateEvent","_class_wxWindowCreateEvent",0}, { "_wxLogGui","_class_wxLogGui",0}, + { "_wxPrinterDC","_class_wxPrinterDC",0}, { "_class_wxPyShapeEvtHandler","_class_wxPyDivisionShape",SwigwxPyDivisionShapeTowxPyShapeEvtHandler}, { "_class_wxPyShapeEvtHandler","_wxPyDivisionShape",SwigwxPyDivisionShapeTowxPyShapeEvtHandler}, { "_class_wxPyShapeEvtHandler","_class_wxPyDividedShape",SwigwxPyDividedShapeTowxPyShapeEvtHandler}, @@ -12687,7 +12688,6 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxPyCompositeShape","_class_wxPyDivisionShape",SwigwxPyDivisionShapeTowxPyCompositeShape}, { "_class_wxPyCompositeShape","_wxPyDivisionShape",SwigwxPyDivisionShapeTowxPyCompositeShape}, { "_class_wxPyCompositeShape","_wxPyCompositeShape",0}, - { "_class_wxPostScriptDC","_wxPostScriptDC",0}, { "_wxPanel","_class_wxPanel",0}, { "_wxInitDialogEvent","_class_wxInitDialogEvent",0}, { "_wxCheckBox","_class_wxCheckBox",0}, @@ -12752,6 +12752,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxZipFSHandler","_wxZipFSHandler",0}, { "_char","_wxChar",0}, { "_wxBitmap","_class_wxBitmap",0}, + { "_wxTaskBarIcon","_class_wxTaskBarIcon",0}, { "_wxPrintDialog","_class_wxPrintDialog",0}, { "_wxPyControlPoint","_class_wxPyControlPoint",0}, { "_wxWindowDC","_class_wxWindowDC",0}, @@ -12839,6 +12840,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxTextCtrl","_wxTextCtrl",0}, { "_class_wxListItemAttr","_wxListItemAttr",0}, { "_wxLayoutConstraints","_class_wxLayoutConstraints",0}, + { "_wxMetaFileDC","_class_wxMetaFileDC",0}, { "_class_wxTextDataObject","_wxTextDataObject",0}, { "_wxMenu","_class_wxMenu",0}, { "_class_wxMoveEvent","_wxMoveEvent",0}, @@ -12873,6 +12875,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxBusyInfo","_class_wxBusyInfo",0}, { "_class_wxMenuEvent","_wxMenuEvent",0}, { "_wxPaletteChangedEvent","_class_wxPaletteChangedEvent",0}, + { "_wxJoystick","_class_wxJoystick",0}, { "_class_wxPyBitmapDataObject","_wxPyBitmapDataObject",0}, { "_wxClientDC","_class_wxClientDC",0}, { "_wxMouseEvent","_class_wxMouseEvent",0}, @@ -12889,6 +12892,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_signed_short","_short",0}, { "_wxMemoryDC","_class_wxMemoryDC",0}, { "_wxPyTextDataObject","_class_wxPyTextDataObject",0}, + { "_class_wxTaskBarIcon","_wxTaskBarIcon",0}, { "_class_wxPrintDialog","_wxPrintDialog",0}, { "_wxPyFileSystemHandler","_class_wxPyFileSystemHandler",0}, { "_class_wxPyControlPoint","_wxPyControlPoint",0}, @@ -12899,7 +12903,6 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxStatusBar","_class_wxStatusBar",0}, { "_class_wxAcceleratorEntry","_wxAcceleratorEntry",0}, { "_class_wxCursor","_wxCursor",0}, - { "_wxPostScriptDC","_class_wxPostScriptDC",0}, { "_wxPyFileDropTarget","_class_wxPyFileDropTarget",0}, { "_class_wxPyProcess","_wxPyProcess",0}, { "_class_wxImageHandler","_wxImageHandler",0}, @@ -12922,6 +12925,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxLog","_wxLog",0}, { "_wxTreeItemId","_class_wxTreeItemId",0}, { "_unsigned_char","_byte",0}, + { "_class_wxMetaFileDC","_wxMetaFileDC",0}, { "_class_wxMenu","_wxMenu",0}, { "_wxControl","_class_wxControl",0}, { "_class_wxListBox","_wxListBox",0}, @@ -13013,6 +13017,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxLogGui","_wxLogGui",0}, { "_class_wxMDIParentFrame","_wxMDIParentFrame",0}, { "_wxPyTreeItemData","_class_wxPyTreeItemData",0}, + { "_class_wxPrinterDC","_wxPrinterDC",0}, { "_wxStaticBoxSizer","_class_wxStaticBoxSizer",0}, { "_class_wxTimeSpan","_wxTimeSpan",0}, { "_class_wxPyFileSystemHandler","_wxPyFileSystemHandler",0}, @@ -13083,6 +13088,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxGauge","_class_wxGauge",0}, { "_class_wxCheckListBox","_wxCheckListBox",0}, { "_class_wxBusyInfo","_wxBusyInfo",0}, + { "_class_wxJoystick","_wxJoystick",0}, { "_class_wxCommandEvent","_wxCommandEvent",0}, { "_class_wxClientDC","_wxClientDC",0}, { "_class_wxSizeEvent","_wxSizeEvent",0}, diff --git a/wxPython/contrib/ogl/oglshapes2.cpp b/wxPython/contrib/ogl/oglshapes2.cpp index 28905f8456..b8803b62f4 100644 --- a/wxPython/contrib/ogl/oglshapes2.cpp +++ b/wxPython/contrib/ogl/oglshapes2.cpp @@ -8004,6 +8004,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxPNMHandler","_class_wxPNMHandler",0}, { "_wxWindowCreateEvent","_class_wxWindowCreateEvent",0}, { "_wxLogGui","_class_wxLogGui",0}, + { "_wxPrinterDC","_class_wxPrinterDC",0}, { "_class_wxPyShapeEvtHandler","_class_wxPyTextShape",SwigwxPyTextShapeTowxPyShapeEvtHandler}, { "_class_wxPyShapeEvtHandler","_wxPyTextShape",SwigwxPyTextShapeTowxPyShapeEvtHandler}, { "_class_wxPyShapeEvtHandler","_class_wxPyPolygonShape",SwigwxPyPolygonShapeTowxPyShapeEvtHandler}, @@ -8023,7 +8024,6 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxPySizer","_wxPySizer",0}, { "_class_wxPyCompositeShape","_wxPyCompositeShape",0}, { "_wxPyPolygonShape","_class_wxPyPolygonShape",0}, - { "_class_wxPostScriptDC","_wxPostScriptDC",0}, { "_wxPanel","_class_wxPanel",0}, { "_wxInitDialogEvent","_class_wxInitDialogEvent",0}, { "_wxCheckBox","_class_wxCheckBox",0}, @@ -8088,6 +8088,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxZipFSHandler","_wxZipFSHandler",0}, { "_char","_wxChar",0}, { "_wxBitmap","_class_wxBitmap",0}, + { "_wxTaskBarIcon","_class_wxTaskBarIcon",0}, { "_wxPrintDialog","_class_wxPrintDialog",0}, { "_wxPyControlPoint","_class_wxPyControlPoint",0}, { "_wxWindowDC","_class_wxWindowDC",0}, @@ -8178,6 +8179,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxTextCtrl","_wxTextCtrl",0}, { "_class_wxListItemAttr","_wxListItemAttr",0}, { "_wxLayoutConstraints","_class_wxLayoutConstraints",0}, + { "_wxMetaFileDC","_class_wxMetaFileDC",0}, { "_class_wxTextDataObject","_wxTextDataObject",0}, { "_wxMenu","_class_wxMenu",0}, { "_class_wxMoveEvent","_wxMoveEvent",0}, @@ -8213,6 +8215,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxBusyInfo","_class_wxBusyInfo",0}, { "_class_wxMenuEvent","_wxMenuEvent",0}, { "_wxPaletteChangedEvent","_class_wxPaletteChangedEvent",0}, + { "_wxJoystick","_class_wxJoystick",0}, { "_class_wxPyBitmapDataObject","_wxPyBitmapDataObject",0}, { "_class_wxPyCircleShape","_wxPyCircleShape",0}, { "_wxClientDC","_class_wxClientDC",0}, @@ -8230,6 +8233,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_signed_short","_short",0}, { "_wxMemoryDC","_class_wxMemoryDC",0}, { "_wxPyTextDataObject","_class_wxPyTextDataObject",0}, + { "_class_wxTaskBarIcon","_wxTaskBarIcon",0}, { "_class_wxPrintDialog","_wxPrintDialog",0}, { "_wxPyFileSystemHandler","_class_wxPyFileSystemHandler",0}, { "_class_wxPyControlPoint","_wxPyControlPoint",0}, @@ -8240,7 +8244,6 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxStatusBar","_class_wxStatusBar",0}, { "_class_wxAcceleratorEntry","_wxAcceleratorEntry",0}, { "_class_wxCursor","_wxCursor",0}, - { "_wxPostScriptDC","_class_wxPostScriptDC",0}, { "_wxPyFileDropTarget","_class_wxPyFileDropTarget",0}, { "_class_wxPyProcess","_wxPyProcess",0}, { "_class_wxImageHandler","_wxImageHandler",0}, @@ -8259,6 +8262,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxLog","_wxLog",0}, { "_wxTreeItemId","_class_wxTreeItemId",0}, { "_unsigned_char","_byte",0}, + { "_class_wxMetaFileDC","_wxMetaFileDC",0}, { "_class_wxMenu","_wxMenu",0}, { "_wxControl","_class_wxControl",0}, { "_class_wxListBox","_wxListBox",0}, @@ -8351,6 +8355,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxLogGui","_wxLogGui",0}, { "_class_wxMDIParentFrame","_wxMDIParentFrame",0}, { "_wxPyTreeItemData","_class_wxPyTreeItemData",0}, + { "_class_wxPrinterDC","_wxPrinterDC",0}, { "_wxStaticBoxSizer","_class_wxStaticBoxSizer",0}, { "_class_wxTimeSpan","_wxTimeSpan",0}, { "_class_wxPyFileSystemHandler","_wxPyFileSystemHandler",0}, @@ -8418,6 +8423,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxGauge","_class_wxGauge",0}, { "_class_wxCheckListBox","_wxCheckListBox",0}, { "_class_wxBusyInfo","_wxBusyInfo",0}, + { "_class_wxJoystick","_wxJoystick",0}, { "_class_wxCommandEvent","_wxCommandEvent",0}, { "_class_wxClientDC","_wxClientDC",0}, { "_class_wxSizeEvent","_wxSizeEvent",0}, diff --git a/wxPython/demo/FancyText.py b/wxPython/demo/FancyText.py new file mode 100644 index 0000000000..edda6ce178 --- /dev/null +++ b/wxPython/demo/FancyText.py @@ -0,0 +1,41 @@ + +from wxPython.wx import * +from wxPython.lib import fancytext + +#---------------------------------------------------------------------- + +test_str = ('' + 'some |23 textwith subscript' + ' some other text') + +test_str2 = 'big green text' + + +class TestPanel(wxPanel): + def __init__(self, parent): + wxPanel.__init__(self, parent, -1) + EVT_PAINT(self, self.OnPaint) + + + def OnPaint(self, evt): + dc = wxPaintDC(self) + + sz = fancytext.getExtent(test_str, dc) + fancytext.renderToDC(test_str, dc, 20, 20) + + fancytext.renderToDC(test_str2, dc, 20, 20 + sz.height + 10) + + +#---------------------------------------------------------------------- + +def runTest(frame, nb, log): + win = TestPanel(nb) + return win + +#---------------------------------------------------------------------- + + + +import string +overview = string.replace(fancytext.__doc__, "<", "<") + diff --git a/wxPython/demo/FileBrowseButton.py b/wxPython/demo/FileBrowseButton.py index c926dfa13a..9967ea355f 100644 --- a/wxPython/demo/FileBrowseButton.py +++ b/wxPython/demo/FileBrowseButton.py @@ -1,6 +1,10 @@ +""" Demonstrate filebrowsebutton module of the wxPython.lib Library. +14.1.2001 Bernhard Reiter + Added demo for DirBrowseButton and improved overview text. +""" from wxPython.wx import * -from wxPython.lib.filebrowsebutton import FileBrowseButton, FileBrowseButtonWithHistory +from wxPython.lib.filebrowsebutton import FileBrowseButton, FileBrowseButtonWithHistory,DirBrowseButton #---------------------------------------------------------------------- @@ -15,6 +19,9 @@ class TestPanel(wxPanel): wxSize(450, -1), #changeCallback = self.fbbhCallback ) + self.dbb = DirBrowseButton(self, -1, wxPoint(20,80), wxSize(450,-1), + changeCallback = self.dbbCallback) + self.fbbh.SetHistory(['You', 'can', 'put', 'some', 'file', 'names', 'here']) @@ -23,6 +30,7 @@ class TestPanel(wxPanel): self.log.write('FileBrowseButton: %s\n' % evt.GetString()) + def fbbhCallback(self, evt): if hasattr(self, 'fbbh'): value = evt.GetString() @@ -31,6 +39,10 @@ class TestPanel(wxPanel): history.append(value) self.fbbh.SetHistory(history) + def dbbCallback(self, evt): + self.log.write('DirBrowseButton: %s\n' % evt.GetString()) + + #---------------------------------------------------------------------- @@ -42,6 +54,23 @@ def runTest(frame, nb, log): #---------------------------------------------------------------------- - - -overview = FileBrowseButton.__doc__ +overview = """ +

class FileBrowseButton:

+
+%s
+
+ +

class FileBrowseButtonWithHistory(FileBrowseButton):

+
+%s
+
+ +

class DirBrowseButton(FileBrowseButton):

+
+%s
+
+ +< +""" % ( FileBrowseButton.__doc__, + FileBrowseButtonWithHistory.__doc__ , + str(DirBrowseButton.__doc__) ) diff --git a/wxPython/demo/LayoutAnchors.py b/wxPython/demo/LayoutAnchors.py new file mode 100644 index 0000000000..b201372a7e --- /dev/null +++ b/wxPython/demo/LayoutAnchors.py @@ -0,0 +1,140 @@ + +from wxPython.wx import * +from wxPython.lib.anchors import LayoutAnchors + +#---------------------------------------------------------------------- + + +[wxID_ANCHORSDEMOFRAMEANCHOREDPANEL, wxID_ANCHORSDEMOFRAMEHELPSTATICTEXT, + wxID_ANCHORSDEMOFRAMEMAINPANEL, wxID_ANCHORSDEMOFRAMEBACKGROUNDPANEL, + wxID_ANCHORSDEMOFRAMERIGHTCHECKBOX, wxID_ANCHORSDEMOFRAMEOKBUTTON, + wxID_ANCHORSDEMOFRAMETOPCHECKBOX, wxID_ANCHORSDEMOFRAMEBOTTOMCHECKBOX, + wxID_ANCHORSDEMOFRAME, wxID_ANCHORSDEMOFRAMELEFTCHECKBOX, + ] = map(lambda _init_ctrls: wxNewId(), range(10)) + +class AnchorsDemoFrame(wxFrame): + def _init_utils(self): + pass + + def _init_ctrls(self, prnt): + wxFrame.__init__(self, size = wxSize(328, 187), id = wxID_ANCHORSDEMOFRAME, title = 'LayoutAnchors Demonstration', parent = prnt, name = 'AnchorsDemoFrame', style = wxDEFAULT_FRAME_STYLE | wxCLIP_CHILDREN, pos = wxPoint(261, 123)) + self._init_utils() + + self.mainPanel = wxPanel(size = wxSize(320, 160), parent = self, id = wxID_ANCHORSDEMOFRAMEMAINPANEL, name = 'panel1', style = wxTAB_TRAVERSAL | wxCLIP_CHILDREN, pos = wxPoint(0, 0)) + self.mainPanel.SetAutoLayout(true) + + self.okButton = wxButton(label = 'OK', id = wxID_ANCHORSDEMOFRAMEOKBUTTON, parent = self.mainPanel, name = 'okButton', size = wxSize(72, 24), style = 0, pos = wxPoint(240, 128)) + self.okButton.SetConstraints(LayoutAnchors(self.okButton, false, false, true, true)) + EVT_BUTTON(self.okButton, wxID_ANCHORSDEMOFRAMEOKBUTTON, self.OnOkButtonButton) + + self.backgroundPanel = wxPanel(size = wxSize(304, 80), parent = self.mainPanel, id = wxID_ANCHORSDEMOFRAMEBACKGROUNDPANEL, name = 'backgroundPanel', style = wxSIMPLE_BORDER | wxCLIP_CHILDREN, pos = wxPoint(8, 40)) + self.backgroundPanel.SetBackgroundColour(wxColour(255, 255, 255)) + self.backgroundPanel.SetConstraints(LayoutAnchors(self.backgroundPanel, true, true, true, true)) + + self.anchoredPanel = wxPanel(size = wxSize(88, 48), id = wxID_ANCHORSDEMOFRAMEANCHOREDPANEL, parent = self.backgroundPanel, name = 'anchoredPanel', style = wxSIMPLE_BORDER, pos = wxPoint(104, 16)) + self.anchoredPanel.SetBackgroundColour(wxColour(0, 0, 222)) + self.anchoredPanel.SetConstraints(LayoutAnchors(self.anchoredPanel, false, false, false, false)) + + self.leftCheckBox = wxCheckBox(label = 'Left', id = wxID_ANCHORSDEMOFRAMELEFTCHECKBOX, parent = self.mainPanel, name = 'leftCheckBox', size = wxSize(40, 16), style = 0, pos = wxPoint(8, 8)) + self.leftCheckBox.SetConstraints(LayoutAnchors(self.leftCheckBox, false, true, false, false)) + EVT_CHECKBOX(self.leftCheckBox, wxID_ANCHORSDEMOFRAMELEFTCHECKBOX, self.OnCheckboxCheckbox) + + self.topCheckBox = wxCheckBox(label = 'Top', id = wxID_ANCHORSDEMOFRAMETOPCHECKBOX, parent = self.mainPanel, name = 'topCheckBox', size = wxSize(40, 16), style = 0, pos = wxPoint(88, 8)) + self.topCheckBox.SetConstraints(LayoutAnchors(self.topCheckBox, false, true, false, false)) + EVT_CHECKBOX(self.topCheckBox, wxID_ANCHORSDEMOFRAMETOPCHECKBOX, self.OnCheckboxCheckbox) + + self.rightCheckBox = wxCheckBox(label = 'Right', id = wxID_ANCHORSDEMOFRAMERIGHTCHECKBOX, parent = self.mainPanel, name = 'rightCheckBox', size = wxSize(48, 16), style = 0, pos = wxPoint(168, 8)) + self.rightCheckBox.SetConstraints(LayoutAnchors(self.rightCheckBox, false, true, false, false)) + EVT_CHECKBOX(self.rightCheckBox, wxID_ANCHORSDEMOFRAMERIGHTCHECKBOX, self.OnCheckboxCheckbox) + + self.bottomCheckBox = wxCheckBox(label = 'Bottom', id = wxID_ANCHORSDEMOFRAMEBOTTOMCHECKBOX, parent = self.mainPanel, name = 'bottomCheckBox', size = wxSize(56, 16), style = 0, pos = wxPoint(248, 8)) + self.bottomCheckBox.SetConstraints(LayoutAnchors(self.bottomCheckBox, false, true, false, false)) + EVT_CHECKBOX(self.bottomCheckBox, wxID_ANCHORSDEMOFRAMEBOTTOMCHECKBOX, self.OnCheckboxCheckbox) + + self.helpStaticText = wxStaticText(label = 'Select anchor options above, then resize window to see the effect', id = wxID_ANCHORSDEMOFRAMEHELPSTATICTEXT, parent = self.mainPanel, name = 'helpStaticText', size = wxSize(224, 24), style = wxST_NO_AUTORESIZE, pos = wxPoint(8, 128)) + self.helpStaticText.SetConstraints(LayoutAnchors(self.helpStaticText, true, false, true, true)) + + def __init__(self, parent): + self._init_ctrls(parent) + + def OnCheckboxCheckbox(self, event): + self.anchoredPanel.SetConstraints( + LayoutAnchors(self.anchoredPanel, + self.leftCheckBox.GetValue(), self.topCheckBox.GetValue(), + self.rightCheckBox.GetValue(), self.bottomCheckBox.GetValue()) ) + + def OnOkButtonButton(self, event): + self.Close() + +#---------------------------------------------------------------------- + +def runTest(frame, nb, log): + win = AnchorsDemoFrame(frame) + frame.otherWin = win + win.Show(true) + + + + +#---------------------------------------------------------------------- + + + + +overview = """ +

LayoutAnchors

+ A class that implements Delphi's Anchors with wxLayoutConstraints. +

+ Anchored sides maintain the distance from the edge of the + control to the same edge of the parent. + When neither side is selected, the control keeps the same + relative position to both sides. +

+ The current position and size of the control and it's parent + is used when setting up the constraints. To change the size or + position of an already anchored control, set the constraints to + None, reposition or resize and reapply the anchors. +

+ Examples: +

+ Let's anchor the right and bottom edge of a control and + resize it's parent. +

+

+        ctrl.SetConstraints(LayoutAnchors(ctrl, left=0, top=0, right=1, bottom=1))
+
+        +=========+         +===================+
+        | +-----+ |         |                   |
+        | |     * |   ->    |                   |
+        | +--*--+ |         |           +-----+ |
+        +---------+         |           |     * |
+                            |           +--*--+ |
+                            +-------------------+
+        * = anchored edge
+
+

+ When anchored on both sides the control will stretch horizontally. +

+

+        ctrl.SetConstraints(LayoutAnchors(ctrl, 1, 0, 1, 1))
+
+        +=========+         +===================+
+        | +-----+ |         |                   |
+        | *     * |   ->    |                   |
+        | +--*--+ |         | +---------------+ |
+        +---------+         | *     ctrl      * |
+                            | +-------*-------+ |
+                            +-------------------+
+        * = anchored edge
+
+ +""" + + + + + + + + + diff --git a/wxPython/demo/Main.py b/wxPython/demo/Main.py index 893fca90d2..7379e4db9f 100644 --- a/wxPython/demo/Main.py +++ b/wxPython/demo/Main.py @@ -20,7 +20,7 @@ from wxPython.html import wxHtmlWindow _treeList = [ - ('New since last release', ['wxProcess', + ('New since last release', ['LayoutAnchors', "FancyText", ]), ('Managed Windows', ['wxFrame', 'wxDialog', 'wxMiniFrame']), @@ -43,14 +43,14 @@ _treeList = [ 'wxCalendarCtrl', ]), - ('Window Layout', ['wxLayoutConstraints', 'Sizers', ]), + ('Window Layout', ['wxLayoutConstraints', 'LayoutAnchors', 'Sizers', ]), ('Miscellaneous', [ 'DragAndDrop', 'CustomDragAndDrop', 'FontEnumerator', 'wxTimer', 'wxValidator', 'wxGLCanvas', 'DialogUnits', 'wxImage', 'wxMask', 'PrintFramework', 'wxOGL', 'PythonEvents', 'Threads', 'ActiveXWrapper_Acrobat', 'ActiveXWrapper_IE', - 'wxDragImage', + 'wxDragImage', "wxProcess", "FancyText", ]), ('wxPython Library', ['Layoutf', 'wxScrolledMessageDialog', diff --git a/wxPython/demo/bitmaps/robin.jpg b/wxPython/demo/bitmaps/robin.jpg new file mode 100644 index 0000000000..f559cad0c1 Binary files /dev/null and b/wxPython/demo/bitmaps/robin.jpg differ diff --git a/wxPython/demo/bitmaps/test2.bmp b/wxPython/demo/bitmaps/test2.bmp index 3a65473212..6f57c102c1 100644 Binary files a/wxPython/demo/bitmaps/test2.bmp and b/wxPython/demo/bitmaps/test2.bmp differ diff --git a/wxPython/demo/data/pic2.gif b/wxPython/demo/data/pic2.gif new file mode 100644 index 0000000000..a7f522a20d Binary files /dev/null and b/wxPython/demo/data/pic2.gif differ diff --git a/wxPython/demo/data/test.htm b/wxPython/demo/data/test.htm index 8ab006086e..f226786737 100644 --- a/wxPython/demo/data/test.htm +++ b/wxPython/demo/data/test.htm @@ -57,6 +57,10 @@ display some tiny nice image, he? this is text......
Testing image image (try clicking on the image :-) and this is text...... + +
+Here is a GIF: +