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 // @cond section_public 00035 public: 00036 static vtkKWHeaderAnnotationEditor* New(); 00037 vtkTypeRevisionMacro(vtkKWHeaderAnnotationEditor,vtkKWCheckButtonWithPopupFrame); 00038 void PrintSelf(ostream& os, vtkIndent indent); 00039 00041 00044 vtkSetMacro(PopupTextProperty, int); 00045 vtkGetMacro(PopupTextProperty, int); 00046 vtkBooleanMacro(PopupTextProperty, int); 00048 00050 00052 virtual void SetRenderWidget(vtkKWRenderWidget*); 00053 vtkGetObjectMacro(RenderWidget, vtkKWRenderWidget); 00055 00057 00058 virtual void SetVisibility(int i); 00059 virtual int GetVisibility(); 00060 vtkBooleanMacro(Visibility, int); 00062 00064 00066 vtkSetMacro(AnnotationChangedEvent, int); 00067 vtkGetMacro(AnnotationChangedEvent, int); 00069 00071 00072 virtual vtkKWCheckButton* GetHeaderVisibilityButton() 00073 { return this->GetCheckButton(); }; 00075 00077 void Update(); 00078 00085 virtual void UpdateEnableState(); 00086 00088 00089 virtual void CheckButtonCallback(int state); 00090 virtual void HeaderTextCallback(const char *value); 00091 virtual void TextPropertyCallback(); 00093 00094 // @endcond 00095 // @cond section_protected 00096 protected: 00097 vtkKWHeaderAnnotationEditor(); 00098 ~vtkKWHeaderAnnotationEditor(); 00099 00101 virtual void CreateWidget(); 00102 00103 int AnnotationChangedEvent; 00104 00105 vtkKWRenderWidget *RenderWidget; 00106 00107 // GUI 00108 00109 int PopupTextProperty; 00110 00111 vtkKWFrame *TextFrame; 00112 vtkKWEntryWithLabel *TextEntry; 00113 vtkKWTextPropertyEditor *TextPropertyWidget; 00114 vtkKWPopupButtonWithLabel *TextPropertyPopupButton; 00115 00116 virtual void Render(); 00117 virtual void SetHeaderText(const char *txt); 00118 00119 // Get the value that should be used to set the checkbutton state 00120 // (i.e. depending on the value this checkbutton is supposed to reflect, 00121 // for example, an annotation visibility). 00122 // This does *not* return the state of the widget. 00123 virtual int GetCheckButtonState() { return this->GetVisibility(); }; 00124 00125 // Send an event representing the state of the widget 00126 virtual void SendChangedEvent(); 00127 00128 // @endcond 00129 // @cond section_private 00130 private: 00131 vtkKWHeaderAnnotationEditor(const vtkKWHeaderAnnotationEditor&); // Not implemented 00132 void operator=(const vtkKWHeaderAnnotationEditor&); // Not Implemented 00133 }; 00134 00135 #endif 00136 00137 // @endcond
1.6.1