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

GUI/Widgets/vtkKWScalarBarAnnotation.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Module:    $RCSfile: vtkKWScalarBarAnnotation.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 __vtkKWScalarBarAnnotation_h
00021 #define __vtkKWScalarBarAnnotation_h
00022 
00023 #include "vtkKWCheckButtonWithPopupFrame.h"
00024 
00025 class vtkKWFrame;
00026 class vtkKWEntryWithLabel;
00027 class vtkKWPopupButtonWithLabel;
00028 class vtkKWScalarComponentSelectionWidget;
00029 class vtkKWScaleWithEntry;
00030 class vtkKWTextPropertyEditor;
00031 class vtkKWThumbWheel;
00032 class vtkScalarBarWidget;
00033 class vtkVolumeProperty;
00034 
00035 class KWWIDGETS_EXPORT vtkKWScalarBarAnnotation : public vtkKWCheckButtonWithPopupFrame
00036 {
00037 public:
00038   static vtkKWScalarBarAnnotation* New();
00039   vtkTypeRevisionMacro(vtkKWScalarBarAnnotation,vtkKWCheckButtonWithPopupFrame);
00040   void PrintSelf(ostream& os, vtkIndent indent);
00041 
00043 
00046   vtkSetMacro(PopupTextProperty, int);
00047   vtkGetMacro(PopupTextProperty, int);
00048   vtkBooleanMacro(PopupTextProperty, int);
00050 
00052   virtual void Create(vtkKWApplication *app);
00053 
00055 
00056   virtual void SetScalarBarWidget(vtkScalarBarWidget*);
00057   vtkGetObjectMacro(ScalarBarWidget, vtkScalarBarWidget);
00059 
00061 
00062   virtual void SetVisibility(int i);
00063   virtual int GetVisibility();
00064   vtkBooleanMacro(Visibility, int);
00066 
00068 
00070   vtkSetMacro(AnnotationChangedEvent, int);
00071   vtkGetMacro(AnnotationChangedEvent, int);
00073 
00075 
00078   virtual void SetVolumeProperty(vtkVolumeProperty *prop);
00079   vtkGetObjectMacro(VolumeProperty, vtkVolumeProperty);
00081 
00083 
00085   virtual void SetNumberOfComponents(int);
00086   vtkGetMacro(NumberOfComponents, int);
00088 
00090 
00092   vtkSetMacro(ScalarComponentChangedEvent, int);
00093   vtkGetMacro(ScalarComponentChangedEvent, int);
00095 
00097 
00098   virtual void CheckButtonCallback();
00099   virtual void SelectedComponentCallback(int);
00100   virtual void ScalarBarTitleCallback();
00101   virtual void ScalarBarLabelFormatCallback();
00102   virtual void TitleTextPropertyCallback();
00103   virtual void LabelTextPropertyCallback();
00104   virtual void MaximumNumberOfColorsEndCallback();
00105   virtual void NumberOfLabelsEndCallback();
00107 
00109 
00110   virtual void SetLabelFormatVisibility(int i);
00111   vtkGetMacro(LabelFormatVisibility, int);
00112   vtkBooleanMacro(LabelFormatVisibility, int);
00114 
00116 
00117   virtual vtkKWCheckButton* GetScalarBarVisibilityButton()
00118     { return this->GetCheckButton(); };
00120 
00122   void Update();
00123 
00130   virtual void UpdateEnableState();
00131 
00132 protected:
00133   vtkKWScalarBarAnnotation();
00134   ~vtkKWScalarBarAnnotation();
00135 
00136   int PopupTextProperty;
00137   int AnnotationChangedEvent;
00138   int ScalarComponentChangedEvent;
00139   int NumberOfComponents;
00140   int LabelFormatVisibility;
00141 
00142   vtkScalarBarWidget      *ScalarBarWidget;
00143   vtkVolumeProperty       *VolumeProperty;
00144 
00145   // GUI
00146 
00147   vtkKWScalarComponentSelectionWidget *ComponentSelectionWidget;
00148   vtkKWFrame                          *TitleFrame;
00149   vtkKWEntryWithLabel                   *TitleEntry;
00150   vtkKWTextPropertyEditor             *TitleTextPropertyWidget;
00151   vtkKWPopupButtonWithLabel             *TitleTextPropertyPopupButton;
00152   vtkKWFrame                          *LabelFrame;
00153   vtkKWEntryWithLabel                   *LabelFormatEntry;
00154   vtkKWTextPropertyEditor             *LabelTextPropertyWidget;
00155   vtkKWPopupButtonWithLabel             *LabelTextPropertyPopupButton;
00156   vtkKWThumbWheel                     *MaximumNumberOfColorsThumbWheel;
00157   vtkKWScaleWithEntry                  *NumberOfLabelsScale;
00158 
00159   virtual void PackLabelFrameChildren();
00160   virtual void Render();
00161   virtual void SetScalarBarTitle(const char *txt);
00162   virtual void SetScalarBarLabelFormat(const char *txt);
00163 
00164   // Get the value that should be used to set the checkbutton state
00165   // (i.e. depending on the value this checkbutton is supposed to reflect,
00166   // for example, an annotation visibility).
00167   // This does *not* return the state of the widget.
00168   virtual int GetCheckButtonState() { return this->GetVisibility(); };
00169 
00170   // Send an event representing the state of the widget
00171   virtual void SendChangedEvent();
00172 
00173 private:
00174   vtkKWScalarBarAnnotation(const vtkKWScalarBarAnnotation&); // Not implemented
00175   void operator=(const vtkKWScalarBarAnnotation&); // Not Implemented
00176 };
00177 
00178 #endif
00179 

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