VTK  9.0.1
vtkApplyIcons.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkApplyIcons.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
15 /*-------------------------------------------------------------------------
16  Copyright 2008 Sandia Corporation.
17  Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
18  the U.S. Government retains certain rights in this software.
19 -------------------------------------------------------------------------*/
63 #ifndef vtkApplyIcons_h
64 #define vtkApplyIcons_h
65 
67 #include "vtkVariant.h" // For variant arguments.
68 #include "vtkViewsInfovisModule.h" // For export macro
69 
70 class VTKVIEWSINFOVIS_EXPORT vtkApplyIcons : public vtkPassInputTypeAlgorithm
71 {
72 public:
73  static vtkApplyIcons* New();
75  void PrintSelf(ostream& os, vtkIndent indent) override;
76 
78 
82  void SetIconType(vtkVariant v, int icon);
83  void SetIconType(double v, int icon) { this->SetIconType(vtkVariant(v), icon); }
84  void SetIconType(const char* v, int icon) { this->SetIconType(vtkVariant(v), icon); }
85  void ClearAllIconTypes();
87 
89 
93  vtkSetMacro(UseLookupTable, bool);
94  vtkGetMacro(UseLookupTable, bool);
95  vtkBooleanMacro(UseLookupTable, bool);
97 
99 
103  vtkSetMacro(DefaultIcon, int);
104  vtkGetMacro(DefaultIcon, int);
106 
108 
112  vtkSetMacro(SelectedIcon, int);
113  vtkGetMacro(SelectedIcon, int);
115 
117 
121  vtkSetStringMacro(IconOutputArrayName);
122  vtkGetStringMacro(IconOutputArrayName);
124 
125  enum
126  {
130  IGNORE_SELECTION
131  };
132 
134 
144  vtkSetMacro(SelectionMode, int);
145  vtkGetMacro(SelectionMode, int);
146  virtual void SetSelectionModeToSelectedIcon() { this->SetSelectionMode(SELECTED_ICON); }
147  virtual void SetSelectionModeToSelectedOffset() { this->SetSelectionMode(SELECTED_OFFSET); }
148  virtual void SetSelectionModeToAnnotationIcon() { this->SetSelectionMode(ANNOTATION_ICON); }
149  virtual void SetSelectionModeToIgnoreSelection() { this->SetSelectionMode(IGNORE_SELECTION); }
151 
153 
159  vtkSetMacro(AttributeType, int);
160  vtkGetMacro(AttributeType, int);
162 
163 protected:
164  vtkApplyIcons();
165  ~vtkApplyIcons() override;
166 
171 
175  int FillInputPortInformation(int port, vtkInformation* info) override;
176 
183 
184  class Internals;
185  Internals* Implementation;
186 
187 private:
188  vtkApplyIcons(const vtkApplyIcons&) = delete;
189  void operator=(const vtkApplyIcons&) = delete;
190 };
191 
192 #endif
vtkVariant.h
vtkPassInputTypeAlgorithm.h
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:35
vtkPassInputTypeAlgorithm::FillInputPortInformation
int FillInputPortInformation(int port, vtkInformation *info) override
Fill the input port information objects for this algorithm.
vtkApplyIcons::SetSelectionModeToAnnotationIcon
virtual void SetSelectionModeToAnnotationIcon()
Definition: vtkApplyIcons.h:148
vtkApplyIcons::IconOutputArrayName
char * IconOutputArrayName
Definition: vtkApplyIcons.h:180
vtkApplyIcons::UseLookupTable
bool UseLookupTable
Definition: vtkApplyIcons.h:179
vtkX3D::port
@ port
Definition: vtkX3D.h:453
vtkApplyIcons::SetSelectionModeToSelectedIcon
virtual void SetSelectionModeToSelectedIcon()
Definition: vtkApplyIcons.h:146
vtkApplyIcons::SELECTED_ICON
@ SELECTED_ICON
Definition: vtkApplyIcons.h:127
vtkApplyIcons::SelectedIcon
int SelectedIcon
Definition: vtkApplyIcons.h:178
vtkPassInputTypeAlgorithm::RequestData
virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
This is called within ProcessRequest when a request asks the algorithm to do its work.
Definition: vtkPassInputTypeAlgorithm.h:171
vtkApplyIcons::SetIconType
void SetIconType(const char *v, int icon)
Definition: vtkApplyIcons.h:84
vtkApplyIcons::SelectionMode
int SelectionMode
Definition: vtkApplyIcons.h:181
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:33
vtkVariant
A atomic type representing the union of many types.
Definition: vtkVariant.h:65
vtkApplyIcons::DefaultIcon
int DefaultIcon
Definition: vtkApplyIcons.h:177
vtkApplyIcons::ANNOTATION_ICON
@ ANNOTATION_ICON
Definition: vtkApplyIcons.h:129
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:73
vtkApplyIcons::AttributeType
int AttributeType
Definition: vtkApplyIcons.h:182
vtkX3D::info
@ info
Definition: vtkX3D.h:382
vtkApplyIcons::SetIconType
void SetIconType(double v, int icon)
Definition: vtkApplyIcons.h:83
vtkApplyIcons::SetSelectionModeToSelectedOffset
virtual void SetSelectionModeToSelectedOffset()
Definition: vtkApplyIcons.h:147
vtkApplyIcons::Implementation
Internals * Implementation
Definition: vtkApplyIcons.h:184
vtkPassInputTypeAlgorithm::New
static vtkPassInputTypeAlgorithm * New()
vtkPassInputTypeAlgorithm::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkApplyIcons::SetSelectionModeToIgnoreSelection
virtual void SetSelectionModeToIgnoreSelection()
Definition: vtkApplyIcons.h:149
vtkPassInputTypeAlgorithm
Superclass for algorithms that produce output of the same type as input.
Definition: vtkPassInputTypeAlgorithm.h:51
vtkApplyIcons::SELECTED_OFFSET
@ SELECTED_OFFSET
Definition: vtkApplyIcons.h:128
vtkApplyIcons
apply icons to a data set.
Definition: vtkApplyIcons.h:70