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:
118 
119  // The state of the widget
120 //BTX
121  enum {Start=0,Timing,TimedOut};
122 //ETX
124 
125  // Callback interface to execute events
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
vtkHoverWidget::Timing
@ Timing
Definition: vtkHoverWidget.h:121
vtkHoverWidget::HoverAction
static void HoverAction(vtkAbstractWidget *)
vtkAbstractWidget.h
vtkHoverWidget::MoveAction
static void MoveAction(vtkAbstractWidget *)
vtkHoverWidget
invoke a vtkTimerEvent when hovering
Definition: vtkHoverWidget.h:83
vtkTypeMacro
#define vtkTypeMacro(thisClass, superclass)
Definition: vtkSetGet.h:642
vtkInteractionWidgetsModule.h
vtkHoverWidget::WidgetState
int WidgetState
Definition: vtkHoverWidget.h:123
vtkAbstractWidget
define the API for widget / widget representation
Definition: vtkAbstractWidget.h:66
vtkSetClampMacro
#define vtkSetClampMacro(name, type, min, max)
Definition: vtkSetGet.h:143
vtkHoverWidget::~vtkHoverWidget
~vtkHoverWidget()
vtkHoverWidget::SubclassSelectAction
virtual int SubclassSelectAction()
Definition: vtkHoverWidget.h:134
vtkHoverWidget::CreateDefaultRepresentation
void CreateDefaultRepresentation()
Definition: vtkHoverWidget.h:111
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:39
vtkHoverWidget::SetEnabled
virtual void SetEnabled(int)
vtkGetMacro
#define vtkGetMacro(name, type)
Definition: vtkSetGet.h:93
vtkHoverWidget::SelectAction
static void SelectAction(vtkAbstractWidget *)
vtkHoverWidget::vtkHoverWidget
vtkHoverWidget()
vtkHoverWidget::SubclassHoverAction
virtual int SubclassHoverAction()
Definition: vtkHoverWidget.h:132
vtkHoverWidget::New
static vtkHoverWidget * New()
VTKINTERACTIONWIDGETS_EXPORT
#define VTKINTERACTIONWIDGETS_EXPORT
Definition: vtkInteractionWidgetsModule.h:15
vtkHoverWidget::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent)
vtkHoverWidget::TimerDuration
int TimerDuration
Definition: vtkHoverWidget.h:139
vtkHoverWidget::SubclassEndHoverAction
virtual int SubclassEndHoverAction()
Definition: vtkHoverWidget.h:133
vtkHoverWidget::TimerId
int TimerId
Definition: vtkHoverWidget.h:138