23 #ifndef VTKVIEWER_RENDERWINDOWINTERACTOR_H 
   24 #define VTKVIEWER_RENDERWINDOWINTERACTOR_H 
   34 class QContextMenuEvent;
 
   37 #include <TColStd_MapOfInteger.hxx> 
   38 #include <TColStd_MapIteratorOfMapOfInteger.hxx> 
   39 #include <TColStd_IndexedMapOfInteger.hxx> 
   44 class vtkActorCollection;
 
   54 #include <vtkVersion.h> 
   55 #include <vtkRenderWindowInteractor.h> 
   66   void PrintSelf(ostream& os, vtkIndent indent);
 
   68   virtual void Initialize();
 
   74     return myInteractorStyle;
 
   79   virtual void Enable();
 
   82   virtual void UpdateSize(
int x,
int y);
 
   86   virtual int CreateTimer(
int ) ;
 
   87   virtual int DestroyTimer() ; 
 
  107   bool highlightCell(
const TColStd_IndexedMapOfInteger& MapIndex,
 
  110                      bool update = 
true );
 
  111   bool highlightEdge(
const TColStd_IndexedMapOfInteger& MapIndex,
 
  114                      bool update = 
true );
 
  115   bool highlightPoint(
const TColStd_IndexedMapOfInteger& MapIndex,
 
  118                       bool update = 
true );
 
  120   void unHighlightSubSelection();
 
  121   bool unHighlightAll();
 
  124   void SetSelectionProp(
const double& theRed = 1, 
const double& theGreen = 1,
 
  125                         const double& theBlue = 0, 
const int& theWidth = 5);
 
  126   void SetSelectionTolerance(
const double& theTolNodes = 0.025, 
const double& theTolCell = 0.001);
 
  131   int GetDisplayMode();
 
  132   void SetDisplayMode(
int);
 
  137   void ChangeRepresentationToWireframe();
 
  138   void ChangeRepresentationToSurface();
 
  139   void ChangeRepresentationToSurfaceWithEdges();
 
  144   void ChangeRepresentationToWireframe(vtkActorCollection* ListofActors);
 
  145   void ChangeRepresentationToSurface(vtkActorCollection* ListofActors);
 
  146   void ChangeRepresentationToSurfaceWithEdges(vtkActorCollection* ListofActors);
 
  153   void RemoveAll( 
const bool immediatly );
 
  162   vtkRenderer* GetRenderer();
 
  166   void setCellData(
const int& theIndex,
 
  169   void setEdgeData(
const int& theCellIndex,
 
  171                    const int& theEdgeIndex,
 
  173   void setPointData(
const int& theIndex,
 
  177   typedef void (*TUpdateActor)(
const TColStd_IndexedMapOfInteger& theMapIndex,
 
  187   bool highlight(
const TColStd_IndexedMapOfInteger& theMapIndex,
 
  189                  TUpdateActor theFun, 
bool hilight, 
bool update);
 
  190   void setActorData(
const TColStd_IndexedMapOfInteger& theMapIndex,
 
  193                     TUpdateActor theFun);
 
  206   void MoveInternalActors();
 
  213   int PositionBeforeStereo[2];
 
  216   void MouseMove(QMouseEvent *event) ;
 
  217   void LeftButtonPressed(
const QMouseEvent *event) ;
 
  218   void LeftButtonReleased(
const QMouseEvent *event) ;
 
  219   void MiddleButtonPressed(
const QMouseEvent *event) ;
 
  220   void MiddleButtonReleased(
const QMouseEvent *event) ;
 
  221   void RightButtonPressed(
const QMouseEvent *event) ;
 
  222   void RightButtonReleased(
const QMouseEvent *event) ;
 
  223   void ButtonPressed(
const QMouseEvent *event) ;
 
  224   void ButtonReleased(
const QMouseEvent *event) ;
 
  225   void KeyPressed(QKeyEvent *event) ;
 
  231   void RenderWindowModified() ;
 
  232   void contextMenuRequested( QContextMenuEvent *e );