00001 /*========================================================================= 00002 00003 Module: $RCSfile: vtkKWWidgetWithLabel.h,v $ 00004 00005 Copyright (c) Kitware, Inc. 00006 All rights reserved. 00007 See Copyright.txt or http://www.kitware.com/Copyright.htm for details. 00008 00009 This software is distributed WITHOUT ANY WARRANTY; without even 00010 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00011 PURPOSE. See the above copyright notice for more information. 00012 00013 =========================================================================*/ 00037 #ifndef __vtkKWWidgetWithLabel_h 00038 #define __vtkKWWidgetWithLabel_h 00039 00040 #include "vtkKWCompositeWidget.h" 00041 00042 class vtkKWLabel; 00043 00044 class KWWidgets_EXPORT vtkKWWidgetWithLabel : public vtkKWCompositeWidget 00045 { 00046 // @cond section_public 00047 public: 00048 static vtkKWWidgetWithLabel* New(); 00049 vtkTypeRevisionMacro(vtkKWWidgetWithLabel, vtkKWCompositeWidget); 00050 void PrintSelf(ostream& os, vtkIndent indent); 00051 00053 00060 virtual void SetLabelVisibility(int); 00061 vtkBooleanMacro(LabelVisibility, int); 00062 vtkGetMacro(LabelVisibility, int); 00064 00066 00071 virtual vtkKWLabel* GetLabel(); 00072 virtual int HasLabel(); 00074 00076 00079 virtual void SetLabelText(const char *); 00080 const char* GetLabelText(); 00082 00084 00087 virtual void SetLabelWidth(int width); 00088 virtual int GetLabelWidth(); 00090 00092 00095 enum 00096 { 00097 LabelPositionDefault = 0, 00098 LabelPositionTop, 00099 LabelPositionBottom, 00100 LabelPositionLeft, 00101 LabelPositionRight 00102 }; 00103 //ETX 00104 virtual void SetLabelPosition(int); 00105 vtkGetMacro(LabelPosition, int); 00106 virtual void SetLabelPositionToDefault() 00107 { this->SetLabelPosition(vtkKWWidgetWithLabel::LabelPositionDefault); }; 00108 virtual void SetLabelPositionToTop() 00109 { this->SetLabelPosition(vtkKWWidgetWithLabel::LabelPositionTop); }; 00110 virtual void SetLabelPositionToBottom() 00111 { this->SetLabelPosition(vtkKWWidgetWithLabel::LabelPositionBottom); }; 00112 virtual void SetLabelPositionToLeft() 00113 { this->SetLabelPosition(vtkKWWidgetWithLabel::LabelPositionLeft); }; 00114 virtual void SetLabelPositionToRight() 00115 { this->SetLabelPosition(vtkKWWidgetWithLabel::LabelPositionRight); }; 00117 00120 virtual void SetBalloonHelpString(const char *str); 00121 00128 virtual void UpdateEnableState(); 00129 00130 // @endcond 00131 // @cond section_protected 00132 protected: 00133 vtkKWWidgetWithLabel(); 00134 ~vtkKWWidgetWithLabel(); 00135 00137 virtual void CreateWidget(); 00138 00140 int LabelVisibility; 00141 00143 int LabelPosition; 00144 00146 virtual void CreateLabel(); 00147 00149 virtual void Pack() {}; 00150 00151 // @endcond 00152 // @cond section_private 00153 private: 00154 00158 vtkKWLabel *Label; 00159 00160 vtkKWWidgetWithLabel(const vtkKWWidgetWithLabel&); // Not implemented 00161 void operator=(const vtkKWWidgetWithLabel&); // Not implemented 00162 }; 00163 00164 #endif 00165 // @endcond
1.6.1