VTK  9.2.6
vtkBorderWidget.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: Visualization Toolkit
4 Module: vtkBorderWidget.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=========================================================================*/
75
76#ifndef vtkBorderWidget_h
77#define vtkBorderWidget_h
78
79#include "vtkAbstractWidget.h"
80#include "vtkDeprecation.h" // For VTK_DEPRECATED_IN_9_2_0
81#include "vtkInteractionWidgetsModule.h" // For export macro
82
84
85class VTKINTERACTIONWIDGETS_EXPORT vtkBorderWidget : public vtkAbstractWidget
86{
87public:
92
94
98 void PrintSelf(ostream& os, vtkIndent indent) override;
100
102
108 vtkSetMacro(Selectable, vtkTypeBool);
109 vtkGetMacro(Selectable, vtkTypeBool);
110 vtkBooleanMacro(Selectable, vtkTypeBool);
112
114
119 vtkSetMacro(Resizable, vtkTypeBool);
120 vtkGetMacro(Resizable, vtkTypeBool);
121 vtkBooleanMacro(Resizable, vtkTypeBool);
123
133
138 {
139 return reinterpret_cast<vtkBorderRepresentation*>(this->WidgetRep);
140 }
141
146
152
153protected:
156
162 virtual void SelectRegion(double eventPos[2]);
163
164 // enable the selection of the region interior to the widget
167
168 // processes the registered events
174
175 // Special internal methods to support subclasses handling events.
176 // If a non-zero value is returned, the subclass is handling the event.
177 virtual int SubclassSelectAction() { return 0; }
178 virtual int SubclassTranslateAction() { return 0; }
179 virtual int SubclassEndSelectAction() { return 0; }
180 virtual int SubclassMoveAction() { return 0; }
181
182 // helper methods for cursoe management
183 void SetCursor(int State) override;
184
185 // widget state
194#if !defined(VTK_LEGACY_REMOVE)
195 VTK_DEPRECATED_IN_9_2_0("because leading underscore is reserved")
197#endif
198
199private:
200 vtkBorderWidget(const vtkBorderWidget&) = delete;
201 void operator=(const vtkBorderWidget&) = delete;
202};
203
204#endif
void SetWidgetRepresentation(vtkWidgetRepresentation *r)
vtkWidgetRepresentation * WidgetRep
represent a vtkBorderWidget
static vtkBorderWidget * New()
Method to instantiate class.
vtkTypeBool Resizable
static void SelectAction(vtkAbstractWidget *)
WidgetStateType _WidgetState
static void TranslateAction(vtkAbstractWidget *)
virtual void SelectRegion(double eventPos[2])
Subclasses generally implement this method.
~vtkBorderWidget() override
void SetCursor(int State) override
vtkTypeBool Selectable
virtual int SubclassSelectAction()
static void EndSelectAction(vtkAbstractWidget *)
static void HoverLeaveAction(vtkAbstractWidget *)
void CreateDefaultRepresentation() override
Create the default widget representation if one is not set.
virtual int SubclassMoveAction()
void PrintSelf(ostream &os, vtkIndent indent) override
Standard methods for class.
virtual int SubclassEndSelectAction()
virtual int SubclassTranslateAction()
void SetRepresentation(vtkBorderRepresentation *r)
Specify an instance of vtkWidgetRepresentation used to represent this widget in the scene.
vtkTypeBool GetProcessEvents() override
Reimplement ProcessEvents to disable it when using relative location with windowLocation.
vtkBorderRepresentation * GetBorderRepresentation()
Return the representation as a vtkBorderRepresentation.
static void MoveAction(vtkAbstractWidget *)
a simple class to control print indentation
Definition vtkIndent.h:34
abstract class defines interface between the widget and widget representation classes
int vtkTypeBool
Definition vtkABI.h:69
#define VTK_DEPRECATED_IN_9_2_0(reason)