00001 /*========================================================================= 00002 00003 Module: $RCSfile: vtkKWHeaderAnnotationEditor.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 =========================================================================*/ 00020 #ifndef __vtkKWHeaderAnnotationEditor_h 00021 #define __vtkKWHeaderAnnotationEditor_h 00022 00023 #include "vtkKWCheckButtonWithPopupFrame.h" 00024 00025 class vtkKWEntryWithLabel; 00026 class vtkKWPopupButtonWithLabel; 00027 class vtkKWRenderWidget; 00028 class vtkKWTextPropertyEditor; 00029 class vtkTextActor; 00030 class vtkKWFrame; 00031 00032 class KWWIDGETS_EXPORT vtkKWHeaderAnnotationEditor : public vtkKWCheckButtonWithPopupFrame 00033 { 00034 public: 00035 static vtkKWHeaderAnnotationEditor* New(); 00036 vtkTypeRevisionMacro(vtkKWHeaderAnnotationEditor,vtkKWCheckButtonWithPopupFrame); 00037 void PrintSelf(ostream& os, vtkIndent indent); 00038 00040 00043 vtkSetMacro(PopupTextProperty, int); 00044 vtkGetMacro(PopupTextProperty, int); 00045 vtkBooleanMacro(PopupTextProperty, int); 00047 00049 virtual void Create(vtkKWApplication *app); 00050 00052 00053 virtual void SetRenderWidget(vtkKWRenderWidget*); 00054 vtkGetObjectMacro(RenderWidget, vtkKWRenderWidget); 00056 00058 00059 virtual void SetVisibility(int i); 00060 virtual int GetVisibility(); 00061 vtkBooleanMacro(Visibility, int); 00063 00065 00067 vtkSetMacro(AnnotationChangedEvent, int); 00068 vtkGetMacro(AnnotationChangedEvent, int); 00070 00072 00073 virtual void CheckButtonCallback(); 00074 virtual void HeaderTextCallback(); 00075 virtual void TextPropertyCallback(); 00077 00079 00080 virtual vtkKWCheckButton* GetHeaderVisibilityButton() 00081 { return this->GetCheckButton(); }; 00083 00085 void Update(); 00086 00093 virtual void UpdateEnableState(); 00094 00095 protected: 00096 vtkKWHeaderAnnotationEditor(); 00097 ~vtkKWHeaderAnnotationEditor(); 00098 00099 int AnnotationChangedEvent; 00100 00101 vtkKWRenderWidget *RenderWidget; 00102 00103 // GUI 00104 00105 int PopupTextProperty; 00106 00107 vtkKWFrame *TextFrame; 00108 vtkKWEntryWithLabel *TextEntry; 00109 vtkKWTextPropertyEditor *TextPropertyWidget; 00110 vtkKWPopupButtonWithLabel *TextPropertyPopupButton; 00111 00112 virtual void Render(); 00113 virtual void SetHeaderText(const char *txt); 00114 00115 // Get the value that should be used to set the checkbutton state 00116 // (i.e. depending on the value this checkbutton is supposed to reflect, 00117 // for example, an annotation visibility). 00118 // This does *not* return the state of the widget. 00119 virtual int GetCheckButtonState() { return this->GetVisibility(); }; 00120 00121 // Send an event representing the state of the widget 00122 virtual void SendChangedEvent(); 00123 00124 private: 00125 vtkKWHeaderAnnotationEditor(const vtkKWHeaderAnnotationEditor&); // Not implemented 00126 void operator=(const vtkKWHeaderAnnotationEditor&); // Not Implemented 00127 }; 00128 00129 #endif 00130