VTK  9.3.20240227
vtkEqualizerContextItem.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-License-Identifier: BSD-3-Clause
3 #ifndef vtkEqualizerContextItem_h
4 #define vtkEqualizerContextItem_h
5 
6 #include "vtkContextItem.h"
7 #include "vtkInteractionWidgetsModule.h" // For export macro
8 #include "vtkNew.h" // For vtkNew
9 
10 #include <string> // for std::string
11 
12 VTK_ABI_NAMESPACE_BEGIN
13 class vtkBrush;
14 class vtkPen;
16 
36 class VTKINTERACTIONWIDGETS_EXPORT vtkEqualizerContextItem : public vtkContextItem
37 {
38 public:
40 
42  void PrintSelf(ostream& os, vtkIndent indent) override;
43 
47  bool Paint(vtkContext2D* painter) override;
48 
52  bool Hit(const vtkContextMouseEvent& mouse) override;
53 
59  bool MouseEnterEvent(const vtkContextMouseEvent& mouse) override;
60 
66  bool MouseMoveEvent(const vtkContextMouseEvent& mouse) override;
67 
73  bool MouseLeaveEvent(const vtkContextMouseEvent& mouse) override;
74 
80  bool MouseButtonPressEvent(const vtkContextMouseEvent& mouse) override;
81 
87  bool MouseButtonReleaseEvent(const vtkContextMouseEvent& mouse) override;
88 
90 
100 
101 protected:
103  {
104  NO_BUTTON = 0,
105  LEFT_BUTTON_PRESSED = 1,
106  RIGHT_BUTTON_PRESSED = 2
107  };
108 
111 
112  MouseStates MouseState = NO_BUTTON;
115 
116 private:
118  void operator=(const vtkEqualizerContextItem&) = delete;
119 
120  class vtkInternal;
121  vtkInternal* Internal;
122 };
123 
124 VTK_ABI_NAMESPACE_END
125 #endif
provides a brush that fills shapes drawn by vtkContext2D.
Definition: vtkBrush.h:89
Class for drawing 2D primitives to a graphical context.
Definition: vtkContext2D.h:69
base class for items that are part of a vtkContextScene.
data structure to represent mouse events.
all children of this item are transformed by the vtkTransform2D of this item.
draws a interactive polyline
bool Paint(vtkContext2D *painter) override
Paint event for the item, called whenever the item needs to be drawn.
std::string GetPoints() const
Set / Get anchor points in the following format "P1x,P1y;P2x,P2y; ... PNx,PNy;" where X denotes the f...
~vtkEqualizerContextItem() override
static vtkEqualizerContextItem * New()
bool MouseEnterEvent(const vtkContextMouseEvent &mouse) override
Mouse enter event.
void SetPoints(const std::string &points)
Set / Get anchor points in the following format "P1x,P1y;P2x,P2y; ... PNx,PNy;" where X denotes the f...
bool MouseMoveEvent(const vtkContextMouseEvent &mouse) override
Mouse move event.
bool MouseLeaveEvent(const vtkContextMouseEvent &mouse) override
Mouse leave event.
bool Hit(const vtkContextMouseEvent &mouse) override
Return true if the supplied x, y coordinate is inside the item.
bool MouseButtonReleaseEvent(const vtkContextMouseEvent &mouse) override
Mouse button release event.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
bool MouseButtonPressEvent(const vtkContextMouseEvent &mouse) override
Mouse button down event Return true if the item holds the event, false if the event can be propagated...
a simple class to control print indentation
Definition: vtkIndent.h:108
provides a pen that draws the outlines of shapes drawn by vtkContext2D.
Definition: vtkPen.h:78
@ points
Definition: vtkX3D.h:446
@ string
Definition: vtkX3D.h:490