00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00026 #ifndef __vtkKWLabel_h
00027 #define __vtkKWLabel_h
00028
00029 #include "vtkKWCoreWidget.h"
00030
00031 class vtkKWIcon;
00032
00033 class KWWidgets_EXPORT vtkKWLabel : public vtkKWCoreWidget
00034 {
00035
00036 public:
00037 static vtkKWLabel* New();
00038 vtkTypeRevisionMacro(vtkKWLabel,vtkKWCoreWidget);
00039 void PrintSelf(ostream& os, vtkIndent indent);
00040
00042
00043 virtual void SetText(const char*);
00044 vtkGetStringMacro(Text);
00046
00048
00051 virtual void SetWidth(int);
00052 virtual int GetWidth();
00054
00056
00059 virtual void SetHeight(int);
00060 virtual int GetHeight();
00062
00064
00068 virtual void SetJustification(int);
00069 virtual int GetJustification();
00070 virtual void SetJustificationToLeft();
00071 virtual void SetJustificationToCenter();
00072 virtual void SetJustificationToRight();
00074
00076
00079 virtual void SetAnchor(int);
00080 virtual int GetAnchor();
00081 virtual void SetAnchorToNorth();
00082 virtual void SetAnchorToNorthEast();
00083 virtual void SetAnchorToEast();
00084 virtual void SetAnchorToSouthEast();
00085 virtual void SetAnchorToSouth();
00086 virtual void SetAnchorToSouthWest();
00087 virtual void SetAnchorToWest();
00088 virtual void SetAnchorToNorthWest();
00089 virtual void SetAnchorToCenter();
00091
00093
00094 virtual void GetBackgroundColor(double *r, double *g, double *b);
00095 virtual double* GetBackgroundColor();
00096 virtual void SetBackgroundColor(double r, double g, double b);
00097 virtual void SetBackgroundColor(double rgb[3])
00098 { this->SetBackgroundColor(rgb[0], rgb[1], rgb[2]); };
00100
00102
00103 virtual void GetForegroundColor(double *r, double *g, double *b);
00104 virtual double* GetForegroundColor();
00105 virtual void SetForegroundColor(double r, double g, double b);
00106 virtual void SetForegroundColor(double rgb[3])
00107 { this->SetForegroundColor(rgb[0], rgb[1], rgb[2]); };
00108 virtual void GetDefaultForegroundColor(double *r, double *g, double *b);
00109 virtual double* GetDefaultForegroundColor();
00111
00113
00116 virtual void SetHighlightThickness(int);
00117 virtual int GetHighlightThickness();
00119
00121
00125 virtual void GetActiveBackgroundColor(double *r, double *g, double *b);
00126 virtual double* GetActiveBackgroundColor();
00127 virtual void SetActiveBackgroundColor(double r, double g, double b);
00128 virtual void SetActiveBackgroundColor(double rgb[3])
00129 { this->SetActiveBackgroundColor(rgb[0], rgb[1], rgb[2]); };
00131
00133
00137 virtual void GetActiveForegroundColor(double *r, double *g, double *b);
00138 virtual double* GetActiveForegroundColor();
00139 virtual void SetActiveForegroundColor(double r, double g, double b);
00140 virtual void SetActiveForegroundColor(double rgb[3])
00141 { this->SetActiveForegroundColor(rgb[0], rgb[1], rgb[2]); };
00143
00145
00146 virtual void GetDisabledForegroundColor(double *r, double *g, double *b);
00147 virtual double* GetDisabledForegroundColor();
00148 virtual void SetDisabledForegroundColor(double r, double g, double b);
00149 virtual void SetDisabledForegroundColor(double rgb[3])
00150 { this->SetDisabledForegroundColor(rgb[0], rgb[1], rgb[2]); };
00152
00154
00157 virtual void SetBorderWidth(int);
00158 virtual int GetBorderWidth();
00160
00162
00165 virtual void SetRelief(int);
00166 virtual int GetRelief();
00167 virtual void SetReliefToRaised();
00168 virtual void SetReliefToSunken();
00169 virtual void SetReliefToFlat();
00170 virtual void SetReliefToRidge();
00171 virtual void SetReliefToSolid();
00172 virtual void SetReliefToGroove();
00174
00176
00184 virtual void SetPadX(int);
00185 virtual int GetPadX();
00186 virtual void SetPadY(int);
00187 virtual int GetPadY();
00189
00191
00199 virtual void SetWrapLength(const char *length);
00200 virtual const char* GetWrapLength();
00202
00204
00206 virtual void SetAdjustWrapLengthToWidth(int);
00207 vtkGetMacro(AdjustWrapLengthToWidth, int);
00208 vtkBooleanMacro(AdjustWrapLengthToWidth, int);
00210
00212
00223 virtual void SetFont(const char *font);
00224 virtual const char* GetFont();
00226
00228
00244 virtual void SetImageToIcon(vtkKWIcon *icon);
00245 virtual void SetImageToPredefinedIcon(int icon_index);
00246 virtual void SetImageToPixels(
00247 const unsigned char *pixels, int width, int height, int pixel_size,
00248 unsigned long buffer_length = 0);
00250
00252
00258 virtual void SetCompoundMode(int);
00259 virtual int GetCompoundMode();
00260 virtual void SetCompoundModeToNone();
00261 virtual void SetCompoundModeToLeft();
00262 virtual void SetCompoundModeToCenter();
00263 virtual void SetCompoundModeToRight();
00264 virtual void SetCompoundModeToTop();
00265 virtual void SetCompoundModeToBottom();
00267
00274 virtual void UpdateEnableState();
00275
00277 virtual void AdjustWrapLengthToWidthCallback();
00278
00279
00280
00281 protected:
00282 vtkKWLabel();
00283 ~vtkKWLabel();
00284
00286 virtual void CreateWidget();
00287
00288 virtual void UpdateBindings();
00289 virtual void UpdateText();
00290
00291
00292
00293 private:
00294 char* Text;
00295 int AdjustWrapLengthToWidth;
00296 vtkKWIcon *Icon;
00297
00298 vtkKWLabel(const vtkKWLabel&);
00299 void operator=(const vtkKWLabel&);
00300 };
00301
00302 #endif
00303