VTK
|
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: vtkApplyIcons.h 00005 00006 Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen 00007 All rights reserved. 00008 See Copyright.txt or http://www.kitware.com/Copyright.htm for details. 00009 00010 This software is distributed WITHOUT ANY WARRANTY; without even 00011 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00012 PURPOSE. See the above copyright notice for more information. 00013 00014 =========================================================================*/ 00015 /*------------------------------------------------------------------------- 00016 Copyright 2008 Sandia Corporation. 00017 Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, 00018 the U.S. Government retains certain rights in this software. 00019 -------------------------------------------------------------------------*/ 00062 #ifndef __vtkApplyIcons_h 00063 #define __vtkApplyIcons_h 00064 00065 #include "vtkViewsInfovisModule.h" // For export macro 00066 #include "vtkPassInputTypeAlgorithm.h" 00067 #include "vtkVariant.h" // For variant arguments. 00068 00069 class VTKVIEWSINFOVIS_EXPORT vtkApplyIcons : public vtkPassInputTypeAlgorithm 00070 { 00071 public: 00072 static vtkApplyIcons *New(); 00073 vtkTypeMacro(vtkApplyIcons, vtkPassInputTypeAlgorithm); 00074 void PrintSelf(ostream& os, vtkIndent indent); 00075 00077 00079 void SetIconType(vtkVariant v, int icon); 00080 void SetIconType(double v, int icon) 00081 { this->SetIconType(vtkVariant(v), icon); } 00082 void SetIconType(const char* v, int icon) 00083 { this->SetIconType(vtkVariant(v), icon); } 00084 void ClearAllIconTypes(); 00086 00088 00090 vtkSetMacro(UseLookupTable, bool); 00091 vtkGetMacro(UseLookupTable, bool); 00092 vtkBooleanMacro(UseLookupTable, bool); 00094 00096 00098 vtkSetMacro(DefaultIcon, int); 00099 vtkGetMacro(DefaultIcon, int); 00101 00103 00105 vtkSetMacro(SelectedIcon, int); 00106 vtkGetMacro(SelectedIcon, int); 00108 00110 00112 vtkSetStringMacro(IconOutputArrayName); 00113 vtkGetStringMacro(IconOutputArrayName); 00115 00116 //BTX 00117 enum 00118 { 00119 SELECTED_ICON, 00120 SELECTED_OFFSET, 00121 ANNOTATION_ICON, 00122 IGNORE_SELECTION 00123 }; 00124 //ETX 00125 00127 00134 vtkSetMacro(SelectionMode, int); 00135 vtkGetMacro(SelectionMode, int); 00136 virtual void SetSelectionModeToSelectedIcon() 00137 { this->SetSelectionMode(SELECTED_ICON); } 00138 virtual void SetSelectionModeToSelectedOffset() 00139 { this->SetSelectionMode(SELECTED_OFFSET); } 00140 virtual void SetSelectionModeToAnnotationIcon() 00141 { this->SetSelectionMode(ANNOTATION_ICON); } 00142 virtual void SetSelectionModeToIgnoreSelection() 00143 { this->SetSelectionMode(IGNORE_SELECTION); } 00145 00147 00151 vtkSetMacro(AttributeType, int); 00152 vtkGetMacro(AttributeType, int); 00154 00155 protected: 00156 vtkApplyIcons(); 00157 ~vtkApplyIcons(); 00158 00160 00161 int RequestData( 00162 vtkInformation *, vtkInformationVector **, vtkInformationVector *); 00164 00166 int FillInputPortInformation(int port, vtkInformation* info); 00167 00168 int DefaultIcon; 00169 int SelectedIcon; 00170 bool UseLookupTable; 00171 char* IconOutputArrayName; 00172 int SelectionMode; 00173 int AttributeType; 00174 00175 //BTX 00176 class Internals; 00177 Internals* Implementation; 00178 //ETX 00179 00180 private: 00181 vtkApplyIcons(const vtkApplyIcons&); // Not implemented. 00182 void operator=(const vtkApplyIcons&); // Not implemented. 00183 }; 00184 00185 #endif