Removed wxVTKRenderWindow since VTK now includes a much better python

module that allows you to use VTK in a wxPython window.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@15328 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2002-05-02 02:49:15 +00:00
parent 6e2129f90f
commit f44602beb7
3 changed files with 15 additions and 121 deletions

View File

@@ -20,72 +20,6 @@ import images
#---------------------------------------------------------------------------
## _treeList = [
## ('New since last release', ['wxGenericDirCtrl',
## 'wxImageFromStream',
## 'RowColSizer',
## 'Unicode',
## 'wxFileHistory',
## ]),
## ('Windows', ['wxFrame', 'wxDialog', 'wxMiniFrame',
## 'wxGrid', 'wxSashWindow',
## 'wxScrolledWindow', 'wxSplitterWindow',
## 'wxStatusBar', 'wxNotebook',
## 'wxHtmlWindow',
## 'wxStyledTextCtrl_1', 'wxStyledTextCtrl_2',
## 'wxPopupWindow',
## 'wxDynamicSashWindow',
## ]),
## ('Common Dialogs', ['wxColourDialog', 'wxDirDialog', 'wxFileDialog',
## 'wxSingleChoiceDialog', 'wxTextEntryDialog',
## 'wxFontDialog', 'wxPageSetupDialog', 'wxPrintDialog',
## 'wxMessageDialog', 'wxProgressDialog', 'wxFindReplaceDialog',
## ]),
## ('Controls', ['wxButton', 'wxCheckBox', 'wxCheckListBox', 'wxChoice',
## 'wxComboBox', 'wxGauge', 'wxListBox', 'wxListCtrl', 'VirtualListCtrl',
## 'wxTextCtrl',
## 'wxTreeCtrl', 'wxSpinButton', 'wxSpinCtrl', 'wxStaticText',
## 'wxStaticBitmap', 'wxRadioBox', 'wxSlider', 'wxToolBar',
## 'wxCalendarCtrl', 'wxToggleButton',
## 'wxEditableListBox', 'wxLEDNumberCtrl',
## ]),
## ('Window Layout', ['wxLayoutConstraints', 'LayoutAnchors', 'Sizers', 'XML_Resource',
## 'RowColSizer',
## ]),
## ('Miscellaneous', [ 'DragAndDrop', 'CustomDragAndDrop', 'URLDragAndDrop',
## 'FontEnumerator',
## 'wxTimer', 'wxValidator', 'wxGLCanvas', 'DialogUnits',
## 'wxImage', 'wxMask', 'PrintFramework', 'wxOGL',
## 'PythonEvents', 'Threads',
## 'ActiveXWrapper_Acrobat', 'ActiveXWrapper_IE',
## 'wxDragImage', "wxProcess", "FancyText", "OOR", "wxWave",
## 'wxJoystick', 'DrawXXXList', 'ErrorDialogs', 'wxMimeTypesManager',
## 'ContextHelp', 'SplitTree', 'Unicode', 'wxFileHistory',
## ]),
## ('wxPython Library', ['Layoutf', 'wxScrolledMessageDialog',
## 'wxMultipleChoiceDialog', 'wxPlotCanvas', 'wxFloatBar',
## 'wxCalendar', 'wxMVCTree', 'wxVTKRenderWindow',
## 'FileBrowseButton', 'GenericButtons', 'wxEditor',
## 'ColourSelect', 'ImageBrowser',
## 'infoframe', 'ColourDB', 'PyCrust', 'PyCrustWithFilling',
## 'TablePrint',
## 'wxRightTextCtrl',
## ]),
## ('Cool Contribs', ['pyTree', 'hangman',
## #'SlashDot',
## 'XMLtreeview'
## ]),
## ]
_treeList = [
# new stuff
('New since last release', [
@@ -240,7 +174,6 @@ _treeList = [
'ActiveXWrapper_IE',
'wxGLCanvas',
'wxPlotCanvas',
'wxVTKRenderWindow',
]),
# pyTree, hangman, ... in the samples dir

View File

@@ -1,54 +0,0 @@
from wxPython.wx import *
try:
from wxPython.lib import vtk
haveVTK = true
except ImportError:
haveVTK = false
#----------------------------------------------------------------------
def MakeCone(vtkwin):
cone = vtk.vtkConeSource()
cone.SetResolution(80)
coneMapper = vtk.vtkPolyDataMapper()
coneMapper.SetInput(cone.GetOutput())
coneActor = vtk.vtkActor()
coneActor.SetMapper(coneMapper)
ren = vtk.vtkRenderer()
vtkwin.GetRenderWindow().AddRenderer(ren)
ren.AddActor(coneActor)
#----------------------------------------------------------------------
def runTest(frame, nb, log):
if haveVTK:
f = wxFrame(frame, -1, "wxVTKRenderWindow", size=(450, 300),
style=wxDEFAULT_FRAME_STYLE|wxNO_FULL_REPAINT_ON_RESIZE)
win = vtk.wxVTKRenderWindow(f, -1)
MakeCone(win)
f.Show(true)
frame.otherWin = f
return None
else:
wxMessageBox("Unable to import VTK, which is a required component\n"
"of this demo. You need to download and install the\n"
"Python extension module for VTK from http://www.kitware.com/",
"Import Error")
return None
#----------------------------------------------------------------------
overview = """\
wxVTKRenderWindow is a wrapper around the vtkRenderWindow from the
VTK Visualization Toolkit. The VTK Python extensions are required,
they can be obtained from http://www.kitware.com/ where you can also
find some nifty pictures and stuff.
"""

View File

@@ -1,3 +1,17 @@
"""
VTK is now including a package for using VTK with wxPython, so this
module is now officially nothing but ancient history. If for some
strange reason you really need this code (I don't know why, it didn't
work all that well anyway,) then just remove the triple quotes below.
I'm told that the module from Kitware is excellent and so you should
really use it. See the URL below to get a copy from CVS.
http://public.kitware.com/cgi-bin/cvsweb.cgi/VTK/Wrapping/Python/vtk/wx/
"""
print __doc__
"""
#----------------------------------------------------------------------
# Name: wxPython.lib.vtk
# Purpose: Provides a wrapper around the vtkRenderWindow from the
@@ -552,3 +566,4 @@ class wxVTKRenderWindow(wxVTKRenderWindowBase):
self._PickedAssembly.SetProperty(self._PickedProperty)
self.Render()
"""