00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00022 #ifndef __vtkKWCornerAnnotationEditor_h
00023 #define __vtkKWCornerAnnotationEditor_h
00024
00025 #include "vtkKWCheckButtonWithPopupFrame.h"
00026
00027 class vtkCornerAnnotation;
00028 class vtkKWFrame;
00029 class vtkKWGenericComposite;
00030 class vtkKWLabel;
00031 class vtkKWPopupButtonWithLabel;
00032 class vtkKWTextWithLabel;
00033 class vtkKWRenderWidget;
00034 class vtkKWScaleWithEntry;
00035 class vtkKWTextPropertyEditor;
00036
00037 class KWWidgets_EXPORT vtkKWCornerAnnotationEditor : public vtkKWCheckButtonWithPopupFrame
00038 {
00039
00040 public:
00041 static vtkKWCornerAnnotationEditor* New();
00042 vtkTypeRevisionMacro(vtkKWCornerAnnotationEditor,vtkKWCheckButtonWithPopupFrame);
00043 void PrintSelf(ostream& os, vtkIndent indent);
00044
00046
00049 vtkSetMacro(PopupTextProperty, int);
00050 vtkGetMacro(PopupTextProperty, int);
00051 vtkBooleanMacro(PopupTextProperty, int);
00053
00055
00062 virtual void SetRenderWidget(vtkKWRenderWidget*);
00063 vtkGetObjectMacro(RenderWidget,vtkKWRenderWidget);
00065
00067
00073 vtkGetObjectMacro(CornerAnnotation, vtkCornerAnnotation);
00075
00077
00078 virtual void SetVisibility(int i);
00079 virtual int GetVisibility();
00080 vtkBooleanMacro(Visibility, int);
00082
00084
00085 virtual void SetCornerText(const char *txt, int corner);
00086 virtual const char *GetCornerText(int i);
00088
00090
00091 virtual void SetTextColor(double r, double g, double b);
00092 virtual void SetTextColor(double *rgb)
00093 { this->SetTextColor(rgb[0], rgb[1], rgb[2]); }
00094 virtual double *GetTextColor();
00096
00098 virtual void SetMaximumLineHeight(float);
00099
00101
00103 vtkSetMacro(AnnotationChangedEvent, int);
00104 vtkGetMacro(AnnotationChangedEvent, int);
00106
00108
00109 virtual vtkKWCheckButton* GetCornerVisibilityButton()
00110 { return this->GetCheckButton(); };
00112
00114 virtual void Update();
00115
00118 virtual void Close();
00119
00126 virtual void UpdateEnableState();
00127
00129
00130 vtkGetObjectMacro(TextPropertyWidget, vtkKWTextPropertyEditor);
00132
00134
00135 virtual void CheckButtonCallback(int state);
00136 virtual void CornerTextCallback(int i);
00137 virtual void MaximumLineHeightCallback(double value);
00138 virtual void MaximumLineHeightEndCallback(double value);
00139 virtual void TextPropertyCallback();
00141
00142
00143
00144 protected:
00145 vtkKWCornerAnnotationEditor();
00146 ~vtkKWCornerAnnotationEditor();
00147
00149 virtual void CreateWidget();
00150
00151 int AnnotationChangedEvent;
00152
00153 vtkCornerAnnotation *CornerAnnotation;
00154
00155 vtkKWRenderWidget *RenderWidget;
00156
00157
00158
00159 int PopupTextProperty;
00160
00161 vtkKWFrame *CornerFrame;
00162 vtkKWTextWithLabel *CornerText[4];
00163 vtkKWFrame *PropertiesFrame;
00164 vtkKWScaleWithEntry *MaximumLineHeightScale;
00165 vtkKWTextPropertyEditor *TextPropertyWidget;
00166 vtkKWPopupButtonWithLabel *TextPropertyPopupButton;
00167
00168 virtual void Render();
00169
00170
00171
00172
00173
00174 virtual int GetCheckButtonState() { return this->GetVisibility(); };
00175
00176
00177 virtual void SendChangedEvent();
00178
00179
00180
00181 private:
00182 vtkKWCornerAnnotationEditor(const vtkKWCornerAnnotationEditor&);
00183 void operator=(const vtkKWCornerAnnotationEditor&);
00184 };
00185
00186 #endif
00187
00188