VTK  9.1.0
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
24class vtkBrush;
25class vtkPen;
27
44class VTKINTERACTIONWIDGETS_EXPORT vtkEqualizerContextItem : public vtkContextItem
45{
46public:
48
50 void PrintSelf(ostream& os, vtkIndent indent) override;
51
64
68 bool Paint(vtkContext2D* painter) override;
69
73 bool Hit(const vtkContextMouseEvent& mouse) override;
74
80 bool MouseEnterEvent(const vtkContextMouseEvent& mouse) override;
81
87 bool MouseMoveEvent(const vtkContextMouseEvent& mouse) override;
88
94 bool MouseLeaveEvent(const vtkContextMouseEvent& mouse) override;
95
101 bool MouseButtonPressEvent(const vtkContextMouseEvent& mouse) override;
102
109
114 void SetScene(vtkContextScene* scene) override;
115
117
124 void SetPoints(const std::string& points);
125 std::string GetPoints() const;
127
128protected:
130 {
131 NO_BUTTON = 0,
132 LEFT_BUTTON_PRESSED = 1,
133 RIGHT_BUTTON_PRESSED = 2
134 };
135
138
139 MouseStates MouseState = NO_BUTTON;
142
143private:
145 void operator=(const vtkEqualizerContextItem&) = delete;
146
147 class vtkInternal;
148 vtkInternal* Internal;
149};
150
151#endif
provides a brush that fills shapes drawn by vtkContext2D.
Definition: vtkBrush.h:97
Class for drawing 2D primitives to a graphical context.
Definition: vtkContext2D.h:73
base class for items that are part of a vtkContextScene.
data structure to represent mouse events.
Provides a 2D scene for vtkContextItem objects.
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
void InstantiateHandleRepresentation()
A stub method that is called from ParaView.
static vtkEqualizerContextItem * New()
void SetScene(vtkContextScene *scene) override
Set the vtkContextScene for the item, always set for an item in a scene.
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:113
Allocate and hold a VTK object.
Definition: vtkNew.h:165
provides a pen that draws the outlines of shapes drawn by vtkContext2D.
Definition: vtkPen.h:136