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

GUI/Client/vtkPVSelectionList.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   ParaView
00004   Module:    $RCSfile: vtkPVSelectionList.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 =========================================================================*/
00025 #ifndef __vtkPVSelectionList_h
00026 #define __vtkPVSelectionList_h
00027 
00028 #include "vtkPVObjectWidget.h"
00029 
00030 class vtkStringList;
00031 class vtkKWMenuButton;
00032 class vtkKWLabel;
00033 
00034 class VTK_EXPORT vtkPVSelectionList : public vtkPVObjectWidget
00035 {
00036 public:
00037   static vtkPVSelectionList* New();
00038   vtkTypeRevisionMacro(vtkPVSelectionList, vtkPVObjectWidget);
00039   void PrintSelf(ostream& os, vtkIndent indent);
00040   
00042   virtual void Create(vtkKWApplication *app);
00043 
00044   // Add items to the possible selection.
00045   // The string name is displayed in the list, and the integer value
00046   // is used to set and get the current selection programmatically.
00047   void AddItem(const char *name, int value);
00048 
00050   int GetValue(const char* name);
00051   
00053   void RemoveAllItems();
00054   
00056 
00057   void SetLabel(const char *label);
00058   const char *GetLabel();
00060 
00062 
00063   void SetLabelVisibility(int visible);
00064   vtkGetMacro(LabelVisibility, int);
00065   void ShowLabel() { this->SetLabelVisibility(1); }
00066   void HideLabel() { this->SetLabelVisibility(0); }
00068 
00070 
00072   vtkGetMacro(CurrentValue, int);
00073   void SetCurrentValue(int val);
00074   vtkGetStringMacro(CurrentName);
00076 
00078 
00080   vtkSetMacro(OptionWidth, int);
00082   
00085   void SelectCallback(const char *name, int value);
00086 
00089   virtual void SetBalloonHelpString(const char *str);
00090 
00092   void Disable();
00093   
00094 //BTX
00096 
00099   vtkPVSelectionList* ClonePrototype(vtkPVSource* pvSource,
00100                                      vtkArrayMap<vtkPVWidget*, vtkPVWidget*>* map);
00102 //ETX
00103 
00105   virtual void Accept();
00106 
00109   virtual void ResetInternal();
00110 
00112   virtual void Initialize();
00113 
00115   virtual void Trace(ofstream *file);
00116 
00123   virtual void UpdateEnableState();
00124  
00126   virtual void SaveInBatchScript(ofstream *file);
00127 
00129   int GetNumberOfItems();
00130 protected:
00131   vtkPVSelectionList();
00132   ~vtkPVSelectionList();
00133 
00134   vtkKWLabel *Label;
00135   vtkKWMenuButton *Menu;
00136   char *Command;
00137 
00138   int LabelVisibility;
00139   int OptionWidth;
00140 
00141   int CurrentValue;
00142   char *CurrentName;
00143   // Using this list as an array of strings.
00144   vtkStringList *Names;
00145 
00146   vtkSetStringMacro(CurrentName);
00147 
00148 //BTX
00149   virtual void CopyProperties(vtkPVWidget* clone, vtkPVSource* pvSource,
00150                               vtkArrayMap<vtkPVWidget*, vtkPVWidget*>* map);
00151 //ETX
00152   
00153   int ReadXMLAttributes(vtkPVXMLElement* element,
00154                         vtkPVXMLPackageParser* parser);
00155 
00156 private:
00157   vtkPVSelectionList(const vtkPVSelectionList&); // Not implemented
00158   void operator=(const vtkPVSelectionList&); // Not implemented
00159 };
00160 
00161 #endif

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