vtkChartTextRepresentation.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Kitware Inc.
2 // SPDX-License-Identifier: BSD-3-Clause
17 #ifndef vtkChartTextRepresentation_h
18 #define vtkChartTextRepresentation_h
19 
20 #include "vtkNew.h" // for vtkNew
22 
23 class vtkBlockItem;
24 class vtkTextProperty;
25 
26 class VTKREMOTINGVIEWS_EXPORT vtkChartTextRepresentation : public vtkPVDataRepresentation
27 {
28 public:
31  void PrintSelf(ostream& os, vtkIndent indent) override;
32 
34  enum
35  {
36  AnyLocation = 0,
42  UpperCenter
43  };
44  void SetLabelLocation(int location);
46 
48 
52  vtkGetVector2Macro(Position, double);
53  vtkSetVector2Macro(Position, double);
55 
57 
60  void SetInteractivity(bool);
62 
64 
67  void SetTextProperty(vtkTextProperty*);
69 
71  // Superclass overrides
72  void SetVisibility(bool val) override;
74  vtkInformation* outInfo) override;
76 
77 protected:
79  ~vtkChartTextRepresentation() override = default;
80 
84  int FillInputPortInformation(int port, vtkInformation* info) override;
85 
90 
96  bool AddToView(vtkView* view) override;
97 
103  bool RemoveFromView(vtkView* view) override;
104 
105 private:
107  void operator=(const vtkChartTextRepresentation&) = delete;
108 
109  void OnInteractionEvent();
110 
111  vtkNew<vtkBlockItem> BlockItem;
112  vtkNew<vtkTable> PreparedData;
113  double Position[2] = { 0.05, 0.05 };
114  int LabelLocation = vtkChartTextRepresentation::AnyLocation;
115 };
116 
117 #endif
vtkDataRepresentation::New
static vtkDataRepresentation * New()
vtkPVDataRepresentation.h
vtkChartTextRepresentation
representation to add text to vtkPVContextView
Definition: vtkChartTextRepresentation.h:26
vtkInformationVector
vtkPVDataRepresentation::AddToView
bool AddToView(vtkView *view) override
Making these methods public.
vtkPVDataRepresentation::SetVisibility
virtual void SetVisibility(bool val)
Get/Set the visibility for this representation.
Definition: vtkPVDataRepresentation.h:89
vtkPVDataRepresentation::RequestData
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
Overridden to invoke vtkCommand::UpdateDataEvent.
vtkPVDataRepresentation::RemoveFromView
bool RemoveFromView(vtkView *view) override
Making these methods public.
vtkPassInputTypeAlgorithm::FillInputPortInformation
virtual int FillInputPortInformation(int port, vtkInformation *info)
vtkView
vtkIndent
vtkPVDataRepresentation::ProcessViewRequest
virtual int ProcessViewRequest(vtkInformationRequestKey *request_type, vtkInformation *inInfo, vtkInformation *outInfo)
vtkAlgorithm::ProcessRequest() equivalent for rendering passes.
vtkInformationRequestKey
vtkChartTextRepresentation::UpperLeftCorner
@ UpperLeftCorner
Definition: vtkChartTextRepresentation.h:40
vtkNew< vtkBlockItem >
vtkChartTextRepresentation::UpperRightCorner
@ UpperRightCorner
Definition: vtkChartTextRepresentation.h:41
vtkTextProperty
vtkInformation
vtkChartTextRepresentation::LowerLeftCorner
@ LowerLeftCorner
Definition: vtkChartTextRepresentation.h:37
vtkNew.h
vtkPVDataRepresentation::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
vtkChartTextRepresentation::AnyLocation
@ AnyLocation
Definition: vtkChartTextRepresentation.h:36
vtkPVDataRepresentation
Definition: vtkPVDataRepresentation.h:23
vtkChartTextRepresentation::LowerCenter
@ LowerCenter
Definition: vtkChartTextRepresentation.h:39
vtkChartTextRepresentation::LowerRightCorner
@ LowerRightCorner
Definition: vtkChartTextRepresentation.h:38
vtkBlockItem