VTK  9.2.5
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 class vtkBrush;
25 class vtkPen;
27 
47 class VTKINTERACTIONWIDGETS_EXPORT vtkEqualizerContextItem : public vtkContextItem
48 {
49 public:
51 
53  void PrintSelf(ostream& os, vtkIndent indent) override;
54 
58  bool Paint(vtkContext2D* painter) override;
59 
63  bool Hit(const vtkContextMouseEvent& mouse) override;
64 
70  bool MouseEnterEvent(const vtkContextMouseEvent& mouse) override;
71 
77  bool MouseMoveEvent(const vtkContextMouseEvent& mouse) override;
78 
84  bool MouseLeaveEvent(const vtkContextMouseEvent& mouse) override;
85 
91  bool MouseButtonPressEvent(const vtkContextMouseEvent& mouse) override;
92 
98  bool MouseButtonReleaseEvent(const vtkContextMouseEvent& mouse) override;
99 
101 
111 
112 protected:
114  {
115  NO_BUTTON = 0,
116  LEFT_BUTTON_PRESSED = 1,
117  RIGHT_BUTTON_PRESSED = 2
118  };
119 
122 
123  MouseStates MouseState = NO_BUTTON;
126 
127 private:
129  void operator=(const vtkEqualizerContextItem&) = delete;
130 
131  class vtkInternal;
132  vtkInternal* Internal;
133 };
134 
135 #endif
provides a brush that fills shapes drawn by vtkContext2D.
Definition: vtkBrush.h:100
Class for drawing 2D primitives to a graphical context.
Definition: vtkContext2D.h:77
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
~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:119
provides a pen that draws the outlines of shapes drawn by vtkContext2D.
Definition: vtkPen.h:139
@ points
Definition: vtkX3D.h:452
@ string
Definition: vtkX3D.h:496