00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00020 #ifndef __vtkKWPushButton_h
00021 #define __vtkKWPushButton_h
00022
00023 #include "vtkKWCoreWidget.h"
00024
00025 class vtkKWIcon;
00026
00027 class KWWidgets_EXPORT vtkKWPushButton : public vtkKWCoreWidget
00028 {
00029
00030 public:
00031 static vtkKWPushButton* New();
00032 vtkTypeRevisionMacro(vtkKWPushButton,vtkKWCoreWidget);
00033 void PrintSelf(ostream& os, vtkIndent indent);
00034
00036
00037 virtual void SetText(const char *label);
00038 virtual char *GetText();
00040
00042
00044 virtual void SetWidth(int width);
00045 virtual int GetWidth();
00047
00049
00051 virtual void SetHeight(int height);
00052 virtual int GetHeight();
00054
00061 virtual void SetCommand(vtkObject *object, const char *method);
00062
00064
00065 enum
00066 {
00067 InvokedEvent = 10000
00068 };
00069
00071
00073
00074 virtual void GetBackgroundColor(double *r, double *g, double *b);
00075 virtual double* GetBackgroundColor();
00076 virtual void SetBackgroundColor(double r, double g, double b);
00077 virtual void SetBackgroundColor(double rgb[3])
00078 { this->SetBackgroundColor(rgb[0], rgb[1], rgb[2]); };
00080
00082
00083 virtual void GetForegroundColor(double *r, double *g, double *b);
00084 virtual double* GetForegroundColor();
00085 virtual void SetForegroundColor(double r, double g, double b);
00086 virtual void SetForegroundColor(double rgb[3])
00087 { this->SetForegroundColor(rgb[0], rgb[1], rgb[2]); };
00089
00091
00094 virtual void SetHighlightThickness(int);
00095 virtual int GetHighlightThickness();
00097
00099
00103 virtual void GetActiveBackgroundColor(double *r, double *g, double *b);
00104 virtual double* GetActiveBackgroundColor();
00105 virtual void SetActiveBackgroundColor(double r, double g, double b);
00106 virtual void SetActiveBackgroundColor(double rgb[3])
00107 { this->SetActiveBackgroundColor(rgb[0], rgb[1], rgb[2]); };
00109
00111
00115 virtual void GetActiveForegroundColor(double *r, double *g, double *b);
00116 virtual double* GetActiveForegroundColor();
00117 virtual void SetActiveForegroundColor(double r, double g, double b);
00118 virtual void SetActiveForegroundColor(double rgb[3])
00119 { this->SetActiveForegroundColor(rgb[0], rgb[1], rgb[2]); };
00121
00123
00124 virtual void GetDisabledForegroundColor(double *r, double *g, double *b);
00125 virtual double* GetDisabledForegroundColor();
00126 virtual void SetDisabledForegroundColor(double r, double g, double b);
00127 virtual void SetDisabledForegroundColor(double rgb[3])
00128 { this->SetDisabledForegroundColor(rgb[0], rgb[1], rgb[2]); };
00130
00132
00135 virtual void SetBorderWidth(int);
00136 virtual int GetBorderWidth();
00138
00140
00143 virtual void SetRelief(int);
00144 virtual int GetRelief();
00145 virtual void SetReliefToRaised();
00146 virtual void SetReliefToSunken();
00147 virtual void SetReliefToFlat();
00148 virtual void SetReliefToRidge();
00149 virtual void SetReliefToSolid();
00150 virtual void SetReliefToGroove();
00152
00154
00162 virtual void SetPadX(int);
00163 virtual int GetPadX();
00164 virtual void SetPadY(int);
00165 virtual int GetPadY();
00167
00169
00172 virtual void SetAnchor(int);
00173 virtual int GetAnchor();
00174 virtual void SetAnchorToNorth();
00175 virtual void SetAnchorToNorthEast();
00176 virtual void SetAnchorToEast();
00177 virtual void SetAnchorToSouthEast();
00178 virtual void SetAnchorToSouth();
00179 virtual void SetAnchorToSouthWest();
00180 virtual void SetAnchorToWest();
00181 virtual void SetAnchorToNorthWest();
00182 virtual void SetAnchorToCenter();
00184
00186
00193 virtual void SetOverRelief(int);
00194 virtual int GetOverRelief();
00195 virtual void SetOverReliefToRaised();
00196 virtual void SetOverReliefToSunken();
00197 virtual void SetOverReliefToFlat();
00198 virtual void SetOverReliefToRidge();
00199 virtual void SetOverReliefToSolid();
00200 virtual void SetOverReliefToGroove();
00201 virtual void SetOverReliefToNone();
00203
00205
00216 virtual void SetFont(const char *font);
00217 virtual const char* GetFont();
00219
00221
00237 virtual void SetImageToIcon(vtkKWIcon *icon);
00238 virtual void SetImageToPredefinedIcon(int icon_index);
00239 virtual void SetImageToPixels(
00240 const unsigned char *pixels, int width, int height, int pixel_size,
00241 unsigned long buffer_length = 0);
00243
00245
00251 virtual void SetCompoundMode(int);
00252 virtual int GetCompoundMode();
00253 virtual void SetCompoundModeToNone();
00254 virtual void SetCompoundModeToLeft();
00255 virtual void SetCompoundModeToCenter();
00256 virtual void SetCompoundModeToRight();
00257 virtual void SetCompoundModeToTop();
00258 virtual void SetCompoundModeToBottom();
00260
00267 virtual void UpdateEnableState();
00268
00270 virtual void CommandCallback();
00271
00272
00273
00274 protected:
00275 vtkKWPushButton();
00276 ~vtkKWPushButton();
00277
00279 virtual void CreateWidget();
00280
00281 vtkSetStringMacro(ButtonText);
00282 char* ButtonText;
00283
00284 char *Command;
00285 virtual void InvokeCommand();
00286
00287
00288
00289 private:
00290 vtkKWPushButton(const vtkKWPushButton&);
00291 void operator=(const vtkKWPushButton&);
00292 };
00293
00294
00295 #endif
00296
00297
00298
00299