00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00023 #ifndef __vtkKWListBox_h
00024 #define __vtkKWListBox_h
00025
00026 #include "vtkKWCoreWidget.h"
00027
00028 class vtkKWApplication;
00029
00030 class KWWIDGETS_EXPORT vtkKWListBox : public vtkKWCoreWidget
00031 {
00032 public:
00033 static vtkKWListBox* New();
00034 vtkTypeRevisionMacro(vtkKWListBox,vtkKWCoreWidget);
00035 void PrintSelf(ostream& os, vtkIndent indent);
00036
00038 virtual void Create(vtkKWApplication *app);
00039
00041
00043 virtual void SetSelectionMode(int);
00044 virtual int GetSelectionMode();
00045 virtual void SetSelectionModeToSingle()
00046 { this->SetSelectionMode(vtkKWTkOptions::SelectionModeSingle); };
00047 virtual void SetSelectionModeToBrowse()
00048 { this->SetSelectionMode(vtkKWTkOptions::SelectionModeBrowse); };
00049 virtual void SetSelectionModeToMultiple()
00050 { this->SetSelectionMode(vtkKWTkOptions::SelectionModeMultiple); };
00051 virtual void SetSelectionModeToExtended()
00052 { this->SetSelectionMode(vtkKWTkOptions::SelectionModeExtended); };
00054
00056
00061 virtual void SetExportSelection(int);
00062 virtual int GetExportSelection();
00063 vtkBooleanMacro(ExportSelection, int);
00065
00067
00069 virtual const char *GetSelection();
00070 virtual int GetSelectionIndex();
00071 virtual void SetSelectionIndex(int);
00073
00075
00077 virtual void SetSelectState(int idx, int state);
00078 virtual int GetSelectState(int idx);
00080
00082 virtual void InsertEntry(int index, const char *name);
00083
00086 virtual int AppendUnique(const char* name);
00087
00090 virtual int Append(const char* name);
00091
00093
00094 virtual void SetDoubleClickCommand(vtkObject *obj, const char *method);
00095 virtual void SetSingleClickCommand(vtkObject *obj, const char *method);
00097
00099 virtual int GetNumberOfItems();
00100
00102 virtual const char* GetItem(int index);
00103
00105 virtual int GetItemIndex(const char* item);
00106
00108 virtual void DeleteRange(int start, int end);
00109
00111 virtual void DeleteAll();
00112
00114
00116 virtual void SetWidth(int);
00117 virtual int GetWidth();
00119
00121
00124 virtual void SetHeight(int);
00125 virtual int GetHeight();
00127
00134 virtual void UpdateEnableState();
00135
00136 protected:
00137 vtkKWListBox();
00138 ~vtkKWListBox();
00139
00140 char* CurrentSelection;
00141 char* Item;
00142
00143 private:
00144 vtkKWListBox(const vtkKWListBox&);
00145 void operator=(const vtkKWListBox&);
00146 };
00147
00148
00149 #endif
00150
00151
00152