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 "vtkAbstractWidget.h"
79 
80 
82 {
83 public:
85  static vtkHoverWidget *New();
86 
88 
90  void PrintSelf(ostream& os, vtkIndent indent);
92 
94 
97  vtkSetClampMacro(TimerDuration,int,1,100000);
98  vtkGetMacro(TimerDuration,int);
100 
104  virtual void SetEnabled(int);
105 
107 
111  {this->WidgetRep = NULL;}
113 
114 protected:
115  vtkHoverWidget();
116  ~vtkHoverWidget();
117 
118  // The state of the widget
119 //BTX
120  enum {Start=0,Timing,TimedOut};
121 //ETX
123 
124  // Callback interface to execute events
125  static void MoveAction(vtkAbstractWidget*);
126  static void HoverAction(vtkAbstractWidget*);
127  static void SelectAction(vtkAbstractWidget*);
128 
129  // Subclasses of this class invoke these methods. If a non-zero
130  // value is returned, a subclass is handling the event.
131  virtual int SubclassHoverAction() {return 0;}
132  virtual int SubclassEndHoverAction() {return 0;}
133  virtual int SubclassSelectAction() {return 0;}
134 
136 
137  int TimerId;
140 
141 private:
142  vtkHoverWidget(const vtkHoverWidget&); //Not implemented
143  void operator=(const vtkHoverWidget&); //Not implemented
144 };
145 
146 #endif
void PrintSelf(ostream &os, vtkIndent indent)
a simple class to control print indentation
Definition: vtkIndent.h:37
void CreateDefaultRepresentation()
#define VTK_WIDGETS_EXPORT
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)