00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00021 #ifndef __vtkKWWidgetWithLabel_h
00022 #define __vtkKWWidgetWithLabel_h
00023
00024 #include "vtkKWCompositeWidget.h"
00025
00026 class vtkKWApplication;
00027 class vtkKWLabel;
00028
00029 class KWWIDGETS_EXPORT vtkKWWidgetWithLabel : public vtkKWCompositeWidget
00030 {
00031 public:
00032 static vtkKWWidgetWithLabel* New();
00033 vtkTypeRevisionMacro(vtkKWWidgetWithLabel, vtkKWCompositeWidget);
00034 void PrintSelf(ostream& os, vtkIndent indent);
00035
00037 virtual void Create(vtkKWApplication *app);
00038
00040
00047 virtual void SetLabelVisibility(int);
00048 vtkBooleanMacro(LabelVisibility, int);
00049 vtkGetMacro(LabelVisibility, int);
00051
00053
00058 virtual vtkKWLabel* GetLabel();
00059 virtual int HasLabel();
00061
00063
00066 virtual void SetLabelText(const char *);
00067 const char* GetLabelText();
00069
00071
00074 virtual void SetLabelWidth(int width);
00075 virtual int GetLabelWidth();
00077
00079
00082 enum
00083 {
00084 LabelPositionDefault = 0,
00085 LabelPositionTop,
00086 LabelPositionBottom,
00087 LabelPositionLeft,
00088 LabelPositionRight
00089 };
00090
00091 virtual void SetLabelPosition(int);
00092 vtkGetMacro(LabelPosition, int);
00093 virtual void SetLabelPositionToDefault()
00094 { this->SetLabelPosition(vtkKWWidgetWithLabel::LabelPositionDefault); };
00095 virtual void SetLabelPositionToTop()
00096 { this->SetLabelPosition(vtkKWWidgetWithLabel::LabelPositionTop); };
00097 virtual void SetLabelPositionToBottom()
00098 { this->SetLabelPosition(vtkKWWidgetWithLabel::LabelPositionBottom); };
00099 virtual void SetLabelPositionToLeft()
00100 { this->SetLabelPosition(vtkKWWidgetWithLabel::LabelPositionLeft); };
00101 virtual void SetLabelPositionToRight()
00102 { this->SetLabelPosition(vtkKWWidgetWithLabel::LabelPositionRight); };
00104
00107 virtual void SetBalloonHelpString(const char *str);
00108
00115 virtual void UpdateEnableState();
00116
00117 protected:
00118 vtkKWWidgetWithLabel();
00119 ~vtkKWWidgetWithLabel();
00120
00122 int LabelVisibility;
00123
00125 int LabelPosition;
00126
00128 virtual void CreateLabel(vtkKWApplication *app);
00129
00131 virtual void Pack() {};
00132
00133 private:
00134
00138 vtkKWLabel *Label;
00139
00140 vtkKWWidgetWithLabel(const vtkKWWidgetWithLabel&);
00141 void operator=(const vtkKWWidgetWithLabel&);
00142 };
00143
00144 #endif