debian/tmp/usr/include/KWWidgets/vtkKWVolumeMaterialPropertyWidget.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Module:    $RCSfile: vtkKWVolumeMaterialPropertyWidget.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 =========================================================================*/
00014 // .NAME vtkKWVolumeMaterialPropertyWidget - widget to control the material property of a volume  (vtkVolumeProperty)
00015 // .SECTION Description
00016 
00017 #ifndef __vtkKWVolumeMaterialPropertyWidget_h
00018 #define __vtkKWVolumeMaterialPropertyWidget_h
00019 
00020 #include "vtkKWMaterialPropertyWidget.h"
00021 
00022 class vtkKWCheckButtonWithLabel;
00023 class vtkKWScalarComponentSelectionWidget;
00024 class vtkVolumeProperty;
00025 
00026 class KWWidgets_EXPORT vtkKWVolumeMaterialPropertyWidget : public vtkKWMaterialPropertyWidget
00027 {
00028 public:
00029   static vtkKWVolumeMaterialPropertyWidget *New();
00030   vtkTypeRevisionMacro(vtkKWVolumeMaterialPropertyWidget, vtkKWMaterialPropertyWidget);
00031   void PrintSelf(ostream& os, vtkIndent indent);
00032   
00033   // Description:
00034   // Set/Get the volume property to edit with this widget
00035   virtual void SetVolumeProperty(vtkVolumeProperty *prop);
00036   vtkGetObjectMacro(VolumeProperty, vtkVolumeProperty);
00037 
00038   // Description:
00039   // Set/Get the component controlled by the widget
00040   virtual void SetSelectedComponent(int);
00041   vtkGetMacro(SelectedComponent, int);
00042   vtkGetObjectMacro(ComponentSelectionWidget, 
00043                     vtkKWScalarComponentSelectionWidget);
00044 
00045   // Description:
00046   // Set/Get the number of components controlled by the widget
00047   virtual void SetNumberOfComponents(int);
00048   vtkGetMacro(NumberOfComponents, int);
00049 
00050   // Description:
00051   // Allow enable shading per component
00052   virtual void SetAllowEnableShading(int);
00053   vtkBooleanMacro(AllowEnableShading, int);
00054   vtkGetMacro(AllowEnableShading, int);
00055 
00056   // Description:
00057   // Refresh the interface given the value extracted from the current property.
00058   virtual void Update();
00059 
00060   // Description:
00061   // Update the "enable" state of the object and its internal parts.
00062   // Depending on different Ivars (this->Enabled, the application's 
00063   // Limited Edition Mode, etc.), the "enable" state of the object is updated
00064   // and propagated to its internal parts/subwidgets. This will, for example,
00065   // enable/disable parts of the widget UI, enable/disable the visibility
00066   // of 3D widgets, etc.
00067   virtual void UpdateEnableState();
00068 
00069   // Description:
00070   // Callbacks. Internal, do not use.
00071   virtual void EnableShadingCallback(int state);
00072   virtual void SelectedComponentCallback(int);
00073 
00074 protected:
00075   vtkKWVolumeMaterialPropertyWidget();
00076   ~vtkKWVolumeMaterialPropertyWidget();
00077 
00078   // Description:
00079   // Create the widget.
00080   virtual void CreateWidget();
00081   
00082   vtkVolumeProperty *VolumeProperty;
00083 
00084   int SelectedComponent;
00085   int NumberOfComponents;
00086   int AllowEnableShading;
00087 
00088   // UI
00089 
00090   vtkKWScalarComponentSelectionWidget *ComponentSelectionWidget;
00091   vtkKWCheckButtonWithLabel             *EnableShadingCheckButton;
00092 
00093   // Description:
00094   // Pack
00095   virtual void Pack();
00096 
00097   // Description:
00098   // Update the property from the interface values or a preset
00099   // Return 1 if the property was modified, 0 otherwise
00100   virtual int UpdatePropertyFromInterface();
00101   virtual int UpdatePropertyFromPreset(const Preset *preset);
00102 
00103   // Description:
00104   // Send an event representing the state of the widget
00105   virtual void SendStateEvent(int event);
00106 
00107   // Description:
00108   // Return 1 if the controls should be enabled.
00109   virtual int AreControlsEnabled();
00110 
00111 private:
00112   vtkKWVolumeMaterialPropertyWidget(const vtkKWVolumeMaterialPropertyWidget&);  //Not implemented
00113   void operator=(const vtkKWVolumeMaterialPropertyWidget&);  //Not implemented
00114 };
00115 
00116 #endif

Generated by  doxygen 1.6.2