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 public:
00030 static vtkKWPushButton* New();
00031 vtkTypeRevisionMacro(vtkKWPushButton,vtkKWCoreWidget);
00032 void PrintSelf(ostream& os, vtkIndent indent);
00033
00035 virtual void Create(vtkKWApplication *app);
00036
00038
00039 virtual void SetText(const char *label);
00040 virtual char *GetText();
00042
00044
00046 virtual void SetWidth(int width);
00047 virtual int GetWidth();
00049
00051
00053 virtual void SetHeight(int height);
00054 virtual int GetHeight();
00056
00063 virtual void SetCommand(vtkObject *object, const char *method);
00064
00066
00069 virtual void SetAnchor(int);
00070 virtual int GetAnchor();
00071 virtual void SetAnchorToNorth()
00072 { this->SetAnchor(vtkKWTkOptions::AnchorNorth); };
00073 virtual void SetAnchorToNorthEast()
00074 { this->SetAnchor(vtkKWTkOptions::AnchorNorthEast); };
00075 virtual void SetAnchorToEast()
00076 { this->SetAnchor(vtkKWTkOptions::AnchorEast); };
00077 virtual void SetAnchorToSouthEast()
00078 { this->SetAnchor(vtkKWTkOptions::AnchorSouthEast); };
00079 virtual void SetAnchorToSouth()
00080 { this->SetAnchor(vtkKWTkOptions::AnchorSouth); };
00081 virtual void SetAnchorToSouthWest()
00082 { this->SetAnchor(vtkKWTkOptions::AnchorSouthWest); };
00083 virtual void SetAnchorToWest()
00084 { this->SetAnchor(vtkKWTkOptions::AnchorWest); };
00085 virtual void SetAnchorToNorthWest()
00086 { this->SetAnchor(vtkKWTkOptions::AnchorNorthWest); };
00087 virtual void SetAnchorToCenter()
00088 { this->SetAnchor(vtkKWTkOptions::AnchorCenter); };
00090
00092
00099 virtual void SetOverRelief(int);
00100 virtual int GetOverRelief();
00101 virtual void SetOverReliefToRaised()
00102 { this->SetOverRelief(vtkKWTkOptions::ReliefRaised); };
00103 virtual void SetOverReliefToSunken()
00104 { this->SetOverRelief(vtkKWTkOptions::ReliefSunken); };
00105 virtual void SetOverReliefToFlat()
00106 { this->SetOverRelief(vtkKWTkOptions::ReliefFlat); };
00107 virtual void SetOverReliefToRidge()
00108 { this->SetOverRelief(vtkKWTkOptions::ReliefRidge); };
00109 virtual void SetOverReliefToSolid()
00110 { this->SetOverRelief(vtkKWTkOptions::ReliefSolid); };
00111 virtual void SetOverReliefToGroove()
00112 { this->SetOverRelief(vtkKWTkOptions::ReliefGroove); };
00113 virtual void SetOverReliefToNone()
00114 { this->SetOverRelief(vtkKWTkOptions::ReliefUnknown); };
00116
00118
00133 virtual void SetImageToIcon(vtkKWIcon *icon);
00134 virtual void SetImageToPredefinedIcon(int icon_index);
00135 virtual void SetImageToPixels(
00136 const unsigned char *pixels, int width, int height, int pixel_size,
00137 unsigned long buffer_length = 0);
00139
00146 virtual void UpdateEnableState();
00147
00148 protected:
00149 vtkKWPushButton();
00150 ~vtkKWPushButton();
00151
00152 vtkSetStringMacro(ButtonText);
00153 char* ButtonText;
00154
00155 private:
00156 vtkKWPushButton(const vtkKWPushButton&);
00157 void operator=(const vtkKWPushButton&);
00158 };
00159
00160
00161 #endif
00162
00163
00164