VTK  9.2.6
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:
50  static vtkEqualizerContextItem* New();
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 
108  void SetPoints(const std::string& points);
109  std::string GetPoints() const;
111 
112 protected:
114  {
115  NO_BUTTON = 0,
116  LEFT_BUTTON_PRESSED = 1,
117  RIGHT_BUTTON_PRESSED = 2
118  };
119 
121  ~vtkEqualizerContextItem() override;
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
base class for items that are part of a vtkContextScene.
virtual bool MouseButtonPressEvent(const vtkContextMouseEvent &mouse)
Mouse button down event Return true if the item holds the event, false if the event can be propagated...
virtual bool Paint(vtkContext2D *painter)
Paint event for the item, called whenever the item needs to be drawn.
all children of this item are transformed by the vtkTransform2D of this item.
Class for drawing 2D primitives to a graphical context.
Definition: vtkContext2D.h:57
provides a brush that fills shapes drawn by vtkContext2D.
Definition: vtkBrush.h:40
data structure to represent mouse events.
a simple class to control print indentation
Definition: vtkIndent.h:39
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
virtual bool MouseButtonReleaseEvent(const vtkContextMouseEvent &mouse)
Mouse button release event.
provides a pen that draws the outlines of shapes drawn by vtkContext2D.
Definition: vtkPen.h:39
virtual bool MouseEnterEvent(const vtkContextMouseEvent &mouse)
Mouse enter event.
virtual bool MouseMoveEvent(const vtkContextMouseEvent &mouse)
Mouse move event.
virtual bool Hit(const vtkContextMouseEvent &mouse)
Return true if the supplied x, y coordinate is inside the item.
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...
virtual bool MouseLeaveEvent(const vtkContextMouseEvent &mouse)
Mouse leave event.
draws a interactive polyline