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.
- wx/__init__.py +22 -0
- wx/__version__.py +9 -0
- wx/_adv.cp313-win_amd64.pyd +0 -0
- wx/_aui.cp313-win_amd64.pyd +0 -0
- wx/_core.cp313-win_amd64.pyd +0 -0
- wx/_dataview.cp313-win_amd64.pyd +0 -0
- wx/_glcanvas.cp313-win_amd64.pyd +0 -0
- wx/_grid.cp313-win_amd64.pyd +0 -0
- wx/_html.cp313-win_amd64.pyd +0 -0
- wx/_html2.cp313-win_amd64.pyd +0 -0
- wx/_media.cp313-win_amd64.pyd +0 -0
- wx/_msw.cp313-win_amd64.pyd +0 -0
- wx/_propgrid.cp313-win_amd64.pyd +0 -0
- wx/_ribbon.cp313-win_amd64.pyd +0 -0
- wx/_richtext.cp313-win_amd64.pyd +0 -0
- wx/_stc.cp313-win_amd64.pyd +0 -0
- wx/_xml.cp313-win_amd64.pyd +0 -0
- wx/_xrc.cp313-win_amd64.pyd +0 -0
- wx/adv.py +124 -0
- wx/adv.pyi +5182 -0
- wx/aui.py +77 -0
- wx/aui.pyi +3655 -0
- wx/core.py +3540 -0
- wx/core.pyi +50592 -0
- wx/dataview.py +173 -0
- wx/dataview.pyi +3491 -0
- wx/demo/AUI_DockingWindowMgr.py +1154 -0
- wx/demo/AUI_MDI.py +117 -0
- wx/demo/AUI_Notebook.py +58 -0
- wx/demo/About.py +75 -0
- wx/demo/AboutBox.py +75 -0
- wx/demo/ActiveXWrapper_Acrobat.py +132 -0
- wx/demo/ActiveXWrapper_IE.py +187 -0
- wx/demo/ActiveX_FlashWindow.py +107 -0
- wx/demo/ActiveX_IEHtmlWindow.py +242 -0
- wx/demo/ActiveX_PDFWindow.py +204 -0
- wx/demo/ActivityIndicator.py +80 -0
- wx/demo/AddPrivateFont.py +116 -0
- wx/demo/AdjustChannels.py +178 -0
- wx/demo/AlphaDrawing.py +77 -0
- wx/demo/AnalogClock.py +144 -0
- wx/demo/AnimationCtrl.py +104 -0
- wx/demo/ArtProvider.py +893 -0
- wx/demo/BannerWindow.py +1 -0
- wx/demo/BitmapButton.py +87 -0
- wx/demo/BitmapComboBox.py +63 -0
- wx/demo/BitmapFromBuffer.py +140 -0
- wx/demo/Button.py +77 -0
- wx/demo/Cairo.py +197 -0
- wx/demo/Cairo_Snippets.py +135 -0
- wx/demo/Calendar.py +660 -0
- wx/demo/CalendarCtrl.py +122 -0
- wx/demo/CheckBox.py +74 -0
- wx/demo/CheckListBox.py +79 -0
- wx/demo/CheckListCtrl.py +99 -0
- wx/demo/Choice.py +55 -0
- wx/demo/Choicebook.py +80 -0
- wx/demo/CollapsibleHeaderCtrl.py +85 -0
- wx/demo/CollapsiblePane.py +126 -0
- wx/demo/ColorPanel.py +19 -0
- wx/demo/ColourDB.py +203 -0
- wx/demo/ColourDialog.py +76 -0
- wx/demo/ColourSelect.py +119 -0
- wx/demo/ComboBox.py +111 -0
- wx/demo/ComboCtrl.py +153 -0
- wx/demo/ComboTreeBox.py +71 -0
- wx/demo/CommandLinkButton.py +50 -0
- wx/demo/ContextHelp.py +112 -0
- wx/demo/Cursor.py +336 -0
- wx/demo/CustomDragAndDrop.py +353 -0
- wx/demo/DVC_CustomRenderer.py +204 -0
- wx/demo/DVC_DataViewModel.py +365 -0
- wx/demo/DVC_IndexListModel.py +257 -0
- wx/demo/DVC_ListCtrl.py +69 -0
- wx/demo/DVC_TreeCtrl.py +76 -0
- wx/demo/DatePickerCtrl.py +68 -0
- wx/demo/DelayedResult.py +239 -0
- wx/demo/Dialog.py +169 -0
- wx/demo/DialogUnits.py +128 -0
- wx/demo/DirDialog.py +58 -0
- wx/demo/DragAndDrop.py +265 -0
- wx/demo/DragImage.py +316 -0
- wx/demo/DragScroller.py +59 -0
- wx/demo/DrawXXXList.py +436 -0
- wx/demo/DynamicSashWindow.py +177 -0
- wx/demo/EditableListBox.py +101 -0
- wx/demo/Editor.py +70 -0
- wx/demo/EventManager.py +291 -0
- wx/demo/ExpandoTextCtrl.py +164 -0
- wx/demo/FancyText.py +83 -0
- wx/demo/FileBrowseButton.py +100 -0
- wx/demo/FileCtrl.py +97 -0
- wx/demo/FileDialog.py +144 -0
- wx/demo/FileHistory.py +140 -0
- wx/demo/FindReplaceDialog.py +123 -0
- wx/demo/FloatCanvas.py +1959 -0
- wx/demo/FontDialog.py +142 -0
- wx/demo/FontEnumerator.py +82 -0
- wx/demo/Frame.py +85 -0
- wx/demo/GLCanvas.py +371 -0
- wx/demo/Gauge.py +66 -0
- wx/demo/GenericButtons.py +185 -0
- wx/demo/GenericCheckBox.py +65 -0
- wx/demo/GenericDirCtrl.py +74 -0
- wx/demo/GetMouseState.py +159 -0
- wx/demo/GraphicsContext.py +236 -0
- wx/demo/GraphicsGradient.py +281 -0
- wx/demo/Grid.py +95 -0
- wx/demo/GridBagSizer.py +170 -0
- wx/demo/GridCustEditor.py +247 -0
- wx/demo/GridCustTable.py +170 -0
- wx/demo/GridDragAndDrop.py +102 -0
- wx/demo/GridDragable.py +206 -0
- wx/demo/GridEnterHandler.py +66 -0
- wx/demo/GridHugeTable.py +89 -0
- wx/demo/GridLabelRenderer.py +114 -0
- wx/demo/GridSimple.py +270 -0
- wx/demo/GridStdEdRend.py +186 -0
- wx/demo/Grid_MegaExample.py +490 -0
- wx/demo/HTML2_WebView.py +183 -0
- wx/demo/HtmlWindow.py +232 -0
- wx/demo/I18N.py +237 -0
- wx/demo/Image.py +338 -0
- wx/demo/ImageAlpha.py +87 -0
- wx/demo/ImageBrowser.py +70 -0
- wx/demo/ImageFromStream.py +49 -0
- wx/demo/Img2PyArtProvider.py +99 -0
- wx/demo/InfoBar.py +127 -0
- wx/demo/IntCtrl.py +343 -0
- wx/demo/ItemsPicker.py +108 -0
- wx/demo/Joystick.py +1083 -0
- wx/demo/KeyEvents.py +428 -0
- wx/demo/LEDNumberCtrl.py +121 -0
- wx/demo/LayoutAnchors.py +258 -0
- wx/demo/LayoutConstraints.py +149 -0
- wx/demo/Layoutf.py +69 -0
- wx/demo/ListBox.py +164 -0
- wx/demo/ListCtrl.py +538 -0
- wx/demo/ListCtrl_edit.py +155 -0
- wx/demo/ListCtrl_virtual.py +145 -0
- wx/demo/Listbook.py +104 -0
- wx/demo/MDIDemo.py +86 -0
- wx/demo/MDISashDemo.py +152 -0
- wx/demo/MDIWindows.py +66 -0
- wx/demo/Main.py +2768 -0
- wx/demo/Mask.py +137 -0
- wx/demo/MaskedEditControls.py +648 -0
- wx/demo/MaskedNumCtrl.py +359 -0
- wx/demo/MediaCtrl.py +190 -0
- wx/demo/Menu.py +322 -0
- wx/demo/MessageDialog.py +54 -0
- wx/demo/MimeTypesManager.py +354 -0
- wx/demo/MiniFrame.py +67 -0
- wx/demo/MouseGestures.py +198 -0
- wx/demo/MultiChoiceDialog.py +59 -0
- wx/demo/MultiSash.py +95 -0
- wx/demo/MultiSplitterWindow.py +168 -0
- wx/demo/MultipleChoiceDialog.py +101 -0
- wx/demo/Notebook.py +134 -0
- wx/demo/NotificationMessage.py +61 -0
- wx/demo/OGL.py +433 -0
- wx/demo/Overlay.py +209 -0
- wx/demo/OwnerDrawnComboBox.py +152 -0
- wx/demo/PDFViewer.py +109 -0
- wx/demo/PageSetupDialog.py +70 -0
- wx/demo/PenAndBrushStyles.py +208 -0
- wx/demo/Pickers.py +120 -0
- wx/demo/PlateButton.py +430 -0
- wx/demo/PopupControl.py +99 -0
- wx/demo/PopupMenu.py +156 -0
- wx/demo/PopupWindow.py +227 -0
- wx/demo/PrintDialog.py +60 -0
- wx/demo/PrintFramework.py +227 -0
- wx/demo/Process.py +168 -0
- wx/demo/ProgressDialog.py +87 -0
- wx/demo/PropertyGrid.py +1045 -0
- wx/demo/PropertySheetDialog.py +231 -0
- wx/demo/PseudoDC.py +350 -0
- wx/demo/PyColourChooser.py +60 -0
- wx/demo/PyCrust.py +21 -0
- wx/demo/PyPlot.py +83 -0
- wx/demo/PyShell.py +22 -0
- wx/demo/PythonEvents.py +109 -0
- wx/demo/README.txt +7 -0
- wx/demo/RadioBox.py +67 -0
- wx/demo/RadioButton.py +127 -0
- wx/demo/RawBitmapAccess.py +208 -0
- wx/demo/RearrangeDialog.py +160 -0
- wx/demo/RendererNative.py +170 -0
- wx/demo/ResizeWidget.py +76 -0
- wx/demo/RichMessageDialog.py +85 -0
- wx/demo/RichTextCtrl.py +732 -0
- wx/demo/RichToolTip.py +145 -0
- wx/demo/SVGImage_Bitmap.py +130 -0
- wx/demo/SVGImage_Render.py +138 -0
- wx/demo/SashWindow.py +151 -0
- wx/demo/ScrolledMessageDialog.py +52 -0
- wx/demo/ScrolledPanel.py +124 -0
- wx/demo/ScrolledWindow.py +260 -0
- wx/demo/SearchCtrl.py +115 -0
- wx/demo/ShapedWindow.py +145 -0
- wx/demo/Simplebook.py +202 -0
- wx/demo/SingleChoiceDialog.py +56 -0
- wx/demo/SizedControls.py +433 -0
- wx/demo/Sizers.py +609 -0
- wx/demo/Slider.py +52 -0
- wx/demo/Sound.py +95 -0
- wx/demo/SpinButton.py +63 -0
- wx/demo/SpinCtrl.py +56 -0
- wx/demo/SpinCtrlDouble.py +42 -0
- wx/demo/SplitTree.py +146 -0
- wx/demo/SplitterWindow.py +62 -0
- wx/demo/StandardPaths.py +113 -0
- wx/demo/StaticBitmap.py +55 -0
- wx/demo/StaticBox.py +62 -0
- wx/demo/StaticText.py +69 -0
- wx/demo/StatusBar.py +144 -0
- wx/demo/StockButtons.py +113 -0
- wx/demo/StyledTextCtrl_1.py +303 -0
- wx/demo/StyledTextCtrl_2.py +410 -0
- wx/demo/SystemSettings.py +333 -0
- wx/demo/TablePrint.py +215 -0
- wx/demo/TestTable.txt +38 -0
- wx/demo/TextCtrl.py +187 -0
- wx/demo/TextEntryDialog.py +57 -0
- wx/demo/Threads.py +258 -0
- wx/demo/Throbber.py +250 -0
- wx/demo/Ticker.py +147 -0
- wx/demo/TimeCtrl.py +240 -0
- wx/demo/TimePickerCtrl.py +60 -0
- wx/demo/Timer.py +275 -0
- wx/demo/ToggleButton.py +54 -0
- wx/demo/ToolBar.py +249 -0
- wx/demo/ToolTip.py +71 -0
- wx/demo/Toolbook.py +111 -0
- wx/demo/TreeCtrl.py +199 -0
- wx/demo/TreeListCtrl.py +121 -0
- wx/demo/TreeMixin.py +269 -0
- wx/demo/Treebook.py +117 -0
- wx/demo/UIActionSimulator.py +151 -0
- wx/demo/URLDragAndDrop.py +130 -0
- wx/demo/Unicode.py +146 -0
- wx/demo/VListBox.py +176 -0
- wx/demo/Validator.py +237 -0
- wx/demo/Wizard.py +248 -0
- wx/demo/WrapSizer.py +115 -0
- wx/demo/XmlResource.py +80 -0
- wx/demo/XmlResourceHandler.py +199 -0
- wx/demo/XmlResourceSubclass.py +119 -0
- wx/demo/__init__.py +9 -0
- wx/demo/agw/AGWInfoBar.py +175 -0
- wx/demo/agw/AUI.py +3058 -0
- wx/demo/agw/AdvancedSplash.py +59 -0
- wx/demo/agw/AquaButton.py +146 -0
- wx/demo/agw/BalloonTip.py +378 -0
- wx/demo/agw/ButtonPanel.py +890 -0
- wx/demo/agw/CubeColourDialog.py +83 -0
- wx/demo/agw/CustomTreeCtrl.py +2167 -0
- wx/demo/agw/Example1 +67 -0
- wx/demo/agw/Example2 +49 -0
- wx/demo/agw/FlatMenu.py +876 -0
- wx/demo/agw/FlatNotebook.py +994 -0
- wx/demo/agw/FloatSpin.py +475 -0
- wx/demo/agw/FoldPanelBar.py +953 -0
- wx/demo/agw/FourWaySplitter.py +300 -0
- wx/demo/agw/GenericMessageDialog.py +207 -0
- wx/demo/agw/GradientButton.py +156 -0
- wx/demo/agw/HyperLinkCtrl.py +144 -0
- wx/demo/agw/HyperTreeList.py +2660 -0
- wx/demo/agw/KnobCtrl.py +186 -0
- wx/demo/agw/LabelBook.py +567 -0
- wx/demo/agw/MacLargeDemo.py +360 -0
- wx/demo/agw/MultiDirDialog.py +117 -0
- wx/demo/agw/PeakMeter.py +194 -0
- wx/demo/agw/PersistentControls.py +589 -0
- wx/demo/agw/PieCtrl.py +206 -0
- wx/demo/agw/PyBusyInfo.py +64 -0
- wx/demo/agw/PyCollapsiblePane.py +308 -0
- wx/demo/agw/PyGauge.py +162 -0
- wx/demo/agw/PyProgress.py +155 -0
- wx/demo/agw/RibbonBar.py +925 -0
- wx/demo/agw/RulerCtrl.py +454 -0
- wx/demo/agw/ScrolledThumbnail.py +128 -0
- wx/demo/agw/ShapedButton.py +603 -0
- wx/demo/agw/ShortcutEditor.py +397 -0
- wx/demo/agw/SpeedMeter.py +668 -0
- wx/demo/agw/SuperToolTip.py +396 -0
- wx/demo/agw/ThumbDemoConfig.py +603 -0
- wx/demo/agw/ThumbnailCtrl.py +149 -0
- wx/demo/agw/ToasterBox.py +410 -0
- wx/demo/agw/UltimateListCtrl.py +80 -0
- wx/demo/agw/UltimateListIconDemo.py +908 -0
- wx/demo/agw/UltimateListListDemo.py +124 -0
- wx/demo/agw/UltimateReportDemo.py +1146 -0
- wx/demo/agw/UltimateVirtualDemo.py +207 -0
- wx/demo/agw/Windows7Explorer_Contents.py +368 -0
- wx/demo/agw/XLSGrid.py +238 -0
- wx/demo/agw/ZoomBar.py +230 -0
- wx/demo/agw/__demo__.py +183 -0
- wx/demo/agw/bitmaps/Explorer96.png +0 -0
- wx/demo/agw/bitmaps/Explorer96Flip40.png +0 -0
- wx/demo/agw/bitmaps/Folder96.png +0 -0
- wx/demo/agw/bitmaps/Folder96Flip40.png +0 -0
- wx/demo/agw/bitmaps/Monitor96.png +0 -0
- wx/demo/agw/bitmaps/Monitor96Flip40.png +0 -0
- wx/demo/agw/bitmaps/Music96.png +0 -0
- wx/demo/agw/bitmaps/Music96Flip40.png +0 -0
- wx/demo/agw/bitmaps/Photo96.png +0 -0
- wx/demo/agw/bitmaps/Photo96Flip40.png +0 -0
- wx/demo/agw/bitmaps/Search96.png +0 -0
- wx/demo/agw/bitmaps/Search96Flip40.png +0 -0
- wx/demo/agw/bitmaps/Wizard96.png +0 -0
- wx/demo/agw/bitmaps/Wizard96Flip40.png +0 -0
- wx/demo/agw/bitmaps/advancedsplash.png +0 -0
- wx/demo/agw/bitmaps/aquabutton.png +0 -0
- wx/demo/agw/bitmaps/aquachecked.ico +0 -0
- wx/demo/agw/bitmaps/aquaflagged.ico +0 -0
- wx/demo/agw/bitmaps/aquanotchecked.ico +0 -0
- wx/demo/agw/bitmaps/aquanotflagged.ico +0 -0
- wx/demo/agw/bitmaps/canada.gif +0 -0
- wx/demo/agw/bitmaps/checked.ico +0 -0
- wx/demo/agw/bitmaps/columns.png +0 -0
- wx/demo/agw/bitmaps/contexthelp-16.png +0 -0
- wx/demo/agw/bitmaps/contexthelp.png +0 -0
- wx/demo/agw/bitmaps/copy.png +0 -0
- wx/demo/agw/bitmaps/cut.png +0 -0
- wx/demo/agw/bitmaps/editcopy.png +0 -0
- wx/demo/agw/bitmaps/editcut.png +0 -0
- wx/demo/agw/bitmaps/editpaste.png +0 -0
- wx/demo/agw/bitmaps/empty_icon.png +0 -0
- wx/demo/agw/bitmaps/exit-16.png +0 -0
- wx/demo/agw/bitmaps/exit.ico +0 -0
- wx/demo/agw/bitmaps/ffwd.png +0 -0
- wx/demo/agw/bitmaps/ffwddisabled.png +0 -0
- wx/demo/agw/bitmaps/field-16.png +0 -0
- wx/demo/agw/bitmaps/filenew.png +0 -0
- wx/demo/agw/bitmaps/fileopen.png +0 -0
- wx/demo/agw/bitmaps/filesave.png +0 -0
- wx/demo/agw/bitmaps/flagged.ico +0 -0
- wx/demo/agw/bitmaps/folder.png +0 -0
- wx/demo/agw/bitmaps/folder_new.png +0 -0
- wx/demo/agw/bitmaps/ghost.png +0 -0
- wx/demo/agw/bitmaps/gradientbutton.png +0 -0
- wx/demo/agw/bitmaps/help-16.png +0 -0
- wx/demo/agw/bitmaps/help.ico +0 -0
- wx/demo/agw/bitmaps/italy.gif +0 -0
- wx/demo/agw/bitmaps/lbadd.png +0 -0
- wx/demo/agw/bitmaps/lbcharge.png +0 -0
- wx/demo/agw/bitmaps/lbdecrypted.png +0 -0
- wx/demo/agw/bitmaps/lbnews.png +0 -0
- wx/demo/agw/bitmaps/lbroll.png +0 -0
- wx/demo/agw/bitmaps/minus1.ico +0 -0
- wx/demo/agw/bitmaps/minus2.ico +0 -0
- wx/demo/agw/bitmaps/minus3.ico +0 -0
- wx/demo/agw/bitmaps/minus4.ico +0 -0
- wx/demo/agw/bitmaps/minus5.ico +0 -0
- wx/demo/agw/bitmaps/month-16.png +0 -0
- wx/demo/agw/bitmaps/new_file.png +0 -0
- wx/demo/agw/bitmaps/new_folder.png +0 -0
- wx/demo/agw/bitmaps/notchecked.ico +0 -0
- wx/demo/agw/bitmaps/notflagged.ico +0 -0
- wx/demo/agw/bitmaps/ok-16.png +0 -0
- wx/demo/agw/bitmaps/open_folder.png +0 -0
- wx/demo/agw/bitmaps/paste.png +0 -0
- wx/demo/agw/bitmaps/pause.png +0 -0
- wx/demo/agw/bitmaps/pausedisabled.png +0 -0
- wx/demo/agw/bitmaps/play.png +0 -0
- wx/demo/agw/bitmaps/playdisabled.png +0 -0
- wx/demo/agw/bitmaps/plus1.ico +0 -0
- wx/demo/agw/bitmaps/plus2.ico +0 -0
- wx/demo/agw/bitmaps/plus3.ico +0 -0
- wx/demo/agw/bitmaps/plus4.ico +0 -0
- wx/demo/agw/bitmaps/plus5.ico +0 -0
- wx/demo/agw/bitmaps/record.png +0 -0
- wx/demo/agw/bitmaps/recorddisabled.png +0 -0
- wx/demo/agw/bitmaps/recording.gif +0 -0
- wx/demo/agw/bitmaps/rewind.png +0 -0
- wx/demo/agw/bitmaps/rewinddisabled.png +0 -0
- wx/demo/agw/bitmaps/round.png +0 -0
- wx/demo/agw/bitmaps/save.png +0 -0
- wx/demo/agw/bitmaps/separator.gif +0 -0
- wx/demo/agw/bitmaps/separatorflip.png +0 -0
- wx/demo/agw/bitmaps/smfuel.ico +0 -0
- wx/demo/agw/bitmaps/smpi.ico +0 -0
- wx/demo/agw/bitmaps/smtemp.ico +0 -0
- wx/demo/agw/bitmaps/stop.png +0 -0
- wx/demo/agw/bitmaps/stopdisabled.png +0 -0
- wx/demo/agw/bitmaps/sttbutton.png +0 -0
- wx/demo/agw/bitmaps/sttfont.png +0 -0
- wx/demo/agw/bitmaps/sttheader.png +0 -0
- wx/demo/agw/bitmaps/stthelp.png +0 -0
- wx/demo/agw/bitmaps/view1.png +0 -0
- wx/demo/agw/bitmaps/view2.png +0 -0
- wx/demo/agw/bitmaps/view_choose.png +0 -0
- wx/demo/agw/bitmaps/view_detailed.png +0 -0
- wx/demo/agw/bitmaps/view_icon.png +0 -0
- wx/demo/agw/bitmaps/view_multicolumn.png +0 -0
- wx/demo/agw/bitmaps/viewmag-16.png +0 -0
- wx/demo/agw/bitmaps/viewmag-m-16.png +0 -0
- wx/demo/agw/bitmaps/viewmag-p-16.png +0 -0
- wx/demo/agw/bitmaps/viewmagfit-16.png +0 -0
- wx/demo/agw/data/Example_1.xls +0 -0
- wx/demo/agw/images.py +6714 -0
- wx/demo/bitmaps/AG00028_.gif +0 -0
- wx/demo/bitmaps/AG00039_.gif +0 -0
- wx/demo/bitmaps/AG00178_.gif +0 -0
- wx/demo/bitmaps/AG00183_.gif +0 -0
- wx/demo/bitmaps/AG00185_.gif +0 -0
- wx/demo/bitmaps/BD13656_.gif +0 -0
- wx/demo/bitmaps/advancedsplash.png +0 -0
- wx/demo/bitmaps/aquabutton.png +0 -0
- wx/demo/bitmaps/aquachecked.ico +0 -0
- wx/demo/bitmaps/aquaflagged.ico +0 -0
- wx/demo/bitmaps/aquanotchecked.ico +0 -0
- wx/demo/bitmaps/aquanotflagged.ico +0 -0
- wx/demo/bitmaps/canada.gif +0 -0
- wx/demo/bitmaps/checked.ico +0 -0
- wx/demo/bitmaps/columns.png +0 -0
- wx/demo/bitmaps/contexthelp-16.png +0 -0
- wx/demo/bitmaps/contexthelp.png +0 -0
- wx/demo/bitmaps/copy.png +0 -0
- wx/demo/bitmaps/cropshot24x20.png +0 -0
- wx/demo/bitmaps/cut.png +0 -0
- wx/demo/bitmaps/editcopy.png +0 -0
- wx/demo/bitmaps/editcut.png +0 -0
- wx/demo/bitmaps/editpaste.png +0 -0
- wx/demo/bitmaps/exit-16.png +0 -0
- wx/demo/bitmaps/exit.ico +0 -0
- wx/demo/bitmaps/ffwd.png +0 -0
- wx/demo/bitmaps/ffwddisabled.png +0 -0
- wx/demo/bitmaps/field-16.png +0 -0
- wx/demo/bitmaps/filenew.png +0 -0
- wx/demo/bitmaps/fileopen.png +0 -0
- wx/demo/bitmaps/filesave.png +0 -0
- wx/demo/bitmaps/flagged.ico +0 -0
- wx/demo/bitmaps/folder_new.png +0 -0
- wx/demo/bitmaps/ghost.png +0 -0
- wx/demo/bitmaps/gradientbutton.png +0 -0
- wx/demo/bitmaps/help-16.png +0 -0
- wx/demo/bitmaps/help.ico +0 -0
- wx/demo/bitmaps/honeycomb300.png +0 -0
- wx/demo/bitmaps/image.bmp +0 -0
- wx/demo/bitmaps/image.gif +0 -0
- wx/demo/bitmaps/image.ico +0 -0
- wx/demo/bitmaps/image.jpg +0 -0
- wx/demo/bitmaps/image.png +0 -0
- wx/demo/bitmaps/image.tif +0 -0
- wx/demo/bitmaps/italy.gif +0 -0
- wx/demo/bitmaps/lbadd.png +0 -0
- wx/demo/bitmaps/lbcharge.png +0 -0
- wx/demo/bitmaps/lbdecrypted.png +0 -0
- wx/demo/bitmaps/lbnews.png +0 -0
- wx/demo/bitmaps/lbroll.png +0 -0
- wx/demo/bitmaps/minus1.ico +0 -0
- wx/demo/bitmaps/minus2.ico +0 -0
- wx/demo/bitmaps/minus3.ico +0 -0
- wx/demo/bitmaps/minus4.ico +0 -0
- wx/demo/bitmaps/minus5.ico +0 -0
- wx/demo/bitmaps/month-16.png +0 -0
- wx/demo/bitmaps/new_file.png +0 -0
- wx/demo/bitmaps/new_folder.png +0 -0
- wx/demo/bitmaps/notchecked.ico +0 -0
- wx/demo/bitmaps/notflagged.ico +0 -0
- wx/demo/bitmaps/ok-16.png +0 -0
- wx/demo/bitmaps/open_folder.png +0 -0
- wx/demo/bitmaps/paste.png +0 -0
- wx/demo/bitmaps/pause.png +0 -0
- wx/demo/bitmaps/pausedisabled.png +0 -0
- wx/demo/bitmaps/phoenix_title.png +0 -0
- wx/demo/bitmaps/phoenix_top.png +0 -0
- wx/demo/bitmaps/play.png +0 -0
- wx/demo/bitmaps/playdisabled.png +0 -0
- wx/demo/bitmaps/plus1.ico +0 -0
- wx/demo/bitmaps/plus2.ico +0 -0
- wx/demo/bitmaps/plus3.ico +0 -0
- wx/demo/bitmaps/plus4.ico +0 -0
- wx/demo/bitmaps/plus5.ico +0 -0
- wx/demo/bitmaps/record.png +0 -0
- wx/demo/bitmaps/recorddisabled.png +0 -0
- wx/demo/bitmaps/rewind.png +0 -0
- wx/demo/bitmaps/rewinddisabled.png +0 -0
- wx/demo/bitmaps/round.png +0 -0
- wx/demo/bitmaps/save.png +0 -0
- wx/demo/bitmaps/smfuel.ico +0 -0
- wx/demo/bitmaps/smpi.ico +0 -0
- wx/demo/bitmaps/smtemp.ico +0 -0
- wx/demo/bitmaps/snakey_render.png +0 -0
- wx/demo/bitmaps/splash.png +0 -0
- wx/demo/bitmaps/stop.png +0 -0
- wx/demo/bitmaps/stopdisabled.png +0 -0
- wx/demo/bitmaps/sttbutton.png +0 -0
- wx/demo/bitmaps/sttfont.png +0 -0
- wx/demo/bitmaps/sttheader.png +0 -0
- wx/demo/bitmaps/stthelp.png +0 -0
- wx/demo/bitmaps/toucan.png +0 -0
- wx/demo/bitmaps/view1.png +0 -0
- wx/demo/bitmaps/view2.png +0 -0
- wx/demo/bitmaps/view_choose.png +0 -0
- wx/demo/bitmaps/view_detailed.png +0 -0
- wx/demo/bitmaps/view_icon.png +0 -0
- wx/demo/bitmaps/view_multicolumn.png +0 -0
- wx/demo/bitmaps/viewmag-16.png +0 -0
- wx/demo/bitmaps/viewmag-m-16.png +0 -0
- wx/demo/bitmaps/viewmag-p-16.png +0 -0
- wx/demo/bitmaps/viewmagfit-16.png +0 -0
- wx/demo/bmp_source/001.png +0 -0
- wx/demo/bmp_source/002.png +0 -0
- wx/demo/bmp_source/003.png +0 -0
- wx/demo/bmp_source/004.png +0 -0
- wx/demo/bmp_source/005.png +0 -0
- wx/demo/bmp_source/006.png +0 -0
- wx/demo/bmp_source/007.png +0 -0
- wx/demo/bmp_source/008.png +0 -0
- wx/demo/bmp_source/009.png +0 -0
- wx/demo/bmp_source/010.png +0 -0
- wx/demo/bmp_source/011.png +0 -0
- wx/demo/bmp_source/012.png +0 -0
- wx/demo/bmp_source/013.png +0 -0
- wx/demo/bmp_source/014.png +0 -0
- wx/demo/bmp_source/015.png +0 -0
- wx/demo/bmp_source/016.png +0 -0
- wx/demo/bmp_source/017.png +0 -0
- wx/demo/bmp_source/018.png +0 -0
- wx/demo/bmp_source/019.png +0 -0
- wx/demo/bmp_source/020.png +0 -0
- wx/demo/bmp_source/021.png +0 -0
- wx/demo/bmp_source/022.png +0 -0
- wx/demo/bmp_source/023.png +0 -0
- wx/demo/bmp_source/024.png +0 -0
- wx/demo/bmp_source/025.png +0 -0
- wx/demo/bmp_source/026.png +0 -0
- wx/demo/bmp_source/027.png +0 -0
- wx/demo/bmp_source/028.png +0 -0
- wx/demo/bmp_source/029.png +0 -0
- wx/demo/bmp_source/030.png +0 -0
- wx/demo/bmp_source/DbDec.bmp +0 -0
- wx/demo/bmp_source/DbInc.bmp +0 -0
- wx/demo/bmp_source/Dec.bmp +0 -0
- wx/demo/bmp_source/FRM_0.png +0 -0
- wx/demo/bmp_source/FRM_1.png +0 -0
- wx/demo/bmp_source/FRM_2.png +0 -0
- wx/demo/bmp_source/FRM_3.png +0 -0
- wx/demo/bmp_source/FRM_4.png +0 -0
- wx/demo/bmp_source/FRM_5.png +0 -0
- wx/demo/bmp_source/FRM_6.png +0 -0
- wx/demo/bmp_source/FRM_7.png +0 -0
- wx/demo/bmp_source/FRM_8.png +0 -0
- wx/demo/bmp_source/GridBG.gif +0 -0
- wx/demo/bmp_source/Inc.bmp +0 -0
- wx/demo/bmp_source/LB01.png +0 -0
- wx/demo/bmp_source/LB02.png +0 -0
- wx/demo/bmp_source/LB03.png +0 -0
- wx/demo/bmp_source/LB04.png +0 -0
- wx/demo/bmp_source/LB05.png +0 -0
- wx/demo/bmp_source/LB06.png +0 -0
- wx/demo/bmp_source/LB07.png +0 -0
- wx/demo/bmp_source/LB08.png +0 -0
- wx/demo/bmp_source/LB09.png +0 -0
- wx/demo/bmp_source/LB10.png +0 -0
- wx/demo/bmp_source/LB11.png +0 -0
- wx/demo/bmp_source/LB12.png +0 -0
- wx/demo/bmp_source/Pt.bmp +0 -0
- wx/demo/bmp_source/Vippi.png +0 -0
- wx/demo/bmp_source/backgrnd.png +0 -0
- wx/demo/bmp_source/book.png +0 -0
- wx/demo/bmp_source/book_blue.png +0 -0
- wx/demo/bmp_source/book_green.png +0 -0
- wx/demo/bmp_source/book_red.png +0 -0
- wx/demo/bmp_source/bp_btn1.png +0 -0
- wx/demo/bmp_source/bp_btn2.png +0 -0
- wx/demo/bmp_source/bp_btn3.png +0 -0
- wx/demo/bmp_source/bp_btn4.png +0 -0
- wx/demo/bmp_source/bulb1.bmp +0 -0
- wx/demo/bmp_source/bulb2.bmp +0 -0
- wx/demo/bmp_source/carrot.png +0 -0
- wx/demo/bmp_source/clipboard.png +0 -0
- wx/demo/bmp_source/code.png +0 -0
- wx/demo/bmp_source/core.png +0 -0
- wx/demo/bmp_source/custom.png +0 -0
- wx/demo/bmp_source/customcontrol.png +0 -0
- wx/demo/bmp_source/deletedocs.png +0 -0
- wx/demo/bmp_source/deleteperspective.png +0 -0
- wx/demo/bmp_source/demo.png +0 -0
- wx/demo/bmp_source/dialog.png +0 -0
- wx/demo/bmp_source/exit.png +0 -0
- wx/demo/bmp_source/expansion.png +0 -0
- wx/demo/bmp_source/find.png +0 -0
- wx/demo/bmp_source/findnext.png +0 -0
- wx/demo/bmp_source/floatcanvas.png +0 -0
- wx/demo/bmp_source/frame.png +0 -0
- wx/demo/bmp_source/images.png +0 -0
- wx/demo/bmp_source/inspect.png +0 -0
- wx/demo/bmp_source/layout.png +0 -0
- wx/demo/bmp_source/logo.png +0 -0
- wx/demo/bmp_source/miscellaneous.png +0 -0
- wx/demo/bmp_source/modifiedexists.png +0 -0
- wx/demo/bmp_source/mondrian.ico +0 -0
- wx/demo/bmp_source/morecontrols.png +0 -0
- wx/demo/bmp_source/moredialog.png +0 -0
- wx/demo/bmp_source/noicon.png +0 -0
- wx/demo/bmp_source/overview.png +0 -0
- wx/demo/bmp_source/pencil.png +0 -0
- wx/demo/bmp_source/pointy.png +0 -0
- wx/demo/bmp_source/process.png +0 -0
- wx/demo/bmp_source/pyshell.png +0 -0
- wx/demo/bmp_source/recent.png +0 -0
- wx/demo/bmp_source/rest.png +0 -0
- wx/demo/bmp_source/robin.jpg +0 -0
- wx/demo/bmp_source/rt_alignleft.xpm +24 -0
- wx/demo/bmp_source/rt_alignright.xpm +24 -0
- wx/demo/bmp_source/rt_bold.xpm +24 -0
- wx/demo/bmp_source/rt_centre.xpm +24 -0
- wx/demo/bmp_source/rt_colour.xpm +59 -0
- wx/demo/bmp_source/rt_copy.xpm +44 -0
- wx/demo/bmp_source/rt_cut.xpm +46 -0
- wx/demo/bmp_source/rt_font.xpm +25 -0
- wx/demo/bmp_source/rt_idea.xpm +47 -0
- wx/demo/bmp_source/rt_indentless.xpm +25 -0
- wx/demo/bmp_source/rt_indentmore.xpm +25 -0
- wx/demo/bmp_source/rt_italic.xpm +25 -0
- wx/demo/bmp_source/rt_open.xpm +57 -0
- wx/demo/bmp_source/rt_paste.xpm +46 -0
- wx/demo/bmp_source/rt_redo.xpm +58 -0
- wx/demo/bmp_source/rt_sample.xpm +44 -0
- wx/demo/bmp_source/rt_save.xpm +42 -0
- wx/demo/bmp_source/rt_smiley.xpm +42 -0
- wx/demo/bmp_source/rt_underline.xpm +25 -0
- wx/demo/bmp_source/rt_undo.xpm +58 -0
- wx/demo/bmp_source/rt_zebra.xpm +409 -0
- wx/demo/bmp_source/saveperspective.png +0 -0
- wx/demo/bmp_source/sm_down.bmp +0 -0
- wx/demo/bmp_source/sm_up.bmp +0 -0
- wx/demo/bmp_source/smiles2.bmp +0 -0
- wx/demo/bmp_source/test2.bmp +0 -0
- wx/demo/bmp_source/testmask.bmp +0 -0
- wx/demo/bmp_source/teststar.png +0 -0
- wx/demo/bmp_source/thekid.png +0 -0
- wx/demo/bmp_source/tog1.bmp +0 -0
- wx/demo/bmp_source/tog2.bmp +0 -0
- wx/demo/bmp_source/wiztest1.bmp +0 -0
- wx/demo/bmp_source/wiztest2.bmp +0 -0
- wx/demo/bmp_source/wxpdemo.ico +0 -0
- wx/demo/cursors/paperairplane_arrow_blue.cur +0 -0
- wx/demo/cursors/paperairplane_arrow_blue_fadeout80.cur +0 -0
- wx/demo/cursors/paperairplane_arrow_colorshift.ani +0 -0
- wx/demo/cursors/paperairplane_arrow_dark.cur +0 -0
- wx/demo/cursors/paperairplane_arrow_grey.cur +0 -0
- wx/demo/cursors/paperairplane_arrow_red.cur +0 -0
- wx/demo/cursors/paperairplane_arrow_white.cur +0 -0
- wx/demo/cursors/paperairplane_arrow_white24.png +0 -0
- wx/demo/data/0-tiger.svg +725 -0
- wx/demo/data/Asteroid_blaster.swf +0 -0
- wx/demo/data/SIL_OPEN_FONT_LICENSE.txt +97 -0
- wx/demo/data/SourceCodePro-Regular.ttf +0 -0
- wx/demo/data/accessories-calculator.svg +636 -0
- wx/demo/data/accessories-text-editor.svg +554 -0
- wx/demo/data/anykey.wav +0 -0
- wx/demo/data/applications-internet.svg +623 -0
- wx/demo/data/desktop-accessibility.svg +245 -0
- wx/demo/data/desktop-keyboard-shortcuts.svg +839 -0
- wx/demo/data/desktop-locale.svg +878 -0
- wx/demo/data/desktop-remote-desktop.svg +1479 -0
- wx/demo/data/desktop-theme.svg +882 -0
- wx/demo/data/desktop-wallpaper.svg +747 -0
- wx/demo/data/echo.py +25 -0
- wx/demo/data/imagemap.htm +20 -0
- wx/demo/data/imagemap.png +0 -0
- wx/demo/data/internet-group-chat.svg +312 -0
- wx/demo/data/internet-mail.svg +440 -0
- wx/demo/data/locale/af/LC_MESSAGES/wxpydemo.mo +0 -0
- wx/demo/data/locale/de/LC_MESSAGES/wxpydemo.mo +0 -0
- wx/demo/data/locale/es/LC_MESSAGES/wxpydemo.mo +0 -0
- wx/demo/data/locale/fr/LC_MESSAGES/wxpydemo.mo +0 -0
- wx/demo/data/locale/it/LC_MESSAGES/wxpydemo.mo +0 -0
- wx/demo/data/locale-src/af.po +23 -0
- wx/demo/data/locale-src/de.po +23 -0
- wx/demo/data/locale-src/es.po +22 -0
- wx/demo/data/locale-src/fr.po +22 -0
- wx/demo/data/locale-src/install +15 -0
- wx/demo/data/locale-src/it.po +23 -0
- wx/demo/data/locale-src/wxpydemo.po +21 -0
- wx/demo/data/office-calendar.svg +316 -0
- wx/demo/data/pic.png +0 -0
- wx/demo/data/pic2.bmp +0 -0
- wx/demo/data/plan.wav +0 -0
- wx/demo/data/proclamation.txt +115 -0
- wx/demo/data/resource.wdr +0 -0
- wx/demo/data/resource_wdr.xrc +146 -0
- wx/demo/data/romedalen.png +0 -0
- wx/demo/data/stc.h.html +3544 -0
- wx/demo/data/system-session.svg +510 -0
- wx/demo/data/system-users.svg +539 -0
- wx/demo/data/tables.htm +116 -0
- wx/demo/data/test-gradient-pen.svg +14 -0
- wx/demo/data/test-opacity.svg +7 -0
- wx/demo/data/test.htm +253 -0
- wx/demo/data/testmovie.mpg +0 -0
- wx/demo/data/testtable.txt +38 -0
- wx/demo/data/tips.txt +73 -0
- wx/demo/data/utilities-system-monitor.svg +435 -0
- wx/demo/data/utilities-terminal.svg +500 -0
- wx/demo/data/widgetTest.htm +70 -0
- wx/demo/data/world.dat +24055 -0
- wx/demo/demo.py +4 -0
- wx/demo/demo.pyw +4 -0
- wx/demo/demodata.py +310 -0
- wx/demo/encode_bitmaps.py +181 -0
- wx/demo/images.py +6812 -0
- wx/demo/infoframe.py +149 -0
- wx/demo/run.py +171 -0
- wx/demo/snippets/__init__.py +13 -0
- wx/demo/snippets/arc.py +21 -0
- wx/demo/snippets/arc_negative.py +21 -0
- wx/demo/snippets/clip.py +13 -0
- wx/demo/snippets/clip_image.py +13 -0
- wx/demo/snippets/curve_rectangle.py +53 -0
- wx/demo/snippets/curve_to.py +17 -0
- wx/demo/snippets/dash.py +18 -0
- wx/demo/snippets/ellipse.py +33 -0
- wx/demo/snippets/fill_and_stroke.py +12 -0
- wx/demo/snippets/fill_and_stroke2.py +18 -0
- wx/demo/snippets/fill_style.py +31 -0
- wx/demo/snippets/glyph_path.py +21 -0
- wx/demo/snippets/gradient.py +16 -0
- wx/demo/snippets/gradient_mask.py +12 -0
- wx/demo/snippets/group.py +16 -0
- wx/demo/snippets/image.py +14 -0
- wx/demo/snippets/imagepattern.py +23 -0
- wx/demo/snippets/path.py +7 -0
- wx/demo/snippets/set_line_cap.py +19 -0
- wx/demo/snippets/set_line_join.py +21 -0
- wx/demo/snippets/show_glyphs.py +15 -0
- wx/demo/snippets/text.py +22 -0
- wx/demo/snippets/text_align_center.py +26 -0
- wx/demo/snippets/text_extents.py +27 -0
- wx/demo/template.py +36 -0
- wx/demo/throbImages.py +1277 -0
- wx/demo/version.py +3 -0
- wx/demo/widgetTest.py +72 -0
- wx/demo/wxpdemo.ico +0 -0
- wx/glcanvas.py +10 -0
- wx/glcanvas.pyi +458 -0
- wx/grid.py +229 -0
- wx/grid.pyi +4959 -0
- wx/html.py +35 -0
- wx/html.pyi +2965 -0
- wx/html2.py +40 -0
- wx/html2.pyi +772 -0
- wx/lib/CDate.py +202 -0
- wx/lib/ClickableHtmlWindow.py +57 -0
- wx/lib/__init__.py +0 -0
- wx/lib/activex.py +178 -0
- wx/lib/activexwrapper.py +153 -0
- wx/lib/agw/__init__.py +128 -0
- wx/lib/agw/advancedsplash.py +564 -0
- wx/lib/agw/aquabutton.py +1127 -0
- wx/lib/agw/artmanager.py +2110 -0
- wx/lib/agw/aui/__init__.py +295 -0
- wx/lib/agw/aui/aui_constants.py +2628 -0
- wx/lib/agw/aui/aui_switcherdialog.py +1227 -0
- wx/lib/agw/aui/aui_utilities.py +672 -0
- wx/lib/agw/aui/auibar.py +4031 -0
- wx/lib/agw/aui/auibook.py +6289 -0
- wx/lib/agw/aui/dockart.py +1198 -0
- wx/lib/agw/aui/framemanager.py +10409 -0
- wx/lib/agw/aui/tabart.py +2771 -0
- wx/lib/agw/aui/tabmdi.py +679 -0
- wx/lib/agw/balloontip.py +1158 -0
- wx/lib/agw/buttonpanel.py +2823 -0
- wx/lib/agw/cubecolourdialog.py +3529 -0
- wx/lib/agw/customtreectrl.py +8963 -0
- wx/lib/agw/data/ShortcutEditor_1.png +0 -0
- wx/lib/agw/data/ShortcutEditor_1_thumb.png +0 -0
- wx/lib/agw/data/ShortcutEditor_2.png +0 -0
- wx/lib/agw/data/ShortcutEditor_2_thumb.png +0 -0
- wx/lib/agw/data/ShortcutEditor_3.png +0 -0
- wx/lib/agw/data/ShortcutEditor_3_thumb.png +0 -0
- wx/lib/agw/data/ShortcutEditor_4.png +0 -0
- wx/lib/agw/data/ShortcutEditor_4_thumb.png +0 -0
- wx/lib/agw/data/default_help_text.html +105 -0
- wx/lib/agw/flatmenu.py +7333 -0
- wx/lib/agw/flatnotebook.py +6672 -0
- wx/lib/agw/floatspin.py +1823 -0
- wx/lib/agw/fmcustomizedlg.py +540 -0
- wx/lib/agw/fmresources.py +407 -0
- wx/lib/agw/foldpanelbar.py +2282 -0
- wx/lib/agw/fourwaysplitter.py +1130 -0
- wx/lib/agw/genericmessagedialog.py +1549 -0
- wx/lib/agw/gradientbutton.py +732 -0
- wx/lib/agw/hyperlink.py +664 -0
- wx/lib/agw/hypertreelist.py +5374 -0
- wx/lib/agw/infobar.py +885 -0
- wx/lib/agw/knobctrl.py +945 -0
- wx/lib/agw/labelbook.py +3029 -0
- wx/lib/agw/multidirdialog.py +615 -0
- wx/lib/agw/peakmeter.py +1029 -0
- wx/lib/agw/persist/__init__.py +188 -0
- wx/lib/agw/persist/persist_constants.py +284 -0
- wx/lib/agw/persist/persist_handlers.py +2614 -0
- wx/lib/agw/persist/persistencemanager.py +864 -0
- wx/lib/agw/piectrl.py +1082 -0
- wx/lib/agw/pybusyinfo.py +399 -0
- wx/lib/agw/pycollapsiblepane.py +940 -0
- wx/lib/agw/pygauge.py +570 -0
- wx/lib/agw/pyprogress.py +917 -0
- wx/lib/agw/ribbon/__init__.py +198 -0
- wx/lib/agw/ribbon/art.py +219 -0
- wx/lib/agw/ribbon/art_aui.py +1284 -0
- wx/lib/agw/ribbon/art_default.py +81 -0
- wx/lib/agw/ribbon/art_internal.py +244 -0
- wx/lib/agw/ribbon/art_msw.py +2736 -0
- wx/lib/agw/ribbon/art_osx.py +52 -0
- wx/lib/agw/ribbon/bar.py +1261 -0
- wx/lib/agw/ribbon/buttonbar.py +1320 -0
- wx/lib/agw/ribbon/control.py +205 -0
- wx/lib/agw/ribbon/gallery.py +974 -0
- wx/lib/agw/ribbon/page.py +946 -0
- wx/lib/agw/ribbon/panel.py +1170 -0
- wx/lib/agw/ribbon/toolbar.py +1442 -0
- wx/lib/agw/rulerctrl.py +1887 -0
- wx/lib/agw/scrolledthumbnail.py +2119 -0
- wx/lib/agw/shapedbutton.py +1809 -0
- wx/lib/agw/shortcuteditor.py +2634 -0
- wx/lib/agw/speedmeter.py +1801 -0
- wx/lib/agw/supertooltip.py +1444 -0
- wx/lib/agw/thumbnailctrl.py +529 -0
- wx/lib/agw/toasterbox.py +1327 -0
- wx/lib/agw/ultimatelistctrl.py +13666 -0
- wx/lib/agw/xlsgrid.py +2113 -0
- wx/lib/agw/zoombar.py +1339 -0
- wx/lib/analogclock/__init__.py +140 -0
- wx/lib/analogclock/analogclock.py +631 -0
- wx/lib/analogclock/helpers.py +991 -0
- wx/lib/analogclock/lib_setup/__init__.py +0 -0
- wx/lib/analogclock/lib_setup/buttontreectrlpanel.py +297 -0
- wx/lib/analogclock/lib_setup/fontselect.py +57 -0
- wx/lib/analogclock/setup.py +490 -0
- wx/lib/analogclock/styles.py +47 -0
- wx/lib/anchors.py +103 -0
- wx/lib/art/__init__.py +4 -0
- wx/lib/art/flagart.py +1583 -0
- wx/lib/art/img2pyartprov.py +56 -0
- wx/lib/busy.py +146 -0
- wx/lib/buttons.py +1141 -0
- wx/lib/calendar.py +1597 -0
- wx/lib/checkbox.py +837 -0
- wx/lib/colourchooser/__init__.py +38 -0
- wx/lib/colourchooser/canvas.py +145 -0
- wx/lib/colourchooser/intl.py +24 -0
- wx/lib/colourchooser/pycolourbox.py +89 -0
- wx/lib/colourchooser/pycolourchooser.py +629 -0
- wx/lib/colourchooser/pycolourslider.py +100 -0
- wx/lib/colourchooser/pypalette.py +211 -0
- wx/lib/colourdb.py +740 -0
- wx/lib/colourselect.py +385 -0
- wx/lib/colourutils.py +118 -0
- wx/lib/combotreebox.py +944 -0
- wx/lib/delayedresult.py +420 -0
- wx/lib/dialogs.py +510 -0
- wx/lib/docview.py +3210 -0
- wx/lib/dragscroller.py +79 -0
- wx/lib/editor/README.txt +77 -0
- wx/lib/editor/__init__.py +24 -0
- wx/lib/editor/editor.py +974 -0
- wx/lib/editor/images.py +15 -0
- wx/lib/editor/selection.py +44 -0
- wx/lib/embeddedimage.py +76 -0
- wx/lib/eventStack.py +136 -0
- wx/lib/eventwatcher.py +440 -0
- wx/lib/evtmgr.py +521 -0
- wx/lib/expando.py +393 -0
- wx/lib/fancytext.py +505 -0
- wx/lib/filebrowsebutton.py +459 -0
- wx/lib/flashwin.py +262 -0
- wx/lib/flashwin_old.py +651 -0
- wx/lib/floatcanvas/FCEvents.py +53 -0
- wx/lib/floatcanvas/FCObjects.py +2923 -0
- wx/lib/floatcanvas/FloatCanvas.py +1027 -0
- wx/lib/floatcanvas/GUIMode.py +396 -0
- wx/lib/floatcanvas/NavCanvas.py +161 -0
- wx/lib/floatcanvas/Resources.py +319 -0
- wx/lib/floatcanvas/ScreenShot.py +1788 -0
- wx/lib/floatcanvas/Utilities/BBox.py +314 -0
- wx/lib/floatcanvas/Utilities/Colors.py +137 -0
- wx/lib/floatcanvas/Utilities/GUI.py +91 -0
- wx/lib/floatcanvas/Utilities/__init__.py +7 -0
- wx/lib/floatcanvas/__init__.py +124 -0
- wx/lib/foldmenu.py +89 -0
- wx/lib/gestures.py +310 -0
- wx/lib/gizmos/__init__.py +18 -0
- wx/lib/gizmos/dynamicsash.py +1202 -0
- wx/lib/gizmos/ledctrl.py +300 -0
- wx/lib/gizmos/treelistctrl.py +87 -0
- wx/lib/graphics.py +1939 -0
- wx/lib/gridmovers.py +511 -0
- wx/lib/iewin.py +249 -0
- wx/lib/iewin_old.py +894 -0
- wx/lib/imagebrowser.py +856 -0
- wx/lib/imageutils.py +163 -0
- wx/lib/infoframe.py +490 -0
- wx/lib/inspection.py +1255 -0
- wx/lib/intctrl.py +1001 -0
- wx/lib/itemspicker.py +256 -0
- wx/lib/langlistctrl.py +480 -0
- wx/lib/layoutf.py +271 -0
- wx/lib/masked/__init__.py +27 -0
- wx/lib/masked/combobox.py +839 -0
- wx/lib/masked/ctrl.py +108 -0
- wx/lib/masked/ipaddrctrl.py +242 -0
- wx/lib/masked/maskededit.py +7279 -0
- wx/lib/masked/numctrl.py +2001 -0
- wx/lib/masked/textctrl.py +465 -0
- wx/lib/masked/timectrl.py +1466 -0
- wx/lib/mixins/__init__.py +17 -0
- wx/lib/mixins/grid.py +47 -0
- wx/lib/mixins/gridlabelrenderer.py +251 -0
- wx/lib/mixins/imagelist.py +77 -0
- wx/lib/mixins/inspection.py +184 -0
- wx/lib/mixins/listctrl.py +894 -0
- wx/lib/mixins/rubberband.py +404 -0
- wx/lib/mixins/treemixin.py +678 -0
- wx/lib/msgpanel.py +95 -0
- wx/lib/multisash.py +747 -0
- wx/lib/myole4ax.idl +178 -0
- wx/lib/myole4ax.tlb +0 -0
- wx/lib/newevent.py +229 -0
- wx/lib/nvdlg.py +156 -0
- wx/lib/ogl/__init__.py +13 -0
- wx/lib/ogl/basic.py +3991 -0
- wx/lib/ogl/bmpshape.py +87 -0
- wx/lib/ogl/canvas.py +467 -0
- wx/lib/ogl/composit.py +1577 -0
- wx/lib/ogl/diagram.py +230 -0
- wx/lib/ogl/divided.py +483 -0
- wx/lib/ogl/drawn.py +900 -0
- wx/lib/ogl/lines.py +1811 -0
- wx/lib/ogl/oglmisc.py +608 -0
- wx/lib/pdfviewer/__init__.py +113 -0
- wx/lib/pdfviewer/bitmaps/ArrowLeft.png +0 -0
- wx/lib/pdfviewer/bitmaps/ArrowRight.png +0 -0
- wx/lib/pdfviewer/bitmaps/DirectionH.png +0 -0
- wx/lib/pdfviewer/bitmaps/DirectionV.png +0 -0
- wx/lib/pdfviewer/bitmaps/PlayerFirst.png +0 -0
- wx/lib/pdfviewer/bitmaps/PlayerLast.png +0 -0
- wx/lib/pdfviewer/bitmaps/PlayerNext.png +0 -0
- wx/lib/pdfviewer/bitmaps/PlayerPrev.png +0 -0
- wx/lib/pdfviewer/bitmaps/Printer.png +0 -0
- wx/lib/pdfviewer/bitmaps/ReadMe.txt +28 -0
- wx/lib/pdfviewer/bitmaps/Save.png +0 -0
- wx/lib/pdfviewer/bitmaps/ZoomIn.png +0 -0
- wx/lib/pdfviewer/bitmaps/ZoomOut.png +0 -0
- wx/lib/pdfviewer/bitmaps/encode_bitmaps.py +37 -0
- wx/lib/pdfviewer/buttonpanel.py +279 -0
- wx/lib/pdfviewer/images.py +240 -0
- wx/lib/pdfviewer/viewer.py +1077 -0
- wx/lib/pdfwin.py +295 -0
- wx/lib/pdfwin_old.py +789 -0
- wx/lib/platebtn.py +789 -0
- wx/lib/plot/CHANGELOG.md +150 -0
- wx/lib/plot/README.md +16 -0
- wx/lib/plot/__init__.py +46 -0
- wx/lib/plot/__main__.py +5 -0
- wx/lib/plot/examples/__init__.py +0 -0
- wx/lib/plot/examples/demo.py +1009 -0
- wx/lib/plot/examples/simple_example.py +54 -0
- wx/lib/plot/plotcanvas.py +2981 -0
- wx/lib/plot/polyobjects.py +1525 -0
- wx/lib/plot/utils.py +327 -0
- wx/lib/popupctl.py +250 -0
- wx/lib/printout.py +1157 -0
- wx/lib/progressindicator.py +151 -0
- wx/lib/pubsub/LICENSE_BSD_Simple.txt +23 -0
- wx/lib/pubsub/README_WxPython.txt +22 -0
- wx/lib/pubsub/RELEASE_NOTES.txt +71 -0
- wx/lib/pubsub/__init__.py +25 -0
- wx/lib/pubsub/core/__init__.py +92 -0
- wx/lib/pubsub/core/arg1/__init__.py +16 -0
- wx/lib/pubsub/core/arg1/listenerimpl.py +97 -0
- wx/lib/pubsub/core/arg1/publisher.py +40 -0
- wx/lib/pubsub/core/arg1/publishermixin.py +34 -0
- wx/lib/pubsub/core/arg1/topicargspecimpl.py +66 -0
- wx/lib/pubsub/core/arg1/topicmgrimpl.py +19 -0
- wx/lib/pubsub/core/callables.py +191 -0
- wx/lib/pubsub/core/imp2.py +63 -0
- wx/lib/pubsub/core/itopicdefnprovider.py +0 -0
- wx/lib/pubsub/core/kwargs/__init__.py +16 -0
- wx/lib/pubsub/core/kwargs/datamsg.py +27 -0
- wx/lib/pubsub/core/kwargs/listenerimpl.py +93 -0
- wx/lib/pubsub/core/kwargs/publisher.py +77 -0
- wx/lib/pubsub/core/kwargs/publishermixin.py +65 -0
- wx/lib/pubsub/core/kwargs/topicargspecimpl.py +217 -0
- wx/lib/pubsub/core/kwargs/topicmgrimpl.py +13 -0
- wx/lib/pubsub/core/listener.py +40 -0
- wx/lib/pubsub/core/listenerbase.py +185 -0
- wx/lib/pubsub/core/notificationmgr.py +185 -0
- wx/lib/pubsub/core/publisherbase.py +191 -0
- wx/lib/pubsub/core/topicargspec.py +77 -0
- wx/lib/pubsub/core/topicdefnprovider.py +632 -0
- wx/lib/pubsub/core/topicexc.py +72 -0
- wx/lib/pubsub/core/topicmgr.py +456 -0
- wx/lib/pubsub/core/topicobj.py +472 -0
- wx/lib/pubsub/core/topictreetraverser.py +143 -0
- wx/lib/pubsub/core/topicutils.py +118 -0
- wx/lib/pubsub/core/treeconfig.py +21 -0
- wx/lib/pubsub/core/validatedefnargs.py +29 -0
- wx/lib/pubsub/core/weakmethod.py +102 -0
- wx/lib/pubsub/policies.py +24 -0
- wx/lib/pubsub/pub.py +199 -0
- wx/lib/pubsub/py2and3.py +608 -0
- wx/lib/pubsub/setuparg1.py +47 -0
- wx/lib/pubsub/setupkwargs.py +29 -0
- wx/lib/pubsub/utils/__init__.py +27 -0
- wx/lib/pubsub/utils/exchandling.py +100 -0
- wx/lib/pubsub/utils/misc.py +100 -0
- wx/lib/pubsub/utils/notification.py +331 -0
- wx/lib/pubsub/utils/topictreeprinter.py +195 -0
- wx/lib/pubsub/utils/xmltopicdefnprovider.py +287 -0
- wx/lib/pydocview.py +3300 -0
- wx/lib/rcsizer.py +229 -0
- wx/lib/resizewidget.py +357 -0
- wx/lib/scrolledpanel.py +225 -0
- wx/lib/sheet.py +350 -0
- wx/lib/sized_controls.py +691 -0
- wx/lib/softwareupdate.py +361 -0
- wx/lib/splitter.py +925 -0
- wx/lib/statbmp.py +199 -0
- wx/lib/stattext.py +322 -0
- wx/lib/throbber.py +425 -0
- wx/lib/ticker.py +295 -0
- wx/lib/ticker_xrc.py +48 -0
- wx/lib/utils.py +89 -0
- wx/lib/wordwrap.py +97 -0
- wx/lib/wxcairo/__init__.py +124 -0
- wx/lib/wxcairo/wx_cairocffi.py +200 -0
- wx/lib/wxcairo/wx_pycairo.py +463 -0
- wx/lib/wxpTag.py +274 -0
- wx/locale/af/LC_MESSAGES/wxstd.mo +0 -0
- wx/locale/an/LC_MESSAGES/wxstd.mo +0 -0
- wx/locale/ar/LC_MESSAGES/wxstd.mo +0 -0
- wx/locale/ca/LC_MESSAGES/wxstd.mo +0 -0
- wx/locale/ca@valencia/LC_MESSAGES/wxstd.mo +0 -0
- wx/locale/cs/LC_MESSAGES/wxstd.mo +0 -0
- wx/locale/da/LC_MESSAGES/wxstd.mo +0 -0
- wx/locale/de/LC_MESSAGES/wxstd.mo +0 -0
- wx/locale/el/LC_MESSAGES/wxstd.mo +0 -0
- wx/locale/es/LC_MESSAGES/wxstd.mo +0 -0
- wx/locale/eu/LC_MESSAGES/wxstd.mo +0 -0
- wx/locale/fa_IR/LC_MESSAGES/wxstd.mo +0 -0
- wx/locale/fi/LC_MESSAGES/wxstd.mo +0 -0
- wx/locale/fr/LC_MESSAGES/wxstd.mo +0 -0
- wx/locale/gl_ES/LC_MESSAGES/wxstd.mo +0 -0
- wx/locale/hi/LC_MESSAGES/wxstd.mo +0 -0
- wx/locale/hr/LC_MESSAGES/wxstd.mo +0 -0
- wx/locale/hu/LC_MESSAGES/wxstd.mo +0 -0
- wx/locale/id/LC_MESSAGES/wxstd.mo +0 -0
- wx/locale/it/LC_MESSAGES/wxstd.mo +0 -0
- wx/locale/ja/LC_MESSAGES/wxstd.mo +0 -0
- wx/locale/ka/LC_MESSAGES/wxstd.mo +0 -0
- wx/locale/ko_KR/LC_MESSAGES/wxstd.mo +0 -0
- wx/locale/lt/LC_MESSAGES/wxstd.mo +0 -0
- wx/locale/lv/LC_MESSAGES/wxstd.mo +0 -0
- wx/locale/ms/LC_MESSAGES/wxstd.mo +0 -0
- wx/locale/nb/LC_MESSAGES/wxstd.mo +0 -0
- wx/locale/ne/LC_MESSAGES/wxstd.mo +0 -0
- wx/locale/nl/LC_MESSAGES/wxstd.mo +0 -0
- wx/locale/pl/LC_MESSAGES/wxstd.mo +0 -0
- wx/locale/pt/LC_MESSAGES/wxstd.mo +0 -0
- wx/locale/pt_BR/LC_MESSAGES/wxstd.mo +0 -0
- wx/locale/ro/LC_MESSAGES/wxstd.mo +0 -0
- wx/locale/ru/LC_MESSAGES/wxstd.mo +0 -0
- wx/locale/sk/LC_MESSAGES/wxstd.mo +0 -0
- wx/locale/sl/LC_MESSAGES/wxstd.mo +0 -0
- wx/locale/sq/LC_MESSAGES/wxstd.mo +0 -0
- wx/locale/sv/LC_MESSAGES/wxstd.mo +0 -0
- wx/locale/ta/LC_MESSAGES/wxstd.mo +0 -0
- wx/locale/tr/LC_MESSAGES/wxstd.mo +0 -0
- wx/locale/uk/LC_MESSAGES/wxstd.mo +0 -0
- wx/locale/vi/LC_MESSAGES/wxstd.mo +0 -0
- wx/locale/zh_CN/LC_MESSAGES/wxstd.mo +0 -0
- wx/locale/zh_TW/LC_MESSAGES/wxstd.mo +0 -0
- wx/media.py +27 -0
- wx/media.pyi +223 -0
- wx/msw.py +13 -0
- wx/msw.pyi +65 -0
- wx/propgrid.py +1451 -0
- wx/propgrid.pyi +7914 -0
- wx/py/CHANGES.txt +796 -0
- wx/py/Py.ico +0 -0
- wx/py/PyAlaCarte.py +34 -0
- wx/py/PyAlaMode.py +34 -0
- wx/py/PyAlaModeTest.py +33 -0
- wx/py/PyCrust.ico +0 -0
- wx/py/PyCrust.py +78 -0
- wx/py/PyCrust_16.png +0 -0
- wx/py/PyCrust_32.png +0 -0
- wx/py/PyFilling.py +35 -0
- wx/py/PyShell.py +78 -0
- wx/py/PySlices.ico +0 -0
- wx/py/PySlices.py +98 -0
- wx/py/PySlicesShell.py +94 -0
- wx/py/PySlices_16.png +0 -0
- wx/py/PySlices_32.png +0 -0
- wx/py/PyWrap.py +52 -0
- wx/py/README.txt +77 -0
- wx/py/__init__.py +20 -0
- wx/py/buffer.py +136 -0
- wx/py/crust.py +403 -0
- wx/py/crustslices.py +403 -0
- wx/py/dispatcher.py +259 -0
- wx/py/document.py +37 -0
- wx/py/editor.py +844 -0
- wx/py/editwindow.py +299 -0
- wx/py/filling.py +357 -0
- wx/py/frame.py +978 -0
- wx/py/images.py +212 -0
- wx/py/interpreter.py +170 -0
- wx/py/introspect.py +393 -0
- wx/py/magic.py +98 -0
- wx/py/parse.py +134 -0
- wx/py/path.py +36 -0
- wx/py/pseudo.py +99 -0
- wx/py/shell.py +1588 -0
- wx/py/sliceshell.py +3814 -0
- wx/py/tests/test_interpreter.py +71 -0
- wx/py/tests/test_introspect.py +862 -0
- wx/py/tests/test_pseudo.py +70 -0
- wx/py/tests/test_version.py +36 -0
- wx/py/tests/testall.py +22 -0
- wx/py/version.py +7 -0
- wx/ribbon.py +45 -0
- wx/ribbon.pyi +2494 -0
- wx/richtext.py +142 -0
- wx/richtext.pyi +12113 -0
- wx/siplib.cp313-win_amd64.pyd +0 -0
- wx/stc.py +58 -0
- wx/stc.pyi +8463 -0
- wx/svg/__init__.py +364 -0
- wx/svg/_nanosvg.cp313-win_amd64.pyd +0 -0
- wx/tools/__init__.py +18 -0
- wx/tools/dbg.py +268 -0
- wx/tools/genaxmodule.py +50 -0
- wx/tools/helpviewer.py +92 -0
- wx/tools/img2img.py +85 -0
- wx/tools/img2png.py +54 -0
- wx/tools/img2py.py +309 -0
- wx/tools/img2xpm.py +54 -0
- wx/tools/pywxrc.py +949 -0
- wx/tools/wxget.py +254 -0
- wx/tools/wxget_docs_demo.py +186 -0
- wx/wxbase315u_net_vc140_x64.dll +0 -0
- wx/wxbase315u_vc140_x64.dll +0 -0
- wx/wxbase315u_xml_vc140_x64.dll +0 -0
- wx/wxmsw315u_adv_vc140_x64.dll +0 -0
- wx/wxmsw315u_aui_vc140_x64.dll +0 -0
- wx/wxmsw315u_core_vc140_x64.dll +0 -0
- wx/wxmsw315u_gl_vc140_x64.dll +0 -0
- wx/wxmsw315u_html_vc140_x64.dll +0 -0
- wx/wxmsw315u_media_vc140_x64.dll +0 -0
- wx/wxmsw315u_propgrid_vc140_x64.dll +0 -0
- wx/wxmsw315u_qa_vc140_x64.dll +0 -0
- wx/wxmsw315u_ribbon_vc140_x64.dll +0 -0
- wx/wxmsw315u_richtext_vc140_x64.dll +0 -0
- wx/wxmsw315u_stc_vc140_x64.dll +0 -0
- wx/wxmsw315u_webview_vc140_x64.dll +0 -0
- wx/wxmsw315u_xrc_vc140_x64.dll +0 -0
- wx/xml.py +15 -0
- wx/xml.pyi +575 -0
- wx/xrc.py +65 -0
- wx/xrc.pyi +742 -0
- wxPython_zombie-3.1.5.8.dist-info/LICENSE.txt +950 -0
- wxPython_zombie-3.1.5.8.dist-info/METADATA +107 -0
- wxPython_zombie-3.1.5.8.dist-info/RECORD +1175 -0
- wxPython_zombie-3.1.5.8.dist-info/WHEEL +5 -0
- wxPython_zombie-3.1.5.8.dist-info/entry_points.txt +2 -0
- wxPython_zombie-3.1.5.8.dist-info/top_level.txt +1 -0
wx/lib/agw/speedmeter.py
ADDED
|
@@ -0,0 +1,1801 @@
|
|
|
1
|
+
# --------------------------------------------------------------------------- #
|
|
2
|
+
# SPEEDMETER Control wxPython IMPLEMENTATION
|
|
3
|
+
# Python Code By:
|
|
4
|
+
#
|
|
5
|
+
# Andrea Gavana, @ 25 Sep 2005
|
|
6
|
+
# Latest Revision: 27 Dec 2012, 21.00 GMT
|
|
7
|
+
# (c) 2021 Zombie
|
|
8
|
+
#
|
|
9
|
+
#
|
|
10
|
+
# TODO List/Caveats
|
|
11
|
+
#
|
|
12
|
+
# 1. Combination Of The Two Styles:
|
|
13
|
+
#
|
|
14
|
+
# SM_DRAW_PARTIAL_FILLER
|
|
15
|
+
# SM_DRAW_SECTORS
|
|
16
|
+
#
|
|
17
|
+
# Does Not Work Very Well. It Works Well Only In Case When The Sector Colours
|
|
18
|
+
# Are The Same For All Intervals.
|
|
19
|
+
#
|
|
20
|
+
#
|
|
21
|
+
# Thanks To Gerard Grazzini That Has Tried The Demo On MacOS, I Corrected A
|
|
22
|
+
# Bug On Line 246
|
|
23
|
+
#
|
|
24
|
+
#
|
|
25
|
+
# For All Kind Of Problems, Requests Of Enhancements And Bug Reports, Please
|
|
26
|
+
# Write To Me At:
|
|
27
|
+
#
|
|
28
|
+
# andrea.gavana@gmail.com
|
|
29
|
+
# andrea.gavana@maerskoil.com
|
|
30
|
+
#
|
|
31
|
+
# Or, Obviously, To The wxPython Mailing List!!!
|
|
32
|
+
#
|
|
33
|
+
# Tags: phoenix-port, unittest, documented, py3-port
|
|
34
|
+
#
|
|
35
|
+
# End Of Comments
|
|
36
|
+
# --------------------------------------------------------------------------- #
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
"""
|
|
40
|
+
:class:`~wx.lib.agw.speedmeter.SpeedMeter` tries to reproduce the behavior of some car controls (but not only),
|
|
41
|
+
by creating an "angular" control (actually, circular).
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
Description
|
|
45
|
+
===========
|
|
46
|
+
|
|
47
|
+
:class:`SpeedMeter` tries to reproduce the behavior of some car controls (but not only),
|
|
48
|
+
by creating an "angular" control (actually, circular). I remember to have seen
|
|
49
|
+
it somewhere, and i decided to implement it in wxPython.
|
|
50
|
+
|
|
51
|
+
:class:`SpeedMeter` starts its construction from an empty bitmap, and it uses some
|
|
52
|
+
functions of the :class:`wx.DC` class to create the rounded effects. everything is
|
|
53
|
+
processed in the `Draw()` method of :class:`SpeedMeter` class.
|
|
54
|
+
|
|
55
|
+
This implementation allows you to use either directly the :class:`PaintDC`, or the
|
|
56
|
+
better (for me) double buffered style with :class:`BufferedPaintDC`. the double
|
|
57
|
+
buffered implementation has been adapted from the wxPython wiki example:
|
|
58
|
+
|
|
59
|
+
http://wiki.wxpython.org/index.cgi/doublebuffereddrawing
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
Usage
|
|
63
|
+
=====
|
|
64
|
+
|
|
65
|
+
Usage example::
|
|
66
|
+
|
|
67
|
+
import wx
|
|
68
|
+
import wx.lib.agw.speedmeter as SM
|
|
69
|
+
|
|
70
|
+
class MyFrame(wx.Frame):
|
|
71
|
+
|
|
72
|
+
def __init__(self, parent):
|
|
73
|
+
|
|
74
|
+
wx.Frame.__init__(self, parent, -1, "SpeedMeter Demo")
|
|
75
|
+
|
|
76
|
+
speed = SM.SpeedMeter(self, agwStyle=SM.SM_DRAW_HAND|SM.SM_DRAW_SECTORS|SM.SM_DRAW_MIDDLE_TEXT|SM.SM_DRAW_SECONDARY_TICKS)
|
|
77
|
+
|
|
78
|
+
# Set The Region Of Existence Of SpeedMeter (Always In Radians!!!!)
|
|
79
|
+
speed.SetAngleRange(-pi/6, 7*pi/6)
|
|
80
|
+
|
|
81
|
+
# Create The Intervals That Will Divide Our SpeedMeter In Sectors
|
|
82
|
+
intervals = range(0, 201, 20)
|
|
83
|
+
speed.SetIntervals(intervals)
|
|
84
|
+
|
|
85
|
+
# Assign The Same Colours To All Sectors (We Simulate A Car Control For Speed)
|
|
86
|
+
# Usually This Is Black
|
|
87
|
+
colours = [wx.BLACK]*10
|
|
88
|
+
speed.SetIntervalColours(colours)
|
|
89
|
+
|
|
90
|
+
# Assign The Ticks: Here They Are Simply The String Equivalent Of The Intervals
|
|
91
|
+
ticks = [str(interval) for interval in intervals]
|
|
92
|
+
speed.SetTicks(ticks)
|
|
93
|
+
# Set The Ticks/Tick Markers Colour
|
|
94
|
+
speed.SetTicksColour(wx.WHITE)
|
|
95
|
+
# We Want To Draw 5 Secondary Ticks Between The Principal Ticks
|
|
96
|
+
speed.SetNumberOfSecondaryTicks(5)
|
|
97
|
+
|
|
98
|
+
# Set The Font For The Ticks Markers
|
|
99
|
+
speed.SetTicksFont(wx.Font(7, wx.FONTFAMILY_SWISS, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL))
|
|
100
|
+
|
|
101
|
+
# Set The Text In The Center Of SpeedMeter
|
|
102
|
+
speed.SetMiddleText("Km/h")
|
|
103
|
+
# Assign The Colour To The Center Text
|
|
104
|
+
speed.SetMiddleTextColour(wx.WHITE)
|
|
105
|
+
# Assign A Font To The Center Text
|
|
106
|
+
speed.SetMiddleTextFont(wx.Font(8, wx.FONTFAMILY_SWISS, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_BOLD))
|
|
107
|
+
|
|
108
|
+
# Set The Colour For The Hand Indicator
|
|
109
|
+
speed.SetHandColour(wx.Colour(255, 50, 0))
|
|
110
|
+
|
|
111
|
+
# Do Not Draw The External (Container) Arc. Drawing The External Arc May
|
|
112
|
+
# Sometimes Create Uglier Controls. Try To Comment This Line And See It
|
|
113
|
+
# For Yourself!
|
|
114
|
+
speed.DrawExternalArc(False)
|
|
115
|
+
|
|
116
|
+
# Set The Current Value For The SpeedMeter
|
|
117
|
+
speed.SetSpeedValue(44)
|
|
118
|
+
|
|
119
|
+
|
|
120
|
+
# our normal wxApp-derived class, as usual
|
|
121
|
+
|
|
122
|
+
app = wx.App(0)
|
|
123
|
+
|
|
124
|
+
frame = MyFrame(None)
|
|
125
|
+
app.SetTopWindow(frame)
|
|
126
|
+
frame.Show()
|
|
127
|
+
|
|
128
|
+
app.MainLoop()
|
|
129
|
+
|
|
130
|
+
|
|
131
|
+
|
|
132
|
+
Methods and Settings
|
|
133
|
+
====================
|
|
134
|
+
|
|
135
|
+
:class:`SpeedMeter` is highly customizable, and in particular you can set:
|
|
136
|
+
|
|
137
|
+
- The start and end angle of existence for :class:`SpeedMeter`;
|
|
138
|
+
- The intervals in which you divide the :class:`SpeedMeter` (numerical values);
|
|
139
|
+
- The corresponding thicks for the intervals;
|
|
140
|
+
- The interval colours (different intervals may have different filling colours);
|
|
141
|
+
- The ticks font and colour;
|
|
142
|
+
- The background colour (outsize the :class:`SpeedMeter` region);
|
|
143
|
+
- The external arc colour;
|
|
144
|
+
- The hand (arrow) colour;
|
|
145
|
+
- The hand's shadow colour;
|
|
146
|
+
- The hand's style ("arrow" or "hand");
|
|
147
|
+
- The partial filler colour;
|
|
148
|
+
- The number of secondary (intermediate) ticks;
|
|
149
|
+
- The direction of increasing speed ("advance" or "reverse");
|
|
150
|
+
- The text to be drawn in the middle and its font;
|
|
151
|
+
- The icon to be drawn in the middle;
|
|
152
|
+
- The first and second gradient colours (that fills the :class:`SpeedMeter` control);
|
|
153
|
+
- The current value.
|
|
154
|
+
|
|
155
|
+
|
|
156
|
+
Window Styles
|
|
157
|
+
=============
|
|
158
|
+
|
|
159
|
+
This class supports the following window styles:
|
|
160
|
+
|
|
161
|
+
=========================== =========== ==================================================
|
|
162
|
+
Window Styles Hex Value Description
|
|
163
|
+
=========================== =========== ==================================================
|
|
164
|
+
``SM_ROTATE_TEXT`` 0x1 Draws the ticks rotated: the ticks are rotated accordingly to the tick marks positions.
|
|
165
|
+
``SM_DRAW_SECTORS`` 0x2 Different intervals are painted in differend colours (every sector of the circle has its own colour).
|
|
166
|
+
``SM_DRAW_PARTIAL_SECTORS`` 0x4 Every interval has its own colour, but only a circle corona is painted near the ticks.
|
|
167
|
+
``SM_DRAW_HAND`` 0x8 The hand (arrow indicator) is drawn.
|
|
168
|
+
``SM_DRAW_SHADOW`` 0x10 A shadow for the hand is drawn.
|
|
169
|
+
``SM_DRAW_PARTIAL_FILLER`` 0x20 A circle corona that follows the hand position is drawn near the ticks.
|
|
170
|
+
``SM_DRAW_SECONDARY_TICKS`` 0x40 Intermediate (smaller) ticks are drawn between principal ticks.
|
|
171
|
+
``SM_DRAW_MIDDLE_TEXT`` 0x80 Some text is printed in the middle of the control near the center.
|
|
172
|
+
``SM_DRAW_MIDDLE_ICON`` 0x100 An icon is drawn in the middle of the control near the center.
|
|
173
|
+
``SM_DRAW_GRADIENT`` 0x200 A gradient of colours will fill the control.
|
|
174
|
+
``SM_DRAW_FANCY_TICKS`` 0x400 With this style you can use xml tags to create some custom text and draw it at the ticks position. See :mod:`lib.fancytext` for the tags.
|
|
175
|
+
=========================== =========== ==================================================
|
|
176
|
+
|
|
177
|
+
|
|
178
|
+
Events Processing
|
|
179
|
+
=================
|
|
180
|
+
|
|
181
|
+
`No custom events are available for this class.`
|
|
182
|
+
|
|
183
|
+
|
|
184
|
+
License And Version
|
|
185
|
+
===================
|
|
186
|
+
|
|
187
|
+
:class:`SpeedMeter` is distributed under the wxPython license.
|
|
188
|
+
|
|
189
|
+
Latest revision: Andrea Gavana @ 27 Dec 2012, 21.00 GMT
|
|
190
|
+
|
|
191
|
+
Version 0.3
|
|
192
|
+
|
|
193
|
+
"""
|
|
194
|
+
|
|
195
|
+
#----------------------------------------------------------------------
|
|
196
|
+
# Beginning Of SPEEDMETER wxPython Code
|
|
197
|
+
#----------------------------------------------------------------------
|
|
198
|
+
|
|
199
|
+
import wx
|
|
200
|
+
import wx.lib.colourdb
|
|
201
|
+
import wx.lib.fancytext as fancytext
|
|
202
|
+
|
|
203
|
+
from math import pi, sin, cos, log, sqrt, atan2
|
|
204
|
+
|
|
205
|
+
#----------------------------------------------------------------------
|
|
206
|
+
# DC Drawing Options
|
|
207
|
+
#----------------------------------------------------------------------
|
|
208
|
+
# SM_NORMAL_DC Uses The Normal wx.PaintDC
|
|
209
|
+
# SM_BUFFERED_DC Uses The Double Buffered Drawing Style
|
|
210
|
+
|
|
211
|
+
SM_NORMAL_DC = 0
|
|
212
|
+
""" Uses the normal :class:`PaintDC`. """
|
|
213
|
+
SM_BUFFERED_DC = 1
|
|
214
|
+
""" Uses a double buffered drawing code. """
|
|
215
|
+
|
|
216
|
+
#----------------------------------------------------------------------
|
|
217
|
+
# SpeedMeter Styles
|
|
218
|
+
#----------------------------------------------------------------------
|
|
219
|
+
# SM_ROTATE_TEXT: Draws The Ticks Rotated: The Ticks Are Rotated
|
|
220
|
+
# Accordingly To The Tick Marks Positions
|
|
221
|
+
# SM_DRAW_SECTORS: Different Intervals Are Painted In Differend Colours
|
|
222
|
+
# (Every Sector Of The Circle Has Its Own Colour)
|
|
223
|
+
# SM_DRAW_PARTIAL_SECTORS: Every Interval Has Its Own Colour, But Only
|
|
224
|
+
# A Circle Corona Is Painted Near The Ticks
|
|
225
|
+
# SM_DRAW_HAND: The Hand (Arrow Indicator) Is Drawn
|
|
226
|
+
# SM_DRAW_SHADOW: A Shadow For The Hand Is Drawn
|
|
227
|
+
# SM_DRAW_PARTIAL_FILLER: A Circle Corona That Follows The Hand Position
|
|
228
|
+
# Is Drawn Near The Ticks
|
|
229
|
+
# SM_DRAW_SECONDARY_TICKS: Intermediate (Smaller) Ticks Are Drawn Between
|
|
230
|
+
# Principal Ticks
|
|
231
|
+
# SM_DRAW_MIDDLE_TEXT: Some Text Is Printed In The Middle Of The Control
|
|
232
|
+
# Near The Center
|
|
233
|
+
# SM_DRAW_MIDDLE_ICON: An Icon Is Drawn In The Middle Of The Control Near
|
|
234
|
+
# The Center
|
|
235
|
+
# SM_DRAW_GRADIENT: A Gradient Of Colours Will Fill The Control
|
|
236
|
+
# SM_DRAW_FANCY_TICKS: With This Style You Can Use XML Tags To Create
|
|
237
|
+
# Some Custom Text And Draw It At The Ticks Position.
|
|
238
|
+
# See wx.lib.fancytext For The Tags.
|
|
239
|
+
|
|
240
|
+
SM_ROTATE_TEXT = 1
|
|
241
|
+
""" Draws the ticks rotated: the ticks are rotated accordingly to the tick marks positions. """
|
|
242
|
+
SM_DRAW_SECTORS = 2
|
|
243
|
+
""" Different intervals are painted in differend colours (every sector of the circle has its own colour). """
|
|
244
|
+
SM_DRAW_PARTIAL_SECTORS = 4
|
|
245
|
+
""" Every interval has its own colour, but only a circle corona is painted near the ticks. """
|
|
246
|
+
SM_DRAW_HAND = 8
|
|
247
|
+
""" The hand (arrow indicator) is drawn. """
|
|
248
|
+
SM_DRAW_SHADOW = 16
|
|
249
|
+
""" A shadow for the hand is drawn. """
|
|
250
|
+
SM_DRAW_PARTIAL_FILLER = 32
|
|
251
|
+
""" A circle corona that follows the hand position is drawn near the ticks. """
|
|
252
|
+
SM_DRAW_SECONDARY_TICKS = 64
|
|
253
|
+
""" Intermediate (smaller) ticks are drawn between principal ticks. """
|
|
254
|
+
SM_DRAW_MIDDLE_TEXT = 128
|
|
255
|
+
""" Some text is printed in the middle of the control near the center. """
|
|
256
|
+
SM_DRAW_MIDDLE_ICON = 256
|
|
257
|
+
""" An icon is drawn in the middle of the control near the center. """
|
|
258
|
+
SM_DRAW_GRADIENT = 512
|
|
259
|
+
""" A gradient of colours will fill the control. """
|
|
260
|
+
SM_DRAW_FANCY_TICKS = 1024
|
|
261
|
+
""" With this style you can use xml tags to create some custom text and draw it at the ticks position. See :mod:`lib.fancytext` for the tags. """
|
|
262
|
+
|
|
263
|
+
#----------------------------------------------------------------------
|
|
264
|
+
# Event Binding
|
|
265
|
+
#----------------------------------------------------------------------
|
|
266
|
+
# SM_MOUSE_TRACK: The Mouse Left Click/Drag Allow You To Change The
|
|
267
|
+
# SpeedMeter Value Interactively
|
|
268
|
+
|
|
269
|
+
SM_MOUSE_TRACK = 1
|
|
270
|
+
""" Flag to allow the left/right click of the mouse to change the :class:`SpeedMeter` value interactively. """
|
|
271
|
+
|
|
272
|
+
fontfamily = [wx.FONTFAMILY_DEFAULT, wx.FONTFAMILY_DECORATIVE, wx.FONTFAMILY_ROMAN,
|
|
273
|
+
wx.FONTFAMILY_SCRIPT, wx.FONTFAMILY_SWISS, wx.FONTFAMILY_MODERN,
|
|
274
|
+
wx.FONTFAMILY_TELETYPE, wx.FONTFAMILY_UNKNOWN]
|
|
275
|
+
familyname = ["default", "decorative", "roman", "script", "swiss", "modern",
|
|
276
|
+
"teletype", "unknown"]
|
|
277
|
+
|
|
278
|
+
weights = [ wx.FONTWEIGHT_INVALID, wx.FONTWEIGHT_THIN, wx.FONTWEIGHT_EXTRALIGHT,
|
|
279
|
+
wx.FONTWEIGHT_LIGHT, wx.FONTWEIGHT_NORMAL, wx.FONTWEIGHT_MEDIUM,
|
|
280
|
+
wx.FONTWEIGHT_SEMIBOLD, wx.FONTWEIGHT_BOLD, wx.FONTWEIGHT_EXTRABOLD,
|
|
281
|
+
wx.FONTWEIGHT_HEAVY, wx.FONTWEIGHT_EXTRAHEAVY]
|
|
282
|
+
weightsname = ["invalid", "thin", "extra-light", "normal", "medium", "semi-bold",
|
|
283
|
+
"bold", "extra-bold", "heavy", "extra-heavy"]
|
|
284
|
+
|
|
285
|
+
styles = [ wx.FONTSTYLE_NORMAL, wx.FONTSTYLE_ITALIC, wx.FONTSTYLE_SLANT]
|
|
286
|
+
stylesname = ["normal", "italic", "slant"]
|
|
287
|
+
|
|
288
|
+
|
|
289
|
+
|
|
290
|
+
#----------------------------------------------------------------------
|
|
291
|
+
# BUFFERENDWINDOW Class
|
|
292
|
+
# This Class Has Been Taken From The wxPython Wiki, And Slightly
|
|
293
|
+
# Adapted To Fill My Needs. See:
|
|
294
|
+
#
|
|
295
|
+
# http://wiki.wxpython.org/index.cgi/DoubleBufferedDrawing
|
|
296
|
+
#
|
|
297
|
+
# For More Info About DC And Double Buffered Drawing.
|
|
298
|
+
#----------------------------------------------------------------------
|
|
299
|
+
|
|
300
|
+
class BufferedWindow(wx.Window):
|
|
301
|
+
"""
|
|
302
|
+
A buffered window class.
|
|
303
|
+
|
|
304
|
+
To use it, subclass it and define a `Draw(dc)` method that takes a `dc`
|
|
305
|
+
to draw to. In that method, put the code needed to draw the picture
|
|
306
|
+
you want. The window will automatically be double buffered, and the
|
|
307
|
+
screen will be automatically updated when a Paint event is received.
|
|
308
|
+
|
|
309
|
+
When the drawing needs to change, you app needs to call the
|
|
310
|
+
:meth:`BufferedWindow.UpdateDrawing() <BufferedWindow.UpdateDrawing>` method. Since the drawing is stored in a bitmap, you
|
|
311
|
+
can also save the drawing to file by calling the
|
|
312
|
+
`SaveToFile(self, file_name, file_type)` method.
|
|
313
|
+
"""
|
|
314
|
+
|
|
315
|
+
def __init__(self, parent, id=wx.ID_ANY, pos=wx.DefaultPosition, size=wx.DefaultSize,
|
|
316
|
+
style=wx.NO_FULL_REPAINT_ON_RESIZE, bufferedstyle=SM_BUFFERED_DC):
|
|
317
|
+
"""
|
|
318
|
+
Default class constructor.
|
|
319
|
+
|
|
320
|
+
:param `parent`: parent window. Must not be ``None``;
|
|
321
|
+
:param `id`: window identifier. A value of -1 indicates a default value;
|
|
322
|
+
:param `pos`: the control position. A value of (-1, -1) indicates a default position,
|
|
323
|
+
chosen by either the windowing system or wxPython, depending on platform;
|
|
324
|
+
:param `size`: the control size. A value of (-1, -1) indicates a default size,
|
|
325
|
+
chosen by either the windowing system or wxPython, depending on platform;
|
|
326
|
+
:param `style`: the window style;
|
|
327
|
+
:param `bufferedstyle`: if set to ``SM_BUFFERED_DC``, double-buffering will
|
|
328
|
+
be used.
|
|
329
|
+
"""
|
|
330
|
+
|
|
331
|
+
wx.Window.__init__(self, parent, id, pos, size, style)
|
|
332
|
+
|
|
333
|
+
self.Bind(wx.EVT_PAINT, self.OnPaint)
|
|
334
|
+
self.Bind(wx.EVT_SIZE, self.OnSize)
|
|
335
|
+
self.Bind(wx.EVT_ERASE_BACKGROUND, lambda x: None)
|
|
336
|
+
|
|
337
|
+
self._isWindowCreated = False
|
|
338
|
+
if '__WXGTK__' in wx.PlatformInfo:
|
|
339
|
+
self.Bind(wx.EVT_WINDOW_CREATE, self.doSetWindowCreated)
|
|
340
|
+
else:
|
|
341
|
+
# OnSize called to make sure the buffer is initialized.
|
|
342
|
+
# This might result in OnSize getting called twice on some
|
|
343
|
+
# platforms at initialization, but little harm done.
|
|
344
|
+
self.doSetWindowCreated(None)
|
|
345
|
+
|
|
346
|
+
|
|
347
|
+
def doSetWindowCreated(self, evt):
|
|
348
|
+
"""
|
|
349
|
+
Method to call OnSize on GTK when window is created.
|
|
350
|
+
"""
|
|
351
|
+
self._isWindowCreated = True
|
|
352
|
+
self.OnSize(None)
|
|
353
|
+
|
|
354
|
+
|
|
355
|
+
def Draw(self, dc):
|
|
356
|
+
"""
|
|
357
|
+
This method should be overridden when sub-classed.
|
|
358
|
+
|
|
359
|
+
:param `dc`: an instance of :class:`wx.DC`.
|
|
360
|
+
"""
|
|
361
|
+
pass
|
|
362
|
+
|
|
363
|
+
|
|
364
|
+
def OnPaint(self, event):
|
|
365
|
+
"""
|
|
366
|
+
Handles the ``wx.EVT_PAINT`` event for :class:`BufferedWindow`.
|
|
367
|
+
|
|
368
|
+
:param `event`: a :class:`PaintEvent` event to be processed.
|
|
369
|
+
"""
|
|
370
|
+
|
|
371
|
+
if self._bufferedstyle == SM_BUFFERED_DC:
|
|
372
|
+
dc = wx.BufferedPaintDC(self, self._Buffer)
|
|
373
|
+
else:
|
|
374
|
+
dc = wx.PaintDC(self)
|
|
375
|
+
dc.DrawBitmap(self._Buffer,0,0)
|
|
376
|
+
|
|
377
|
+
|
|
378
|
+
def OnSize(self,event):
|
|
379
|
+
"""
|
|
380
|
+
Handles the ``wx.EVT_SIZE`` event for :class:`BufferedWindow`.
|
|
381
|
+
|
|
382
|
+
:param `event`: a :class:`wx.SizeEvent` event to be processed.
|
|
383
|
+
"""
|
|
384
|
+
|
|
385
|
+
self.Width, self.Height = self.GetClientSize()
|
|
386
|
+
|
|
387
|
+
# Make new off screen bitmap: this bitmap will always have the
|
|
388
|
+
# current drawing in it, so it can be used to save the image to
|
|
389
|
+
# a file, or whatever.
|
|
390
|
+
|
|
391
|
+
# Some platforms object to creating bitmaps with size < (1,1)
|
|
392
|
+
self.Width = max(self.Width, 1)
|
|
393
|
+
self.Height = max(self.Height, 1)
|
|
394
|
+
|
|
395
|
+
self._Buffer = wx.Bitmap(self.Width, self.Height)
|
|
396
|
+
if self._isWindowCreated:
|
|
397
|
+
self.UpdateDrawing()
|
|
398
|
+
|
|
399
|
+
|
|
400
|
+
def UpdateDrawing(self):
|
|
401
|
+
"""
|
|
402
|
+
This would get called if the drawing needed to change, for whatever reason.
|
|
403
|
+
|
|
404
|
+
The idea here is that the drawing is based on some data generated
|
|
405
|
+
elsewhere in the system. if that data changes, the drawing needs to
|
|
406
|
+
be updated.
|
|
407
|
+
"""
|
|
408
|
+
|
|
409
|
+
if self._bufferedstyle == SM_BUFFERED_DC:
|
|
410
|
+
dc = wx.BufferedDC(wx.ClientDC(self), self._Buffer)
|
|
411
|
+
if 'wxMSW' in wx.PlatformInfo:
|
|
412
|
+
dc = wx.GCDC(dc)
|
|
413
|
+
self.Draw(dc)
|
|
414
|
+
else:
|
|
415
|
+
# update the buffer
|
|
416
|
+
dc = wx.MemoryDC()
|
|
417
|
+
dc.SelectObject(self._Buffer)
|
|
418
|
+
|
|
419
|
+
if 'wxMSW' in wx.PlatformInfo:
|
|
420
|
+
dc = wx.GCDC(dc)
|
|
421
|
+
self.Draw(dc)
|
|
422
|
+
# update the screen
|
|
423
|
+
wx.ClientDC(self).Blit(0, 0, self.Width, self.Height, dc, 0, 0)
|
|
424
|
+
|
|
425
|
+
|
|
426
|
+
#----------------------------------------------------------------------
|
|
427
|
+
# SPEEDMETER Class
|
|
428
|
+
# This Is The Main Class Implementation. See __init__() Method For
|
|
429
|
+
# Details.
|
|
430
|
+
#----------------------------------------------------------------------
|
|
431
|
+
|
|
432
|
+
class SpeedMeter(BufferedWindow):
|
|
433
|
+
"""
|
|
434
|
+
:class:`SpeedMeter` tries to reproduce the behavior of some car controls (but not only),
|
|
435
|
+
by creating an "angular" control (actually, circular).
|
|
436
|
+
|
|
437
|
+
This is the main class implementation.
|
|
438
|
+
"""
|
|
439
|
+
def __init__(self, parent, id=wx.ID_ANY, pos=wx.DefaultPosition,
|
|
440
|
+
size=wx.DefaultSize, agwStyle=SM_DRAW_HAND,
|
|
441
|
+
bufferedstyle=SM_BUFFERED_DC,
|
|
442
|
+
mousestyle=0):
|
|
443
|
+
"""
|
|
444
|
+
Default class constructor.
|
|
445
|
+
|
|
446
|
+
:param `parent`: parent window. Must not be ``None``;
|
|
447
|
+
:param `id`: window identifier. A value of -1 indicates a default value;
|
|
448
|
+
:param `pos`: the control position. A value of (-1, -1) indicates a default position,
|
|
449
|
+
chosen by either the windowing system or wxPython, depending on platform;
|
|
450
|
+
:param `size`: the control size. A value of (-1, -1) indicates a default size,
|
|
451
|
+
chosen by either the windowing system or wxPython, depending on platform;
|
|
452
|
+
:param `agwStyle`: this value specifies the :class:`SpeedMeter` styles, and can be a
|
|
453
|
+
combination of the following bits:
|
|
454
|
+
|
|
455
|
+
=========================== =========== ==================================================
|
|
456
|
+
Window Styles Hex Value Description
|
|
457
|
+
=========================== =========== ==================================================
|
|
458
|
+
``SM_ROTATE_TEXT`` 0x1 Draws the ticks rotated: the ticks are rotated accordingly to the tick marks positions.
|
|
459
|
+
``SM_DRAW_SECTORS`` 0x2 Different intervals are painted in differend colours (every sector of the circle has its own colour).
|
|
460
|
+
``SM_DRAW_PARTIAL_SECTORS`` 0x4 Every interval has its own colour, but only a circle corona is painted near the ticks.
|
|
461
|
+
``SM_DRAW_HAND`` 0x8 The hand (arrow indicator) is drawn.
|
|
462
|
+
``SM_DRAW_SHADOW`` 0x10 A shadow for the hand is drawn.
|
|
463
|
+
``SM_DRAW_PARTIAL_FILLER`` 0x20 A circle corona that follows the hand position is drawn near the ticks.
|
|
464
|
+
``SM_DRAW_SECONDARY_TICKS`` 0x40 Intermediate (smaller) ticks are drawn between principal ticks.
|
|
465
|
+
``SM_DRAW_MIDDLE_TEXT`` 0x80 Some text is printed in the middle of the control near the center.
|
|
466
|
+
``SM_DRAW_MIDDLE_ICON`` 0x100 An icon is drawn in the middle of the control near the center.
|
|
467
|
+
``SM_DRAW_GRADIENT`` 0x200 A gradient of colours will fill the control.
|
|
468
|
+
``SM_DRAW_FANCY_TICKS`` 0x400 With this style you can use xml tags to create some custom text and draw it at the ticks position. See :mod:`lib.fancytext` for the tags.
|
|
469
|
+
=========================== =========== ==================================================
|
|
470
|
+
|
|
471
|
+
:param `bufferedstyle`: this value allows you to use the normal :class:`PaintDC` or the
|
|
472
|
+
double buffered drawing options:
|
|
473
|
+
|
|
474
|
+
=========================== =========== ==================================================
|
|
475
|
+
Buffered Styles Hex Value Description
|
|
476
|
+
=========================== =========== ==================================================
|
|
477
|
+
``SM_NORMAL_DC`` 0x0 Uses the normal :class:`PaintDC`
|
|
478
|
+
``SM_BUFFERED_DC`` 0x1 Uses the double buffered drawing style
|
|
479
|
+
=========================== =========== ==================================================
|
|
480
|
+
|
|
481
|
+
:param `mousestyle`: this value allows you to use the mouse to change the :class:`SpeedMeter`
|
|
482
|
+
value interactively with left click/drag events. If set to ``SM_MOUSE_TRACK``, the mouse
|
|
483
|
+
left click/drag allow you to change the :class:`SpeedMeter` value interactively.
|
|
484
|
+
"""
|
|
485
|
+
|
|
486
|
+
self._agwStyle = agwStyle
|
|
487
|
+
self._bufferedstyle = bufferedstyle
|
|
488
|
+
self._mousestyle = mousestyle
|
|
489
|
+
self._middleicon = None
|
|
490
|
+
|
|
491
|
+
if self._agwStyle & SM_DRAW_SECTORS and self._agwStyle & SM_DRAW_GRADIENT:
|
|
492
|
+
errstr = "\nERROR: Incompatible Options: SM_DRAW_SECTORS Can Not Be Used In "
|
|
493
|
+
errstr = errstr + "Conjunction With SM_DRAW_GRADIENT."
|
|
494
|
+
raise Exception(errstr)
|
|
495
|
+
|
|
496
|
+
if self._agwStyle & SM_DRAW_PARTIAL_SECTORS and self._agwStyle & SM_DRAW_SECTORS:
|
|
497
|
+
errstr = "\nERROR: Incompatible Options: SM_DRAW_SECTORS Can Not Be Used In "
|
|
498
|
+
errstr = errstr + "Conjunction With SM_DRAW_PARTIAL_SECTORS."
|
|
499
|
+
raise Exception(errstr)
|
|
500
|
+
|
|
501
|
+
if self._agwStyle & SM_DRAW_PARTIAL_SECTORS and self._agwStyle & SM_DRAW_PARTIAL_FILLER:
|
|
502
|
+
errstr = "\nERROR: Incompatible Options: SM_DRAW_PARTIAL_SECTORS Can Not Be Used In "
|
|
503
|
+
errstr = errstr + "Conjunction With SM_DRAW_PARTIAL_FILLER."
|
|
504
|
+
raise Exception(errstr)
|
|
505
|
+
|
|
506
|
+
if self._agwStyle & SM_DRAW_FANCY_TICKS and self._agwStyle & SM_ROTATE_TEXT:
|
|
507
|
+
errstr = "\nERROR: Incompatible Options: SM_DRAW_FANCY_TICKS Can Not Be Used In "
|
|
508
|
+
errstr = errstr + "Conjunction With SM_ROTATE_TEXT."
|
|
509
|
+
raise Exception(errstr)
|
|
510
|
+
|
|
511
|
+
if self._agwStyle & SM_DRAW_SHADOW and self._agwStyle & SM_DRAW_HAND == 0:
|
|
512
|
+
errstr = "\nERROR: Incompatible Options: SM_DRAW_SHADOW Can Be Used Only In "
|
|
513
|
+
errstr = errstr + "Conjunction With SM_DRAW_HAND."
|
|
514
|
+
raise Exception(errstr)
|
|
515
|
+
|
|
516
|
+
if self._agwStyle & SM_DRAW_FANCY_TICKS:
|
|
517
|
+
wx.lib.colourdb.updateColourDB()
|
|
518
|
+
|
|
519
|
+
self.SetAngleRange()
|
|
520
|
+
self.SetIntervals()
|
|
521
|
+
self.SetSpeedValue()
|
|
522
|
+
self.SetIntervalColours()
|
|
523
|
+
self.SetArcColour()
|
|
524
|
+
self.SetTicks()
|
|
525
|
+
self.SetTicksFont()
|
|
526
|
+
self.SetTicksColour()
|
|
527
|
+
self.SetSpeedBackground()
|
|
528
|
+
self.SetHandColour()
|
|
529
|
+
self.SetShadowColour()
|
|
530
|
+
self.SetFillerColour()
|
|
531
|
+
self.SetDirection()
|
|
532
|
+
self.SetNumberOfSecondaryTicks()
|
|
533
|
+
self.SetMiddleText()
|
|
534
|
+
self.SetMiddleTextFont()
|
|
535
|
+
self.SetMiddleTextColour()
|
|
536
|
+
self.SetFirstGradientColour()
|
|
537
|
+
self.SetSecondGradientColour()
|
|
538
|
+
self.SetHandStyle()
|
|
539
|
+
self.DrawExternalArc()
|
|
540
|
+
|
|
541
|
+
# If no initial size is set then use (1,1) instead of the (20,20) that
|
|
542
|
+
# wxWindow will default to. This is so we don't set the initial
|
|
543
|
+
# self.scale based on (20,20) but will instead wait until the initial
|
|
544
|
+
# size is set by the sizer. See Draw() implementation below.
|
|
545
|
+
if size == wx.DefaultSize:
|
|
546
|
+
size = wx.Size(1,1)
|
|
547
|
+
|
|
548
|
+
BufferedWindow.__init__(self, parent, id, pos, size,
|
|
549
|
+
style=wx.NO_FULL_REPAINT_ON_RESIZE,
|
|
550
|
+
bufferedstyle=bufferedstyle)
|
|
551
|
+
if self._mousestyle & SM_MOUSE_TRACK:
|
|
552
|
+
self.Bind(wx.EVT_MOUSE_EVENTS, self.OnMouseMotion)
|
|
553
|
+
|
|
554
|
+
|
|
555
|
+
def Draw(self, dc):
|
|
556
|
+
"""
|
|
557
|
+
Draws everything on the empty bitmap.
|
|
558
|
+
Here all the chosen styles are applied.
|
|
559
|
+
|
|
560
|
+
:param `dc`: an instance of :class:`wx.DC`.
|
|
561
|
+
"""
|
|
562
|
+
|
|
563
|
+
size = self.GetClientSize()
|
|
564
|
+
|
|
565
|
+
if size.x < 2 or size.y < 2:
|
|
566
|
+
return
|
|
567
|
+
|
|
568
|
+
new_dim = size.Get()
|
|
569
|
+
|
|
570
|
+
if not hasattr(self, "dim"):
|
|
571
|
+
self.dim = new_dim
|
|
572
|
+
|
|
573
|
+
self.scale = min([float(new_dim[0]) / self.dim[0],
|
|
574
|
+
float(new_dim[1]) / self.dim[1]])
|
|
575
|
+
|
|
576
|
+
# Create An Empty Bitmap
|
|
577
|
+
self.faceBitmap = wx.Bitmap(size.width, size.height)
|
|
578
|
+
|
|
579
|
+
speedbackground = self.GetSpeedBackground()
|
|
580
|
+
# Set Background Of The Control
|
|
581
|
+
dc.SetBackground(wx.Brush(speedbackground))
|
|
582
|
+
dc.Clear()
|
|
583
|
+
|
|
584
|
+
centerX = self.faceBitmap.GetWidth()/2
|
|
585
|
+
centerY = self.faceBitmap.GetHeight()/2
|
|
586
|
+
|
|
587
|
+
self.CenterX = centerX
|
|
588
|
+
self.CenterY = centerY
|
|
589
|
+
|
|
590
|
+
# Get The Radius Of The Sector. Set It A Bit Smaller To Correct Draw After
|
|
591
|
+
radius = min(centerX, centerY) - 2
|
|
592
|
+
|
|
593
|
+
self.Radius = radius
|
|
594
|
+
self.Radius = radius
|
|
595
|
+
|
|
596
|
+
# Get The Angle Of Existance Of The Sector
|
|
597
|
+
anglerange = self.GetAngleRange()
|
|
598
|
+
startangle = anglerange[1]
|
|
599
|
+
endangle = anglerange[0]
|
|
600
|
+
|
|
601
|
+
self.StartAngle = startangle
|
|
602
|
+
self.EndAngle = endangle
|
|
603
|
+
|
|
604
|
+
# Initialize The Colours And The Intervals - Just For Reference To The
|
|
605
|
+
# Children Functions
|
|
606
|
+
colours = None
|
|
607
|
+
intervals = None
|
|
608
|
+
|
|
609
|
+
if self._agwStyle & SM_DRAW_SECTORS or self._agwStyle & SM_DRAW_PARTIAL_SECTORS:
|
|
610
|
+
# Get The Intervals Colours
|
|
611
|
+
colours = self.GetIntervalColours()[:]
|
|
612
|
+
|
|
613
|
+
textangles = []
|
|
614
|
+
colourangles = []
|
|
615
|
+
xcoords = []
|
|
616
|
+
ycoords = []
|
|
617
|
+
|
|
618
|
+
# Get The Intervals (Partial Sectors)
|
|
619
|
+
intervals = self.GetIntervals()[:]
|
|
620
|
+
|
|
621
|
+
start = min(intervals)
|
|
622
|
+
end = max(intervals)
|
|
623
|
+
span = end - start
|
|
624
|
+
|
|
625
|
+
self.StartValue = start
|
|
626
|
+
self.EndValue = end
|
|
627
|
+
|
|
628
|
+
self.Span = span
|
|
629
|
+
|
|
630
|
+
# Get The Current Value For The SpeedMeter
|
|
631
|
+
currentvalue = self.GetSpeedValue()
|
|
632
|
+
|
|
633
|
+
# Get The Direction Of The SpeedMeter
|
|
634
|
+
direction = self.GetDirection()
|
|
635
|
+
if direction == "Reverse":
|
|
636
|
+
intervals.reverse()
|
|
637
|
+
|
|
638
|
+
if self._agwStyle & SM_DRAW_SECTORS or self._agwStyle & SM_DRAW_PARTIAL_SECTORS:
|
|
639
|
+
colours.reverse()
|
|
640
|
+
|
|
641
|
+
currentvalue = end - currentvalue
|
|
642
|
+
|
|
643
|
+
# This Because DrawArc Does Not Draw Last Point
|
|
644
|
+
offset = 0.1*self.scale/180.0
|
|
645
|
+
|
|
646
|
+
xstart, ystart = self.CircleCoords(radius+1, -endangle, centerX, centerY)
|
|
647
|
+
xend, yend = self.CircleCoords(radius+1, -startangle-offset, centerX, centerY)
|
|
648
|
+
|
|
649
|
+
# Calculate The Angle For The Current Value Of SpeedMeter
|
|
650
|
+
accelangle = (currentvalue - start)/float(span)*(startangle-endangle) - startangle
|
|
651
|
+
|
|
652
|
+
dc.SetPen(wx.TRANSPARENT_PEN)
|
|
653
|
+
|
|
654
|
+
if self._agwStyle & SM_DRAW_PARTIAL_FILLER:
|
|
655
|
+
|
|
656
|
+
# Get Some Data For The Partial Filler
|
|
657
|
+
fillercolour = self.GetFillerColour()
|
|
658
|
+
fillerendradius = radius - 10.0*self.scale
|
|
659
|
+
fillerstartradius = radius
|
|
660
|
+
|
|
661
|
+
if direction == "Advance":
|
|
662
|
+
fillerstart = accelangle
|
|
663
|
+
fillerend = -startangle
|
|
664
|
+
else:
|
|
665
|
+
fillerstart = -endangle
|
|
666
|
+
fillerend = accelangle
|
|
667
|
+
|
|
668
|
+
xs1, ys1 = self.CircleCoords(fillerendradius, fillerstart, centerX, centerY)
|
|
669
|
+
xe1, ye1 = self.CircleCoords(fillerendradius, fillerend, centerX, centerY)
|
|
670
|
+
xs2, ys2 = self.CircleCoords(fillerstartradius, fillerstart, centerX, centerY)
|
|
671
|
+
xe2, ye2 = self.CircleCoords(fillerstartradius, fillerend, centerX, centerY)
|
|
672
|
+
|
|
673
|
+
# Get The Sector In Which The Current Value Is
|
|
674
|
+
intersection = self.GetIntersection(currentvalue, intervals)
|
|
675
|
+
sectorradius = radius - 10*self.scale
|
|
676
|
+
|
|
677
|
+
else:
|
|
678
|
+
|
|
679
|
+
sectorradius = radius
|
|
680
|
+
|
|
681
|
+
if self._agwStyle & SM_DRAW_PARTIAL_FILLER:
|
|
682
|
+
# Draw The Filler (Both In "Advance" And "Reverse" Directions)
|
|
683
|
+
|
|
684
|
+
dc.SetBrush(wx.Brush(fillercolour))
|
|
685
|
+
dc.DrawArc(*map(int, [xs2, ys2, xe2, ye2, centerX, centerY]))
|
|
686
|
+
|
|
687
|
+
if self._agwStyle & SM_DRAW_SECTORS == 0:
|
|
688
|
+
dc.SetBrush(wx.Brush(speedbackground))
|
|
689
|
+
xclean1, yclean1 = self.CircleCoords(sectorradius, -endangle, centerX, centerY)
|
|
690
|
+
xclean2, yclean2 = self.CircleCoords(sectorradius, -startangle-offset, centerX, centerY)
|
|
691
|
+
dc.DrawArc(*map(int, [xclean1, yclean1, xclean2, yclean2, centerX, centerY]))
|
|
692
|
+
|
|
693
|
+
|
|
694
|
+
# This Is Needed To Fill The Partial Sector Correctly
|
|
695
|
+
xold, yold = self.CircleCoords(radius, startangle+endangle, centerX, centerY)
|
|
696
|
+
|
|
697
|
+
# Draw The Sectors
|
|
698
|
+
for ii, interval in enumerate(intervals):
|
|
699
|
+
|
|
700
|
+
if direction == "Advance":
|
|
701
|
+
current = interval - start
|
|
702
|
+
else:
|
|
703
|
+
current = end - interval
|
|
704
|
+
|
|
705
|
+
angle = (current/float(span))*(startangle-endangle) - startangle
|
|
706
|
+
angletext = -((pi/2.0) + angle)*180/pi
|
|
707
|
+
textangles.append(angletext)
|
|
708
|
+
colourangles.append(angle)
|
|
709
|
+
xtick, ytick = self.CircleCoords(radius, angle, centerX, centerY)
|
|
710
|
+
|
|
711
|
+
# Keep The Coordinates, We Will Need Them After To Position The Ticks
|
|
712
|
+
xcoords.append(xtick)
|
|
713
|
+
ycoords.append(ytick)
|
|
714
|
+
x = xtick
|
|
715
|
+
y = ytick
|
|
716
|
+
|
|
717
|
+
if self._agwStyle & SM_DRAW_SECTORS:
|
|
718
|
+
if self._agwStyle & SM_DRAW_PARTIAL_FILLER:
|
|
719
|
+
if direction == "Advance":
|
|
720
|
+
if current > currentvalue:
|
|
721
|
+
x, y = self.CircleCoords(radius, angle, centerX, centerY)
|
|
722
|
+
else:
|
|
723
|
+
x, y = self.CircleCoords(sectorradius, angle, centerX, centerY)
|
|
724
|
+
else:
|
|
725
|
+
if current < end - currentvalue:
|
|
726
|
+
x, y = self.CircleCoords(radius, angle, centerX, centerY)
|
|
727
|
+
else:
|
|
728
|
+
x, y = self.CircleCoords(sectorradius, angle, centerX, centerY)
|
|
729
|
+
else:
|
|
730
|
+
x, y = self.CircleCoords(radius, angle, centerX, centerY)
|
|
731
|
+
|
|
732
|
+
|
|
733
|
+
if ii > 0:
|
|
734
|
+
if self._agwStyle & SM_DRAW_PARTIAL_FILLER and ii == intersection:
|
|
735
|
+
# We Got The Interval In Which There Is The Current Value. If We Choose
|
|
736
|
+
# A "Reverse" Direction, First We Draw The Partial Sector, Next The Filler
|
|
737
|
+
|
|
738
|
+
dc.SetBrush(wx.Brush(speedbackground))
|
|
739
|
+
|
|
740
|
+
if direction == "Reverse":
|
|
741
|
+
if self._agwStyle & SM_DRAW_SECTORS:
|
|
742
|
+
dc.SetBrush(wx.Brush(colours[ii-1]))
|
|
743
|
+
|
|
744
|
+
dc.DrawArc(*map(int, [xe2, ye2, xold, yold, centerX, centerY]))
|
|
745
|
+
|
|
746
|
+
if self._agwStyle & SM_DRAW_SECTORS:
|
|
747
|
+
dc.SetBrush(wx.Brush(colours[ii-1]))
|
|
748
|
+
else:
|
|
749
|
+
dc.SetBrush(wx.Brush(speedbackground))
|
|
750
|
+
|
|
751
|
+
|
|
752
|
+
dc.DrawArc(*map(int, [xs1, ys1, xe1, ye1, centerX, centerY]))
|
|
753
|
+
|
|
754
|
+
if self._agwStyle & SM_DRAW_SECTORS:
|
|
755
|
+
dc.SetBrush(wx.Brush(colours[ii-1]))
|
|
756
|
+
# Here We Draw The Rest Of The Sector In Which The Current Value Is
|
|
757
|
+
if direction == "Advance":
|
|
758
|
+
dc.DrawArc(*map(int, [xs1, ys1, x, y, centerX, centerY]))
|
|
759
|
+
x = xs1
|
|
760
|
+
y = ys1
|
|
761
|
+
else:
|
|
762
|
+
dc.DrawArc(*map(int, [xe2, ye2, x, y, centerX, centerY]))
|
|
763
|
+
|
|
764
|
+
elif self._agwStyle & SM_DRAW_SECTORS:
|
|
765
|
+
dc.SetBrush(wx.Brush(colours[ii-1]))
|
|
766
|
+
|
|
767
|
+
# Here We Still Use The SM_DRAW_PARTIAL_FILLER Style, But We Are Not
|
|
768
|
+
# In The Sector Where The Current Value Resides
|
|
769
|
+
if self._agwStyle & SM_DRAW_PARTIAL_FILLER and ii != intersection:
|
|
770
|
+
if direction == "Advance":
|
|
771
|
+
dc.DrawArc(*map(int, [x, y, xold, yold, centerX, centerY]))
|
|
772
|
+
else:
|
|
773
|
+
if ii < intersection:
|
|
774
|
+
dc.DrawArc(*map(int, [x, y, xold, yold, centerX, centerY]))
|
|
775
|
+
|
|
776
|
+
# This Is The Case Where No SM_DRAW_PARTIAL_FILLER Has Been Chosen
|
|
777
|
+
else:
|
|
778
|
+
dc.DrawArc(*map(int, [x, y, xold, yold, centerX, centerY]))
|
|
779
|
+
|
|
780
|
+
else:
|
|
781
|
+
if self._agwStyle & SM_DRAW_PARTIAL_FILLER and self._agwStyle & SM_DRAW_SECTORS:
|
|
782
|
+
dc.SetBrush(wx.Brush(fillercolour))
|
|
783
|
+
dc.DrawArc(*map(int, [xs2, ys2, xe2, ye2, centerX, centerY]))
|
|
784
|
+
x, y = self.CircleCoords(sectorradius, angle, centerX, centerY)
|
|
785
|
+
dc.SetBrush(wx.Brush(colours[ii]))
|
|
786
|
+
dc.DrawArc(*map(int, [xs1, ys1, xe1, ye1, centerX, centerY]))
|
|
787
|
+
x = xs2
|
|
788
|
+
y = ys2
|
|
789
|
+
|
|
790
|
+
xold = x
|
|
791
|
+
yold = y
|
|
792
|
+
|
|
793
|
+
if self._agwStyle & SM_DRAW_PARTIAL_SECTORS:
|
|
794
|
+
|
|
795
|
+
sectorendradius = radius - 10.0*self.scale
|
|
796
|
+
sectorstartradius = radius
|
|
797
|
+
|
|
798
|
+
xps, yps = self.CircleCoords(sectorstartradius, angle, centerX, centerY)
|
|
799
|
+
|
|
800
|
+
if ii > 0:
|
|
801
|
+
dc.SetBrush(wx.Brush(colours[ii-1]))
|
|
802
|
+
dc.DrawArc(*map(int, [xps, yps, xpsold, ypsold, centerX, centerY]))
|
|
803
|
+
|
|
804
|
+
xpsold = xps
|
|
805
|
+
ypsold = yps
|
|
806
|
+
|
|
807
|
+
|
|
808
|
+
if self._agwStyle & SM_DRAW_PARTIAL_SECTORS:
|
|
809
|
+
|
|
810
|
+
xps1, yps1 = self.CircleCoords(sectorendradius, -endangle+2*offset, centerX, centerY)
|
|
811
|
+
xps2, yps2 = self.CircleCoords(sectorendradius, -startangle-2*offset, centerX, centerY)
|
|
812
|
+
|
|
813
|
+
dc.SetBrush(wx.Brush(speedbackground))
|
|
814
|
+
dc.DrawArc(*map(int, [xps1, yps1, xps2, yps2, centerX, centerY]))
|
|
815
|
+
|
|
816
|
+
|
|
817
|
+
if self._agwStyle & SM_DRAW_GRADIENT:
|
|
818
|
+
|
|
819
|
+
dc.SetPen(wx.TRANSPARENT_PEN)
|
|
820
|
+
|
|
821
|
+
xcurrent, ycurrent = self.CircleCoords(radius, accelangle, centerX, centerY)
|
|
822
|
+
|
|
823
|
+
# calculate gradient coefficients
|
|
824
|
+
col2 = self.GetSecondGradientColour()
|
|
825
|
+
col1 = self.GetFirstGradientColour()
|
|
826
|
+
|
|
827
|
+
r1, g1, b1 = int(col1.Red()), int(col1.Green()), int(col1.Blue())
|
|
828
|
+
r2, g2, b2 = int(col2.Red()), int(col2.Green()), int(col2.Blue())
|
|
829
|
+
|
|
830
|
+
flrect = float(radius+self.scale)
|
|
831
|
+
|
|
832
|
+
numsteps = 200
|
|
833
|
+
|
|
834
|
+
rstep = float((r2 - r1)) / numsteps
|
|
835
|
+
gstep = float((g2 - g1)) / numsteps
|
|
836
|
+
bstep = float((b2 - b1)) / numsteps
|
|
837
|
+
|
|
838
|
+
rf, gf, bf = 0, 0, 0
|
|
839
|
+
|
|
840
|
+
radiusteps = flrect/numsteps
|
|
841
|
+
interface = 0
|
|
842
|
+
|
|
843
|
+
for ind in range(numsteps+1):
|
|
844
|
+
currCol = tuple(map(int, (r1 + rf, g1 + gf, b1 + bf)))
|
|
845
|
+
dc.SetBrush(wx.Brush(currCol))
|
|
846
|
+
|
|
847
|
+
gradradius = flrect - radiusteps*ind
|
|
848
|
+
xst1, yst1 = self.CircleCoords(gradradius, -endangle, centerX, centerY)
|
|
849
|
+
xen1, yen1 = self.CircleCoords(gradradius, -startangle-offset, centerX, centerY)
|
|
850
|
+
|
|
851
|
+
if self._agwStyle & SM_DRAW_PARTIAL_FILLER:
|
|
852
|
+
if gradradius >= fillerendradius:
|
|
853
|
+
if direction == "Advance":
|
|
854
|
+
dc.DrawArc(*map(int, [xstart, ystart, xcurrent, ycurrent, centerX, centerY]))
|
|
855
|
+
else:
|
|
856
|
+
dc.DrawArc(*map(int, [xcurrent, ycurrent, xend, yend, centerX, centerY]))
|
|
857
|
+
else:
|
|
858
|
+
if interface == 0:
|
|
859
|
+
interface = 1
|
|
860
|
+
myradius = fillerendradius + 1
|
|
861
|
+
xint1, yint1 = self.CircleCoords(myradius, -endangle, centerX, centerY)
|
|
862
|
+
xint2, yint2 = self.CircleCoords(myradius, -startangle-offset, centerX, centerY)
|
|
863
|
+
dc.DrawArc(*map(int, [xint1, yint1, xint2, yint2, centerX, centerY]))
|
|
864
|
+
|
|
865
|
+
dc.DrawArc(*map(int, [xst1, yst1, xen1, yen1, centerX, centerY]))
|
|
866
|
+
else:
|
|
867
|
+
if self._agwStyle & SM_DRAW_PARTIAL_SECTORS:
|
|
868
|
+
if gradradius <= sectorendradius:
|
|
869
|
+
if interface == 0:
|
|
870
|
+
interface = 1
|
|
871
|
+
myradius = sectorendradius + 1
|
|
872
|
+
xint1, yint1 = self.CircleCoords(myradius, -endangle, centerX, centerY)
|
|
873
|
+
xint2, yint2 = self.CircleCoords(myradius, -startangle-offset, centerX, centerY)
|
|
874
|
+
dc.DrawArc(*map(int, [xint1, yint1, xint2, yint2, centerX, centerY]))
|
|
875
|
+
else:
|
|
876
|
+
dc.DrawArc(*map(int, [xst1, yst1, xen1, yen1, centerX, centerY]))
|
|
877
|
+
else:
|
|
878
|
+
dc.DrawArc(*map(int, [xst1, yst1, xen1, yen1, centerX, centerY]))
|
|
879
|
+
|
|
880
|
+
rf = rf + rstep
|
|
881
|
+
gf = gf + gstep
|
|
882
|
+
bf = bf + bstep
|
|
883
|
+
|
|
884
|
+
textheight = 0
|
|
885
|
+
|
|
886
|
+
# Get The Ticks And The Ticks Colour
|
|
887
|
+
ticks = self.GetTicks()[:]
|
|
888
|
+
tickscolour = self.GetTicksColour()
|
|
889
|
+
|
|
890
|
+
if direction == "Reverse":
|
|
891
|
+
ticks.reverse()
|
|
892
|
+
|
|
893
|
+
if self._agwStyle & SM_DRAW_SECONDARY_TICKS:
|
|
894
|
+
ticknum = self.GetNumberOfSecondaryTicks()
|
|
895
|
+
oldinterval = intervals[0]
|
|
896
|
+
|
|
897
|
+
dc.SetPen(wx.Pen(tickscolour, 1))
|
|
898
|
+
dc.SetBrush(wx.Brush(tickscolour))
|
|
899
|
+
dc.SetTextForeground(tickscolour)
|
|
900
|
+
|
|
901
|
+
# Get The Font For The Ticks
|
|
902
|
+
tfont, fontsize = self.GetTicksFont()
|
|
903
|
+
tfont = tfont[0]
|
|
904
|
+
myfamily = tfont.GetFamily()
|
|
905
|
+
|
|
906
|
+
fsize = self.scale*fontsize
|
|
907
|
+
tfont.SetPointSize(int(fsize))
|
|
908
|
+
tfont.SetFamily(myfamily)
|
|
909
|
+
dc.SetFont(tfont)
|
|
910
|
+
|
|
911
|
+
if self._agwStyle & SM_DRAW_FANCY_TICKS:
|
|
912
|
+
facename = tfont.GetFaceName()
|
|
913
|
+
ffamily = familyname[fontfamily.index(tfont.GetFamily())]
|
|
914
|
+
fweight = weightsname[weights.index(tfont.GetWeight())]
|
|
915
|
+
fstyle = stylesname[styles.index(tfont.GetStyle())]
|
|
916
|
+
fcolour = wx.TheColourDatabase.FindName(tickscolour)
|
|
917
|
+
|
|
918
|
+
textheight = 0
|
|
919
|
+
|
|
920
|
+
# Draw The Ticks And The Markers (Text Ticks)
|
|
921
|
+
for ii, angles in enumerate(textangles):
|
|
922
|
+
|
|
923
|
+
strings = ticks[ii]
|
|
924
|
+
if self._agwStyle & SM_DRAW_FANCY_TICKS == 0:
|
|
925
|
+
width, height, dummy, dummy = dc.GetFullTextExtent(strings, tfont)
|
|
926
|
+
textheight = height
|
|
927
|
+
else:
|
|
928
|
+
width, height, dummy = fancytext.GetFullExtent(strings, dc)
|
|
929
|
+
textheight = height
|
|
930
|
+
|
|
931
|
+
lX = dc.GetCharWidth()/2.0
|
|
932
|
+
lY = dc.GetCharHeight()/2.0
|
|
933
|
+
|
|
934
|
+
if self._agwStyle & SM_ROTATE_TEXT:
|
|
935
|
+
angis = colourangles[ii] - float(width)/(2.0*radius)
|
|
936
|
+
x, y = self.CircleCoords(radius-10.0*self.scale, angis, centerX, centerY)
|
|
937
|
+
dc.DrawRotatedText(strings, *map(int, [x, y]), angles)
|
|
938
|
+
else:
|
|
939
|
+
angis = colourangles[ii]
|
|
940
|
+
if self._agwStyle & SM_DRAW_FANCY_TICKS == 0:
|
|
941
|
+
x, y = self.CircleCoords(radius-10*self.scale, angis, centerX, centerY)
|
|
942
|
+
lX = lX*len(strings)
|
|
943
|
+
x = x - lX - width*cos(angis)/2.0
|
|
944
|
+
y = y - lY - height*sin(angis)/2.0
|
|
945
|
+
|
|
946
|
+
if self._agwStyle & SM_DRAW_FANCY_TICKS:
|
|
947
|
+
fancystr = '<font family="' + ffamily + '" size="' + str(int(fsize)) + '" weight="' + fweight + '"'
|
|
948
|
+
fancystr = fancystr + ' color="' + fcolour + '"' + ' style="' + fstyle + '"> ' + strings + ' </font>'
|
|
949
|
+
|
|
950
|
+
width, height, dummy = fancytext.GetFullExtent(fancystr, dc)
|
|
951
|
+
x, y = self.CircleCoords(radius-10*self.scale, angis, centerX, centerY)
|
|
952
|
+
x = x - width/2.0 - width*cos(angis)/2.0
|
|
953
|
+
y = y - height/2.0 - height*sin(angis)/2.0
|
|
954
|
+
fancytext.RenderToDC(fancystr, dc, x, y)
|
|
955
|
+
else:
|
|
956
|
+
dc.DrawText(strings, *map(int, [x, y]))
|
|
957
|
+
|
|
958
|
+
# This Is The Small Rectangle --> Tick Mark
|
|
959
|
+
rectangle = colourangles[ii] + pi/2.0
|
|
960
|
+
|
|
961
|
+
sinrect = sin(rectangle)
|
|
962
|
+
cosrect = cos(rectangle)
|
|
963
|
+
x1 = xcoords[ii] - self.scale*cosrect
|
|
964
|
+
y1 = ycoords[ii] - self.scale*sinrect
|
|
965
|
+
x2 = x1 + 3*self.scale*cosrect
|
|
966
|
+
y2 = y1 + 3*self.scale*sinrect
|
|
967
|
+
x3 = x1 - 10*self.scale*sinrect
|
|
968
|
+
y3 = y1 + 10*self.scale*cosrect
|
|
969
|
+
x4 = x3 + 3*self.scale*cosrect
|
|
970
|
+
y4 = y3 + 3*self.scale*sinrect
|
|
971
|
+
|
|
972
|
+
points = [(x1, y1), (x2, y2), (x4, y4), (x3, y3)]
|
|
973
|
+
|
|
974
|
+
dc.DrawPolygon([tuple(map(int, i)) for i in points])
|
|
975
|
+
|
|
976
|
+
if self._agwStyle & SM_DRAW_SECONDARY_TICKS:
|
|
977
|
+
if ii > 0:
|
|
978
|
+
newinterval = intervals[ii]
|
|
979
|
+
oldinterval = intervals[ii-1]
|
|
980
|
+
|
|
981
|
+
spacing = (newinterval - oldinterval)/float(ticknum+1)
|
|
982
|
+
|
|
983
|
+
for tcount in range(ticknum):
|
|
984
|
+
if direction == "Advance":
|
|
985
|
+
oldinterval = (oldinterval + spacing)
|
|
986
|
+
stint = oldinterval - start
|
|
987
|
+
else:
|
|
988
|
+
#oldinterval = start + (oldinterval + spacing)
|
|
989
|
+
oldinterval = (oldinterval + spacing)
|
|
990
|
+
stint = end - oldinterval
|
|
991
|
+
|
|
992
|
+
angle = (stint/float(span))*(startangle-endangle) - startangle
|
|
993
|
+
rectangle = angle + pi/2.0
|
|
994
|
+
sinrect = sin(rectangle)
|
|
995
|
+
cosrect = cos(rectangle)
|
|
996
|
+
xt, yt = self.CircleCoords(radius, angle, centerX, centerY)
|
|
997
|
+
x1 = xt - self.scale*cosrect
|
|
998
|
+
y1 = yt - self.scale*sinrect
|
|
999
|
+
x2 = x1 + self.scale*cosrect
|
|
1000
|
+
y2 = y1 + self.scale*sinrect
|
|
1001
|
+
x3 = x1 - 6*self.scale*sinrect
|
|
1002
|
+
y3 = y1 + 6*self.scale*cosrect
|
|
1003
|
+
x4 = x3 + self.scale*cosrect
|
|
1004
|
+
y4 = y3 + self.scale*sinrect
|
|
1005
|
+
|
|
1006
|
+
points = [(x1, y1), (x2, y2), (x4, y4), (x3, y3)]
|
|
1007
|
+
|
|
1008
|
+
dc.DrawPolygon([tuple(map(int, i)) for i in points])
|
|
1009
|
+
|
|
1010
|
+
oldinterval = newinterval
|
|
1011
|
+
|
|
1012
|
+
tfont.SetPointSize(fontsize)
|
|
1013
|
+
tfont.SetFamily(myfamily)
|
|
1014
|
+
|
|
1015
|
+
self.SetTicksFont(tfont)
|
|
1016
|
+
|
|
1017
|
+
# Draw The External Arc
|
|
1018
|
+
dc.SetBrush(wx.TRANSPARENT_BRUSH)
|
|
1019
|
+
|
|
1020
|
+
if self._drawarc:
|
|
1021
|
+
dc.SetPen(wx.Pen(self.GetArcColour(), 2))
|
|
1022
|
+
# If It's Not A Complete Circle, Draw The Connecting Lines And The Arc
|
|
1023
|
+
if abs(abs(startangle - endangle) - 2*pi) > 1.0/180.0:
|
|
1024
|
+
dc.DrawArc(*map(int, [xstart, ystart, xend, yend, centerX, centerY]))
|
|
1025
|
+
dc.DrawLine(*map(int, [xstart, ystart, centerX, centerY]))
|
|
1026
|
+
dc.DrawLine(*map(int, [xend, yend, centerX, centerY]))
|
|
1027
|
+
else:
|
|
1028
|
+
# Draw A Circle, Is A 2*pi Extension Arc = Complete Circle
|
|
1029
|
+
dc.DrawCircle(*map(int, [centerX, centerY, radius]))
|
|
1030
|
+
|
|
1031
|
+
|
|
1032
|
+
# Here We Draw The Text In The Middle, Near The Start Of The Arrow (If Present)
|
|
1033
|
+
# This Is Like The "Km/h" Or "mph" Text In The Cars
|
|
1034
|
+
if self._agwStyle & SM_DRAW_MIDDLE_TEXT:
|
|
1035
|
+
|
|
1036
|
+
middlecolour = self.GetMiddleTextColour()
|
|
1037
|
+
middletext = self.GetMiddleText()
|
|
1038
|
+
middleangle = (startangle + endangle)/2.0
|
|
1039
|
+
|
|
1040
|
+
middlefont, middlesize = self.GetMiddleTextFont()
|
|
1041
|
+
middlesize = self.scale*middlesize
|
|
1042
|
+
middlefont.SetPointSize(int(middlesize))
|
|
1043
|
+
dc.SetFont(middlefont)
|
|
1044
|
+
|
|
1045
|
+
mw, mh, dummy, dummy = dc.GetFullTextExtent(middletext, middlefont)
|
|
1046
|
+
|
|
1047
|
+
newx = centerX + 1.5*mw*cos(middleangle) - mw/2.0
|
|
1048
|
+
newy = centerY - 1.5*mh*sin(middleangle) - mh/2.0
|
|
1049
|
+
dc.SetTextForeground(middlecolour)
|
|
1050
|
+
dc.DrawText(middletext, *map(int, [newx, newy]))
|
|
1051
|
+
|
|
1052
|
+
# Here We Draw The Icon In The Middle, Near The Start Of The Arrow (If Present)
|
|
1053
|
+
# This Is Like The "Fuel" Icon In The Cars
|
|
1054
|
+
if self._agwStyle & SM_DRAW_MIDDLE_ICON and self.GetMiddleIcon():
|
|
1055
|
+
|
|
1056
|
+
middleicon = self.GetMiddleIcon()
|
|
1057
|
+
middlewidth, middleheight = self.GetMiddleIconDimens()
|
|
1058
|
+
middleicon.SetWidth(int(middlewidth*self.scale))
|
|
1059
|
+
middleicon.SetHeight(int(middleheight*self.scale))
|
|
1060
|
+
middleangle = (startangle + endangle)/2.0
|
|
1061
|
+
|
|
1062
|
+
mw = middleicon.GetWidth()
|
|
1063
|
+
mh = middleicon.GetHeight()
|
|
1064
|
+
|
|
1065
|
+
newx = centerX + 1.5*mw*cos(middleangle) - mw/2.0
|
|
1066
|
+
newy = centerY - 1.5*mh*sin(middleangle) - mh/2.0
|
|
1067
|
+
|
|
1068
|
+
dc.DrawIcon(middleicon, *map(int, [newx, newy]))
|
|
1069
|
+
|
|
1070
|
+
# Restore Icon Dimension, If Not Something Strange Happens
|
|
1071
|
+
middleicon.SetWidth(middlewidth)
|
|
1072
|
+
middleicon.SetHeight(middleheight)
|
|
1073
|
+
|
|
1074
|
+
|
|
1075
|
+
# Requested To Draw The Hand
|
|
1076
|
+
if self._agwStyle & SM_DRAW_HAND:
|
|
1077
|
+
|
|
1078
|
+
handstyle = self.GetHandStyle()
|
|
1079
|
+
handcolour = self.GetHandColour()
|
|
1080
|
+
|
|
1081
|
+
# Calculate The Data For The Hand
|
|
1082
|
+
if textheight == 0:
|
|
1083
|
+
maxradius = radius-10*self.scale
|
|
1084
|
+
else:
|
|
1085
|
+
maxradius = radius-5*self.scale-textheight
|
|
1086
|
+
|
|
1087
|
+
xarr, yarr = self.CircleCoords(maxradius, accelangle, centerX, centerY)
|
|
1088
|
+
|
|
1089
|
+
if handstyle == "Arrow":
|
|
1090
|
+
x1, y1 = self.CircleCoords(maxradius, accelangle - 4.0/180, centerX, centerY)
|
|
1091
|
+
x2, y2 = self.CircleCoords(maxradius, accelangle + 4.0/180, centerX, centerY)
|
|
1092
|
+
x3, y3 = self.CircleCoords(maxradius+3*(abs(xarr-x1)), accelangle, centerX, centerY)
|
|
1093
|
+
|
|
1094
|
+
newx = centerX + 4*cos(accelangle)*self.scale
|
|
1095
|
+
newy = centerY + 4*sin(accelangle)*self.scale
|
|
1096
|
+
|
|
1097
|
+
else:
|
|
1098
|
+
|
|
1099
|
+
x1 = centerX + 4*self.scale*sin(accelangle)
|
|
1100
|
+
y1 = centerY - 4*self.scale*cos(accelangle)
|
|
1101
|
+
x2 = xarr
|
|
1102
|
+
y2 = yarr
|
|
1103
|
+
x3 = centerX - 4*self.scale*sin(accelangle)
|
|
1104
|
+
y3 = centerY + 4*self.scale*cos(accelangle)
|
|
1105
|
+
|
|
1106
|
+
x4, y4 = self.CircleCoords(5*self.scale*sqrt(3), accelangle+pi, centerX, centerY)
|
|
1107
|
+
|
|
1108
|
+
if self._agwStyle & SM_DRAW_SHADOW:
|
|
1109
|
+
|
|
1110
|
+
if handstyle == "Arrow":
|
|
1111
|
+
# Draw The Shadow
|
|
1112
|
+
shadowcolour = self.GetShadowColour()
|
|
1113
|
+
dc.SetPen(wx.Pen(shadowcolour, int(5*log(self.scale+1))))
|
|
1114
|
+
dc.SetBrush(wx.Brush(shadowcolour))
|
|
1115
|
+
shadowdistance = 2.0*self.scale
|
|
1116
|
+
dc.DrawLine(*map(int, [newx + shadowdistance, newy + shadowdistance,
|
|
1117
|
+
xarr + shadowdistance, yarr + shadowdistance]))
|
|
1118
|
+
|
|
1119
|
+
points = [(x1+shadowdistance, y1+shadowdistance),
|
|
1120
|
+
(x2+shadowdistance, y2+shadowdistance),
|
|
1121
|
+
(x3+shadowdistance, y3+shadowdistance)]
|
|
1122
|
+
|
|
1123
|
+
dc.DrawPolygon([tuple(map(int, i)) for i in points])
|
|
1124
|
+
else:
|
|
1125
|
+
# Draw The Shadow
|
|
1126
|
+
shadowcolour = self.GetShadowColour()
|
|
1127
|
+
dc.SetBrush(wx.Brush(shadowcolour))
|
|
1128
|
+
dc.SetPen(wx.Pen(shadowcolour, 1))
|
|
1129
|
+
shadowdistance = 1.5*self.scale
|
|
1130
|
+
|
|
1131
|
+
points = [(x1+shadowdistance, y1+shadowdistance),
|
|
1132
|
+
(x2+shadowdistance, y2+shadowdistance),
|
|
1133
|
+
(x3+shadowdistance, y3+shadowdistance),
|
|
1134
|
+
(x4+shadowdistance, y4+shadowdistance)]
|
|
1135
|
+
|
|
1136
|
+
dc.DrawPolygon([tuple(map(int, i)) for i in points])
|
|
1137
|
+
|
|
1138
|
+
if handstyle == "Arrow":
|
|
1139
|
+
|
|
1140
|
+
dc.SetPen(wx.Pen(handcolour, 1))
|
|
1141
|
+
|
|
1142
|
+
# Draw The Small Circle In The Center --> The Hand "Holder"
|
|
1143
|
+
dc.SetBrush(wx.Brush(speedbackground))
|
|
1144
|
+
dc.DrawCircle(*map(int, [centerX, centerY, 4*self.scale]))
|
|
1145
|
+
|
|
1146
|
+
dc.SetPen(wx.Pen(handcolour, int(5*log(self.scale+1))))
|
|
1147
|
+
# Draw The "Hand", An Arrow
|
|
1148
|
+
dc.DrawLine(*map(int, [newx, newy, xarr, yarr]))
|
|
1149
|
+
|
|
1150
|
+
# Draw The Arrow Pointer
|
|
1151
|
+
dc.SetBrush(wx.Brush(handcolour))
|
|
1152
|
+
|
|
1153
|
+
points =[(x1, y1), (x2, y2), (x3, y3)]
|
|
1154
|
+
|
|
1155
|
+
dc.DrawPolygon([tuple(map(int, i)) for i in points])
|
|
1156
|
+
|
|
1157
|
+
else:
|
|
1158
|
+
|
|
1159
|
+
# Draw The Hand Pointer
|
|
1160
|
+
dc.SetPen(wx.Pen(handcolour, 1))
|
|
1161
|
+
dc.SetBrush(wx.Brush(handcolour))
|
|
1162
|
+
|
|
1163
|
+
points = [(x1, y1), (x2, y2), (x3, y3), (x4, y4)]
|
|
1164
|
+
|
|
1165
|
+
dc.DrawPolygon([tuple(map(int, i)) for i in points])
|
|
1166
|
+
|
|
1167
|
+
# Draw The Small Circle In The Center --> The Hand "Holder"
|
|
1168
|
+
dc.SetBrush(wx.Brush(speedbackground))
|
|
1169
|
+
dc.DrawCircle(*map(int, [centerX, centerY, 4*self.scale]))
|
|
1170
|
+
|
|
1171
|
+
|
|
1172
|
+
def SetIntervals(self, intervals=None):
|
|
1173
|
+
"""
|
|
1174
|
+
Sets the intervals for :class:`SpeedMeter` (main ticks numeric values).
|
|
1175
|
+
|
|
1176
|
+
:param `intervals`: a Python list of main ticks to be displayed. If defaulted
|
|
1177
|
+
to ``None``, the list `[0, 50, 100]` is used.
|
|
1178
|
+
"""
|
|
1179
|
+
|
|
1180
|
+
if intervals is None:
|
|
1181
|
+
intervals = [0, 50, 100]
|
|
1182
|
+
|
|
1183
|
+
self._intervals = intervals
|
|
1184
|
+
|
|
1185
|
+
|
|
1186
|
+
def GetIntervals(self):
|
|
1187
|
+
""" Returns the intervals for :class:`SpeedMeter`, a Python list of main ticks displayed. """
|
|
1188
|
+
|
|
1189
|
+
return self._intervals
|
|
1190
|
+
|
|
1191
|
+
|
|
1192
|
+
def SetSpeedValue(self, value=None):
|
|
1193
|
+
"""
|
|
1194
|
+
Sets the current value for :class:`SpeedMeter`.
|
|
1195
|
+
|
|
1196
|
+
:param `value`: a floating point number representing the current value. If defaulted
|
|
1197
|
+
to ``None``, the :class:`SpeedMeter` value will be the middle point of the control range.
|
|
1198
|
+
"""
|
|
1199
|
+
|
|
1200
|
+
if value is None:
|
|
1201
|
+
value = (max(self._intervals) - min(self._intervals))/2.0
|
|
1202
|
+
else:
|
|
1203
|
+
if value < min(self._intervals):
|
|
1204
|
+
raise Exception("\nERROR: Value Is Smaller Than Minimum Element In Points List")
|
|
1205
|
+
return
|
|
1206
|
+
elif value > max(self._intervals):
|
|
1207
|
+
raise Exception("\nERROR: Value Is Greater Than Maximum Element In Points List")
|
|
1208
|
+
return
|
|
1209
|
+
|
|
1210
|
+
self._speedvalue = value
|
|
1211
|
+
try:
|
|
1212
|
+
self.UpdateDrawing()
|
|
1213
|
+
except:
|
|
1214
|
+
pass
|
|
1215
|
+
|
|
1216
|
+
|
|
1217
|
+
def GetSpeedValue(self):
|
|
1218
|
+
""" Returns the current value for :class:`SpeedMeter`. """
|
|
1219
|
+
|
|
1220
|
+
return self._speedvalue
|
|
1221
|
+
|
|
1222
|
+
|
|
1223
|
+
def SetAngleRange(self, start=0, end=pi):
|
|
1224
|
+
"""
|
|
1225
|
+
Sets the range of existence for :class:`SpeedMeter`.
|
|
1226
|
+
|
|
1227
|
+
:param `start`: the starting angle, in radians;
|
|
1228
|
+
:param `end`: the ending angle, in radians.
|
|
1229
|
+
"""
|
|
1230
|
+
|
|
1231
|
+
self._anglerange = [start, end]
|
|
1232
|
+
|
|
1233
|
+
|
|
1234
|
+
def GetAngleRange(self):
|
|
1235
|
+
"""
|
|
1236
|
+
Returns the range of existence for :class:`SpeedMeter`.
|
|
1237
|
+
The returned values are in radians.
|
|
1238
|
+
"""
|
|
1239
|
+
|
|
1240
|
+
return self._anglerange
|
|
1241
|
+
|
|
1242
|
+
|
|
1243
|
+
def SetIntervalColours(self, colours=None):
|
|
1244
|
+
"""
|
|
1245
|
+
Sets the colours for the intervals.
|
|
1246
|
+
|
|
1247
|
+
:param `colours`: a Python list of colours. The length of this list should be
|
|
1248
|
+
the same as the number of circle sectors in :class:`SpeedMeter`. If defaulted to ``None``,
|
|
1249
|
+
all the intervals will have a white colour.
|
|
1250
|
+
|
|
1251
|
+
:note: Every interval (circle sector) should have a colour.
|
|
1252
|
+
"""
|
|
1253
|
+
|
|
1254
|
+
if colours is None:
|
|
1255
|
+
if not hasattr(self, "_anglerange"):
|
|
1256
|
+
errstr = "\nERROR: Impossible To Set Interval Colours,"
|
|
1257
|
+
errstr = errstr + " Please Define The Intervals Ranges Before."
|
|
1258
|
+
raise Exception(errstr)
|
|
1259
|
+
return
|
|
1260
|
+
|
|
1261
|
+
colours = [wx.WHITE]*len(self._intervals)
|
|
1262
|
+
else:
|
|
1263
|
+
if len(colours) != len(self._intervals) - 1:
|
|
1264
|
+
errstr = "\nERROR: Length Of Colour List Does Not Match Length"
|
|
1265
|
+
errstr = errstr + " Of Intervals Ranges List."
|
|
1266
|
+
raise Exception(errstr)
|
|
1267
|
+
return
|
|
1268
|
+
|
|
1269
|
+
self._intervalcolours = colours
|
|
1270
|
+
|
|
1271
|
+
|
|
1272
|
+
def GetIntervalColours(self):
|
|
1273
|
+
""" Returns the colours for the intervals."""
|
|
1274
|
+
|
|
1275
|
+
if hasattr(self, "_intervalcolours"):
|
|
1276
|
+
return self._intervalcolours
|
|
1277
|
+
else:
|
|
1278
|
+
raise Exception("\nERROR: No Interval Colours Have Been Defined")
|
|
1279
|
+
|
|
1280
|
+
|
|
1281
|
+
def SetTicks(self, ticks=None):
|
|
1282
|
+
"""
|
|
1283
|
+
Sets the ticks for :class:`SpeedMeter` intervals (main ticks string values).
|
|
1284
|
+
|
|
1285
|
+
:param `ticks`: a Python list of strings, representing the ticks values.
|
|
1286
|
+
If defaulted to ``None``, the ticks will be taken from the interval values.
|
|
1287
|
+
"""
|
|
1288
|
+
|
|
1289
|
+
if ticks is None:
|
|
1290
|
+
if not hasattr(self, "_anglerange"):
|
|
1291
|
+
errstr = "\nERROR: Impossible To Set Interval Ticks,"
|
|
1292
|
+
errstr = errstr + " Please Define The Intervals Ranges Before."
|
|
1293
|
+
raise Exception(errstr)
|
|
1294
|
+
return
|
|
1295
|
+
|
|
1296
|
+
ticks = []
|
|
1297
|
+
|
|
1298
|
+
for values in self._intervals:
|
|
1299
|
+
ticks.append(str(values))
|
|
1300
|
+
|
|
1301
|
+
else:
|
|
1302
|
+
if len(ticks) != len(self._intervals):
|
|
1303
|
+
errstr = "\nERROR: Length Of Ticks List Does Not Match Length"
|
|
1304
|
+
errstr = errstr + " Of Intervals Ranges List."
|
|
1305
|
+
raise Exception(errstr)
|
|
1306
|
+
return
|
|
1307
|
+
|
|
1308
|
+
self._intervalticks = ticks
|
|
1309
|
+
|
|
1310
|
+
|
|
1311
|
+
def GetTicks(self):
|
|
1312
|
+
""" Returns the ticks for :class:`SpeedMeter` intervals (main ticks string values)."""
|
|
1313
|
+
|
|
1314
|
+
if hasattr(self, "_intervalticks"):
|
|
1315
|
+
return self._intervalticks
|
|
1316
|
+
else:
|
|
1317
|
+
raise Exception("\nERROR: No Interval Ticks Have Been Defined")
|
|
1318
|
+
|
|
1319
|
+
|
|
1320
|
+
def SetTicksFont(self, font=None):
|
|
1321
|
+
"""
|
|
1322
|
+
Sets the ticks font.
|
|
1323
|
+
|
|
1324
|
+
:param `font`: a valid :class:`wx.Font` object. If defaulted to ``None``, some standard
|
|
1325
|
+
font will be chosen automatically.
|
|
1326
|
+
"""
|
|
1327
|
+
|
|
1328
|
+
if font is None:
|
|
1329
|
+
self._originalfont = [wx.Font(10, wx.FONTFAMILY_SWISS, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_BOLD, False)]
|
|
1330
|
+
self._originalsize = 10
|
|
1331
|
+
else:
|
|
1332
|
+
self._originalfont = [font]
|
|
1333
|
+
self._originalsize = font.GetPointSize()
|
|
1334
|
+
|
|
1335
|
+
|
|
1336
|
+
def GetTicksFont(self):
|
|
1337
|
+
""" Returns the ticks font."""
|
|
1338
|
+
|
|
1339
|
+
return self._originalfont[:], self._originalsize
|
|
1340
|
+
|
|
1341
|
+
|
|
1342
|
+
def SetTicksColour(self, colour=None):
|
|
1343
|
+
"""
|
|
1344
|
+
Sets the ticks colour.
|
|
1345
|
+
|
|
1346
|
+
:param `colour`: a valid :class:`wx.Colour` object. If defaulted to ``None``, the
|
|
1347
|
+
ticks colour will be set as blue.
|
|
1348
|
+
"""
|
|
1349
|
+
|
|
1350
|
+
if colour is None:
|
|
1351
|
+
colour = wx.BLUE
|
|
1352
|
+
|
|
1353
|
+
self._tickscolour = colour
|
|
1354
|
+
|
|
1355
|
+
|
|
1356
|
+
def GetTicksColour(self):
|
|
1357
|
+
""" Returns the ticks colour."""
|
|
1358
|
+
|
|
1359
|
+
return self._tickscolour
|
|
1360
|
+
|
|
1361
|
+
|
|
1362
|
+
def SetSpeedBackground(self, colour=None):
|
|
1363
|
+
"""
|
|
1364
|
+
Sets the background colour outside the :class:`SpeedMeter` control.
|
|
1365
|
+
|
|
1366
|
+
:param `colour`: a valid :class:`wx.Colour` object. If defaulted to ``None``, the
|
|
1367
|
+
:class:`SpeedMeter` background will be taken from the system default.
|
|
1368
|
+
"""
|
|
1369
|
+
|
|
1370
|
+
if colour is None:
|
|
1371
|
+
colour = wx.SystemSettings.GetColour(0)
|
|
1372
|
+
|
|
1373
|
+
self._speedbackground = colour
|
|
1374
|
+
|
|
1375
|
+
|
|
1376
|
+
def GetSpeedBackground(self):
|
|
1377
|
+
""" Returns the background colour outside the :class:`SpeedMeter` control."""
|
|
1378
|
+
|
|
1379
|
+
return self._speedbackground
|
|
1380
|
+
|
|
1381
|
+
|
|
1382
|
+
def SetHandColour(self, colour=None):
|
|
1383
|
+
"""
|
|
1384
|
+
Sets the hand (arrow indicator) colour.
|
|
1385
|
+
|
|
1386
|
+
:param `colour`: a valid :class:`wx.Colour` object. If defaulted to ``None``, the arrow
|
|
1387
|
+
indicator will be red.
|
|
1388
|
+
"""
|
|
1389
|
+
|
|
1390
|
+
if colour is None:
|
|
1391
|
+
colour = wx.RED
|
|
1392
|
+
|
|
1393
|
+
self._handcolour = colour
|
|
1394
|
+
|
|
1395
|
+
|
|
1396
|
+
def GetHandColour(self):
|
|
1397
|
+
""" Returns the hand (arrow indicator) colour."""
|
|
1398
|
+
|
|
1399
|
+
return self._handcolour
|
|
1400
|
+
|
|
1401
|
+
|
|
1402
|
+
def SetArcColour(self, colour=None):
|
|
1403
|
+
"""
|
|
1404
|
+
Sets the external arc colour (thicker line).
|
|
1405
|
+
|
|
1406
|
+
:param `colour`: a valid :class:`wx.Colour` object. If defaulted to ``None``, the arc
|
|
1407
|
+
colour will be black.
|
|
1408
|
+
"""
|
|
1409
|
+
|
|
1410
|
+
if colour is None:
|
|
1411
|
+
colour = wx.BLACK
|
|
1412
|
+
|
|
1413
|
+
self._arccolour = colour
|
|
1414
|
+
|
|
1415
|
+
|
|
1416
|
+
def GetArcColour(self):
|
|
1417
|
+
""" Returns the external arc colour."""
|
|
1418
|
+
|
|
1419
|
+
return self._arccolour
|
|
1420
|
+
|
|
1421
|
+
|
|
1422
|
+
def SetShadowColour(self, colour=None):
|
|
1423
|
+
"""
|
|
1424
|
+
Sets the hand's shadow colour.
|
|
1425
|
+
|
|
1426
|
+
:param `colour`: a valid :class:`wx.Colour` object. If defaulted to ``None``, the shadow
|
|
1427
|
+
colour will be light grey.
|
|
1428
|
+
"""
|
|
1429
|
+
|
|
1430
|
+
if colour is None:
|
|
1431
|
+
colour = wx.Colour(150, 150, 150)
|
|
1432
|
+
|
|
1433
|
+
self._shadowcolour = colour
|
|
1434
|
+
|
|
1435
|
+
|
|
1436
|
+
def GetShadowColour(self):
|
|
1437
|
+
""" Returns the hand's shadow colour."""
|
|
1438
|
+
|
|
1439
|
+
return self._shadowcolour
|
|
1440
|
+
|
|
1441
|
+
|
|
1442
|
+
def SetFillerColour(self, colour=None):
|
|
1443
|
+
"""
|
|
1444
|
+
Sets the partial filler colour.
|
|
1445
|
+
|
|
1446
|
+
A circle corona near the ticks will be filled with this colour, from
|
|
1447
|
+
the starting value to the current value of :class:`SpeedMeter`.
|
|
1448
|
+
|
|
1449
|
+
:param `colour`: a valid :class:`wx.Colour` object.
|
|
1450
|
+
"""
|
|
1451
|
+
|
|
1452
|
+
if colour is None:
|
|
1453
|
+
colour = wx.Colour(255, 150, 50)
|
|
1454
|
+
|
|
1455
|
+
self._fillercolour = colour
|
|
1456
|
+
|
|
1457
|
+
|
|
1458
|
+
def GetFillerColour(self):
|
|
1459
|
+
""" Returns the partial filler colour."""
|
|
1460
|
+
|
|
1461
|
+
return self._fillercolour
|
|
1462
|
+
|
|
1463
|
+
|
|
1464
|
+
def SetDirection(self, direction=None):
|
|
1465
|
+
"""
|
|
1466
|
+
Sets the direction of advancing :class:`SpeedMeter` value.
|
|
1467
|
+
|
|
1468
|
+
:param `direction`: specifying "advance" will move the hand in clock-wise direction
|
|
1469
|
+
(like normal car speed control), while using "reverse" will move it counterclock-wise
|
|
1470
|
+
direction. If defaulted to ``None``, then "advance" will be used.
|
|
1471
|
+
"""
|
|
1472
|
+
|
|
1473
|
+
if direction is None:
|
|
1474
|
+
direction = "Advance"
|
|
1475
|
+
|
|
1476
|
+
if direction not in ["Advance", "Reverse"]:
|
|
1477
|
+
raise Exception('\nERROR: Direction Parameter Should Be One Of "Advance" Or "Reverse".')
|
|
1478
|
+
|
|
1479
|
+
self._direction = direction
|
|
1480
|
+
|
|
1481
|
+
|
|
1482
|
+
def GetDirection(self):
|
|
1483
|
+
""" Returns the direction of advancing :class:`SpeedMeter` value."""
|
|
1484
|
+
|
|
1485
|
+
return self._direction
|
|
1486
|
+
|
|
1487
|
+
|
|
1488
|
+
def SetNumberOfSecondaryTicks(self, ticknum=None):
|
|
1489
|
+
"""
|
|
1490
|
+
Sets the number of secondary (intermediate) ticks.
|
|
1491
|
+
|
|
1492
|
+
:param `ticknum`: the number of intermediate ticks. If defaulted to ``None``,
|
|
1493
|
+
3 ticks are used.
|
|
1494
|
+
"""
|
|
1495
|
+
|
|
1496
|
+
if ticknum is None:
|
|
1497
|
+
ticknum = 3
|
|
1498
|
+
|
|
1499
|
+
if ticknum < 1:
|
|
1500
|
+
raise Exception("\nERROR: Number Of Ticks Must Be Greater Than 1.")
|
|
1501
|
+
|
|
1502
|
+
self._secondaryticks = ticknum
|
|
1503
|
+
|
|
1504
|
+
|
|
1505
|
+
def GetNumberOfSecondaryTicks(self):
|
|
1506
|
+
""" Returns the number of secondary (intermediate) ticks. """
|
|
1507
|
+
|
|
1508
|
+
return self._secondaryticks
|
|
1509
|
+
|
|
1510
|
+
|
|
1511
|
+
def SetMiddleText(self, text=None):
|
|
1512
|
+
"""
|
|
1513
|
+
Sets the text to be drawn near the center of :class:`SpeedMeter`.
|
|
1514
|
+
|
|
1515
|
+
:param `text`: the text to be drawn near the center of :class:`SpeedMeter`. If
|
|
1516
|
+
defaulted to ``None``, an empty string will be used.
|
|
1517
|
+
"""
|
|
1518
|
+
|
|
1519
|
+
if text is None:
|
|
1520
|
+
text = ""
|
|
1521
|
+
|
|
1522
|
+
self._middletext = text
|
|
1523
|
+
|
|
1524
|
+
|
|
1525
|
+
def GetMiddleText(self):
|
|
1526
|
+
""" Returns the text to be drawn near the center of :class:`SpeedMeter`. """
|
|
1527
|
+
|
|
1528
|
+
return self._middletext
|
|
1529
|
+
|
|
1530
|
+
|
|
1531
|
+
def SetMiddleTextFont(self, font=None):
|
|
1532
|
+
"""
|
|
1533
|
+
Sets the font for the text in the middle.
|
|
1534
|
+
|
|
1535
|
+
:param `font`: a valid :class:`wx.Font` object. If defaulted to ``None``, some
|
|
1536
|
+
standard font will be generated.
|
|
1537
|
+
"""
|
|
1538
|
+
|
|
1539
|
+
if font is None:
|
|
1540
|
+
self._middletextfont = wx.Font(1, wx.FONTFAMILY_SWISS, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_BOLD, False)
|
|
1541
|
+
self._middletextsize = 10
|
|
1542
|
+
self._middletextfont.SetPointSize(self._middletextsize)
|
|
1543
|
+
else:
|
|
1544
|
+
self._middletextfont = font
|
|
1545
|
+
self._middletextsize = font.GetPointSize()
|
|
1546
|
+
self._middletextfont.SetPointSize(self._middletextsize)
|
|
1547
|
+
|
|
1548
|
+
|
|
1549
|
+
def GetMiddleTextFont(self):
|
|
1550
|
+
""" Returns the font for the text in the middle."""
|
|
1551
|
+
|
|
1552
|
+
return self._middletextfont, self._middletextsize
|
|
1553
|
+
|
|
1554
|
+
|
|
1555
|
+
def SetMiddleTextColour(self, colour=None):
|
|
1556
|
+
"""
|
|
1557
|
+
Sets the colour for the text in the middle.
|
|
1558
|
+
|
|
1559
|
+
:param `colour`: a valid :class:`wx.Colour` object. If defaulted to ``None``, the text
|
|
1560
|
+
in the middle will be painted in blue.
|
|
1561
|
+
"""
|
|
1562
|
+
|
|
1563
|
+
if colour is None:
|
|
1564
|
+
colour = wx.BLUE
|
|
1565
|
+
|
|
1566
|
+
self._middlecolour = colour
|
|
1567
|
+
|
|
1568
|
+
|
|
1569
|
+
def GetMiddleTextColour(self):
|
|
1570
|
+
""" Returns the colour for the text in the middle."""
|
|
1571
|
+
|
|
1572
|
+
return self._middlecolour
|
|
1573
|
+
|
|
1574
|
+
|
|
1575
|
+
def SetMiddleIcon(self, icon):
|
|
1576
|
+
"""
|
|
1577
|
+
Sets the icon to be drawn near the center of :class:`SpeedMeter`.
|
|
1578
|
+
|
|
1579
|
+
:param `icon`: a valid :class:`wx.Bitmap` object.
|
|
1580
|
+
"""
|
|
1581
|
+
|
|
1582
|
+
if icon.IsOk():
|
|
1583
|
+
self._middleicon = icon
|
|
1584
|
+
else:
|
|
1585
|
+
raise Exception("\nERROR: Invalid Icon Passed To SpeedMeter.")
|
|
1586
|
+
|
|
1587
|
+
|
|
1588
|
+
def GetMiddleIcon(self):
|
|
1589
|
+
""" Returns the icon to be drawn near the center of :class:`SpeedMeter`. """
|
|
1590
|
+
|
|
1591
|
+
return self._middleicon
|
|
1592
|
+
|
|
1593
|
+
|
|
1594
|
+
def GetMiddleIconDimens(self):
|
|
1595
|
+
""" Used internally. """
|
|
1596
|
+
|
|
1597
|
+
return self._middleicon.GetWidth(), self._middleicon.GetHeight()
|
|
1598
|
+
|
|
1599
|
+
|
|
1600
|
+
def CircleCoords(self, radius, angle, centerX, centerY):
|
|
1601
|
+
"""
|
|
1602
|
+
Converts the input values into logical x, y coordinates.
|
|
1603
|
+
|
|
1604
|
+
:param `radius`: the :class:`SpeedMeter` radius;
|
|
1605
|
+
:param `angle`: the angular position of the mouse;
|
|
1606
|
+
:param `centerX`: the `x` position of the :class:`SpeedMeter` center;
|
|
1607
|
+
:param `centerX`: the `y` position of the :class:`SpeedMeter` center.
|
|
1608
|
+
"""
|
|
1609
|
+
|
|
1610
|
+
x = radius*cos(angle) + centerX
|
|
1611
|
+
y = radius*sin(angle) + centerY
|
|
1612
|
+
|
|
1613
|
+
return x, y
|
|
1614
|
+
|
|
1615
|
+
|
|
1616
|
+
def GetIntersection(self, current, intervals):
|
|
1617
|
+
""" Used internally. """
|
|
1618
|
+
|
|
1619
|
+
if self.GetDirection() == "Reverse":
|
|
1620
|
+
interval = intervals[:]
|
|
1621
|
+
interval.reverse()
|
|
1622
|
+
else:
|
|
1623
|
+
interval = intervals
|
|
1624
|
+
|
|
1625
|
+
indexes = list(range(len(intervals)))
|
|
1626
|
+
try:
|
|
1627
|
+
intersection = [ind for ind in indexes if interval[ind] <= current <= interval[ind+1]]
|
|
1628
|
+
except:
|
|
1629
|
+
if self.GetDirection() == "Reverse":
|
|
1630
|
+
intersection = [len(intervals) - 1]
|
|
1631
|
+
else:
|
|
1632
|
+
intersection = [0]
|
|
1633
|
+
|
|
1634
|
+
return intersection[0]
|
|
1635
|
+
|
|
1636
|
+
|
|
1637
|
+
def SetFirstGradientColour(self, colour=None):
|
|
1638
|
+
"""
|
|
1639
|
+
Sets the first gradient colour (near the ticks).
|
|
1640
|
+
|
|
1641
|
+
:param `colour`: a valid :class:`wx.Colour` object.
|
|
1642
|
+
"""
|
|
1643
|
+
|
|
1644
|
+
if colour is None:
|
|
1645
|
+
colour = wx.Colour(145, 220, 200)
|
|
1646
|
+
|
|
1647
|
+
self._firstgradientcolour = colour
|
|
1648
|
+
|
|
1649
|
+
|
|
1650
|
+
def GetFirstGradientColour(self):
|
|
1651
|
+
""" Returns the first gradient colour (near the ticks). """
|
|
1652
|
+
|
|
1653
|
+
return self._firstgradientcolour
|
|
1654
|
+
|
|
1655
|
+
|
|
1656
|
+
def SetSecondGradientColour(self, colour=None):
|
|
1657
|
+
"""
|
|
1658
|
+
Sets the second gradient colour (near the center).
|
|
1659
|
+
|
|
1660
|
+
:param `colour`: a valid :class:`wx.Colour` object.
|
|
1661
|
+
"""
|
|
1662
|
+
|
|
1663
|
+
if colour is None:
|
|
1664
|
+
colour = wx.WHITE
|
|
1665
|
+
|
|
1666
|
+
self._secondgradientcolour = colour
|
|
1667
|
+
|
|
1668
|
+
|
|
1669
|
+
def GetSecondGradientColour(self):
|
|
1670
|
+
""" Returns the first gradient colour (near the center). """
|
|
1671
|
+
|
|
1672
|
+
return self._secondgradientcolour
|
|
1673
|
+
|
|
1674
|
+
|
|
1675
|
+
def SetHandStyle(self, style=None):
|
|
1676
|
+
"""
|
|
1677
|
+
Sets the style for the hand (arrow indicator).
|
|
1678
|
+
|
|
1679
|
+
:param `style`: by specifying "Hand", :class:`SpeedMeter` will draw a polygon
|
|
1680
|
+
that simulates the car speed control indicator. Using "Arrow" will force
|
|
1681
|
+
:class:`SpeedMeter` to draw a simple arrow. If defaulted to ``None``, "Hand" will
|
|
1682
|
+
be used.
|
|
1683
|
+
"""
|
|
1684
|
+
|
|
1685
|
+
if style is None:
|
|
1686
|
+
style = "Hand"
|
|
1687
|
+
|
|
1688
|
+
if style not in ["Hand", "Arrow"]:
|
|
1689
|
+
raise Exception('\nERROR: Hand Style Parameter Should Be One Of "Hand" Or "Arrow".')
|
|
1690
|
+
return
|
|
1691
|
+
|
|
1692
|
+
self._handstyle = style
|
|
1693
|
+
|
|
1694
|
+
|
|
1695
|
+
def GetHandStyle(self):
|
|
1696
|
+
""" Returns the style for the hand (arrow indicator)."""
|
|
1697
|
+
|
|
1698
|
+
return self._handstyle
|
|
1699
|
+
|
|
1700
|
+
|
|
1701
|
+
def DrawExternalArc(self, draw=True):
|
|
1702
|
+
"""
|
|
1703
|
+
Specify wheter or not you wish to draw the external (thicker) arc.
|
|
1704
|
+
|
|
1705
|
+
:param `draw`: ``True`` to draw the external arc, ``False`` otherwise.
|
|
1706
|
+
"""
|
|
1707
|
+
|
|
1708
|
+
self._drawarc = draw
|
|
1709
|
+
|
|
1710
|
+
|
|
1711
|
+
def OnMouseMotion(self, event):
|
|
1712
|
+
"""
|
|
1713
|
+
Handles the ``wx.EVT_MOUSE_EVENTS`` event for :class:`SpeedMeter`.
|
|
1714
|
+
|
|
1715
|
+
:param `event`: a :class:`MouseEvent` event to be processed.
|
|
1716
|
+
|
|
1717
|
+
:note: Here only left clicks/drags are involved. Should :class:`SpeedMeter`
|
|
1718
|
+
have something more?
|
|
1719
|
+
"""
|
|
1720
|
+
|
|
1721
|
+
mousex = event.GetX()
|
|
1722
|
+
mousey = event.GetY()
|
|
1723
|
+
|
|
1724
|
+
if event.Leaving():
|
|
1725
|
+
return
|
|
1726
|
+
|
|
1727
|
+
pos = self.GetClientSize()
|
|
1728
|
+
size = self.GetPosition()
|
|
1729
|
+
centerX = self.CenterX
|
|
1730
|
+
centerY = self.CenterY
|
|
1731
|
+
|
|
1732
|
+
direction = self.GetDirection()
|
|
1733
|
+
|
|
1734
|
+
if event.LeftIsDown():
|
|
1735
|
+
|
|
1736
|
+
angle = atan2(float(mousey) - centerY, centerX - float(mousex)) + pi - self.EndAngle
|
|
1737
|
+
if angle >= 2*pi:
|
|
1738
|
+
angle = angle - 2*pi
|
|
1739
|
+
|
|
1740
|
+
if direction == "Advance":
|
|
1741
|
+
currentvalue = (self.StartAngle - self.EndAngle - angle)*float(self.Span)/(self.StartAngle - self.EndAngle) + self.StartValue
|
|
1742
|
+
else:
|
|
1743
|
+
currentvalue = (angle)*float(self.Span)/(self.StartAngle - self.EndAngle) + self.StartValue
|
|
1744
|
+
|
|
1745
|
+
if currentvalue >= self.StartValue and currentvalue <= self.EndValue:
|
|
1746
|
+
self.SetSpeedValue(currentvalue)
|
|
1747
|
+
|
|
1748
|
+
event.Skip()
|
|
1749
|
+
|
|
1750
|
+
|
|
1751
|
+
def GetSpeedStyle(self):
|
|
1752
|
+
""" Returns a list of strings and a list of integers containing the styles. """
|
|
1753
|
+
|
|
1754
|
+
stringstyle = []
|
|
1755
|
+
integerstyle = []
|
|
1756
|
+
|
|
1757
|
+
if self._agwStyle & SM_ROTATE_TEXT:
|
|
1758
|
+
stringstyle.append("SM_ROTATE_TEXT")
|
|
1759
|
+
integerstyle.append(SM_ROTATE_TEXT)
|
|
1760
|
+
|
|
1761
|
+
if self._agwStyle & SM_DRAW_SECTORS:
|
|
1762
|
+
stringstyle.append("SM_DRAW_SECTORS")
|
|
1763
|
+
integerstyle.append(SM_DRAW_SECTORS)
|
|
1764
|
+
|
|
1765
|
+
if self._agwStyle & SM_DRAW_PARTIAL_SECTORS:
|
|
1766
|
+
stringstyle.append("SM_DRAW_PARTIAL_SECTORS")
|
|
1767
|
+
integerstyle.append(SM_DRAW_PARTIAL_SECTORS)
|
|
1768
|
+
|
|
1769
|
+
if self._agwStyle & SM_DRAW_HAND:
|
|
1770
|
+
stringstyle.append("SM_DRAW_HAND")
|
|
1771
|
+
integerstyle.append(SM_DRAW_HAND)
|
|
1772
|
+
|
|
1773
|
+
if self._agwStyle & SM_DRAW_SHADOW:
|
|
1774
|
+
stringstyle.append("SM_DRAW_SHADOW")
|
|
1775
|
+
integerstyle.append(SM_DRAW_SHADOW)
|
|
1776
|
+
|
|
1777
|
+
if self._agwStyle & SM_DRAW_PARTIAL_FILLER:
|
|
1778
|
+
stringstyle.append("SM_DRAW_PARTIAL_FILLER")
|
|
1779
|
+
integerstyle.append(SM_DRAW_PARTIAL_FILLER)
|
|
1780
|
+
|
|
1781
|
+
if self._agwStyle & SM_DRAW_SECONDARY_TICKS:
|
|
1782
|
+
stringstyle.append("SM_DRAW_SECONDARY_TICKS")
|
|
1783
|
+
integerstyle.append(SM_DRAW_SECONDARY_TICKS)
|
|
1784
|
+
|
|
1785
|
+
if self._agwStyle & SM_DRAW_MIDDLE_TEXT:
|
|
1786
|
+
stringstyle.append("SM_DRAW_MIDDLE_TEXT")
|
|
1787
|
+
integerstyle.append(SM_DRAW_MIDDLE_TEXT)
|
|
1788
|
+
|
|
1789
|
+
if self._agwStyle & SM_DRAW_MIDDLE_ICON:
|
|
1790
|
+
stringstyle.append("SM_DRAW_MIDDLE_ICON")
|
|
1791
|
+
integerstyle.append(SM_DRAW_MIDDLE_ICON)
|
|
1792
|
+
|
|
1793
|
+
if self._agwStyle & SM_DRAW_GRADIENT:
|
|
1794
|
+
stringstyle.append("SM_DRAW_GRADIENT")
|
|
1795
|
+
integerstyle.append(SM_DRAW_GRADIENT)
|
|
1796
|
+
|
|
1797
|
+
if self._agwStyle & SM_DRAW_FANCY_TICKS:
|
|
1798
|
+
stringstyle.append("SM_DRAW_FANCY_TICKS")
|
|
1799
|
+
integerstyle.append(SM_DRAW_FANCY_TICKS)
|
|
1800
|
+
|
|
1801
|
+
return stringstyle, integerstyle
|