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
|
@@ -0,0 +1,2167 @@
|
|
|
1
|
+
#!/usr/bin/env python
|
|
2
|
+
|
|
3
|
+
import wx
|
|
4
|
+
import string
|
|
5
|
+
import os
|
|
6
|
+
import sys
|
|
7
|
+
import random
|
|
8
|
+
|
|
9
|
+
import wx.lib.colourselect as csel
|
|
10
|
+
|
|
11
|
+
try:
|
|
12
|
+
dirName = os.path.dirname(os.path.abspath(__file__))
|
|
13
|
+
except:
|
|
14
|
+
dirName = os.path.dirname(os.path.abspath(sys.argv[0]))
|
|
15
|
+
|
|
16
|
+
bitmapDir = os.path.join(dirName, 'bitmaps')
|
|
17
|
+
sys.path.append(os.path.split(dirName)[0])
|
|
18
|
+
|
|
19
|
+
try:
|
|
20
|
+
from agw import customtreectrl as CT
|
|
21
|
+
except ImportError: # if it's not there locally, try the wxPython lib.
|
|
22
|
+
import wx.lib.agw.customtreectrl as CT
|
|
23
|
+
|
|
24
|
+
import images
|
|
25
|
+
|
|
26
|
+
#---------------------------------------------------------------------------
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
penstyle = ["wx.PENSTYLE_SOLID", "wx.PENSTYLE_TRANSPARENT", "wx.PENSTYLE_DOT",
|
|
30
|
+
"wx.PENSTYLE_LONG_DASH", "wx.PENSTYLE_DOT_DASH", "wx.PENSTYLE_USER_DASH",
|
|
31
|
+
"wx.PENSTYLE_BDIAGONAL_HATCH", "wx.PENSTYLE_CROSSDIAG_HATCH",
|
|
32
|
+
"wx.PENSTYLE_FDIAGONAL_HATCH", "wx.PENSTYLE_CROSS_HATCH",
|
|
33
|
+
"wx.PENSTYLE_HORIZONTAL_HATCH", "wx.PENSTYLE_VERTICAL_HATCH"]
|
|
34
|
+
|
|
35
|
+
ArtIDs = [ "None",
|
|
36
|
+
"wx.ART_ADD_BOOKMARK",
|
|
37
|
+
"wx.ART_DEL_BOOKMARK",
|
|
38
|
+
"wx.ART_HELP_SIDE_PANEL",
|
|
39
|
+
"wx.ART_HELP_SETTINGS",
|
|
40
|
+
"wx.ART_HELP_BOOK",
|
|
41
|
+
"wx.ART_HELP_FOLDER",
|
|
42
|
+
"wx.ART_HELP_PAGE",
|
|
43
|
+
"wx.ART_GO_BACK",
|
|
44
|
+
"wx.ART_GO_FORWARD",
|
|
45
|
+
"wx.ART_GO_UP",
|
|
46
|
+
"wx.ART_GO_DOWN",
|
|
47
|
+
"wx.ART_GO_TO_PARENT",
|
|
48
|
+
"wx.ART_GO_HOME",
|
|
49
|
+
"wx.ART_FILE_OPEN",
|
|
50
|
+
"wx.ART_PRINT",
|
|
51
|
+
"wx.ART_HELP",
|
|
52
|
+
"wx.ART_TIP",
|
|
53
|
+
"wx.ART_REPORT_VIEW",
|
|
54
|
+
"wx.ART_LIST_VIEW",
|
|
55
|
+
"wx.ART_NEW_DIR",
|
|
56
|
+
"wx.ART_HARDDISK",
|
|
57
|
+
"wx.ART_FLOPPY",
|
|
58
|
+
"wx.ART_CDROM",
|
|
59
|
+
"wx.ART_REMOVABLE",
|
|
60
|
+
"wx.ART_FOLDER",
|
|
61
|
+
"wx.ART_FOLDER_OPEN",
|
|
62
|
+
"wx.ART_GO_DIR_UP",
|
|
63
|
+
"wx.ART_EXECUTABLE_FILE",
|
|
64
|
+
"wx.ART_NORMAL_FILE",
|
|
65
|
+
"wx.ART_TICK_MARK",
|
|
66
|
+
"wx.ART_CROSS_MARK",
|
|
67
|
+
"wx.ART_ERROR",
|
|
68
|
+
"wx.ART_QUESTION",
|
|
69
|
+
"wx.ART_WARNING",
|
|
70
|
+
"wx.ART_INFORMATION",
|
|
71
|
+
"wx.ART_MISSING_IMAGE",
|
|
72
|
+
"SmileBitmap"
|
|
73
|
+
]
|
|
74
|
+
|
|
75
|
+
keyMap = {
|
|
76
|
+
wx.WXK_BACK : "WXK_BACK",
|
|
77
|
+
wx.WXK_TAB : "WXK_TAB",
|
|
78
|
+
wx.WXK_RETURN : "WXK_RETURN",
|
|
79
|
+
wx.WXK_ESCAPE : "WXK_ESCAPE",
|
|
80
|
+
wx.WXK_SPACE : "WXK_SPACE",
|
|
81
|
+
wx.WXK_DELETE : "WXK_DELETE",
|
|
82
|
+
wx.WXK_START : "WXK_START",
|
|
83
|
+
wx.WXK_LBUTTON : "WXK_LBUTTON",
|
|
84
|
+
wx.WXK_RBUTTON : "WXK_RBUTTON",
|
|
85
|
+
wx.WXK_CANCEL : "WXK_CANCEL",
|
|
86
|
+
wx.WXK_MBUTTON : "WXK_MBUTTON",
|
|
87
|
+
wx.WXK_CLEAR : "WXK_CLEAR",
|
|
88
|
+
wx.WXK_SHIFT : "WXK_SHIFT",
|
|
89
|
+
wx.WXK_ALT : "WXK_ALT",
|
|
90
|
+
wx.WXK_CONTROL : "WXK_CONTROL",
|
|
91
|
+
wx.WXK_MENU : "WXK_MENU",
|
|
92
|
+
wx.WXK_PAUSE : "WXK_PAUSE",
|
|
93
|
+
wx.WXK_CAPITAL : "WXK_CAPITAL",
|
|
94
|
+
wx.WXK_END : "WXK_END",
|
|
95
|
+
wx.WXK_HOME : "WXK_HOME",
|
|
96
|
+
wx.WXK_LEFT : "WXK_LEFT",
|
|
97
|
+
wx.WXK_UP : "WXK_UP",
|
|
98
|
+
wx.WXK_RIGHT : "WXK_RIGHT",
|
|
99
|
+
wx.WXK_DOWN : "WXK_DOWN",
|
|
100
|
+
wx.WXK_SELECT : "WXK_SELECT",
|
|
101
|
+
wx.WXK_PRINT : "WXK_PRINT",
|
|
102
|
+
wx.WXK_EXECUTE : "WXK_EXECUTE",
|
|
103
|
+
wx.WXK_SNAPSHOT : "WXK_SNAPSHOT",
|
|
104
|
+
wx.WXK_INSERT : "WXK_INSERT",
|
|
105
|
+
wx.WXK_HELP : "WXK_HELP",
|
|
106
|
+
wx.WXK_NUMPAD0 : "WXK_NUMPAD0",
|
|
107
|
+
wx.WXK_NUMPAD1 : "WXK_NUMPAD1",
|
|
108
|
+
wx.WXK_NUMPAD2 : "WXK_NUMPAD2",
|
|
109
|
+
wx.WXK_NUMPAD3 : "WXK_NUMPAD3",
|
|
110
|
+
wx.WXK_NUMPAD4 : "WXK_NUMPAD4",
|
|
111
|
+
wx.WXK_NUMPAD5 : "WXK_NUMPAD5",
|
|
112
|
+
wx.WXK_NUMPAD6 : "WXK_NUMPAD6",
|
|
113
|
+
wx.WXK_NUMPAD7 : "WXK_NUMPAD7",
|
|
114
|
+
wx.WXK_NUMPAD8 : "WXK_NUMPAD8",
|
|
115
|
+
wx.WXK_NUMPAD9 : "WXK_NUMPAD9",
|
|
116
|
+
wx.WXK_MULTIPLY : "WXK_MULTIPLY",
|
|
117
|
+
wx.WXK_ADD : "WXK_ADD",
|
|
118
|
+
wx.WXK_SEPARATOR : "WXK_SEPARATOR",
|
|
119
|
+
wx.WXK_SUBTRACT : "WXK_SUBTRACT",
|
|
120
|
+
wx.WXK_DECIMAL : "WXK_DECIMAL",
|
|
121
|
+
wx.WXK_DIVIDE : "WXK_DIVIDE",
|
|
122
|
+
wx.WXK_F1 : "WXK_F1",
|
|
123
|
+
wx.WXK_F2 : "WXK_F2",
|
|
124
|
+
wx.WXK_F3 : "WXK_F3",
|
|
125
|
+
wx.WXK_F4 : "WXK_F4",
|
|
126
|
+
wx.WXK_F5 : "WXK_F5",
|
|
127
|
+
wx.WXK_F6 : "WXK_F6",
|
|
128
|
+
wx.WXK_F7 : "WXK_F7",
|
|
129
|
+
wx.WXK_F8 : "WXK_F8",
|
|
130
|
+
wx.WXK_F9 : "WXK_F9",
|
|
131
|
+
wx.WXK_F10 : "WXK_F10",
|
|
132
|
+
wx.WXK_F11 : "WXK_F11",
|
|
133
|
+
wx.WXK_F12 : "WXK_F12",
|
|
134
|
+
wx.WXK_F13 : "WXK_F13",
|
|
135
|
+
wx.WXK_F14 : "WXK_F14",
|
|
136
|
+
wx.WXK_F15 : "WXK_F15",
|
|
137
|
+
wx.WXK_F16 : "WXK_F16",
|
|
138
|
+
wx.WXK_F17 : "WXK_F17",
|
|
139
|
+
wx.WXK_F18 : "WXK_F18",
|
|
140
|
+
wx.WXK_F19 : "WXK_F19",
|
|
141
|
+
wx.WXK_F20 : "WXK_F20",
|
|
142
|
+
wx.WXK_F21 : "WXK_F21",
|
|
143
|
+
wx.WXK_F22 : "WXK_F22",
|
|
144
|
+
wx.WXK_F23 : "WXK_F23",
|
|
145
|
+
wx.WXK_F24 : "WXK_F24",
|
|
146
|
+
wx.WXK_NUMLOCK : "WXK_NUMLOCK",
|
|
147
|
+
wx.WXK_SCROLL : "WXK_SCROLL",
|
|
148
|
+
wx.WXK_PAGEUP : "WXK_PAGEUP",
|
|
149
|
+
wx.WXK_PAGEDOWN : "WXK_PAGEDOWN",
|
|
150
|
+
wx.WXK_NUMPAD_SPACE : "WXK_NUMPAD_SPACE",
|
|
151
|
+
wx.WXK_NUMPAD_TAB : "WXK_NUMPAD_TAB",
|
|
152
|
+
wx.WXK_NUMPAD_ENTER : "WXK_NUMPAD_ENTER",
|
|
153
|
+
wx.WXK_NUMPAD_F1 : "WXK_NUMPAD_F1",
|
|
154
|
+
wx.WXK_NUMPAD_F2 : "WXK_NUMPAD_F2",
|
|
155
|
+
wx.WXK_NUMPAD_F3 : "WXK_NUMPAD_F3",
|
|
156
|
+
wx.WXK_NUMPAD_F4 : "WXK_NUMPAD_F4",
|
|
157
|
+
wx.WXK_NUMPAD_HOME : "WXK_NUMPAD_HOME",
|
|
158
|
+
wx.WXK_NUMPAD_LEFT : "WXK_NUMPAD_LEFT",
|
|
159
|
+
wx.WXK_NUMPAD_UP : "WXK_NUMPAD_UP",
|
|
160
|
+
wx.WXK_NUMPAD_RIGHT : "WXK_NUMPAD_RIGHT",
|
|
161
|
+
wx.WXK_NUMPAD_DOWN : "WXK_NUMPAD_DOWN",
|
|
162
|
+
wx.WXK_NUMPAD_PAGEUP : "WXK_NUMPAD_PAGEUP",
|
|
163
|
+
wx.WXK_NUMPAD_PAGEDOWN : "WXK_NUMPAD_PAGEDOWN",
|
|
164
|
+
wx.WXK_NUMPAD_END : "WXK_NUMPAD_END",
|
|
165
|
+
wx.WXK_NUMPAD_BEGIN : "WXK_NUMPAD_BEGIN",
|
|
166
|
+
wx.WXK_NUMPAD_INSERT : "WXK_NUMPAD_INSERT",
|
|
167
|
+
wx.WXK_NUMPAD_DELETE : "WXK_NUMPAD_DELETE",
|
|
168
|
+
wx.WXK_NUMPAD_EQUAL : "WXK_NUMPAD_EQUAL",
|
|
169
|
+
wx.WXK_NUMPAD_MULTIPLY : "WXK_NUMPAD_MULTIPLY",
|
|
170
|
+
wx.WXK_NUMPAD_ADD : "WXK_NUMPAD_ADD",
|
|
171
|
+
wx.WXK_NUMPAD_SEPARATOR : "WXK_NUMPAD_SEPARATOR",
|
|
172
|
+
wx.WXK_NUMPAD_SUBTRACT : "WXK_NUMPAD_SUBTRACT",
|
|
173
|
+
wx.WXK_NUMPAD_DECIMAL : "WXK_NUMPAD_DECIMAL",
|
|
174
|
+
wx.WXK_NUMPAD_DIVIDE : "WXK_NUMPAD_DIVIDE"
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
|
|
178
|
+
|
|
179
|
+
#---------------------------------------------------------------------------
|
|
180
|
+
# Just A Dialog To Select Pen Styles
|
|
181
|
+
#---------------------------------------------------------------------------
|
|
182
|
+
class PenDialog(wx.Dialog):
|
|
183
|
+
|
|
184
|
+
def __init__(self, parent=None, id=-1, title="", pos=wx.DefaultPosition,
|
|
185
|
+
size=wx.DefaultSize, style=wx.DEFAULT_DIALOG_STYLE, oldpen=None,
|
|
186
|
+
pentype=0):
|
|
187
|
+
|
|
188
|
+
wx.Dialog.__init__(self, parent, id, title, pos, size, style)
|
|
189
|
+
|
|
190
|
+
self.colourbutton = csel.ColourSelect(self)
|
|
191
|
+
self.spinwidth = wx.SpinCtrl(self, -1, "1", min=1, max=3, style=wx.SP_ARROW_KEYS)
|
|
192
|
+
|
|
193
|
+
self.combostyle = wx.ComboBox(self, -1, choices=penstyle, style=wx.CB_DROPDOWN|wx.CB_READONLY)
|
|
194
|
+
|
|
195
|
+
choices = ["[1, 1]", "[2, 2]", "[3, 3]", "[4, 4]"]
|
|
196
|
+
self.combodash = wx.ComboBox(self, -1, choices=choices, style=wx.CB_DROPDOWN|wx.CB_READONLY)
|
|
197
|
+
|
|
198
|
+
self.okbutton = wx.Button(self, wx.ID_OK)
|
|
199
|
+
self.cancelbutton = wx.Button(self, wx.ID_CANCEL)
|
|
200
|
+
|
|
201
|
+
self.oldpen = oldpen
|
|
202
|
+
self.parent = parent
|
|
203
|
+
self.pentype = pentype
|
|
204
|
+
|
|
205
|
+
self.SetProperties()
|
|
206
|
+
self.DoLayout()
|
|
207
|
+
|
|
208
|
+
self.Bind(wx.EVT_COMBOBOX, self.OnStyle, self.combostyle)
|
|
209
|
+
self.Bind(wx.EVT_BUTTON, self.OnOk, self.okbutton)
|
|
210
|
+
self.Bind(wx.EVT_BUTTON, self.OnCancel, self.cancelbutton)
|
|
211
|
+
|
|
212
|
+
|
|
213
|
+
def SetProperties(self):
|
|
214
|
+
|
|
215
|
+
self.SetTitle("Pen Dialog Selector")
|
|
216
|
+
self.colourbutton.SetMinSize((25, 25))
|
|
217
|
+
self.colourbutton.SetColour(self.oldpen.GetColour())
|
|
218
|
+
|
|
219
|
+
style = self.oldpen.GetStyle()
|
|
220
|
+
for count, st in enumerate(penstyle):
|
|
221
|
+
if eval(st) == style:
|
|
222
|
+
self.combostyle.SetSelection(count)
|
|
223
|
+
if count == 5:
|
|
224
|
+
self.combodash.Enable(True)
|
|
225
|
+
else:
|
|
226
|
+
self.combodash.Enable(False)
|
|
227
|
+
break
|
|
228
|
+
|
|
229
|
+
if self.combodash.IsEnabled():
|
|
230
|
+
dashes = repr(self.oldpen.GetDashes())
|
|
231
|
+
self.combodash.SetValue(dashes)
|
|
232
|
+
|
|
233
|
+
self.spinwidth.SetValue(self.oldpen.GetWidth())
|
|
234
|
+
self.okbutton.SetDefault()
|
|
235
|
+
|
|
236
|
+
if self.pentype == 1:
|
|
237
|
+
self.spinwidth.Enable(False)
|
|
238
|
+
|
|
239
|
+
|
|
240
|
+
def DoLayout(self):
|
|
241
|
+
|
|
242
|
+
mainsizer = wx.BoxSizer(wx.VERTICAL)
|
|
243
|
+
bottomsizer = wx.BoxSizer(wx.HORIZONTAL)
|
|
244
|
+
middlesizer = wx.BoxSizer(wx.VERTICAL)
|
|
245
|
+
stylesizer = wx.BoxSizer(wx.HORIZONTAL)
|
|
246
|
+
widthsizer = wx.BoxSizer(wx.HORIZONTAL)
|
|
247
|
+
coloursizer = wx.BoxSizer(wx.HORIZONTAL)
|
|
248
|
+
label_1 = wx.StaticText(self, -1, "Please Choose The Pen Settings:")
|
|
249
|
+
label_1.SetFont(wx.Font(8, wx.FONTFAMILY_DEFAULT, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_BOLD, 0, ""))
|
|
250
|
+
mainsizer.Add(label_1, 0, wx.ALL|wx.ADJUST_MINSIZE, 10)
|
|
251
|
+
label_2 = wx.StaticText(self, -1, "Pen Colour")
|
|
252
|
+
coloursizer.Add(label_2, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL|wx.ADJUST_MINSIZE, 5)
|
|
253
|
+
coloursizer.Add((5, 5), 1, wx.ADJUST_MINSIZE, 0)
|
|
254
|
+
coloursizer.Add(self.colourbutton, 0, wx.ALL|wx.ADJUST_MINSIZE, 5)
|
|
255
|
+
middlesizer.Add(coloursizer, 0, wx.EXPAND, 0)
|
|
256
|
+
label_3 = wx.StaticText(self, -1, "Pen Width")
|
|
257
|
+
widthsizer.Add(label_3, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL|wx.ADJUST_MINSIZE, 5)
|
|
258
|
+
widthsizer.Add((5, 5), 1, wx.ADJUST_MINSIZE, 0)
|
|
259
|
+
widthsizer.Add(self.spinwidth, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL|wx.ADJUST_MINSIZE, 5)
|
|
260
|
+
middlesizer.Add(widthsizer, 0, wx.EXPAND, 0)
|
|
261
|
+
label_4 = wx.StaticText(self, -1, "Pen Style")
|
|
262
|
+
stylesizer.Add(label_4, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL|wx.ADJUST_MINSIZE, 5)
|
|
263
|
+
stylesizer.Add((5, 5), 1, wx.ADJUST_MINSIZE, 0)
|
|
264
|
+
stylesizer.Add(self.combostyle, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL|wx.ADJUST_MINSIZE, 5)
|
|
265
|
+
stylesizer.Add(self.combodash, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL|wx.ADJUST_MINSIZE, 5)
|
|
266
|
+
middlesizer.Add(stylesizer, 0, wx.BOTTOM|wx.EXPAND, 5)
|
|
267
|
+
mainsizer.Add(middlesizer, 1, wx.EXPAND, 0)
|
|
268
|
+
bottomsizer.Add(self.okbutton, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL|wx.ADJUST_MINSIZE, 20)
|
|
269
|
+
bottomsizer.Add((20, 20), 1, wx.ADJUST_MINSIZE, 0)
|
|
270
|
+
bottomsizer.Add(self.cancelbutton, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL|wx.ADJUST_MINSIZE, 20)
|
|
271
|
+
mainsizer.Add(bottomsizer, 0, wx.EXPAND, 0)
|
|
272
|
+
self.SetAutoLayout(True)
|
|
273
|
+
self.SetSizer(mainsizer)
|
|
274
|
+
mainsizer.Fit(self)
|
|
275
|
+
mainsizer.SetSizeHints(self)
|
|
276
|
+
self.Layout()
|
|
277
|
+
self.Centre()
|
|
278
|
+
|
|
279
|
+
|
|
280
|
+
def OnStyle(self, event):
|
|
281
|
+
|
|
282
|
+
choice = event.GetEventObject().GetValue()
|
|
283
|
+
self.combodash.Enable(choice==5)
|
|
284
|
+
event.Skip()
|
|
285
|
+
|
|
286
|
+
|
|
287
|
+
def OnOk(self, event):
|
|
288
|
+
|
|
289
|
+
colour = self.colourbutton.GetColour()
|
|
290
|
+
style = eval(self.combostyle.GetValue())
|
|
291
|
+
width = int(self.spinwidth.GetValue())
|
|
292
|
+
|
|
293
|
+
dashes = None
|
|
294
|
+
if self.combostyle.GetSelection() == 5:
|
|
295
|
+
dashes = eval(self.combodash.GetValue())
|
|
296
|
+
|
|
297
|
+
pen = wx.Pen(colour, width, style)
|
|
298
|
+
|
|
299
|
+
if dashes:
|
|
300
|
+
pen.SetDashes(dashes)
|
|
301
|
+
|
|
302
|
+
pen.SetCap(wx.CAP_BUTT)
|
|
303
|
+
|
|
304
|
+
if self.pentype == 0:
|
|
305
|
+
self.parent.SetConnectionPen(pen)
|
|
306
|
+
else:
|
|
307
|
+
self.parent.SetBorderPen(pen)
|
|
308
|
+
|
|
309
|
+
self.Destroy()
|
|
310
|
+
event.Skip()
|
|
311
|
+
|
|
312
|
+
|
|
313
|
+
def OnCancel(self, event):
|
|
314
|
+
|
|
315
|
+
self.Destroy()
|
|
316
|
+
event.Skip()
|
|
317
|
+
|
|
318
|
+
|
|
319
|
+
#---------------------------------------------------------------------------
|
|
320
|
+
# Just A Dialog To Select Tree Buttons Icons
|
|
321
|
+
#---------------------------------------------------------------------------
|
|
322
|
+
class TreeButtonsDialog(wx.Dialog):
|
|
323
|
+
|
|
324
|
+
def __init__(self, parent=None, id=-1, title="", pos=wx.DefaultPosition,
|
|
325
|
+
size=wx.DefaultSize, style=wx.DEFAULT_DIALOG_STYLE, oldicons=None):
|
|
326
|
+
|
|
327
|
+
wx.Dialog.__init__(self, parent, id, title, pos, size, style)
|
|
328
|
+
|
|
329
|
+
self.listicons = wx.ListBox(self, -1, choices=["Set 1", "Set 2", "Set 3", "Set 4", "Set 5"], style=wx.LB_SINGLE)
|
|
330
|
+
|
|
331
|
+
bitmap_plus = os.path.normpath(os.path.join(bitmapDir, "plus" + str(oldicons+1) + ".ico"))
|
|
332
|
+
bitmap_minus = os.path.normpath(os.path.join(bitmapDir, "minus" + str(oldicons+1) + ".ico"))
|
|
333
|
+
|
|
334
|
+
bitmap_plus = wx.Image(bitmap_plus, wx.BITMAP_TYPE_ICO)
|
|
335
|
+
bitmap_plus.Rescale(24, 24)
|
|
336
|
+
bitmap_plus = bitmap_plus.ConvertToBitmap()
|
|
337
|
+
bitmap_minus = wx.Image(bitmap_minus, wx.BITMAP_TYPE_ICO)
|
|
338
|
+
bitmap_minus.Rescale(24, 24)
|
|
339
|
+
bitmap_minus = bitmap_minus.ConvertToBitmap()
|
|
340
|
+
|
|
341
|
+
self.bitmap_plus = wx.StaticBitmap(self, -1, bitmap_plus)
|
|
342
|
+
self.bitmap_minus = wx.StaticBitmap(self, -1, bitmap_minus)
|
|
343
|
+
|
|
344
|
+
self.okbutton = wx.Button(self, wx.ID_OK)
|
|
345
|
+
self.cancelbutton = wx.Button(self, wx.ID_CANCEL)
|
|
346
|
+
|
|
347
|
+
self.parent = parent
|
|
348
|
+
|
|
349
|
+
self.SetProperties()
|
|
350
|
+
self.DoLayout()
|
|
351
|
+
|
|
352
|
+
self.Bind(wx.EVT_BUTTON, self.OnOk, self.okbutton)
|
|
353
|
+
self.Bind(wx.EVT_BUTTON, self.OnCancel, self.cancelbutton)
|
|
354
|
+
self.Bind(wx.EVT_LISTBOX, self.OnListBox, self.listicons)
|
|
355
|
+
|
|
356
|
+
|
|
357
|
+
def SetProperties(self):
|
|
358
|
+
|
|
359
|
+
self.SetTitle("Tree Buttons Selector")
|
|
360
|
+
self.listicons.SetSelection(0)
|
|
361
|
+
self.okbutton.SetDefault()
|
|
362
|
+
|
|
363
|
+
|
|
364
|
+
def DoLayout(self):
|
|
365
|
+
|
|
366
|
+
mainsizer = wx.BoxSizer(wx.VERTICAL)
|
|
367
|
+
bottomsizer = wx.BoxSizer(wx.HORIZONTAL)
|
|
368
|
+
topsizer = wx.BoxSizer(wx.HORIZONTAL)
|
|
369
|
+
rightsizer = wx.BoxSizer(wx.VERTICAL)
|
|
370
|
+
sizer_2 = wx.BoxSizer(wx.HORIZONTAL)
|
|
371
|
+
sizer_1 = wx.BoxSizer(wx.HORIZONTAL)
|
|
372
|
+
label_1 = wx.StaticText(self, -1, "Please Choose One Of These Sets Of Icons:")
|
|
373
|
+
label_1.SetFont(wx.Font(8, wx.FONTFAMILY_DEFAULT, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_BOLD, 0, ""))
|
|
374
|
+
mainsizer.Add(label_1, 0, wx.ALL|wx.ADJUST_MINSIZE, 10)
|
|
375
|
+
topsizer.Add(self.listicons, 0, wx.ALL|wx.EXPAND|wx.ADJUST_MINSIZE, 5)
|
|
376
|
+
label_2 = wx.StaticText(self, -1, "Collapsed")
|
|
377
|
+
sizer_1.Add(label_2, 0, wx.RIGHT|wx.ALIGN_CENTER_VERTICAL|wx.ADJUST_MINSIZE, 10)
|
|
378
|
+
sizer_1.Add((20, 20), 1, wx.ALIGN_RIGHT|wx.ADJUST_MINSIZE, 0)
|
|
379
|
+
sizer_1.Add(self.bitmap_plus, 1, wx.RIGHT|wx.EXPAND|wx.ALIGN_CENTER_VERTICAL|wx.ADJUST_MINSIZE, 10)
|
|
380
|
+
rightsizer.Add(sizer_1, 0, wx.EXPAND, 0)
|
|
381
|
+
label_3 = wx.StaticText(self, -1, "Expanded")
|
|
382
|
+
sizer_2.Add(label_3, 0, wx.RIGHT|wx.ALIGN_CENTER_VERTICAL|wx.ADJUST_MINSIZE, 10)
|
|
383
|
+
sizer_2.Add((20, 20), 1, wx.ADJUST_MINSIZE, 0)
|
|
384
|
+
sizer_2.Add(self.bitmap_minus, 1, wx.RIGHT|wx.EXPAND|wx.ALIGN_CENTER_VERTICAL|wx.ADJUST_MINSIZE, 10)
|
|
385
|
+
rightsizer.Add(sizer_2, 0, wx.EXPAND, 0)
|
|
386
|
+
topsizer.Add(rightsizer, 0, wx.ALL|wx.EXPAND, 5)
|
|
387
|
+
mainsizer.Add(topsizer, 1, wx.EXPAND, 0)
|
|
388
|
+
bottomsizer.Add(self.okbutton, 0, wx.ALL|wx.ADJUST_MINSIZE, 20)
|
|
389
|
+
bottomsizer.Add((20, 20), 1, wx.ADJUST_MINSIZE, 0)
|
|
390
|
+
bottomsizer.Add(self.cancelbutton, 0, wx.ALL|wx.ADJUST_MINSIZE, 20)
|
|
391
|
+
mainsizer.Add(bottomsizer, 0, wx.EXPAND, 0)
|
|
392
|
+
self.SetAutoLayout(True)
|
|
393
|
+
self.SetSizer(mainsizer)
|
|
394
|
+
mainsizer.Fit(self)
|
|
395
|
+
mainsizer.SetSizeHints(self)
|
|
396
|
+
self.Layout()
|
|
397
|
+
|
|
398
|
+
|
|
399
|
+
def OnListBox(self, event):
|
|
400
|
+
|
|
401
|
+
selection = self.listicons.GetSelection()
|
|
402
|
+
bitmap_plus = os.path.normpath(os.path.join(bitmapDir, "plus" + str(selection+1) + ".ico"))
|
|
403
|
+
bitmap_minus = os.path.normpath(os.path.join(bitmapDir, "minus" + str(selection+1) + ".ico"))
|
|
404
|
+
|
|
405
|
+
bitmap_plus = wx.Image(bitmap_plus, wx.BITMAP_TYPE_ICO)
|
|
406
|
+
bitmap_plus.Rescale(24, 24)
|
|
407
|
+
bitmap_plus = bitmap_plus.ConvertToBitmap()
|
|
408
|
+
bitmap_minus = wx.Image(bitmap_minus, wx.BITMAP_TYPE_ICO)
|
|
409
|
+
bitmap_minus.Rescale(24, 24)
|
|
410
|
+
bitmap_minus = bitmap_minus.ConvertToBitmap()
|
|
411
|
+
|
|
412
|
+
self.bitmap_plus.SetBitmap(bitmap_plus)
|
|
413
|
+
self.bitmap_minus.SetBitmap(bitmap_minus)
|
|
414
|
+
|
|
415
|
+
self.bitmap_plus.Refresh()
|
|
416
|
+
self.bitmap_minus.Refresh()
|
|
417
|
+
event.Skip()
|
|
418
|
+
|
|
419
|
+
|
|
420
|
+
def OnOk(self, event):
|
|
421
|
+
|
|
422
|
+
selection = self.listicons.GetSelection()
|
|
423
|
+
self.parent.SetTreeButtons(selection)
|
|
424
|
+
self.Destroy()
|
|
425
|
+
event.Skip()
|
|
426
|
+
|
|
427
|
+
|
|
428
|
+
def OnCancel(self, event):
|
|
429
|
+
|
|
430
|
+
self.Destroy()
|
|
431
|
+
event.Skip()
|
|
432
|
+
|
|
433
|
+
|
|
434
|
+
#---------------------------------------------------------------------------
|
|
435
|
+
# Just A Dialog To Select Tree Check/Radio Item Icons
|
|
436
|
+
#---------------------------------------------------------------------------
|
|
437
|
+
class CheckDialog(wx.Dialog):
|
|
438
|
+
|
|
439
|
+
def __init__(self, parent=None, id=-1, title="", pos=wx.DefaultPosition,
|
|
440
|
+
size=wx.DefaultSize, style=wx.DEFAULT_DIALOG_STYLE):
|
|
441
|
+
|
|
442
|
+
wx.Dialog.__init__(self, parent, id, title, pos, size, style)
|
|
443
|
+
|
|
444
|
+
self.listicons = wx.ListBox(self, -1, choices=["Set 1", "Set 2"], style=wx.LB_SINGLE)
|
|
445
|
+
|
|
446
|
+
bitmap_check = wx.Bitmap(os.path.normpath(os.path.join(bitmapDir, "checked.ico")), wx.BITMAP_TYPE_ICO)
|
|
447
|
+
bitmap_uncheck = wx.Bitmap(os.path.normpath(os.path.join(bitmapDir, "notchecked.ico")), wx.BITMAP_TYPE_ICO)
|
|
448
|
+
bitmap_flag = wx.Bitmap(os.path.normpath(os.path.join(bitmapDir, "flagged.ico")), wx.BITMAP_TYPE_ICO)
|
|
449
|
+
bitmap_unflag = wx.Bitmap(os.path.normpath(os.path.join(bitmapDir, "notflagged.ico")), wx.BITMAP_TYPE_ICO)
|
|
450
|
+
|
|
451
|
+
self.bitmap_check = wx.StaticBitmap(self, -1, bitmap_check)
|
|
452
|
+
self.bitmap_uncheck = wx.StaticBitmap(self, -1, bitmap_uncheck)
|
|
453
|
+
self.bitmap_flag = wx.StaticBitmap(self, -1, bitmap_flag)
|
|
454
|
+
self.bitmap_unflag = wx.StaticBitmap(self, -1, bitmap_unflag)
|
|
455
|
+
|
|
456
|
+
self.okbutton = wx.Button(self, wx.ID_OK)
|
|
457
|
+
self.cancelbutton = wx.Button(self, wx.ID_CANCEL)
|
|
458
|
+
|
|
459
|
+
self.parent = parent
|
|
460
|
+
|
|
461
|
+
self.SetProperties()
|
|
462
|
+
self.DoLayout()
|
|
463
|
+
|
|
464
|
+
self.Bind(wx.EVT_BUTTON, self.OnOk, self.okbutton)
|
|
465
|
+
self.Bind(wx.EVT_BUTTON, self.OnCancel, self.cancelbutton)
|
|
466
|
+
self.Bind(wx.EVT_LISTBOX, self.OnListBox, self.listicons)
|
|
467
|
+
|
|
468
|
+
|
|
469
|
+
def SetProperties(self):
|
|
470
|
+
|
|
471
|
+
self.SetTitle("Check/Radio Icon Selector")
|
|
472
|
+
self.listicons.SetSelection(0)
|
|
473
|
+
self.okbutton.SetDefault()
|
|
474
|
+
|
|
475
|
+
|
|
476
|
+
def DoLayout(self):
|
|
477
|
+
|
|
478
|
+
mainsizer = wx.BoxSizer(wx.VERTICAL)
|
|
479
|
+
bottomsizer = wx.BoxSizer(wx.HORIZONTAL)
|
|
480
|
+
topsizer = wx.BoxSizer(wx.HORIZONTAL)
|
|
481
|
+
rightsizer = wx.BoxSizer(wx.VERTICAL)
|
|
482
|
+
sizer_2 = wx.BoxSizer(wx.HORIZONTAL)
|
|
483
|
+
sizer_1 = wx.BoxSizer(wx.HORIZONTAL)
|
|
484
|
+
sizer_3 = wx.BoxSizer(wx.HORIZONTAL)
|
|
485
|
+
sizer_4 = wx.BoxSizer(wx.HORIZONTAL)
|
|
486
|
+
label_1 = wx.StaticText(self, -1, "Please Choose One Of These Sets Of Icons:")
|
|
487
|
+
label_1.SetFont(wx.Font(8, wx.FONTFAMILY_DEFAULT, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_BOLD, 0, ""))
|
|
488
|
+
mainsizer.Add(label_1, 0, wx.ALL|wx.ADJUST_MINSIZE, 10)
|
|
489
|
+
topsizer.Add(self.listicons, 0, wx.ALL|wx.EXPAND|wx.ADJUST_MINSIZE, 5)
|
|
490
|
+
label_2 = wx.StaticText(self, -1, "Checked")
|
|
491
|
+
sizer_1.Add(label_2, 0, wx.RIGHT|wx.ALIGN_CENTER_VERTICAL|wx.ADJUST_MINSIZE, 10)
|
|
492
|
+
sizer_1.Add((20, 20), 1, wx.ALIGN_RIGHT|wx.ADJUST_MINSIZE, 0)
|
|
493
|
+
sizer_1.Add(self.bitmap_check, 0, wx.RIGHT|wx.ALIGN_CENTER_VERTICAL|wx.ADJUST_MINSIZE, 10)
|
|
494
|
+
rightsizer.Add(sizer_1, 0, wx.EXPAND, 0)
|
|
495
|
+
label_3 = wx.StaticText(self, -1, "Not Checked")
|
|
496
|
+
sizer_2.Add(label_3, 0, wx.RIGHT|wx.ALIGN_CENTER_VERTICAL|wx.ADJUST_MINSIZE, 10)
|
|
497
|
+
sizer_2.Add((20, 20), 1, wx.ADJUST_MINSIZE, 0)
|
|
498
|
+
sizer_2.Add(self.bitmap_uncheck, 0, wx.RIGHT|wx.ALIGN_CENTER_VERTICAL|wx.ADJUST_MINSIZE, 10)
|
|
499
|
+
rightsizer.Add(sizer_2, 0, wx.EXPAND, 0)
|
|
500
|
+
label_4 = wx.StaticText(self, -1, "Flagged")
|
|
501
|
+
sizer_3.Add(label_4, 0, wx.RIGHT|wx.ALIGN_CENTER_VERTICAL|wx.ADJUST_MINSIZE, 10)
|
|
502
|
+
sizer_3.Add((20, 20), 1, wx.ADJUST_MINSIZE, 0)
|
|
503
|
+
sizer_3.Add(self.bitmap_flag, 0, wx.RIGHT|wx.ALIGN_CENTER_VERTICAL|wx.ADJUST_MINSIZE, 10)
|
|
504
|
+
rightsizer.Add(sizer_3, 0, wx.EXPAND, 0)
|
|
505
|
+
label_5 = wx.StaticText(self, -1, "Not Flagged")
|
|
506
|
+
sizer_4.Add(label_5, 0, wx.RIGHT|wx.ALIGN_CENTER_VERTICAL|wx.ADJUST_MINSIZE, 10)
|
|
507
|
+
sizer_4.Add((20, 20), 1, wx.ADJUST_MINSIZE, 0)
|
|
508
|
+
sizer_4.Add(self.bitmap_unflag, 0, wx.RIGHT|wx.ALIGN_CENTER_VERTICAL|wx.ADJUST_MINSIZE, 10)
|
|
509
|
+
rightsizer.Add(sizer_4, 0, wx.EXPAND, 0)
|
|
510
|
+
|
|
511
|
+
topsizer.Add(rightsizer, 0, wx.ALL|wx.EXPAND, 5)
|
|
512
|
+
mainsizer.Add(topsizer, 1, wx.EXPAND, 0)
|
|
513
|
+
bottomsizer.Add(self.okbutton, 0, wx.ALL|wx.ADJUST_MINSIZE, 20)
|
|
514
|
+
bottomsizer.Add((20, 20), 1, wx.ADJUST_MINSIZE, 0)
|
|
515
|
+
bottomsizer.Add(self.cancelbutton, 0, wx.ALL|wx.ADJUST_MINSIZE, 20)
|
|
516
|
+
mainsizer.Add(bottomsizer, 0, wx.EXPAND, 0)
|
|
517
|
+
self.SetAutoLayout(True)
|
|
518
|
+
self.SetSizer(mainsizer)
|
|
519
|
+
mainsizer.Fit(self)
|
|
520
|
+
mainsizer.SetSizeHints(self)
|
|
521
|
+
self.Layout()
|
|
522
|
+
|
|
523
|
+
|
|
524
|
+
def OnListBox(self, event):
|
|
525
|
+
|
|
526
|
+
selection = self.listicons.GetSelection()
|
|
527
|
+
|
|
528
|
+
if selection == 0:
|
|
529
|
+
bitmap_check = os.path.normpath(os.path.join(bitmapDir, "checked.ico"))
|
|
530
|
+
bitmap_uncheck = os.path.normpath(os.path.join(bitmapDir, "notchecked.ico"))
|
|
531
|
+
bitmap_flag = os.path.normpath(os.path.join(bitmapDir, "flagged.ico"))
|
|
532
|
+
bitmap_unflag = os.path.normpath(os.path.join(bitmapDir, "notflagged.ico"))
|
|
533
|
+
else:
|
|
534
|
+
bitmap_check = os.path.normpath(os.path.join(bitmapDir, "aquachecked.ico"))
|
|
535
|
+
bitmap_uncheck = os.path.normpath(os.path.join(bitmapDir, "aquanotchecked.ico"))
|
|
536
|
+
bitmap_flag = os.path.normpath(os.path.join(bitmapDir, "aquaflagged.ico"))
|
|
537
|
+
bitmap_unflag = os.path.normpath(os.path.join(bitmapDir, "aquanotflagged.ico"))
|
|
538
|
+
|
|
539
|
+
bitmap_check = wx.Bitmap(bitmap_check, wx.BITMAP_TYPE_ICO)
|
|
540
|
+
bitmap_uncheck = wx.Bitmap(bitmap_uncheck, wx.BITMAP_TYPE_ICO)
|
|
541
|
+
bitmap_flag = wx.Bitmap(bitmap_flag, wx.BITMAP_TYPE_ICO)
|
|
542
|
+
bitmap_unflag = wx.Bitmap(bitmap_unflag, wx.BITMAP_TYPE_ICO)
|
|
543
|
+
|
|
544
|
+
self.bitmap_uncheck.SetBitmap(bitmap_uncheck)
|
|
545
|
+
self.bitmap_check.SetBitmap(bitmap_check)
|
|
546
|
+
self.bitmap_unflag.SetBitmap(bitmap_unflag)
|
|
547
|
+
self.bitmap_flag.SetBitmap(bitmap_flag)
|
|
548
|
+
|
|
549
|
+
self.bitmap_check.Refresh()
|
|
550
|
+
self.bitmap_uncheck.Refresh()
|
|
551
|
+
self.bitmap_flag.Refresh()
|
|
552
|
+
self.bitmap_unflag.Refresh()
|
|
553
|
+
|
|
554
|
+
event.Skip()
|
|
555
|
+
|
|
556
|
+
|
|
557
|
+
def OnOk(self, event):
|
|
558
|
+
|
|
559
|
+
selection = self.listicons.GetSelection()
|
|
560
|
+
self.parent.SetCheckRadio(selection)
|
|
561
|
+
self.Destroy()
|
|
562
|
+
event.Skip()
|
|
563
|
+
|
|
564
|
+
|
|
565
|
+
def OnCancel(self, event):
|
|
566
|
+
|
|
567
|
+
self.Destroy()
|
|
568
|
+
event.Skip()
|
|
569
|
+
|
|
570
|
+
|
|
571
|
+
#---------------------------------------------------------------------------
|
|
572
|
+
# Just A Dialog To Select Tree Items Icons
|
|
573
|
+
#---------------------------------------------------------------------------
|
|
574
|
+
class TreeIcons(wx.Dialog):
|
|
575
|
+
|
|
576
|
+
def __init__(self, parent=None, id=-1, title="", pos=wx.DefaultPosition,
|
|
577
|
+
size=wx.DefaultSize, style=wx.DEFAULT_DIALOG_STYLE, oldpen=None,
|
|
578
|
+
bitmaps=None):
|
|
579
|
+
|
|
580
|
+
wx.Dialog.__init__(self, parent, id, title, pos, size, style)
|
|
581
|
+
|
|
582
|
+
self.bitmaps = [None, None, None, None]
|
|
583
|
+
empty = wx.Bitmap(16, 16)
|
|
584
|
+
self.parent = parent
|
|
585
|
+
|
|
586
|
+
self.bitmaps[0] = wx.StaticBitmap(self, -1, empty)
|
|
587
|
+
self.combonormal = wx.ComboBox(self, -1, choices=ArtIDs, style=wx.CB_DROPDOWN|wx.CB_READONLY)
|
|
588
|
+
self.bitmaps[1] = wx.StaticBitmap(self, -1, empty)
|
|
589
|
+
self.comboselected = wx.ComboBox(self, -1, choices=ArtIDs, style=wx.CB_DROPDOWN|wx.CB_READONLY)
|
|
590
|
+
self.bitmaps[2] = wx.StaticBitmap(self, -1, empty)
|
|
591
|
+
self.comboexpanded = wx.ComboBox(self, -1, choices=ArtIDs, style=wx.CB_DROPDOWN|wx.CB_READONLY)
|
|
592
|
+
self.bitmaps[3] = wx.StaticBitmap(self, -1, empty)
|
|
593
|
+
self.comboselectedexpanded = wx.ComboBox(self, -1, choices=ArtIDs, style=wx.CB_DROPDOWN|wx.CB_READONLY)
|
|
594
|
+
self.okbutton = wx.Button(self, wx.ID_OK)
|
|
595
|
+
self.cancelbutton = wx.Button(self, wx.ID_CANCEL)
|
|
596
|
+
|
|
597
|
+
self.combonormal.SetSelection(bitmaps[0] >= 0 and bitmaps[0]+1 or 0)
|
|
598
|
+
self.comboselected.SetSelection(bitmaps[1] >= 0 and bitmaps[1]+1 or 0)
|
|
599
|
+
self.comboexpanded.SetSelection(bitmaps[2] >= 0 and bitmaps[2]+1 or 0)
|
|
600
|
+
self.comboselectedexpanded.SetSelection(bitmaps[3] >= 0 and bitmaps[3]+1 or 0)
|
|
601
|
+
|
|
602
|
+
self.GetBitmaps(bitmaps)
|
|
603
|
+
|
|
604
|
+
self.SetProperties()
|
|
605
|
+
self.DoLayout()
|
|
606
|
+
|
|
607
|
+
self.Bind(wx.EVT_COMBOBOX, self.OnComboNormal, self.combonormal)
|
|
608
|
+
self.Bind(wx.EVT_COMBOBOX, self.OnComboSelected, self.comboselected)
|
|
609
|
+
self.Bind(wx.EVT_COMBOBOX, self.OnComboExpanded, self.comboexpanded)
|
|
610
|
+
self.Bind(wx.EVT_COMBOBOX, self.OnComboSelectedExpanded, self.comboselectedexpanded)
|
|
611
|
+
self.Bind(wx.EVT_BUTTON, self.OnOk, self.okbutton)
|
|
612
|
+
self.Bind(wx.EVT_BUTTON, self.OnCancel, self.cancelbutton)
|
|
613
|
+
|
|
614
|
+
|
|
615
|
+
def SetProperties(self):
|
|
616
|
+
|
|
617
|
+
self.SetTitle("Item Icon Selector")
|
|
618
|
+
self.okbutton.SetDefault()
|
|
619
|
+
|
|
620
|
+
|
|
621
|
+
def DoLayout(self):
|
|
622
|
+
|
|
623
|
+
mainsizer = wx.BoxSizer(wx.VERTICAL)
|
|
624
|
+
sizer_2 = wx.BoxSizer(wx.HORIZONTAL)
|
|
625
|
+
gridsizer = wx.FlexGridSizer(4, 3, 5, 5)
|
|
626
|
+
label_1 = wx.StaticText(self, -1, "Please Choose The Icons For This Item (All Are Optional):")
|
|
627
|
+
label_1.SetFont(wx.Font(8, wx.FONTFAMILY_DEFAULT, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_BOLD, 0, ""))
|
|
628
|
+
mainsizer.Add(label_1, 0, wx.ALL|wx.ADJUST_MINSIZE, 10)
|
|
629
|
+
label_2 = wx.StaticText(self, -1, "TreeIcon_Normal:")
|
|
630
|
+
gridsizer.Add(label_2, 0, wx.LEFT|wx.ALIGN_CENTER_VERTICAL|wx.ADJUST_MINSIZE, 5)
|
|
631
|
+
gridsizer.Add(self.bitmaps[0], 0, wx.LEFT|wx.RIGHT|wx.ALIGN_CENTER_VERTICAL|wx.ADJUST_MINSIZE, 5)
|
|
632
|
+
gridsizer.Add(self.combonormal, 0, wx.ALIGN_CENTER_VERTICAL|wx.ADJUST_MINSIZE, 0)
|
|
633
|
+
label_3 = wx.StaticText(self, -1, "TreeIcon_Selected:")
|
|
634
|
+
gridsizer.Add(label_3, 0, wx.LEFT|wx.ALIGN_CENTER_VERTICAL|wx.ADJUST_MINSIZE, 5)
|
|
635
|
+
gridsizer.Add(self.bitmaps[1], 0, wx.LEFT|wx.RIGHT|wx.ALIGN_CENTER_VERTICAL|wx.ADJUST_MINSIZE, 5)
|
|
636
|
+
gridsizer.Add(self.comboselected, 0, wx.ALIGN_CENTER_VERTICAL|wx.ADJUST_MINSIZE, 0)
|
|
637
|
+
label_4 = wx.StaticText(self, -1, "TreeIcon_Expanded:")
|
|
638
|
+
gridsizer.Add(label_4, 0, wx.LEFT|wx.ALIGN_CENTER_VERTICAL|wx.ADJUST_MINSIZE, 5)
|
|
639
|
+
gridsizer.Add(self.bitmaps[2], 0, wx.LEFT|wx.RIGHT|wx.ALIGN_CENTER_VERTICAL|wx.ADJUST_MINSIZE, 5)
|
|
640
|
+
gridsizer.Add(self.comboexpanded, 0, wx.ALIGN_CENTER_VERTICAL|wx.ADJUST_MINSIZE, 0)
|
|
641
|
+
label_5 = wx.StaticText(self, -1, "TreeIcon_SelectedExpanded:")
|
|
642
|
+
gridsizer.Add(label_5, 0, wx.LEFT|wx.ALIGN_CENTER_VERTICAL|wx.ADJUST_MINSIZE, 5)
|
|
643
|
+
gridsizer.Add(self.bitmaps[3], 0, wx.LEFT|wx.RIGHT|wx.ALIGN_CENTER_VERTICAL|wx.ADJUST_MINSIZE, 5)
|
|
644
|
+
gridsizer.Add(self.comboselectedexpanded, 0, wx.ALIGN_CENTER_VERTICAL|wx.ADJUST_MINSIZE, 0)
|
|
645
|
+
gridsizer.AddGrowableCol(0)
|
|
646
|
+
gridsizer.AddGrowableCol(1)
|
|
647
|
+
gridsizer.AddGrowableCol(2)
|
|
648
|
+
mainsizer.Add(gridsizer, 0, wx.ALL|wx.EXPAND, 5)
|
|
649
|
+
sizer_2.Add(self.okbutton, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL|wx.ADJUST_MINSIZE, 20)
|
|
650
|
+
sizer_2.Add((20, 20), 1, wx.ADJUST_MINSIZE, 0)
|
|
651
|
+
sizer_2.Add(self.cancelbutton, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL|wx.ADJUST_MINSIZE, 20)
|
|
652
|
+
mainsizer.Add(sizer_2, 1, wx.EXPAND, 0)
|
|
653
|
+
self.SetAutoLayout(True)
|
|
654
|
+
self.SetSizer(mainsizer)
|
|
655
|
+
mainsizer.Fit(self)
|
|
656
|
+
mainsizer.SetSizeHints(self)
|
|
657
|
+
self.Layout()
|
|
658
|
+
self.Centre()
|
|
659
|
+
|
|
660
|
+
|
|
661
|
+
def OnComboNormal(self, event):
|
|
662
|
+
|
|
663
|
+
input = event.GetSelection()
|
|
664
|
+
self.GetBitmap(input, 0)
|
|
665
|
+
event.Skip()
|
|
666
|
+
|
|
667
|
+
|
|
668
|
+
def OnComboSelected(self, event):
|
|
669
|
+
|
|
670
|
+
input = event.GetSelection()
|
|
671
|
+
self.GetBitmap(input, 1)
|
|
672
|
+
event.Skip()
|
|
673
|
+
|
|
674
|
+
|
|
675
|
+
def OnComboExpanded(self, event):
|
|
676
|
+
|
|
677
|
+
input = event.GetSelection()
|
|
678
|
+
self.GetBitmap(input, 2)
|
|
679
|
+
event.Skip()
|
|
680
|
+
|
|
681
|
+
|
|
682
|
+
def OnComboSelectedExpanded(self, event):
|
|
683
|
+
|
|
684
|
+
input = event.GetSelection()
|
|
685
|
+
self.GetBitmap(input, 3)
|
|
686
|
+
event.Skip()
|
|
687
|
+
|
|
688
|
+
|
|
689
|
+
def OnOk(self, event):
|
|
690
|
+
|
|
691
|
+
bitmaps = [-1, -1, -1, -1]
|
|
692
|
+
normal = self.combonormal.GetSelection()
|
|
693
|
+
selected = self.comboselected.GetSelection()
|
|
694
|
+
expanded = self.comboexpanded.GetSelection()
|
|
695
|
+
selexp = self.comboselectedexpanded.GetSelection()
|
|
696
|
+
|
|
697
|
+
bitmaps = [(normal > 0 and normal or -1), (selected > 0 and selected or -1),
|
|
698
|
+
(expanded > 0 and expanded or -1), (selexp > 0 and selexp or -1)]
|
|
699
|
+
|
|
700
|
+
newbitmaps = []
|
|
701
|
+
|
|
702
|
+
for bmp in bitmaps:
|
|
703
|
+
if bmp > 0:
|
|
704
|
+
newbitmaps.append(bmp-1)
|
|
705
|
+
else:
|
|
706
|
+
newbitmaps.append(bmp)
|
|
707
|
+
|
|
708
|
+
self.parent.SetNewIcons(newbitmaps)
|
|
709
|
+
|
|
710
|
+
self.Destroy()
|
|
711
|
+
event.Skip()
|
|
712
|
+
|
|
713
|
+
|
|
714
|
+
def OnCancel(self, event):
|
|
715
|
+
|
|
716
|
+
self.Destroy()
|
|
717
|
+
event.Skip()
|
|
718
|
+
|
|
719
|
+
|
|
720
|
+
def GetBitmap(self, input, which):
|
|
721
|
+
|
|
722
|
+
if input == 0:
|
|
723
|
+
bmp = wx.Bitmap(16,16)
|
|
724
|
+
self.ClearBmp(bmp)
|
|
725
|
+
elif input > 36:
|
|
726
|
+
bmp = images.Smiles.GetBitmap()
|
|
727
|
+
else:
|
|
728
|
+
bmp = wx.ArtProvider.GetBitmap(eval(ArtIDs[input]), wx.ART_OTHER, (16,16))
|
|
729
|
+
if not bmp.IsOk():
|
|
730
|
+
bmp = wx.Bitmap(16,16)
|
|
731
|
+
self.ClearBmp(bmp)
|
|
732
|
+
|
|
733
|
+
self.bitmaps[which].SetBitmap(bmp)
|
|
734
|
+
self.bitmaps[which].Refresh()
|
|
735
|
+
|
|
736
|
+
|
|
737
|
+
def GetBitmaps(self, bitmaps):
|
|
738
|
+
|
|
739
|
+
output = []
|
|
740
|
+
|
|
741
|
+
for count, input in enumerate(bitmaps):
|
|
742
|
+
if input < 0:
|
|
743
|
+
bmp = wx.Bitmap(16,16)
|
|
744
|
+
self.ClearBmp(bmp)
|
|
745
|
+
elif input > 35:
|
|
746
|
+
bmp = images.Smiles.GetBitmap()
|
|
747
|
+
else:
|
|
748
|
+
bmp = wx.ArtProvider.GetBitmap(eval(ArtIDs[input+1]), wx.ART_OTHER, (16,16))
|
|
749
|
+
if not bmp.IsOk():
|
|
750
|
+
bmp = wx.Bitmap(16,16)
|
|
751
|
+
self.ClearBmp(bmp)
|
|
752
|
+
|
|
753
|
+
self.bitmaps[count].SetBitmap(bmp)
|
|
754
|
+
|
|
755
|
+
|
|
756
|
+
def ClearBmp(self, bmp):
|
|
757
|
+
|
|
758
|
+
dc = wx.MemoryDC()
|
|
759
|
+
dc.SelectObject(bmp)
|
|
760
|
+
dc.SetBackground(wx.Brush("white"))
|
|
761
|
+
dc.Clear()
|
|
762
|
+
|
|
763
|
+
|
|
764
|
+
#---------------------------------------------------------------------------
|
|
765
|
+
# CustomTreeCtrl Demo Implementation
|
|
766
|
+
#---------------------------------------------------------------------------
|
|
767
|
+
class CustomTreeCtrlDemo(wx.Panel):
|
|
768
|
+
|
|
769
|
+
def __init__(self, parent, log):
|
|
770
|
+
wx.Panel.__init__(self, parent)
|
|
771
|
+
|
|
772
|
+
self.log = log
|
|
773
|
+
self.oldicons = 0
|
|
774
|
+
|
|
775
|
+
splitter = wx.SplitterWindow(self, -1, style=wx.CLIP_CHILDREN | wx.SP_LIVE_UPDATE | wx.SP_3D)
|
|
776
|
+
|
|
777
|
+
# Create the CustomTreeCtrl, using a derived class defined below
|
|
778
|
+
self.tree = CustomTreeCtrl(splitter, -1, log=self.log,
|
|
779
|
+
style=wx.SUNKEN_BORDER,
|
|
780
|
+
agwStyle=CT.TR_HAS_BUTTONS | CT.TR_HAS_VARIABLE_ROW_HEIGHT)
|
|
781
|
+
|
|
782
|
+
self.leftpanel = wx.ScrolledWindow(splitter, -1, style=wx.SUNKEN_BORDER)
|
|
783
|
+
self.leftpanel.SetScrollRate(20,20)
|
|
784
|
+
width = self.PopulateLeftPanel(self.tree.styles, self.tree.events)
|
|
785
|
+
|
|
786
|
+
# add the windows to the splitter and split it.
|
|
787
|
+
splitter.SplitVertically(self.leftpanel, self.tree, 300)
|
|
788
|
+
splitter.SetMinimumPaneSize(width+5)
|
|
789
|
+
|
|
790
|
+
sizer = wx.BoxSizer()
|
|
791
|
+
sizer.Add(splitter, 1, wx.EXPAND)
|
|
792
|
+
self.SetSizer(sizer)
|
|
793
|
+
|
|
794
|
+
self.leftimagelist = wx.ImageList(12, 12)
|
|
795
|
+
for ids in range(1, len(ArtIDs)-1):
|
|
796
|
+
bmp = wx.ArtProvider.GetBitmap(eval(ArtIDs[ids]), wx.ART_OTHER, (12, 12))
|
|
797
|
+
self.leftimagelist.Add(bmp)
|
|
798
|
+
|
|
799
|
+
|
|
800
|
+
def PopulateLeftPanel(self, styles, events):
|
|
801
|
+
|
|
802
|
+
pnl = wx.Panel(self.leftpanel)
|
|
803
|
+
mainsizer = wx.BoxSizer(wx.VERTICAL)
|
|
804
|
+
recreatetree = wx.Button(pnl, -1, "Recreate CustomTreeCtrl")
|
|
805
|
+
mainsizer.Add(recreatetree, 0, wx.ALL|wx.ALIGN_CENTER, 10)
|
|
806
|
+
recreatetree.Bind(wx.EVT_BUTTON, self.OnRecreateTree)
|
|
807
|
+
|
|
808
|
+
staticboxstyles = wx.StaticBox(pnl, -1, "CustomTreeCtrl Styles")
|
|
809
|
+
stylesizer = wx.StaticBoxSizer(staticboxstyles, wx.VERTICAL)
|
|
810
|
+
staticboxevents = wx.StaticBox(pnl, -1, "CustomTreeCtrl Events")
|
|
811
|
+
eventssizer = wx.StaticBoxSizer(staticboxevents, wx.VERTICAL)
|
|
812
|
+
staticboxcolours = wx.StaticBox(pnl, -1, "CustomTreeCtrl Images/Colours")
|
|
813
|
+
colourssizer = wx.StaticBoxSizer(staticboxcolours, wx.VERTICAL)
|
|
814
|
+
staticboxthemes = wx.StaticBox(pnl, -1, "CustomTreeCtrl Themes/Gradients")
|
|
815
|
+
themessizer = wx.StaticBoxSizer(staticboxthemes, wx.VERTICAL)
|
|
816
|
+
|
|
817
|
+
self.treestyles = []
|
|
818
|
+
self.treeevents = []
|
|
819
|
+
|
|
820
|
+
for count, style in enumerate(styles):
|
|
821
|
+
|
|
822
|
+
if count == 0:
|
|
823
|
+
tags = wx.ALL
|
|
824
|
+
else:
|
|
825
|
+
tags = wx.LEFT|wx.RIGHT|wx.BOTTOM
|
|
826
|
+
|
|
827
|
+
if style != "TR_DEFAULT_STYLE":
|
|
828
|
+
check = wx.CheckBox(pnl, -1, style)
|
|
829
|
+
stylesizer.Add(check, 0, tags, 3)
|
|
830
|
+
|
|
831
|
+
if style in ["TR_HAS_BUTTONS", "TR_HAS_VARIABLE_ROW_HEIGHT"]:
|
|
832
|
+
check.SetValue(1)
|
|
833
|
+
|
|
834
|
+
if style == "TR_HAS_VARIABLE_ROW_HEIGHT":
|
|
835
|
+
check.Enable(False)
|
|
836
|
+
|
|
837
|
+
check.Bind(wx.EVT_CHECKBOX, self.OnCheckStyle)
|
|
838
|
+
self.treestyles.append(check)
|
|
839
|
+
|
|
840
|
+
for count, event in enumerate(events):
|
|
841
|
+
|
|
842
|
+
if count == 0:
|
|
843
|
+
tags = wx.ALL
|
|
844
|
+
else:
|
|
845
|
+
tags = wx.LEFT|wx.RIGHT|wx.BOTTOM
|
|
846
|
+
|
|
847
|
+
if count not in [6, 17, 22, 23]:
|
|
848
|
+
check = wx.CheckBox(pnl, -1, event)
|
|
849
|
+
eventssizer.Add(check, 0, tags, 3)
|
|
850
|
+
|
|
851
|
+
if event in ["EVT_TREE_ITEM_EXPANDED", "EVT_TREE_ITEM_EXPANDING", "EVT_TREE_ITEM_COLLAPSED",
|
|
852
|
+
"EVT_TREE_ITEM_COLLAPSING", "EVT_TREE_SEL_CHANGED", "EVT_TREE_SEL_CHANGING"]:
|
|
853
|
+
|
|
854
|
+
check.SetValue(1)
|
|
855
|
+
|
|
856
|
+
check.Bind(wx.EVT_CHECKBOX, self.OnCheckEvent)
|
|
857
|
+
self.treeevents.append(check)
|
|
858
|
+
|
|
859
|
+
sizer1 = wx.BoxSizer(wx.HORIZONTAL)
|
|
860
|
+
label = wx.StaticText(pnl, -1, "Connection Pen")
|
|
861
|
+
font = label.GetFont()
|
|
862
|
+
font.SetWeight(wx.FONTWEIGHT_BOLD)
|
|
863
|
+
label.SetFont(font)
|
|
864
|
+
buttonconnection = wx.Button(pnl, -1, "Choose...")
|
|
865
|
+
buttonconnection.Bind(wx.EVT_BUTTON, self.OnButtonConnection)
|
|
866
|
+
sizer1.Add(label, 0, wx.ALL|wx.ALIGN_CENTER, 5)
|
|
867
|
+
sizer1.Add((1,0), 1, wx.EXPAND)
|
|
868
|
+
sizer1.Add(buttonconnection, 0, wx.ALL, 5)
|
|
869
|
+
|
|
870
|
+
sizer2 = wx.BoxSizer(wx.HORIZONTAL)
|
|
871
|
+
label = wx.StaticText(pnl, -1, "Border Pen")
|
|
872
|
+
font = label.GetFont()
|
|
873
|
+
font.SetWeight(wx.FONTWEIGHT_BOLD)
|
|
874
|
+
label.SetFont(font)
|
|
875
|
+
buttonborder = wx.Button(pnl, -1, "Choose...")
|
|
876
|
+
buttonborder.Bind(wx.EVT_BUTTON, self.OnButtonBorder)
|
|
877
|
+
sizer2.Add(label, 0, wx.LEFT|wx.RIGHT|wx.BOTTOM|wx.ALIGN_CENTER, 5)
|
|
878
|
+
sizer2.Add((1,0), 1, wx.EXPAND)
|
|
879
|
+
sizer2.Add(buttonborder, 0, wx.LEFT|wx.RIGHT|wx.BOTTOM, 5)
|
|
880
|
+
|
|
881
|
+
sizer3 = wx.BoxSizer(wx.HORIZONTAL)
|
|
882
|
+
label = wx.StaticText(pnl, -1, "Tree Buttons")
|
|
883
|
+
font = label.GetFont()
|
|
884
|
+
font.SetWeight(wx.FONTWEIGHT_BOLD)
|
|
885
|
+
label.SetFont(font)
|
|
886
|
+
buttontree = wx.Button(pnl, -1, "Choose...")
|
|
887
|
+
buttontree.Bind(wx.EVT_BUTTON, self.OnButtonTree)
|
|
888
|
+
sizer3.Add(label, 0, wx.LEFT|wx.RIGHT|wx.BOTTOM|wx.ALIGN_CENTER, 5)
|
|
889
|
+
sizer3.Add((1,0), 1, wx.EXPAND)
|
|
890
|
+
sizer3.Add(buttontree, 0, wx.LEFT|wx.RIGHT|wx.BOTTOM, 5)
|
|
891
|
+
|
|
892
|
+
sizer4 = wx.BoxSizer(wx.HORIZONTAL)
|
|
893
|
+
label = wx.StaticText(pnl, -1, "Check/Radio Buttons")
|
|
894
|
+
font = label.GetFont()
|
|
895
|
+
font.SetWeight(wx.FONTWEIGHT_BOLD)
|
|
896
|
+
label.SetFont(font)
|
|
897
|
+
buttoncr = wx.Button(pnl, -1, "Choose...")
|
|
898
|
+
buttoncr.Bind(wx.EVT_BUTTON, self.OnButtonCheckRadio)
|
|
899
|
+
sizer4.Add(label, 0, wx.LEFT|wx.RIGHT|wx.BOTTOM|wx.ALIGN_CENTER, 5)
|
|
900
|
+
sizer4.Add((1,0), 1, wx.EXPAND)
|
|
901
|
+
sizer4.Add(buttoncr, 0, wx.LEFT|wx.RIGHT|wx.BOTTOM, 5)
|
|
902
|
+
|
|
903
|
+
sizer5 = wx.BoxSizer(wx.HORIZONTAL)
|
|
904
|
+
radioimage = wx.RadioButton(pnl, -1, "Image Background", style=wx.RB_GROUP)
|
|
905
|
+
radioimage.Bind(wx.EVT_RADIOBUTTON, self.OnBackgroundImage)
|
|
906
|
+
self.imagebutton = wx.Button(pnl, -1, "Choose...")
|
|
907
|
+
self.imagebutton.Bind(wx.EVT_BUTTON, self.OnChooseImage)
|
|
908
|
+
sizer5.Add(radioimage, 0, wx.ALL|wx.ALIGN_CENTER, 5)
|
|
909
|
+
sizer5.Add((1,0), 1, wx.EXPAND)
|
|
910
|
+
sizer5.Add(self.imagebutton, 0, wx.ALL, 5)
|
|
911
|
+
|
|
912
|
+
sizer6 = wx.BoxSizer(wx.HORIZONTAL)
|
|
913
|
+
radiobackground = wx.RadioButton(pnl, -1, "Background Colour")
|
|
914
|
+
radiobackground.Bind(wx.EVT_RADIOBUTTON, self.OnBackgroundColour)
|
|
915
|
+
self.backbutton = csel.ColourSelect(pnl, -1, "Choose...", wx.WHITE)
|
|
916
|
+
self.backbutton.Bind(csel.EVT_COLOURSELECT, self.OnChooseBackground)
|
|
917
|
+
sizer6.Add(radiobackground, 0, wx.LEFT|wx.RIGHT|wx.BOTTOM|wx.ALIGN_CENTER, 5)
|
|
918
|
+
sizer6.Add((1,0), 1, wx.EXPAND)
|
|
919
|
+
sizer6.Add(self.backbutton, 0, wx.LEFT|wx.RIGHT|wx.BOTTOM|wx.ALIGN_CENTER, 5)
|
|
920
|
+
|
|
921
|
+
leftimagelist = wx.CheckBox(pnl, -1, "Use Left ImageList")
|
|
922
|
+
leftimagelist.Bind(wx.EVT_CHECKBOX, self.OnLeftImageList)
|
|
923
|
+
|
|
924
|
+
self.windowposition = wx.CheckBox(pnl, -1, "Use Image Window Left of Label")
|
|
925
|
+
self.windowposition.Bind(wx.EVT_CHECKBOX, self.OnWindowPos)
|
|
926
|
+
|
|
927
|
+
colourssizer.Add(sizer1, 0, wx.EXPAND)
|
|
928
|
+
colourssizer.Add(sizer2, 0, wx.EXPAND)
|
|
929
|
+
colourssizer.Add(sizer3, 0, wx.EXPAND)
|
|
930
|
+
colourssizer.Add(sizer4, 0, wx.EXPAND)
|
|
931
|
+
colourssizer.Add(sizer5, 0, wx.EXPAND)
|
|
932
|
+
colourssizer.Add(sizer6, 0, wx.EXPAND)
|
|
933
|
+
colourssizer.Add(leftimagelist, 0, wx.ALL, 5)
|
|
934
|
+
colourssizer.Add(self.windowposition, 0, wx.ALL, 5)
|
|
935
|
+
|
|
936
|
+
sizera = wx.BoxSizer(wx.HORIZONTAL)
|
|
937
|
+
self.checknormal = wx.CheckBox(pnl, -1, "Standard Colours")
|
|
938
|
+
self.focus = csel.ColourSelect(pnl, -1, "Focus",
|
|
939
|
+
self.tree.GetHilightFocusColour())
|
|
940
|
+
self.unfocus = csel.ColourSelect(pnl, -1, "Non-Focus",
|
|
941
|
+
self.tree.GetHilightNonFocusColour())
|
|
942
|
+
self.checknormal.Bind(wx.EVT_CHECKBOX, self.OnCheckNormal)
|
|
943
|
+
self.focus.Bind(csel.EVT_COLOURSELECT, self.OnFocusColour)
|
|
944
|
+
self.unfocus.Bind(csel.EVT_COLOURSELECT, self.OnNonFocusColour)
|
|
945
|
+
sizera1 = wx.BoxSizer(wx.VERTICAL)
|
|
946
|
+
sizera1.Add(self.focus, 0, wx.BOTTOM, 2)
|
|
947
|
+
sizera1.Add(self.unfocus, 0)
|
|
948
|
+
sizera.Add(self.checknormal, 0, wx.ALL, 3)
|
|
949
|
+
sizera.Add((1, 0), 1, wx.EXPAND)
|
|
950
|
+
sizera.Add(sizera1, 0, wx.ALL|wx.EXPAND, 3)
|
|
951
|
+
|
|
952
|
+
sizerb = wx.BoxSizer(wx.VERTICAL)
|
|
953
|
+
self.checkgradient = wx.CheckBox(pnl, -1, "Gradient Theme")
|
|
954
|
+
self.checkgradient.Bind(wx.EVT_CHECKBOX, self.OnCheckGradient)
|
|
955
|
+
sizerb1 = wx.BoxSizer(wx.HORIZONTAL)
|
|
956
|
+
sizerb1.Add((10, 0))
|
|
957
|
+
self.radiohorizontal = wx.RadioButton(pnl, -1, "Horizontal", style=wx.RB_GROUP)
|
|
958
|
+
self.radiohorizontal.Bind(wx.EVT_RADIOBUTTON, self.OnHorizontal)
|
|
959
|
+
sizerb1.Add(self.radiohorizontal, 0, wx.TOP|wx.BOTTOM, 3)
|
|
960
|
+
sizerb2 = wx.BoxSizer(wx.HORIZONTAL)
|
|
961
|
+
sizerb2.Add((10, 0))
|
|
962
|
+
self.radiovertical = wx.RadioButton(pnl, -1, "Vertical")
|
|
963
|
+
self.radiovertical.Bind(wx.EVT_RADIOBUTTON, self.OnVertical)
|
|
964
|
+
sizerb2.Add(self.radiovertical, 0, wx.BOTTOM, 3)
|
|
965
|
+
sizerb3 = wx.BoxSizer(wx.HORIZONTAL)
|
|
966
|
+
self.firstcolour = csel.ColourSelect(pnl, -1, "First Colour",
|
|
967
|
+
self.tree.GetFirstGradientColour())
|
|
968
|
+
self.secondcolour = csel.ColourSelect(pnl, -1, "Second Colour",
|
|
969
|
+
self.tree.GetSecondGradientColour())
|
|
970
|
+
self.firstcolour.Bind(csel.EVT_COLOURSELECT, self.OnFirstColour)
|
|
971
|
+
self.secondcolour.Bind(csel.EVT_COLOURSELECT, self.OnSecondColour)
|
|
972
|
+
sizerb3.Add(self.firstcolour, 0, wx.TOP|wx.BOTTOM, 3)
|
|
973
|
+
sizerb3.Add(self.secondcolour, 0, wx.LEFT|wx.TOP|wx.BOTTOM, 3)
|
|
974
|
+
sizerb.Add(self.checkgradient, 0, wx.ALL, 3)
|
|
975
|
+
sizerb.Add(sizerb1, 0)
|
|
976
|
+
sizerb.Add(sizerb2, 0)
|
|
977
|
+
sizerb.Add(sizerb3, 0, wx.ALIGN_CENTER)
|
|
978
|
+
|
|
979
|
+
self.checkvista = wx.CheckBox(pnl, -1, "Windows Vista Theme")
|
|
980
|
+
self.checkvista.Bind(wx.EVT_CHECKBOX, self.OnVista)
|
|
981
|
+
|
|
982
|
+
self.dragFullScreen = wx.CheckBox(pnl, -1, "Fullscreen Drag/Drop")
|
|
983
|
+
self.dragFullScreen.Bind(wx.EVT_CHECKBOX, self.OnDragFullScreen)
|
|
984
|
+
|
|
985
|
+
themessizer.Add(sizera, 0, wx.EXPAND)
|
|
986
|
+
themessizer.Add(sizerb, 0, wx.EXPAND)
|
|
987
|
+
themessizer.Add((0, 5))
|
|
988
|
+
themessizer.Add(self.checkvista, 0, wx.EXPAND|wx.ALL, 3)
|
|
989
|
+
themessizer.Add(self.dragFullScreen, 0, wx.EXPAND|wx.ALL, 3)
|
|
990
|
+
|
|
991
|
+
mainsizer.Add(stylesizer, 0, wx.EXPAND|wx.ALL, 5)
|
|
992
|
+
mainsizer.Add(colourssizer, 0, wx.EXPAND|wx.ALL, 5)
|
|
993
|
+
mainsizer.Add(themessizer, 0, wx.EXPAND|wx.ALL, 5)
|
|
994
|
+
mainsizer.Add(eventssizer, 0, wx.EXPAND|wx.ALL, 5)
|
|
995
|
+
|
|
996
|
+
pnl.SetSizer(mainsizer)
|
|
997
|
+
pnl.Fit()
|
|
998
|
+
|
|
999
|
+
swsizer = wx.BoxSizer(wx.VERTICAL)
|
|
1000
|
+
swsizer.Add(pnl, 0, wx.EXPAND)
|
|
1001
|
+
self.leftpanel.SetSizer(swsizer)
|
|
1002
|
+
swsizer.Layout()
|
|
1003
|
+
|
|
1004
|
+
radiobackground.SetValue(1)
|
|
1005
|
+
self.checknormal.SetValue(1)
|
|
1006
|
+
self.radiohorizontal.Enable(False)
|
|
1007
|
+
self.radiovertical.Enable(False)
|
|
1008
|
+
self.firstcolour.Enable(False)
|
|
1009
|
+
self.secondcolour.Enable(False)
|
|
1010
|
+
self.imagebutton.Enable(False)
|
|
1011
|
+
|
|
1012
|
+
return mainsizer.CalcMin().width + wx.SystemSettings.GetMetric(wx.SYS_VSCROLL_X)
|
|
1013
|
+
|
|
1014
|
+
|
|
1015
|
+
def OnRecreateTree(self, event):
|
|
1016
|
+
|
|
1017
|
+
splitter = self.tree.GetParent()
|
|
1018
|
+
newtree = CustomTreeCtrl(splitter, -1, log=self.log)
|
|
1019
|
+
splitter.ReplaceWindow(self.tree, newtree)
|
|
1020
|
+
self.tree.Destroy()
|
|
1021
|
+
self.tree = newtree
|
|
1022
|
+
# Todo: The settings in the leftpanel should be reset too
|
|
1023
|
+
# self.PopulateLeftPanel(self.tree.styles, self.tree.events) # Crashes on LeftImage selection
|
|
1024
|
+
|
|
1025
|
+
|
|
1026
|
+
def OnCheckStyle(self, event):
|
|
1027
|
+
|
|
1028
|
+
self.tree.ChangeStyle(self.treestyles)
|
|
1029
|
+
event.Skip()
|
|
1030
|
+
|
|
1031
|
+
|
|
1032
|
+
def OnCheckEvent(self, event):
|
|
1033
|
+
|
|
1034
|
+
obj = event.GetEventObject()
|
|
1035
|
+
self.tree.BindEvents(obj)
|
|
1036
|
+
|
|
1037
|
+
event.Skip()
|
|
1038
|
+
|
|
1039
|
+
|
|
1040
|
+
def OnButtonConnection(self, event):
|
|
1041
|
+
|
|
1042
|
+
pen = self.tree.GetConnectionPen()
|
|
1043
|
+
dlg = PenDialog(self, -1, oldpen=pen, pentype=0)
|
|
1044
|
+
|
|
1045
|
+
dlg.ShowModal()
|
|
1046
|
+
|
|
1047
|
+
event.Skip()
|
|
1048
|
+
|
|
1049
|
+
|
|
1050
|
+
def SetConnectionPen(self, pen):
|
|
1051
|
+
|
|
1052
|
+
self.tree.SetConnectionPen(pen)
|
|
1053
|
+
|
|
1054
|
+
|
|
1055
|
+
def OnButtonBorder(self, event):
|
|
1056
|
+
|
|
1057
|
+
pen = self.tree.GetBorderPen()
|
|
1058
|
+
dlg = PenDialog(self, -1, oldpen=pen, pentype=1)
|
|
1059
|
+
|
|
1060
|
+
dlg.ShowModal()
|
|
1061
|
+
event.Skip()
|
|
1062
|
+
|
|
1063
|
+
|
|
1064
|
+
def SetBorderPen(self, pen):
|
|
1065
|
+
|
|
1066
|
+
self.tree.SetBorderPen(pen)
|
|
1067
|
+
|
|
1068
|
+
|
|
1069
|
+
def OnButtonTree(self, event):
|
|
1070
|
+
|
|
1071
|
+
dlg = TreeButtonsDialog(self, -1, oldicons=self.oldicons)
|
|
1072
|
+
dlg.ShowModal()
|
|
1073
|
+
|
|
1074
|
+
event.Skip()
|
|
1075
|
+
|
|
1076
|
+
|
|
1077
|
+
def OnButtonCheckRadio(self, event):
|
|
1078
|
+
|
|
1079
|
+
dlg = CheckDialog(self, -1)
|
|
1080
|
+
dlg.ShowModal()
|
|
1081
|
+
|
|
1082
|
+
event.Skip()
|
|
1083
|
+
|
|
1084
|
+
|
|
1085
|
+
def SetTreeButtons(self, selection):
|
|
1086
|
+
|
|
1087
|
+
bitmap_plus = os.path.normpath(os.path.join(bitmapDir, "plus" + str(selection+1) + ".ico"))
|
|
1088
|
+
bitmap_minus = os.path.normpath(os.path.join(bitmapDir, "minus" + str(selection+1) + ".ico"))
|
|
1089
|
+
|
|
1090
|
+
bitmap = wx.Bitmap(bitmap_plus, wx.BITMAP_TYPE_ICO)
|
|
1091
|
+
width = bitmap.GetWidth()
|
|
1092
|
+
|
|
1093
|
+
il = wx.ImageList(width, width)
|
|
1094
|
+
|
|
1095
|
+
il.Add(wx.Bitmap(bitmap_plus, wx.BITMAP_TYPE_ICO))
|
|
1096
|
+
il.Add(wx.Bitmap(bitmap_plus, wx.BITMAP_TYPE_ICO))
|
|
1097
|
+
il.Add(wx.Bitmap(bitmap_minus, wx.BITMAP_TYPE_ICO))
|
|
1098
|
+
il.Add(wx.Bitmap(bitmap_minus, wx.BITMAP_TYPE_ICO))
|
|
1099
|
+
|
|
1100
|
+
self.il = il
|
|
1101
|
+
self.tree.SetButtonsImageList(il)
|
|
1102
|
+
|
|
1103
|
+
|
|
1104
|
+
def SetCheckRadio(self, selection):
|
|
1105
|
+
|
|
1106
|
+
if selection == 0:
|
|
1107
|
+
self.tree.SetImageListCheck(13, 13)
|
|
1108
|
+
else:
|
|
1109
|
+
bitmap_check = os.path.normpath(os.path.join(bitmapDir, "aquachecked.ico"))
|
|
1110
|
+
bitmap_uncheck = os.path.normpath(os.path.join(bitmapDir, "aquanotchecked.ico"))
|
|
1111
|
+
bitmap_flag = os.path.normpath(os.path.join(bitmapDir, "aquaflagged.ico"))
|
|
1112
|
+
bitmap_unflag = os.path.normpath(os.path.join(bitmapDir, "aquanotflagged.ico"))
|
|
1113
|
+
|
|
1114
|
+
il = wx.ImageList(16, 16)
|
|
1115
|
+
|
|
1116
|
+
il.Add(wx.Bitmap(bitmap_check, wx.BITMAP_TYPE_ICO))
|
|
1117
|
+
il.Add(wx.Bitmap(bitmap_uncheck, wx.BITMAP_TYPE_ICO))
|
|
1118
|
+
il.Add(wx.Bitmap(bitmap_flag, wx.BITMAP_TYPE_ICO))
|
|
1119
|
+
il.Add(wx.Bitmap(bitmap_unflag, wx.BITMAP_TYPE_ICO))
|
|
1120
|
+
self.tree.SetImageListCheck(16, 16, il)
|
|
1121
|
+
|
|
1122
|
+
|
|
1123
|
+
def OnBackgroundImage(self, event):
|
|
1124
|
+
|
|
1125
|
+
if hasattr(self, "backgroundimage"):
|
|
1126
|
+
self.tree.SetBackgroundImage(self.backgroundimage)
|
|
1127
|
+
|
|
1128
|
+
self.backbutton.Enable(False)
|
|
1129
|
+
self.imagebutton.Enable(True)
|
|
1130
|
+
|
|
1131
|
+
event.Skip()
|
|
1132
|
+
|
|
1133
|
+
|
|
1134
|
+
def OnChooseImage(self, event):
|
|
1135
|
+
|
|
1136
|
+
wildcard = "JPEG Files (*.jpg)|*.jpg|" \
|
|
1137
|
+
"Bitmap Files (*.bmp)|*.bmp|" \
|
|
1138
|
+
"PNG Files (*.png)|*.png|" \
|
|
1139
|
+
"Icon Files (*.ico)|*.ico|" \
|
|
1140
|
+
"GIF Files (*.gif)|*.gif|" \
|
|
1141
|
+
"All files (*.*)|*.*"
|
|
1142
|
+
|
|
1143
|
+
dlg = wx.FileDialog(self, "Choose An Image File", ".", "", wildcard, wx.FD_OPEN)
|
|
1144
|
+
|
|
1145
|
+
if dlg.ShowModal() == wx.ID_OK:
|
|
1146
|
+
path = dlg.GetPath()
|
|
1147
|
+
else:
|
|
1148
|
+
dlg.Destroy()
|
|
1149
|
+
return
|
|
1150
|
+
|
|
1151
|
+
dlg.Destroy()
|
|
1152
|
+
bitmap = wx.Bitmap(path, wx.BITMAP_TYPE_ANY)
|
|
1153
|
+
self.tree.SetBackgroundImage(bitmap)
|
|
1154
|
+
self.backgroundimage = bitmap
|
|
1155
|
+
|
|
1156
|
+
event.Skip()
|
|
1157
|
+
|
|
1158
|
+
|
|
1159
|
+
def OnBackgroundColour(self, event):
|
|
1160
|
+
|
|
1161
|
+
self.imagebutton.Enable(False)
|
|
1162
|
+
self.backbutton.Enable(True)
|
|
1163
|
+
self.tree.SetBackgroundImage(None)
|
|
1164
|
+
|
|
1165
|
+
event.Skip()
|
|
1166
|
+
|
|
1167
|
+
|
|
1168
|
+
def OnChooseBackground(self, event):
|
|
1169
|
+
|
|
1170
|
+
col1 = event.GetValue()
|
|
1171
|
+
self.tree.SetBackgroundColour(col1)
|
|
1172
|
+
event.Skip()
|
|
1173
|
+
|
|
1174
|
+
|
|
1175
|
+
def OnLeftImageList(self, event):
|
|
1176
|
+
|
|
1177
|
+
checked = event.IsChecked()
|
|
1178
|
+
if checked:
|
|
1179
|
+
self.tree.SetLeftImageList(self.leftimagelist)
|
|
1180
|
+
else:
|
|
1181
|
+
self.tree.SetLeftImageList(None)
|
|
1182
|
+
|
|
1183
|
+
self.tree.CalculateLineHeight()
|
|
1184
|
+
self.tree.Refresh()
|
|
1185
|
+
|
|
1186
|
+
|
|
1187
|
+
def OnWindowPos(self, event):
|
|
1188
|
+
|
|
1189
|
+
checked = event.IsChecked()
|
|
1190
|
+
self.tree.window_on_the_right = not checked
|
|
1191
|
+
animIcon = self.tree.FindItem(self.tree.GetRootItem(), "item 1-f-4")
|
|
1192
|
+
parentIcon = self.tree.GetItemParent(animIcon)
|
|
1193
|
+
self.tree.Expand(parentIcon)
|
|
1194
|
+
self.tree.Collapse(parentIcon)
|
|
1195
|
+
self.tree.EnsureVisible(animIcon)
|
|
1196
|
+
self.tree.RefreshItemWithWindows() # only if the style TR_ALIGN_WINDOWS_RIGHT is used
|
|
1197
|
+
self.tree.Refresh() # Ineffective (only updates when collapse/expand)
|
|
1198
|
+
|
|
1199
|
+
def OnCheckNormal(self, event):
|
|
1200
|
+
|
|
1201
|
+
self.radiohorizontal.Enable(False)
|
|
1202
|
+
self.radiovertical.Enable(False)
|
|
1203
|
+
self.firstcolour.Enable(False)
|
|
1204
|
+
self.secondcolour.Enable(False)
|
|
1205
|
+
self.focus.Enable(True)
|
|
1206
|
+
self.unfocus.Enable(True)
|
|
1207
|
+
self.checkgradient.SetValue(0)
|
|
1208
|
+
self.checkvista.SetValue(0)
|
|
1209
|
+
self.tree.EnableSelectionGradient(False)
|
|
1210
|
+
self.tree.EnableSelectionVista(False)
|
|
1211
|
+
event.Skip()
|
|
1212
|
+
|
|
1213
|
+
|
|
1214
|
+
def OnFocusColour(self, event):
|
|
1215
|
+
|
|
1216
|
+
col1 = event.GetValue()
|
|
1217
|
+
self.tree.SetHilightFocusColour(col1)
|
|
1218
|
+
event.Skip()
|
|
1219
|
+
|
|
1220
|
+
|
|
1221
|
+
def OnNonFocusColour(self, event):
|
|
1222
|
+
|
|
1223
|
+
col1 = event.GetValue()
|
|
1224
|
+
self.tree.SetHilightNonFocusColour(col1)
|
|
1225
|
+
event.Skip()
|
|
1226
|
+
|
|
1227
|
+
|
|
1228
|
+
def OnCheckGradient(self, event):
|
|
1229
|
+
|
|
1230
|
+
self.radiohorizontal.Enable(True)
|
|
1231
|
+
self.radiovertical.Enable(True)
|
|
1232
|
+
self.firstcolour.Enable(True)
|
|
1233
|
+
self.secondcolour.Enable(True)
|
|
1234
|
+
self.checknormal.SetValue(0)
|
|
1235
|
+
self.checkvista.SetValue(0)
|
|
1236
|
+
self.focus.Enable(False)
|
|
1237
|
+
self.unfocus.Enable(False)
|
|
1238
|
+
self.tree.SetGradientStyle(self.radiovertical.GetValue())
|
|
1239
|
+
self.tree.EnableSelectionVista(False)
|
|
1240
|
+
self.tree.EnableSelectionGradient(True)
|
|
1241
|
+
|
|
1242
|
+
event.Skip()
|
|
1243
|
+
|
|
1244
|
+
|
|
1245
|
+
def OnHorizontal(self, event):
|
|
1246
|
+
|
|
1247
|
+
self.tree.SetGradientStyle(self.radiovertical.GetValue())
|
|
1248
|
+
event.Skip()
|
|
1249
|
+
|
|
1250
|
+
|
|
1251
|
+
def OnVertical(self, event):
|
|
1252
|
+
|
|
1253
|
+
self.tree.SetGradientStyle(self.radiovertical.GetValue())
|
|
1254
|
+
event.Skip()
|
|
1255
|
+
|
|
1256
|
+
|
|
1257
|
+
def OnFirstColour(self, event):
|
|
1258
|
+
|
|
1259
|
+
col1 = event.GetValue()
|
|
1260
|
+
self.tree.SetFirstGradientColour(wx.Colour(col1[0], col1[1], col1[2]))
|
|
1261
|
+
event.Skip()
|
|
1262
|
+
|
|
1263
|
+
|
|
1264
|
+
def OnSecondColour(self, event):
|
|
1265
|
+
|
|
1266
|
+
col1 = event.GetValue()
|
|
1267
|
+
self.tree.SetSecondGradientColour(wx.Colour(col1[0], col1[1], col1[2]))
|
|
1268
|
+
event.Skip()
|
|
1269
|
+
|
|
1270
|
+
|
|
1271
|
+
def OnVista(self, event):
|
|
1272
|
+
|
|
1273
|
+
self.radiohorizontal.Enable(False)
|
|
1274
|
+
self.radiovertical.Enable(False)
|
|
1275
|
+
self.firstcolour.Enable(False)
|
|
1276
|
+
self.secondcolour.Enable(False)
|
|
1277
|
+
self.checknormal.SetValue(0)
|
|
1278
|
+
self.checkgradient.SetValue(0)
|
|
1279
|
+
self.focus.Enable(False)
|
|
1280
|
+
self.unfocus.Enable(False)
|
|
1281
|
+
self.tree.EnableSelectionGradient(False)
|
|
1282
|
+
self.tree.EnableSelectionVista(True)
|
|
1283
|
+
|
|
1284
|
+
event.Skip()
|
|
1285
|
+
|
|
1286
|
+
|
|
1287
|
+
def OnDragFullScreen(self, event):
|
|
1288
|
+
|
|
1289
|
+
self.tree.SetDragFullScreen(event.IsChecked())
|
|
1290
|
+
event.Skip()
|
|
1291
|
+
|
|
1292
|
+
|
|
1293
|
+
#---------------------------------------------------------------------------
|
|
1294
|
+
# CustomTreeCtrl Demo Implementation
|
|
1295
|
+
#---------------------------------------------------------------------------
|
|
1296
|
+
class CustomTreeCtrl(CT.CustomTreeCtrl):
|
|
1297
|
+
|
|
1298
|
+
def __init__(self, parent, id=wx.ID_ANY, pos=wx.DefaultPosition,
|
|
1299
|
+
size=wx.DefaultSize,
|
|
1300
|
+
style=wx.SUNKEN_BORDER|wx.WANTS_CHARS,
|
|
1301
|
+
agwStyle=CT.TR_HAS_BUTTONS|CT.TR_HAS_VARIABLE_ROW_HEIGHT,
|
|
1302
|
+
log=None):
|
|
1303
|
+
|
|
1304
|
+
CT.CustomTreeCtrl.__init__(self, parent, id, pos, size, style, agwStyle)
|
|
1305
|
+
|
|
1306
|
+
alldata = dir(CT)
|
|
1307
|
+
|
|
1308
|
+
treestyles = []
|
|
1309
|
+
events = []
|
|
1310
|
+
for data in alldata:
|
|
1311
|
+
if data.startswith("TR_"):
|
|
1312
|
+
treestyles.append(data)
|
|
1313
|
+
elif data.startswith("EVT_"):
|
|
1314
|
+
events.append(data)
|
|
1315
|
+
|
|
1316
|
+
self.events = events
|
|
1317
|
+
self.styles = treestyles
|
|
1318
|
+
self.item = None
|
|
1319
|
+
self.windowed_item = None
|
|
1320
|
+
# To set the position on Window image (default==True)
|
|
1321
|
+
self.window_on_the_right = True
|
|
1322
|
+
self._animctrl = None
|
|
1323
|
+
self.anim_gif_item = None # EVT_TREE_ITEM_CHECKED to update position
|
|
1324
|
+
|
|
1325
|
+
il = wx.ImageList(16, 16)
|
|
1326
|
+
|
|
1327
|
+
for items in ArtIDs[1:-1]:
|
|
1328
|
+
bmp = wx.ArtProvider.GetBitmap(eval(items), wx.ART_TOOLBAR, (16, 16))
|
|
1329
|
+
il.Add(bmp)
|
|
1330
|
+
|
|
1331
|
+
smileidx = il.Add(images.Smiles.GetBitmap())
|
|
1332
|
+
numicons = il.GetImageCount()
|
|
1333
|
+
|
|
1334
|
+
self.AssignImageList(il)
|
|
1335
|
+
self.count = 0
|
|
1336
|
+
self.log = log
|
|
1337
|
+
|
|
1338
|
+
# NOTE: For some reason tree items have to have a data object in
|
|
1339
|
+
# order to be sorted. Since our compare just uses the labels
|
|
1340
|
+
# we don't need any real data, so we'll just use None below for
|
|
1341
|
+
# the item data.
|
|
1342
|
+
|
|
1343
|
+
self.root = self.AddRoot("The Root Item")
|
|
1344
|
+
|
|
1345
|
+
if not(self.GetAGWWindowStyleFlag() & CT.TR_HIDE_ROOT):
|
|
1346
|
+
self.SetPyData(self.root, None)
|
|
1347
|
+
self.SetItemImage(self.root, 24, CT.TreeItemIcon_Normal)
|
|
1348
|
+
self.SetItemImage(self.root, 13, CT.TreeItemIcon_Expanded)
|
|
1349
|
+
|
|
1350
|
+
textctrl = wx.TextCtrl(self, -1, "I Am A Simple\nMultiline wx.TexCtrl", style=wx.TE_MULTILINE)
|
|
1351
|
+
self.gauge = wx.Gauge(self, -1, 50, style=wx.GA_HORIZONTAL|wx.GA_SMOOTH)
|
|
1352
|
+
self.gauge.SetValue(0)
|
|
1353
|
+
combobox = wx.ComboBox(self, -1, choices=["That", "Was", "A", "Nice", "Holyday!"], style=wx.CB_READONLY|wx.CB_DROPDOWN)
|
|
1354
|
+
|
|
1355
|
+
textctrl.Bind(wx.EVT_CHAR, self.OnTextCtrl)
|
|
1356
|
+
combobox.Bind(wx.EVT_COMBOBOX, self.OnComboBox)
|
|
1357
|
+
lenArtIds = len(ArtIDs) - 2
|
|
1358
|
+
|
|
1359
|
+
# This is for SetWindow on TreeItem, when collapsed is on the right, on the left otherwise
|
|
1360
|
+
self.img = list()
|
|
1361
|
+
self.img.append(wx.Bitmap("./bitmaps/pause.png", wx.BITMAP_TYPE_PNG))
|
|
1362
|
+
self.img.append(wx.Bitmap("./bitmaps/play.png", wx.BITMAP_TYPE_PNG))
|
|
1363
|
+
self.Image = wx.StaticBitmap(self, -1, bitmap=self.img[0])
|
|
1364
|
+
|
|
1365
|
+
for x in range(15):
|
|
1366
|
+
if x == 1:
|
|
1367
|
+
child = self.AppendItem(self.root, "Item %d" % x + "\nHello World\nHappy wxPython-ing!")
|
|
1368
|
+
self.SetItemBold(child, True)
|
|
1369
|
+
else:
|
|
1370
|
+
child = self.AppendItem(self.root, "Item %d" % x)
|
|
1371
|
+
self.SetPyData(child, None)
|
|
1372
|
+
self.SetItemImage(child, 24, CT.TreeItemIcon_Normal)
|
|
1373
|
+
self.SetItemImage(child, 13, CT.TreeItemIcon_Expanded)
|
|
1374
|
+
|
|
1375
|
+
if random.randint(0, 3) == 0:
|
|
1376
|
+
self.SetItemLeftImage(child, random.randint(0, lenArtIds))
|
|
1377
|
+
|
|
1378
|
+
if random.randint(0, 5) == 0:
|
|
1379
|
+
self.AppendSeparator(self.root)
|
|
1380
|
+
|
|
1381
|
+
for y in range(6):
|
|
1382
|
+
if y == 0 and x == 1:
|
|
1383
|
+
last = self.AppendItem(child, "item %d-%s" % (x, chr(ord("a")+y)), ct_type=2, wnd=self.gauge)
|
|
1384
|
+
elif y == 1 and x == 2:
|
|
1385
|
+
last = self.AppendItem(child, "Item %d-%s" % (x, chr(ord("a")+y)), ct_type=1, wnd=textctrl)
|
|
1386
|
+
if random.randint(0, 3) == 1:
|
|
1387
|
+
self.SetItem3State(last, True)
|
|
1388
|
+
|
|
1389
|
+
elif 2 < y < 4:
|
|
1390
|
+
last = self.AppendItem(child, "item %d-%s" % (x, chr(ord("a")+y)))
|
|
1391
|
+
elif y == 4 and x == 1:
|
|
1392
|
+
last = self.AppendItem(child, "item %d-%s" % (x, chr(ord("a")+y)), wnd=combobox)
|
|
1393
|
+
elif y == 5 and x == 1:
|
|
1394
|
+
last = self.AppendItem(child, "item %d-%s" % (x, chr(ord("a")+y)))
|
|
1395
|
+
last.SetWindow(self.Image, self.window_on_the_right) # Add the Window on on_the_right=True
|
|
1396
|
+
self.windowed_item = last
|
|
1397
|
+
else:
|
|
1398
|
+
last = self.AppendItem(child, "item %d-%s" % (x, chr(ord("a")+y)), ct_type=2)
|
|
1399
|
+
|
|
1400
|
+
self.SetPyData(last, None)
|
|
1401
|
+
self.SetItemImage(last, 24, CT.TreeItemIcon_Normal)
|
|
1402
|
+
self.SetItemImage(last, 13, CT.TreeItemIcon_Expanded)
|
|
1403
|
+
|
|
1404
|
+
if random.randint(0, 3) == 0:
|
|
1405
|
+
self.SetItemLeftImage(last, random.randint(0, lenArtIds))
|
|
1406
|
+
|
|
1407
|
+
if random.randint(0, 5) == 0:
|
|
1408
|
+
self.AppendSeparator(child)
|
|
1409
|
+
|
|
1410
|
+
for z in range(5):
|
|
1411
|
+
if z > 2:
|
|
1412
|
+
item = self.AppendItem(last, "item %d-%s-%d" % (x, chr(ord("a")+y), z), ct_type=1)
|
|
1413
|
+
if random.randint(0, 3) == 1:
|
|
1414
|
+
self.SetItem3State(item, True)
|
|
1415
|
+
if z == 4 and y == 5 and x == 1:
|
|
1416
|
+
self._add_animated_gif(item, self.window_on_the_right)
|
|
1417
|
+
self.anim_gif_item = item
|
|
1418
|
+
elif 0 < z <= 2:
|
|
1419
|
+
item = self.AppendItem(last, "item %d-%s-%d" % (x, chr(ord("a")+y), z), ct_type=2)
|
|
1420
|
+
elif z == 0:
|
|
1421
|
+
item = self.AppendItem(last, "item %d-%s-%d" % (x, chr(ord("a")+y), z))
|
|
1422
|
+
self.SetItemHyperText(item, True)
|
|
1423
|
+
self.SetPyData(item, None)
|
|
1424
|
+
self.SetItemImage(item, 28, CT.TreeItemIcon_Normal)
|
|
1425
|
+
self.SetItemImage(item, numicons-1, CT.TreeItemIcon_Selected)
|
|
1426
|
+
|
|
1427
|
+
if random.randint(0, 3) == 0:
|
|
1428
|
+
self.SetItemLeftImage(item, random.randint(0, lenArtIds))
|
|
1429
|
+
|
|
1430
|
+
if random.randint(0, 5) == 0:
|
|
1431
|
+
self.AppendSeparator(last)
|
|
1432
|
+
|
|
1433
|
+
self.Bind(wx.EVT_LEFT_DCLICK, self.OnLeftDClick)
|
|
1434
|
+
self.Bind(wx.EVT_IDLE, self.OnIdle)
|
|
1435
|
+
|
|
1436
|
+
self.eventdict = {'EVT_TREE_BEGIN_DRAG': self.OnBeginDrag, 'EVT_TREE_BEGIN_LABEL_EDIT': self.OnBeginEdit,
|
|
1437
|
+
'EVT_TREE_BEGIN_RDRAG': self.OnBeginRDrag, 'EVT_TREE_DELETE_ITEM': self.OnDeleteItem,
|
|
1438
|
+
'EVT_TREE_END_DRAG': self.OnEndDrag, 'EVT_TREE_END_LABEL_EDIT': self.OnEndEdit,
|
|
1439
|
+
'EVT_TREE_ITEM_ACTIVATED': self.OnActivate, 'EVT_TREE_ITEM_CHECKED': self.OnItemCheck,
|
|
1440
|
+
'EVT_TREE_ITEM_CHECKING': self.OnItemChecking, 'EVT_TREE_ITEM_COLLAPSED': self.OnItemCollapsed,
|
|
1441
|
+
'EVT_TREE_ITEM_COLLAPSING': self.OnItemCollapsing, 'EVT_TREE_ITEM_EXPANDED': self.OnItemExpanded,
|
|
1442
|
+
'EVT_TREE_ITEM_EXPANDING': self.OnItemExpanding, 'EVT_TREE_ITEM_GETTOOLTIP': self.OnToolTip,
|
|
1443
|
+
'EVT_TREE_ITEM_MENU': self.OnItemMenu, 'EVT_TREE_ITEM_RIGHT_CLICK': self.OnRightDown,
|
|
1444
|
+
'EVT_TREE_KEY_DOWN': self.OnKey, 'EVT_TREE_SEL_CHANGED': self.OnSelChanged,
|
|
1445
|
+
'EVT_TREE_SEL_CHANGING': self.OnSelChanging, "EVT_TREE_ITEM_HYPERLINK": self.OnHyperLink}
|
|
1446
|
+
|
|
1447
|
+
mainframe = wx.GetTopLevelParent(self)
|
|
1448
|
+
|
|
1449
|
+
if not hasattr(mainframe, "leftpanel"):
|
|
1450
|
+
self.Bind(CT.EVT_TREE_ITEM_EXPANDED, self.OnItemExpanded)
|
|
1451
|
+
self.Bind(CT.EVT_TREE_ITEM_EXPANDING, self.OnItemExpanding)
|
|
1452
|
+
self.Bind(CT.EVT_TREE_ITEM_COLLAPSED, self.OnItemCollapsed)
|
|
1453
|
+
self.Bind(CT.EVT_TREE_ITEM_COLLAPSING, self.OnItemCollapsing)
|
|
1454
|
+
self.Bind(CT.EVT_TREE_SEL_CHANGED, self.OnSelChanged)
|
|
1455
|
+
self.Bind(CT.EVT_TREE_SEL_CHANGING, self.OnSelChanging)
|
|
1456
|
+
self.Bind(wx.EVT_RIGHT_DOWN, self.OnRightDown)
|
|
1457
|
+
self.Bind(wx.EVT_RIGHT_UP, self.OnRightUp)
|
|
1458
|
+
else:
|
|
1459
|
+
for combos in mainframe.treeevents:
|
|
1460
|
+
self.BindEvents(combos)
|
|
1461
|
+
|
|
1462
|
+
if hasattr(mainframe, "leftpanel"):
|
|
1463
|
+
self.ChangeStyle(mainframe.treestyles)
|
|
1464
|
+
|
|
1465
|
+
if not(self.GetAGWWindowStyleFlag() & CT.TR_HIDE_ROOT):
|
|
1466
|
+
self.SelectItem(self.root)
|
|
1467
|
+
self.Expand(self.root)
|
|
1468
|
+
|
|
1469
|
+
|
|
1470
|
+
def BindEvents(self, choice, recreate=False):
|
|
1471
|
+
|
|
1472
|
+
value = choice.GetValue()
|
|
1473
|
+
text = choice.GetLabel()
|
|
1474
|
+
|
|
1475
|
+
evt = "CT." + text
|
|
1476
|
+
binder = self.eventdict[text]
|
|
1477
|
+
|
|
1478
|
+
if value == 1:
|
|
1479
|
+
if evt == "CT.EVT_TREE_BEGIN_RDRAG":
|
|
1480
|
+
self.Bind(wx.EVT_RIGHT_DOWN, None)
|
|
1481
|
+
self.Bind(wx.EVT_RIGHT_UP, None)
|
|
1482
|
+
self.Bind(eval(evt), binder)
|
|
1483
|
+
else:
|
|
1484
|
+
self.Bind(eval(evt), None)
|
|
1485
|
+
if evt == "CT.EVT_TREE_BEGIN_RDRAG":
|
|
1486
|
+
self.Bind(wx.EVT_RIGHT_DOWN, self.OnRightDown)
|
|
1487
|
+
self.Bind(wx.EVT_RIGHT_UP, self.OnRightUp)
|
|
1488
|
+
|
|
1489
|
+
|
|
1490
|
+
def ChangeStyle(self, combos):
|
|
1491
|
+
|
|
1492
|
+
style = 0
|
|
1493
|
+
for combo in combos:
|
|
1494
|
+
if combo.GetValue() == 1:
|
|
1495
|
+
style = style | eval("CT." + combo.GetLabel())
|
|
1496
|
+
|
|
1497
|
+
if self.GetAGWWindowStyleFlag() != style:
|
|
1498
|
+
self.SetAGWWindowStyleFlag(style)
|
|
1499
|
+
|
|
1500
|
+
|
|
1501
|
+
def OnCompareItems(self, item1, item2):
|
|
1502
|
+
|
|
1503
|
+
t1 = self.GetItemText(item1)
|
|
1504
|
+
t2 = self.GetItemText(item2)
|
|
1505
|
+
|
|
1506
|
+
self.log.write('compare: ' + t1 + ' <> ' + t2 + "\n")
|
|
1507
|
+
|
|
1508
|
+
if t1 < t2:
|
|
1509
|
+
return -1
|
|
1510
|
+
if t1 == t2:
|
|
1511
|
+
return 0
|
|
1512
|
+
|
|
1513
|
+
return 1
|
|
1514
|
+
|
|
1515
|
+
|
|
1516
|
+
def OnIdle(self, event):
|
|
1517
|
+
|
|
1518
|
+
if self.gauge:
|
|
1519
|
+
try:
|
|
1520
|
+
if self.gauge.IsEnabled() and self.gauge.IsShown():
|
|
1521
|
+
self.count = self.count + 1
|
|
1522
|
+
|
|
1523
|
+
if self.count >= 50:
|
|
1524
|
+
self.count = 0
|
|
1525
|
+
|
|
1526
|
+
self.gauge.SetValue(self.count)
|
|
1527
|
+
|
|
1528
|
+
except:
|
|
1529
|
+
self.gauge = None
|
|
1530
|
+
|
|
1531
|
+
event.Skip()
|
|
1532
|
+
|
|
1533
|
+
|
|
1534
|
+
def OnRightDown(self, event):
|
|
1535
|
+
|
|
1536
|
+
pt = event.GetPosition()
|
|
1537
|
+
item, flags = self.HitTest(pt)
|
|
1538
|
+
|
|
1539
|
+
if item:
|
|
1540
|
+
self.item = item
|
|
1541
|
+
self.log.write("OnRightClick: %s, %s, %s" % (self.GetItemText(item), type(item), item.__class__) + "\n")
|
|
1542
|
+
self.SelectItem(item)
|
|
1543
|
+
|
|
1544
|
+
|
|
1545
|
+
def OnRightUp(self, event):
|
|
1546
|
+
|
|
1547
|
+
item = self.item
|
|
1548
|
+
|
|
1549
|
+
if not item:
|
|
1550
|
+
event.Skip()
|
|
1551
|
+
return
|
|
1552
|
+
|
|
1553
|
+
if not self.IsItemEnabled(item):
|
|
1554
|
+
event.Skip()
|
|
1555
|
+
return
|
|
1556
|
+
|
|
1557
|
+
# Item Text Appearance
|
|
1558
|
+
ishtml = self.IsItemHyperText(item)
|
|
1559
|
+
back = self.GetItemBackgroundColour(item)
|
|
1560
|
+
fore = self.GetItemTextColour(item)
|
|
1561
|
+
isbold = self.IsBold(item)
|
|
1562
|
+
font = self.GetItemFont(item)
|
|
1563
|
+
|
|
1564
|
+
# Icons On Item
|
|
1565
|
+
normal = self.GetItemImage(item, CT.TreeItemIcon_Normal)
|
|
1566
|
+
selected = self.GetItemImage(item, CT.TreeItemIcon_Selected)
|
|
1567
|
+
expanded = self.GetItemImage(item, CT.TreeItemIcon_Expanded)
|
|
1568
|
+
selexp = self.GetItemImage(item, CT.TreeItemIcon_SelectedExpanded)
|
|
1569
|
+
|
|
1570
|
+
# Enabling/Disabling Windows Associated To An Item
|
|
1571
|
+
haswin = self.GetItemWindow(item)
|
|
1572
|
+
|
|
1573
|
+
# Enabling/Disabling Items
|
|
1574
|
+
enabled = self.IsItemEnabled(item)
|
|
1575
|
+
|
|
1576
|
+
# Generic Item's Info
|
|
1577
|
+
children = self.GetChildrenCount(item)
|
|
1578
|
+
itemtype = self.GetItemType(item)
|
|
1579
|
+
text = self.GetItemText(item)
|
|
1580
|
+
pydata = self.GetPyData(item)
|
|
1581
|
+
separator = self.IsItemSeparator(item)
|
|
1582
|
+
|
|
1583
|
+
self.current = item
|
|
1584
|
+
self.itemdict = {"ishtml": ishtml, "back": back, "fore": fore, "isbold": isbold,
|
|
1585
|
+
"font": font, "normal": normal, "selected": selected, "expanded": expanded,
|
|
1586
|
+
"selexp": selexp, "haswin": haswin, "children": children,
|
|
1587
|
+
"itemtype": itemtype, "text": text, "pydata": pydata, "enabled": enabled,
|
|
1588
|
+
"separator": separator}
|
|
1589
|
+
|
|
1590
|
+
menu = wx.Menu()
|
|
1591
|
+
|
|
1592
|
+
item1 = menu.Append(wx.ID_ANY, "Change Item Text")
|
|
1593
|
+
item2 = menu.Append(wx.ID_ANY, "Modify item text colour")
|
|
1594
|
+
menu.AppendSeparator()
|
|
1595
|
+
|
|
1596
|
+
if isbold:
|
|
1597
|
+
strs = "Make item text not bold"
|
|
1598
|
+
else:
|
|
1599
|
+
strs = "Make item text bold"
|
|
1600
|
+
|
|
1601
|
+
item3 = menu.Append(wx.ID_ANY, strs)
|
|
1602
|
+
item4 = menu.Append(wx.ID_ANY, "Change item font")
|
|
1603
|
+
item16 = menu.Append(wx.ID_ANY, "Change Item Background Colour")
|
|
1604
|
+
menu.AppendSeparator()
|
|
1605
|
+
|
|
1606
|
+
if ishtml:
|
|
1607
|
+
strs = "Set item as non-hyperlink"
|
|
1608
|
+
else:
|
|
1609
|
+
strs = "Set item as hyperlink"
|
|
1610
|
+
|
|
1611
|
+
item5 = menu.Append(wx.ID_ANY, strs)
|
|
1612
|
+
menu.AppendSeparator()
|
|
1613
|
+
|
|
1614
|
+
item13 = menu.Append(wx.ID_ANY, "Insert separator")
|
|
1615
|
+
menu.AppendSeparator()
|
|
1616
|
+
|
|
1617
|
+
if haswin:
|
|
1618
|
+
enabled = self.GetItemWindowEnabled(item)
|
|
1619
|
+
if enabled:
|
|
1620
|
+
strs = "Disable associated widget"
|
|
1621
|
+
else:
|
|
1622
|
+
strs = "Enable associated widget"
|
|
1623
|
+
else:
|
|
1624
|
+
strs = "Enable associated widget"
|
|
1625
|
+
|
|
1626
|
+
item6 = menu.Append(wx.ID_ANY, strs)
|
|
1627
|
+
|
|
1628
|
+
if not haswin:
|
|
1629
|
+
item6.Enable(False)
|
|
1630
|
+
|
|
1631
|
+
item7 = menu.Append(wx.ID_ANY, "Disable item")
|
|
1632
|
+
|
|
1633
|
+
menu.AppendSeparator()
|
|
1634
|
+
item14 = menu.Append(wx.ID_ANY, "Hide Item")
|
|
1635
|
+
item15 = menu.Append(wx.ID_ANY, "Unhide All Items")
|
|
1636
|
+
menu.AppendSeparator()
|
|
1637
|
+
item8 = menu.Append(wx.ID_ANY, "Change item icons")
|
|
1638
|
+
menu.AppendSeparator()
|
|
1639
|
+
item9 = menu.Append(wx.ID_ANY, "Get other information for this item")
|
|
1640
|
+
menu.AppendSeparator()
|
|
1641
|
+
|
|
1642
|
+
item10 = menu.Append(wx.ID_ANY, "Delete item")
|
|
1643
|
+
if item == self.GetRootItem():
|
|
1644
|
+
item10.Enable(False)
|
|
1645
|
+
item13.Enable(False)
|
|
1646
|
+
|
|
1647
|
+
item11 = menu.Append(wx.ID_ANY, "Prepend an item")
|
|
1648
|
+
item12 = menu.Append(wx.ID_ANY, "Append an item")
|
|
1649
|
+
|
|
1650
|
+
self.Bind(wx.EVT_MENU, self.OnItemText, item1)
|
|
1651
|
+
self.Bind(wx.EVT_MENU, self.OnItemForeground, item2)
|
|
1652
|
+
self.Bind(wx.EVT_MENU, self.OnItemBold, item3)
|
|
1653
|
+
self.Bind(wx.EVT_MENU, self.OnItemFont, item4)
|
|
1654
|
+
self.Bind(wx.EVT_MENU, self.OnItemHyperText, item5)
|
|
1655
|
+
self.Bind(wx.EVT_MENU, self.OnEnableWindow, item6)
|
|
1656
|
+
self.Bind(wx.EVT_MENU, self.OnDisableItem, item7)
|
|
1657
|
+
self.Bind(wx.EVT_MENU, self.OnItemIcons, item8)
|
|
1658
|
+
self.Bind(wx.EVT_MENU, self.OnItemInfo, item9)
|
|
1659
|
+
self.Bind(wx.EVT_MENU, self.OnItemDelete, item10)
|
|
1660
|
+
self.Bind(wx.EVT_MENU, self.OnItemPrepend, item11)
|
|
1661
|
+
self.Bind(wx.EVT_MENU, self.OnItemAppend, item12)
|
|
1662
|
+
self.Bind(wx.EVT_MENU, self.OnSeparatorInsert, item13)
|
|
1663
|
+
self.Bind(wx.EVT_MENU, self.OnHideItem, item14)
|
|
1664
|
+
self.Bind(wx.EVT_MENU, self.OnUnhideItems, item15)
|
|
1665
|
+
self.Bind(wx.EVT_MENU, self.OnItemBackground, item16)
|
|
1666
|
+
|
|
1667
|
+
self.PopupMenu(menu)
|
|
1668
|
+
menu.Destroy()
|
|
1669
|
+
|
|
1670
|
+
|
|
1671
|
+
def OnItemText(self, event):
|
|
1672
|
+
|
|
1673
|
+
diag = wx.TextEntryDialog(self, "Item Text", caption="Input Item Text",
|
|
1674
|
+
value=self.GetItemText(self.current),
|
|
1675
|
+
style=wx.OK | wx.CANCEL | wx.TE_MULTILINE)
|
|
1676
|
+
reply = diag.ShowModal()
|
|
1677
|
+
text = diag.GetValue()
|
|
1678
|
+
diag.Destroy()
|
|
1679
|
+
if reply in (wx.OK, wx.ID_OK):
|
|
1680
|
+
self.SetItemText(self.current, text)
|
|
1681
|
+
|
|
1682
|
+
|
|
1683
|
+
def OnItemBackground(self, event):
|
|
1684
|
+
|
|
1685
|
+
colourdata = wx.ColourData()
|
|
1686
|
+
colourdata.SetColour(self.itemdict["back"])
|
|
1687
|
+
dlg = wx.ColourDialog(self, colourdata)
|
|
1688
|
+
|
|
1689
|
+
dlg.GetColourData().SetChooseFull(True)
|
|
1690
|
+
|
|
1691
|
+
if dlg.ShowModal() == wx.ID_OK:
|
|
1692
|
+
data = dlg.GetColourData()
|
|
1693
|
+
col1 = data.GetColour().Get()
|
|
1694
|
+
self.SetItemBackgroundColour(self.current, col1)
|
|
1695
|
+
dlg.Destroy()
|
|
1696
|
+
|
|
1697
|
+
|
|
1698
|
+
def OnItemForeground(self, event):
|
|
1699
|
+
|
|
1700
|
+
colourdata = wx.ColourData()
|
|
1701
|
+
colourdata.SetColour(self.itemdict["fore"])
|
|
1702
|
+
dlg = wx.ColourDialog(self, colourdata)
|
|
1703
|
+
|
|
1704
|
+
dlg.GetColourData().SetChooseFull(True)
|
|
1705
|
+
|
|
1706
|
+
if dlg.ShowModal() == wx.ID_OK:
|
|
1707
|
+
data = dlg.GetColourData()
|
|
1708
|
+
col1 = data.GetColour().Get()
|
|
1709
|
+
self.SetItemTextColour(self.current, col1)
|
|
1710
|
+
dlg.Destroy()
|
|
1711
|
+
|
|
1712
|
+
|
|
1713
|
+
def OnItemBold(self, event):
|
|
1714
|
+
|
|
1715
|
+
self.SetItemBold(self.current, not self.itemdict["isbold"])
|
|
1716
|
+
|
|
1717
|
+
|
|
1718
|
+
def OnItemFont(self, event):
|
|
1719
|
+
|
|
1720
|
+
data = wx.FontData()
|
|
1721
|
+
font = self.itemdict["font"]
|
|
1722
|
+
|
|
1723
|
+
if font is None:
|
|
1724
|
+
font = wx.SystemSettings_GetFont(wx.SYS_DEFAULT_GUI_FONT)
|
|
1725
|
+
|
|
1726
|
+
data.SetInitialFont(font)
|
|
1727
|
+
|
|
1728
|
+
dlg = wx.FontDialog(self, data)
|
|
1729
|
+
|
|
1730
|
+
if dlg.ShowModal() == wx.ID_OK:
|
|
1731
|
+
data = dlg.GetFontData()
|
|
1732
|
+
font = data.GetChosenFont()
|
|
1733
|
+
self.SetItemFont(self.current, font)
|
|
1734
|
+
|
|
1735
|
+
dlg.Destroy()
|
|
1736
|
+
|
|
1737
|
+
|
|
1738
|
+
def OnItemHyperText(self, event):
|
|
1739
|
+
|
|
1740
|
+
self.SetItemHyperText(self.current, not self.itemdict["ishtml"])
|
|
1741
|
+
|
|
1742
|
+
|
|
1743
|
+
def OnEnableWindow(self, event):
|
|
1744
|
+
|
|
1745
|
+
enable = self.GetItemWindowEnabled(self.current)
|
|
1746
|
+
self.SetItemWindowEnabled(self.current, not enable)
|
|
1747
|
+
|
|
1748
|
+
|
|
1749
|
+
def OnDisableItem(self, event):
|
|
1750
|
+
|
|
1751
|
+
self.EnableItem(self.current, False)
|
|
1752
|
+
|
|
1753
|
+
|
|
1754
|
+
def OnHideItem(self, event):
|
|
1755
|
+
|
|
1756
|
+
self.HideItem(self.current)
|
|
1757
|
+
event.Skip()
|
|
1758
|
+
|
|
1759
|
+
|
|
1760
|
+
def OnUnhideItems(self, event):
|
|
1761
|
+
|
|
1762
|
+
item = self.GetRootItem()
|
|
1763
|
+
while item:
|
|
1764
|
+
if item.IsHidden():
|
|
1765
|
+
self.HideItem(item, False)
|
|
1766
|
+
item = self.GetNext(item)
|
|
1767
|
+
event.Skip()
|
|
1768
|
+
|
|
1769
|
+
|
|
1770
|
+
def OnItemIcons(self, event):
|
|
1771
|
+
|
|
1772
|
+
bitmaps = [self.itemdict["normal"], self.itemdict["selected"],
|
|
1773
|
+
self.itemdict["expanded"], self.itemdict["selexp"]]
|
|
1774
|
+
|
|
1775
|
+
wx.BeginBusyCursor()
|
|
1776
|
+
dlg = TreeIcons(self, -1, bitmaps=bitmaps)
|
|
1777
|
+
wx.EndBusyCursor()
|
|
1778
|
+
dlg.ShowModal()
|
|
1779
|
+
|
|
1780
|
+
|
|
1781
|
+
def SetNewIcons(self, bitmaps):
|
|
1782
|
+
|
|
1783
|
+
self.SetItemImage(self.current, bitmaps[0], CT.TreeItemIcon_Normal)
|
|
1784
|
+
self.SetItemImage(self.current, bitmaps[1], CT.TreeItemIcon_Selected)
|
|
1785
|
+
self.SetItemImage(self.current, bitmaps[2], CT.TreeItemIcon_Expanded)
|
|
1786
|
+
self.SetItemImage(self.current, bitmaps[3], CT.TreeItemIcon_SelectedExpanded)
|
|
1787
|
+
|
|
1788
|
+
|
|
1789
|
+
def OnItemInfo(self, event):
|
|
1790
|
+
|
|
1791
|
+
itemtext = self.itemdict["text"]
|
|
1792
|
+
numchildren = str(self.itemdict["children"])
|
|
1793
|
+
itemtype = self.itemdict["itemtype"]
|
|
1794
|
+
pydata = repr(type(self.itemdict["pydata"]))
|
|
1795
|
+
|
|
1796
|
+
if itemtype == 0:
|
|
1797
|
+
itemtype = "Normal"
|
|
1798
|
+
elif itemtype == 1:
|
|
1799
|
+
itemtype = "CheckBox"
|
|
1800
|
+
else:
|
|
1801
|
+
itemtype = "RadioButton"
|
|
1802
|
+
|
|
1803
|
+
strs = "Information On Selected Item:\n\n" + "Text: " + itemtext + "\n" \
|
|
1804
|
+
"Number Of Children: " + numchildren + "\n" \
|
|
1805
|
+
"Item Type: " + itemtype + "\n" \
|
|
1806
|
+
"Item Data Type: " + pydata + "\n"
|
|
1807
|
+
|
|
1808
|
+
dlg = wx.MessageDialog(self, strs, "CustomTreeCtrlDemo Info", wx.OK | wx.ICON_INFORMATION)
|
|
1809
|
+
dlg.ShowModal()
|
|
1810
|
+
dlg.Destroy()
|
|
1811
|
+
|
|
1812
|
+
|
|
1813
|
+
|
|
1814
|
+
def OnItemDelete(self, event):
|
|
1815
|
+
|
|
1816
|
+
strs = "Are You Sure You Want To Delete Item " + self.GetItemText(self.current) + "?"
|
|
1817
|
+
dlg = wx.MessageDialog(None, strs, 'Deleting Item', wx.YES_NO | wx.NO_DEFAULT | wx.CANCEL | wx.ICON_QUESTION)
|
|
1818
|
+
|
|
1819
|
+
if dlg.ShowModal() in [wx.ID_NO, wx.ID_CANCEL]:
|
|
1820
|
+
dlg.Destroy()
|
|
1821
|
+
return
|
|
1822
|
+
|
|
1823
|
+
dlg.Destroy()
|
|
1824
|
+
|
|
1825
|
+
self.DeleteChildren(self.current)
|
|
1826
|
+
self.Delete(self.current)
|
|
1827
|
+
self.current = None
|
|
1828
|
+
|
|
1829
|
+
|
|
1830
|
+
|
|
1831
|
+
def OnItemPrepend(self, event):
|
|
1832
|
+
|
|
1833
|
+
dlg = wx.TextEntryDialog(self, "Please Enter The New Item Name", 'Item Naming', 'Python')
|
|
1834
|
+
|
|
1835
|
+
if dlg.ShowModal() == wx.ID_OK:
|
|
1836
|
+
newname = dlg.GetValue()
|
|
1837
|
+
newitem = self.PrependItem(self.current, newname)
|
|
1838
|
+
self.EnsureVisible(newitem)
|
|
1839
|
+
|
|
1840
|
+
dlg.Destroy()
|
|
1841
|
+
|
|
1842
|
+
|
|
1843
|
+
def OnItemAppend(self, event):
|
|
1844
|
+
|
|
1845
|
+
dlg = wx.TextEntryDialog(self, "Please Enter The New Item Name", 'Item Naming', 'Python')
|
|
1846
|
+
|
|
1847
|
+
if dlg.ShowModal() == wx.ID_OK:
|
|
1848
|
+
newname = dlg.GetValue()
|
|
1849
|
+
newitem = self.AppendItem(self.current, newname)
|
|
1850
|
+
self.EnsureVisible(newitem)
|
|
1851
|
+
|
|
1852
|
+
dlg.Destroy()
|
|
1853
|
+
|
|
1854
|
+
|
|
1855
|
+
def OnSeparatorInsert(self, event):
|
|
1856
|
+
|
|
1857
|
+
newitem = self.InsertSeparator(self.GetItemParent(self.current), self.current)
|
|
1858
|
+
self.EnsureVisible(newitem)
|
|
1859
|
+
|
|
1860
|
+
|
|
1861
|
+
def OnBeginEdit(self, event):
|
|
1862
|
+
|
|
1863
|
+
self.log.write("OnBeginEdit" + "\n")
|
|
1864
|
+
# show how to prevent edit...
|
|
1865
|
+
item = event.GetItem()
|
|
1866
|
+
if item and self.GetItemText(item) == "The Root Item":
|
|
1867
|
+
wx.Bell()
|
|
1868
|
+
self.log.write("You can't edit this one..." + "\n")
|
|
1869
|
+
|
|
1870
|
+
# Lets just see what's visible of its children
|
|
1871
|
+
cookie = 0
|
|
1872
|
+
root = event.GetItem()
|
|
1873
|
+
(child, cookie) = self.GetFirstChild(root)
|
|
1874
|
+
|
|
1875
|
+
while child:
|
|
1876
|
+
self.log.write("Child [%s] visible = %d" % (self.GetItemText(child), self.IsVisible(child)) + "\n")
|
|
1877
|
+
(child, cookie) = self.GetNextChild(root, cookie)
|
|
1878
|
+
|
|
1879
|
+
event.Veto()
|
|
1880
|
+
|
|
1881
|
+
|
|
1882
|
+
def OnEndEdit(self, event):
|
|
1883
|
+
|
|
1884
|
+
self.log.write("OnEndEdit: %s %s" %(event.IsEditCancelled(), event.GetLabel()))
|
|
1885
|
+
# show how to reject edit, we'll not allow any digits
|
|
1886
|
+
for x in event.GetLabel():
|
|
1887
|
+
if x in string.digits:
|
|
1888
|
+
self.log.write(", You can't enter digits..." + "\n")
|
|
1889
|
+
event.Veto()
|
|
1890
|
+
return
|
|
1891
|
+
|
|
1892
|
+
self.log.write("\n")
|
|
1893
|
+
|
|
1894
|
+
|
|
1895
|
+
def OnLeftDClick(self, event):
|
|
1896
|
+
|
|
1897
|
+
pt = event.GetPosition()
|
|
1898
|
+
item, flags = self.HitTest(pt)
|
|
1899
|
+
if item and (flags & CT.TREE_HITTEST_ONITEMLABEL):
|
|
1900
|
+
if self.GetAGWWindowStyleFlag() & CT.TR_EDIT_LABELS:
|
|
1901
|
+
self.log.write("OnLeftDClick: %s (manually starting label edit)"% self.GetItemText(item) + "\n")
|
|
1902
|
+
self.EditLabel(item)
|
|
1903
|
+
else:
|
|
1904
|
+
self.log.write("OnLeftDClick: Cannot Start Manual Editing, Missing Style TR_EDIT_LABELS\n")
|
|
1905
|
+
|
|
1906
|
+
event.Skip()
|
|
1907
|
+
|
|
1908
|
+
|
|
1909
|
+
def OnItemExpanded(self, event):
|
|
1910
|
+
|
|
1911
|
+
item = event.GetItem()
|
|
1912
|
+
if item:
|
|
1913
|
+
self.log.write("OnItemExpanded: %s" % self.GetItemText(item) + "\n")
|
|
1914
|
+
|
|
1915
|
+
|
|
1916
|
+
def OnItemExpanding(self, event):
|
|
1917
|
+
|
|
1918
|
+
item = event.GetItem()
|
|
1919
|
+
if item:
|
|
1920
|
+
self.log.write("OnItemExpanding: %s" % self.GetItemText(item) + "\n")
|
|
1921
|
+
if item == self.windowed_item:
|
|
1922
|
+
item.DeleteWindow()
|
|
1923
|
+
self.Image = wx.StaticBitmap(self, -1, bitmap=self.img[1])
|
|
1924
|
+
item.SetWindow(self.Image, self.window_on_the_right)
|
|
1925
|
+
child = self.GetLastChild(item)
|
|
1926
|
+
if child == self.anim_gif_item:
|
|
1927
|
+
self._add_animated_gif(self.anim_gif_item, self.window_on_the_right)
|
|
1928
|
+
event.Skip()
|
|
1929
|
+
|
|
1930
|
+
|
|
1931
|
+
def OnItemCollapsed(self, event):
|
|
1932
|
+
|
|
1933
|
+
item = event.GetItem()
|
|
1934
|
+
if item:
|
|
1935
|
+
self.log.write("OnItemCollapsed: %s" % self.GetItemText(item) + "\n")
|
|
1936
|
+
|
|
1937
|
+
|
|
1938
|
+
def OnItemCollapsing(self, event):
|
|
1939
|
+
|
|
1940
|
+
item = event.GetItem()
|
|
1941
|
+
if item:
|
|
1942
|
+
self.log.write("OnItemCollapsing: %s" % self.GetItemText(item) + "\n")
|
|
1943
|
+
if item == self.windowed_item:
|
|
1944
|
+
item.DeleteWindow()
|
|
1945
|
+
self.Image = wx.StaticBitmap(self, -1, bitmap=self.img[0])
|
|
1946
|
+
item.SetWindow(self.Image, self.window_on_the_right)
|
|
1947
|
+
# Lets hide all Windows
|
|
1948
|
+
self._collapse_node(item, lambda t: self._hideanimation(t))
|
|
1949
|
+
event.Skip()
|
|
1950
|
+
|
|
1951
|
+
def _collapse_node(self, item, func):
|
|
1952
|
+
item_was_expanded = self.IsExpanded(item)
|
|
1953
|
+
if item != self.GetRootItem():
|
|
1954
|
+
func(item)
|
|
1955
|
+
if not self.IsExpanded(item):
|
|
1956
|
+
return
|
|
1957
|
+
|
|
1958
|
+
for child in item.GetChildren():
|
|
1959
|
+
self._collapse_node(child, func)
|
|
1960
|
+
|
|
1961
|
+
if not item_was_expanded:
|
|
1962
|
+
self.Collapse(item)
|
|
1963
|
+
|
|
1964
|
+
def _hideanimation(self, item):
|
|
1965
|
+
itemwindow = item.GetWindow()
|
|
1966
|
+
if itemwindow:
|
|
1967
|
+
itemwindow.Hide()
|
|
1968
|
+
|
|
1969
|
+
def _add_animated_gif(self, item, on_the_right):
|
|
1970
|
+
if self._animctrl:
|
|
1971
|
+
self._animctrl.Stop()
|
|
1972
|
+
self._animctrl.Animation.Destroy()
|
|
1973
|
+
self._animctrl.Destroy()
|
|
1974
|
+
self._animctrl = None
|
|
1975
|
+
|
|
1976
|
+
from wx.adv import Animation, AnimationCtrl
|
|
1977
|
+
img = os.path.join(bitmapDir, 'recording.gif')
|
|
1978
|
+
ani = Animation(img)
|
|
1979
|
+
obj = self
|
|
1980
|
+
rect = (item.GetX()+20, item.GetY()+1) # Overlaps item icon
|
|
1981
|
+
self._animctrl = AnimationCtrl(obj, -1, ani, rect)
|
|
1982
|
+
self._animctrl.SetBackgroundColour(obj.GetBackgroundColour())
|
|
1983
|
+
item.SetWindow(self._animctrl, on_the_right)
|
|
1984
|
+
self._animctrl.Play()
|
|
1985
|
+
|
|
1986
|
+
def OnSelChanged(self, event):
|
|
1987
|
+
|
|
1988
|
+
self.item = event.GetItem()
|
|
1989
|
+
if self.item:
|
|
1990
|
+
self.log.write("OnSelChanged: %s" % self.GetItemText(self.item))
|
|
1991
|
+
if wx.Platform == '__WXMSW__':
|
|
1992
|
+
self.log.write(", BoundingRect: %s" % self.GetBoundingRect(self.item, True) + "\n")
|
|
1993
|
+
else:
|
|
1994
|
+
self.log.write("\n")
|
|
1995
|
+
|
|
1996
|
+
event.Skip()
|
|
1997
|
+
|
|
1998
|
+
|
|
1999
|
+
def OnSelChanging(self, event):
|
|
2000
|
+
|
|
2001
|
+
item = event.GetItem()
|
|
2002
|
+
olditem = event.GetOldItem()
|
|
2003
|
+
|
|
2004
|
+
if item:
|
|
2005
|
+
if not olditem:
|
|
2006
|
+
olditemtext = "None"
|
|
2007
|
+
else:
|
|
2008
|
+
olditemtext = self.GetItemText(olditem)
|
|
2009
|
+
self.log.write("OnSelChanging: From %s" % olditemtext + " To %s" % self.GetItemText(item) + "\n")
|
|
2010
|
+
|
|
2011
|
+
event.Skip()
|
|
2012
|
+
|
|
2013
|
+
|
|
2014
|
+
def OnBeginDrag(self, event):
|
|
2015
|
+
|
|
2016
|
+
self.item = event.GetItem()
|
|
2017
|
+
if self.item:
|
|
2018
|
+
self.log.write("Beginning Drag... fullscreen=%s\n" % self.GetDragFullScreen())
|
|
2019
|
+
event.Allow()
|
|
2020
|
+
|
|
2021
|
+
|
|
2022
|
+
def OnBeginRDrag(self, event):
|
|
2023
|
+
|
|
2024
|
+
self.item = event.GetItem()
|
|
2025
|
+
if self.item:
|
|
2026
|
+
self.log.write("Beginning Right Drag... fullscreen=%s\n" % self.GetDragFullScreen())
|
|
2027
|
+
event.Allow()
|
|
2028
|
+
|
|
2029
|
+
|
|
2030
|
+
def OnEndDrag(self, event):
|
|
2031
|
+
|
|
2032
|
+
if self.GetDragFullScreen() is True:
|
|
2033
|
+
wnd = wx.FindWindowAtPoint(self.ClientToScreen(event.GetPoint()))
|
|
2034
|
+
self.log.write("Ending Drag! window=%s\n" % repr(wnd))
|
|
2035
|
+
else:
|
|
2036
|
+
self.item = event.GetItem()
|
|
2037
|
+
name = self.GetItemText(self.item) if self.item else 'None'
|
|
2038
|
+
self.log.write("Ending Drag! item=%s\n" % name)
|
|
2039
|
+
|
|
2040
|
+
event.Skip()
|
|
2041
|
+
|
|
2042
|
+
|
|
2043
|
+
def OnDeleteItem(self, event):
|
|
2044
|
+
|
|
2045
|
+
item = event.GetItem()
|
|
2046
|
+
|
|
2047
|
+
if not item:
|
|
2048
|
+
return
|
|
2049
|
+
|
|
2050
|
+
self.log.write("Deleting Item: %s" % self.GetItemText(item) + "\n")
|
|
2051
|
+
event.Skip()
|
|
2052
|
+
|
|
2053
|
+
|
|
2054
|
+
def OnItemCheck(self, event):
|
|
2055
|
+
|
|
2056
|
+
item = event.GetItem()
|
|
2057
|
+
self.log.write("Item " + self.GetItemText(item) + " Has Been Checked!\n")
|
|
2058
|
+
if item == self.anim_gif_item:
|
|
2059
|
+
self._add_animated_gif(item, self.window_on_the_right)
|
|
2060
|
+
event.Skip()
|
|
2061
|
+
|
|
2062
|
+
|
|
2063
|
+
def OnItemChecking(self, event):
|
|
2064
|
+
|
|
2065
|
+
item = event.GetItem()
|
|
2066
|
+
self.log.write("Item " + self.GetItemText(item) + " Is Being Checked...\n")
|
|
2067
|
+
event.Skip()
|
|
2068
|
+
|
|
2069
|
+
|
|
2070
|
+
def OnToolTip(self, event):
|
|
2071
|
+
|
|
2072
|
+
item = event.GetItem()
|
|
2073
|
+
if item:
|
|
2074
|
+
event.SetToolTip(wx.ToolTip(self.GetItemText(item)))
|
|
2075
|
+
|
|
2076
|
+
|
|
2077
|
+
def OnItemMenu(self, event):
|
|
2078
|
+
|
|
2079
|
+
item = event.GetItem()
|
|
2080
|
+
if item:
|
|
2081
|
+
self.log.write("OnItemMenu: %s" % self.GetItemText(item) + "\n")
|
|
2082
|
+
|
|
2083
|
+
event.Skip()
|
|
2084
|
+
|
|
2085
|
+
|
|
2086
|
+
def OnKey(self, event):
|
|
2087
|
+
|
|
2088
|
+
keycode = event.GetKeyCode()
|
|
2089
|
+
keyname = keyMap.get(keycode, None)
|
|
2090
|
+
|
|
2091
|
+
if keycode == wx.WXK_BACK:
|
|
2092
|
+
self.log.write("OnKeyDown: HAHAHAHA! I Vetoed Your Backspace! HAHAHAHA\n")
|
|
2093
|
+
return
|
|
2094
|
+
|
|
2095
|
+
if keyname is None:
|
|
2096
|
+
if "unicode" in wx.PlatformInfo:
|
|
2097
|
+
keycode = event.GetUnicodeKey()
|
|
2098
|
+
if keycode <= 127:
|
|
2099
|
+
keycode = event.GetKeyCode()
|
|
2100
|
+
keyname = "\"" + unichr(event.GetUnicodeKey()) + "\""
|
|
2101
|
+
if keycode < 27:
|
|
2102
|
+
keyname = "Ctrl-%s" % chr(ord('A') + keycode-1)
|
|
2103
|
+
|
|
2104
|
+
elif keycode < 256:
|
|
2105
|
+
if keycode == 0:
|
|
2106
|
+
keyname = "NUL"
|
|
2107
|
+
elif keycode < 27:
|
|
2108
|
+
keyname = "Ctrl-%s" % chr(ord('A') + keycode-1)
|
|
2109
|
+
else:
|
|
2110
|
+
keyname = "\"%s\"" % chr(keycode)
|
|
2111
|
+
else:
|
|
2112
|
+
keyname = "unknown (%s)" % keycode
|
|
2113
|
+
|
|
2114
|
+
self.log.write("OnKeyDown: You Pressed '" + keyname + "'\n")
|
|
2115
|
+
|
|
2116
|
+
event.Skip()
|
|
2117
|
+
|
|
2118
|
+
|
|
2119
|
+
def OnActivate(self, event):
|
|
2120
|
+
|
|
2121
|
+
if self.item:
|
|
2122
|
+
self.log.write("OnActivate: %s" % self.GetItemText(self.item) + "\n")
|
|
2123
|
+
|
|
2124
|
+
event.Skip()
|
|
2125
|
+
|
|
2126
|
+
|
|
2127
|
+
def OnHyperLink(self, event):
|
|
2128
|
+
|
|
2129
|
+
item = event.GetItem()
|
|
2130
|
+
if item:
|
|
2131
|
+
self.log.write("OnHyperLink: %s" % self.GetItemText(self.item) + "\n")
|
|
2132
|
+
|
|
2133
|
+
|
|
2134
|
+
def OnTextCtrl(self, event):
|
|
2135
|
+
|
|
2136
|
+
keycode = event.GetKeyCode()
|
|
2137
|
+
char = chr(keycode) if keycode < 256 else ''
|
|
2138
|
+
self.log.write("EDITING THE TEXTCTRL: You Wrote '" + char + \
|
|
2139
|
+
"' (KeyCode = " + str(keycode) + ")\n")
|
|
2140
|
+
event.Skip()
|
|
2141
|
+
|
|
2142
|
+
|
|
2143
|
+
def OnComboBox(self, event):
|
|
2144
|
+
|
|
2145
|
+
selection = event.GetEventObject().GetValue()
|
|
2146
|
+
self.log.write("CHOICE FROM COMBOBOX: You Chose '" + selection + "'\n")
|
|
2147
|
+
event.Skip()
|
|
2148
|
+
|
|
2149
|
+
|
|
2150
|
+
|
|
2151
|
+
#----------------------------------------------------------------------
|
|
2152
|
+
|
|
2153
|
+
def runTest(frame, nb, log):
|
|
2154
|
+
win = CustomTreeCtrlDemo(nb, log)
|
|
2155
|
+
return win
|
|
2156
|
+
|
|
2157
|
+
#----------------------------------------------------------------------
|
|
2158
|
+
|
|
2159
|
+
|
|
2160
|
+
|
|
2161
|
+
overview = CT.__doc__
|
|
2162
|
+
|
|
2163
|
+
|
|
2164
|
+
if __name__ == '__main__':
|
|
2165
|
+
import sys,os
|
|
2166
|
+
import run
|
|
2167
|
+
run.main(['', os.path.basename(sys.argv[0])] + sys.argv[1:])
|