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 =========================================================================*/
75 #ifndef vtkHoverWidget_h
76 #define vtkHoverWidget_h
77 
78 #include "vtkInteractionWidgetsModule.h" // For export macro
79 #include "vtkAbstractWidget.h"
80 
81 
83 {
84 public:
86  static vtkHoverWidget *New();
87 
89 
91  void PrintSelf(ostream& os, vtkIndent indent);
93 
95 
98  vtkSetClampMacro(TimerDuration,int,1,100000);
99  vtkGetMacro(TimerDuration,int);
101 
105  virtual void SetEnabled(int);
106 
108 
112  {this->WidgetRep = NULL;}
114 
115 protected:
116  vtkHoverWidget();
117  ~vtkHoverWidget();
118 
119  // The state of the widget
120 //BTX
121  enum {Start=0,Timing,TimedOut};
122 //ETX
124 
125  // Callback interface to execute events
126  static void MoveAction(vtkAbstractWidget*);
127  static void HoverAction(vtkAbstractWidget*);
128  static void SelectAction(vtkAbstractWidget*);
129 
130  // Subclasses of this class invoke these methods. If a non-zero
131  // value is returned, a subclass is handling the event.
132  virtual int SubclassHoverAction() {return 0;}
133  virtual int SubclassEndHoverAction() {return 0;}
134  virtual int SubclassSelectAction() {return 0;}
135 
137 
138  int TimerId;
141 
142 private:
143  vtkHoverWidget(const vtkHoverWidget&); //Not implemented
144  void operator=(const vtkHoverWidget&); //Not implemented
145 };
146 
147 #endif
void PrintSelf(ostream &os, vtkIndent indent)
#define VTKINTERACTIONWIDGETS_EXPORT
a simple class to control print indentation
Definition: vtkIndent.h:38
void CreateDefaultRepresentation()
virtual int SubclassHoverAction()
virtual int SubclassSelectAction()
virtual int SubclassEndHoverAction()
define the API for widget / widget representation
invoke a vtkTimerEvent when hovering
static vtkObject * New()
virtual void SetEnabled(int)