wxPython-zombie 3.1.5.8__cp313-cp313-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 (1175) hide show
  1. wx/__init__.py +22 -0
  2. wx/__version__.py +9 -0
  3. wx/_adv.cp313-win_amd64.pyd +0 -0
  4. wx/_aui.cp313-win_amd64.pyd +0 -0
  5. wx/_core.cp313-win_amd64.pyd +0 -0
  6. wx/_dataview.cp313-win_amd64.pyd +0 -0
  7. wx/_glcanvas.cp313-win_amd64.pyd +0 -0
  8. wx/_grid.cp313-win_amd64.pyd +0 -0
  9. wx/_html.cp313-win_amd64.pyd +0 -0
  10. wx/_html2.cp313-win_amd64.pyd +0 -0
  11. wx/_media.cp313-win_amd64.pyd +0 -0
  12. wx/_msw.cp313-win_amd64.pyd +0 -0
  13. wx/_propgrid.cp313-win_amd64.pyd +0 -0
  14. wx/_ribbon.cp313-win_amd64.pyd +0 -0
  15. wx/_richtext.cp313-win_amd64.pyd +0 -0
  16. wx/_stc.cp313-win_amd64.pyd +0 -0
  17. wx/_xml.cp313-win_amd64.pyd +0 -0
  18. wx/_xrc.cp313-win_amd64.pyd +0 -0
  19. wx/adv.py +124 -0
  20. wx/adv.pyi +5182 -0
  21. wx/aui.py +77 -0
  22. wx/aui.pyi +3655 -0
  23. wx/core.py +3540 -0
  24. wx/core.pyi +50592 -0
  25. wx/dataview.py +173 -0
  26. wx/dataview.pyi +3491 -0
  27. wx/demo/AUI_DockingWindowMgr.py +1154 -0
  28. wx/demo/AUI_MDI.py +117 -0
  29. wx/demo/AUI_Notebook.py +58 -0
  30. wx/demo/About.py +75 -0
  31. wx/demo/AboutBox.py +75 -0
  32. wx/demo/ActiveXWrapper_Acrobat.py +132 -0
  33. wx/demo/ActiveXWrapper_IE.py +187 -0
  34. wx/demo/ActiveX_FlashWindow.py +107 -0
  35. wx/demo/ActiveX_IEHtmlWindow.py +242 -0
  36. wx/demo/ActiveX_PDFWindow.py +204 -0
  37. wx/demo/ActivityIndicator.py +80 -0
  38. wx/demo/AddPrivateFont.py +116 -0
  39. wx/demo/AdjustChannels.py +178 -0
  40. wx/demo/AlphaDrawing.py +77 -0
  41. wx/demo/AnalogClock.py +144 -0
  42. wx/demo/AnimationCtrl.py +104 -0
  43. wx/demo/ArtProvider.py +893 -0
  44. wx/demo/BannerWindow.py +1 -0
  45. wx/demo/BitmapButton.py +87 -0
  46. wx/demo/BitmapComboBox.py +63 -0
  47. wx/demo/BitmapFromBuffer.py +140 -0
  48. wx/demo/Button.py +77 -0
  49. wx/demo/Cairo.py +197 -0
  50. wx/demo/Cairo_Snippets.py +135 -0
  51. wx/demo/Calendar.py +660 -0
  52. wx/demo/CalendarCtrl.py +122 -0
  53. wx/demo/CheckBox.py +74 -0
  54. wx/demo/CheckListBox.py +79 -0
  55. wx/demo/CheckListCtrl.py +99 -0
  56. wx/demo/Choice.py +55 -0
  57. wx/demo/Choicebook.py +80 -0
  58. wx/demo/CollapsibleHeaderCtrl.py +85 -0
  59. wx/demo/CollapsiblePane.py +126 -0
  60. wx/demo/ColorPanel.py +19 -0
  61. wx/demo/ColourDB.py +203 -0
  62. wx/demo/ColourDialog.py +76 -0
  63. wx/demo/ColourSelect.py +119 -0
  64. wx/demo/ComboBox.py +111 -0
  65. wx/demo/ComboCtrl.py +153 -0
  66. wx/demo/ComboTreeBox.py +71 -0
  67. wx/demo/CommandLinkButton.py +50 -0
  68. wx/demo/ContextHelp.py +112 -0
  69. wx/demo/Cursor.py +336 -0
  70. wx/demo/CustomDragAndDrop.py +353 -0
  71. wx/demo/DVC_CustomRenderer.py +204 -0
  72. wx/demo/DVC_DataViewModel.py +365 -0
  73. wx/demo/DVC_IndexListModel.py +257 -0
  74. wx/demo/DVC_ListCtrl.py +69 -0
  75. wx/demo/DVC_TreeCtrl.py +76 -0
  76. wx/demo/DatePickerCtrl.py +68 -0
  77. wx/demo/DelayedResult.py +239 -0
  78. wx/demo/Dialog.py +169 -0
  79. wx/demo/DialogUnits.py +128 -0
  80. wx/demo/DirDialog.py +58 -0
  81. wx/demo/DragAndDrop.py +265 -0
  82. wx/demo/DragImage.py +316 -0
  83. wx/demo/DragScroller.py +59 -0
  84. wx/demo/DrawXXXList.py +436 -0
  85. wx/demo/DynamicSashWindow.py +177 -0
  86. wx/demo/EditableListBox.py +101 -0
  87. wx/demo/Editor.py +70 -0
  88. wx/demo/EventManager.py +291 -0
  89. wx/demo/ExpandoTextCtrl.py +164 -0
  90. wx/demo/FancyText.py +83 -0
  91. wx/demo/FileBrowseButton.py +100 -0
  92. wx/demo/FileCtrl.py +97 -0
  93. wx/demo/FileDialog.py +144 -0
  94. wx/demo/FileHistory.py +140 -0
  95. wx/demo/FindReplaceDialog.py +123 -0
  96. wx/demo/FloatCanvas.py +1959 -0
  97. wx/demo/FontDialog.py +142 -0
  98. wx/demo/FontEnumerator.py +82 -0
  99. wx/demo/Frame.py +85 -0
  100. wx/demo/GLCanvas.py +371 -0
  101. wx/demo/Gauge.py +66 -0
  102. wx/demo/GenericButtons.py +185 -0
  103. wx/demo/GenericCheckBox.py +65 -0
  104. wx/demo/GenericDirCtrl.py +74 -0
  105. wx/demo/GetMouseState.py +159 -0
  106. wx/demo/GraphicsContext.py +236 -0
  107. wx/demo/GraphicsGradient.py +281 -0
  108. wx/demo/Grid.py +95 -0
  109. wx/demo/GridBagSizer.py +170 -0
  110. wx/demo/GridCustEditor.py +247 -0
  111. wx/demo/GridCustTable.py +170 -0
  112. wx/demo/GridDragAndDrop.py +102 -0
  113. wx/demo/GridDragable.py +206 -0
  114. wx/demo/GridEnterHandler.py +66 -0
  115. wx/demo/GridHugeTable.py +89 -0
  116. wx/demo/GridLabelRenderer.py +114 -0
  117. wx/demo/GridSimple.py +270 -0
  118. wx/demo/GridStdEdRend.py +186 -0
  119. wx/demo/Grid_MegaExample.py +490 -0
  120. wx/demo/HTML2_WebView.py +183 -0
  121. wx/demo/HtmlWindow.py +232 -0
  122. wx/demo/I18N.py +237 -0
  123. wx/demo/Image.py +338 -0
  124. wx/demo/ImageAlpha.py +87 -0
  125. wx/demo/ImageBrowser.py +70 -0
  126. wx/demo/ImageFromStream.py +49 -0
  127. wx/demo/Img2PyArtProvider.py +99 -0
  128. wx/demo/InfoBar.py +127 -0
  129. wx/demo/IntCtrl.py +343 -0
  130. wx/demo/ItemsPicker.py +108 -0
  131. wx/demo/Joystick.py +1083 -0
  132. wx/demo/KeyEvents.py +428 -0
  133. wx/demo/LEDNumberCtrl.py +121 -0
  134. wx/demo/LayoutAnchors.py +258 -0
  135. wx/demo/LayoutConstraints.py +149 -0
  136. wx/demo/Layoutf.py +69 -0
  137. wx/demo/ListBox.py +164 -0
  138. wx/demo/ListCtrl.py +538 -0
  139. wx/demo/ListCtrl_edit.py +155 -0
  140. wx/demo/ListCtrl_virtual.py +145 -0
  141. wx/demo/Listbook.py +104 -0
  142. wx/demo/MDIDemo.py +86 -0
  143. wx/demo/MDISashDemo.py +152 -0
  144. wx/demo/MDIWindows.py +66 -0
  145. wx/demo/Main.py +2768 -0
  146. wx/demo/Mask.py +137 -0
  147. wx/demo/MaskedEditControls.py +648 -0
  148. wx/demo/MaskedNumCtrl.py +359 -0
  149. wx/demo/MediaCtrl.py +190 -0
  150. wx/demo/Menu.py +322 -0
  151. wx/demo/MessageDialog.py +54 -0
  152. wx/demo/MimeTypesManager.py +354 -0
  153. wx/demo/MiniFrame.py +67 -0
  154. wx/demo/MouseGestures.py +198 -0
  155. wx/demo/MultiChoiceDialog.py +59 -0
  156. wx/demo/MultiSash.py +95 -0
  157. wx/demo/MultiSplitterWindow.py +168 -0
  158. wx/demo/MultipleChoiceDialog.py +101 -0
  159. wx/demo/Notebook.py +134 -0
  160. wx/demo/NotificationMessage.py +61 -0
  161. wx/demo/OGL.py +433 -0
  162. wx/demo/Overlay.py +209 -0
  163. wx/demo/OwnerDrawnComboBox.py +152 -0
  164. wx/demo/PDFViewer.py +109 -0
  165. wx/demo/PageSetupDialog.py +70 -0
  166. wx/demo/PenAndBrushStyles.py +208 -0
  167. wx/demo/Pickers.py +120 -0
  168. wx/demo/PlateButton.py +430 -0
  169. wx/demo/PopupControl.py +99 -0
  170. wx/demo/PopupMenu.py +156 -0
  171. wx/demo/PopupWindow.py +227 -0
  172. wx/demo/PrintDialog.py +60 -0
  173. wx/demo/PrintFramework.py +227 -0
  174. wx/demo/Process.py +168 -0
  175. wx/demo/ProgressDialog.py +87 -0
  176. wx/demo/PropertyGrid.py +1045 -0
  177. wx/demo/PropertySheetDialog.py +231 -0
  178. wx/demo/PseudoDC.py +350 -0
  179. wx/demo/PyColourChooser.py +60 -0
  180. wx/demo/PyCrust.py +21 -0
  181. wx/demo/PyPlot.py +83 -0
  182. wx/demo/PyShell.py +22 -0
  183. wx/demo/PythonEvents.py +109 -0
  184. wx/demo/README.txt +7 -0
  185. wx/demo/RadioBox.py +67 -0
  186. wx/demo/RadioButton.py +127 -0
  187. wx/demo/RawBitmapAccess.py +208 -0
  188. wx/demo/RearrangeDialog.py +160 -0
  189. wx/demo/RendererNative.py +170 -0
  190. wx/demo/ResizeWidget.py +76 -0
  191. wx/demo/RichMessageDialog.py +85 -0
  192. wx/demo/RichTextCtrl.py +732 -0
  193. wx/demo/RichToolTip.py +145 -0
  194. wx/demo/SVGImage_Bitmap.py +130 -0
  195. wx/demo/SVGImage_Render.py +138 -0
  196. wx/demo/SashWindow.py +151 -0
  197. wx/demo/ScrolledMessageDialog.py +52 -0
  198. wx/demo/ScrolledPanel.py +124 -0
  199. wx/demo/ScrolledWindow.py +260 -0
  200. wx/demo/SearchCtrl.py +115 -0
  201. wx/demo/ShapedWindow.py +145 -0
  202. wx/demo/Simplebook.py +202 -0
  203. wx/demo/SingleChoiceDialog.py +56 -0
  204. wx/demo/SizedControls.py +433 -0
  205. wx/demo/Sizers.py +609 -0
  206. wx/demo/Slider.py +52 -0
  207. wx/demo/Sound.py +95 -0
  208. wx/demo/SpinButton.py +63 -0
  209. wx/demo/SpinCtrl.py +56 -0
  210. wx/demo/SpinCtrlDouble.py +42 -0
  211. wx/demo/SplitTree.py +146 -0
  212. wx/demo/SplitterWindow.py +62 -0
  213. wx/demo/StandardPaths.py +113 -0
  214. wx/demo/StaticBitmap.py +55 -0
  215. wx/demo/StaticBox.py +62 -0
  216. wx/demo/StaticText.py +69 -0
  217. wx/demo/StatusBar.py +144 -0
  218. wx/demo/StockButtons.py +113 -0
  219. wx/demo/StyledTextCtrl_1.py +303 -0
  220. wx/demo/StyledTextCtrl_2.py +410 -0
  221. wx/demo/SystemSettings.py +333 -0
  222. wx/demo/TablePrint.py +215 -0
  223. wx/demo/TestTable.txt +38 -0
  224. wx/demo/TextCtrl.py +187 -0
  225. wx/demo/TextEntryDialog.py +57 -0
  226. wx/demo/Threads.py +258 -0
  227. wx/demo/Throbber.py +250 -0
  228. wx/demo/Ticker.py +147 -0
  229. wx/demo/TimeCtrl.py +240 -0
  230. wx/demo/TimePickerCtrl.py +60 -0
  231. wx/demo/Timer.py +275 -0
  232. wx/demo/ToggleButton.py +54 -0
  233. wx/demo/ToolBar.py +249 -0
  234. wx/demo/ToolTip.py +71 -0
  235. wx/demo/Toolbook.py +111 -0
  236. wx/demo/TreeCtrl.py +199 -0
  237. wx/demo/TreeListCtrl.py +121 -0
  238. wx/demo/TreeMixin.py +269 -0
  239. wx/demo/Treebook.py +117 -0
  240. wx/demo/UIActionSimulator.py +151 -0
  241. wx/demo/URLDragAndDrop.py +130 -0
  242. wx/demo/Unicode.py +146 -0
  243. wx/demo/VListBox.py +176 -0
  244. wx/demo/Validator.py +237 -0
  245. wx/demo/Wizard.py +248 -0
  246. wx/demo/WrapSizer.py +115 -0
  247. wx/demo/XmlResource.py +80 -0
  248. wx/demo/XmlResourceHandler.py +199 -0
  249. wx/demo/XmlResourceSubclass.py +119 -0
  250. wx/demo/__init__.py +9 -0
  251. wx/demo/agw/AGWInfoBar.py +175 -0
  252. wx/demo/agw/AUI.py +3058 -0
  253. wx/demo/agw/AdvancedSplash.py +59 -0
  254. wx/demo/agw/AquaButton.py +146 -0
  255. wx/demo/agw/BalloonTip.py +378 -0
  256. wx/demo/agw/ButtonPanel.py +890 -0
  257. wx/demo/agw/CubeColourDialog.py +83 -0
  258. wx/demo/agw/CustomTreeCtrl.py +2167 -0
  259. wx/demo/agw/Example1 +67 -0
  260. wx/demo/agw/Example2 +49 -0
  261. wx/demo/agw/FlatMenu.py +876 -0
  262. wx/demo/agw/FlatNotebook.py +994 -0
  263. wx/demo/agw/FloatSpin.py +475 -0
  264. wx/demo/agw/FoldPanelBar.py +953 -0
  265. wx/demo/agw/FourWaySplitter.py +300 -0
  266. wx/demo/agw/GenericMessageDialog.py +207 -0
  267. wx/demo/agw/GradientButton.py +156 -0
  268. wx/demo/agw/HyperLinkCtrl.py +144 -0
  269. wx/demo/agw/HyperTreeList.py +2660 -0
  270. wx/demo/agw/KnobCtrl.py +186 -0
  271. wx/demo/agw/LabelBook.py +567 -0
  272. wx/demo/agw/MacLargeDemo.py +360 -0
  273. wx/demo/agw/MultiDirDialog.py +117 -0
  274. wx/demo/agw/PeakMeter.py +194 -0
  275. wx/demo/agw/PersistentControls.py +589 -0
  276. wx/demo/agw/PieCtrl.py +206 -0
  277. wx/demo/agw/PyBusyInfo.py +64 -0
  278. wx/demo/agw/PyCollapsiblePane.py +308 -0
  279. wx/demo/agw/PyGauge.py +162 -0
  280. wx/demo/agw/PyProgress.py +155 -0
  281. wx/demo/agw/RibbonBar.py +925 -0
  282. wx/demo/agw/RulerCtrl.py +454 -0
  283. wx/demo/agw/ScrolledThumbnail.py +128 -0
  284. wx/demo/agw/ShapedButton.py +603 -0
  285. wx/demo/agw/ShortcutEditor.py +397 -0
  286. wx/demo/agw/SpeedMeter.py +668 -0
  287. wx/demo/agw/SuperToolTip.py +396 -0
  288. wx/demo/agw/ThumbDemoConfig.py +603 -0
  289. wx/demo/agw/ThumbnailCtrl.py +149 -0
  290. wx/demo/agw/ToasterBox.py +410 -0
  291. wx/demo/agw/UltimateListCtrl.py +80 -0
  292. wx/demo/agw/UltimateListIconDemo.py +908 -0
  293. wx/demo/agw/UltimateListListDemo.py +124 -0
  294. wx/demo/agw/UltimateReportDemo.py +1146 -0
  295. wx/demo/agw/UltimateVirtualDemo.py +207 -0
  296. wx/demo/agw/Windows7Explorer_Contents.py +368 -0
  297. wx/demo/agw/XLSGrid.py +238 -0
  298. wx/demo/agw/ZoomBar.py +230 -0
  299. wx/demo/agw/__demo__.py +183 -0
  300. wx/demo/agw/bitmaps/Explorer96.png +0 -0
  301. wx/demo/agw/bitmaps/Explorer96Flip40.png +0 -0
  302. wx/demo/agw/bitmaps/Folder96.png +0 -0
  303. wx/demo/agw/bitmaps/Folder96Flip40.png +0 -0
  304. wx/demo/agw/bitmaps/Monitor96.png +0 -0
  305. wx/demo/agw/bitmaps/Monitor96Flip40.png +0 -0
  306. wx/demo/agw/bitmaps/Music96.png +0 -0
  307. wx/demo/agw/bitmaps/Music96Flip40.png +0 -0
  308. wx/demo/agw/bitmaps/Photo96.png +0 -0
  309. wx/demo/agw/bitmaps/Photo96Flip40.png +0 -0
  310. wx/demo/agw/bitmaps/Search96.png +0 -0
  311. wx/demo/agw/bitmaps/Search96Flip40.png +0 -0
  312. wx/demo/agw/bitmaps/Wizard96.png +0 -0
  313. wx/demo/agw/bitmaps/Wizard96Flip40.png +0 -0
  314. wx/demo/agw/bitmaps/advancedsplash.png +0 -0
  315. wx/demo/agw/bitmaps/aquabutton.png +0 -0
  316. wx/demo/agw/bitmaps/aquachecked.ico +0 -0
  317. wx/demo/agw/bitmaps/aquaflagged.ico +0 -0
  318. wx/demo/agw/bitmaps/aquanotchecked.ico +0 -0
  319. wx/demo/agw/bitmaps/aquanotflagged.ico +0 -0
  320. wx/demo/agw/bitmaps/canada.gif +0 -0
  321. wx/demo/agw/bitmaps/checked.ico +0 -0
  322. wx/demo/agw/bitmaps/columns.png +0 -0
  323. wx/demo/agw/bitmaps/contexthelp-16.png +0 -0
  324. wx/demo/agw/bitmaps/contexthelp.png +0 -0
  325. wx/demo/agw/bitmaps/copy.png +0 -0
  326. wx/demo/agw/bitmaps/cut.png +0 -0
  327. wx/demo/agw/bitmaps/editcopy.png +0 -0
  328. wx/demo/agw/bitmaps/editcut.png +0 -0
  329. wx/demo/agw/bitmaps/editpaste.png +0 -0
  330. wx/demo/agw/bitmaps/empty_icon.png +0 -0
  331. wx/demo/agw/bitmaps/exit-16.png +0 -0
  332. wx/demo/agw/bitmaps/exit.ico +0 -0
  333. wx/demo/agw/bitmaps/ffwd.png +0 -0
  334. wx/demo/agw/bitmaps/ffwddisabled.png +0 -0
  335. wx/demo/agw/bitmaps/field-16.png +0 -0
  336. wx/demo/agw/bitmaps/filenew.png +0 -0
  337. wx/demo/agw/bitmaps/fileopen.png +0 -0
  338. wx/demo/agw/bitmaps/filesave.png +0 -0
  339. wx/demo/agw/bitmaps/flagged.ico +0 -0
  340. wx/demo/agw/bitmaps/folder.png +0 -0
  341. wx/demo/agw/bitmaps/folder_new.png +0 -0
  342. wx/demo/agw/bitmaps/ghost.png +0 -0
  343. wx/demo/agw/bitmaps/gradientbutton.png +0 -0
  344. wx/demo/agw/bitmaps/help-16.png +0 -0
  345. wx/demo/agw/bitmaps/help.ico +0 -0
  346. wx/demo/agw/bitmaps/italy.gif +0 -0
  347. wx/demo/agw/bitmaps/lbadd.png +0 -0
  348. wx/demo/agw/bitmaps/lbcharge.png +0 -0
  349. wx/demo/agw/bitmaps/lbdecrypted.png +0 -0
  350. wx/demo/agw/bitmaps/lbnews.png +0 -0
  351. wx/demo/agw/bitmaps/lbroll.png +0 -0
  352. wx/demo/agw/bitmaps/minus1.ico +0 -0
  353. wx/demo/agw/bitmaps/minus2.ico +0 -0
  354. wx/demo/agw/bitmaps/minus3.ico +0 -0
  355. wx/demo/agw/bitmaps/minus4.ico +0 -0
  356. wx/demo/agw/bitmaps/minus5.ico +0 -0
  357. wx/demo/agw/bitmaps/month-16.png +0 -0
  358. wx/demo/agw/bitmaps/new_file.png +0 -0
  359. wx/demo/agw/bitmaps/new_folder.png +0 -0
  360. wx/demo/agw/bitmaps/notchecked.ico +0 -0
  361. wx/demo/agw/bitmaps/notflagged.ico +0 -0
  362. wx/demo/agw/bitmaps/ok-16.png +0 -0
  363. wx/demo/agw/bitmaps/open_folder.png +0 -0
  364. wx/demo/agw/bitmaps/paste.png +0 -0
  365. wx/demo/agw/bitmaps/pause.png +0 -0
  366. wx/demo/agw/bitmaps/pausedisabled.png +0 -0
  367. wx/demo/agw/bitmaps/play.png +0 -0
  368. wx/demo/agw/bitmaps/playdisabled.png +0 -0
  369. wx/demo/agw/bitmaps/plus1.ico +0 -0
  370. wx/demo/agw/bitmaps/plus2.ico +0 -0
  371. wx/demo/agw/bitmaps/plus3.ico +0 -0
  372. wx/demo/agw/bitmaps/plus4.ico +0 -0
  373. wx/demo/agw/bitmaps/plus5.ico +0 -0
  374. wx/demo/agw/bitmaps/record.png +0 -0
  375. wx/demo/agw/bitmaps/recorddisabled.png +0 -0
  376. wx/demo/agw/bitmaps/recording.gif +0 -0
  377. wx/demo/agw/bitmaps/rewind.png +0 -0
  378. wx/demo/agw/bitmaps/rewinddisabled.png +0 -0
  379. wx/demo/agw/bitmaps/round.png +0 -0
  380. wx/demo/agw/bitmaps/save.png +0 -0
  381. wx/demo/agw/bitmaps/separator.gif +0 -0
  382. wx/demo/agw/bitmaps/separatorflip.png +0 -0
  383. wx/demo/agw/bitmaps/smfuel.ico +0 -0
  384. wx/demo/agw/bitmaps/smpi.ico +0 -0
  385. wx/demo/agw/bitmaps/smtemp.ico +0 -0
  386. wx/demo/agw/bitmaps/stop.png +0 -0
  387. wx/demo/agw/bitmaps/stopdisabled.png +0 -0
  388. wx/demo/agw/bitmaps/sttbutton.png +0 -0
  389. wx/demo/agw/bitmaps/sttfont.png +0 -0
  390. wx/demo/agw/bitmaps/sttheader.png +0 -0
  391. wx/demo/agw/bitmaps/stthelp.png +0 -0
  392. wx/demo/agw/bitmaps/view1.png +0 -0
  393. wx/demo/agw/bitmaps/view2.png +0 -0
  394. wx/demo/agw/bitmaps/view_choose.png +0 -0
  395. wx/demo/agw/bitmaps/view_detailed.png +0 -0
  396. wx/demo/agw/bitmaps/view_icon.png +0 -0
  397. wx/demo/agw/bitmaps/view_multicolumn.png +0 -0
  398. wx/demo/agw/bitmaps/viewmag-16.png +0 -0
  399. wx/demo/agw/bitmaps/viewmag-m-16.png +0 -0
  400. wx/demo/agw/bitmaps/viewmag-p-16.png +0 -0
  401. wx/demo/agw/bitmaps/viewmagfit-16.png +0 -0
  402. wx/demo/agw/data/Example_1.xls +0 -0
  403. wx/demo/agw/images.py +6714 -0
  404. wx/demo/bitmaps/AG00028_.gif +0 -0
  405. wx/demo/bitmaps/AG00039_.gif +0 -0
  406. wx/demo/bitmaps/AG00178_.gif +0 -0
  407. wx/demo/bitmaps/AG00183_.gif +0 -0
  408. wx/demo/bitmaps/AG00185_.gif +0 -0
  409. wx/demo/bitmaps/BD13656_.gif +0 -0
  410. wx/demo/bitmaps/advancedsplash.png +0 -0
  411. wx/demo/bitmaps/aquabutton.png +0 -0
  412. wx/demo/bitmaps/aquachecked.ico +0 -0
  413. wx/demo/bitmaps/aquaflagged.ico +0 -0
  414. wx/demo/bitmaps/aquanotchecked.ico +0 -0
  415. wx/demo/bitmaps/aquanotflagged.ico +0 -0
  416. wx/demo/bitmaps/canada.gif +0 -0
  417. wx/demo/bitmaps/checked.ico +0 -0
  418. wx/demo/bitmaps/columns.png +0 -0
  419. wx/demo/bitmaps/contexthelp-16.png +0 -0
  420. wx/demo/bitmaps/contexthelp.png +0 -0
  421. wx/demo/bitmaps/copy.png +0 -0
  422. wx/demo/bitmaps/cropshot24x20.png +0 -0
  423. wx/demo/bitmaps/cut.png +0 -0
  424. wx/demo/bitmaps/editcopy.png +0 -0
  425. wx/demo/bitmaps/editcut.png +0 -0
  426. wx/demo/bitmaps/editpaste.png +0 -0
  427. wx/demo/bitmaps/exit-16.png +0 -0
  428. wx/demo/bitmaps/exit.ico +0 -0
  429. wx/demo/bitmaps/ffwd.png +0 -0
  430. wx/demo/bitmaps/ffwddisabled.png +0 -0
  431. wx/demo/bitmaps/field-16.png +0 -0
  432. wx/demo/bitmaps/filenew.png +0 -0
  433. wx/demo/bitmaps/fileopen.png +0 -0
  434. wx/demo/bitmaps/filesave.png +0 -0
  435. wx/demo/bitmaps/flagged.ico +0 -0
  436. wx/demo/bitmaps/folder_new.png +0 -0
  437. wx/demo/bitmaps/ghost.png +0 -0
  438. wx/demo/bitmaps/gradientbutton.png +0 -0
  439. wx/demo/bitmaps/help-16.png +0 -0
  440. wx/demo/bitmaps/help.ico +0 -0
  441. wx/demo/bitmaps/honeycomb300.png +0 -0
  442. wx/demo/bitmaps/image.bmp +0 -0
  443. wx/demo/bitmaps/image.gif +0 -0
  444. wx/demo/bitmaps/image.ico +0 -0
  445. wx/demo/bitmaps/image.jpg +0 -0
  446. wx/demo/bitmaps/image.png +0 -0
  447. wx/demo/bitmaps/image.tif +0 -0
  448. wx/demo/bitmaps/italy.gif +0 -0
  449. wx/demo/bitmaps/lbadd.png +0 -0
  450. wx/demo/bitmaps/lbcharge.png +0 -0
  451. wx/demo/bitmaps/lbdecrypted.png +0 -0
  452. wx/demo/bitmaps/lbnews.png +0 -0
  453. wx/demo/bitmaps/lbroll.png +0 -0
  454. wx/demo/bitmaps/minus1.ico +0 -0
  455. wx/demo/bitmaps/minus2.ico +0 -0
  456. wx/demo/bitmaps/minus3.ico +0 -0
  457. wx/demo/bitmaps/minus4.ico +0 -0
  458. wx/demo/bitmaps/minus5.ico +0 -0
  459. wx/demo/bitmaps/month-16.png +0 -0
  460. wx/demo/bitmaps/new_file.png +0 -0
  461. wx/demo/bitmaps/new_folder.png +0 -0
  462. wx/demo/bitmaps/notchecked.ico +0 -0
  463. wx/demo/bitmaps/notflagged.ico +0 -0
  464. wx/demo/bitmaps/ok-16.png +0 -0
  465. wx/demo/bitmaps/open_folder.png +0 -0
  466. wx/demo/bitmaps/paste.png +0 -0
  467. wx/demo/bitmaps/pause.png +0 -0
  468. wx/demo/bitmaps/pausedisabled.png +0 -0
  469. wx/demo/bitmaps/phoenix_title.png +0 -0
  470. wx/demo/bitmaps/phoenix_top.png +0 -0
  471. wx/demo/bitmaps/play.png +0 -0
  472. wx/demo/bitmaps/playdisabled.png +0 -0
  473. wx/demo/bitmaps/plus1.ico +0 -0
  474. wx/demo/bitmaps/plus2.ico +0 -0
  475. wx/demo/bitmaps/plus3.ico +0 -0
  476. wx/demo/bitmaps/plus4.ico +0 -0
  477. wx/demo/bitmaps/plus5.ico +0 -0
  478. wx/demo/bitmaps/record.png +0 -0
  479. wx/demo/bitmaps/recorddisabled.png +0 -0
  480. wx/demo/bitmaps/rewind.png +0 -0
  481. wx/demo/bitmaps/rewinddisabled.png +0 -0
  482. wx/demo/bitmaps/round.png +0 -0
  483. wx/demo/bitmaps/save.png +0 -0
  484. wx/demo/bitmaps/smfuel.ico +0 -0
  485. wx/demo/bitmaps/smpi.ico +0 -0
  486. wx/demo/bitmaps/smtemp.ico +0 -0
  487. wx/demo/bitmaps/snakey_render.png +0 -0
  488. wx/demo/bitmaps/splash.png +0 -0
  489. wx/demo/bitmaps/stop.png +0 -0
  490. wx/demo/bitmaps/stopdisabled.png +0 -0
  491. wx/demo/bitmaps/sttbutton.png +0 -0
  492. wx/demo/bitmaps/sttfont.png +0 -0
  493. wx/demo/bitmaps/sttheader.png +0 -0
  494. wx/demo/bitmaps/stthelp.png +0 -0
  495. wx/demo/bitmaps/toucan.png +0 -0
  496. wx/demo/bitmaps/view1.png +0 -0
  497. wx/demo/bitmaps/view2.png +0 -0
  498. wx/demo/bitmaps/view_choose.png +0 -0
  499. wx/demo/bitmaps/view_detailed.png +0 -0
  500. wx/demo/bitmaps/view_icon.png +0 -0
  501. wx/demo/bitmaps/view_multicolumn.png +0 -0
  502. wx/demo/bitmaps/viewmag-16.png +0 -0
  503. wx/demo/bitmaps/viewmag-m-16.png +0 -0
  504. wx/demo/bitmaps/viewmag-p-16.png +0 -0
  505. wx/demo/bitmaps/viewmagfit-16.png +0 -0
  506. wx/demo/bmp_source/001.png +0 -0
  507. wx/demo/bmp_source/002.png +0 -0
  508. wx/demo/bmp_source/003.png +0 -0
  509. wx/demo/bmp_source/004.png +0 -0
  510. wx/demo/bmp_source/005.png +0 -0
  511. wx/demo/bmp_source/006.png +0 -0
  512. wx/demo/bmp_source/007.png +0 -0
  513. wx/demo/bmp_source/008.png +0 -0
  514. wx/demo/bmp_source/009.png +0 -0
  515. wx/demo/bmp_source/010.png +0 -0
  516. wx/demo/bmp_source/011.png +0 -0
  517. wx/demo/bmp_source/012.png +0 -0
  518. wx/demo/bmp_source/013.png +0 -0
  519. wx/demo/bmp_source/014.png +0 -0
  520. wx/demo/bmp_source/015.png +0 -0
  521. wx/demo/bmp_source/016.png +0 -0
  522. wx/demo/bmp_source/017.png +0 -0
  523. wx/demo/bmp_source/018.png +0 -0
  524. wx/demo/bmp_source/019.png +0 -0
  525. wx/demo/bmp_source/020.png +0 -0
  526. wx/demo/bmp_source/021.png +0 -0
  527. wx/demo/bmp_source/022.png +0 -0
  528. wx/demo/bmp_source/023.png +0 -0
  529. wx/demo/bmp_source/024.png +0 -0
  530. wx/demo/bmp_source/025.png +0 -0
  531. wx/demo/bmp_source/026.png +0 -0
  532. wx/demo/bmp_source/027.png +0 -0
  533. wx/demo/bmp_source/028.png +0 -0
  534. wx/demo/bmp_source/029.png +0 -0
  535. wx/demo/bmp_source/030.png +0 -0
  536. wx/demo/bmp_source/DbDec.bmp +0 -0
  537. wx/demo/bmp_source/DbInc.bmp +0 -0
  538. wx/demo/bmp_source/Dec.bmp +0 -0
  539. wx/demo/bmp_source/FRM_0.png +0 -0
  540. wx/demo/bmp_source/FRM_1.png +0 -0
  541. wx/demo/bmp_source/FRM_2.png +0 -0
  542. wx/demo/bmp_source/FRM_3.png +0 -0
  543. wx/demo/bmp_source/FRM_4.png +0 -0
  544. wx/demo/bmp_source/FRM_5.png +0 -0
  545. wx/demo/bmp_source/FRM_6.png +0 -0
  546. wx/demo/bmp_source/FRM_7.png +0 -0
  547. wx/demo/bmp_source/FRM_8.png +0 -0
  548. wx/demo/bmp_source/GridBG.gif +0 -0
  549. wx/demo/bmp_source/Inc.bmp +0 -0
  550. wx/demo/bmp_source/LB01.png +0 -0
  551. wx/demo/bmp_source/LB02.png +0 -0
  552. wx/demo/bmp_source/LB03.png +0 -0
  553. wx/demo/bmp_source/LB04.png +0 -0
  554. wx/demo/bmp_source/LB05.png +0 -0
  555. wx/demo/bmp_source/LB06.png +0 -0
  556. wx/demo/bmp_source/LB07.png +0 -0
  557. wx/demo/bmp_source/LB08.png +0 -0
  558. wx/demo/bmp_source/LB09.png +0 -0
  559. wx/demo/bmp_source/LB10.png +0 -0
  560. wx/demo/bmp_source/LB11.png +0 -0
  561. wx/demo/bmp_source/LB12.png +0 -0
  562. wx/demo/bmp_source/Pt.bmp +0 -0
  563. wx/demo/bmp_source/Vippi.png +0 -0
  564. wx/demo/bmp_source/backgrnd.png +0 -0
  565. wx/demo/bmp_source/book.png +0 -0
  566. wx/demo/bmp_source/book_blue.png +0 -0
  567. wx/demo/bmp_source/book_green.png +0 -0
  568. wx/demo/bmp_source/book_red.png +0 -0
  569. wx/demo/bmp_source/bp_btn1.png +0 -0
  570. wx/demo/bmp_source/bp_btn2.png +0 -0
  571. wx/demo/bmp_source/bp_btn3.png +0 -0
  572. wx/demo/bmp_source/bp_btn4.png +0 -0
  573. wx/demo/bmp_source/bulb1.bmp +0 -0
  574. wx/demo/bmp_source/bulb2.bmp +0 -0
  575. wx/demo/bmp_source/carrot.png +0 -0
  576. wx/demo/bmp_source/clipboard.png +0 -0
  577. wx/demo/bmp_source/code.png +0 -0
  578. wx/demo/bmp_source/core.png +0 -0
  579. wx/demo/bmp_source/custom.png +0 -0
  580. wx/demo/bmp_source/customcontrol.png +0 -0
  581. wx/demo/bmp_source/deletedocs.png +0 -0
  582. wx/demo/bmp_source/deleteperspective.png +0 -0
  583. wx/demo/bmp_source/demo.png +0 -0
  584. wx/demo/bmp_source/dialog.png +0 -0
  585. wx/demo/bmp_source/exit.png +0 -0
  586. wx/demo/bmp_source/expansion.png +0 -0
  587. wx/demo/bmp_source/find.png +0 -0
  588. wx/demo/bmp_source/findnext.png +0 -0
  589. wx/demo/bmp_source/floatcanvas.png +0 -0
  590. wx/demo/bmp_source/frame.png +0 -0
  591. wx/demo/bmp_source/images.png +0 -0
  592. wx/demo/bmp_source/inspect.png +0 -0
  593. wx/demo/bmp_source/layout.png +0 -0
  594. wx/demo/bmp_source/logo.png +0 -0
  595. wx/demo/bmp_source/miscellaneous.png +0 -0
  596. wx/demo/bmp_source/modifiedexists.png +0 -0
  597. wx/demo/bmp_source/mondrian.ico +0 -0
  598. wx/demo/bmp_source/morecontrols.png +0 -0
  599. wx/demo/bmp_source/moredialog.png +0 -0
  600. wx/demo/bmp_source/noicon.png +0 -0
  601. wx/demo/bmp_source/overview.png +0 -0
  602. wx/demo/bmp_source/pencil.png +0 -0
  603. wx/demo/bmp_source/pointy.png +0 -0
  604. wx/demo/bmp_source/process.png +0 -0
  605. wx/demo/bmp_source/pyshell.png +0 -0
  606. wx/demo/bmp_source/recent.png +0 -0
  607. wx/demo/bmp_source/rest.png +0 -0
  608. wx/demo/bmp_source/robin.jpg +0 -0
  609. wx/demo/bmp_source/rt_alignleft.xpm +24 -0
  610. wx/demo/bmp_source/rt_alignright.xpm +24 -0
  611. wx/demo/bmp_source/rt_bold.xpm +24 -0
  612. wx/demo/bmp_source/rt_centre.xpm +24 -0
  613. wx/demo/bmp_source/rt_colour.xpm +59 -0
  614. wx/demo/bmp_source/rt_copy.xpm +44 -0
  615. wx/demo/bmp_source/rt_cut.xpm +46 -0
  616. wx/demo/bmp_source/rt_font.xpm +25 -0
  617. wx/demo/bmp_source/rt_idea.xpm +47 -0
  618. wx/demo/bmp_source/rt_indentless.xpm +25 -0
  619. wx/demo/bmp_source/rt_indentmore.xpm +25 -0
  620. wx/demo/bmp_source/rt_italic.xpm +25 -0
  621. wx/demo/bmp_source/rt_open.xpm +57 -0
  622. wx/demo/bmp_source/rt_paste.xpm +46 -0
  623. wx/demo/bmp_source/rt_redo.xpm +58 -0
  624. wx/demo/bmp_source/rt_sample.xpm +44 -0
  625. wx/demo/bmp_source/rt_save.xpm +42 -0
  626. wx/demo/bmp_source/rt_smiley.xpm +42 -0
  627. wx/demo/bmp_source/rt_underline.xpm +25 -0
  628. wx/demo/bmp_source/rt_undo.xpm +58 -0
  629. wx/demo/bmp_source/rt_zebra.xpm +409 -0
  630. wx/demo/bmp_source/saveperspective.png +0 -0
  631. wx/demo/bmp_source/sm_down.bmp +0 -0
  632. wx/demo/bmp_source/sm_up.bmp +0 -0
  633. wx/demo/bmp_source/smiles2.bmp +0 -0
  634. wx/demo/bmp_source/test2.bmp +0 -0
  635. wx/demo/bmp_source/testmask.bmp +0 -0
  636. wx/demo/bmp_source/teststar.png +0 -0
  637. wx/demo/bmp_source/thekid.png +0 -0
  638. wx/demo/bmp_source/tog1.bmp +0 -0
  639. wx/demo/bmp_source/tog2.bmp +0 -0
  640. wx/demo/bmp_source/wiztest1.bmp +0 -0
  641. wx/demo/bmp_source/wiztest2.bmp +0 -0
  642. wx/demo/bmp_source/wxpdemo.ico +0 -0
  643. wx/demo/cursors/paperairplane_arrow_blue.cur +0 -0
  644. wx/demo/cursors/paperairplane_arrow_blue_fadeout80.cur +0 -0
  645. wx/demo/cursors/paperairplane_arrow_colorshift.ani +0 -0
  646. wx/demo/cursors/paperairplane_arrow_dark.cur +0 -0
  647. wx/demo/cursors/paperairplane_arrow_grey.cur +0 -0
  648. wx/demo/cursors/paperairplane_arrow_red.cur +0 -0
  649. wx/demo/cursors/paperairplane_arrow_white.cur +0 -0
  650. wx/demo/cursors/paperairplane_arrow_white24.png +0 -0
  651. wx/demo/data/0-tiger.svg +725 -0
  652. wx/demo/data/Asteroid_blaster.swf +0 -0
  653. wx/demo/data/SIL_OPEN_FONT_LICENSE.txt +97 -0
  654. wx/demo/data/SourceCodePro-Regular.ttf +0 -0
  655. wx/demo/data/accessories-calculator.svg +636 -0
  656. wx/demo/data/accessories-text-editor.svg +554 -0
  657. wx/demo/data/anykey.wav +0 -0
  658. wx/demo/data/applications-internet.svg +623 -0
  659. wx/demo/data/desktop-accessibility.svg +245 -0
  660. wx/demo/data/desktop-keyboard-shortcuts.svg +839 -0
  661. wx/demo/data/desktop-locale.svg +878 -0
  662. wx/demo/data/desktop-remote-desktop.svg +1479 -0
  663. wx/demo/data/desktop-theme.svg +882 -0
  664. wx/demo/data/desktop-wallpaper.svg +747 -0
  665. wx/demo/data/echo.py +25 -0
  666. wx/demo/data/imagemap.htm +20 -0
  667. wx/demo/data/imagemap.png +0 -0
  668. wx/demo/data/internet-group-chat.svg +312 -0
  669. wx/demo/data/internet-mail.svg +440 -0
  670. wx/demo/data/locale/af/LC_MESSAGES/wxpydemo.mo +0 -0
  671. wx/demo/data/locale/de/LC_MESSAGES/wxpydemo.mo +0 -0
  672. wx/demo/data/locale/es/LC_MESSAGES/wxpydemo.mo +0 -0
  673. wx/demo/data/locale/fr/LC_MESSAGES/wxpydemo.mo +0 -0
  674. wx/demo/data/locale/it/LC_MESSAGES/wxpydemo.mo +0 -0
  675. wx/demo/data/locale-src/af.po +23 -0
  676. wx/demo/data/locale-src/de.po +23 -0
  677. wx/demo/data/locale-src/es.po +22 -0
  678. wx/demo/data/locale-src/fr.po +22 -0
  679. wx/demo/data/locale-src/install +15 -0
  680. wx/demo/data/locale-src/it.po +23 -0
  681. wx/demo/data/locale-src/wxpydemo.po +21 -0
  682. wx/demo/data/office-calendar.svg +316 -0
  683. wx/demo/data/pic.png +0 -0
  684. wx/demo/data/pic2.bmp +0 -0
  685. wx/demo/data/plan.wav +0 -0
  686. wx/demo/data/proclamation.txt +115 -0
  687. wx/demo/data/resource.wdr +0 -0
  688. wx/demo/data/resource_wdr.xrc +146 -0
  689. wx/demo/data/romedalen.png +0 -0
  690. wx/demo/data/stc.h.html +3544 -0
  691. wx/demo/data/system-session.svg +510 -0
  692. wx/demo/data/system-users.svg +539 -0
  693. wx/demo/data/tables.htm +116 -0
  694. wx/demo/data/test-gradient-pen.svg +14 -0
  695. wx/demo/data/test-opacity.svg +7 -0
  696. wx/demo/data/test.htm +253 -0
  697. wx/demo/data/testmovie.mpg +0 -0
  698. wx/demo/data/testtable.txt +38 -0
  699. wx/demo/data/tips.txt +73 -0
  700. wx/demo/data/utilities-system-monitor.svg +435 -0
  701. wx/demo/data/utilities-terminal.svg +500 -0
  702. wx/demo/data/widgetTest.htm +70 -0
  703. wx/demo/data/world.dat +24055 -0
  704. wx/demo/demo.py +4 -0
  705. wx/demo/demo.pyw +4 -0
  706. wx/demo/demodata.py +310 -0
  707. wx/demo/encode_bitmaps.py +181 -0
  708. wx/demo/images.py +6812 -0
  709. wx/demo/infoframe.py +149 -0
  710. wx/demo/run.py +171 -0
  711. wx/demo/snippets/__init__.py +13 -0
  712. wx/demo/snippets/arc.py +21 -0
  713. wx/demo/snippets/arc_negative.py +21 -0
  714. wx/demo/snippets/clip.py +13 -0
  715. wx/demo/snippets/clip_image.py +13 -0
  716. wx/demo/snippets/curve_rectangle.py +53 -0
  717. wx/demo/snippets/curve_to.py +17 -0
  718. wx/demo/snippets/dash.py +18 -0
  719. wx/demo/snippets/ellipse.py +33 -0
  720. wx/demo/snippets/fill_and_stroke.py +12 -0
  721. wx/demo/snippets/fill_and_stroke2.py +18 -0
  722. wx/demo/snippets/fill_style.py +31 -0
  723. wx/demo/snippets/glyph_path.py +21 -0
  724. wx/demo/snippets/gradient.py +16 -0
  725. wx/demo/snippets/gradient_mask.py +12 -0
  726. wx/demo/snippets/group.py +16 -0
  727. wx/demo/snippets/image.py +14 -0
  728. wx/demo/snippets/imagepattern.py +23 -0
  729. wx/demo/snippets/path.py +7 -0
  730. wx/demo/snippets/set_line_cap.py +19 -0
  731. wx/demo/snippets/set_line_join.py +21 -0
  732. wx/demo/snippets/show_glyphs.py +15 -0
  733. wx/demo/snippets/text.py +22 -0
  734. wx/demo/snippets/text_align_center.py +26 -0
  735. wx/demo/snippets/text_extents.py +27 -0
  736. wx/demo/template.py +36 -0
  737. wx/demo/throbImages.py +1277 -0
  738. wx/demo/version.py +3 -0
  739. wx/demo/widgetTest.py +72 -0
  740. wx/demo/wxpdemo.ico +0 -0
  741. wx/glcanvas.py +10 -0
  742. wx/glcanvas.pyi +458 -0
  743. wx/grid.py +229 -0
  744. wx/grid.pyi +4959 -0
  745. wx/html.py +35 -0
  746. wx/html.pyi +2965 -0
  747. wx/html2.py +40 -0
  748. wx/html2.pyi +772 -0
  749. wx/lib/CDate.py +202 -0
  750. wx/lib/ClickableHtmlWindow.py +57 -0
  751. wx/lib/__init__.py +0 -0
  752. wx/lib/activex.py +178 -0
  753. wx/lib/activexwrapper.py +153 -0
  754. wx/lib/agw/__init__.py +128 -0
  755. wx/lib/agw/advancedsplash.py +564 -0
  756. wx/lib/agw/aquabutton.py +1127 -0
  757. wx/lib/agw/artmanager.py +2110 -0
  758. wx/lib/agw/aui/__init__.py +295 -0
  759. wx/lib/agw/aui/aui_constants.py +2628 -0
  760. wx/lib/agw/aui/aui_switcherdialog.py +1227 -0
  761. wx/lib/agw/aui/aui_utilities.py +672 -0
  762. wx/lib/agw/aui/auibar.py +4031 -0
  763. wx/lib/agw/aui/auibook.py +6289 -0
  764. wx/lib/agw/aui/dockart.py +1198 -0
  765. wx/lib/agw/aui/framemanager.py +10409 -0
  766. wx/lib/agw/aui/tabart.py +2771 -0
  767. wx/lib/agw/aui/tabmdi.py +679 -0
  768. wx/lib/agw/balloontip.py +1158 -0
  769. wx/lib/agw/buttonpanel.py +2823 -0
  770. wx/lib/agw/cubecolourdialog.py +3529 -0
  771. wx/lib/agw/customtreectrl.py +8963 -0
  772. wx/lib/agw/data/ShortcutEditor_1.png +0 -0
  773. wx/lib/agw/data/ShortcutEditor_1_thumb.png +0 -0
  774. wx/lib/agw/data/ShortcutEditor_2.png +0 -0
  775. wx/lib/agw/data/ShortcutEditor_2_thumb.png +0 -0
  776. wx/lib/agw/data/ShortcutEditor_3.png +0 -0
  777. wx/lib/agw/data/ShortcutEditor_3_thumb.png +0 -0
  778. wx/lib/agw/data/ShortcutEditor_4.png +0 -0
  779. wx/lib/agw/data/ShortcutEditor_4_thumb.png +0 -0
  780. wx/lib/agw/data/default_help_text.html +105 -0
  781. wx/lib/agw/flatmenu.py +7333 -0
  782. wx/lib/agw/flatnotebook.py +6672 -0
  783. wx/lib/agw/floatspin.py +1823 -0
  784. wx/lib/agw/fmcustomizedlg.py +540 -0
  785. wx/lib/agw/fmresources.py +407 -0
  786. wx/lib/agw/foldpanelbar.py +2282 -0
  787. wx/lib/agw/fourwaysplitter.py +1130 -0
  788. wx/lib/agw/genericmessagedialog.py +1549 -0
  789. wx/lib/agw/gradientbutton.py +732 -0
  790. wx/lib/agw/hyperlink.py +664 -0
  791. wx/lib/agw/hypertreelist.py +5374 -0
  792. wx/lib/agw/infobar.py +885 -0
  793. wx/lib/agw/knobctrl.py +945 -0
  794. wx/lib/agw/labelbook.py +3029 -0
  795. wx/lib/agw/multidirdialog.py +615 -0
  796. wx/lib/agw/peakmeter.py +1029 -0
  797. wx/lib/agw/persist/__init__.py +188 -0
  798. wx/lib/agw/persist/persist_constants.py +284 -0
  799. wx/lib/agw/persist/persist_handlers.py +2614 -0
  800. wx/lib/agw/persist/persistencemanager.py +864 -0
  801. wx/lib/agw/piectrl.py +1082 -0
  802. wx/lib/agw/pybusyinfo.py +399 -0
  803. wx/lib/agw/pycollapsiblepane.py +940 -0
  804. wx/lib/agw/pygauge.py +570 -0
  805. wx/lib/agw/pyprogress.py +917 -0
  806. wx/lib/agw/ribbon/__init__.py +198 -0
  807. wx/lib/agw/ribbon/art.py +219 -0
  808. wx/lib/agw/ribbon/art_aui.py +1284 -0
  809. wx/lib/agw/ribbon/art_default.py +81 -0
  810. wx/lib/agw/ribbon/art_internal.py +244 -0
  811. wx/lib/agw/ribbon/art_msw.py +2736 -0
  812. wx/lib/agw/ribbon/art_osx.py +52 -0
  813. wx/lib/agw/ribbon/bar.py +1261 -0
  814. wx/lib/agw/ribbon/buttonbar.py +1320 -0
  815. wx/lib/agw/ribbon/control.py +205 -0
  816. wx/lib/agw/ribbon/gallery.py +974 -0
  817. wx/lib/agw/ribbon/page.py +946 -0
  818. wx/lib/agw/ribbon/panel.py +1170 -0
  819. wx/lib/agw/ribbon/toolbar.py +1442 -0
  820. wx/lib/agw/rulerctrl.py +1887 -0
  821. wx/lib/agw/scrolledthumbnail.py +2119 -0
  822. wx/lib/agw/shapedbutton.py +1809 -0
  823. wx/lib/agw/shortcuteditor.py +2634 -0
  824. wx/lib/agw/speedmeter.py +1801 -0
  825. wx/lib/agw/supertooltip.py +1444 -0
  826. wx/lib/agw/thumbnailctrl.py +529 -0
  827. wx/lib/agw/toasterbox.py +1327 -0
  828. wx/lib/agw/ultimatelistctrl.py +13666 -0
  829. wx/lib/agw/xlsgrid.py +2113 -0
  830. wx/lib/agw/zoombar.py +1339 -0
  831. wx/lib/analogclock/__init__.py +140 -0
  832. wx/lib/analogclock/analogclock.py +631 -0
  833. wx/lib/analogclock/helpers.py +991 -0
  834. wx/lib/analogclock/lib_setup/__init__.py +0 -0
  835. wx/lib/analogclock/lib_setup/buttontreectrlpanel.py +297 -0
  836. wx/lib/analogclock/lib_setup/fontselect.py +57 -0
  837. wx/lib/analogclock/setup.py +490 -0
  838. wx/lib/analogclock/styles.py +47 -0
  839. wx/lib/anchors.py +103 -0
  840. wx/lib/art/__init__.py +4 -0
  841. wx/lib/art/flagart.py +1583 -0
  842. wx/lib/art/img2pyartprov.py +56 -0
  843. wx/lib/busy.py +146 -0
  844. wx/lib/buttons.py +1141 -0
  845. wx/lib/calendar.py +1597 -0
  846. wx/lib/checkbox.py +837 -0
  847. wx/lib/colourchooser/__init__.py +38 -0
  848. wx/lib/colourchooser/canvas.py +145 -0
  849. wx/lib/colourchooser/intl.py +24 -0
  850. wx/lib/colourchooser/pycolourbox.py +89 -0
  851. wx/lib/colourchooser/pycolourchooser.py +629 -0
  852. wx/lib/colourchooser/pycolourslider.py +100 -0
  853. wx/lib/colourchooser/pypalette.py +211 -0
  854. wx/lib/colourdb.py +740 -0
  855. wx/lib/colourselect.py +385 -0
  856. wx/lib/colourutils.py +118 -0
  857. wx/lib/combotreebox.py +944 -0
  858. wx/lib/delayedresult.py +420 -0
  859. wx/lib/dialogs.py +510 -0
  860. wx/lib/docview.py +3210 -0
  861. wx/lib/dragscroller.py +79 -0
  862. wx/lib/editor/README.txt +77 -0
  863. wx/lib/editor/__init__.py +24 -0
  864. wx/lib/editor/editor.py +974 -0
  865. wx/lib/editor/images.py +15 -0
  866. wx/lib/editor/selection.py +44 -0
  867. wx/lib/embeddedimage.py +76 -0
  868. wx/lib/eventStack.py +136 -0
  869. wx/lib/eventwatcher.py +440 -0
  870. wx/lib/evtmgr.py +521 -0
  871. wx/lib/expando.py +393 -0
  872. wx/lib/fancytext.py +505 -0
  873. wx/lib/filebrowsebutton.py +459 -0
  874. wx/lib/flashwin.py +262 -0
  875. wx/lib/flashwin_old.py +651 -0
  876. wx/lib/floatcanvas/FCEvents.py +53 -0
  877. wx/lib/floatcanvas/FCObjects.py +2923 -0
  878. wx/lib/floatcanvas/FloatCanvas.py +1027 -0
  879. wx/lib/floatcanvas/GUIMode.py +396 -0
  880. wx/lib/floatcanvas/NavCanvas.py +161 -0
  881. wx/lib/floatcanvas/Resources.py +319 -0
  882. wx/lib/floatcanvas/ScreenShot.py +1788 -0
  883. wx/lib/floatcanvas/Utilities/BBox.py +314 -0
  884. wx/lib/floatcanvas/Utilities/Colors.py +137 -0
  885. wx/lib/floatcanvas/Utilities/GUI.py +91 -0
  886. wx/lib/floatcanvas/Utilities/__init__.py +7 -0
  887. wx/lib/floatcanvas/__init__.py +124 -0
  888. wx/lib/foldmenu.py +89 -0
  889. wx/lib/gestures.py +310 -0
  890. wx/lib/gizmos/__init__.py +18 -0
  891. wx/lib/gizmos/dynamicsash.py +1202 -0
  892. wx/lib/gizmos/ledctrl.py +300 -0
  893. wx/lib/gizmos/treelistctrl.py +87 -0
  894. wx/lib/graphics.py +1939 -0
  895. wx/lib/gridmovers.py +511 -0
  896. wx/lib/iewin.py +249 -0
  897. wx/lib/iewin_old.py +894 -0
  898. wx/lib/imagebrowser.py +856 -0
  899. wx/lib/imageutils.py +163 -0
  900. wx/lib/infoframe.py +490 -0
  901. wx/lib/inspection.py +1255 -0
  902. wx/lib/intctrl.py +1001 -0
  903. wx/lib/itemspicker.py +256 -0
  904. wx/lib/langlistctrl.py +480 -0
  905. wx/lib/layoutf.py +271 -0
  906. wx/lib/masked/__init__.py +27 -0
  907. wx/lib/masked/combobox.py +839 -0
  908. wx/lib/masked/ctrl.py +108 -0
  909. wx/lib/masked/ipaddrctrl.py +242 -0
  910. wx/lib/masked/maskededit.py +7279 -0
  911. wx/lib/masked/numctrl.py +2001 -0
  912. wx/lib/masked/textctrl.py +465 -0
  913. wx/lib/masked/timectrl.py +1466 -0
  914. wx/lib/mixins/__init__.py +17 -0
  915. wx/lib/mixins/grid.py +47 -0
  916. wx/lib/mixins/gridlabelrenderer.py +251 -0
  917. wx/lib/mixins/imagelist.py +77 -0
  918. wx/lib/mixins/inspection.py +184 -0
  919. wx/lib/mixins/listctrl.py +894 -0
  920. wx/lib/mixins/rubberband.py +404 -0
  921. wx/lib/mixins/treemixin.py +678 -0
  922. wx/lib/msgpanel.py +95 -0
  923. wx/lib/multisash.py +747 -0
  924. wx/lib/myole4ax.idl +178 -0
  925. wx/lib/myole4ax.tlb +0 -0
  926. wx/lib/newevent.py +229 -0
  927. wx/lib/nvdlg.py +156 -0
  928. wx/lib/ogl/__init__.py +13 -0
  929. wx/lib/ogl/basic.py +3991 -0
  930. wx/lib/ogl/bmpshape.py +87 -0
  931. wx/lib/ogl/canvas.py +467 -0
  932. wx/lib/ogl/composit.py +1577 -0
  933. wx/lib/ogl/diagram.py +230 -0
  934. wx/lib/ogl/divided.py +483 -0
  935. wx/lib/ogl/drawn.py +900 -0
  936. wx/lib/ogl/lines.py +1811 -0
  937. wx/lib/ogl/oglmisc.py +608 -0
  938. wx/lib/pdfviewer/__init__.py +113 -0
  939. wx/lib/pdfviewer/bitmaps/ArrowLeft.png +0 -0
  940. wx/lib/pdfviewer/bitmaps/ArrowRight.png +0 -0
  941. wx/lib/pdfviewer/bitmaps/DirectionH.png +0 -0
  942. wx/lib/pdfviewer/bitmaps/DirectionV.png +0 -0
  943. wx/lib/pdfviewer/bitmaps/PlayerFirst.png +0 -0
  944. wx/lib/pdfviewer/bitmaps/PlayerLast.png +0 -0
  945. wx/lib/pdfviewer/bitmaps/PlayerNext.png +0 -0
  946. wx/lib/pdfviewer/bitmaps/PlayerPrev.png +0 -0
  947. wx/lib/pdfviewer/bitmaps/Printer.png +0 -0
  948. wx/lib/pdfviewer/bitmaps/ReadMe.txt +28 -0
  949. wx/lib/pdfviewer/bitmaps/Save.png +0 -0
  950. wx/lib/pdfviewer/bitmaps/ZoomIn.png +0 -0
  951. wx/lib/pdfviewer/bitmaps/ZoomOut.png +0 -0
  952. wx/lib/pdfviewer/bitmaps/encode_bitmaps.py +37 -0
  953. wx/lib/pdfviewer/buttonpanel.py +279 -0
  954. wx/lib/pdfviewer/images.py +240 -0
  955. wx/lib/pdfviewer/viewer.py +1077 -0
  956. wx/lib/pdfwin.py +295 -0
  957. wx/lib/pdfwin_old.py +789 -0
  958. wx/lib/platebtn.py +789 -0
  959. wx/lib/plot/CHANGELOG.md +150 -0
  960. wx/lib/plot/README.md +16 -0
  961. wx/lib/plot/__init__.py +46 -0
  962. wx/lib/plot/__main__.py +5 -0
  963. wx/lib/plot/examples/__init__.py +0 -0
  964. wx/lib/plot/examples/demo.py +1009 -0
  965. wx/lib/plot/examples/simple_example.py +54 -0
  966. wx/lib/plot/plotcanvas.py +2981 -0
  967. wx/lib/plot/polyobjects.py +1525 -0
  968. wx/lib/plot/utils.py +327 -0
  969. wx/lib/popupctl.py +250 -0
  970. wx/lib/printout.py +1157 -0
  971. wx/lib/progressindicator.py +151 -0
  972. wx/lib/pubsub/LICENSE_BSD_Simple.txt +23 -0
  973. wx/lib/pubsub/README_WxPython.txt +22 -0
  974. wx/lib/pubsub/RELEASE_NOTES.txt +71 -0
  975. wx/lib/pubsub/__init__.py +25 -0
  976. wx/lib/pubsub/core/__init__.py +92 -0
  977. wx/lib/pubsub/core/arg1/__init__.py +16 -0
  978. wx/lib/pubsub/core/arg1/listenerimpl.py +97 -0
  979. wx/lib/pubsub/core/arg1/publisher.py +40 -0
  980. wx/lib/pubsub/core/arg1/publishermixin.py +34 -0
  981. wx/lib/pubsub/core/arg1/topicargspecimpl.py +66 -0
  982. wx/lib/pubsub/core/arg1/topicmgrimpl.py +19 -0
  983. wx/lib/pubsub/core/callables.py +191 -0
  984. wx/lib/pubsub/core/imp2.py +63 -0
  985. wx/lib/pubsub/core/itopicdefnprovider.py +0 -0
  986. wx/lib/pubsub/core/kwargs/__init__.py +16 -0
  987. wx/lib/pubsub/core/kwargs/datamsg.py +27 -0
  988. wx/lib/pubsub/core/kwargs/listenerimpl.py +93 -0
  989. wx/lib/pubsub/core/kwargs/publisher.py +77 -0
  990. wx/lib/pubsub/core/kwargs/publishermixin.py +65 -0
  991. wx/lib/pubsub/core/kwargs/topicargspecimpl.py +217 -0
  992. wx/lib/pubsub/core/kwargs/topicmgrimpl.py +13 -0
  993. wx/lib/pubsub/core/listener.py +40 -0
  994. wx/lib/pubsub/core/listenerbase.py +185 -0
  995. wx/lib/pubsub/core/notificationmgr.py +185 -0
  996. wx/lib/pubsub/core/publisherbase.py +191 -0
  997. wx/lib/pubsub/core/topicargspec.py +77 -0
  998. wx/lib/pubsub/core/topicdefnprovider.py +632 -0
  999. wx/lib/pubsub/core/topicexc.py +72 -0
  1000. wx/lib/pubsub/core/topicmgr.py +456 -0
  1001. wx/lib/pubsub/core/topicobj.py +472 -0
  1002. wx/lib/pubsub/core/topictreetraverser.py +143 -0
  1003. wx/lib/pubsub/core/topicutils.py +118 -0
  1004. wx/lib/pubsub/core/treeconfig.py +21 -0
  1005. wx/lib/pubsub/core/validatedefnargs.py +29 -0
  1006. wx/lib/pubsub/core/weakmethod.py +102 -0
  1007. wx/lib/pubsub/policies.py +24 -0
  1008. wx/lib/pubsub/pub.py +199 -0
  1009. wx/lib/pubsub/py2and3.py +608 -0
  1010. wx/lib/pubsub/setuparg1.py +47 -0
  1011. wx/lib/pubsub/setupkwargs.py +29 -0
  1012. wx/lib/pubsub/utils/__init__.py +27 -0
  1013. wx/lib/pubsub/utils/exchandling.py +100 -0
  1014. wx/lib/pubsub/utils/misc.py +100 -0
  1015. wx/lib/pubsub/utils/notification.py +331 -0
  1016. wx/lib/pubsub/utils/topictreeprinter.py +195 -0
  1017. wx/lib/pubsub/utils/xmltopicdefnprovider.py +287 -0
  1018. wx/lib/pydocview.py +3300 -0
  1019. wx/lib/rcsizer.py +229 -0
  1020. wx/lib/resizewidget.py +357 -0
  1021. wx/lib/scrolledpanel.py +225 -0
  1022. wx/lib/sheet.py +350 -0
  1023. wx/lib/sized_controls.py +691 -0
  1024. wx/lib/softwareupdate.py +361 -0
  1025. wx/lib/splitter.py +925 -0
  1026. wx/lib/statbmp.py +199 -0
  1027. wx/lib/stattext.py +322 -0
  1028. wx/lib/throbber.py +425 -0
  1029. wx/lib/ticker.py +295 -0
  1030. wx/lib/ticker_xrc.py +48 -0
  1031. wx/lib/utils.py +89 -0
  1032. wx/lib/wordwrap.py +97 -0
  1033. wx/lib/wxcairo/__init__.py +124 -0
  1034. wx/lib/wxcairo/wx_cairocffi.py +200 -0
  1035. wx/lib/wxcairo/wx_pycairo.py +463 -0
  1036. wx/lib/wxpTag.py +274 -0
  1037. wx/locale/af/LC_MESSAGES/wxstd.mo +0 -0
  1038. wx/locale/an/LC_MESSAGES/wxstd.mo +0 -0
  1039. wx/locale/ar/LC_MESSAGES/wxstd.mo +0 -0
  1040. wx/locale/ca/LC_MESSAGES/wxstd.mo +0 -0
  1041. wx/locale/ca@valencia/LC_MESSAGES/wxstd.mo +0 -0
  1042. wx/locale/cs/LC_MESSAGES/wxstd.mo +0 -0
  1043. wx/locale/da/LC_MESSAGES/wxstd.mo +0 -0
  1044. wx/locale/de/LC_MESSAGES/wxstd.mo +0 -0
  1045. wx/locale/el/LC_MESSAGES/wxstd.mo +0 -0
  1046. wx/locale/es/LC_MESSAGES/wxstd.mo +0 -0
  1047. wx/locale/eu/LC_MESSAGES/wxstd.mo +0 -0
  1048. wx/locale/fa_IR/LC_MESSAGES/wxstd.mo +0 -0
  1049. wx/locale/fi/LC_MESSAGES/wxstd.mo +0 -0
  1050. wx/locale/fr/LC_MESSAGES/wxstd.mo +0 -0
  1051. wx/locale/gl_ES/LC_MESSAGES/wxstd.mo +0 -0
  1052. wx/locale/hi/LC_MESSAGES/wxstd.mo +0 -0
  1053. wx/locale/hr/LC_MESSAGES/wxstd.mo +0 -0
  1054. wx/locale/hu/LC_MESSAGES/wxstd.mo +0 -0
  1055. wx/locale/id/LC_MESSAGES/wxstd.mo +0 -0
  1056. wx/locale/it/LC_MESSAGES/wxstd.mo +0 -0
  1057. wx/locale/ja/LC_MESSAGES/wxstd.mo +0 -0
  1058. wx/locale/ka/LC_MESSAGES/wxstd.mo +0 -0
  1059. wx/locale/ko_KR/LC_MESSAGES/wxstd.mo +0 -0
  1060. wx/locale/lt/LC_MESSAGES/wxstd.mo +0 -0
  1061. wx/locale/lv/LC_MESSAGES/wxstd.mo +0 -0
  1062. wx/locale/ms/LC_MESSAGES/wxstd.mo +0 -0
  1063. wx/locale/nb/LC_MESSAGES/wxstd.mo +0 -0
  1064. wx/locale/ne/LC_MESSAGES/wxstd.mo +0 -0
  1065. wx/locale/nl/LC_MESSAGES/wxstd.mo +0 -0
  1066. wx/locale/pl/LC_MESSAGES/wxstd.mo +0 -0
  1067. wx/locale/pt/LC_MESSAGES/wxstd.mo +0 -0
  1068. wx/locale/pt_BR/LC_MESSAGES/wxstd.mo +0 -0
  1069. wx/locale/ro/LC_MESSAGES/wxstd.mo +0 -0
  1070. wx/locale/ru/LC_MESSAGES/wxstd.mo +0 -0
  1071. wx/locale/sk/LC_MESSAGES/wxstd.mo +0 -0
  1072. wx/locale/sl/LC_MESSAGES/wxstd.mo +0 -0
  1073. wx/locale/sq/LC_MESSAGES/wxstd.mo +0 -0
  1074. wx/locale/sv/LC_MESSAGES/wxstd.mo +0 -0
  1075. wx/locale/ta/LC_MESSAGES/wxstd.mo +0 -0
  1076. wx/locale/tr/LC_MESSAGES/wxstd.mo +0 -0
  1077. wx/locale/uk/LC_MESSAGES/wxstd.mo +0 -0
  1078. wx/locale/vi/LC_MESSAGES/wxstd.mo +0 -0
  1079. wx/locale/zh_CN/LC_MESSAGES/wxstd.mo +0 -0
  1080. wx/locale/zh_TW/LC_MESSAGES/wxstd.mo +0 -0
  1081. wx/media.py +27 -0
  1082. wx/media.pyi +223 -0
  1083. wx/msw.py +13 -0
  1084. wx/msw.pyi +65 -0
  1085. wx/propgrid.py +1451 -0
  1086. wx/propgrid.pyi +7914 -0
  1087. wx/py/CHANGES.txt +796 -0
  1088. wx/py/Py.ico +0 -0
  1089. wx/py/PyAlaCarte.py +34 -0
  1090. wx/py/PyAlaMode.py +34 -0
  1091. wx/py/PyAlaModeTest.py +33 -0
  1092. wx/py/PyCrust.ico +0 -0
  1093. wx/py/PyCrust.py +78 -0
  1094. wx/py/PyCrust_16.png +0 -0
  1095. wx/py/PyCrust_32.png +0 -0
  1096. wx/py/PyFilling.py +35 -0
  1097. wx/py/PyShell.py +78 -0
  1098. wx/py/PySlices.ico +0 -0
  1099. wx/py/PySlices.py +98 -0
  1100. wx/py/PySlicesShell.py +94 -0
  1101. wx/py/PySlices_16.png +0 -0
  1102. wx/py/PySlices_32.png +0 -0
  1103. wx/py/PyWrap.py +52 -0
  1104. wx/py/README.txt +77 -0
  1105. wx/py/__init__.py +20 -0
  1106. wx/py/buffer.py +136 -0
  1107. wx/py/crust.py +403 -0
  1108. wx/py/crustslices.py +403 -0
  1109. wx/py/dispatcher.py +259 -0
  1110. wx/py/document.py +37 -0
  1111. wx/py/editor.py +844 -0
  1112. wx/py/editwindow.py +299 -0
  1113. wx/py/filling.py +357 -0
  1114. wx/py/frame.py +978 -0
  1115. wx/py/images.py +212 -0
  1116. wx/py/interpreter.py +170 -0
  1117. wx/py/introspect.py +393 -0
  1118. wx/py/magic.py +98 -0
  1119. wx/py/parse.py +134 -0
  1120. wx/py/path.py +36 -0
  1121. wx/py/pseudo.py +99 -0
  1122. wx/py/shell.py +1588 -0
  1123. wx/py/sliceshell.py +3814 -0
  1124. wx/py/tests/test_interpreter.py +71 -0
  1125. wx/py/tests/test_introspect.py +862 -0
  1126. wx/py/tests/test_pseudo.py +70 -0
  1127. wx/py/tests/test_version.py +36 -0
  1128. wx/py/tests/testall.py +22 -0
  1129. wx/py/version.py +7 -0
  1130. wx/ribbon.py +45 -0
  1131. wx/ribbon.pyi +2494 -0
  1132. wx/richtext.py +142 -0
  1133. wx/richtext.pyi +12113 -0
  1134. wx/siplib.cp313-win_amd64.pyd +0 -0
  1135. wx/stc.py +58 -0
  1136. wx/stc.pyi +8463 -0
  1137. wx/svg/__init__.py +364 -0
  1138. wx/svg/_nanosvg.cp313-win_amd64.pyd +0 -0
  1139. wx/tools/__init__.py +18 -0
  1140. wx/tools/dbg.py +268 -0
  1141. wx/tools/genaxmodule.py +50 -0
  1142. wx/tools/helpviewer.py +92 -0
  1143. wx/tools/img2img.py +85 -0
  1144. wx/tools/img2png.py +54 -0
  1145. wx/tools/img2py.py +309 -0
  1146. wx/tools/img2xpm.py +54 -0
  1147. wx/tools/pywxrc.py +949 -0
  1148. wx/tools/wxget.py +254 -0
  1149. wx/tools/wxget_docs_demo.py +186 -0
  1150. wx/wxbase315u_net_vc140_x64.dll +0 -0
  1151. wx/wxbase315u_vc140_x64.dll +0 -0
  1152. wx/wxbase315u_xml_vc140_x64.dll +0 -0
  1153. wx/wxmsw315u_adv_vc140_x64.dll +0 -0
  1154. wx/wxmsw315u_aui_vc140_x64.dll +0 -0
  1155. wx/wxmsw315u_core_vc140_x64.dll +0 -0
  1156. wx/wxmsw315u_gl_vc140_x64.dll +0 -0
  1157. wx/wxmsw315u_html_vc140_x64.dll +0 -0
  1158. wx/wxmsw315u_media_vc140_x64.dll +0 -0
  1159. wx/wxmsw315u_propgrid_vc140_x64.dll +0 -0
  1160. wx/wxmsw315u_qa_vc140_x64.dll +0 -0
  1161. wx/wxmsw315u_ribbon_vc140_x64.dll +0 -0
  1162. wx/wxmsw315u_richtext_vc140_x64.dll +0 -0
  1163. wx/wxmsw315u_stc_vc140_x64.dll +0 -0
  1164. wx/wxmsw315u_webview_vc140_x64.dll +0 -0
  1165. wx/wxmsw315u_xrc_vc140_x64.dll +0 -0
  1166. wx/xml.py +15 -0
  1167. wx/xml.pyi +575 -0
  1168. wx/xrc.py +65 -0
  1169. wx/xrc.pyi +742 -0
  1170. wxPython_zombie-3.1.5.8.dist-info/LICENSE.txt +950 -0
  1171. wxPython_zombie-3.1.5.8.dist-info/METADATA +107 -0
  1172. wxPython_zombie-3.1.5.8.dist-info/RECORD +1175 -0
  1173. wxPython_zombie-3.1.5.8.dist-info/WHEEL +5 -0
  1174. wxPython_zombie-3.1.5.8.dist-info/entry_points.txt +2 -0
  1175. wxPython_zombie-3.1.5.8.dist-info/top_level.txt +1 -0
