00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
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
00038 public:
00039 static vtkKWScalarBarAnnotation* New();
00040 vtkTypeRevisionMacro(vtkKWScalarBarAnnotation,vtkKWCheckButtonWithPopupFrame);
00041 void PrintSelf(ostream& os, vtkIndent indent);
00042
00044
00047 vtkSetMacro(PopupTextProperty, int);
00048 vtkGetMacro(PopupTextProperty, int);
00049 vtkBooleanMacro(PopupTextProperty, int);
00051
00053
00054 virtual void SetScalarBarWidget(vtkScalarBarWidget*);
00055 vtkGetObjectMacro(ScalarBarWidget, vtkScalarBarWidget);
00057
00059
00060 virtual void SetVisibility(int i);
00061 virtual int GetVisibility();
00062 vtkBooleanMacro(Visibility, int);
00064
00066
00068 vtkSetMacro(AnnotationChangedEvent, int);
00069 vtkGetMacro(AnnotationChangedEvent, int);
00071
00073
00076 virtual void SetVolumeProperty(vtkVolumeProperty *prop);
00077 vtkGetObjectMacro(VolumeProperty, vtkVolumeProperty);
00079
00081
00083 virtual void SetNumberOfComponents(int);
00084 vtkGetMacro(NumberOfComponents, int);
00086
00088
00090 vtkSetMacro(ScalarComponentChangedEvent, int);
00091 vtkGetMacro(ScalarComponentChangedEvent, int);
00093
00095
00096 virtual void SetLabelFormatVisibility(int i);
00097 vtkGetMacro(LabelFormatVisibility, int);
00098 vtkBooleanMacro(LabelFormatVisibility, int);
00100
00102
00103 virtual vtkKWCheckButton* GetScalarBarVisibilityButton()
00104 { return this->GetCheckButton(); };
00106
00108 void Update();
00109
00116 virtual void UpdateEnableState();
00117
00119
00120 virtual void CheckButtonCallback(int state);
00121 virtual void SelectedComponentCallback(int);
00122 virtual void ScalarBarTitleCallback(const char *value);
00123 virtual void ScalarBarLabelFormatCallback(const char *value);
00124 virtual void TitleTextPropertyCallback();
00125 virtual void LabelTextPropertyCallback();
00126 virtual void MaximumNumberOfColorsEndCallback(double value);
00127 virtual void NumberOfLabelsEndCallback(double value);
00129
00130
00131
00132 protected:
00133 vtkKWScalarBarAnnotation();
00134 ~vtkKWScalarBarAnnotation();
00135
00137 virtual void CreateWidget();
00138
00139 int PopupTextProperty;
00140 int AnnotationChangedEvent;
00141 int ScalarComponentChangedEvent;
00142 int NumberOfComponents;
00143 int LabelFormatVisibility;
00144
00145 vtkScalarBarWidget *ScalarBarWidget;
00146 vtkVolumeProperty *VolumeProperty;
00147
00148
00149
00150 vtkKWScalarComponentSelectionWidget *ComponentSelectionWidget;
00151 vtkKWFrame *TitleFrame;
00152 vtkKWEntryWithLabel *TitleEntry;
00153 vtkKWTextPropertyEditor *TitleTextPropertyWidget;
00154 vtkKWPopupButtonWithLabel *TitleTextPropertyPopupButton;
00155 vtkKWFrame *LabelFrame;
00156 vtkKWEntryWithLabel *LabelFormatEntry;
00157 vtkKWTextPropertyEditor *LabelTextPropertyWidget;
00158 vtkKWPopupButtonWithLabel *LabelTextPropertyPopupButton;
00159 vtkKWThumbWheel *MaximumNumberOfColorsThumbWheel;
00160 vtkKWScaleWithEntry *NumberOfLabelsScale;
00161
00162 virtual void PackLabelFrameChildren();
00163 virtual void Render();
00164 virtual void SetScalarBarTitle(const char *txt);
00165 virtual void SetScalarBarLabelFormat(const char *txt);
00166
00167
00168
00169
00170
00171 virtual int GetCheckButtonState() { return this->GetVisibility(); };
00172
00173
00174 virtual void SendChangedEvent();
00175
00176
00177
00178 private:
00179 vtkKWScalarBarAnnotation(const vtkKWScalarBarAnnotation&);
00180 void operator=(const vtkKWScalarBarAnnotation&);
00181 };
00182
00183 #endif
00184
00185