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 
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
#define VTKREMOTINGVIEWS_EXPORT
vtkPVDataRepresentation adds some ParaView specific API to data representations.
bool AddToView(vtkView *view) override
Making these methods public.
virtual void SetVisibility(bool val)
Get/Set the visibility for this representation.
virtual int ProcessViewRequest(vtkInformationRequestKey *request_type, vtkInformation *inInfo, vtkInformation *outInfo)
vtkAlgorithm::ProcessRequest() equivalent for rendering passes.
virtual int FillInputPortInformation(int port, vtkInformation *info)
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
Overridden to invoke vtkCommand::UpdateDataEvent.
bool RemoveFromView(vtkView *view) override
Making these methods public.
static vtkDataRepresentation * New()
representation to add text to vtkPVContextView
void PrintSelf(ostream &os, vtkIndent indent) override