VTK
dox/Charts/vtkContextInteractorStyle.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    vtkContextInteractorStyle.h
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 =========================================================================*/
00024 #ifndef __vtkContextInteractorStyle_h
00025 #define __vtkContextInteractorStyle_h
00026 
00027 #include "vtkInteractorStyle.h"
00028 
00029 class vtkContextScene;
00030 
00031 class VTK_CHARTS_EXPORT vtkContextInteractorStyle : public vtkInteractorStyle
00032 {
00033 public:
00034   static vtkContextInteractorStyle *New();
00035   vtkTypeMacro(vtkContextInteractorStyle, vtkInteractorStyle);
00036   void PrintSelf(ostream& os, vtkIndent indent);
00037 
00039 
00043   void SetScene(vtkContextScene* scene);
00044   // Description:
00045   // Return the observed scene.
00046   vtkGetObjectMacro(Scene, vtkContextScene);
00048 
00050   virtual void OnSceneModified();
00051 
00054   virtual void OnMouseMove();
00055 
00058   virtual void OnLeftButtonDown();
00059 
00062   virtual void OnLeftButtonUp();
00063 
00066   virtual void OnMiddleButtonDown();
00067 
00070   virtual void OnMiddleButtonUp();
00071 
00074   virtual void OnRightButtonDown();
00075 
00078   virtual void OnRightButtonUp();
00079 
00082   virtual void OnMouseWheelForward();
00083 
00086   virtual void OnMouseWheelBackward();
00087 
00090   virtual void OnSelection(unsigned int rect[5]);
00091 
00092 protected:
00093   vtkContextInteractorStyle();
00094   ~vtkContextInteractorStyle();
00095   static void ProcessSceneEvents(vtkObject* object, unsigned long event,
00096                                  void* clientdata, void* calldata);
00097 
00101   void BeginProcessingEvent();
00102 
00106   void EndProcessingEvent();
00107 
00108   vtkContextScene*    Scene;
00109   vtkCallbackCommand* SceneCallbackCommand;
00110   int                 ProcessingEvents;
00111   unsigned long int   LastSceneRepaintMTime;
00112 
00113 private:
00114   vtkContextInteractorStyle(const vtkContextInteractorStyle&); // Not implemented
00115   void operator=(const vtkContextInteractorStyle&); // Not implemented
00116 };
00117 
00118 #endif