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,1010 @@
1
+ # -*- coding: utf-8 -*-
2
+ # pylint: disable=E1101, C0330, C0103
3
+ # E1101: Module X has no Y member
4
+ # C0330: Wrong continued indentation
5
+ # C0103: Invalid attribute/variable/method name
6
+ """
7
+ demo.py
8
+ =======
9
+
10
+ .. highlight:: shell
11
+
12
+ This is a demo showing some of the capabilities of the :mod:`wx.lib.plot`
13
+ package.
14
+
15
+ It is intended to be run as a standalone script via::
16
+
17
+ user@host:.../site-packages/wx/lib/plot$ python examples/demo.py
18
+
19
+ """
20
+ __docformat__ = "restructuredtext en"
21
+
22
+ # Third Party
23
+ import wx
24
+ from wx.lib import plot as wxplot
25
+
26
+ # Needs NumPy
27
+ try:
28
+ import numpy as np
29
+ except ImportError:
30
+ msg = """
31
+ This module requires the NumPy module, which could not be
32
+ imported. It probably is not installed (it's not part of the
33
+ standard Python distribution). See the Numeric Python site
34
+ (http://numpy.scipy.org) for information on downloading source or
35
+ binaries, or just try `pip install numpy` and it will probably
36
+ work."""
37
+ raise ImportError("NumPy not found.\n" + msg)
38
+
39
+
40
+ # ---------------------------------------------------------------------------
41
+ ### Drawing Functions
42
+ # ---------------------------------------------------------------------------
43
+ def _draw1Objects():
44
+ """Sin, Cos, and Points"""
45
+ # 100 points sin function, plotted as green circles
46
+ data1 = 2. * np.pi * np.arange(-200, 200) / 200.
47
+ data1.shape = (200, 2)
48
+ data1[:, 1] = np.sin(data1[:, 0])
49
+ markers1 = wxplot.PolyMarker(data1,
50
+ legend='Green Markers',
51
+ colour='green',
52
+ marker='circle',
53
+ size=1,
54
+ )
55
+
56
+ # 50 points cos function, plotted as red line and markers
57
+ data1 = 2. * np.pi * np.arange(-100, 100) / 100.
58
+ data1.shape = (100, 2)
59
+ data1[:, 1] = np.cos(data1[:, 0])
60
+ lines = wxplot.PolySpline(data1, legend='Red Line', colour='red')
61
+ markers3 = wxplot.PolyMarker(data1,
62
+ legend='Red Dot',
63
+ colour='red',
64
+ marker='circle',
65
+ size=1,
66
+ )
67
+
68
+ # A few more points...
69
+ pi = np.pi
70
+ pts = [(0., 0.), (pi / 4., 1.), (pi / 2, 0.), (3. * pi / 4., -1)]
71
+ markers2 = wxplot.PolyMarker(pts,
72
+ legend='Cross Legend',
73
+ colour='blue',
74
+ marker='cross',
75
+ )
76
+ line2 = wxplot.PolyLine(pts, drawstyle='steps-post')
77
+
78
+ return wxplot.PlotGraphics([markers1, lines, markers3, markers2, line2],
79
+ "Graph Title",
80
+ "X Axis",
81
+ "Y Axis",
82
+ )
83
+
84
+
85
+ def _draw2Objects():
86
+ """Sin, Cos, Points, and lines between points"""
87
+ # 100 points sin function, plotted as green dots
88
+ data1 = 2. * np.pi * np.arange(200) / 200.
89
+ data1.shape = (100, 2)
90
+ data1[:, 1] = np.sin(data1[:, 0])
91
+ line1 = wxplot.PolySpline(data1,
92
+ legend='Green Line',
93
+ colour='green',
94
+ width=6,
95
+ style=wx.PENSTYLE_DOT)
96
+
97
+ # 25 points cos function, plotted as red dot-dash with steps.
98
+ data1 = 2. * np.pi * np.arange(50) / 50.
99
+ data1.shape = (25, 2)
100
+ data1[:, 1] = np.cos(data1[:, 0])
101
+ line2 = wxplot.PolyLine(data1,
102
+ legend='Red Line',
103
+ colour='red',
104
+ width=2,
105
+ style=wx.PENSTYLE_DOT_DASH,
106
+ drawstyle='steps-post',
107
+ )
108
+
109
+ # data points for the 25pt cos function.
110
+ pts2 = wxplot.PolyMarker(data1,
111
+ legend='Red Points',
112
+ colour='red',
113
+ size=1.5,
114
+ )
115
+
116
+ # A few more points...
117
+ pi = np.pi
118
+ pts = [(0., 0.), (pi / 4., 1.), (pi / 2, 0.), (3. * pi / 4., -1)]
119
+ markers1 = wxplot.PolyMarker(pts,
120
+ legend='Cross Hatch Square',
121
+ colour='blue',
122
+ width=3,
123
+ size=6,
124
+ fillcolour='red',
125
+ fillstyle=wx.CROSSDIAG_HATCH,
126
+ marker='square',
127
+ )
128
+ marker_line = wxplot.PolyLine(pts,
129
+ legend='Cross Hatch Square',
130
+ colour='blue',
131
+ width=3,
132
+ )
133
+
134
+ return wxplot.PlotGraphics([markers1, line1, line2, pts2, marker_line],
135
+ "Big Markers with Different Line Styles")
136
+
137
+
138
+ def _draw3Objects():
139
+ """Various Marker Types"""
140
+ markerList = ['circle', 'dot', 'square', 'triangle', 'triangle_down',
141
+ 'cross', 'plus', 'circle']
142
+ m = []
143
+ for i in range(len(markerList)):
144
+ m.append(wxplot.PolyMarker([(2 * i + .5, i + .5)],
145
+ legend=markerList[i],
146
+ colour='blue',
147
+ marker=markerList[i])
148
+ )
149
+ return wxplot.PlotGraphics(m,
150
+ title="Selection of Markers",
151
+ xLabel="Minimal Axis",
152
+ yLabel="No Axis")
153
+
154
+
155
+ def _draw4Objects():
156
+ """25,000 point line and markers"""
157
+ # Points
158
+ data1 = np.random.normal(loc=7.5e5, scale=70000, size=50000)
159
+ data1.shape = (25000, 2)
160
+ markers2 = wxplot.PolyMarker(data1,
161
+ legend='Dots',
162
+ colour='blue',
163
+ marker='square',
164
+ size=1,
165
+ )
166
+
167
+ # Line
168
+ data1 = np.arange(5e5, 1e6, 10)
169
+ data1.shape = (25000, 2)
170
+ line1 = wxplot.PolyLine(data1, legend='Wide Line', colour='green', width=4)
171
+
172
+ return wxplot.PlotGraphics([markers2, line1],
173
+ "25,000 Points",
174
+ "Value X",
175
+ "")
176
+
177
+
178
+ def _draw5Objects():
179
+ """Empty graph with axes but no points"""
180
+ points = []
181
+ line1 = wxplot.PolyLine(points,
182
+ legend='Wide Line',
183
+ colour='green',
184
+ width=5)
185
+ return wxplot.PlotGraphics([line1],
186
+ "Empty Plot With Just Axes",
187
+ "Value X",
188
+ "Value Y")
189
+
190
+
191
+ def _draw6Objects():
192
+ """Faking a Bar graph"""
193
+ points1 = [(1, 0), (1, 10)]
194
+ line1 = wxplot.PolyLine(points1, colour='green', legend='Feb.', width=10)
195
+ points1g = [(2, 0), (2, 4)]
196
+ line1g = wxplot.PolyLine(points1g, colour='red', legend='Mar.', width=10)
197
+ points1b = [(3, 0), (3, 6)]
198
+ line1b = wxplot.PolyLine(points1b, colour='blue', legend='Apr.', width=10)
199
+
200
+ points2 = [(4, 0), (4, 12)]
201
+ line2 = wxplot.PolyLine(points2, colour='Yellow', legend='May', width=10)
202
+ points2g = [(5, 0), (5, 8)]
203
+ line2g = wxplot.PolyLine(points2g,
204
+ colour='orange',
205
+ legend='June',
206
+ width=10)
207
+ points2b = [(6, 0), (6, 4)]
208
+ line2b = wxplot.PolyLine(points2b, colour='brown', legend='July', width=10)
209
+
210
+ return wxplot.PlotGraphics([line1, line1g, line1b, line2, line2g, line2b],
211
+ "Bar Graph - (Turn on Grid, Legend)",
212
+ "Months",
213
+ "Number of Students")
214
+
215
+
216
+ def _draw7Objects():
217
+ """Log10 on both axes"""
218
+ x = np.arange(-1000, 1000, 1)
219
+ y1 = 4.5 * x ** 2
220
+ y2 = 2.2 * x ** 3
221
+ points1 = np.transpose([x, y1])
222
+ points2 = np.transpose([x, y2])
223
+ line1 = wxplot.PolyLine(points1,
224
+ legend='quadratic',
225
+ colour='blue',
226
+ width=1)
227
+ line2 = wxplot.PolyLine(points2, legend='cubic', colour='red', width=1)
228
+ return wxplot.PlotGraphics([line1, line2],
229
+ "double log plot",
230
+ "Value X",
231
+ "Value Y")
232
+
233
+
234
+ def _draw8Objects():
235
+ """
236
+ Box plot
237
+ """
238
+ data1 = np.array([np.nan, 337, 607, 583, 512, 531, 558, 381, 621, 574,
239
+ 538, 577, 679, 415, 454, 417, 635, 319, 350, 183,
240
+ 863, 337, 607, 583, 512, 531, 558, 381, 621, 574,
241
+ 538, 577, 679, 415, 454, 417, 635, 319, 350, 97])
242
+ data2 = np.array([912, 337, 607, 583, 512, 531, 558, 381, 621, 574,
243
+ 538, 532, 829, 82, 454, 417, 635, 319, 350, 183,
244
+ 863, 337, 607, 583, 512, 531, 558, 866, 621, 574,
245
+ 538, 577, 679, 415, 326, 417, 635, 319, 350, 97])
246
+
247
+ data2 = data2 * 0.9
248
+
249
+ data1 = np.array([(0, x) for x in data1])
250
+ data2 = np.array([(1, x) for x in data2])
251
+
252
+ data3 = np.random.gamma(2, 2, 500) * 30 + 100
253
+ data3 = np.array([(2, x) for x in data3])
254
+
255
+ boxplot = wxplot.BoxPlot(data1, legend="0.0: Weights")
256
+ boxplot2 = wxplot.BoxPlot(data2, legend="1.0: Heights")
257
+ boxplot3 = wxplot.BoxPlot(data3, legend="2.0: GammaDistribution")
258
+ return wxplot.PlotGraphics([boxplot, boxplot2, boxplot3],
259
+ "Box Plot",
260
+ "",
261
+ "Value")
262
+
263
+ def _draw9Objects():
264
+ """
265
+ Histogram
266
+
267
+ The following must be true:
268
+ len(bspec) = len(hist_data) + 1
269
+ """
270
+
271
+ data = 2.25 * np.random.randn(50) + 3
272
+ heights, bins = np.histogram(data, bins=10)
273
+
274
+ hist_fixed_binsize = wxplot.PolyHistogram(heights, bins)
275
+
276
+ # Bins can also be arbitrary widths:
277
+ hist_variable_binsize = wxplot.PolyHistogram(
278
+ [2, 3, 4, 6, 3],
279
+ [18, 19, 22, 25, 26, 27],
280
+ fillcolour=wx.BLUE,
281
+ edgewidth=2,
282
+ edgecolour=wx.RED,
283
+ )
284
+
285
+ return wxplot.PlotGraphics(
286
+ [hist_fixed_binsize, hist_variable_binsize],
287
+ "Histogram with fixed binsize (left) and variable binsize (right)",
288
+ "Value",
289
+ "Count",
290
+ )
291
+
292
+
293
+ def _draw10Objects():
294
+ """
295
+ A real bar graph
296
+ """
297
+ bar_height = np.array([1, 5, 8, 16, 12, 15, 18, 23, 4, 7, 9, 6])
298
+ bar_location = np.array([0, 2, 4, 6, 8, 10, 11, 12, 16, 20, 30])
299
+ data = list(zip(bar_location, bar_height))
300
+ bars = [wxplot.PolyBars(data)]
301
+
302
+ return wxplot.PlotGraphics(bars, "Histogram", "XValue", "Count")
303
+
304
+
305
+ # ---------------------------------------------------------------------------
306
+ ### Demo Application
307
+ # ---------------------------------------------------------------------------
308
+ class PlotDemoApp(object):
309
+ def __init__(self):
310
+ self.app = wx.App()
311
+ self.frame = PlotDemoMainFrame(None, -1, "PlotCanvas")
312
+ self.frame.Show(True)
313
+ self.app.MainLoop()
314
+
315
+
316
+ class PlotDemoMainFrame(wx.Frame):
317
+ # -----------------------------------------------------------------------
318
+ ### UI Initialization
319
+ # -----------------------------------------------------------------------
320
+ def __init__(self, parent, wxid, title):
321
+ wx.Frame.__init__(self, parent, wxid, title,
322
+ wx.DefaultPosition, (800, 600))
323
+
324
+ # Now Create the menu bar and items
325
+ self.mainmenu = wx.MenuBar()
326
+
327
+ self._init_file_menu()
328
+ self._init_plot_menu()
329
+ self._init_options_menu()
330
+ self._init_help_menu()
331
+
332
+ self.SetMenuBar(self.mainmenu)
333
+
334
+ # A status bar to tell people what's happening
335
+ self.CreateStatusBar(1)
336
+
337
+ self.client = wxplot.PlotCanvas(self)
338
+ # define the function for drawing pointLabels
339
+ # self.client.SetPointLabelFunc(self.DrawPointLabel)
340
+ self.client.pointLabelFunc = self.DrawPointLabel
341
+ # Create mouse event for showing cursor coords in status bar
342
+ self.client.canvas.Bind(wx.EVT_LEFT_DOWN, self.OnMouseLeftDown)
343
+ # Show closest point when enabled
344
+ self.client.canvas.Bind(wx.EVT_MOTION, self.OnMotion)
345
+
346
+ self.OnPlotDraw1(None)
347
+
348
+ wx.CallAfter(wx.MessageBox,
349
+ "Various plot types can be shown using the Plot menu. " +
350
+ "Check out the Options menu too.",
351
+ "wx.lib.plot Demo")
352
+
353
+
354
+ def _init_file_menu(self):
355
+ """ Create the "File" menu items. """
356
+ menu = wx.Menu()
357
+ menu.Append(200, 'Page Setup...', 'Setup the printer page')
358
+ self.Bind(wx.EVT_MENU, self.OnFilePageSetup, id=200)
359
+ menu.Append(201, 'Print Preview...', 'Show the current plot on page')
360
+ self.Bind(wx.EVT_MENU, self.OnFilePrintPreview, id=201)
361
+ menu.Append(202, 'Print...', 'Print the current plot')
362
+ self.Bind(wx.EVT_MENU, self.OnFilePrint, id=202)
363
+ menu.Append(203, 'Save Plot...', 'Save current plot')
364
+ self.Bind(wx.EVT_MENU, self.OnSaveFile, id=203)
365
+ menu.Append(wx.ID_EXIT, 'E&xit', 'Enough of this already!')
366
+ self.Bind(wx.EVT_MENU, self.OnFileExit, id=wx.ID_EXIT)
367
+ self.mainmenu.Append(menu, '&File')
368
+
369
+ def _init_plot_menu(self):
370
+ """ Create the "Plot" menu items. """
371
+ menu = wx.Menu()
372
+ menu.Append(206, 'Draw1 - sin, cos',
373
+ 'Draw Sin and Cos curves')
374
+ self.Bind(wx.EVT_MENU, self.OnPlotDraw1, id=206)
375
+ menu.Append(207, 'Draw2 - sin, cos, large joined markers',
376
+ 'Draw Sin and Cos curves with some large joined makers')
377
+ self.Bind(wx.EVT_MENU, self.OnPlotDraw2, id=207)
378
+ menu.Append(208, 'Draw3 - various markers',
379
+ 'Demo various markers')
380
+ self.Bind(wx.EVT_MENU, self.OnPlotDraw3, id=208)
381
+ menu.Append(209, 'Draw4 - 25k pts',
382
+ 'Example of drawing many points quickly')
383
+ self.Bind(wx.EVT_MENU, self.OnPlotDraw4, id=209)
384
+ menu.Append(210, 'Draw5 - empty plot',
385
+ 'An empty plot')
386
+ self.Bind(wx.EVT_MENU, self.OnPlotDraw5, id=210)
387
+ menu.Append(260, 'Draw6 - fake bar graph via lines',
388
+ 'Fake a bar graph by using lines.')
389
+ self.Bind(wx.EVT_MENU, self.OnPlotDraw6, id=260)
390
+ menu.Append(261, 'Draw7 - log-log',
391
+ 'Plot a Log-Log graph')
392
+ self.Bind(wx.EVT_MENU, self.OnPlotDraw7, id=261)
393
+ menu.Append(262, 'Draw8 - Box Plots',
394
+ 'Show off some box plots')
395
+ self.Bind(wx.EVT_MENU, self.OnPlotDraw8, id=262)
396
+ menu.Append(263, 'Draw9 - Histogram',
397
+ 'Plot a histogram')
398
+ self.Bind(wx.EVT_MENU, self.OnPlotDraw9, id=263)
399
+ menu.Append(264, 'Draw10 - real bar graph',
400
+ 'Plot a real bar chart (not faked with lines)')
401
+ self.Bind(wx.EVT_MENU, self.OnPlotDraw10, id=264)
402
+
403
+ menu.AppendSeparator()
404
+
405
+ menu.Append(211, '&Redraw', 'Redraw plots')
406
+ self.Bind(wx.EVT_MENU, self.OnPlotRedraw, id=211)
407
+ menu.Append(212, '&Clear', 'Clear canvas')
408
+ self.Bind(wx.EVT_MENU, self.OnPlotClear, id=212)
409
+ menu.Append(213, '&Scale', 'Scale canvas')
410
+ self.Bind(wx.EVT_MENU, self.OnPlotScale, id=213)
411
+
412
+ menu.AppendSeparator()
413
+
414
+ menu.Append(225, 'Scroll Up 1', 'Move View Up 1 Unit')
415
+ self.Bind(wx.EVT_MENU, self.OnScrUp, id=225)
416
+ menu.Append(230, 'Scroll Rt 2', 'Move View Right 2 Units')
417
+ self.Bind(wx.EVT_MENU, self.OnScrRt, id=230)
418
+ menu.Append(235, '&Plot Reset', 'Reset to original plot')
419
+ self.Bind(wx.EVT_MENU, self.OnReset, id=235)
420
+
421
+ self.mainmenu.Append(menu, '&Plot')
422
+
423
+
424
+ def _init_options_menu(self):
425
+ """ Create the "Options" menu items. """
426
+ menu = wx.Menu()
427
+
428
+ menu.Append(214, 'Enable &Zoom',
429
+ 'Enable Mouse Zoom', kind=wx.ITEM_CHECK)
430
+ self.Bind(wx.EVT_MENU, self.OnEnableZoom, id=214)
431
+
432
+ menu.Append(217, 'Enable &Drag',
433
+ 'Activates dragging mode', kind=wx.ITEM_CHECK)
434
+ self.Bind(wx.EVT_MENU, self.OnEnableDrag, id=217)
435
+
436
+ item = menu.Append(-1, 'Enable &Scrollbars (if needed)',
437
+ 'Enable Scrollbars (if needed)', kind=wx.ITEM_CHECK)
438
+ self.Bind(wx.EVT_MENU, self.OnEnableScrollbars, item)
439
+
440
+ menu.Append(222, 'Enable &Point Label',
441
+ 'Show Closest Point', kind=wx.ITEM_CHECK)
442
+ self.Bind(wx.EVT_MENU, self.OnEnablePointLabel, id=222)
443
+
444
+ menu.Append(223, 'Enable &Anti-Aliasing',
445
+ 'Smooth output', kind=wx.ITEM_CHECK)
446
+ self.Bind(wx.EVT_MENU, self.OnEnableAntiAliasing, id=223)
447
+
448
+ menu.Append(224, 'Enable &High-Resolution AA',
449
+ 'Draw in higher resolution', kind=wx.ITEM_CHECK)
450
+ self.Bind(wx.EVT_MENU, self.OnEnableHiRes, id=224)
451
+
452
+ menu.AppendSeparator()
453
+
454
+ menu.Append(226, 'Enable Center Lines',
455
+ 'Draw center lines', kind=wx.ITEM_CHECK)
456
+ self.Bind(wx.EVT_MENU, self.OnEnableCenterLines, id=226)
457
+
458
+ menu.Append(227, 'Enable Diagonal Lines',
459
+ 'Draw diagonal lines', kind=wx.ITEM_CHECK)
460
+ self.Bind(wx.EVT_MENU, self.OnEnableDiagonals, id=227)
461
+
462
+ menu.Append(220, 'Enable &Legend',
463
+ 'Turn on Legend', kind=wx.ITEM_CHECK)
464
+ self.Bind(wx.EVT_MENU, self.OnEnableLegend, id=220)
465
+
466
+ ### SubMenu for Grid
467
+ submenu = wx.Menu()
468
+ self.gridSubMenu = submenu
469
+
470
+ submenu.AppendCheckItem(2151, "X Gridlines", "Enable X gridlines")
471
+ submenu.AppendCheckItem(2152, "Y Gridlines", "Enable Y gridlines")
472
+ submenu.AppendCheckItem(2153, "All Gridlines", "Enable All gridlines")
473
+ submenu.Check(2151, True)
474
+ submenu.Check(2152, True)
475
+ submenu.Check(2153, True)
476
+
477
+ self.Bind(wx.EVT_MENU, self.OnEnableGridX, id=2151)
478
+ self.Bind(wx.EVT_MENU, self.OnEnableGridY, id=2152)
479
+ self.Bind(wx.EVT_MENU, self.OnEnableGridAll, id=2153)
480
+
481
+ menu.AppendSubMenu(submenu, 'Enable Grid', 'Turn on Grid')
482
+
483
+ ### SubMenu for Axes
484
+ submenu = wx.Menu()
485
+ submenu_items = ("Bottom", "Left", "Top", "Right",
486
+ "Bottom+Left", "All")
487
+ self.axesSubMenu = submenu
488
+ for _i, item in enumerate(submenu_items, 2401):
489
+ submenu.AppendCheckItem(_i, item, "Enables {} axis".format(item))
490
+ submenu.Check(_i, True)
491
+
492
+ self.Bind(wx.EVT_MENU, self.OnEnableAxesBottom, id=2401)
493
+ self.Bind(wx.EVT_MENU, self.OnEnableAxesLeft, id=2402)
494
+ self.Bind(wx.EVT_MENU, self.OnEnableAxesTop, id=2403)
495
+ self.Bind(wx.EVT_MENU, self.OnEnableAxesRight, id=2404)
496
+ self.Bind(wx.EVT_MENU, self.OnEnableAxesBottomLeft, id=2405)
497
+ self.Bind(wx.EVT_MENU, self.OnEnableAxesAll, id=2406)
498
+
499
+ menu.AppendSubMenu(submenu, 'Enable Axes', 'Enables the display of the Axes')
500
+
501
+ submenu = wx.Menu()
502
+ submenu_items = ("Bottom", "Left", "Top", "Right")
503
+ help_txt = "Enables {} axis values"
504
+ self.axesValuesSubMenu = submenu
505
+ for _i, item in enumerate(submenu_items, 2451):
506
+ submenu.AppendCheckItem(_i, item, help_txt.format(item))
507
+
508
+ submenu.Check(2451, True)
509
+ submenu.Check(2452, True)
510
+ submenu.Check(2453, False)
511
+ submenu.Check(2454, False)
512
+
513
+ self.Bind(wx.EVT_MENU, self.OnEnableAxesValuesBottom, id=2451)
514
+ self.Bind(wx.EVT_MENU, self.OnEnableAxesValuesLeft, id=2452)
515
+ self.Bind(wx.EVT_MENU, self.OnEnableAxesValuesTop, id=2453)
516
+ self.Bind(wx.EVT_MENU, self.OnEnableAxesValuesRight, id=2454)
517
+
518
+ menu.AppendSubMenu(submenu, 'Enable Axes Values', 'Enables the display of the axes values')
519
+
520
+ submenu = wx.Menu()
521
+ submenu_items = ("Bottom", "Left", "Top", "Right",
522
+ "Bottom+Left", "All")
523
+ help_txt = "Enables {} ticks"
524
+ self.ticksSubMenu = submenu
525
+ for _i, item in enumerate(submenu_items, 2501):
526
+ submenu.AppendCheckItem(_i, item, help_txt.format(item))
527
+
528
+ submenu.Check(2501, False)
529
+ submenu.Check(2502, False)
530
+ submenu.Check(2503, False)
531
+ submenu.Check(2504, False)
532
+
533
+ self.Bind(wx.EVT_MENU, self.OnEnableTicksBottom, id=2501)
534
+ self.Bind(wx.EVT_MENU, self.OnEnableTicksLeft, id=2502)
535
+ self.Bind(wx.EVT_MENU, self.OnEnableTicksTop, id=2503)
536
+ self.Bind(wx.EVT_MENU, self.OnEnableTicksRight, id=2504)
537
+ self.Bind(wx.EVT_MENU, self.OnEnableTicksBottomLeft, id=2505)
538
+ self.Bind(wx.EVT_MENU, self.OnEnableTicksAll, id=2506)
539
+
540
+ menu.AppendSubMenu(submenu, 'Enable Ticks','Enables the display of the ticks')
541
+
542
+ menu.Append(255, 'Enable Plot Title',
543
+ 'Enables the plot title', kind=wx.ITEM_CHECK)
544
+ self.Bind(wx.EVT_MENU, self.OnEnablePlotTitle, id=255)
545
+ menu.Check(255, True)
546
+
547
+ menu.Append(270, 'Enable Axes Labels',
548
+ 'Enables the X and Y axes labels', kind=wx.ITEM_CHECK)
549
+ self.Bind(wx.EVT_MENU, self.OnEnableAxesLabels, id=270)
550
+ menu.Check(270, True)
551
+
552
+ menu.Append(271, 'Enable Log-Y',
553
+ 'Changes the Y axis to log10 scale', kind=wx.ITEM_CHECK)
554
+ self.Bind(wx.EVT_MENU, self.OnLogY, id=271)
555
+ menu.Append(272, 'Enable Log-X',
556
+ 'Changes the X axis to log10 scale', kind=wx.ITEM_CHECK)
557
+ self.Bind(wx.EVT_MENU, self.OnLogX, id=272)
558
+
559
+ menu.Append(273, 'Enable Abs(X)',
560
+ 'Applies absolute value transform to X axis',
561
+ kind=wx.ITEM_CHECK)
562
+ self.Bind(wx.EVT_MENU, self.OnAbsX, id=273)
563
+ menu.Append(274, 'Enable Abs(Y)',
564
+ 'Applies absolute value transform to Y axis',
565
+ kind=wx.ITEM_CHECK)
566
+ self.Bind(wx.EVT_MENU, self.OnAbsY, id=274)
567
+
568
+ menu.AppendSeparator()
569
+
570
+ menu.Append(231, 'Set Gray Background',
571
+ 'Change background colour to gray')
572
+ self.Bind(wx.EVT_MENU, self.OnBackgroundGray, id=231)
573
+ menu.Append(232, 'Set &White Background',
574
+ 'Change background colour to white')
575
+ self.Bind(wx.EVT_MENU, self.OnBackgroundWhite, id=232)
576
+ menu.Append(233, 'Set Red Label Text',
577
+ 'Change label text colour to red')
578
+ self.Bind(wx.EVT_MENU, self.OnForegroundRed, id=233)
579
+ menu.Append(234, 'Set &Black Label Text',
580
+ 'Change label text colour to black')
581
+ self.Bind(wx.EVT_MENU, self.OnForegroundBlack, id=234)
582
+
583
+ self.mainmenu.Append(menu, '&Options')
584
+
585
+ self.plot_options_menu = menu
586
+
587
+ def _init_help_menu(self):
588
+ """ Create the "Help" menu items. """
589
+ menu = wx.Menu()
590
+ menu.Append(wx.ID_ABOUT, '&About', 'About this thing...')
591
+ self.Bind(wx.EVT_MENU, self.OnHelpAbout, id=wx.ID_ABOUT)
592
+ self.mainmenu.Append(menu, '&Help')
593
+
594
+ # -----------------------------------------------------------------------
595
+ ### Event Handling
596
+ # -----------------------------------------------------------------------
597
+
598
+
599
+ def OnMouseLeftDown(self, event):
600
+ s = "Left Mouse Down at Point: (%.4f, %.4f)" % self.client.GetXY(
601
+ event)
602
+ self.SetStatusText(s)
603
+ event.Skip() # allows plotCanvas OnMouseLeftDown to be called
604
+
605
+ def OnMotion(self, event):
606
+ # show closest point (when enbled)
607
+ if self.client.enablePointLabel:
608
+ # make up dict with info for the pointLabel
609
+ # I've decided to mark the closest point on the closest curve
610
+ dlst = self.client.GetClosestPoint(
611
+ self.client.GetXY(event),
612
+ pointScaled=True,
613
+ )
614
+ if dlst != []: # returns [] if none
615
+ curveNum, legend, pIndex, pointXY, scaledXY, distance = dlst
616
+ # make up dictionary to pass to my user function (see
617
+ # DrawPointLabel)
618
+ mDataDict = {"curveNum": curveNum,
619
+ "legend": legend,
620
+ "pIndex": pIndex,
621
+ "pointXY": pointXY,
622
+ "scaledXY": scaledXY}
623
+ # pass dict to update the pointLabel
624
+ self.client.UpdatePointLabel(mDataDict)
625
+ event.Skip() # go to next handler
626
+
627
+ def OnFilePageSetup(self, event):
628
+ self.client.PageSetup()
629
+
630
+ def OnFilePrintPreview(self, event):
631
+ self.client.PrintPreview()
632
+
633
+ def OnFilePrint(self, event):
634
+ self.client.Printout()
635
+
636
+ def OnSaveFile(self, event):
637
+ self.client.SaveFile()
638
+
639
+ def OnFileExit(self, event):
640
+ self.Close()
641
+
642
+
643
+ # -----------------------------------------------------------------------
644
+ ### PlotDraw Events
645
+ # -----------------------------------------------------------------------
646
+ def OnPlotDraw1(self, event):
647
+ """ Sin, Cos, and Points """
648
+ self.resetDefaults()
649
+ self.client.Draw(_draw1Objects())
650
+
651
+ def OnPlotDraw2(self, event):
652
+ """ Sin, Cos, Points, and lines between points """
653
+ self.resetDefaults()
654
+ self.client.Draw(_draw2Objects())
655
+
656
+ def OnPlotDraw3(self, event):
657
+ """ Various Marker Types """
658
+ self.resetDefaults()
659
+ self.client.SetFont(wx.Font(10,
660
+ wx.FONTFAMILY_SCRIPT,
661
+ wx.FONTSTYLE_NORMAL,
662
+ wx.FONTWEIGHT_NORMAL)
663
+ )
664
+ self.client.fontSizeAxis = 20
665
+ self.client.fontSizeLegend = 12
666
+ self.client.xSpec = 'min'
667
+ self.client.ySpec = 'none'
668
+ self.client.Draw(_draw3Objects())
669
+
670
+ def OnPlotDraw4(self, event):
671
+ """ 25,000 point line and markers """
672
+ self.resetDefaults()
673
+ drawObj = _draw4Objects()
674
+ self.client.Draw(drawObj)
675
+ # profile
676
+ # start = _time.perf_counter()
677
+ # for x in range(10):
678
+ # self.client.Draw(drawObj)
679
+ ## print("10x of Draw4 took: %f sec."%(_time.perf_counter() - start))
680
+ # profile end
681
+
682
+ def OnPlotDraw5(self, event):
683
+ """ Empty plot with just axes """
684
+ self.resetDefaults()
685
+ drawObj = _draw5Objects()
686
+ # make the axis X= (0,5), Y=(0,10)
687
+ # (default with None is X= (-1,1), Y= (-1,1))
688
+ self.client.Draw(drawObj, xAxis=(0, 5), yAxis=(0, 10))
689
+
690
+ def OnPlotDraw6(self, event):
691
+ """ Bar Graph Example """
692
+ self.resetDefaults()
693
+ # self.client.SetEnableLegend(True) #turn on Legend
694
+ # self.client.SetEnableGrid(True) #turn on Grid
695
+ self.client.xSpec = 'none'
696
+ self.client.ySpec = 'auto'
697
+ self.client.Draw(_draw6Objects(), xAxis=(0, 7))
698
+
699
+ def OnPlotDraw7(self, event):
700
+ """ log scale example """
701
+ self.resetDefaults()
702
+ self.plot_options_menu.Check(271, True)
703
+ self.plot_options_menu.Check(272, True)
704
+ self.client.logScale = (True, True)
705
+ self.client.Draw(_draw7Objects())
706
+
707
+ def OnPlotDraw8(self, event):
708
+ """ Box Plot example """
709
+ self.resetDefaults()
710
+ self.client.Draw(_draw8Objects())
711
+
712
+ def OnPlotDraw9(self, event):
713
+ """ Histogram example """
714
+ self.resetDefaults()
715
+ self.client.Draw(_draw9Objects())
716
+
717
+ def OnPlotDraw10(self, event):
718
+ """ Bar Chart example """
719
+ self.resetDefaults()
720
+ self.client.Draw(_draw10Objects())
721
+
722
+ def OnPlotRedraw(self, event):
723
+ self.client.Redraw()
724
+
725
+ def OnPlotClear(self, event):
726
+ self.client.Clear()
727
+
728
+ def OnPlotScale(self, event):
729
+ if self.client.last_draw is not None:
730
+ graphics, xAxis, yAxis = self.client.last_draw
731
+ self.client.Draw(graphics, (1, 3.05), (0, 1))
732
+
733
+ # -----------------------------------------------------------------------
734
+ ### Other Events
735
+ # -----------------------------------------------------------------------
736
+ def OnScrUp(self, event):
737
+ self.client.ScrollUp(1)
738
+
739
+ def OnScrRt(self, event):
740
+ self.client.ScrollRight(2)
741
+
742
+ def OnReset(self, event):
743
+ self.client.Reset()
744
+
745
+ def OnHelpAbout(self, event):
746
+ from wx.lib.dialogs import ScrolledMessageDialog
747
+ about = ScrolledMessageDialog(self, __doc__, "About...")
748
+ about.ShowModal()
749
+
750
+ def OnBackgroundGray(self, event):
751
+ self.client.SetBackgroundColour("#CCCCCC")
752
+ self.client.Redraw()
753
+
754
+ def OnBackgroundWhite(self, event):
755
+ self.client.SetBackgroundColour("white")
756
+ self.client.Redraw()
757
+
758
+ def OnForegroundRed(self, event):
759
+ self.client.SetForegroundColour("red")
760
+ self.client.Redraw()
761
+
762
+ def OnForegroundBlack(self, event):
763
+ self.client.SetForegroundColour("black")
764
+ self.client.Redraw()
765
+
766
+ # -----------------------------------------------------------------------
767
+ ### Enable Grid Events
768
+ # -----------------------------------------------------------------------
769
+ def _checkOtherGridMenuItems(self):
770
+ """ check or uncheck the submenu items """
771
+ self.gridSubMenu.Check(2151, self.client.enableGrid[0])
772
+ self.gridSubMenu.Check(2152, self.client.enableGrid[1])
773
+ self.gridSubMenu.Check(2153, all(self.client.enableGrid))
774
+
775
+ def OnEnableGridX(self, event):
776
+ old = self.client.enableGrid
777
+ self.client.enableGrid = (event.IsChecked(), old[1])
778
+ self._checkOtherGridMenuItems()
779
+
780
+ def OnEnableGridY(self, event):
781
+ old = self.client.enableGrid
782
+ self.client.enableGrid = (old[0], event.IsChecked())
783
+ self._checkOtherGridMenuItems()
784
+
785
+ def OnEnableGridAll(self, event):
786
+ self.client.enableGrid = event.IsChecked()
787
+ self._checkOtherGridMenuItems()
788
+ self.gridSubMenu.Check(2151, event.IsChecked())
789
+ self.gridSubMenu.Check(2152, event.IsChecked())
790
+
791
+ # -----------------------------------------------------------------------
792
+ ### Enable Axes Events
793
+ # -----------------------------------------------------------------------
794
+ def _checkOtherAxesMenuItems(self):
795
+ """ check or uncheck the submenu items """
796
+ self.axesSubMenu.Check(2401, self.client.enableAxes[0])
797
+ self.axesSubMenu.Check(2402, self.client.enableAxes[1])
798
+ self.axesSubMenu.Check(2403, self.client.enableAxes[2])
799
+ self.axesSubMenu.Check(2404, self.client.enableAxes[3])
800
+ self.axesSubMenu.Check(2405, all(self.client.enableAxes[:2]))
801
+ self.axesSubMenu.Check(2406, all(self.client.enableAxes))
802
+
803
+ def OnEnableAxesBottom(self, event):
804
+ old = self.client.enableAxes
805
+ self.client.enableAxes = (event.IsChecked(), old[1], old[2], old[3])
806
+ self._checkOtherAxesMenuItems()
807
+
808
+ def OnEnableAxesLeft(self, event):
809
+ old = self.client.enableAxes
810
+ self.client.enableAxes = (old[0], event.IsChecked(), old[2], old[3])
811
+ self._checkOtherAxesMenuItems()
812
+
813
+ def OnEnableAxesTop(self, event):
814
+ old = self.client.enableAxes
815
+ self.client.enableAxes = (old[0], old[1], event.IsChecked(), old[3])
816
+ self._checkOtherAxesMenuItems()
817
+
818
+ def OnEnableAxesRight(self, event):
819
+ old = self.client.enableAxes
820
+ self.client.enableAxes = (old[0], old[1], old[2], event.IsChecked())
821
+ self._checkOtherAxesMenuItems()
822
+
823
+ def OnEnableAxesBottomLeft(self, event):
824
+ checked = event.IsChecked()
825
+ old = self.client.enableAxes
826
+ self.client.enableAxes = (checked, checked, old[2], old[3])
827
+ self._checkOtherAxesMenuItems()
828
+
829
+ def OnEnableAxesAll(self, event):
830
+ checked = event.IsChecked()
831
+ self.client.enableAxes = (checked, checked, checked, checked)
832
+ self._checkOtherAxesMenuItems()
833
+
834
+ # -----------------------------------------------------------------------
835
+ ### Enable Ticks Events
836
+ # -----------------------------------------------------------------------
837
+ def _checkOtherTicksMenuItems(self):
838
+ """ check or uncheck the submenu items """
839
+ self.ticksSubMenu.Check(2501, self.client.enableTicks[0])
840
+ self.ticksSubMenu.Check(2502, self.client.enableTicks[1])
841
+ self.ticksSubMenu.Check(2503, self.client.enableTicks[2])
842
+ self.ticksSubMenu.Check(2504, self.client.enableTicks[3])
843
+ self.ticksSubMenu.Check(2505, all(self.client.enableTicks[:2]))
844
+ self.ticksSubMenu.Check(2506, all(self.client.enableTicks))
845
+
846
+ def OnEnableTicksBottom(self, event):
847
+ old = self.client.enableTicks
848
+ self.client.enableTicks = (event.IsChecked(), old[1],
849
+ old[2], old[3])
850
+ self._checkOtherTicksMenuItems()
851
+
852
+ def OnEnableTicksLeft(self, event):
853
+ old = self.client.enableTicks
854
+ self.client.enableTicks = (old[0], event.IsChecked(),
855
+ old[2], old[3])
856
+ self._checkOtherTicksMenuItems()
857
+
858
+ def OnEnableTicksTop(self, event):
859
+ old = self.client.enableTicks
860
+ self.client.enableTicks = (old[0], old[1],
861
+ event.IsChecked(), old[3])
862
+ self._checkOtherTicksMenuItems()
863
+
864
+ def OnEnableTicksRight(self, event):
865
+ old = self.client.enableTicks
866
+ self.client.enableTicks = (old[0], old[1],
867
+ old[2], event.IsChecked())
868
+ self._checkOtherTicksMenuItems()
869
+
870
+ def OnEnableTicksBottomLeft(self, event):
871
+ checked = event.IsChecked()
872
+ old = self.client.enableTicks
873
+ self.client.enableTicks = (checked, checked, old[2], old[3])
874
+ self._checkOtherTicksMenuItems()
875
+
876
+ def OnEnableTicksAll(self, event):
877
+ checked = event.IsChecked()
878
+ self.client.enableTicks = tuple([checked] * 4)
879
+ self._checkOtherTicksMenuItems()
880
+
881
+ # -----------------------------------------------------------------------
882
+ ### Enable AxesValues Events
883
+ # -----------------------------------------------------------------------
884
+ def OnEnableAxesValuesBottom(self, event):
885
+ old = self.client.enableAxesValues
886
+ self.client.enableAxesValues = (event.IsChecked(), old[1],
887
+ old[2], old[3])
888
+
889
+ def OnEnableAxesValuesLeft(self, event):
890
+ old = self.client.enableAxesValues
891
+ self.client.enableAxesValues = (old[0], event.IsChecked(),
892
+ old[2], old[3])
893
+
894
+ def OnEnableAxesValuesTop(self, event):
895
+ old = self.client.enableAxesValues
896
+ self.client.enableAxesValues = (old[0], old[1],
897
+ event.IsChecked(), old[3])
898
+
899
+ def OnEnableAxesValuesRight(self, event):
900
+ old = self.client.enableAxesValues
901
+ self.client.enableAxesValues = (old[0], old[1],
902
+ old[2], event.IsChecked())
903
+
904
+ # -----------------------------------------------------------------------
905
+ ### Other Enable Events
906
+ # -----------------------------------------------------------------------
907
+ def OnEnableZoom(self, event):
908
+ self.client.enableZoom = event.IsChecked()
909
+ if self.mainmenu.IsChecked(217):
910
+ self.mainmenu.Check(217, False)
911
+
912
+ def OnEnableDrag(self, event):
913
+ self.client.enableDrag = event.IsChecked()
914
+ if self.mainmenu.IsChecked(214):
915
+ self.mainmenu.Check(214, False)
916
+
917
+ def OnEnableScrollbars(self, event):
918
+ self.client.showScrollbars = event.IsChecked()
919
+
920
+ def OnEnableLegend(self, event):
921
+ self.client.enableLegend = event.IsChecked()
922
+
923
+ def OnEnablePointLabel(self, event):
924
+ self.client.enablePointLabel = event.IsChecked()
925
+
926
+ def OnEnableAntiAliasing(self, event):
927
+ self.client.enableAntiAliasing = event.IsChecked()
928
+
929
+ def OnEnableHiRes(self, event):
930
+ self.client.enableHiRes = event.IsChecked()
931
+
932
+ def OnEnablePlotTitle(self, event):
933
+ self.client.enablePlotTitle = event.IsChecked()
934
+
935
+ def OnEnableAxesLabels(self, event):
936
+ self.client.enableAxesLabels = event.IsChecked()
937
+
938
+ def OnEnableCenterLines(self, event):
939
+ self.client.enableCenterLines = event.IsChecked()
940
+
941
+ def OnEnableDiagonals(self, event):
942
+ self.client.enableDiagonals = event.IsChecked()
943
+
944
+ def OnLogX(self, event):
945
+ self.client.logScale = (event.IsChecked(), self.client.logScale[1])
946
+ self.client.Redraw()
947
+
948
+ def OnLogY(self, event):
949
+ self.client.logScale = (self.client.logScale[0], event.IsChecked())
950
+ self.client.Redraw()
951
+
952
+ def OnAbsX(self, event):
953
+ self.client.absScale = (event.IsChecked(), self.client.absScale[1])
954
+ self.client.Redraw()
955
+
956
+ def OnAbsY(self, event):
957
+ self.client.absScale = (self.client.absScale[0], event.IsChecked())
958
+ self.client.Redraw()
959
+
960
+ def resetDefaults(self):
961
+ """Just to reset the fonts back to the PlotCanvas defaults"""
962
+ self.client.SetFont(wx.Font(10,
963
+ wx.FONTFAMILY_SWISS,
964
+ wx.FONTSTYLE_NORMAL,
965
+ wx.FONTWEIGHT_NORMAL)
966
+ )
967
+ self.client.fontSizeAxis = 10
968
+ self.client.fontSizeLegend = 7
969
+ self.client.logScale = (False, False)
970
+ self.client.xSpec = 'auto'
971
+ self.client.ySpec = 'auto'
972
+
973
+ def DrawPointLabel(self, dc, mDataDict):
974
+ """
975
+ This is the function that defines how the pointLabels are plotted
976
+
977
+ :param dc: DC that will be passed
978
+ :param mDataDict: Dictionary of data that you want to use
979
+ for the pointLabel
980
+
981
+ As an example I have decided I want a box at the curve point
982
+ with some text information about the curve plotted below.
983
+ Any wxDC method can be used.
984
+
985
+ """
986
+ dc.SetPen(wx.Pen(wx.BLACK))
987
+ dc.SetBrush(wx.Brush(wx.BLACK, wx.BRUSHSTYLE_SOLID))
988
+
989
+ sx, sy = mDataDict["scaledXY"] # scaled x,y of closest point
990
+ # 10by10 square centered on point
991
+ dc.DrawRectangle(int(sx - 5), int(sy - 5), 10, 10)
992
+ px, py = mDataDict["pointXY"]
993
+ cNum = mDataDict["curveNum"]
994
+ pntIn = mDataDict["pIndex"]
995
+ legend = mDataDict["legend"]
996
+ # make a string to display
997
+ s = "Crv# %i, '%s', Pt. (%.2f,%.2f), PtInd %i" % (
998
+ cNum, legend, px, py, pntIn)
999
+ dc.DrawText(s, int(sx), int(sy + 1))
1000
+
1001
+
1002
+ def run_demo():
1003
+ """
1004
+ Run the :mod:`wx.lib.plot` demo application.
1005
+ """
1006
+ PlotDemoApp()
1007
+
1008
+
1009
+ if __name__ == '__main__':
1010
+ run_demo()