00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00055 #ifndef __vtkDataRepresentation_h
00056 #define __vtkDataRepresentation_h
00057
00058 #include "vtkPassInputTypeAlgorithm.h"
00059
00060 class vtkAlgorithmOutput;
00061 class vtkAnnotationLink;
00062 class vtkDataObject;
00063 class vtkSelection;
00064 class vtkStringArray;
00065 class vtkView;
00066 class vtkViewTheme;
00067
00068 class VTK_VIEWS_EXPORT vtkDataRepresentation : public vtkPassInputTypeAlgorithm
00069 {
00070 public:
00071 static vtkDataRepresentation *New();
00072 vtkTypeRevisionMacro(vtkDataRepresentation, vtkPassInputTypeAlgorithm);
00073 void PrintSelf(ostream& os, vtkIndent indent);
00074
00076
00078 vtkAlgorithmOutput* GetInputConnection(int port = 0, int index = 0)
00079 { return this->Superclass::GetInputConnection(port, index); }
00081
00083
00085 vtkAnnotationLink* GetAnnotationLink()
00086 { return this->AnnotationLinkInternal; }
00087 void SetAnnotationLink(vtkAnnotationLink* link);
00089
00092 virtual void ApplyViewTheme(vtkViewTheme* vtkNotUsed(theme)) { }
00093
00095
00102 void Select(vtkView* view, vtkSelection* selection)
00103 { this->Select(view, selection, false); }
00104 void Select(vtkView* view, vtkSelection* selection, bool extend);
00106
00108
00110 vtkSetMacro(Selectable, bool);
00111 vtkGetMacro(Selectable, bool);
00112 vtkBooleanMacro(Selectable, bool);
00114
00116
00121 void UpdateSelection(vtkSelection* selection)
00122 { this->UpdateSelection(selection, false); }
00123 void UpdateSelection(vtkSelection* selection, bool extend);
00125
00127
00130 virtual vtkAlgorithmOutput* GetInternalAnnotationOutputPort()
00131 { return this->GetInternalAnnotationOutputPort(0); }
00132 virtual vtkAlgorithmOutput* GetInternalAnnotationOutputPort(int port)
00133 { return this->GetInternalAnnotationOutputPort(port, 0); }
00134 virtual vtkAlgorithmOutput* GetInternalAnnotationOutputPort(int port, int conn);
00136
00138
00141 virtual vtkAlgorithmOutput* GetInternalSelectionOutputPort()
00142 { return this->GetInternalSelectionOutputPort(0); }
00143 virtual vtkAlgorithmOutput* GetInternalSelectionOutputPort(int port)
00144 { return this->GetInternalSelectionOutputPort(port, 0); }
00145 virtual vtkAlgorithmOutput* GetInternalSelectionOutputPort(int port, int conn);
00147
00149
00152 virtual vtkAlgorithmOutput* GetInternalOutputPort()
00153 { return this->GetInternalOutputPort(0); }
00154 virtual vtkAlgorithmOutput* GetInternalOutputPort(int port)
00155 { return this->GetInternalOutputPort(port, 0); }
00156 virtual vtkAlgorithmOutput* GetInternalOutputPort(int port, int conn);
00158
00160
00164 vtkSetMacro(SelectionType, int);
00165 vtkGetMacro(SelectionType, int);
00167
00169
00170 virtual void SetSelectionArrayNames(vtkStringArray* names);
00171 vtkGetObjectMacro(SelectionArrayNames, vtkStringArray);
00173
00175
00176 virtual void SetSelectionArrayName(const char* name);
00177 virtual const char* GetSelectionArrayName();
00179
00180 protected:
00181 vtkDataRepresentation();
00182 ~vtkDataRepresentation();
00183
00185
00194 virtual int RequestData(
00195 vtkInformation*,
00196 vtkInformationVector**,
00197 vtkInformationVector*)
00198 { return 1; }
00200
00203 virtual void ProcessEvents(vtkObject *caller, unsigned long eventId, void *callData);
00204
00206
00207 virtual void SetAnnotationLinkInternal(vtkAnnotationLink* link);
00208 vtkAnnotationLink* AnnotationLinkInternal;
00210
00211
00212 bool Selectable;
00213
00215 int SelectionType;
00216
00218 vtkStringArray* SelectionArrayNames;
00219
00220
00221 friend class vtkView;
00222 friend class vtkRenderView;
00223 class Command;
00224 friend class Command;
00225 Command* Observer;
00226
00227
00228
00229
00230
00231
00235 virtual bool AddToView(vtkView* vtkNotUsed(view)) { return true; }
00236
00240 virtual bool RemoveFromView(vtkView* vtkNotUsed(view)) { return true; }
00241
00248 virtual vtkSelection* ConvertSelection(vtkView* view, vtkSelection* selection);
00249
00250 private:
00251 vtkDataRepresentation(const vtkDataRepresentation&);
00252 void operator=(const vtkDataRepresentation&);
00253
00254
00255 class Internals;
00256 Internals* Implementation;
00257
00258 };
00259
00260 #endif