Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

GUI/Client/vtkPVArrayMenu.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   ParaView
00004   Module:    $RCSfile: vtkPVArrayMenu.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 =========================================================================*/
00027 #ifndef __vtkPVArrayMenu_h
00028 #define __vtkPVArrayMenu_h
00029 
00030 #include "vtkPVWidget.h"
00031 
00032 class vtkPVInputMenu;
00033 class vtkPVFieldMenu;
00034 class vtkCollection;
00035 class vtkDataArray;
00036 class vtkPVDataSetAttributesInformation;
00037 class vtkPVArrayInformation;
00038 class vtkKWMenuButton;
00039 class vtkKWLabel;
00040 
00041 class VTK_EXPORT vtkPVArrayMenu : public vtkPVWidget
00042 {
00043 public:
00044   static vtkPVArrayMenu* New();
00045   vtkTypeRevisionMacro(vtkPVArrayMenu, vtkPVWidget);
00046   void PrintSelf(ostream& os, vtkIndent indent);
00047   
00048   virtual void Accept();
00049 
00051   virtual void Create(vtkKWApplication *app);
00052 
00054 
00056   void SetLabel (const char* label);
00057   const char* GetLabel();
00059 
00061 
00062   virtual void SetInputMenu(vtkPVInputMenu*);
00063   vtkGetObjectMacro(InputMenu, vtkPVInputMenu);
00065   
00067 
00068   virtual void SetFieldMenu(vtkPVFieldMenu*);
00069   vtkGetObjectMacro(FieldMenu, vtkPVFieldMenu);
00071 
00073 
00075   void SetValue(const char* name);
00076   const char* GetValue() { return this->ArrayName;}
00078 
00080 
00082   vtkSetStringMacro(ArrayName);
00083   vtkGetStringMacro(ArrayName);
00085 
00087   void ArrayMenuEntryCallback(const char* name);
00088 
00090   virtual void Update();
00091 
00092 //BTX
00094 
00097   vtkPVArrayMenu* ClonePrototype(vtkPVSource* pvSource,
00098                                  vtkArrayMap<vtkPVWidget*, vtkPVWidget*>* map);
00100 //ETX
00101 
00102   // This serves a dual purpose.  For tracing and for saving state.
00103   virtual void Trace(ofstream *file);
00104 
00111   virtual void UpdateEnableState();
00112  
00114   virtual void SaveInBatchScript(ofstream *file);
00115 
00117   virtual void Initialize();
00118  
00119 protected:
00120   vtkPVArrayMenu();
00121   ~vtkPVArrayMenu();
00122 
00123   // Gets called when the reset button is pressed.
00124   virtual void ResetInternal();
00125 
00126   // The selected array name in the menu.  Current value of the widget.
00127   char *ArrayName;
00128 
00129   // This is where we get the data object arrays to populate our menu.
00130   vtkPVInputMenu *InputMenu;
00131   vtkPVFieldMenu *FieldMenu;
00132 
00133   // Subwidgets.
00134   vtkKWLabel *Label;
00135   vtkKWMenuButton *ArrayMenu;
00136 
00137   // Resets the values based on the array.
00138   void UpdateArrayMenu();
00139 
00140   void UpdateProperty();
00141 
00142   char* InputAttributeIndex;
00143   vtkSetStringMacro(InputAttributeIndex);
00144 
00145 //BTX
00146   virtual vtkPVWidget* ClonePrototypeInternal(vtkPVSource* pvSource,
00147                               vtkArrayMap<vtkPVWidget*, vtkPVWidget*>* map);
00148   virtual void CopyProperties(vtkPVWidget* clone, vtkPVSource* pvSource,
00149                               vtkArrayMap<vtkPVWidget*, vtkPVWidget*>* map);
00150 //ETX
00151 
00152   int ReadXMLAttributes(vtkPVXMLElement* element,
00153                         vtkPVXMLPackageParser* parser);
00154 
00155   int CellData;
00156 
00157 private:
00158   vtkPVArrayMenu(const vtkPVArrayMenu&); // Not implemented
00159   void operator=(const vtkPVArrayMenu&); // Not implemented
00160 };
00161 
00162 #endif

Generated on Tue May 30 12:31:38 2006 for ParaView by doxygen 1.3.5