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

GUI/Client/vtkPVSelectWidget.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   ParaView
00004   Module:    $RCSfile: vtkPVSelectWidget.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 __vtkPVSelectWidget_h
00025 #define __vtkPVSelectWidget_h
00026 
00027 #include "vtkPVObjectWidget.h"
00028 
00029 class vtkStringList;
00030 class vtkKWMenuButton;
00031 class vtkKWLabel;
00032 class vtkPVSource;
00033 class vtkPVWidgetCollection;
00034 class vtkKWFrameWithLabel;
00035 class vtkStringList;
00036 
00037 //BTX
00038 template <class key, class data> 
00039 class vtkArrayMap;
00040 //ETX
00041 
00042 class VTK_EXPORT vtkPVSelectWidget : public vtkPVObjectWidget
00043 {
00044 public:
00045   static vtkPVSelectWidget* New();
00046   vtkTypeRevisionMacro(vtkPVSelectWidget, vtkPVObjectWidget);
00047   void PrintSelf(ostream& os, vtkIndent indent);
00048   
00050   virtual void Create(vtkKWApplication *app);
00051 
00054   void AddItem(const char* labelVal, vtkPVWidget *pvw, const char* vtkVal);
00055   
00057   vtkPVWidget *GetPVWidget(const char* label);
00058 
00060   void SetLabel(const char *label);
00061 
00063   virtual int GetModifiedFlag();
00064 
00067   virtual void Select();
00068 
00071   virtual void Deselect();
00072 
00074 
00076   const char* GetCurrentValue();
00077   void SetCurrentValue(const char* val);
00079 
00081   void MenuCallback();
00082 
00084   vtkKWWidget *GetFrame();
00085 
00087 
00089   const char* GetCurrentVTKValue();
00090   const char* GetVTKValue(int i);
00092     
00093 //BTX
00095 
00098   vtkPVSelectWidget* ClonePrototype(vtkPVSource* pvSource,
00099                                     vtkArrayMap<vtkPVWidget*, 
00100                                     vtkPVWidget*>* map);
00102 //ETX
00103 
00104   //BTX
00106 
00108   virtual void Accept();
00109   virtual void PostAccept();
00110   //ETX
00112 
00114 
00116   virtual void Reset();
00117   virtual void ResetInternal();
00119 
00121   virtual void Initialize();
00122 
00124   virtual void Trace(ofstream *file);
00125 
00132   virtual void UpdateEnableState();
00133  
00135   virtual void SaveInBatchScript(ofstream *file);
00136 
00138   virtual void UpdateVTKObjects();
00139 
00140 protected:
00141   vtkPVSelectWidget();
00142   ~vtkPVSelectWidget();
00143 
00144   int FindIndex(const char* str, vtkStringList *list);
00145   void SetCurrentIndex(int idx);
00146 
00147   vtkKWFrameWithLabel *LabeledFrame;
00148   vtkKWMenuButton *Menu;
00149 
00150   vtkSetStringMacro(EntryLabel);
00151   vtkGetStringMacro(EntryLabel);
00152   char* EntryLabel;
00153 
00154   // Using this list as an array of strings.
00155   vtkStringList *Labels;
00156   vtkStringList *Values;
00157   vtkPVWidgetCollection *Widgets;
00158 
00159   int CurrentIndex;
00160   
00161 //BTX
00162   virtual vtkPVWidget* ClonePrototypeInternal(vtkPVSource* pvSource,
00163                               vtkArrayMap<vtkPVWidget*, vtkPVWidget*>* map);
00164   virtual void CopyProperties(vtkPVWidget* clone, vtkPVSource* pvSource,
00165                               vtkArrayMap<vtkPVWidget*, vtkPVWidget*>* map);
00166 //ETX
00167   
00168   int ReadXMLAttributes(vtkPVXMLElement* element,
00169                         vtkPVXMLPackageParser* parser);
00170 
00171 private:
00172   vtkPVSelectWidget(const vtkPVSelectWidget&); // Not implemented
00173   void operator=(const vtkPVSelectWidget&); // Not implemented
00174 };
00175 
00176 #endif

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