Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

GUI/Widgets/vtkKWCornerAnnotationEditor.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Module:    $RCSfile: vtkKWCornerAnnotationEditor.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 =========================================================================*/
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   // GUI
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   // Get the value that should be used to set the checkbutton state
00168   // (i.e. depending on the value this checkbutton is supposed to reflect,
00169   // for example, an annotation visibility).
00170   // This does *not* return the state of the widget.
00171   virtual int GetCheckButtonState() { return this->GetVisibility(); };
00172 
00173   // Send an event representing the state of the widget
00174   virtual void SendChangedEvent();
00175 
00176 private:
00177   vtkKWCornerAnnotationEditor(const vtkKWCornerAnnotationEditor&); // Not implemented
00178   void operator=(const vtkKWCornerAnnotationEditor&); // Not Implemented
00179 };
00180 
00181 #endif
00182 

Generated on Tue May 30 12:31:42 2006 for ParaView by doxygen 1.3.5