00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00026 #ifndef __vtkKWListBox_h
00027 #define __vtkKWListBox_h
00028
00029 #include "vtkKWCoreWidget.h"
00030
00031 class KWWidgets_EXPORT vtkKWListBox : public vtkKWCoreWidget
00032 {
00033
00034 public:
00035 static vtkKWListBox* New();
00036 vtkTypeRevisionMacro(vtkKWListBox,vtkKWCoreWidget);
00037 void PrintSelf(ostream& os, vtkIndent indent);
00038
00040
00041 virtual void GetBackgroundColor(double *r, double *g, double *b);
00042 virtual double* GetBackgroundColor();
00043 virtual void SetBackgroundColor(double r, double g, double b);
00044 virtual void SetBackgroundColor(double rgb[3])
00045 { this->SetBackgroundColor(rgb[0], rgb[1], rgb[2]); };
00047
00049
00050 virtual void GetForegroundColor(double *r, double *g, double *b);
00051 virtual double* GetForegroundColor();
00052 virtual void SetForegroundColor(double r, double g, double b);
00053 virtual void SetForegroundColor(double rgb[3])
00054 { this->SetForegroundColor(rgb[0], rgb[1], rgb[2]); };
00056
00058
00059 virtual void GetDisabledForegroundColor(double *r, double *g, double *b);
00060 virtual double* GetDisabledForegroundColor();
00061 virtual void SetDisabledForegroundColor(double r, double g, double b);
00062 virtual void SetDisabledForegroundColor(double rgb[3])
00063 { this->SetDisabledForegroundColor(rgb[0], rgb[1], rgb[2]); };
00065
00067
00070 virtual void SetHighlightThickness(int);
00071 virtual int GetHighlightThickness();
00073
00075
00078 virtual void SetBorderWidth(int);
00079 virtual int GetBorderWidth();
00081
00083
00086 virtual void SetRelief(int);
00087 virtual int GetRelief();
00088 virtual void SetReliefToRaised();
00089 virtual void SetReliefToSunken();
00090 virtual void SetReliefToFlat();
00091 virtual void SetReliefToRidge();
00092 virtual void SetReliefToSolid();
00093 virtual void SetReliefToGroove();
00095
00097
00108 virtual void SetFont(const char *font);
00109 virtual const char* GetFont();
00111
00113
00115 virtual void SetSelectionMode(int);
00116 virtual int GetSelectionMode();
00117 virtual void SetSelectionModeToSingle();
00118 virtual void SetSelectionModeToBrowse();
00119 virtual void SetSelectionModeToMultiple();
00120 virtual void SetSelectionModeToExtended();
00122
00124
00129 virtual void SetExportSelection(int);
00130 virtual int GetExportSelection();
00131 vtkBooleanMacro(ExportSelection, int);
00133
00135
00137 virtual const char *GetSelection();
00138 virtual int GetSelectionIndex();
00139 virtual void SetSelectionIndex(int);
00141
00143
00145 virtual void SetSelectState(int idx, int state);
00146 virtual int GetSelectState(int idx);
00148
00150 virtual void InsertEntry(int index, const char *name);
00151
00154 virtual int AppendUnique(const char* name);
00155
00158 virtual int Append(const char* name);
00159
00166 virtual void SetSelectionCommand(vtkObject *object, const char *method);
00167
00169
00177 virtual void SetDoubleClickCommand(vtkObject *obj, const char *method);
00178 virtual void SetSingleClickCommand(vtkObject *obj, const char *method);
00180
00182
00187 enum
00188 {
00189 ListBoxSelectionChangedEvent = 10000
00190 };
00191
00193
00195 virtual int GetNumberOfItems();
00196
00198 virtual const char* GetItem(int index);
00199
00201 virtual int GetItemIndex(const char* item);
00202
00204 virtual void DeleteRange(int start, int end);
00205
00207 virtual void DeleteAll();
00208
00210
00212 virtual void SetWidth(int);
00213 virtual int GetWidth();
00215
00217
00220 virtual void SetHeight(int);
00221 virtual int GetHeight();
00223
00230 virtual void UpdateEnableState();
00231
00233 virtual void SelectionCallback();
00234
00235
00236
00237 protected:
00238 vtkKWListBox();
00239 ~vtkKWListBox();
00240
00242 virtual void CreateWidget();
00243
00244 char* CurrentSelection;
00245 char* Item;
00246
00247 char *SelectionCommand;
00248 virtual void InvokeSelectionCommand();
00249
00250
00251
00252 private:
00253 vtkKWListBox(const vtkKWListBox&);
00254 void operator=(const vtkKWListBox&);
00255 };
00256
00257
00258 #endif
00259
00260
00261
00262