VTK  9.2.20230606
vtkEqualizerContextItem.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkEqualizerContextItem.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 #ifndef vtkEqualizerContextItem_h
16 #define vtkEqualizerContextItem_h
17 
18 #include "vtkContextItem.h"
19 #include "vtkInteractionWidgetsModule.h" // For export macro
20 #include "vtkNew.h" // For vtkNew
21 
22 #include <string> // for std::string
23 
24 VTK_ABI_NAMESPACE_BEGIN
25 class vtkBrush;
26 class vtkPen;
28 
48 class VTKINTERACTIONWIDGETS_EXPORT vtkEqualizerContextItem : public vtkContextItem
49 {
50 public:
52 
54  void PrintSelf(ostream& os, vtkIndent indent) override;
55 
59  bool Paint(vtkContext2D* painter) override;
60 
64  bool Hit(const vtkContextMouseEvent& mouse) override;
65 
71  bool MouseEnterEvent(const vtkContextMouseEvent& mouse) override;
72 
78  bool MouseMoveEvent(const vtkContextMouseEvent& mouse) override;
79 
85  bool MouseLeaveEvent(const vtkContextMouseEvent& mouse) override;
86 
92  bool MouseButtonPressEvent(const vtkContextMouseEvent& mouse) override;
93 
99  bool MouseButtonReleaseEvent(const vtkContextMouseEvent& mouse) override;
100 
102 
112 
113 protected:
115  {
116  NO_BUTTON = 0,
117  LEFT_BUTTON_PRESSED = 1,
118  RIGHT_BUTTON_PRESSED = 2
119  };
120 
123 
124  MouseStates MouseState = NO_BUTTON;
127 
128 private:
130  void operator=(const vtkEqualizerContextItem&) = delete;
131 
132  class vtkInternal;
133  vtkInternal* Internal;
134 };
135 
136 VTK_ABI_NAMESPACE_END
137 #endif
provides a brush that fills shapes drawn by vtkContext2D.
Definition: vtkBrush.h:101
Class for drawing 2D primitives to a graphical context.
Definition: vtkContext2D.h:78
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:120
provides a pen that draws the outlines of shapes drawn by vtkContext2D.
Definition: vtkPen.h:140
@ points
Definition: vtkX3D.h:458
@ string
Definition: vtkX3D.h:502