VTK
vtkHoverWidget.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: Visualization Toolkit
4 Module: vtkHoverWidget.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=========================================================================*/
73#ifndef vtkHoverWidget_h
74#define vtkHoverWidget_h
75
76#include "vtkInteractionWidgetsModule.h" // For export macro
77#include "vtkAbstractWidget.h"
78
79
80class VTKINTERACTIONWIDGETS_EXPORT vtkHoverWidget : public vtkAbstractWidget
81{
82public:
87
89
93 void PrintSelf(ostream& os, vtkIndent indent);
95
97
102 vtkSetClampMacro(TimerDuration,int,1,100000);
103 vtkGetMacro(TimerDuration,int);
105
110 virtual void SetEnabled(int);
111
118 {this->WidgetRep = NULL;}
119
120protected:
123
124 // The state of the widget
125
126 enum {Start=0,Timing,TimedOut};
127
129
130 // Callback interface to execute events
134
135 // Subclasses of this class invoke these methods. If a non-zero
136 // value is returned, a subclass is handling the event.
137 virtual int SubclassHoverAction() {return 0;}
138 virtual int SubclassEndHoverAction() {return 0;}
139 virtual int SubclassSelectAction() {return 0;}
140
142
148
149private:
150 vtkHoverWidget(const vtkHoverWidget&) VTK_DELETE_FUNCTION;
151 void operator=(const vtkHoverWidget&) VTK_DELETE_FUNCTION;
152};
153
154#endif
define the API for widget / widget representation
invoke a vtkTimerEvent when hovering
virtual int SubclassSelectAction()
int TimerId
Helper methods for creating and destroying timers.
static vtkHoverWidget * New()
Instantiate this class.
static void HoverAction(vtkAbstractWidget *)
void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
void CreateDefaultRepresentation()
A default representation, of which there is none, is created.
static void MoveAction(vtkAbstractWidget *)
static void SelectAction(vtkAbstractWidget *)
virtual int SubclassEndHoverAction()
virtual void SetEnabled(int)
The method for activating and deactivating this widget.
virtual int SubclassHoverAction()
a simple class to control print indentation
Definition: vtkIndent.h:40