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 public:
00040 static vtkKWCornerAnnotationEditor* New();
00041 vtkTypeRevisionMacro(vtkKWCornerAnnotationEditor,vtkKWCheckButtonWithPopupFrame);
00042 void PrintSelf(ostream& os, vtkIndent indent);
00043
00045
00048 vtkSetMacro(PopupTextProperty, int);
00049 vtkGetMacro(PopupTextProperty, int);
00050 vtkBooleanMacro(PopupTextProperty, int);
00052
00054 virtual void Create(vtkKWApplication *app);
00055
00057
00064 virtual void SetRenderWidget(vtkKWRenderWidget*);
00065 vtkGetObjectMacro(RenderWidget,vtkKWRenderWidget);
00067
00069
00075 vtkGetObjectMacro(CornerAnnotation, vtkCornerAnnotation);
00077
00079
00080 virtual void SetVisibility(int i);
00081 virtual int GetVisibility();
00082 vtkBooleanMacro(Visibility, int);
00084
00086
00087 virtual void SetCornerText(const char *txt, int corner);
00088 virtual char *GetCornerText(int i);
00090
00092
00093 virtual void SetTextColor(double r, double g, double b);
00094 virtual void SetTextColor(double *rgb)
00095 { this->SetTextColor(rgb[0], rgb[1], rgb[2]); }
00096 virtual double *GetTextColor();
00098
00100 virtual void SetMaximumLineHeight(float);
00101
00103
00105 vtkSetMacro(AnnotationChangedEvent, int);
00106 vtkGetMacro(AnnotationChangedEvent, int);
00108
00110
00111 virtual void CheckButtonCallback();
00112 virtual void CornerTextCallback(int i);
00113 virtual void MaximumLineHeightCallback();
00114 virtual void MaximumLineHeightEndCallback();
00115 virtual void TextPropertyCallback();
00117
00119
00120 virtual vtkKWCheckButton* GetCornerVisibilityButton()
00121 { return this->GetCheckButton(); };
00123
00125 virtual void Update();
00126
00129 virtual void Close();
00130
00137 virtual void UpdateEnableState();
00138
00140
00141 vtkGetObjectMacro(TextPropertyWidget, vtkKWTextPropertyEditor);
00143
00144 protected:
00145 vtkKWCornerAnnotationEditor();
00146 ~vtkKWCornerAnnotationEditor();
00147
00148 int AnnotationChangedEvent;
00149
00150 vtkCornerAnnotation *CornerAnnotation;
00151
00152 vtkKWRenderWidget *RenderWidget;
00153
00154
00155
00156 int PopupTextProperty;
00157
00158 vtkKWFrame *CornerFrame;
00159 vtkKWTextWithLabel *CornerText[4];
00160 vtkKWFrame *PropertiesFrame;
00161 vtkKWScaleWithEntry *MaximumLineHeightScale;
00162 vtkKWTextPropertyEditor *TextPropertyWidget;
00163 vtkKWPopupButtonWithLabel *TextPropertyPopupButton;
00164
00165 virtual void Render();
00166
00167
00168
00169
00170
00171 virtual int GetCheckButtonState() { return this->GetVisibility(); };
00172
00173
00174 virtual void SendChangedEvent();
00175
00176 private:
00177 vtkKWCornerAnnotationEditor(const vtkKWCornerAnnotationEditor&);
00178 void operator=(const vtkKWCornerAnnotationEditor&);
00179 };
00180
00181 #endif
00182