00001 /*========================================================================= 00002 00003 Program: ParaView 00004 Module: $RCSfile: vtkPVArraySelection.h,v $ 00005 00006 Copyright (c) Kitware, Inc. 00007 All rights reserved. 00008 See Copyright.txt or http://www.paraview.org/HTML/Copyright.html for details. 00009 00010 This software is distributed WITHOUT ANY WARRANTY; without even 00011 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00012 PURPOSE. See the above copyright notice for more information. 00013 00014 =========================================================================*/ 00024 #ifndef __vtkPVArraySelection_h 00025 #define __vtkPVArraySelection_h 00026 00027 #include "vtkPVWidget.h" 00028 00029 class vtkCollection; 00030 class vtkDataArraySelection; 00031 class vtkKWLabel; 00032 class vtkKWFrameWithLabel; 00033 class vtkKWPushButton; 00034 class vtkPVArraySelectionArraySet; 00035 class vtkKWFrame; 00036 00037 class VTK_EXPORT vtkPVArraySelection : public vtkPVWidget 00038 { 00039 public: 00040 static vtkPVArraySelection* New(); 00041 vtkTypeRevisionMacro(vtkPVArraySelection, vtkPVWidget); 00042 void PrintSelf(ostream& os, vtkIndent indent); 00043 00044 //BTX 00046 00048 virtual void Accept(); 00049 virtual void PostAccept(); 00051 //ETX 00052 00055 virtual void ResetInternal(); 00056 00059 virtual void Initialize(); 00060 00062 00064 vtkSetStringMacro(LabelText); 00065 vtkGetStringMacro(LabelText); 00067 00069 virtual void Create(vtkKWApplication *app); 00070 00072 00073 void AllOnCallback(); 00074 void AllOffCallback(); 00076 00078 void SetArrayStatus(const char *name, int status); 00079 00081 int GetNumberOfArrays(); 00082 00083 //BTX 00085 00088 vtkPVArraySelection* ClonePrototype(vtkPVSource* pvSource, 00089 vtkArrayMap<vtkPVWidget*, 00090 vtkPVWidget*>* map); 00092 //ETX 00093 00096 virtual void SaveInBatchScript(ofstream *file); 00097 00104 virtual void UpdateEnableState(); 00105 00106 protected: 00107 vtkPVArraySelection(); 00108 ~vtkPVArraySelection(); 00109 00110 // This serves a dual purpose. For tracing and for saving state. 00111 virtual void Trace(ofstream *file); 00112 00113 virtual void UpdateGUI(); 00114 virtual void UpdateSelections(int fromReader); 00115 virtual void SetPropertyFromGUI(); 00116 00117 char* LabelText; 00118 00119 vtkKWFrameWithLabel* LabeledFrame; 00120 00121 vtkKWFrame* ButtonFrame; 00122 vtkKWPushButton* AllOnButton; 00123 vtkKWPushButton* AllOffButton; 00124 00125 vtkKWFrame *CheckFrame; 00126 vtkCollection* ArrayCheckButtons; 00127 vtkKWLabel *NoArraysLabel; 00128 00129 vtkDataArraySelection* Selection; 00130 00131 vtkPVArraySelectionArraySet* ArraySet; 00132 00133 //BTX 00134 virtual void CopyProperties(vtkPVWidget* clone, vtkPVSource* pvSource, 00135 vtkArrayMap<vtkPVWidget*, vtkPVWidget*>* map); 00136 //ETX 00137 00138 int ReadXMLAttributes(vtkPVXMLElement* element, 00139 vtkPVXMLPackageParser* parser); 00140 00141 private: 00142 vtkPVArraySelection(const vtkPVArraySelection&); // Not implemented 00143 void operator=(const vtkPVArraySelection&); // Not implemented 00144 }; 00145 00146 #endif