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.
Files changed (472) hide show
  1. wx/WebView2Loader.dll +0 -0
  2. wx/__init__.py +22 -0
  3. wx/__init__.pyi +10 -0
  4. wx/__version__.py +9 -0
  5. wx/__version__.pyi +15 -0
  6. wx/_adv.cp315-win_amd64.pyd +0 -0
  7. wx/_aui.cp315-win_amd64.pyd +0 -0
  8. wx/_core.cp315-win_amd64.pyd +0 -0
  9. wx/_dataview.cp315-win_amd64.pyd +0 -0
  10. wx/_glcanvas.cp315-win_amd64.pyd +0 -0
  11. wx/_grid.cp315-win_amd64.pyd +0 -0
  12. wx/_html.cp315-win_amd64.pyd +0 -0
  13. wx/_html2.cp315-win_amd64.pyd +0 -0
  14. wx/_media.cp315-win_amd64.pyd +0 -0
  15. wx/_msw.cp315-win_amd64.pyd +0 -0
  16. wx/_propgrid.cp315-win_amd64.pyd +0 -0
  17. wx/_ribbon.cp315-win_amd64.pyd +0 -0
  18. wx/_richtext.cp315-win_amd64.pyd +0 -0
  19. wx/_stc.cp315-win_amd64.pyd +0 -0
  20. wx/_xml.cp315-win_amd64.pyd +0 -0
  21. wx/_xrc.cp315-win_amd64.pyd +0 -0
  22. wx/adv.py +127 -0
  23. wx/adv.pyi +5931 -0
  24. wx/aui.py +70 -0
  25. wx/aui.pyi +4805 -0
  26. wx/core.py +3417 -0
  27. wx/core.pyi +62949 -0
  28. wx/dataview.py +176 -0
  29. wx/dataview.pyi +3828 -0
  30. wx/gizmos.py +18 -0
  31. wx/glcanvas.py +13 -0
  32. wx/glcanvas.pyi +544 -0
  33. wx/grid.py +237 -0
  34. wx/grid.pyi +5678 -0
  35. wx/html.py +38 -0
  36. wx/html.pyi +3283 -0
  37. wx/html2.py +46 -0
  38. wx/html2.pyi +1301 -0
  39. wx/include/wxPython/sip.h +1938 -0
  40. wx/include/wxPython/wxpy_api.h +418 -0
  41. wx/lib/CDate.py +201 -0
  42. wx/lib/ClickableHtmlWindow.py +57 -0
  43. wx/lib/__init__.py +0 -0
  44. wx/lib/activex.py +178 -0
  45. wx/lib/activexwrapper.py +153 -0
  46. wx/lib/agw/__init__.py +128 -0
  47. wx/lib/agw/advancedsplash.py +563 -0
  48. wx/lib/agw/aquabutton.py +1127 -0
  49. wx/lib/agw/artmanager.py +2110 -0
  50. wx/lib/agw/aui/__init__.py +295 -0
  51. wx/lib/agw/aui/aui_constants.py +2616 -0
  52. wx/lib/agw/aui/aui_switcherdialog.py +1232 -0
  53. wx/lib/agw/aui/aui_utilities.py +648 -0
  54. wx/lib/agw/aui/auibar.py +4045 -0
  55. wx/lib/agw/aui/auibook.py +6288 -0
  56. wx/lib/agw/aui/dockart.py +1198 -0
  57. wx/lib/agw/aui/framemanager.py +10485 -0
  58. wx/lib/agw/aui/tabart.py +2749 -0
  59. wx/lib/agw/aui/tabmdi.py +679 -0
  60. wx/lib/agw/balloontip.py +1157 -0
  61. wx/lib/agw/buttonpanel.py +2787 -0
  62. wx/lib/agw/cubecolourdialog.py +3529 -0
  63. wx/lib/agw/customtreectrl.py +9908 -0
  64. wx/lib/agw/data/ShortcutEditor_1.png +0 -0
  65. wx/lib/agw/data/ShortcutEditor_1_thumb.png +0 -0
  66. wx/lib/agw/data/ShortcutEditor_2.png +0 -0
  67. wx/lib/agw/data/ShortcutEditor_2_thumb.png +0 -0
  68. wx/lib/agw/data/ShortcutEditor_3.png +0 -0
  69. wx/lib/agw/data/ShortcutEditor_3_thumb.png +0 -0
  70. wx/lib/agw/data/ShortcutEditor_4.png +0 -0
  71. wx/lib/agw/data/ShortcutEditor_4_thumb.png +0 -0
  72. wx/lib/agw/data/default_help_text.html +105 -0
  73. wx/lib/agw/flatmenu.py +7392 -0
  74. wx/lib/agw/flatnotebook.py +6669 -0
  75. wx/lib/agw/floatspin.py +1820 -0
  76. wx/lib/agw/fmcustomizedlg.py +535 -0
  77. wx/lib/agw/fmresources.py +407 -0
  78. wx/lib/agw/foldpanelbar.py +2282 -0
  79. wx/lib/agw/fourwaysplitter.py +1130 -0
  80. wx/lib/agw/genericmessagedialog.py +1549 -0
  81. wx/lib/agw/gradientbutton.py +731 -0
  82. wx/lib/agw/hyperlink.py +664 -0
  83. wx/lib/agw/hypertreelist.py +5756 -0
  84. wx/lib/agw/infobar.py +885 -0
  85. wx/lib/agw/knobctrl.py +944 -0
  86. wx/lib/agw/labelbook.py +3028 -0
  87. wx/lib/agw/multidirdialog.py +581 -0
  88. wx/lib/agw/peakmeter.py +1028 -0
  89. wx/lib/agw/persist/__init__.py +188 -0
  90. wx/lib/agw/persist/persist_constants.py +283 -0
  91. wx/lib/agw/persist/persist_handlers.py +2614 -0
  92. wx/lib/agw/persist/persistencemanager.py +863 -0
  93. wx/lib/agw/piectrl.py +1082 -0
  94. wx/lib/agw/pybusyinfo.py +399 -0
  95. wx/lib/agw/pycollapsiblepane.py +940 -0
  96. wx/lib/agw/pygauge.py +570 -0
  97. wx/lib/agw/pyprogress.py +916 -0
  98. wx/lib/agw/ribbon/__init__.py +198 -0
  99. wx/lib/agw/ribbon/art.py +219 -0
  100. wx/lib/agw/ribbon/art_aui.py +1283 -0
  101. wx/lib/agw/ribbon/art_default.py +81 -0
  102. wx/lib/agw/ribbon/art_internal.py +248 -0
  103. wx/lib/agw/ribbon/art_msw.py +2735 -0
  104. wx/lib/agw/ribbon/art_osx.py +52 -0
  105. wx/lib/agw/ribbon/bar.py +1259 -0
  106. wx/lib/agw/ribbon/buttonbar.py +1317 -0
  107. wx/lib/agw/ribbon/control.py +205 -0
  108. wx/lib/agw/ribbon/gallery.py +973 -0
  109. wx/lib/agw/ribbon/page.py +946 -0
  110. wx/lib/agw/ribbon/panel.py +1170 -0
  111. wx/lib/agw/ribbon/toolbar.py +1441 -0
  112. wx/lib/agw/rulerctrl.py +1885 -0
  113. wx/lib/agw/scrolledthumbnail.py +2116 -0
  114. wx/lib/agw/shapedbutton.py +1809 -0
  115. wx/lib/agw/shortcuteditor.py +2642 -0
  116. wx/lib/agw/speedmeter.py +1800 -0
  117. wx/lib/agw/supertooltip.py +1443 -0
  118. wx/lib/agw/thumbnailctrl.py +529 -0
  119. wx/lib/agw/toasterbox.py +1327 -0
  120. wx/lib/agw/ultimatelistctrl.py +13671 -0
  121. wx/lib/agw/xlsgrid.py +2111 -0
  122. wx/lib/agw/zoombar.py +1336 -0
  123. wx/lib/analogclock/__init__.py +140 -0
  124. wx/lib/analogclock/analogclock.py +630 -0
  125. wx/lib/analogclock/helpers.py +986 -0
  126. wx/lib/analogclock/lib_setup/__init__.py +0 -0
  127. wx/lib/analogclock/lib_setup/buttontreectrlpanel.py +297 -0
  128. wx/lib/analogclock/lib_setup/fontselect.py +57 -0
  129. wx/lib/analogclock/setup.py +490 -0
  130. wx/lib/analogclock/styles.py +47 -0
  131. wx/lib/anchors.py +103 -0
  132. wx/lib/art/__init__.py +4 -0
  133. wx/lib/art/flagart.py +1583 -0
  134. wx/lib/art/img2pyartprov.py +56 -0
  135. wx/lib/busy.py +152 -0
  136. wx/lib/buttons.py +1140 -0
  137. wx/lib/calendar.py +1596 -0
  138. wx/lib/checkbox.py +837 -0
  139. wx/lib/colourchooser/__init__.py +36 -0
  140. wx/lib/colourchooser/canvas.py +145 -0
  141. wx/lib/colourchooser/intl.py +24 -0
  142. wx/lib/colourchooser/pycolourbox.py +89 -0
  143. wx/lib/colourchooser/pycolourchooser.py +626 -0
  144. wx/lib/colourchooser/pycolourslider.py +98 -0
  145. wx/lib/colourchooser/pypalette.py +208 -0
  146. wx/lib/colourdb.py +740 -0
  147. wx/lib/colourselect.py +385 -0
  148. wx/lib/colourutils.py +118 -0
  149. wx/lib/combotreebox.py +944 -0
  150. wx/lib/delayedresult.py +420 -0
  151. wx/lib/dialogs.py +510 -0
  152. wx/lib/docview.py +3210 -0
  153. wx/lib/dragscroller.py +79 -0
  154. wx/lib/editor/README.txt +77 -0
  155. wx/lib/editor/__init__.py +24 -0
  156. wx/lib/editor/editor.py +974 -0
  157. wx/lib/editor/images.py +15 -0
  158. wx/lib/editor/selection.py +44 -0
  159. wx/lib/embeddedimage.py +76 -0
  160. wx/lib/eventStack.py +136 -0
  161. wx/lib/eventwatcher.py +440 -0
  162. wx/lib/evtmgr.py +521 -0
  163. wx/lib/expando.py +393 -0
  164. wx/lib/fancytext.py +494 -0
  165. wx/lib/filebrowsebutton.py +461 -0
  166. wx/lib/flashwin.py +262 -0
  167. wx/lib/flashwin_old.py +651 -0
  168. wx/lib/floatcanvas/FCEvents.py +53 -0
  169. wx/lib/floatcanvas/FCObjects.py +2910 -0
  170. wx/lib/floatcanvas/FloatCanvas.py +1025 -0
  171. wx/lib/floatcanvas/GUIMode.py +396 -0
  172. wx/lib/floatcanvas/NavCanvas.py +162 -0
  173. wx/lib/floatcanvas/Resources.py +319 -0
  174. wx/lib/floatcanvas/ScreenShot.py +1788 -0
  175. wx/lib/floatcanvas/Utilities/BBox.py +313 -0
  176. wx/lib/floatcanvas/Utilities/Colors.py +137 -0
  177. wx/lib/floatcanvas/Utilities/GUI.py +91 -0
  178. wx/lib/floatcanvas/Utilities/__init__.py +7 -0
  179. wx/lib/floatcanvas/__init__.py +124 -0
  180. wx/lib/foldmenu.py +89 -0
  181. wx/lib/gestures.py +310 -0
  182. wx/lib/gizmos/__init__.py +18 -0
  183. wx/lib/gizmos/dynamicsash.py +1202 -0
  184. wx/lib/gizmos/ledctrl.py +299 -0
  185. wx/lib/gizmos/treelistctrl.py +87 -0
  186. wx/lib/graphics.py +1942 -0
  187. wx/lib/gridmovers.py +516 -0
  188. wx/lib/iewin.py +249 -0
  189. wx/lib/iewin_old.py +894 -0
  190. wx/lib/imagebrowser.py +853 -0
  191. wx/lib/imageutils.py +163 -0
  192. wx/lib/infoframe.py +490 -0
  193. wx/lib/inspection.py +1254 -0
  194. wx/lib/intctrl.py +990 -0
  195. wx/lib/itemspicker.py +256 -0
  196. wx/lib/langlistctrl.py +480 -0
  197. wx/lib/layoutf.py +271 -0
  198. wx/lib/masked/__init__.py +27 -0
  199. wx/lib/masked/combobox.py +839 -0
  200. wx/lib/masked/ctrl.py +108 -0
  201. wx/lib/masked/ipaddrctrl.py +241 -0
  202. wx/lib/masked/maskededit.py +7262 -0
  203. wx/lib/masked/numctrl.py +2000 -0
  204. wx/lib/masked/textctrl.py +465 -0
  205. wx/lib/masked/timectrl.py +1465 -0
  206. wx/lib/mixins/__init__.py +17 -0
  207. wx/lib/mixins/grid.py +47 -0
  208. wx/lib/mixins/gridlabelrenderer.py +277 -0
  209. wx/lib/mixins/imagelist.py +77 -0
  210. wx/lib/mixins/inspection.py +184 -0
  211. wx/lib/mixins/listctrl.py +893 -0
  212. wx/lib/mixins/rubberband.py +403 -0
  213. wx/lib/mixins/treemixin.py +678 -0
  214. wx/lib/msgpanel.py +95 -0
  215. wx/lib/multisash.py +746 -0
  216. wx/lib/myole4ax.idl +178 -0
  217. wx/lib/myole4ax.tlb +0 -0
  218. wx/lib/newevent.py +229 -0
  219. wx/lib/newevent.pyi +25 -0
  220. wx/lib/nvdlg.py +156 -0
  221. wx/lib/ogl/__init__.py +13 -0
  222. wx/lib/ogl/basic.py +3989 -0
  223. wx/lib/ogl/bmpshape.py +86 -0
  224. wx/lib/ogl/canvas.py +467 -0
  225. wx/lib/ogl/composit.py +1576 -0
  226. wx/lib/ogl/diagram.py +230 -0
  227. wx/lib/ogl/divided.py +482 -0
  228. wx/lib/ogl/drawn.py +898 -0
  229. wx/lib/ogl/lines.py +1809 -0
  230. wx/lib/ogl/oglmisc.py +607 -0
  231. wx/lib/pdfviewer/__init__.py +113 -0
  232. wx/lib/pdfviewer/bitmaps/ArrowLeft.png +0 -0
  233. wx/lib/pdfviewer/bitmaps/ArrowRight.png +0 -0
  234. wx/lib/pdfviewer/bitmaps/DirectionH.png +0 -0
  235. wx/lib/pdfviewer/bitmaps/DirectionV.png +0 -0
  236. wx/lib/pdfviewer/bitmaps/PlayerFirst.png +0 -0
  237. wx/lib/pdfviewer/bitmaps/PlayerLast.png +0 -0
  238. wx/lib/pdfviewer/bitmaps/PlayerNext.png +0 -0
  239. wx/lib/pdfviewer/bitmaps/PlayerPrev.png +0 -0
  240. wx/lib/pdfviewer/bitmaps/Printer.png +0 -0
  241. wx/lib/pdfviewer/bitmaps/ReadMe.txt +28 -0
  242. wx/lib/pdfviewer/bitmaps/Save.png +0 -0
  243. wx/lib/pdfviewer/bitmaps/ZoomIn.png +0 -0
  244. wx/lib/pdfviewer/bitmaps/ZoomOut.png +0 -0
  245. wx/lib/pdfviewer/bitmaps/encode_bitmaps.py +37 -0
  246. wx/lib/pdfviewer/buttonpanel.py +285 -0
  247. wx/lib/pdfviewer/images.py +240 -0
  248. wx/lib/pdfviewer/viewer.py +1118 -0
  249. wx/lib/pdfwin.py +295 -0
  250. wx/lib/pdfwin_old.py +789 -0
  251. wx/lib/platebtn.py +789 -0
  252. wx/lib/plot/CHANGELOG.md +150 -0
  253. wx/lib/plot/README.md +16 -0
  254. wx/lib/plot/__init__.py +46 -0
  255. wx/lib/plot/__main__.py +5 -0
  256. wx/lib/plot/examples/__init__.py +0 -0
  257. wx/lib/plot/examples/demo.py +1010 -0
  258. wx/lib/plot/examples/simple_example.py +56 -0
  259. wx/lib/plot/plotcanvas.py +2985 -0
  260. wx/lib/plot/polyobjects.py +1524 -0
  261. wx/lib/plot/utils.py +334 -0
  262. wx/lib/popupctl.py +251 -0
  263. wx/lib/printout.py +1155 -0
  264. wx/lib/progressindicator.py +151 -0
  265. wx/lib/pubsub/LICENSE_BSD_Simple.txt +23 -0
  266. wx/lib/pubsub/README_WxPython.txt +22 -0
  267. wx/lib/pubsub/RELEASE_NOTES.txt +71 -0
  268. wx/lib/pubsub/__init__.py +25 -0
  269. wx/lib/pubsub/core/__init__.py +92 -0
  270. wx/lib/pubsub/core/arg1/__init__.py +16 -0
  271. wx/lib/pubsub/core/arg1/listenerimpl.py +97 -0
  272. wx/lib/pubsub/core/arg1/publisher.py +40 -0
  273. wx/lib/pubsub/core/arg1/publishermixin.py +34 -0
  274. wx/lib/pubsub/core/arg1/topicargspecimpl.py +66 -0
  275. wx/lib/pubsub/core/arg1/topicmgrimpl.py +19 -0
  276. wx/lib/pubsub/core/callables.py +198 -0
  277. wx/lib/pubsub/core/imp2.py +62 -0
  278. wx/lib/pubsub/core/itopicdefnprovider.py +0 -0
  279. wx/lib/pubsub/core/kwargs/__init__.py +16 -0
  280. wx/lib/pubsub/core/kwargs/datamsg.py +27 -0
  281. wx/lib/pubsub/core/kwargs/listenerimpl.py +93 -0
  282. wx/lib/pubsub/core/kwargs/publisher.py +77 -0
  283. wx/lib/pubsub/core/kwargs/publishermixin.py +65 -0
  284. wx/lib/pubsub/core/kwargs/topicargspecimpl.py +216 -0
  285. wx/lib/pubsub/core/kwargs/topicmgrimpl.py +13 -0
  286. wx/lib/pubsub/core/listener.py +40 -0
  287. wx/lib/pubsub/core/listenerbase.py +185 -0
  288. wx/lib/pubsub/core/notificationmgr.py +185 -0
  289. wx/lib/pubsub/core/publisherbase.py +189 -0
  290. wx/lib/pubsub/core/topicargspec.py +77 -0
  291. wx/lib/pubsub/core/topicdefnprovider.py +631 -0
  292. wx/lib/pubsub/core/topicexc.py +72 -0
  293. wx/lib/pubsub/core/topicmgr.py +454 -0
  294. wx/lib/pubsub/core/topicobj.py +472 -0
  295. wx/lib/pubsub/core/topictreetraverser.py +143 -0
  296. wx/lib/pubsub/core/topicutils.py +119 -0
  297. wx/lib/pubsub/core/treeconfig.py +21 -0
  298. wx/lib/pubsub/core/validatedefnargs.py +29 -0
  299. wx/lib/pubsub/core/weakmethod.py +102 -0
  300. wx/lib/pubsub/policies.py +24 -0
  301. wx/lib/pubsub/pub.py +199 -0
  302. wx/lib/pubsub/setuparg1.py +47 -0
  303. wx/lib/pubsub/setupkwargs.py +29 -0
  304. wx/lib/pubsub/utils/__init__.py +27 -0
  305. wx/lib/pubsub/utils/exchandling.py +100 -0
  306. wx/lib/pubsub/utils/misc.py +99 -0
  307. wx/lib/pubsub/utils/notification.py +331 -0
  308. wx/lib/pubsub/utils/topictreeprinter.py +195 -0
  309. wx/lib/pubsub/utils/xmltopicdefnprovider.py +286 -0
  310. wx/lib/pydocview.py +3300 -0
  311. wx/lib/rcsizer.py +227 -0
  312. wx/lib/resizewidget.py +357 -0
  313. wx/lib/scrolledpanel.py +243 -0
  314. wx/lib/sheet.py +350 -0
  315. wx/lib/sized_controls.py +691 -0
  316. wx/lib/softwareupdate.py +355 -0
  317. wx/lib/splitter.py +925 -0
  318. wx/lib/statbmp.py +199 -0
  319. wx/lib/stattext.py +321 -0
  320. wx/lib/throbber.py +424 -0
  321. wx/lib/ticker.py +306 -0
  322. wx/lib/ticker_xrc.py +48 -0
  323. wx/lib/utils.py +89 -0
  324. wx/lib/wordwrap.py +97 -0
  325. wx/lib/wxcairo/__init__.py +139 -0
  326. wx/lib/wxcairo/wx_cairocffi.py +200 -0
  327. wx/lib/wxcairo/wx_pycairo.py +455 -0
  328. wx/lib/wxpTag.py +274 -0
  329. wx/libcairo-2.dll +0 -0
  330. wx/locale/af/LC_MESSAGES/wxstd.mo +0 -0
  331. wx/locale/an/LC_MESSAGES/wxstd.mo +0 -0
  332. wx/locale/ar/LC_MESSAGES/wxstd.mo +0 -0
  333. wx/locale/ca/LC_MESSAGES/wxstd.mo +0 -0
  334. wx/locale/ca@valencia/LC_MESSAGES/wxstd.mo +0 -0
  335. wx/locale/co/LC_MESSAGES/wxstd.mo +0 -0
  336. wx/locale/cs/LC_MESSAGES/wxstd.mo +0 -0
  337. wx/locale/da/LC_MESSAGES/wxstd.mo +0 -0
  338. wx/locale/de/LC_MESSAGES/wxstd.mo +0 -0
  339. wx/locale/el/LC_MESSAGES/wxstd.mo +0 -0
  340. wx/locale/es/LC_MESSAGES/wxstd.mo +0 -0
  341. wx/locale/eu/LC_MESSAGES/wxstd.mo +0 -0
  342. wx/locale/fa_IR/LC_MESSAGES/wxstd.mo +0 -0
  343. wx/locale/fi/LC_MESSAGES/wxstd.mo +0 -0
  344. wx/locale/fr/LC_MESSAGES/wxstd.mo +0 -0
  345. wx/locale/gl_ES/LC_MESSAGES/wxstd.mo +0 -0
  346. wx/locale/hi/LC_MESSAGES/wxstd.mo +0 -0
  347. wx/locale/hr/LC_MESSAGES/wxstd.mo +0 -0
  348. wx/locale/hu/LC_MESSAGES/wxstd.mo +0 -0
  349. wx/locale/id/LC_MESSAGES/wxstd.mo +0 -0
  350. wx/locale/it/LC_MESSAGES/wxstd.mo +0 -0
  351. wx/locale/ja/LC_MESSAGES/wxstd.mo +0 -0
  352. wx/locale/ka/LC_MESSAGES/wxstd.mo +0 -0
  353. wx/locale/ko_KR/LC_MESSAGES/wxstd.mo +0 -0
  354. wx/locale/lt/LC_MESSAGES/wxstd.mo +0 -0
  355. wx/locale/lv/LC_MESSAGES/wxstd.mo +0 -0
  356. wx/locale/ms/LC_MESSAGES/wxstd.mo +0 -0
  357. wx/locale/nb/LC_MESSAGES/wxstd.mo +0 -0
  358. wx/locale/ne/LC_MESSAGES/wxstd.mo +0 -0
  359. wx/locale/nl/LC_MESSAGES/wxstd.mo +0 -0
  360. wx/locale/pl/LC_MESSAGES/wxstd.mo +0 -0
  361. wx/locale/pt/LC_MESSAGES/wxstd.mo +0 -0
  362. wx/locale/pt_BR/LC_MESSAGES/wxstd.mo +0 -0
  363. wx/locale/ro/LC_MESSAGES/wxstd.mo +0 -0
  364. wx/locale/ru/LC_MESSAGES/wxstd.mo +0 -0
  365. wx/locale/sk/LC_MESSAGES/wxstd.mo +0 -0
  366. wx/locale/sl/LC_MESSAGES/wxstd.mo +0 -0
  367. wx/locale/sq/LC_MESSAGES/wxstd.mo +0 -0
  368. wx/locale/sr/LC_MESSAGES/wxstd.mo +0 -0
  369. wx/locale/sv/LC_MESSAGES/wxstd.mo +0 -0
  370. wx/locale/ta/LC_MESSAGES/wxstd.mo +0 -0
  371. wx/locale/tr/LC_MESSAGES/wxstd.mo +0 -0
  372. wx/locale/uk/LC_MESSAGES/wxstd.mo +0 -0
  373. wx/locale/vi/LC_MESSAGES/wxstd.mo +0 -0
  374. wx/locale/zh_CN/LC_MESSAGES/wxstd.mo +0 -0
  375. wx/locale/zh_TW/LC_MESSAGES/wxstd.mo +0 -0
  376. wx/media.py +30 -0
  377. wx/media.pyi +272 -0
  378. wx/msw.py +16 -0
  379. wx/msw.pyi +91 -0
  380. wx/propgrid.py +498 -0
  381. wx/propgrid.pyi +7427 -0
  382. wx/py/CHANGES.txt +796 -0
  383. wx/py/Py.ico +0 -0
  384. wx/py/PyAlaCarte.py +34 -0
  385. wx/py/PyAlaMode.py +34 -0
  386. wx/py/PyAlaModeTest.py +33 -0
  387. wx/py/PyCrust.ico +0 -0
  388. wx/py/PyCrust.py +78 -0
  389. wx/py/PyCrust_16.png +0 -0
  390. wx/py/PyCrust_32.png +0 -0
  391. wx/py/PyFilling.py +35 -0
  392. wx/py/PyShell.py +78 -0
  393. wx/py/PySlices.ico +0 -0
  394. wx/py/PySlices.py +98 -0
  395. wx/py/PySlicesShell.py +94 -0
  396. wx/py/PySlices_16.png +0 -0
  397. wx/py/PySlices_32.png +0 -0
  398. wx/py/PyWrap.py +52 -0
  399. wx/py/README.txt +77 -0
  400. wx/py/__init__.py +20 -0
  401. wx/py/buffer.py +136 -0
  402. wx/py/crust.py +403 -0
  403. wx/py/crustslices.py +403 -0
  404. wx/py/dispatcher.py +259 -0
  405. wx/py/document.py +37 -0
  406. wx/py/editor.py +844 -0
  407. wx/py/editwindow.py +316 -0
  408. wx/py/filling.py +358 -0
  409. wx/py/frame.py +976 -0
  410. wx/py/images.py +212 -0
  411. wx/py/interpreter.py +161 -0
  412. wx/py/introspect.py +402 -0
  413. wx/py/magic.py +98 -0
  414. wx/py/parse.py +134 -0
  415. wx/py/path.py +36 -0
  416. wx/py/pseudo.py +99 -0
  417. wx/py/shell.py +1579 -0
  418. wx/py/sliceshell.py +3805 -0
  419. wx/py/tests/test_interpreter.py +71 -0
  420. wx/py/tests/test_introspect.py +810 -0
  421. wx/py/tests/test_pseudo.py +70 -0
  422. wx/py/tests/test_version.py +36 -0
  423. wx/py/tests/testall.py +22 -0
  424. wx/py/version.py +7 -0
  425. wx/py.typed +0 -0
  426. wx/ribbon.py +48 -0
  427. wx/ribbon.pyi +3099 -0
  428. wx/richtext.py +141 -0
  429. wx/richtext.pyi +13581 -0
  430. wx/siplib.cp315-win_amd64.pyd +0 -0
  431. wx/siplib.pyi +19 -0
  432. wx/stc.py +59 -0
  433. wx/stc.pyi +9918 -0
  434. wx/svg/__init__.py +363 -0
  435. wx/svg/_nanosvg.cp315-win_amd64.pyd +0 -0
  436. wx/tools/__init__.py +18 -0
  437. wx/tools/dbg.py +268 -0
  438. wx/tools/genaxmodule.py +50 -0
  439. wx/tools/helpviewer.py +92 -0
  440. wx/tools/img2img.py +85 -0
  441. wx/tools/img2png.py +54 -0
  442. wx/tools/img2py.py +306 -0
  443. wx/tools/img2xpm.py +54 -0
  444. wx/tools/pywxrc.py +951 -0
  445. wx/tools/wxget.py +254 -0
  446. wx/tools/wxget_docs_demo.py +183 -0
  447. wx/wxbase334u_net_vc140_x64.dll +0 -0
  448. wx/wxbase334u_vc140_x64.dll +0 -0
  449. wx/wxbase334u_xml_vc140_x64.dll +0 -0
  450. wx/wxmsw334u_adv_vc140_x64.dll +0 -0
  451. wx/wxmsw334u_aui_vc140_x64.dll +0 -0
  452. wx/wxmsw334u_core_vc140_x64.dll +0 -0
  453. wx/wxmsw334u_gl_vc140_x64.dll +0 -0
  454. wx/wxmsw334u_html_vc140_x64.dll +0 -0
  455. wx/wxmsw334u_media_vc140_x64.dll +0 -0
  456. wx/wxmsw334u_propgrid_vc140_x64.dll +0 -0
  457. wx/wxmsw334u_qa_vc140_x64.dll +0 -0
  458. wx/wxmsw334u_ribbon_vc140_x64.dll +0 -0
  459. wx/wxmsw334u_richtext_vc140_x64.dll +0 -0
  460. wx/wxmsw334u_stc_vc140_x64.dll +0 -0
  461. wx/wxmsw334u_webview_vc140_x64.dll +0 -0
  462. wx/wxmsw334u_xrc_vc140_x64.dll +0 -0
  463. wx/xml.py +18 -0
  464. wx/xml.pyi +728 -0
  465. wx/xrc.py +68 -0
  466. wx/xrc.pyi +896 -0
  467. wxpython-4.3.2.dist-info/METADATA +71 -0
  468. wxpython-4.3.2.dist-info/RECORD +472 -0
  469. wxpython-4.3.2.dist-info/WHEEL +5 -0
  470. wxpython-4.3.2.dist-info/entry_points.txt +13 -0
  471. wxpython-4.3.2.dist-info/licenses/LICENSE.txt +610 -0
  472. 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