wxPython 4.3.2__cp315-cp315-win_amd64.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- wx/WebView2Loader.dll +0 -0
- wx/__init__.py +22 -0
- wx/__init__.pyi +10 -0
- wx/__version__.py +9 -0
- wx/__version__.pyi +15 -0
- wx/_adv.cp315-win_amd64.pyd +0 -0
- wx/_aui.cp315-win_amd64.pyd +0 -0
- wx/_core.cp315-win_amd64.pyd +0 -0
- wx/_dataview.cp315-win_amd64.pyd +0 -0
- wx/_glcanvas.cp315-win_amd64.pyd +0 -0
- wx/_grid.cp315-win_amd64.pyd +0 -0
- wx/_html.cp315-win_amd64.pyd +0 -0
- wx/_html2.cp315-win_amd64.pyd +0 -0
- wx/_media.cp315-win_amd64.pyd +0 -0
- wx/_msw.cp315-win_amd64.pyd +0 -0
- wx/_propgrid.cp315-win_amd64.pyd +0 -0
- wx/_ribbon.cp315-win_amd64.pyd +0 -0
- wx/_richtext.cp315-win_amd64.pyd +0 -0
- wx/_stc.cp315-win_amd64.pyd +0 -0
- wx/_xml.cp315-win_amd64.pyd +0 -0
- wx/_xrc.cp315-win_amd64.pyd +0 -0
- wx/adv.py +127 -0
- wx/adv.pyi +5931 -0
- wx/aui.py +70 -0
- wx/aui.pyi +4805 -0
- wx/core.py +3417 -0
- wx/core.pyi +62949 -0
- wx/dataview.py +176 -0
- wx/dataview.pyi +3828 -0
- wx/gizmos.py +18 -0
- wx/glcanvas.py +13 -0
- wx/glcanvas.pyi +544 -0
- wx/grid.py +237 -0
- wx/grid.pyi +5678 -0
- wx/html.py +38 -0
- wx/html.pyi +3283 -0
- wx/html2.py +46 -0
- wx/html2.pyi +1301 -0
- wx/include/wxPython/sip.h +1938 -0
- wx/include/wxPython/wxpy_api.h +418 -0
- wx/lib/CDate.py +201 -0
- wx/lib/ClickableHtmlWindow.py +57 -0
- wx/lib/__init__.py +0 -0
- wx/lib/activex.py +178 -0
- wx/lib/activexwrapper.py +153 -0
- wx/lib/agw/__init__.py +128 -0
- wx/lib/agw/advancedsplash.py +563 -0
- wx/lib/agw/aquabutton.py +1127 -0
- wx/lib/agw/artmanager.py +2110 -0
- wx/lib/agw/aui/__init__.py +295 -0
- wx/lib/agw/aui/aui_constants.py +2616 -0
- wx/lib/agw/aui/aui_switcherdialog.py +1232 -0
- wx/lib/agw/aui/aui_utilities.py +648 -0
- wx/lib/agw/aui/auibar.py +4045 -0
- wx/lib/agw/aui/auibook.py +6288 -0
- wx/lib/agw/aui/dockart.py +1198 -0
- wx/lib/agw/aui/framemanager.py +10485 -0
- wx/lib/agw/aui/tabart.py +2749 -0
- wx/lib/agw/aui/tabmdi.py +679 -0
- wx/lib/agw/balloontip.py +1157 -0
- wx/lib/agw/buttonpanel.py +2787 -0
- wx/lib/agw/cubecolourdialog.py +3529 -0
- wx/lib/agw/customtreectrl.py +9908 -0
- wx/lib/agw/data/ShortcutEditor_1.png +0 -0
- wx/lib/agw/data/ShortcutEditor_1_thumb.png +0 -0
- wx/lib/agw/data/ShortcutEditor_2.png +0 -0
- wx/lib/agw/data/ShortcutEditor_2_thumb.png +0 -0
- wx/lib/agw/data/ShortcutEditor_3.png +0 -0
- wx/lib/agw/data/ShortcutEditor_3_thumb.png +0 -0
- wx/lib/agw/data/ShortcutEditor_4.png +0 -0
- wx/lib/agw/data/ShortcutEditor_4_thumb.png +0 -0
- wx/lib/agw/data/default_help_text.html +105 -0
- wx/lib/agw/flatmenu.py +7392 -0
- wx/lib/agw/flatnotebook.py +6669 -0
- wx/lib/agw/floatspin.py +1820 -0
- wx/lib/agw/fmcustomizedlg.py +535 -0
- wx/lib/agw/fmresources.py +407 -0
- wx/lib/agw/foldpanelbar.py +2282 -0
- wx/lib/agw/fourwaysplitter.py +1130 -0
- wx/lib/agw/genericmessagedialog.py +1549 -0
- wx/lib/agw/gradientbutton.py +731 -0
- wx/lib/agw/hyperlink.py +664 -0
- wx/lib/agw/hypertreelist.py +5756 -0
- wx/lib/agw/infobar.py +885 -0
- wx/lib/agw/knobctrl.py +944 -0
- wx/lib/agw/labelbook.py +3028 -0
- wx/lib/agw/multidirdialog.py +581 -0
- wx/lib/agw/peakmeter.py +1028 -0
- wx/lib/agw/persist/__init__.py +188 -0
- wx/lib/agw/persist/persist_constants.py +283 -0
- wx/lib/agw/persist/persist_handlers.py +2614 -0
- wx/lib/agw/persist/persistencemanager.py +863 -0
- wx/lib/agw/piectrl.py +1082 -0
- wx/lib/agw/pybusyinfo.py +399 -0
- wx/lib/agw/pycollapsiblepane.py +940 -0
- wx/lib/agw/pygauge.py +570 -0
- wx/lib/agw/pyprogress.py +916 -0
- wx/lib/agw/ribbon/__init__.py +198 -0
- wx/lib/agw/ribbon/art.py +219 -0
- wx/lib/agw/ribbon/art_aui.py +1283 -0
- wx/lib/agw/ribbon/art_default.py +81 -0
- wx/lib/agw/ribbon/art_internal.py +248 -0
- wx/lib/agw/ribbon/art_msw.py +2735 -0
- wx/lib/agw/ribbon/art_osx.py +52 -0
- wx/lib/agw/ribbon/bar.py +1259 -0
- wx/lib/agw/ribbon/buttonbar.py +1317 -0
- wx/lib/agw/ribbon/control.py +205 -0
- wx/lib/agw/ribbon/gallery.py +973 -0
- wx/lib/agw/ribbon/page.py +946 -0
- wx/lib/agw/ribbon/panel.py +1170 -0
- wx/lib/agw/ribbon/toolbar.py +1441 -0
- wx/lib/agw/rulerctrl.py +1885 -0
- wx/lib/agw/scrolledthumbnail.py +2116 -0
- wx/lib/agw/shapedbutton.py +1809 -0
- wx/lib/agw/shortcuteditor.py +2642 -0
- wx/lib/agw/speedmeter.py +1800 -0
- wx/lib/agw/supertooltip.py +1443 -0
- wx/lib/agw/thumbnailctrl.py +529 -0
- wx/lib/agw/toasterbox.py +1327 -0
- wx/lib/agw/ultimatelistctrl.py +13671 -0
- wx/lib/agw/xlsgrid.py +2111 -0
- wx/lib/agw/zoombar.py +1336 -0
- wx/lib/analogclock/__init__.py +140 -0
- wx/lib/analogclock/analogclock.py +630 -0
- wx/lib/analogclock/helpers.py +986 -0
- wx/lib/analogclock/lib_setup/__init__.py +0 -0
- wx/lib/analogclock/lib_setup/buttontreectrlpanel.py +297 -0
- wx/lib/analogclock/lib_setup/fontselect.py +57 -0
- wx/lib/analogclock/setup.py +490 -0
- wx/lib/analogclock/styles.py +47 -0
- wx/lib/anchors.py +103 -0
- wx/lib/art/__init__.py +4 -0
- wx/lib/art/flagart.py +1583 -0
- wx/lib/art/img2pyartprov.py +56 -0
- wx/lib/busy.py +152 -0
- wx/lib/buttons.py +1140 -0
- wx/lib/calendar.py +1596 -0
- wx/lib/checkbox.py +837 -0
- wx/lib/colourchooser/__init__.py +36 -0
- wx/lib/colourchooser/canvas.py +145 -0
- wx/lib/colourchooser/intl.py +24 -0
- wx/lib/colourchooser/pycolourbox.py +89 -0
- wx/lib/colourchooser/pycolourchooser.py +626 -0
- wx/lib/colourchooser/pycolourslider.py +98 -0
- wx/lib/colourchooser/pypalette.py +208 -0
- wx/lib/colourdb.py +740 -0
- wx/lib/colourselect.py +385 -0
- wx/lib/colourutils.py +118 -0
- wx/lib/combotreebox.py +944 -0
- wx/lib/delayedresult.py +420 -0
- wx/lib/dialogs.py +510 -0
- wx/lib/docview.py +3210 -0
- wx/lib/dragscroller.py +79 -0
- wx/lib/editor/README.txt +77 -0
- wx/lib/editor/__init__.py +24 -0
- wx/lib/editor/editor.py +974 -0
- wx/lib/editor/images.py +15 -0
- wx/lib/editor/selection.py +44 -0
- wx/lib/embeddedimage.py +76 -0
- wx/lib/eventStack.py +136 -0
- wx/lib/eventwatcher.py +440 -0
- wx/lib/evtmgr.py +521 -0
- wx/lib/expando.py +393 -0
- wx/lib/fancytext.py +494 -0
- wx/lib/filebrowsebutton.py +461 -0
- wx/lib/flashwin.py +262 -0
- wx/lib/flashwin_old.py +651 -0
- wx/lib/floatcanvas/FCEvents.py +53 -0
- wx/lib/floatcanvas/FCObjects.py +2910 -0
- wx/lib/floatcanvas/FloatCanvas.py +1025 -0
- wx/lib/floatcanvas/GUIMode.py +396 -0
- wx/lib/floatcanvas/NavCanvas.py +162 -0
- wx/lib/floatcanvas/Resources.py +319 -0
- wx/lib/floatcanvas/ScreenShot.py +1788 -0
- wx/lib/floatcanvas/Utilities/BBox.py +313 -0
- wx/lib/floatcanvas/Utilities/Colors.py +137 -0
- wx/lib/floatcanvas/Utilities/GUI.py +91 -0
- wx/lib/floatcanvas/Utilities/__init__.py +7 -0
- wx/lib/floatcanvas/__init__.py +124 -0
- wx/lib/foldmenu.py +89 -0
- wx/lib/gestures.py +310 -0
- wx/lib/gizmos/__init__.py +18 -0
- wx/lib/gizmos/dynamicsash.py +1202 -0
- wx/lib/gizmos/ledctrl.py +299 -0
- wx/lib/gizmos/treelistctrl.py +87 -0
- wx/lib/graphics.py +1942 -0
- wx/lib/gridmovers.py +516 -0
- wx/lib/iewin.py +249 -0
- wx/lib/iewin_old.py +894 -0
- wx/lib/imagebrowser.py +853 -0
- wx/lib/imageutils.py +163 -0
- wx/lib/infoframe.py +490 -0
- wx/lib/inspection.py +1254 -0
- wx/lib/intctrl.py +990 -0
- wx/lib/itemspicker.py +256 -0
- wx/lib/langlistctrl.py +480 -0
- wx/lib/layoutf.py +271 -0
- wx/lib/masked/__init__.py +27 -0
- wx/lib/masked/combobox.py +839 -0
- wx/lib/masked/ctrl.py +108 -0
- wx/lib/masked/ipaddrctrl.py +241 -0
- wx/lib/masked/maskededit.py +7262 -0
- wx/lib/masked/numctrl.py +2000 -0
- wx/lib/masked/textctrl.py +465 -0
- wx/lib/masked/timectrl.py +1465 -0
- wx/lib/mixins/__init__.py +17 -0
- wx/lib/mixins/grid.py +47 -0
- wx/lib/mixins/gridlabelrenderer.py +277 -0
- wx/lib/mixins/imagelist.py +77 -0
- wx/lib/mixins/inspection.py +184 -0
- wx/lib/mixins/listctrl.py +893 -0
- wx/lib/mixins/rubberband.py +403 -0
- wx/lib/mixins/treemixin.py +678 -0
- wx/lib/msgpanel.py +95 -0
- wx/lib/multisash.py +746 -0
- wx/lib/myole4ax.idl +178 -0
- wx/lib/myole4ax.tlb +0 -0
- wx/lib/newevent.py +229 -0
- wx/lib/newevent.pyi +25 -0
- wx/lib/nvdlg.py +156 -0
- wx/lib/ogl/__init__.py +13 -0
- wx/lib/ogl/basic.py +3989 -0
- wx/lib/ogl/bmpshape.py +86 -0
- wx/lib/ogl/canvas.py +467 -0
- wx/lib/ogl/composit.py +1576 -0
- wx/lib/ogl/diagram.py +230 -0
- wx/lib/ogl/divided.py +482 -0
- wx/lib/ogl/drawn.py +898 -0
- wx/lib/ogl/lines.py +1809 -0
- wx/lib/ogl/oglmisc.py +607 -0
- wx/lib/pdfviewer/__init__.py +113 -0
- wx/lib/pdfviewer/bitmaps/ArrowLeft.png +0 -0
- wx/lib/pdfviewer/bitmaps/ArrowRight.png +0 -0
- wx/lib/pdfviewer/bitmaps/DirectionH.png +0 -0
- wx/lib/pdfviewer/bitmaps/DirectionV.png +0 -0
- wx/lib/pdfviewer/bitmaps/PlayerFirst.png +0 -0
- wx/lib/pdfviewer/bitmaps/PlayerLast.png +0 -0
- wx/lib/pdfviewer/bitmaps/PlayerNext.png +0 -0
- wx/lib/pdfviewer/bitmaps/PlayerPrev.png +0 -0
- wx/lib/pdfviewer/bitmaps/Printer.png +0 -0
- wx/lib/pdfviewer/bitmaps/ReadMe.txt +28 -0
- wx/lib/pdfviewer/bitmaps/Save.png +0 -0
- wx/lib/pdfviewer/bitmaps/ZoomIn.png +0 -0
- wx/lib/pdfviewer/bitmaps/ZoomOut.png +0 -0
- wx/lib/pdfviewer/bitmaps/encode_bitmaps.py +37 -0
- wx/lib/pdfviewer/buttonpanel.py +285 -0
- wx/lib/pdfviewer/images.py +240 -0
- wx/lib/pdfviewer/viewer.py +1118 -0
- wx/lib/pdfwin.py +295 -0
- wx/lib/pdfwin_old.py +789 -0
- wx/lib/platebtn.py +789 -0
- wx/lib/plot/CHANGELOG.md +150 -0
- wx/lib/plot/README.md +16 -0
- wx/lib/plot/__init__.py +46 -0
- wx/lib/plot/__main__.py +5 -0
- wx/lib/plot/examples/__init__.py +0 -0
- wx/lib/plot/examples/demo.py +1010 -0
- wx/lib/plot/examples/simple_example.py +56 -0
- wx/lib/plot/plotcanvas.py +2985 -0
- wx/lib/plot/polyobjects.py +1524 -0
- wx/lib/plot/utils.py +334 -0
- wx/lib/popupctl.py +251 -0
- wx/lib/printout.py +1155 -0
- wx/lib/progressindicator.py +151 -0
- wx/lib/pubsub/LICENSE_BSD_Simple.txt +23 -0
- wx/lib/pubsub/README_WxPython.txt +22 -0
- wx/lib/pubsub/RELEASE_NOTES.txt +71 -0
- wx/lib/pubsub/__init__.py +25 -0
- wx/lib/pubsub/core/__init__.py +92 -0
- wx/lib/pubsub/core/arg1/__init__.py +16 -0
- wx/lib/pubsub/core/arg1/listenerimpl.py +97 -0
- wx/lib/pubsub/core/arg1/publisher.py +40 -0
- wx/lib/pubsub/core/arg1/publishermixin.py +34 -0
- wx/lib/pubsub/core/arg1/topicargspecimpl.py +66 -0
- wx/lib/pubsub/core/arg1/topicmgrimpl.py +19 -0
- wx/lib/pubsub/core/callables.py +198 -0
- wx/lib/pubsub/core/imp2.py +62 -0
- wx/lib/pubsub/core/itopicdefnprovider.py +0 -0
- wx/lib/pubsub/core/kwargs/__init__.py +16 -0
- wx/lib/pubsub/core/kwargs/datamsg.py +27 -0
- wx/lib/pubsub/core/kwargs/listenerimpl.py +93 -0
- wx/lib/pubsub/core/kwargs/publisher.py +77 -0
- wx/lib/pubsub/core/kwargs/publishermixin.py +65 -0
- wx/lib/pubsub/core/kwargs/topicargspecimpl.py +216 -0
- wx/lib/pubsub/core/kwargs/topicmgrimpl.py +13 -0
- wx/lib/pubsub/core/listener.py +40 -0
- wx/lib/pubsub/core/listenerbase.py +185 -0
- wx/lib/pubsub/core/notificationmgr.py +185 -0
- wx/lib/pubsub/core/publisherbase.py +189 -0
- wx/lib/pubsub/core/topicargspec.py +77 -0
- wx/lib/pubsub/core/topicdefnprovider.py +631 -0
- wx/lib/pubsub/core/topicexc.py +72 -0
- wx/lib/pubsub/core/topicmgr.py +454 -0
- wx/lib/pubsub/core/topicobj.py +472 -0
- wx/lib/pubsub/core/topictreetraverser.py +143 -0
- wx/lib/pubsub/core/topicutils.py +119 -0
- wx/lib/pubsub/core/treeconfig.py +21 -0
- wx/lib/pubsub/core/validatedefnargs.py +29 -0
- wx/lib/pubsub/core/weakmethod.py +102 -0
- wx/lib/pubsub/policies.py +24 -0
- wx/lib/pubsub/pub.py +199 -0
- wx/lib/pubsub/setuparg1.py +47 -0
- wx/lib/pubsub/setupkwargs.py +29 -0
- wx/lib/pubsub/utils/__init__.py +27 -0
- wx/lib/pubsub/utils/exchandling.py +100 -0
- wx/lib/pubsub/utils/misc.py +99 -0
- wx/lib/pubsub/utils/notification.py +331 -0
- wx/lib/pubsub/utils/topictreeprinter.py +195 -0
- wx/lib/pubsub/utils/xmltopicdefnprovider.py +286 -0
- wx/lib/pydocview.py +3300 -0
- wx/lib/rcsizer.py +227 -0
- wx/lib/resizewidget.py +357 -0
- wx/lib/scrolledpanel.py +243 -0
- wx/lib/sheet.py +350 -0
- wx/lib/sized_controls.py +691 -0
- wx/lib/softwareupdate.py +355 -0
- wx/lib/splitter.py +925 -0
- wx/lib/statbmp.py +199 -0
- wx/lib/stattext.py +321 -0
- wx/lib/throbber.py +424 -0
- wx/lib/ticker.py +306 -0
- wx/lib/ticker_xrc.py +48 -0
- wx/lib/utils.py +89 -0
- wx/lib/wordwrap.py +97 -0
- wx/lib/wxcairo/__init__.py +139 -0
- wx/lib/wxcairo/wx_cairocffi.py +200 -0
- wx/lib/wxcairo/wx_pycairo.py +455 -0
- wx/lib/wxpTag.py +274 -0
- wx/libcairo-2.dll +0 -0
- wx/locale/af/LC_MESSAGES/wxstd.mo +0 -0
- wx/locale/an/LC_MESSAGES/wxstd.mo +0 -0
- wx/locale/ar/LC_MESSAGES/wxstd.mo +0 -0
- wx/locale/ca/LC_MESSAGES/wxstd.mo +0 -0
- wx/locale/ca@valencia/LC_MESSAGES/wxstd.mo +0 -0
- wx/locale/co/LC_MESSAGES/wxstd.mo +0 -0
- wx/locale/cs/LC_MESSAGES/wxstd.mo +0 -0
- wx/locale/da/LC_MESSAGES/wxstd.mo +0 -0
- wx/locale/de/LC_MESSAGES/wxstd.mo +0 -0
- wx/locale/el/LC_MESSAGES/wxstd.mo +0 -0
- wx/locale/es/LC_MESSAGES/wxstd.mo +0 -0
- wx/locale/eu/LC_MESSAGES/wxstd.mo +0 -0
- wx/locale/fa_IR/LC_MESSAGES/wxstd.mo +0 -0
- wx/locale/fi/LC_MESSAGES/wxstd.mo +0 -0
- wx/locale/fr/LC_MESSAGES/wxstd.mo +0 -0
- wx/locale/gl_ES/LC_MESSAGES/wxstd.mo +0 -0
- wx/locale/hi/LC_MESSAGES/wxstd.mo +0 -0
- wx/locale/hr/LC_MESSAGES/wxstd.mo +0 -0
- wx/locale/hu/LC_MESSAGES/wxstd.mo +0 -0
- wx/locale/id/LC_MESSAGES/wxstd.mo +0 -0
- wx/locale/it/LC_MESSAGES/wxstd.mo +0 -0
- wx/locale/ja/LC_MESSAGES/wxstd.mo +0 -0
- wx/locale/ka/LC_MESSAGES/wxstd.mo +0 -0
- wx/locale/ko_KR/LC_MESSAGES/wxstd.mo +0 -0
- wx/locale/lt/LC_MESSAGES/wxstd.mo +0 -0
- wx/locale/lv/LC_MESSAGES/wxstd.mo +0 -0
- wx/locale/ms/LC_MESSAGES/wxstd.mo +0 -0
- wx/locale/nb/LC_MESSAGES/wxstd.mo +0 -0
- wx/locale/ne/LC_MESSAGES/wxstd.mo +0 -0
- wx/locale/nl/LC_MESSAGES/wxstd.mo +0 -0
- wx/locale/pl/LC_MESSAGES/wxstd.mo +0 -0
- wx/locale/pt/LC_MESSAGES/wxstd.mo +0 -0
- wx/locale/pt_BR/LC_MESSAGES/wxstd.mo +0 -0
- wx/locale/ro/LC_MESSAGES/wxstd.mo +0 -0
- wx/locale/ru/LC_MESSAGES/wxstd.mo +0 -0
- wx/locale/sk/LC_MESSAGES/wxstd.mo +0 -0
- wx/locale/sl/LC_MESSAGES/wxstd.mo +0 -0
- wx/locale/sq/LC_MESSAGES/wxstd.mo +0 -0
- wx/locale/sr/LC_MESSAGES/wxstd.mo +0 -0
- wx/locale/sv/LC_MESSAGES/wxstd.mo +0 -0
- wx/locale/ta/LC_MESSAGES/wxstd.mo +0 -0
- wx/locale/tr/LC_MESSAGES/wxstd.mo +0 -0
- wx/locale/uk/LC_MESSAGES/wxstd.mo +0 -0
- wx/locale/vi/LC_MESSAGES/wxstd.mo +0 -0
- wx/locale/zh_CN/LC_MESSAGES/wxstd.mo +0 -0
- wx/locale/zh_TW/LC_MESSAGES/wxstd.mo +0 -0
- wx/media.py +30 -0
- wx/media.pyi +272 -0
- wx/msw.py +16 -0
- wx/msw.pyi +91 -0
- wx/propgrid.py +498 -0
- wx/propgrid.pyi +7427 -0
- wx/py/CHANGES.txt +796 -0
- wx/py/Py.ico +0 -0
- wx/py/PyAlaCarte.py +34 -0
- wx/py/PyAlaMode.py +34 -0
- wx/py/PyAlaModeTest.py +33 -0
- wx/py/PyCrust.ico +0 -0
- wx/py/PyCrust.py +78 -0
- wx/py/PyCrust_16.png +0 -0
- wx/py/PyCrust_32.png +0 -0
- wx/py/PyFilling.py +35 -0
- wx/py/PyShell.py +78 -0
- wx/py/PySlices.ico +0 -0
- wx/py/PySlices.py +98 -0
- wx/py/PySlicesShell.py +94 -0
- wx/py/PySlices_16.png +0 -0
- wx/py/PySlices_32.png +0 -0
- wx/py/PyWrap.py +52 -0
- wx/py/README.txt +77 -0
- wx/py/__init__.py +20 -0
- wx/py/buffer.py +136 -0
- wx/py/crust.py +403 -0
- wx/py/crustslices.py +403 -0
- wx/py/dispatcher.py +259 -0
- wx/py/document.py +37 -0
- wx/py/editor.py +844 -0
- wx/py/editwindow.py +316 -0
- wx/py/filling.py +358 -0
- wx/py/frame.py +976 -0
- wx/py/images.py +212 -0
- wx/py/interpreter.py +161 -0
- wx/py/introspect.py +402 -0
- wx/py/magic.py +98 -0
- wx/py/parse.py +134 -0
- wx/py/path.py +36 -0
- wx/py/pseudo.py +99 -0
- wx/py/shell.py +1579 -0
- wx/py/sliceshell.py +3805 -0
- wx/py/tests/test_interpreter.py +71 -0
- wx/py/tests/test_introspect.py +810 -0
- wx/py/tests/test_pseudo.py +70 -0
- wx/py/tests/test_version.py +36 -0
- wx/py/tests/testall.py +22 -0
- wx/py/version.py +7 -0
- wx/py.typed +0 -0
- wx/ribbon.py +48 -0
- wx/ribbon.pyi +3099 -0
- wx/richtext.py +141 -0
- wx/richtext.pyi +13581 -0
- wx/siplib.cp315-win_amd64.pyd +0 -0
- wx/siplib.pyi +19 -0
- wx/stc.py +59 -0
- wx/stc.pyi +9918 -0
- wx/svg/__init__.py +363 -0
- wx/svg/_nanosvg.cp315-win_amd64.pyd +0 -0
- wx/tools/__init__.py +18 -0
- wx/tools/dbg.py +268 -0
- wx/tools/genaxmodule.py +50 -0
- wx/tools/helpviewer.py +92 -0
- wx/tools/img2img.py +85 -0
- wx/tools/img2png.py +54 -0
- wx/tools/img2py.py +306 -0
- wx/tools/img2xpm.py +54 -0
- wx/tools/pywxrc.py +951 -0
- wx/tools/wxget.py +254 -0
- wx/tools/wxget_docs_demo.py +183 -0
- wx/wxbase334u_net_vc140_x64.dll +0 -0
- wx/wxbase334u_vc140_x64.dll +0 -0
- wx/wxbase334u_xml_vc140_x64.dll +0 -0
- wx/wxmsw334u_adv_vc140_x64.dll +0 -0
- wx/wxmsw334u_aui_vc140_x64.dll +0 -0
- wx/wxmsw334u_core_vc140_x64.dll +0 -0
- wx/wxmsw334u_gl_vc140_x64.dll +0 -0
- wx/wxmsw334u_html_vc140_x64.dll +0 -0
- wx/wxmsw334u_media_vc140_x64.dll +0 -0
- wx/wxmsw334u_propgrid_vc140_x64.dll +0 -0
- wx/wxmsw334u_qa_vc140_x64.dll +0 -0
- wx/wxmsw334u_ribbon_vc140_x64.dll +0 -0
- wx/wxmsw334u_richtext_vc140_x64.dll +0 -0
- wx/wxmsw334u_stc_vc140_x64.dll +0 -0
- wx/wxmsw334u_webview_vc140_x64.dll +0 -0
- wx/wxmsw334u_xrc_vc140_x64.dll +0 -0
- wx/xml.py +18 -0
- wx/xml.pyi +728 -0
- wx/xrc.py +68 -0
- wx/xrc.pyi +896 -0
- wxpython-4.3.2.dist-info/METADATA +71 -0
- wxpython-4.3.2.dist-info/RECORD +472 -0
- wxpython-4.3.2.dist-info/WHEEL +5 -0
- wxpython-4.3.2.dist-info/entry_points.txt +13 -0
- wxpython-4.3.2.dist-info/licenses/LICENSE.txt +610 -0
- wxpython-4.3.2.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,418 @@
|
|
|
1
|
+
//--------------------------------------------------------------------------
|
|
2
|
+
// Name: wxpy_api.h
|
|
3
|
+
// Purpose: Some utility functions and such that can be used in other
|
|
4
|
+
// snippets of C++ code to help reduce complexity, etc. They
|
|
5
|
+
// are all either macros, inline functions, or functions that
|
|
6
|
+
// are exported from the core extension module.
|
|
7
|
+
//
|
|
8
|
+
// Author: Robin Dunn
|
|
9
|
+
//
|
|
10
|
+
// Created: 19-Nov-2010
|
|
11
|
+
// Copyright: (c) 2010-2020 by Total Control Software
|
|
12
|
+
// Licence: wxWindows license
|
|
13
|
+
//--------------------------------------------------------------------------
|
|
14
|
+
|
|
15
|
+
#ifndef _WXPY_API_H
|
|
16
|
+
#define _WXPY_API_H
|
|
17
|
+
|
|
18
|
+
#if defined(__APPLE__)
|
|
19
|
+
// When it's possible that we're building universal binaries with both
|
|
20
|
+
// 32-bit and 64-bit architectures then these need to be undef'ed because
|
|
21
|
+
// otherwise the values set by configure could conflict with those set
|
|
22
|
+
// based on runtime flags in Python's headers. We also do something
|
|
23
|
+
// similar in wx/platform.h so it's okay to undef them now because they
|
|
24
|
+
// will be defined again soon.
|
|
25
|
+
#undef SIZEOF_VOID_P
|
|
26
|
+
#undef SIZEOF_LONG
|
|
27
|
+
#undef SIZEOF_SIZE_T
|
|
28
|
+
#endif
|
|
29
|
+
|
|
30
|
+
#if defined(__GNUC__)
|
|
31
|
+
// Turn off the warning about converting string literals to char*
|
|
32
|
+
// TODO: fix these the right way...
|
|
33
|
+
#pragma GCC diagnostic ignored "-Wwrite-strings"
|
|
34
|
+
#endif
|
|
35
|
+
|
|
36
|
+
#ifdef _MSC_VER
|
|
37
|
+
#pragma warning(disable:4800)
|
|
38
|
+
#pragma warning(disable:4190)
|
|
39
|
+
#endif
|
|
40
|
+
|
|
41
|
+
#include <wx/wx.h>
|
|
42
|
+
|
|
43
|
+
//--------------------------------------------------------------------------
|
|
44
|
+
// The API items that can be inline functions or macros.
|
|
45
|
+
// These are made available simply by #including this header file.
|
|
46
|
+
//--------------------------------------------------------------------------
|
|
47
|
+
|
|
48
|
+
typedef PyGILState_STATE wxPyBlock_t;
|
|
49
|
+
#define wxPyBlock_t_default PyGILState_UNLOCKED
|
|
50
|
+
|
|
51
|
+
typedef unsigned char byte;
|
|
52
|
+
typedef unsigned char* buffer;
|
|
53
|
+
typedef unsigned long ulong;
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
// Convert a wxString to a Python string (actually a PyUnicode object).
|
|
57
|
+
// Assumes that the GIL has already been acquired.
|
|
58
|
+
inline PyObject* wx2PyString(const wxString& str) {
|
|
59
|
+
return PyUnicode_FromWideChar(str.wc_str(), str.length());
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
// Calls from Python to wxWidgets code should be wrapped in calls to these
|
|
64
|
+
// functions:
|
|
65
|
+
inline PyThreadState* wxPyBeginAllowThreads() {
|
|
66
|
+
PyThreadState* saved = PyEval_SaveThread(); // Like Py_BEGIN_ALLOW_THREADS;
|
|
67
|
+
return saved;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
inline void wxPyEndAllowThreads(PyThreadState* saved) {
|
|
71
|
+
PyEval_RestoreThread(saved); // Like Py_END_ALLOW_THREADS;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
// A macro that will help to execute simple statements wrapped in
|
|
78
|
+
// StartBlock/EndBlockThreads calls
|
|
79
|
+
#define wxPyBLOCK_THREADS(stmt) \
|
|
80
|
+
{ wxPyThreadBlocker _blocker; stmt; }
|
|
81
|
+
|
|
82
|
+
// Raise any exception with a string value (blocking threads)
|
|
83
|
+
#define wxPyErr_SetString(err, str) \
|
|
84
|
+
wxPyBLOCK_THREADS(PyErr_SetString(err, str))
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
// Raise NotImplemented exceptions
|
|
88
|
+
#define wxPyRaiseNotImplemented() \
|
|
89
|
+
wxPyBLOCK_THREADS( PyErr_SetNone(PyExc_NotImplementedError) )
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
#define wxPyRaiseNotImplementedMsg(msg) \
|
|
93
|
+
wxPyBLOCK_THREADS( PyErr_SetString(PyExc_NotImplementedError, msg) );
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
// A convenience macro for properly returning Py_None
|
|
97
|
+
//#define RETURN_NONE() { Py_INCREF(Py_None); return Py_None; }
|
|
98
|
+
#define RETURN_NONE() { wxPyBLOCK_THREADS(Py_INCREF(Py_None)); return Py_None; }
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
// Macros to work around some of the differences in the Python 3 API
|
|
104
|
+
#if PY_MAJOR_VERSION >= 3
|
|
105
|
+
#define wxPyInt_Check PyLong_Check
|
|
106
|
+
#define wxPyInt_AsLong PyLong_AsLong
|
|
107
|
+
#define wxPyInt_AS_LONG PyLong_AS_LONG
|
|
108
|
+
#define wxPyInt_AsSize_t PyLong_AsSize_t
|
|
109
|
+
#define wxPyInt_AsSsize_t PyLong_AsSsize_t
|
|
110
|
+
#define wxPyInt_AsUnsignedLong PyLong_AsUnsignedLong
|
|
111
|
+
#define wxPyInt_FromLong PyLong_FromLong
|
|
112
|
+
#define wxPyInt_FromSize_t PyLong_FromSize_t
|
|
113
|
+
#define wxPyInt_FromSsize_t PyLong_FromSsize_t
|
|
114
|
+
#define wxPyInt_FromUnsignedLong PyLong_FromUnsignedLong
|
|
115
|
+
#define wxPyNumber_Int PyNumber_Long
|
|
116
|
+
#else
|
|
117
|
+
#define wxPyInt_Check PyInt_Check
|
|
118
|
+
#define wxPyInt_AsLong PyInt_AsLong
|
|
119
|
+
#define wxPyInt_AS_LONG PyInt_AS_LONG
|
|
120
|
+
#define wxPyInt_AsLong PyInt_AsLong
|
|
121
|
+
#define wxPyInt_AsSize_t(x) static_cast<size_t>(PyInt_AsUnsignedLongLongMask(x))
|
|
122
|
+
#define wxPyInt_AsSsize_t PyInt_AsSsize_t
|
|
123
|
+
#define wxPyInt_AsUnsignedLong PyInt_AsUnsignedLongMask
|
|
124
|
+
#define wxPyInt_FromLong PyInt_FromLong
|
|
125
|
+
#define wxPyInt_FromSize_t PyInt_FromSize_t
|
|
126
|
+
#define wxPyInt_FromSsize_t PyInt_FromSsize_t
|
|
127
|
+
#define wxPyInt_FromUnsignedLong PyInt_FromSize_t
|
|
128
|
+
#define wxPyNumber_Int PyNumber_Int
|
|
129
|
+
#endif
|
|
130
|
+
|
|
131
|
+
inline
|
|
132
|
+
Py_ssize_t wxPyUnicode_AsWideChar(PyObject* unicode, wchar_t* w, Py_ssize_t size)
|
|
133
|
+
{
|
|
134
|
+
// GIL should already be held
|
|
135
|
+
#if PY_MAJOR_VERSION >= 3
|
|
136
|
+
return PyUnicode_AsWideChar(unicode, w, size);
|
|
137
|
+
#else
|
|
138
|
+
return PyUnicode_AsWideChar((PyUnicodeObject*)unicode, w, size);
|
|
139
|
+
#endif
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
|
|
143
|
+
|
|
144
|
+
//--------------------------------------------------------------------------
|
|
145
|
+
// These are the API items whose implementation can not or should not be
|
|
146
|
+
// inline functions or macros. The implementations will instead be accessed
|
|
147
|
+
// via a structure of function pointers that is exported from the wx._core
|
|
148
|
+
// extension module. See wxpy_api.sip for the implementations.
|
|
149
|
+
//--------------------------------------------------------------------------
|
|
150
|
+
|
|
151
|
+
struct wxPyAPI {
|
|
152
|
+
wxString (*p_Py2wxString)(PyObject* source);
|
|
153
|
+
PyObject* (*p_wxPyConstructObject)(void* ptr, const wxString& className, bool setThisOwn);
|
|
154
|
+
wxPyBlock_t (*p_wxPyBeginBlockThreads)();
|
|
155
|
+
void (*p_wxPyEndBlockThreads)(wxPyBlock_t blocked);
|
|
156
|
+
bool (*p_wxPyWrappedPtr_Check)(PyObject* obj);
|
|
157
|
+
bool (*p_wxPyConvertWrappedPtr)(PyObject* obj, void **ptr, const wxString& className);
|
|
158
|
+
bool (*p_wxPy2int_seq_helper)(PyObject* source, int* i1, int* i2);
|
|
159
|
+
bool (*p_wxPy4int_seq_helper)(PyObject* source, int* i1, int* i2, int* i3, int* i4);
|
|
160
|
+
bool (*p_wxPyWrappedPtr_TypeCheck)(PyObject* obj, const wxString& className);
|
|
161
|
+
wxVariant (*p_wxVariant_in_helper)(PyObject* obj);
|
|
162
|
+
PyObject* (*p_wxVariant_out_helper)(const wxVariant& value);
|
|
163
|
+
bool (*p_wxPyCheckForApp)(bool raiseException);
|
|
164
|
+
PyObject* (*p_wxPyMakeBuffer)(void* ptr, Py_ssize_t len, bool readOnly);
|
|
165
|
+
bool (*p_wxPyNumberSequenceCheck)(PyObject* obj, int reqLength);
|
|
166
|
+
void* (*p_wxPyGetCppPtr)(sipSimpleWrapper* sipPyObj);
|
|
167
|
+
PyObject* (*p_wxPyMethod_Self)(PyObject* method);
|
|
168
|
+
void (*p_wxPyReinitializeModules)();
|
|
169
|
+
|
|
170
|
+
int (*p_wxPyDateTime_Check)(PyObject *obj);
|
|
171
|
+
int (*p_wxPyDate_Check)(PyObject *obj);
|
|
172
|
+
wxDateTime* (*p_wxPyDateTime_ToWxDateTime)(PyObject *obj);
|
|
173
|
+
wxDateTime* (*p_wxPyDate_ToWxDateTime)(PyObject *obj);
|
|
174
|
+
|
|
175
|
+
bool (*p_wxPyCheckNumberSequence)(PyObject *obj);
|
|
176
|
+
bool (*p_wxPyCheckStringSequence)(PyObject *obj);
|
|
177
|
+
// Always add new items here at the end.
|
|
178
|
+
};
|
|
179
|
+
|
|
180
|
+
|
|
181
|
+
|
|
182
|
+
inline wxPyAPI* wxPyGetAPIPtr()
|
|
183
|
+
{
|
|
184
|
+
static wxPyAPI* wxPyAPIPtr = NULL;
|
|
185
|
+
|
|
186
|
+
if (wxPyAPIPtr == NULL) {
|
|
187
|
+
PyGILState_STATE state = PyGILState_Ensure();
|
|
188
|
+
wxPyAPIPtr = (wxPyAPI*)PyCapsule_Import("wx._wxPyAPI", 0);
|
|
189
|
+
// uncomment if needed for debugging
|
|
190
|
+
//if (PyErr_Occurred()) { PyErr_Print(); }
|
|
191
|
+
//wxASSERT_MSG(wxPyAPIPtr != NULL, wxT("wxPyAPIPtr is NULL!!!"));
|
|
192
|
+
PyGILState_Release(state);
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
return wxPyAPIPtr;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
//--------------------------------------------------------------------------
|
|
199
|
+
// Inline wrappers which call the functions in the API structure
|
|
200
|
+
|
|
201
|
+
// Convert a PyObject to a wxString
|
|
202
|
+
// Assumes that the GIL has already been acquired.
|
|
203
|
+
inline wxString Py2wxString(PyObject* source)
|
|
204
|
+
{ return wxPyGetAPIPtr()->p_Py2wxString(source); }
|
|
205
|
+
|
|
206
|
+
|
|
207
|
+
// Create a PyObject of the requested type from a void* and a class name.
|
|
208
|
+
// Assumes that the GIL has already been acquired.
|
|
209
|
+
inline PyObject* wxPyConstructObject(void* ptr, const wxString& className, bool setThisOwn=false)
|
|
210
|
+
{ return wxPyGetAPIPtr()->p_wxPyConstructObject(ptr, className, setThisOwn); }
|
|
211
|
+
|
|
212
|
+
|
|
213
|
+
// Check if a PyObject is a wrapped type
|
|
214
|
+
inline bool wxPyWrappedPtr_Check(PyObject* obj)
|
|
215
|
+
{ return wxPyGetAPIPtr()->p_wxPyWrappedPtr_Check(obj); }
|
|
216
|
+
|
|
217
|
+
// Check if a PyObject is a specific wrapped type (or a subclass)
|
|
218
|
+
inline bool wxPyWrappedPtr_TypeCheck(PyObject* obj, const wxString& className)
|
|
219
|
+
{ return wxPyGetAPIPtr()->p_wxPyWrappedPtr_TypeCheck(obj, className); }
|
|
220
|
+
|
|
221
|
+
|
|
222
|
+
// Convert a wrapped SIP object to its C++ pointer, ensuring that it is of the expected type
|
|
223
|
+
inline bool wxPyConvertWrappedPtr(PyObject* obj, void **ptr, const wxString& className)
|
|
224
|
+
{ return wxPyGetAPIPtr()->p_wxPyConvertWrappedPtr(obj, ptr, className); }
|
|
225
|
+
|
|
226
|
+
|
|
227
|
+
// Calls from wxWindows back to Python code, or even any PyObject
|
|
228
|
+
// manipulations, PyDECREF's and etc. should be wrapped in calls to these functions:
|
|
229
|
+
inline wxPyBlock_t wxPyBeginBlockThreads()
|
|
230
|
+
{ return wxPyGetAPIPtr()->p_wxPyBeginBlockThreads(); }
|
|
231
|
+
|
|
232
|
+
inline void wxPyEndBlockThreads(wxPyBlock_t blocked)
|
|
233
|
+
{ wxPyGetAPIPtr()->p_wxPyEndBlockThreads(blocked); }
|
|
234
|
+
|
|
235
|
+
|
|
236
|
+
|
|
237
|
+
// A helper for converting a 2 element sequence to a pair of integers
|
|
238
|
+
inline bool wxPy2int_seq_helper(PyObject* source, int* i1, int* i2)
|
|
239
|
+
{ return wxPyGetAPIPtr()->p_wxPy2int_seq_helper(source, i1, i2); }
|
|
240
|
+
|
|
241
|
+
// A helper for converting a 4 element sequence to a set of integers
|
|
242
|
+
inline bool wxPy4int_seq_helper(PyObject* source, int* i1, int* i2, int* i3, int* i4)
|
|
243
|
+
{ return wxPyGetAPIPtr()->p_wxPy4int_seq_helper(source, i1, i2, i3, i4); }
|
|
244
|
+
|
|
245
|
+
|
|
246
|
+
// Convert a PyObject to a wxVariant
|
|
247
|
+
inline wxVariant wxVariant_in_helper(PyObject* obj)
|
|
248
|
+
{ return wxPyGetAPIPtr()->p_wxVariant_in_helper(obj); }
|
|
249
|
+
|
|
250
|
+
// Convert a wxVariant to a PyObject
|
|
251
|
+
inline PyObject* wxVariant_out_helper(const wxVariant& value)
|
|
252
|
+
{ return wxPyGetAPIPtr()->p_wxVariant_out_helper(value); }
|
|
253
|
+
|
|
254
|
+
|
|
255
|
+
// Check if a wx.App object has been created
|
|
256
|
+
inline bool wxPyCheckForApp(bool raiseException=true)
|
|
257
|
+
{ return wxPyGetAPIPtr()->p_wxPyCheckForApp(raiseException); }
|
|
258
|
+
|
|
259
|
+
|
|
260
|
+
// Create a buffer object from a pointer and size
|
|
261
|
+
inline PyObject* wxPyMakeBuffer(void* ptr, Py_ssize_t len, bool readOnly=false)
|
|
262
|
+
{ return wxPyGetAPIPtr()->p_wxPyMakeBuffer(ptr, len, readOnly); }
|
|
263
|
+
|
|
264
|
+
// Check if an object is a sequence of numbers
|
|
265
|
+
inline bool wxPyNumberSequenceCheck(PyObject* obj, int reqLength=-1)
|
|
266
|
+
{ return wxPyGetAPIPtr()->p_wxPyNumberSequenceCheck(obj, reqLength); }
|
|
267
|
+
|
|
268
|
+
|
|
269
|
+
inline void* wxPyGetCppPtr(sipSimpleWrapper* sipPyObj)
|
|
270
|
+
{ return wxPyGetAPIPtr()->p_wxPyGetCppPtr(sipPyObj); }
|
|
271
|
+
|
|
272
|
+
inline PyObject* wxPyMethod_Self(PyObject* method)
|
|
273
|
+
{ return wxPyGetAPIPtr()->p_wxPyMethod_Self(method); }
|
|
274
|
+
|
|
275
|
+
|
|
276
|
+
inline void wxPyReinitializeModules()
|
|
277
|
+
{ return wxPyGetAPIPtr()->p_wxPyReinitializeModules(); }
|
|
278
|
+
|
|
279
|
+
|
|
280
|
+
|
|
281
|
+
inline int wxPyDateTime_Check(PyObject *obj)
|
|
282
|
+
{ return wxPyGetAPIPtr()->p_wxPyDateTime_Check(obj); }
|
|
283
|
+
|
|
284
|
+
inline int wxPyDate_Check(PyObject *obj)
|
|
285
|
+
{ return wxPyGetAPIPtr()->p_wxPyDate_Check(obj); }
|
|
286
|
+
|
|
287
|
+
inline wxDateTime* wxPyDateTime_ToWxDateTime(PyObject *obj)
|
|
288
|
+
{ return wxPyGetAPIPtr()->p_wxPyDateTime_ToWxDateTime(obj); }
|
|
289
|
+
|
|
290
|
+
inline wxDateTime* wxPyDate_ToWxDateTime(PyObject *obj)
|
|
291
|
+
{ return wxPyGetAPIPtr()->p_wxPyDate_ToWxDateTime(obj); }
|
|
292
|
+
|
|
293
|
+
|
|
294
|
+
inline bool wxPyCheckNumberSequence(PyObject *obj)
|
|
295
|
+
{
|
|
296
|
+
return wxPyGetAPIPtr()->p_wxPyCheckNumberSequence(obj);
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
inline bool wxPyCheckStringSequence(PyObject *obj)
|
|
300
|
+
{
|
|
301
|
+
return wxPyGetAPIPtr()->p_wxPyCheckStringSequence(obj);
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
//--------------------------------------------------------------------------
|
|
305
|
+
// Convenience helper for RAII-style thread blocking
|
|
306
|
+
|
|
307
|
+
class wxPyThreadBlocker {
|
|
308
|
+
public:
|
|
309
|
+
explicit wxPyThreadBlocker(bool block=true)
|
|
310
|
+
: m_oldstate(block ? wxPyBeginBlockThreads() : wxPyBlock_t_default),
|
|
311
|
+
m_block(block)
|
|
312
|
+
{ }
|
|
313
|
+
|
|
314
|
+
~wxPyThreadBlocker() {
|
|
315
|
+
if (m_block) {
|
|
316
|
+
wxPyEndBlockThreads(m_oldstate);
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
private:
|
|
321
|
+
void operator=(const wxPyThreadBlocker&);
|
|
322
|
+
explicit wxPyThreadBlocker(const wxPyThreadBlocker&);
|
|
323
|
+
wxPyBlock_t m_oldstate;
|
|
324
|
+
bool m_block;
|
|
325
|
+
};
|
|
326
|
+
|
|
327
|
+
|
|
328
|
+
//--------------------------------------------------------------------------
|
|
329
|
+
// helper template to make common code for all of the various user data owners
|
|
330
|
+
|
|
331
|
+
template<typename Base>
|
|
332
|
+
class wxPyUserDataHelper : public Base {
|
|
333
|
+
public:
|
|
334
|
+
explicit wxPyUserDataHelper(PyObject* obj = NULL)
|
|
335
|
+
: m_obj(obj ? obj : Py_None)
|
|
336
|
+
{
|
|
337
|
+
wxPyThreadBlocker blocker;
|
|
338
|
+
Py_INCREF(m_obj);
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
~wxPyUserDataHelper()
|
|
342
|
+
{ // normally the derived class does the clean up, or deliberately leaks
|
|
343
|
+
// by setting m_obj to 0, but if not then do it here.
|
|
344
|
+
if (m_obj) {
|
|
345
|
+
wxPyThreadBlocker blocker;
|
|
346
|
+
Py_DECREF(m_obj);
|
|
347
|
+
m_obj = 0;
|
|
348
|
+
}
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
// Return Value: New reference
|
|
352
|
+
PyObject* GetData() const {
|
|
353
|
+
wxPyThreadBlocker blocker;
|
|
354
|
+
Py_INCREF(m_obj);
|
|
355
|
+
return m_obj;
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
// Return Value: Borrowed reference
|
|
359
|
+
PyObject* BorrowData() const {
|
|
360
|
+
return m_obj;
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
void SetData(PyObject* obj) {
|
|
364
|
+
if (obj != m_obj) {
|
|
365
|
+
wxPyThreadBlocker blocker;
|
|
366
|
+
Py_DECREF(m_obj);
|
|
367
|
+
m_obj = obj ? obj : Py_None;
|
|
368
|
+
Py_INCREF(m_obj);
|
|
369
|
+
}
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
// Return the object in udata or None if udata is null
|
|
373
|
+
// Return Value: New reference
|
|
374
|
+
static PyObject* SafeGetData(wxPyUserDataHelper<Base>* udata) {
|
|
375
|
+
wxPyThreadBlocker blocker;
|
|
376
|
+
PyObject* obj = udata ? udata->BorrowData() : Py_None;
|
|
377
|
+
Py_INCREF(obj);
|
|
378
|
+
return obj;
|
|
379
|
+
}
|
|
380
|
+
|
|
381
|
+
// Set the m_obj to null, this should only be used during clean up, when
|
|
382
|
+
// the object should be leaked.
|
|
383
|
+
// Calling any other methods on this object is then undefined behaviour
|
|
384
|
+
void ReleaseDataDuringCleanup()
|
|
385
|
+
{
|
|
386
|
+
m_obj = 0;
|
|
387
|
+
}
|
|
388
|
+
|
|
389
|
+
private:
|
|
390
|
+
PyObject* m_obj;
|
|
391
|
+
};
|
|
392
|
+
|
|
393
|
+
|
|
394
|
+
|
|
395
|
+
// A wxClientData that holds a reference to a Python object
|
|
396
|
+
class wxPyClientData : public wxPyUserDataHelper<wxClientData>
|
|
397
|
+
{
|
|
398
|
+
public:
|
|
399
|
+
wxPyClientData(PyObject* obj = NULL)
|
|
400
|
+
: wxPyUserDataHelper<wxClientData>(obj)
|
|
401
|
+
{ }
|
|
402
|
+
};
|
|
403
|
+
|
|
404
|
+
|
|
405
|
+
|
|
406
|
+
|
|
407
|
+
// A wxObject object that holds a reference to a Python object
|
|
408
|
+
class wxPyUserData : public wxPyUserDataHelper<wxObject>
|
|
409
|
+
{
|
|
410
|
+
public:
|
|
411
|
+
wxPyUserData(PyObject* obj = NULL)
|
|
412
|
+
: wxPyUserDataHelper<wxObject>(obj)
|
|
413
|
+
{ }
|
|
414
|
+
};
|
|
415
|
+
|
|
416
|
+
|
|
417
|
+
//--------------------------------------------------------------------------
|
|
418
|
+
#endif
|
wx/lib/CDate.py
ADDED
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
# -*- coding: utf-8 -*-
|
|
2
|
+
# Name: CDate.py
|
|
3
|
+
# Purpose: Date and Calendar classes
|
|
4
|
+
#
|
|
5
|
+
# Author: Lorne White (email: lwhite1@planet.eon.net)
|
|
6
|
+
#
|
|
7
|
+
# Created:
|
|
8
|
+
# Version 0.2 08-Nov-1999
|
|
9
|
+
# Licence: wxWindows license
|
|
10
|
+
# Tags: phoenix-port, py3-port, documented, unittest
|
|
11
|
+
#----------------------------------------------------------------------------
|
|
12
|
+
# Updated: 01-Dec-2004
|
|
13
|
+
# Action: Cast the year variable to an integer under the Date Class
|
|
14
|
+
# Reason: When the year was compared in the isleap() function, if it was
|
|
15
|
+
# in a string format, then an error was raised.
|
|
16
|
+
#
|
|
17
|
+
"""Date and calendar classes and date utitility methods."""
|
|
18
|
+
import time
|
|
19
|
+
|
|
20
|
+
# I18N
|
|
21
|
+
import wx
|
|
22
|
+
_ = wx.GetTranslation
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
Month = {0: None,
|
|
26
|
+
1: _('January'), 2: _('February'), 3: _('March'),
|
|
27
|
+
4: _('April'), 5: _('May'), 6: _('June'),
|
|
28
|
+
7: _('July'), 8: _('August'), 9: _('September'),
|
|
29
|
+
10: _('October'), 11: _('November'), 12: _('December')}
|
|
30
|
+
|
|
31
|
+
# Number of days per month (except for February in leap years)
|
|
32
|
+
mdays = [0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]
|
|
33
|
+
|
|
34
|
+
# Full and abbreviated names of weekdays
|
|
35
|
+
day_name = [_('Sunday'), _('Monday'), _('Tuesday'), _('Wednesday'),
|
|
36
|
+
_('Thursday'), _('Friday'), _('Saturday')]
|
|
37
|
+
day_abbr = [_('Sun'), _('Mon'), _('Tue'), _('Wed'), _('Thu'), _('Fri'),
|
|
38
|
+
_('Sat')]
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
def leapdays(y1, y2):
|
|
42
|
+
"""
|
|
43
|
+
Return number of leap years in range [y1, y2]
|
|
44
|
+
Assume y1 <= y2 and no funny (non-leap century) years
|
|
45
|
+
"""
|
|
46
|
+
return (y2 + 3) // 4 - (y1 + 3) // 4
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
def isleap(year):
|
|
50
|
+
"""Verify if year is a leap year.
|
|
51
|
+
|
|
52
|
+
:param int `year`: the year to check
|
|
53
|
+
:return: True or False
|
|
54
|
+
|
|
55
|
+
"""
|
|
56
|
+
return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
def FillDate(val):
|
|
60
|
+
s = str(val)
|
|
61
|
+
if len(s) < 2:
|
|
62
|
+
s = '0' + s
|
|
63
|
+
return s
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
def julianDay(year, month, day):
|
|
67
|
+
"""Convert a date to Julian
|
|
68
|
+
|
|
69
|
+
:param int `year`: the year
|
|
70
|
+
:param int `month`: the month
|
|
71
|
+
:param int `day`: the day
|
|
72
|
+
|
|
73
|
+
:returns: the julian date number
|
|
74
|
+
|
|
75
|
+
"""
|
|
76
|
+
b = 0
|
|
77
|
+
if month > 12:
|
|
78
|
+
year = year + month // 12
|
|
79
|
+
month = month % 12
|
|
80
|
+
elif month < 1:
|
|
81
|
+
month = -month
|
|
82
|
+
year = year - month // 12 - 1
|
|
83
|
+
month = 12 - month % 12
|
|
84
|
+
if year > 0:
|
|
85
|
+
yearCorr = 0
|
|
86
|
+
else:
|
|
87
|
+
yearCorr = 3
|
|
88
|
+
if month < 3:
|
|
89
|
+
year = year - 1
|
|
90
|
+
month = month + 12
|
|
91
|
+
if year * 10000 + month * 100 + day > 15821014:
|
|
92
|
+
b = 2 - year // 100 + year // 400
|
|
93
|
+
return (1461 * year - yearCorr) // 4 + 306001 * (month + 1) // 10000 + day + 1720994 + b
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
def TodayDay():
|
|
97
|
+
date = time.localtime(time.time())
|
|
98
|
+
year = date[0]
|
|
99
|
+
month = date[1]
|
|
100
|
+
day = date[2]
|
|
101
|
+
julian = julianDay(year, month, day)
|
|
102
|
+
daywk = dayOfWeek(julian)
|
|
103
|
+
daywk = day_name[daywk]
|
|
104
|
+
return(daywk)
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
def FormatDay(value):
|
|
108
|
+
date = FromFormat(value)
|
|
109
|
+
daywk = DateCalc.dayOfWeek(date)
|
|
110
|
+
daywk = day_name[daywk]
|
|
111
|
+
return(daywk)
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
def FromJulian(julian):
|
|
115
|
+
"""Convert a julian date
|
|
116
|
+
|
|
117
|
+
:param int `julian`: the julian date to convert
|
|
118
|
+
|
|
119
|
+
:returns: year, month day as integers
|
|
120
|
+
|
|
121
|
+
"""
|
|
122
|
+
if (julian < 2299160):
|
|
123
|
+
b = julian + 1525
|
|
124
|
+
else:
|
|
125
|
+
alpha = (4 * julian - 7468861) // 146097
|
|
126
|
+
b = julian + 1526 + alpha - alpha // 4
|
|
127
|
+
c = (20 * b - 2442) // 7305
|
|
128
|
+
d = 1461 * c // 4
|
|
129
|
+
e = 10000 * (b - d) // 306001
|
|
130
|
+
day = int(b - d - 306001 * e // 10000)
|
|
131
|
+
if e < 14:
|
|
132
|
+
month = int(e - 1)
|
|
133
|
+
else:
|
|
134
|
+
month = int(e - 13)
|
|
135
|
+
if month > 2:
|
|
136
|
+
year = c - 4716
|
|
137
|
+
else:
|
|
138
|
+
year = c - 4715
|
|
139
|
+
year = int(year)
|
|
140
|
+
return year, month, day
|
|
141
|
+
|
|
142
|
+
|
|
143
|
+
def dayOfWeek(julian):
|
|
144
|
+
"""Get day of week from a julian day
|
|
145
|
+
|
|
146
|
+
:param `julian`: the julian day
|
|
147
|
+
|
|
148
|
+
:returns: the day of week as an integer and Monday = 1
|
|
149
|
+
|
|
150
|
+
"""
|
|
151
|
+
return int((julian + 1) % 7)
|
|
152
|
+
|
|
153
|
+
|
|
154
|
+
def daysPerMonth(month, year):
|
|
155
|
+
"""Get the number of days for the month.
|
|
156
|
+
|
|
157
|
+
:param int `month`: the month
|
|
158
|
+
:param int `year`: the year
|
|
159
|
+
|
|
160
|
+
:returns: the number of days in the requested month
|
|
161
|
+
|
|
162
|
+
"""
|
|
163
|
+
ndays = mdays[month] + (month == 2 and isleap(year))
|
|
164
|
+
return ndays
|
|
165
|
+
|
|
166
|
+
|
|
167
|
+
class now(object):
|
|
168
|
+
"""A now date class"""
|
|
169
|
+
def __init__(self):
|
|
170
|
+
"""
|
|
171
|
+
Default class constructor.
|
|
172
|
+
"""
|
|
173
|
+
self.date = time.localtime(time.time())
|
|
174
|
+
self.year = self.date[0]
|
|
175
|
+
self.month = self.date[1]
|
|
176
|
+
self.day = self.date[2]
|
|
177
|
+
self.hour = self.date[3]
|
|
178
|
+
self.minutes = self.date[4]
|
|
179
|
+
self.secondes = self.date[5]
|
|
180
|
+
self.day_of_week = self.date[6]
|
|
181
|
+
|
|
182
|
+
self.julian = julianDay(self.year, self.month, self.day)
|
|
183
|
+
|
|
184
|
+
|
|
185
|
+
class Date(object):
|
|
186
|
+
"""A date class"""
|
|
187
|
+
def __init__(self, year, month, day):
|
|
188
|
+
"""
|
|
189
|
+
Default class constructor.
|
|
190
|
+
|
|
191
|
+
:param `year`: the year as an int or string
|
|
192
|
+
:param `month`: the month as an int or string
|
|
193
|
+
:param `day`: the day as an int or string
|
|
194
|
+
|
|
195
|
+
"""
|
|
196
|
+
self.julian = julianDay(year, month, day)
|
|
197
|
+
self.month = int(month)
|
|
198
|
+
self.year = int(year)
|
|
199
|
+
self.day = int(day)
|
|
200
|
+
self.day_of_week = dayOfWeek(self.julian)
|
|
201
|
+
self.days_in_month = daysPerMonth(self.month, self.year)
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
# 12/01/2003 - Jeff Grimmett (grimmtooth@softhome.net)
|
|
2
|
+
#
|
|
3
|
+
# o Updated for wx namespace. Not tested though.
|
|
4
|
+
#
|
|
5
|
+
# 12/17/2003 - Jeff Grimmett (grimmtooth@softhome.net)
|
|
6
|
+
#
|
|
7
|
+
# o Removed wx prefix from class name,
|
|
8
|
+
# updated reverse renamer
|
|
9
|
+
#
|
|
10
|
+
|
|
11
|
+
"""
|
|
12
|
+
sorry no documentation...
|
|
13
|
+
Christopher J. Fama
|
|
14
|
+
"""
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
import wx
|
|
18
|
+
import wx.html as html
|
|
19
|
+
|
|
20
|
+
class PyClickableHtmlWindow(html.HtmlWindow):
|
|
21
|
+
"""
|
|
22
|
+
Class for a :class:`wx.html.HtmlWindow` which responds to clicks on
|
|
23
|
+
links by opening a browser pointed at that link, and to shift-clicks
|
|
24
|
+
by copying the link to the clipboard.
|
|
25
|
+
"""
|
|
26
|
+
def __init__(self,parent,ID,**kw):
|
|
27
|
+
html.HtmlWindow.__init__(self, parent, ID, **kw)
|
|
28
|
+
|
|
29
|
+
def OnLinkClicked(self,link):
|
|
30
|
+
self.link = wx.TextDataObject(link.GetHref())
|
|
31
|
+
if link.GetEvent().ShiftDown():
|
|
32
|
+
if wx.TheClipboard.Open():
|
|
33
|
+
wx.TheClipboard.SetData(self.link)
|
|
34
|
+
wx.TheClipboard.Close()
|
|
35
|
+
else:
|
|
36
|
+
dlg = wx.MessageDialog(self,"Couldn't open clipboard!\n",wx.OK)
|
|
37
|
+
wx.Bell()
|
|
38
|
+
dlg.ShowModal()
|
|
39
|
+
dlg.Destroy()
|
|
40
|
+
else:
|
|
41
|
+
if 0: # Chris's original code...
|
|
42
|
+
if sys.platform not in ["windows",'nt'] :
|
|
43
|
+
#TODO: A MORE APPROPRIATE COMMAND LINE FOR Linux
|
|
44
|
+
#[or rather, non-Windows platforms... as of writing,
|
|
45
|
+
#this MEANS Linux, until wxPython for wxMac comes along...]
|
|
46
|
+
command = "/usr/bin/netscape"
|
|
47
|
+
else:
|
|
48
|
+
command = "start"
|
|
49
|
+
command = "%s \"%s\"" % (command,
|
|
50
|
+
self.link.GetText ())
|
|
51
|
+
os.system (command)
|
|
52
|
+
|
|
53
|
+
else: # My alternative
|
|
54
|
+
import webbrowser
|
|
55
|
+
webbrowser.open(link.GetHref())
|
|
56
|
+
|
|
57
|
+
|
wx/lib/__init__.py
ADDED
|
File without changes
|