wx/lib/graphics.py ADDED
@@ -0,0 +1,1939 @@
1
+ #----------------------------------------------------------------------
2
+ # Name: wx.lib.graphics
3
+ # Purpose: A wx.GraphicsContext-like API implemented using cairo
4
+ # and wx.lib.wxcairo.
5
+ #
6
+ # Author: Robin Dunn
7
+ #
8
+ # Created: 15-Sept-2008
9
+ # Copyright: (c) 2008-2020 by Total Control Software
10
+ # Licence: wxWindows license
11
+ # Tags: phoenix-port
12
+ #----------------------------------------------------------------------
13
+
14
+ """
15
+ This module implements an API similar to :class:`wx.GraphicsContext` and its
16
+ related classes. In this case the implementation for all platforms is done
17
+ using Cairo, via the :mod:`wx.lib.wxcairo` glue module.
18
+
19
+ Why do this? Why not just use ``wx.GraphicsContext`` everywhere? Using Cairo
20
+ on every platform enables us to more easily be totally consistent on all
21
+ platforms. Implementing it in Python means that it is easy to fill in the
22
+ gaps in functionality with features of Cairo that ``wx.GraphicsContext`` may
23
+ not provide, like converting text to a path, using compositing operators, or
24
+ being able to provide an implementation for things like context.Clear().
25
+
26
+ Why not just use Cairo directly? There may be times when you do want to use
27
+ ``wx.GrpahicsContext``, so being able to share code between that and this
28
+ implementation is nice. Also, I like the class hierarchy and API exposed by
29
+ the ``wx.GraphicsContext`` classes a little better than Cairo's.
30
+
31
+ .. note:: It is possible to write code using this module that is **not**
32
+ compatible with :class:`wx.GraphicsContext` code, because, you know, this
33
+ is Python and it is lots more flexible and powerful. However the intent
34
+ is that the reverse will not be true, that code compatible with
35
+ ``wx.GraphicsContext`` will (mostly) work when using these classes instead.
36
+ Care should be taken when modifying this module so that the compatibility
37
+ is maintained.
38
+ """
39
+
40
+ import math
41
+ import six
42
+
43
+ import wx
44
+ import wx.lib.wxcairo as wxcairo
45
+ import cairo
46
+
47
+
48
+
49
+ # Other ideas:
50
+ # 1. TextToPath (or maybe make this part of the Path class
51
+ # 3. Relative moves, lines, curves, etc.
52
+ # 5. maybe expose cairo_paint, cairo_paint_with_alpha, cairo_mask?
53
+
54
+ #---------------------------------------------------------------------------
55
+ # Image surface formats
56
+
57
+ FORMAT_ARGB32 = cairo.FORMAT_ARGB32
58
+ FORMAT_RGB24 = cairo.FORMAT_RGB24
59
+ FORMAT_A8 = cairo.FORMAT_A8
60
+ FORMAT_A1 = cairo.FORMAT_A1
61
+
62
+
63
+ #---------------------------------------------------------------------------
64
+ # Compositing operators. See http://cairographics.org/operators
65
+
66
+ # clear destination layer (bounded)
67
+ OPERATOR_CLEAR = cairo.OPERATOR_CLEAR
68
+
69
+ # replace destination layer (bounded)
70
+ OPERATOR_SOURCE = cairo.OPERATOR_SOURCE
71
+
72
+ # draw source layer on top of destination layer (bounded)
73
+ OPERATOR_OVER = cairo.OPERATOR_OVER
74
+
75
+ # draw source where there was destination content (unbounded)
76
+ OPERATOR_IN = cairo.OPERATOR_IN
77
+
78
+ # draw source where there was no destination content (unbounded)
79
+ OPERATOR_OUT = cairo.OPERATOR_OUT
80
+
81
+ # draw source on top of destination content and only there
82
+ OPERATOR_ATOP = cairo.OPERATOR_ATOP
83
+
84
+ # ignore the source
85
+ OPERATOR_DEST = cairo.OPERATOR_DEST
86
+
87
+ # draw destination on top of source
88
+ OPERATOR_DEST_OVER = cairo.OPERATOR_DEST_OVER
89
+
90
+ # leave destination only where there was source content (unbounded)
91
+ OPERATOR_DEST_IN = cairo.OPERATOR_DEST_IN
92
+
93
+ # leave destination only where there was no source content
94
+ OPERATOR_DEST_OUT = cairo.OPERATOR_DEST_OUT
95
+
96
+ # leave destination on top of source content and only there (unbounded)
97
+ OPERATOR_DEST_ATOP = cairo.OPERATOR_DEST_ATOP
98
+
99
+ # source and destination are shown where there is only one of them
100
+ OPERATOR_XOR = cairo.OPERATOR_XOR
101
+
102
+ # source and destination layers are accumulated
103
+ OPERATOR_ADD = cairo.OPERATOR_ADD
104
+
105
+ # like over, but assuming source and dest are disjoint geometries
106
+ OPERATOR_SATURATE = cairo.OPERATOR_SATURATE
107
+
108
+
109
+
110
+ #---------------------------------------------------------------------------
111
+ # Anti-alias modes. Note that according to the Cairo docs none of the
112
+ # current backends support the the SUBPIXEL mode.
113
+
114
+ # Use the default antialiasing for the subsystem and target device
115
+ ANTIALIAS_DEFAULT = cairo.ANTIALIAS_DEFAULT
116
+
117
+ # Use a bilevel alpha mask
118
+ ANTIALIAS_NONE = cairo.ANTIALIAS_NONE
119
+
120
+ # Perform single-color antialiasing (using shades of gray for black
121
+ # text on a white background, for example).
122
+ ANTIALIAS_GRAY = cairo.ANTIALIAS_GRAY
123
+
124
+ # Perform antialiasing by taking advantage of the order of subpixel
125
+ # elements on devices such as LCD panels
126
+ ANTIALIAS_SUBPIXEL = cairo.ANTIALIAS_SUBPIXEL
127
+
128
+
129
+
130
+ #---------------------------------------------------------------------------
131
+ # A decorator that makes creating properties a little cleaner and simpler
132
+
133
+ def Property( function ):
134
+ return property( **function() )
135
+
136
+ #---------------------------------------------------------------------------
137
+
138
+ # We'll just use None instead of "Null (invalid) objects"
139
+ NullGraphicsPen = None
140
+ NullGraphicsBrush = None
141
+ NullGraphicsFont = None
142
+ NullGraphicsMatrix = None
143
+ NullGraphicsPath = None
144
+
145
+
146
+ # This class probably isn't needed at all anymore since we'll just use None
147
+ # instead of the Null objects, but we'll keep it anyway in case it's needed to
148
+ # help write compatible code.
149
+ class GraphicsObject(object):
150
+ """
151
+ Base class for the other ``Graphics*`` classes.
152
+
153
+ There should be no need to use this directly, it is just here for
154
+ compatibility with :class:`wx.GraphicsObject`.
155
+ """
156
+
157
+ def IsNull(self):
158
+ """
159
+ Returns whether the object is valid.
160
+ """
161
+ return False
162
+
163
+
164
+ #---------------------------------------------------------------------------
165
+
166
+ class GraphicsPen(GraphicsObject):
167
+ """
168
+ A ``GraphicsPen`` is used to define the properties of how a stroke is drawn.
169
+
170
+ The properties and features of this class are similar to :class:`wx.Pen`,
171
+ and a :class:`wx.Pen` can be used to initialize a ``GraphicsPen`` using the
172
+ :meth:`GraphicsPen.CreateFromPen` staticmethod.
173
+ """
174
+ _capMap = { wx.CAP_BUTT : cairo.LINE_CAP_BUTT,
175
+ wx.CAP_ROUND : cairo.LINE_CAP_ROUND,
176
+ wx.CAP_PROJECTING : cairo.LINE_CAP_SQUARE }
177
+
178
+ _joinMap = { wx.JOIN_BEVEL : cairo.LINE_JOIN_BEVEL,
179
+ wx.JOIN_MITER : cairo.LINE_JOIN_MITER,
180
+ wx.JOIN_ROUND : cairo.LINE_JOIN_ROUND }
181
+
182
+
183
+ def __init__(self, colour=wx.BLACK, width=1, style=wx.SOLID):
184
+ """
185
+ Create a new ``GraphicsPen``
186
+ """
187
+ GraphicsObject.__init__(self)
188
+ self._colour = _makeColour(colour)
189
+ self._width = width
190
+ self._style = style
191
+ self._cap = wx.CAP_ROUND
192
+ self._dashes = []
193
+ self._join = wx.JOIN_ROUND
194
+ self._stipple = None
195
+ self._pattern = None
196
+
197
+
198
+ @staticmethod
199
+ def CreateFromPen(pen):
200
+ """Convert a :class:`wx.Pen` or :class:`wx.GraphicsPenInfo` to a ``GraphicsPen``"""
201
+ assert isinstance(pen, (wx.Pen, wx.GraphicsPenInfo))
202
+ p = GraphicsPen(pen.GetColour(), pen.GetWidth(), pen.GetStyle())
203
+ p._cap = pen.GetCap()
204
+ p._join = pen.GetJoin()
205
+ if isinstance(pen, wx.Pen):
206
+ # TODO: GraphicsPenInfo still needs Dashes support added.
207
+ p._dashes = pen.GetDashes()
208
+ return p
209
+
210
+
211
+ @staticmethod
212
+ def CreateFromPattern(pattern, width=1):
213
+ """
214
+ Create a ``GraphicsPen`` directly from a Cairo Pattern object.
215
+ This is similar to using a stipple bitmap, but saves a step, and
216
+ patterns can include gradients, etc.
217
+ """
218
+ p = GraphicsPen(wx.BLACK, width, wx.STIPPLE)
219
+ p._pattern = pattern
220
+ return p
221
+
222
+
223
+ @Property
224
+ def Colour():
225
+ def fget(self):
226
+ """
227
+ The color associated with this pen, to be used when drawing the line.
228
+
229
+ :type: :class:`wx.Colour`
230
+ """
231
+ return self._colour
232
+ def fset(self, value):
233
+ self._colour = value
234
+ return locals()
235
+
236
+ @Property
237
+ def Width():
238
+ def fget(self):
239
+ """
240
+ The width of the line to be drawn with this pen.
241
+
242
+ :type: int or float
243
+ """
244
+ return self._width
245
+ def fset(self, value):
246
+ self._width = value
247
+ return locals()
248
+
249
+ @Property
250
+ def Style():
251
+ def fget(self):
252
+ """
253
+ Defines the type of pen, including things like solid, dashed, stipple, etc.
254
+
255
+ :type: :ref:`wx.PenStyle`
256
+ """
257
+ return self._style
258
+ def fset(self, value):
259
+ self._style = value
260
+ return locals()
261
+
262
+ @Property
263
+ def Cap():
264
+ def fget(self):
265
+ """
266
+ The style of the end cap used when drawing with the pen.
267
+
268
+ :type: :ref:`wx.PenCap`
269
+ """
270
+ return self._cap
271
+ def fset(self, value):
272
+ self._cap = value
273
+ return locals()
274
+
275
+ @Property
276
+ def Dashes():
277
+ def fget(self):
278
+ """
279
+ Dashes is a sequence of values defining the size of line segments and blanks
280
+ to use when drawing a line.
281
+ """
282
+ return self._dashes
283
+ def fset(self, value):
284
+ self._dashes = value
285
+ return locals()
286
+
287
+ @Property
288
+ def Join():
289
+ def fget(self):
290
+ """
291
+ The pen's join style, used when drawing connected lines.
292
+
293
+ The default is ``wx.JOIN_ROUND``.
294
+
295
+ :type: :ref:`wx.PenJoin`
296
+ """
297
+ return self._join
298
+ def fset(self, value):
299
+ self._join = value
300
+ return locals()
301
+
302
+ @Property
303
+ def Stipple():
304
+ def fget(self):
305
+ """
306
+ Stipple is a bitmap to use as a pattern when drawing a line with the pen.
307
+
308
+ This will be converted to a Cairo ``Pattern`` when applied to
309
+ a :class:`GraphicsContext`.
310
+
311
+ :type: :class:`wx.Bitmap`
312
+ """
313
+ return self._stipple
314
+ def fset(self, value):
315
+ self._stipple = value
316
+ self._pattern = None
317
+ return locals()
318
+
319
+ @Property
320
+ def Pattern():
321
+ def fget(self):
322
+ """
323
+ A pattern to be used when drawing a line with the pen.
324
+
325
+ :type: Cairo ``Pattern``
326
+ """
327
+ return self._pattern
328
+ def fset(self, value):
329
+ self._pattern = value
330
+ return locals()
331
+
332
+
333
+ def Apply(self, ctx):
334
+ """
335
+ Apply this pen's properties to the given context.
336
+ Called by :class:`GraphicsContext` as needed.
337
+ """
338
+
339
+ # set up the context with this pen's parameters
340
+ ctx = ctx.GetNativeContext()
341
+ ctx.set_line_width(self._width)
342
+ ctx.set_line_cap(self._capMap[self._cap])
343
+ ctx.set_line_join(self._joinMap[self._join])
344
+ ctx.set_dash([])
345
+
346
+ if self._style == wx.SOLID:
347
+ ctx.set_source_rgba( *_colourToValues(self._colour) )
348
+
349
+ elif self._style == wx.STIPPLE:
350
+ if not self._pattern and self._stipple:
351
+ # make a pattern from the stipple bitmap
352
+ img = wxcairo.ImageSurfaceFromBitmap(self._stipple)
353
+ self._pattern = cairo.SurfacePattern(img)
354
+ self._pattern.set_extend(cairo.EXTEND_REPEAT)
355
+ ctx.set_source(self._pattern)
356
+
357
+ elif self._style == wx.USER_DASH:
358
+ ctx.set_source_rgba( *_colourToValues(self._colour) )
359
+ ctx.set_dash(self._dashes)
360
+
361
+ elif self._style in [wx.DOT, wx.DOT_DASH, wx.LONG_DASH, wx.SHORT_DASH]:
362
+ ctx.set_source_rgba( *_colourToValues(self._colour) )
363
+ ctx.set_dash( _stdDashes(self._style, self._width) )
364
+
365
+ elif self._style in [wx.BDIAGONAL_HATCH, wx.CROSSDIAG_HATCH, wx.FDIAGONAL_HATCH,
366
+ wx.CROSS_HATCH, wx.HORIZONTAL_HATCH, wx.VERTICAL_HATCH]:
367
+ pass # TODO make a stock pattern...
368
+
369
+
370
+ #---------------------------------------------------------------------------
371
+
372
+ class GraphicsBrush(GraphicsObject):
373
+ """
374
+ A ``GraphicsBrush`` is used to define how fills are painted.
375
+ They can have either a solid fill (colors with or without alpha), a
376
+ stipple created from a :class:`wx.Bitmap`, or a Cairo ``Pattern``
377
+ object.
378
+ """
379
+
380
+ def __init__(self, colour=wx.BLACK, style=wx.BRUSHSTYLE_SOLID):
381
+ """
382
+ Create a new ``GraphicsBrush``.
383
+ """
384
+ self._colour = _makeColour(colour)
385
+ self._style = style
386
+ self._stipple = None
387
+ self._pattern = None
388
+
389
+
390
+ @staticmethod
391
+ def CreateFromBrush(brush):
392
+ """
393
+ Converts a :class:`wx.Brush` to a ``GraphicsBrush``.
394
+ """
395
+ assert isinstance(brush, wx.Brush)
396
+ b = GraphicsBrush(brush.Colour, brush.Style)
397
+ if brush.Style == wx.BRUSHSTYLE_STIPPLE:
398
+ b._stipple = brush.Stipple
399
+ else:
400
+ b._stipple = None
401
+ return b
402
+
403
+
404
+ @staticmethod
405
+ def CreateFromPattern(pattern):
406
+ """
407
+ Create a ``GraphicsBrush`` directly from a Cairo ``Pattern`` object.
408
+ This is similar to using a stipple bitmap, but saves a step, and
409
+ patterns can include gradients, etc.
410
+ """
411
+ b = GraphicsBrush(style=wx.BRUSHSTYLE_STIPPLE)
412
+ b._pattern = pattern
413
+ return b
414
+
415
+
416
+ @Property
417
+ def Colour():
418
+ def fget(self):
419
+ """
420
+ The color to use when filling with the brush.
421
+
422
+ :type: :class:`wx.Colour`
423
+ """
424
+ return self._colour
425
+ def fset(self, value):
426
+ self._colour = value
427
+ return locals()
428
+
429
+ @Property
430
+ def Style():
431
+ def fget(self):
432
+ """
433
+ The style of the brush to be used when filling.
434
+ Currently, ``wx.BRUSHSTYLE_SOLID`` and ``wx.BRUSHSTYLE_STIPPLE``
435
+ are supported.
436
+
437
+ :type: :ref:`wx.BrushStyle`
438
+ """
439
+ return self._style
440
+ def fset(self, value):
441
+ self._style = value
442
+ return locals()
443
+
444
+ @Property
445
+ def Stipple():
446
+ def fget(self):
447
+ """
448
+ The Stipple is a bitmap to be used as a pattern when filling with this brush.
449
+
450
+ This will be converted to a Cairo ``Pattern`` when applied to
451
+ a :class:`GraphicsContext`.
452
+
453
+ :type: :class:`wx.Bitmap`
454
+ """
455
+ return self._stipple
456
+ def fset(self, value):
457
+ self._stipple = value
458
+ self._pattern = None
459
+ return locals()
460
+
461
+
462
+ @Property
463
+ def Pattern():
464
+ def fget(self):
465
+ """
466
+ A pattern to be used when filling with this brush.
467
+
468
+ :type: Cairo ``Pattern``
469
+ """
470
+ return self._pattern
471
+ def fset(self, value):
472
+ self._pattern = value
473
+ return locals()
474
+
475
+
476
+ def Apply(self, ctx):
477
+ """
478
+ Apply this brush's properties to the given context.
479
+ Called by :class:`GraphicsContext` as needed.
480
+ """
481
+ ctx = ctx.GetNativeContext()
482
+
483
+ if self._style == wx.BRUSHSTYLE_SOLID:
484
+ ctx.set_source_rgba( *_colourToValues(self._colour) )
485
+
486
+ elif self._style == wx.STIPPLE:
487
+ if not self._pattern and self._stipple:
488
+ # make a pattern from the stipple bitmap
489
+ img = wxcairo.ImageSurfaceFromBitmap(self._stipple)
490
+ self._pattern = cairo.SurfacePattern(img)
491
+ self._pattern.set_extend(cairo.EXTEND_REPEAT)
492
+ ctx.set_source(self._pattern)
493
+
494
+ #---------------------------------------------------------------------------
495
+
496
+ class GraphicsFont(GraphicsObject):
497
+ """
498
+ A ``GraphicsFont`` is an adapter to allow using :class:`wx.Font` with a
499
+ :class:`GraphicsContext` when drawing text.
500
+ """
501
+ def __init__(self):
502
+ """
503
+ Constructs a new ``GraphicsFont``.
504
+
505
+ .. note:: Currently user code should be using
506
+ :meth:`CreateFromFont` instead of creating new ``GraphicsFont``
507
+ instances themselves.
508
+ """
509
+ # TODO: Should we be able to create a GraphicsFont from other
510
+ # properties, or will it always be via a wx.Font? What about
511
+ # creating from a cairo.FontFace or cairo.ScaledFont?
512
+ self._font = None
513
+ self._colour = None
514
+ self._pointSize = None
515
+ self._fontface = None
516
+ # To remain consistent with the GC API a color is associated
517
+ # with the font, and nothing else. Since this is Cairo and
518
+ # it's easy to do, we'll also allow a brush to be used...
519
+ self._brush = None
520
+
521
+
522
+ def IsNull(self):
523
+ return self._font is None
524
+
525
+
526
+ @staticmethod
527
+ def CreateFromFont(font, colour=None):
528
+ """
529
+ Create a ``GraphicsFont from a :class:`wx.Font`.
530
+ Currently this is the only way to construct a ``GraphicsFont``.
531
+
532
+ :param wx.Font `font`: A ``wx.Font`` to use as a source of properties
533
+ to be used when creating the Cairo font.
534
+ :param wx.Colour `colour`: An optional colour to associate with the font.
535
+ """
536
+ f = GraphicsFont()
537
+ f._font = font
538
+ f._colour = _makeColour(colour)
539
+ f._pointSize = font.GetPointSize()
540
+ f._fontface = wxcairo.FontFaceFromFont(font)
541
+ return f
542
+
543
+
544
+ @Property
545
+ def Colour():
546
+ def fget(self):
547
+ """
548
+ The color to be associated with this font. It will be used as the
549
+ fill when drawing text with this font.
550
+
551
+ :type: :class:`wx.Colour`
552
+ """
553
+ return self._colour
554
+ def fset(self, value):
555
+ self._colour = value
556
+ return locals()
557
+
558
+
559
+ @Property
560
+ def PointSize():
561
+ def fget(self):
562
+ """
563
+ The size in points of the font.
564
+
565
+ :type: int or float
566
+ """
567
+ return self._pointSize
568
+ def fset(self, value):
569
+ self._pointSize = value
570
+ return locals()
571
+
572
+
573
+ @Property
574
+ def Brush():
575
+ def fget(self):
576
+ """
577
+ A ``GraphicsBrush`` to use for filling the text when using this
578
+ font. An alternative to using a plain colour.
579
+
580
+ :type: :class:`GraphicsBrush`
581
+ """
582
+ return self._brush
583
+ def fset(self, value):
584
+ self._brush = value
585
+ return locals()
586
+
587
+
588
+ def Apply(self, ctx, colour):
589
+ """
590
+ Apply this font's properties to the given context.
591
+ Called by :class:`GraphicsContext` as needed.
592
+ """
593
+ nctx = ctx.GetNativeContext()
594
+ if self._brush is not None:
595
+ self._brush.Apply(ctx)
596
+ else:
597
+ if colour is None: colour = wx.BLACK
598
+ nctx.set_source_rgba( *_colourToValues(colour) )
599
+ nctx.set_font_face(self._fontface)
600
+ nctx.set_font_size(self._pointSize)
601
+
602
+
603
+ #---------------------------------------------------------------------------
604
+
605
+ class GraphicsBitmap(GraphicsObject):
606
+ """
607
+ A GraphicsBitmap is a wrapper around a cairo ImageSurface. It can
608
+ be used as a source for drawing images, or as a target of drawing
609
+ operations.
610
+ """
611
+ def __init__(self, width=-1, height=-1, format=FORMAT_ARGB32):
612
+ """Create either a NULL GraphicsBitmap or an empty one if a size is given"""
613
+ self._surface = None
614
+ if width > 0 and height > 0:
615
+ self._surface = cairo.ImageSurface(format, width, height)
616
+
617
+
618
+ def IsNull(self):
619
+ return self._surface is None
620
+
621
+
622
+ @staticmethod
623
+ def CreateFromBitmap(bitmap):
624
+ """Create a GraphicsBitmap from a wx.Bitmap"""
625
+ b = GraphicsBitmap()
626
+ b._surface = wxcairo.ImageSurfaceFromBitmap(bitmap)
627
+ return b
628
+
629
+
630
+ @staticmethod
631
+ def CreateFromPNG(filename):
632
+ """Create a GraphicsBitmap from a PNG file"""
633
+ b = GraphicsBitmap()
634
+ b._surface = cairo.ImageSurface.create_from_png(filename)
635
+ return b
636
+
637
+
638
+ @staticmethod
639
+ def CreateFromSurface(surface):
640
+ """Use an existing cairo ImageSurface as a GraphicsBitmap"""
641
+ b = GraphicsBitmap()
642
+ b._surface = surface
643
+ return b
644
+
645
+
646
+ @staticmethod
647
+ def CreateFromBuffer(buffer, width, height,
648
+ format=FORMAT_ARGB32, stride=-1):
649
+ """
650
+ Creates a GraphicsBitmap that uses the given buffer object as
651
+ the pixel storage. This means that the current contents of
652
+ the buffer will be the initial state of the bitmap, and
653
+ anything drawn to this surface will be stored in the given
654
+ buffer.
655
+ """
656
+ b = GraphicsBitmap()
657
+ if stride == -1:
658
+ try:
659
+ stride = cairo.ImageSurface.format_stride_for_width(format, width)
660
+ except AttributeError:
661
+ stride = width * 4
662
+ b._surface = cairo.ImageSurface.create_for_data(
663
+ buffer, format, width, height, stride)
664
+
665
+ # save a reference to the buffer to ensure that it lives as
666
+ # long as this object does
667
+ b._buffer = buffer
668
+ return b
669
+
670
+
671
+ @Property
672
+ def Width():
673
+ def fget(self):
674
+ """The width of the bitmap and surface"""
675
+ return self._surface.get_width()
676
+ return locals()
677
+
678
+
679
+ @Property
680
+ def Height():
681
+ def fget(self):
682
+ """The height of the bitmap and surface"""
683
+ return self._surface.get_height()
684
+ return locals()
685
+
686
+
687
+ @Property
688
+ def Size():
689
+ def fget(self):
690
+ """A tuple consisting of the Width and Height"""
691
+ return (self.Width, self.Height)
692
+ return locals()
693
+
694
+
695
+ @Property
696
+ def Format():
697
+ def fget(self):
698
+ """
699
+ The type or format of the Cairo ``Surface``.
700
+ Typically ``FORMAT_ARGB32`` or ``FORMAT_RGB24``
701
+ """
702
+ return self._surface.get_format()
703
+ return locals()
704
+
705
+
706
+ @Property
707
+ def Stride():
708
+ def fget(self):
709
+ """
710
+ The "stride" of the Cairo ``Surface``, in bytes.
711
+ The stride is the distance in bytes from the beginning of one row
712
+ of the image data to the beginning of the next row.
713
+ """
714
+ return self._surface.get_stride()
715
+ return locals()
716
+
717
+
718
+ @Property
719
+ def Surface():
720
+ def fget(self):
721
+ """A reference to the Cairo ``Surface`` used for this bitmap."""
722
+ return self._surface
723
+ return locals()
724
+
725
+
726
+ def ConvertToImage(self):
727
+ """
728
+ Return the contents of this ``GraphicsBitmap`` as a :class:`wx.Image`.
729
+
730
+ Currently not implemented...
731
+ """
732
+ # TODO: implement this
733
+ return None
734
+
735
+
736
+ #---------------------------------------------------------------------------
737
+
738
+ class GraphicsMatrix(GraphicsObject):
739
+ """
740
+ A matrix holds an affine transformations, such as a scale,
741
+ rotation, shear, or a combination of these, and is used to convert
742
+ between different coordinate spaces.
743
+ """
744
+ def __init__(self):
745
+ self._matrix = cairo.Matrix()
746
+
747
+
748
+ def Set(self, a=1.0, b=0.0, c=0.0, d=1.0, tx=0.0, ty=0.0):
749
+ """Set the components of the matrix by value, default values
750
+ are the identity matrix."""
751
+ self._matrix = cairo.Matrix(a, b, c, d, tx, ty)
752
+
753
+
754
+ def Get(self):
755
+ """Return the component values of the matrix as a tuple."""
756
+ return tuple(self._matrix)
757
+
758
+
759
+ def GetNativeMatrix(self):
760
+ return self._matrix
761
+
762
+
763
+ def Concat(self, matrix):
764
+ """Concatenates the matrix passed with the current matrix."""
765
+ self._matrix = self._matrix * matrix._matrix
766
+ return self
767
+
768
+
769
+ def Invert(self):
770
+ """Inverts the matrix."""
771
+ self._matrix.invert()
772
+ return self
773
+
774
+
775
+ def IsEqual(self, matrix):
776
+ """Returns True if the elements of the transformation matrices are equal."""
777
+ return self._matrix == matrix._matrix
778
+
779
+
780
+ def IsIdentity(self):
781
+ """Returns True if this is the identity matrix."""
782
+ return self._matrix == cairo.Matrix()
783
+
784
+
785
+ def Rotate(self, angle):
786
+ """Rotates the matrix in radians"""
787
+ self._matrix.rotate(angle)
788
+ return self
789
+
790
+
791
+ def Scale(self, xScale, yScale):
792
+ """Scale the matrix"""
793
+ self._matrix.scale(xScale, yScale)
794
+ return self
795
+
796
+
797
+ def Translate(self, dx, dy):
798
+ """Translate the matrix. This shifts the origin."""
799
+ self._matrix.translate(dx, dy)
800
+ return self
801
+
802
+
803
+ def TransformPoint(self, x, y):
804
+ """Applies this matrix to a point and returns the result"""
805
+ return self._matrix.transform_point(x, y)
806
+
807
+
808
+ def TransformDistance(self, dx, dy):
809
+ """
810
+ Applies this matrix to a distance (ie. performs all transforms
811
+ except translations.)
812
+ """
813
+ return self._matrix.transform_distance(dx, dy)
814
+
815
+
816
+ def Clone(self):
817
+ m = GraphicsMatrix()
818
+ m.Set(*self.Get())
819
+ return m
820
+
821
+ #---------------------------------------------------------------------------
822
+
823
+ class GraphicsPath(GraphicsObject):
824
+ """
825
+ A GraphicsPath is a representation of a geometric path, essentially
826
+ a collection of lines and curves. Paths can be used to define
827
+ areas to be stroked and filled on a GraphicsContext.
828
+ """
829
+ def __init__(self):
830
+ # A path is essentially just a context that we use just for
831
+ # collecting path moves, lines, and curves in order to apply
832
+ # them to the real context. So we'll use a 1x1 image surface
833
+ # for the backend, since we won't ever actually use it for
834
+ # rendering in this context.
835
+ surface = cairo.ImageSurface(FORMAT_ARGB32, 1, 1)
836
+ self._pathContext = cairo.Context(surface)
837
+
838
+
839
+ def AddArc(self, x, y, radius, startAngle, endAngle, clockwise=True):
840
+ """
841
+ Adds an arc of a circle centering at (x,y) with radius, from
842
+ startAngle to endAngle.
843
+ """
844
+ # clockwise means positive in our system (y pointing downwards)
845
+ if clockwise or endAngle-startAngle >= 2*math.pi:
846
+ self._pathContext.arc(x, y, radius, startAngle, endAngle)
847
+ else:
848
+ self._pathContext.arc_negative(x, y, radius, startAngle, endAngle)
849
+ return self
850
+
851
+
852
+ def AddArcToPoint(self, x1, y1 , x2, y2, radius ):
853
+ """
854
+ Adds a an arc to two tangents connecting (current) to (x1,y1)
855
+ and (x1,y1) to (x2,y2), also a straight line from (current) to
856
+ (x1,y1)
857
+ """
858
+ current = wx.Point2D(*self.GetCurrentPoint())
859
+ p1 = wx.Point2D(x1, y1)
860
+ p2 = wx.Point2D(x2, y2)
861
+
862
+ v1 = current - p1
863
+ v1.Normalize()
864
+ v2 = p2 - p1
865
+ v2.Normalize()
866
+
867
+ alpha = v1.GetVectorAngle() - v2.GetVectorAngle()
868
+ if alpha < 0:
869
+ alpha = 360 + alpha
870
+ alpha = math.radians(alpha)
871
+
872
+ dist = radius / math.sin(alpha/2) * math.cos(alpha/2)
873
+
874
+ # calculate tangential points
875
+ t1 = (v1 * dist) + p1
876
+ t2 = (v2 * dist) + p1
877
+
878
+ nv1 = wx.Point2D(*v1.Get())
879
+ nv1.SetVectorAngle(v1.GetVectorAngle() - 90)
880
+ c = t1 + nv1 * radius
881
+
882
+ a1 = v1.GetVectorAngle() + 90
883
+ a2 = v2.GetVectorAngle() - 90
884
+
885
+ self.AddLineToPoint(t1.x, t1.y)
886
+ self.AddArc(c.x, c.y, radius, math.radians(a1), math.radians(a2), True)
887
+ self.AddLineToPoint(p2.x, p2.y)
888
+ return self
889
+
890
+
891
+ def AddCircle(self, x, y, radius):
892
+ """
893
+ Appends a new closed sub-path as a circle around (x,y).
894
+ """
895
+ self.MoveToPoint(x + radius, y)
896
+ self.AddArc( x, y, radius, 0, 2*math.pi, False)
897
+ self.CloseSubpath()
898
+ return self
899
+
900
+
901
+ def AddCurveToPoint(self, cx1, cy1, cx2, cy2, x, y):
902
+ """
903
+ Adds a cubic Bezier curve from the current point, using two
904
+ control points and an end point.
905
+ """
906
+ self._pathContext.curve_to(cx1, cy1, cx2, cy2, x, y)
907
+ return self
908
+
909
+
910
+ def AddEllipse(self, x, y, w, h):
911
+ """
912
+ Appends an ellipse fitting into the given rectangle as a closed sub-path.
913
+ """
914
+ rw = w / 2.0
915
+ rh = h / 2.0
916
+ xc = x + rw
917
+ yc = y + rh
918
+ m = GraphicsMatrix()
919
+ m.Translate(xc, yc)
920
+ m.Scale(rw / rh, 1.0)
921
+ p = GraphicsPath()
922
+ p.AddCircle(0,0, rh)
923
+ p.Transform(m)
924
+ self.AddPath(p)
925
+ return self
926
+
927
+
928
+ def AddLineToPoint(self, x, y):
929
+ """
930
+ Adds a straight line from the current point to (x,y)
931
+ """
932
+ self._pathContext.line_to(x, y)
933
+ return self
934
+
935
+
936
+ def AddPath(self, path):
937
+ """
938
+ Appends the given path to this path.
939
+ """
940
+ self._pathContext.append_path(path.GetNativePath())
941
+ return self
942
+
943
+
944
+ def AddQuadCurveToPoint(self, cx, cy, x, y):
945
+ """
946
+ Adds a quadratic Bezier curve from the current point, using a
947
+ control point and an end point.
948
+ """
949
+ # calculate using degree elevation to a cubic bezier
950
+ start = wx.Point2D()
951
+ start.x, start.y = self.GetCurrentPoint()
952
+ end = wx.Point2D(x, y)
953
+ c = wx.Point2D(cx, cy)
954
+ c1 = start * (1/3.0) + c * (2/3.0)
955
+ c2 = c * (2/3.0) + end * (1/3.0)
956
+ self.AddCurveToPoint(c1.x, c1.y, c2.x, c2.y, x, y);
957
+ return self
958
+
959
+
960
+ def AddRectangle(self, x, y, w, h):
961
+ """
962
+ Adds a new rectangle as a closed sub-path.
963
+ """
964
+ self._pathContext.rectangle(x, y, w, h)
965
+ return self
966
+
967
+
968
+ def AddRoundedRectangle(self, x, y, w, h, radius):
969
+ """
970
+ Adds a new rounded rectangle as a closed sub-path.
971
+ """
972
+ if radius == 0:
973
+ self.AddRectangle(x,y,w,h)
974
+ else:
975
+ self.MoveToPoint( x + w, y + h / 2.0)
976
+ self.AddArcToPoint(x + w, y + h, x + w / 2.0, y + h, radius)
977
+ self.AddArcToPoint(x, y + h, x, y + h / 2.0, radius)
978
+ self.AddArcToPoint(x, y , x + w / 2.0, y, radius)
979
+ self.AddArcToPoint(x + w, y, x + w, y + h / 2.0, radius)
980
+ self.CloseSubpath()
981
+ return self
982
+
983
+
984
+ def CloseSubpath(self):
985
+ """
986
+ Adds a line segment to the path from the current point to the
987
+ beginning of the current sub-path, and closes this sub-path.
988
+ """
989
+ self._pathContext.close_path()
990
+ return self
991
+
992
+
993
+ def Contains(self, x, y, fillStyle=wx.ODDEVEN_RULE):
994
+ """
995
+ Returns True if the point lies within the path.
996
+ """
997
+ d = { wx.WINDING_RULE : cairo.FILL_RULE_WINDING,
998
+ wx.ODDEVEN_RULE : cairo.FILL_RULE_EVEN_ODD }
999
+ rule = d[fillStyle]
1000
+ self._pathContext.set_fill_rule(rule)
1001
+ return self._pathContext.in_stroke(x,y) or self._pathContext.in_fill(x,y)
1002
+
1003
+
1004
+ def GetCurrentPoint(self):
1005
+ """
1006
+ Gets the current point of the path, which is conceptually the
1007
+ final point reached by the last path operation.
1008
+ """
1009
+ return self._pathContext.get_current_point()
1010
+
1011
+
1012
+ def GetNativePath(self):
1013
+ """
1014
+ Returns the path as a ``cairo.Path`` object.
1015
+ """
1016
+ return self._pathContext.copy_path()
1017
+
1018
+
1019
+ def MoveToPoint(self, x, y):
1020
+ """
1021
+ Begins a new sub-path at (x,y) by moving the "current point" there.
1022
+ """
1023
+ self._pathContext.move_to(x, y)
1024
+ return self
1025
+
1026
+
1027
+ def Transform(self, matrix):
1028
+ """
1029
+ Transforms each point in this path by the matrix
1030
+ """
1031
+ # as we don't have a true path object, we have to apply the
1032
+ # inverse matrix to the context
1033
+ # TODO: should we clone the matrix before inverting it?
1034
+ m = matrix.GetNativeMatrix()
1035
+ m.invert()
1036
+ self._pathContext.transform(m)
1037
+ return self
1038
+
1039
+
1040
+ def Clone(self):
1041
+ """
1042
+ Return a new path initialized with the current contents of this path.
1043
+ """
1044
+ p = GraphicsPath()
1045
+ p.AddPath(self)
1046
+ return p
1047
+
1048
+
1049
+ def GetBox(self):
1050
+ """
1051
+ Return the bounding box enclosing all points on this path.
1052
+ """
1053
+ x1,y1,x2,y2 = self._pathContext.stroke_extents()
1054
+ if x2 < x1:
1055
+ x = x2
1056
+ w = x1 - x2
1057
+ else:
1058
+ x = x1
1059
+ w = x2 - x1
1060
+
1061
+ if y2 < y1:
1062
+ y = y2
1063
+ h = y1 - y2
1064
+ else:
1065
+ y = y1
1066
+ h = y2 - y1
1067
+ return (x, y, w, h)
1068
+
1069
+
1070
+ #---------------------------------------------------------------------------
1071
+
1072
+ class GraphicsGradientStop(object):
1073
+ """
1074
+ This class represents a single color-stop in a gradient brush. The
1075
+ position is a floating point value between zero and 1.0 which represents
1076
+ the distance between the gradient's starting point and ending point.
1077
+ """
1078
+ def __init__(self, colour=wx.TransparentColour, pos=0.0):
1079
+ self.SetColour(colour)
1080
+ self.SetPosition(pos)
1081
+
1082
+ def GetColour(self):
1083
+ return self._colour
1084
+ def SetColour(self, value):
1085
+ value = _makeColour(value)
1086
+ assert isinstance(value, wx.Colour)
1087
+ self._colour = value
1088
+ Colour = property(GetColour, SetColour)
1089
+
1090
+
1091
+ def GetPosition(self):
1092
+ return self._pos
1093
+ def SetPosition(self, value):
1094
+ assert value >= 0.0 and value <= 1.0
1095
+ self._pos = value
1096
+ Position = property(GetPosition, SetPosition)
1097
+
1098
+
1099
+
1100
+ class GraphicsGradientStops(object):
1101
+ """
1102
+ An ordered collection of gradient color stops
1103
+ (i.e. a :class:`GraphicsGradientStop`) for a gradient brush. There is
1104
+ always at least the starting stop and the ending stop in the collection.
1105
+ """
1106
+ def __init__(self, startColour=wx.TransparentColour,
1107
+ endColour=wx.TransparentColour):
1108
+ self._stops = list()
1109
+ self.Add(startColour, 0.0)
1110
+ self.Add(endColour, 1.0)
1111
+
1112
+
1113
+ def Add(self, *args):
1114
+ """
1115
+ Add a new color to the collection. ``args`` may be either a gradient stop,
1116
+ or a colour and position.
1117
+ """
1118
+ if len(args) == 2:
1119
+ col, pos = args
1120
+ stop = GraphicsGradientStop(col, pos)
1121
+ elif len(args) == 1:
1122
+ stop = args[0]
1123
+ else:
1124
+ raise ValueError("Invalid parameters passed to Add")
1125
+ assert isinstance(stop, GraphicsGradientStop)
1126
+
1127
+ self._stops.append(stop)
1128
+ self._stops.sort(key=lambda x: x.Position)
1129
+
1130
+
1131
+ def GetCount(self):
1132
+ return len(self._stops)
1133
+ Count = property(GetCount)
1134
+ def __len__(self):
1135
+ return self.GetCount()
1136
+
1137
+
1138
+ def Item(self, n):
1139
+ return self._stops[n]
1140
+ def __getitem__(self, n):
1141
+ return self._stops[n]
1142
+
1143
+
1144
+ def GetStartColour(self):
1145
+ return self._stops[0].Colour
1146
+ def SetStartColour(self, col):
1147
+ self._stops[0].Colour = col
1148
+ StartColour = property(GetStartColour, SetStartColour)
1149
+
1150
+
1151
+ def GetEndColour(self):
1152
+ return self._stops[-1].Colour
1153
+ def SetEndColour(self, col):
1154
+ self._stops[-1].Colour = col
1155
+ EndColour = property(GetEndColour, SetEndColour)
1156
+
1157
+
1158
+ #---------------------------------------------------------------------------
1159
+
1160
+ class GraphicsContext(GraphicsObject):
1161
+ """
1162
+ The GraphicsContext is the object which facilitates drawing to a surface.
1163
+ """
1164
+ def __init__(self, context=None, size=None):
1165
+ """
1166
+ Create a new Context.
1167
+ Normally you should use one of the ``"Create"`` static methods.
1168
+ """
1169
+ self._context = context
1170
+ self._pen = None
1171
+ self._brush = None
1172
+ self._font = None
1173
+ self._fontColour = None
1174
+ self._layerOpacities = []
1175
+ self._width = 10000.0
1176
+ self._height = 10000.0
1177
+ if size is not None:
1178
+ self._width, self._height = size
1179
+
1180
+
1181
+ def IsNull(self):
1182
+ return self._context is None
1183
+
1184
+
1185
+ @staticmethod
1186
+ def Create(dc=None):
1187
+ """
1188
+ Create a new ``GraphicsContext``.
1189
+ Passing ``None`` will create a context suitable for measuring.
1190
+
1191
+ :param dc: ``None`` or a compatible :class:`wx.DC`
1192
+ """
1193
+ # TODO: Support creating directly from a wx.Window too.
1194
+ if dc is None:
1195
+ return GraphicsContext.CreateMeasuringContext()
1196
+
1197
+ assert isinstance(dc, wx.DC)
1198
+ ctx = wxcairo.ContextFromDC(dc)
1199
+ return GraphicsContext(ctx, dc.GetSize())
1200
+
1201
+
1202
+ @staticmethod
1203
+ def CreateFromNative(cairoContext):
1204
+ """Create a context from an existing cairo Context"""
1205
+ return GraphicsContext(cairoContext)
1206
+
1207
+
1208
+ @staticmethod
1209
+ def CreateMeasuringContext():
1210
+ """
1211
+ If you need a temporary context just to quickly measure some
1212
+ text extents, or etc. then using this function will be a
1213
+ little less expensive than creating a real DC for it.
1214
+ """
1215
+ surface = cairo.ImageSurface(FORMAT_ARGB32, 1, 1)
1216
+ ctx = cairo.Context(surface)
1217
+ return GraphicsContext(ctx,
1218
+ (surface.get_width(), surface.get_height()))
1219
+
1220
+
1221
+ @staticmethod
1222
+ def CreateFromSurface(surface):
1223
+ """
1224
+ Wrap a context around the given cairo Surface.
1225
+ Note that a :class:`GraphicsBitmap` contains a cairo ``ImageSurface``
1226
+ which is accessible via the ``Surface`` property.
1227
+ """
1228
+ return GraphicsContext(cairo.Context(surface),
1229
+ (surface.get_width(), surface.get_height()))
1230
+
1231
+ @staticmethod
1232
+ def CreateFromImage(image):
1233
+ """
1234
+ Create a GraphicsContext associated with a :class:`wx.Image`.
1235
+
1236
+ The image specifies the size of the context as well as whether alpha is
1237
+ supported (if :meth:`wx.Image.HasAlpha()`) or not and the initial contents of
1238
+ the context. The image object must have a life time greater than
1239
+ that of the new context as the context copies its contents back to the
1240
+ image when it is destroyed.
1241
+
1242
+ Not implemented yet...
1243
+ """
1244
+ # TODO: implement this
1245
+ raise NotImplementedError
1246
+
1247
+ @Property
1248
+ def Context():
1249
+ def fget(self):
1250
+ """A reference to the Cairo Context"""
1251
+ return self._context
1252
+ return locals()
1253
+
1254
+
1255
+ # Our implementation is able to create these things directly, but
1256
+ # we'll keep them here too for compatibility with wx.GraphicsContext.
1257
+
1258
+ def CreateBrush(self, brush):
1259
+ """
1260
+ Create a brush from a :class:`wx.Brush`.
1261
+ """
1262
+ return GraphicsBrush.CreateFromBrush(brush)
1263
+
1264
+ def CreateFont(self, font, colour=None):
1265
+ """
1266
+ Create a font from a :class:`wx.Font`
1267
+ """
1268
+ return GraphicsFont.CreateFromFont(font, colour)
1269
+
1270
+
1271
+ def CreateLinearGradientBrush(self, x1, y1, x2, y2, *args):
1272
+ """
1273
+ Creates a native brush having a linear gradient, starting at (x1,y1)
1274
+ to (x2,y2) with the given boundary colors or the specified stops.
1275
+
1276
+ The `*args` can be either a :class:`GraphicsGradientStops` or just
1277
+ two colours to be used as the starting and ending gradient colours.
1278
+ """
1279
+ if len(args) == 1:
1280
+ stops = args[0]
1281
+ elif len(args) == 2:
1282
+ c1 = _makeColour(c1)
1283
+ c2 = _makeColour(c2)
1284
+ stops = GraphicsGradientStops(c1, c2)
1285
+ else:
1286
+ raise ValueError("Invalid args passed to CreateLinearGradientBrush")
1287
+
1288
+ pattern = cairo.LinearGradient(x1, y1, x2, y2)
1289
+ for stop in stops:
1290
+ pattern.add_color_stop_rgba(stop.Position, *_colourToValues(stop.Colour))
1291
+ return GraphicsBrush.CreateFromPattern(pattern)
1292
+
1293
+
1294
+ def CreateRadialGradientBrush(self, xo, yo, xc, yc, radius, *args):
1295
+ """
1296
+ Creates a native brush, having a radial gradient originating at point
1297
+ (xo,yo) and ending on a circle around (xc,yc) with the given radius;
1298
+ the colours may be specified by just the two extremes or the full
1299
+ array of gradient stops.
1300
+
1301
+ The `*args` can be either a :class:`GraphicsGradientStops` or just two
1302
+ colours to be used as the starting and ending gradient colours.
1303
+ """
1304
+ if len(args) ==1:
1305
+ stops = args[0]
1306
+ elif len(args) == 2:
1307
+ oColour = _makeColour(oColour)
1308
+ cColour = _makeColour(cColour)
1309
+ stops = GraphicsGradientStops(oColour, cColour)
1310
+ else:
1311
+ raise ValueError("Invalid args passed to CreateLinearGradientBrush")
1312
+
1313
+ pattern = cairo.RadialGradient(xo, yo, 0.0, xc, yc, radius)
1314
+ for stop in stops:
1315
+ pattern.add_color_stop_rgba(stop.Position, *_colourToValues(stop.Colour))
1316
+ return GraphicsBrush.CreateFromPattern(pattern)
1317
+
1318
+
1319
+ def CreateMatrix(self, a=1.0, b=0, c=0, d=1.0, tx=0, ty=0):
1320
+ """
1321
+ Create a new matrix object.
1322
+ """
1323
+ m = GraphicsMatrix()
1324
+ m.Set(a, b, c, d, tx, ty)
1325
+ return m
1326
+
1327
+ def CreatePath(self):
1328
+ """
1329
+ Create a new path obejct.
1330
+ """
1331
+ return GraphicsPath()
1332
+
1333
+ def CreatePen(self, pen):
1334
+ """
1335
+ Create a new pen from a wx.Pen or a wx.GraphicsPenInfo.
1336
+ """
1337
+ return GraphicsPen.CreateFromPen(pen)
1338
+
1339
+
1340
+ def PushState(self):
1341
+ """
1342
+ Makes a copy of the current state of the context (ie the
1343
+ transformation matrix) and saves it on an internal stack of saved
1344
+ states. The saved state will be restored when meth:`PopState` is
1345
+ called.
1346
+ """
1347
+ self._context.save()
1348
+
1349
+
1350
+ def PopState(self):
1351
+ """
1352
+ Restore the most recently saved state which was saved with
1353
+ :meth:`PushState`.
1354
+ """
1355
+ self._context.restore()
1356
+
1357
+
1358
+ def Clip(self, x, y, w, h):
1359
+ """
1360
+ Adds the rectangle to the current clipping region. The
1361
+ clipping region causes drawing operations to be limited to the
1362
+ clipped areas of the context.
1363
+ """
1364
+ p = GraphicsPath()
1365
+ p.AddRectangle(x, y, w, h)
1366
+ self._context.append_path(p.GetNativePath())
1367
+ self._context.clip()
1368
+
1369
+
1370
+ def ClipRegion(self, region):
1371
+ """
1372
+ Adds the :class:`wx.Region` to the current clipping region.
1373
+ """
1374
+ p = GraphicsPath()
1375
+ ri = wx.RegionIterator(region)
1376
+ while ri:
1377
+ rect = ri.GetRect()
1378
+ p.AddRectangle( *rect )
1379
+ ri.Next()
1380
+ self._context.append_path(p.GetNativePath())
1381
+ self._context.clip()
1382
+
1383
+
1384
+ def ResetClip(self):
1385
+ """
1386
+ Resets the clipping region to the original shape of the context.
1387
+ """
1388
+ self._context.reset_clip()
1389
+
1390
+
1391
+ def GetNativeContext(self):
1392
+ return self._context
1393
+
1394
+
1395
+ def GetLogicalFunction(self):
1396
+ """
1397
+ Not implemented.
1398
+ Since DC logical functions are conceptually different than compositing
1399
+ operators don't pretend they are the same thing, or try to implement
1400
+ them using the compositing operators.
1401
+ """
1402
+ raise NotImplementedError("See GetCompositingOperator")
1403
+ def SetLogicalFunction(self, function):
1404
+ """Not implemented."""
1405
+ raise NotImplementedError("See SetCompositingOperator")
1406
+ LogicalFunction = property(GetLogicalFunction, SetLogicalFunction)
1407
+
1408
+
1409
+ def Translate(self, dx, dy):
1410
+ """
1411
+ Modifies the current transformation matrix by translating the
1412
+ user-space origin by (dx, dy).
1413
+ """
1414
+ self._context.translate(dx, dy)
1415
+
1416
+
1417
+ def Scale(self, xScale, yScale):
1418
+ """
1419
+ Modifies the current transformation matrix by translating the
1420
+ user-space axes by xScale and yScale.
1421
+ """
1422
+ self._context.scale(xScale, yScale)
1423
+
1424
+
1425
+ def Rotate(self, angle):
1426
+ """
1427
+ Modifies the current transformation matrix by rotating the
1428
+ user-space axes by angle radians.
1429
+ """
1430
+ self._context.rotate(angle)
1431
+
1432
+
1433
+ def ConcatTransform(self, matrix):
1434
+ """
1435
+ Modifies the current transformation matrix by applying matrix
1436
+ as an additional transformation.
1437
+ """
1438
+ self._context.transform(matrix.GetNativeMatrix())
1439
+
1440
+
1441
+ def SetTransform(self, matrix):
1442
+ """
1443
+ Set the context's current transformation matrix to matrix.
1444
+ """
1445
+ self._context.set_matrix(matrix.GetNativeMatrix())
1446
+
1447
+
1448
+ def GetTransform(self):
1449
+ """
1450
+ Returns the context's current transformation matrix.
1451
+ """
1452
+ gm = GraphicsMatrix()
1453
+ gm.Set( *tuple(self._context.get_matrix()) )
1454
+ return gm
1455
+ Transform = property(GetTransform, SetTransform)
1456
+
1457
+
1458
+ def SetPen(self, pen):
1459
+ """
1460
+ Set the pen to be used for stroking lines in future drawing
1461
+ operations. Either a :class:`wx.Pen` or a :class:`GraphicsPen`
1462
+ object may be used.
1463
+ """
1464
+ if isinstance(pen, wx.Pen):
1465
+ if not pen.IsOk() or pen.Style == wx.TRANSPARENT:
1466
+ pen = None
1467
+ else:
1468
+ pen = GraphicsPen.CreateFromPen(pen)
1469
+ self._pen = pen
1470
+
1471
+ def GetPen(self):
1472
+ """Returns the current pen."""
1473
+ return self._pen
1474
+ Pen = property(GetPen, SetPen)
1475
+
1476
+
1477
+ def SetBrush(self, brush):
1478
+ """
1479
+ Set the brush to be used for filling shapes in future drawing
1480
+ operations. Either a :class:`wx.Brush` or a :class:`GraphicsBrush`
1481
+ object may be used.
1482
+ """
1483
+ if isinstance(brush, wx.Brush):
1484
+ if not brush.IsOk() or brush.Style == wx.TRANSPARENT:
1485
+ brush = None
1486
+ else:
1487
+ brush = GraphicsBrush.CreateFromBrush(brush)
1488
+ self._brush = brush
1489
+
1490
+ def GetBrush(self):
1491
+ """Returns the current brush"""
1492
+ return self._brush
1493
+ Brush = property(GetBrush, SetBrush)
1494
+
1495
+
1496
+ def SetFont(self, font, colour=None):
1497
+ """
1498
+ Sets the font to be used for drawing text. Either a :class:`wx.Font`
1499
+ or a :class:`GraphicsFont` may be used.
1500
+ """
1501
+ if isinstance(font, wx.Font):
1502
+ font = GraphicsFont.CreateFromFont(font, colour)
1503
+ self._font = font
1504
+ if colour is not None:
1505
+ self._fontColour = _makeColour(colour)
1506
+ else:
1507
+ self._fontColour = font._colour
1508
+
1509
+ def GetFont(self): return (self._font, self._fontColour)
1510
+ def _SetFont(self, *both): self.SetFont(*both)
1511
+ Font = property(GetFont, _SetFont)
1512
+
1513
+
1514
+ def StrokePath(self, path):
1515
+ """
1516
+ Strokes the path (draws the lines) using the current pen.
1517
+ """
1518
+ if self._pen:
1519
+ offset = _OffsetHelper(self)
1520
+ self._context.append_path(path.GetNativePath())
1521
+ self._pen.Apply(self)
1522
+ self._context.stroke()
1523
+
1524
+
1525
+ def FillPath(self, path, fillStyle=wx.ODDEVEN_RULE):
1526
+ """
1527
+ Fills the path using the current brush.
1528
+ """
1529
+ if self._brush:
1530
+ offset = _OffsetHelper(self)
1531
+ self._context.append_path(path.GetNativePath())
1532
+ self._brush.Apply(self)
1533
+ d = { wx.WINDING_RULE : cairo.FILL_RULE_WINDING,
1534
+ wx.ODDEVEN_RULE : cairo.FILL_RULE_EVEN_ODD }
1535
+ rule = d[fillStyle]
1536
+ self._context.set_fill_rule(rule)
1537
+ self._context.fill()
1538
+
1539
+
1540
+ def DrawPath(self, path, fillStyle=wx.ODDEVEN_RULE):
1541
+ """
1542
+ Draws the path by first filling it and then stroking it.
1543
+ """
1544
+ # TODO: this could be optimized by moving the stroke and fill
1545
+ # code here and only loading the path once.
1546
+ self.FillPath(path, fillStyle)
1547
+ self.StrokePath(path)
1548
+
1549
+
1550
+ def DrawText(self, text, x, y, backgroundBrush=None):
1551
+ """
1552
+ Draw the text at (x,y) using the current font. If
1553
+ backgroundBrush is set then it is used to fill the rectangle
1554
+ behind the text.
1555
+ """
1556
+ if backgroundBrush:
1557
+ formerBrush = self._brush
1558
+ formerPen = self._pen
1559
+ self.SetBrush(backgroundBrush)
1560
+ self.SetPen(None)
1561
+ width, height = self.GetTextExtent(text)
1562
+ path = GraphicsPath()
1563
+ path.AddRectangle(x, y, width, height)
1564
+ self.FillPath(path)
1565
+ self._DrawText(text, x, y)
1566
+ self.SetBrush(formerBrush)
1567
+ self.SetPen(formerPen)
1568
+
1569
+ else:
1570
+ self._DrawText(text, x, y)
1571
+
1572
+
1573
+ def _DrawText(self, text, x, y, angle=None):
1574
+ """helper used by DrawText and DrawRotatedText"""
1575
+ if angle is not None:
1576
+ self.PushState()
1577
+ self.Translate(x, y)
1578
+ self.Rotate(-angle)
1579
+ x = y = 0
1580
+
1581
+ self._font.Apply(self, self._fontColour)
1582
+ # Cairo's x,y for drawing text is at the baseline, so we need to adjust
1583
+ # the position we move to by the ascent.
1584
+ fe = self._context.font_extents()
1585
+ ascent = fe[0]
1586
+ self._context.move_to( x, y + ascent )
1587
+ self._context.show_text(text)
1588
+
1589
+ if angle is not None:
1590
+ self.PopState()
1591
+
1592
+
1593
+ def DrawRotatedText(self, text, x, y, angle, backgroundBrush=None):
1594
+ """
1595
+ Draw the text at (x,y) using the current font and rotated
1596
+ angle radians. If backgroundBrush is set then it is used to
1597
+ fill the rectangle behind the text.
1598
+ """
1599
+ if backgroundBrush:
1600
+ formerBrush = self._brush
1601
+ formerPen = self._pen
1602
+ self.SetBrush(backgroundBrush)
1603
+ self.SetPen(None)
1604
+ width, height = self.GetTextExtent(text)
1605
+ path = GraphicsPath()
1606
+ path.AddRectangle(0, 0, width, height)
1607
+ self.PushState()
1608
+ self.Translate(x, y)
1609
+ self.Rotate(-angle)
1610
+ self.FillPath(path)
1611
+ self.PopState()
1612
+ self._DrawText(text, x, y, angle)
1613
+ self.SetBrush(formerBrush)
1614
+ self.SetPen(formerPen)
1615
+
1616
+ else:
1617
+ self._DrawText(text, x, y, angle)
1618
+
1619
+
1620
+ def GetFullTextExtent(self, text):
1621
+ """
1622
+ Returns the (width, height, descent, externalLeading) of the
1623
+ text using the current font.
1624
+ """
1625
+ if not text:
1626
+ return (0,0,0,0)
1627
+
1628
+ self._font.Apply(self, self._fontColour)
1629
+
1630
+ te = self._context.text_extents(text)
1631
+ width = te[2]
1632
+
1633
+ fe = self._context.font_extents()
1634
+ height = fe[2]
1635
+ descent = fe[1]
1636
+ ascent = fe[0]
1637
+ externalLeading = max(0, height - (ascent + descent))
1638
+
1639
+ return (width, height, descent, externalLeading)
1640
+
1641
+
1642
+ def GetTextExtent(self, text):
1643
+ """
1644
+ Returns the (width, height) of the text using the current
1645
+ font.
1646
+ """
1647
+ (width, height, descent, externalLeading) = self.GetFullTextExtent(text)
1648
+ return (width, height)
1649
+
1650
+
1651
+ def GetPartialTextExtents(self, text):
1652
+ raise NotImplementedError("TODO")
1653
+
1654
+
1655
+ def DrawBitmap(self, bmp, x, y, w=-1, h=-1):
1656
+ """
1657
+ Draw the bitmap at (x,y). If the width and height parameters
1658
+ are passed then the bitmap is scaled to fit that size. Either
1659
+ a :class:`wx.Bitmap` or a :class:`GraphicsBitmap` may be used.
1660
+ """
1661
+ if isinstance(bmp, wx.Bitmap):
1662
+ bmp = GraphicsBitmap.CreateFromBitmap(bmp)
1663
+
1664
+ # In case we're scaling the image by using a width and height
1665
+ # different than the bitmap's size, create a pattern
1666
+ # transformation on the surface and draw the transformed
1667
+ # pattern.
1668
+ self.PushState()
1669
+ pattern = cairo.SurfacePattern(bmp.Surface)
1670
+
1671
+ bw, bh = bmp.Size
1672
+ if w == -1: w = bw
1673
+ if h == -1: h = bh
1674
+ scaleX = w / float(bw)
1675
+ scaleY = h / float(bh)
1676
+
1677
+ self._context.translate(x, y)
1678
+ self._context.scale(scaleX, scaleY)
1679
+ self._context.set_source(pattern)
1680
+
1681
+ # use the original size here since the context is scaled already...
1682
+ self._context.rectangle(0, 0, bw, bh)
1683
+ # fill the rectangle with the pattern
1684
+ self._context.fill()
1685
+
1686
+ self.PopState()
1687
+
1688
+
1689
+ def DrawIcon(self, icon, x, y, w=-1, h=-1):
1690
+ raise NotImplementedError("TODO")
1691
+
1692
+
1693
+ def StrokeLine(self, x1, y1, x2, y2):
1694
+ """
1695
+ Strokes a single line using the current pen.
1696
+ """
1697
+ path = GraphicsPath()
1698
+ path.MoveToPoint(x1, y1)
1699
+ path.AddLineToPoint(x2, y2)
1700
+ self.StrokePath(path)
1701
+
1702
+
1703
+ def StrokeLines(self, points):
1704
+ """
1705
+ Stroke a series of connected lines using the current pen.
1706
+ Points is a sequence of points or 2-tuples, and lines are
1707
+ drawn from point to point through the end of the sequence.
1708
+ """
1709
+ path = GraphicsPath()
1710
+ x, y = points[0]
1711
+ path.MoveToPoint(x, y)
1712
+ for point in points[1:]:
1713
+ x, y = point
1714
+ path.AddLineToPoint(x, y)
1715
+ self.StrokePath(path)
1716
+
1717
+
1718
+ def StrokeLineSegments(self, beginPoints, endPoints):
1719
+ """
1720
+ Stroke a series of lines using the current pen. For each line
1721
+ the begin point is taken from the beginPoints sequence and the
1722
+ ending point is taken from the endPoints sequence.
1723
+ """
1724
+ path = GraphicsPath()
1725
+ for begin, end in zip(beginPoints, endPoints):
1726
+ path.MoveToPoint(begin[0], begin[1])
1727
+ path.AddLineToPoint(end[0], end[1])
1728
+ self.StrokePath(path)
1729
+
1730
+
1731
+ def DrawLines(self, points, fillStyle=wx.ODDEVEN_RULE):
1732
+ """
1733
+ Stroke and fill a series of connected lines using the current
1734
+ pen and current brush.
1735
+ """
1736
+ path = GraphicsPath()
1737
+ x, y = points[0]
1738
+ path.MoveToPoint(x, y)
1739
+ for point in points[1:]:
1740
+ x, y = point
1741
+ path.AddLineToPoint(x, y)
1742
+ self.DrawPath(path, fillStyle)
1743
+
1744
+
1745
+ def DrawRectangle(self, x, y, w, h):
1746
+ """
1747
+ Stroke and fill a rectangle using the current pen and current
1748
+ brush.
1749
+ """
1750
+ path = GraphicsPath()
1751
+ path.AddRectangle(x, y, w, h)
1752
+ self.DrawPath(path)
1753
+
1754
+
1755
+ def DrawEllipse(self, x, y, w, h):
1756
+ """
1757
+ Stroke and fill an elipse that fits in the given rectangle,
1758
+ using the current pen and current brush.
1759
+ """
1760
+ path = GraphicsPath()
1761
+ path.AddEllipse(x, y, w, h)
1762
+ self.DrawPath(path)
1763
+
1764
+
1765
+ def DrawRoundedRectangle(self, x, y, w, h, radius):
1766
+ """
1767
+ Stroke and fill a rounded rectangle using the current pen and
1768
+ current brush.
1769
+ """
1770
+ path = GraphicsPath()
1771
+ path.AddRoundedRectangle(x, y, w, h, radius)
1772
+ self.DrawPath(path)
1773
+
1774
+
1775
+
1776
+ def GetCompositingOperator(self):
1777
+ """
1778
+ Returns the current compositing operator for the context.
1779
+ """
1780
+ return self._context.get_operator()
1781
+
1782
+
1783
+ def SetCompositingOperator(self, op):
1784
+ """
1785
+ Sets the compositing operator to be used for all drawing
1786
+ operations. The default operator is OPERATOR_OVER.
1787
+ """
1788
+ return self._context.set_operator(op)
1789
+
1790
+ CompositingOperator = property(GetCompositingOperator, SetCompositingOperator)
1791
+
1792
+
1793
+ def GetAntialiasMode(self):
1794
+ """
1795
+ Returns the current antialias mode.
1796
+ """
1797
+ return self._context.get_antialias()
1798
+
1799
+ def SetAntialiasMode(self, mode=ANTIALIAS_DEFAULT):
1800
+ """
1801
+ Set the antialiasing mode of the rasterizer used for drawing
1802
+ shapes. This value is a hint, and a particular backend may or
1803
+ may not support a particular value.
1804
+ """
1805
+ self._context.set_antialias(mode)
1806
+
1807
+ AntialiasMode = property(GetAntialiasMode, GetAntialiasMode)
1808
+
1809
+
1810
+ def BeginLayer(self, opacity):
1811
+ """
1812
+ Redirects future rendering to a temporary context. See :meth:`EndLayer`.
1813
+ """
1814
+ self._layerOpacities.append(opacity)
1815
+ self._context.push_group()
1816
+
1817
+
1818
+ def EndLayer(self):
1819
+ """
1820
+ Composites the drawing done on the temporary context created
1821
+ in :meth:`BeginLayer` back into the main context, using the opacity
1822
+ specified for the layer.
1823
+ """
1824
+ opacity = self._layerOpacities.pop()
1825
+ self._context.pop_group_to_source()
1826
+ self._context.paint_with_alpha(opacity)
1827
+
1828
+
1829
+ def Flush(self):
1830
+ pass
1831
+
1832
+
1833
+ def GetSize(self):
1834
+ return (self._width, self._height)
1835
+ Size = property(GetSize)
1836
+
1837
+
1838
+ # Some things not in wx.GraphicsContext (yet)
1839
+
1840
+ def DrawCircle(self, x, y, radius):
1841
+ """
1842
+ Stroke and fill a circle centered at (x,y) with the given
1843
+ radius, using the current pen and brush.
1844
+ """
1845
+ path = GraphicsPath()
1846
+ path.AddCircle(x, y, radius)
1847
+ self.DrawPath(path)
1848
+
1849
+
1850
+ def ClipPath(self, path):
1851
+ """
1852
+ Set the clip region to the path.
1853
+ """
1854
+ self._context.append_path(path.GetNativePath())
1855
+ self._context.clip()
1856
+
1857
+
1858
+ def Clear(self, colour=None):
1859
+ """
1860
+ Clear the context using the given color or the currently set brush.
1861
+ """
1862
+ if colour is not None:
1863
+ brush = GraphicsBrush(colour)
1864
+ elif self._brush is None:
1865
+ brush = GraphicsBrush(wx.WHITE)
1866
+ else:
1867
+ brush = self._brush
1868
+
1869
+ self.PushState()
1870
+ op = self._context.get_operator()
1871
+ self._context.set_operator(cairo.OPERATOR_SOURCE)
1872
+ self._context.reset_clip()
1873
+
1874
+ brush.Apply(self)
1875
+ self._context.paint()
1876
+
1877
+ self._context.set_operator(op)
1878
+ self.PopState()
1879
+
1880
+
1881
+ #---------------------------------------------------------------------------
1882
+ # Utility functions
1883
+
1884
+ def _makeColour(colour):
1885
+ """
1886
+ Helper which makes a wx.Colour from any of the allowed typemaps (string,
1887
+ tuple, etc.)
1888
+ """
1889
+ if isinstance(colour, (six.string_types, tuple)):
1890
+ return wx.NamedColour(colour)
1891
+ else:
1892
+ return colour
1893
+
1894
+
1895
+ def _colourToValues(c):
1896
+ """
1897
+ Helper which converts wx.Colour components to a set of values between 0 and 1
1898
+ """
1899
+ return tuple( [x/255.0 for x in c.Get(True)] )
1900
+
1901
+
1902
+ class _OffsetHelper(object):
1903
+ """A helper used by the context class."""
1904
+ def __init__(self, ctx):
1905
+ self.ctx = ctx
1906
+ self.offset = 0
1907
+ if ctx._pen:
1908
+ penwidth = ctx._pen.Width
1909
+ if penwidth == 0:
1910
+ penwidth = 1
1911
+ self.offset = (penwidth % 2) == 1;
1912
+ if self.offset:
1913
+ ctx.Translate(0.5, 0.5)
1914
+
1915
+ def __del__(self):
1916
+ if self.offset:
1917
+ self.ctx.Translate(-0.5, -0.5)
1918
+
1919
+
1920
+ def _stdDashes(style, width):
1921
+ """
1922
+ Helper which defines the dash patterns for the standard dash styles.
1923
+ """
1924
+ if width < 1.0:
1925
+ width = 1.0
1926
+
1927
+ if style == wx.DOT:
1928
+ dashes = [ width, width + 2.0]
1929
+ elif style == wx.DOT_DASH:
1930
+ dashes = [ 9.0, 6.0, 3.0, 3.0 ]
1931
+ elif style == wx.LONG_DASH:
1932
+ dashes = [ 19.0, 9.0 ]
1933
+ elif style == wx.SHORT_DASH:
1934
+ dashes = [ 9.0, 6.0 ]
1935
+
1936
+ return dashes
1937
+
1938
+
1939
+ #---------------------------------------------------------------------------