• Main Page
  • Related Pages
  • Namespaces
  • Classes
  • Files
  • File List
  • File Members

dox/Widgets/vtkHoverWidget.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkHoverWidget.h,v $
00005 
00006   Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
00007   All rights reserved.
00008   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
00009 
00010      This software is distributed WITHOUT ANY WARRANTY; without even
00011      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
00012      PURPOSE.  See the above copyright notice for more information.
00013 
00014 =========================================================================*/
00072 #ifndef __vtkHoverWidget_h
00073 #define __vtkHoverWidget_h
00074 
00075 #include "vtkAbstractWidget.h"
00076 
00077 
00078 class VTK_WIDGETS_EXPORT vtkHoverWidget : public vtkAbstractWidget
00079 {
00080 public:
00082   static vtkHoverWidget *New();
00083 
00085 
00086   vtkTypeRevisionMacro(vtkHoverWidget,vtkAbstractWidget);
00087   void PrintSelf(ostream& os, vtkIndent indent);
00089 
00091 
00094   vtkSetClampMacro(TimerDuration,int,1,100000);
00095   vtkGetMacro(TimerDuration,int);
00097   
00101   virtual void SetEnabled(int);
00102 
00104 
00107   void CreateDefaultRepresentation()
00108     {this->WidgetRep = NULL;}
00110 
00111 protected:
00112   vtkHoverWidget();
00113   ~vtkHoverWidget();
00114 
00115   // The state of the widget
00116 //BTX
00117   enum {Start=0,Timing,TimedOut};
00118 //ETX
00119   int WidgetState;
00120 
00121   // Callback interface to execute events
00122   static void MoveAction(vtkAbstractWidget*);
00123   static void HoverAction(vtkAbstractWidget*);
00124   static void SelectAction(vtkAbstractWidget*);
00125   
00126   // Subclasses of this class invoke these methods. If a non-zero
00127   // value is returned, a subclass is handling the event.
00128   virtual int SubclassHoverAction() {return 0;}
00129   virtual int SubclassEndHoverAction() {return 0;}
00130   virtual int SubclassSelectAction() {return 0;}
00131   
00133 
00134   int TimerId;
00135   int TimerDuration;
00137   
00138 private:
00139   vtkHoverWidget(const vtkHoverWidget&);  //Not implemented
00140   void operator=(const vtkHoverWidget&);  //Not implemented
00141 };
00142 
00143 #endif

Generated by  doxygen 1.7.1