00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00024 #ifndef __vtkKWCheckButton_h
00025 #define __vtkKWCheckButton_h
00026
00027 #include "vtkKWCoreWidget.h"
00028
00029 class vtkKWIcon;
00030
00031 class KWWidgets_EXPORT vtkKWCheckButton : public vtkKWCoreWidget
00032 {
00033
00034 public:
00035 static vtkKWCheckButton* New();
00036 vtkTypeRevisionMacro(vtkKWCheckButton,vtkKWCoreWidget);
00037 void PrintSelf(ostream& os, vtkIndent indent);
00038
00040
00041 virtual void SetSelectedState(int );
00042 virtual int GetSelectedState();
00043 vtkBooleanMacro(SelectedState, int);
00044 virtual void ToggleSelectedState();
00045 virtual void Select() { this->SetSelectedState(1); };
00046 virtual void Deselect() { this->SetSelectedState(0); };
00048
00050
00051 virtual void SetIndicatorVisibility(int ind);
00052 vtkGetMacro(IndicatorVisibility, int);
00053 vtkBooleanMacro(IndicatorVisibility, int);
00055
00057
00058 virtual void SetText(const char* txt);
00059 virtual const char* GetText();
00061
00063
00065 vtkGetStringMacro(VariableName);
00066 virtual void SetVariableName(const char *);
00068
00076 virtual void SetCommand(vtkObject *object, const char *method);
00077
00079
00082 enum
00083 {
00084 SelectedStateChangedEvent = 10000
00085 };
00086
00088
00090
00091 virtual void GetBackgroundColor(double *r, double *g, double *b);
00092 virtual double* GetBackgroundColor();
00093 virtual void SetBackgroundColor(double r, double g, double b);
00094 virtual void SetBackgroundColor(double rgb[3])
00095 { this->SetBackgroundColor(rgb[0], rgb[1], rgb[2]); };
00097
00099
00100 virtual void GetForegroundColor(double *r, double *g, double *b);
00101 virtual double* GetForegroundColor();
00102 virtual void SetForegroundColor(double r, double g, double b);
00103 virtual void SetForegroundColor(double rgb[3])
00104 { this->SetForegroundColor(rgb[0], rgb[1], rgb[2]); };
00106
00108
00111 virtual void SetHighlightThickness(int);
00112 virtual int GetHighlightThickness();
00114
00116
00120 virtual void GetActiveBackgroundColor(double *r, double *g, double *b);
00121 virtual double* GetActiveBackgroundColor();
00122 virtual void SetActiveBackgroundColor(double r, double g, double b);
00123 virtual void SetActiveBackgroundColor(double rgb[3])
00124 { this->SetActiveBackgroundColor(rgb[0], rgb[1], rgb[2]); };
00126
00128
00132 virtual void GetActiveForegroundColor(double *r, double *g, double *b);
00133 virtual double* GetActiveForegroundColor();
00134 virtual void SetActiveForegroundColor(double r, double g, double b);
00135 virtual void SetActiveForegroundColor(double rgb[3])
00136 { this->SetActiveForegroundColor(rgb[0], rgb[1], rgb[2]); };
00138
00140
00141 virtual void GetDisabledForegroundColor(double *r, double *g, double *b);
00142 virtual double* GetDisabledForegroundColor();
00143 virtual void SetDisabledForegroundColor(double r, double g, double b);
00144 virtual void SetDisabledForegroundColor(double rgb[3])
00145 { this->SetDisabledForegroundColor(rgb[0], rgb[1], rgb[2]); };
00147
00149
00152 virtual void SetBorderWidth(int);
00153 virtual int GetBorderWidth();
00155
00157
00160 virtual void SetRelief(int);
00161 virtual int GetRelief();
00162 virtual void SetReliefToRaised();
00163 virtual void SetReliefToSunken();
00164 virtual void SetReliefToFlat();
00165 virtual void SetReliefToRidge();
00166 virtual void SetReliefToSolid();
00167 virtual void SetReliefToGroove();
00169
00171
00179 virtual void SetPadX(int);
00180 virtual int GetPadX();
00181 virtual void SetPadY(int);
00182 virtual int GetPadY();
00184
00186
00189 virtual void SetAnchor(int);
00190 virtual int GetAnchor();
00191 virtual void SetAnchorToNorth();
00192 virtual void SetAnchorToNorthEast();
00193 virtual void SetAnchorToEast();
00194 virtual void SetAnchorToSouthEast();
00195 virtual void SetAnchorToSouth();
00196 virtual void SetAnchorToSouthWest();
00197 virtual void SetAnchorToWest();
00198 virtual void SetAnchorToNorthWest();
00199 virtual void SetAnchorToCenter();
00201
00203
00213 virtual void SetOffRelief(int);
00214 virtual int GetOffRelief();
00215 virtual void SetOffReliefToRaised();
00216 virtual void SetOffReliefToSunken();
00217 virtual void SetOffReliefToFlat();
00218 virtual void SetOffReliefToRidge();
00219 virtual void SetOffReliefToSolid();
00220 virtual void SetOffReliefToGroove();
00222
00224
00231 virtual void SetOverRelief(int);
00232 virtual int GetOverRelief();
00233 virtual void SetOverReliefToRaised();
00234 virtual void SetOverReliefToSunken();
00235 virtual void SetOverReliefToFlat();
00236 virtual void SetOverReliefToRidge();
00237 virtual void SetOverReliefToSolid();
00238 virtual void SetOverReliefToGroove();
00239 virtual void SetOverReliefToNone();
00241
00243
00254 virtual void SetFont(const char *font);
00255 virtual const char* GetFont();
00257
00259
00275 virtual void SetImageToIcon(vtkKWIcon *icon);
00276 virtual void SetImageToPredefinedIcon(int icon_index);
00277 virtual void SetImageToPixels(
00278 const unsigned char *pixels, int width, int height, int pixel_size,
00279 unsigned long buffer_length = 0);
00281
00283
00301 virtual void SetSelectImageToIcon(vtkKWIcon *icon);
00302 virtual void SetSelectImageToPredefinedIcon(int icon_index);
00303 virtual void SetSelectImageToPixels(
00304 const unsigned char *pixels, int width, int height, int pixel_size,
00305 unsigned long buffer_length = 0);
00307
00309
00315 virtual void SetCompoundMode(int);
00316 virtual int GetCompoundMode();
00317 virtual void SetCompoundModeToNone();
00318 virtual void SetCompoundModeToLeft();
00319 virtual void SetCompoundModeToCenter();
00320 virtual void SetCompoundModeToRight();
00321 virtual void SetCompoundModeToTop();
00322 virtual void SetCompoundModeToBottom();
00324
00326
00327 virtual void GetSelectColor(double *r, double *g, double *b);
00328 virtual double* GetSelectColor();
00329 virtual void SetSelectColor(double r, double g, double b);
00330 virtual void SetSelectColor(double rgb[3])
00331 { this->SetSelectColor(rgb[0], rgb[1], rgb[2]); };
00333
00340 virtual void UpdateEnableState();
00341
00343 virtual void CommandCallback();
00344
00345
00346
00347 protected:
00348
00350 virtual void CreateWidget();
00351
00352 vtkSetStringMacro(InternalText);
00353
00354 vtkKWCheckButton();
00355 ~vtkKWCheckButton();
00356
00357 int IndicatorVisibility;
00358
00359 char *InternalText;
00360 char *VariableName;
00361
00362 virtual void Configure();
00363
00364 char *Command;
00365 virtual void InvokeCommand(int state);
00366
00367
00368
00369 private:
00370 vtkKWCheckButton(const vtkKWCheckButton&);
00371 void operator=(const vtkKWCheckButton&);
00372 };
00373
00374 #endif
00375