VISU_ActorFactory.h \
VISU_GaussPtsSettings.h \
VISU_GaussPtsActorFactory.h \
+ VISU_Event.h \
VISU_Actor.h \
VISU_MeshAct.h \
VISU_ScalarMapAct.h \
--- /dev/null
+// SALOME VTKViewer : build VTK viewer into Salome desktop
+//
+// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
+//
+//
+//
+// File :
+// Author :
+// Module : SALOME
+// $Header$
+
+#ifndef VISU_Event_h
+#define VISU_Event_h
+
+#include "SVTK_Event.h"
+
+namespace VISU
+{
+ enum Event
+ {
+ SetSMDecreaseMagnificationEvent = SVTK::LastEvent + 100,
+ SetSMIncreaseMagnificationEvent,
+ LastEvent
+ };
+}
+
+#endif
#include "VISU_ScalarBarCtrl.hxx"
#include "VISU_ScalarBarActor.hxx"
+#include "VISU_Event.h"
#include "SVTK_Actor.h"
#include <vtkCamera.h>
if(myInteractor)
myInteractor->RemoveObserver(myEventCallbackCommand.GetPointer());
- if(theInteractor)
+ if(theInteractor){
theInteractor->AddObserver(vtkCommand::CharEvent,
myEventCallbackCommand.GetPointer(),
myPriority);
-
+ theInteractor->AddObserver(VISU::SetSMDecreaseMagnificationEvent,
+ myEventCallbackCommand.GetPointer(),
+ myPriority);
+ theInteractor->AddObserver(VISU::SetSMIncreaseMagnificationEvent,
+ myEventCallbackCommand.GetPointer(),
+ myPriority);
+ }
Superclass::SetInteractor(theInteractor);
Modified();
myUpdatePrs3dSignal(this);
break;
}
+ case VISU::SetSMDecreaseMagnificationEvent:
+ case VISU::SetSMIncreaseMagnificationEvent:
+ myChangeMagnification = theEvent == VISU::SetSMIncreaseMagnificationEvent;
+ myUpdatePrs3dSignal(this);
+ break;
default:
break;
}
# header files
EXPORT_HEADERS = \
VVTK.h \
- VVTK_Event.h \
VVTK_ViewManager.h \
VVTK_ViewModel.h \
VVTK_InteractorStyle.h \
+++ /dev/null
-// SALOME VTKViewer : build VTK viewer into Salome desktop
-//
-// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
-// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
-//
-//
-//
-// File :
-// Author : Alexander SLADKOV
-// Module : SALOME
-// $Header$
-
-#ifndef VVTK_Event_h
-#define VVTK_Event_h
-
-#include "SVTK_Event.h"
-
-namespace VVTK
-{
- enum Event
- {
- SetSMDecreaseMagnificationEvent = SVTK::LastEvent + 100,
- SetSMIncreaseMagnificationEvent,
- LastEvent
- };
-}
-
-#endif
#include "VVTK_InteractorStyle.h"
#include "VISU_GaussPtsSettings.h"
#include "SVTK_Selector.h"
-#include "VVTK_Event.h"
+#include "VISU_Event.h"
#include <vtkObjectFactory.h>
#include <vtkRenderWindowInteractor.h>
Superclass::SetInteractor( theInteractor );
if(theInteractor){
- theInteractor->AddObserver( VVTK::SetSMDecreaseMagnificationEvent, EventCallbackCommand, Priority );
- theInteractor->AddObserver( VVTK::SetSMIncreaseMagnificationEvent, EventCallbackCommand, Priority );
+ theInteractor->AddObserver( VISU::SetSMDecreaseMagnificationEvent, EventCallbackCommand, Priority );
+ theInteractor->AddObserver( VISU::SetSMIncreaseMagnificationEvent, EventCallbackCommand, Priority );
}
}
VVTK_InteractorStyle* self = dynamic_cast<VVTK_InteractorStyle*>( anObject );
if( self ){
switch ( event ) {
- case VVTK::SetSMDecreaseMagnificationEvent:
+ case VISU::SetSMDecreaseMagnificationEvent:
self->mySMDecreaseMagnificationBtn = *((int*)callData);
return;
- case VVTK::SetSMIncreaseMagnificationEvent:
+ case VISU::SetSMIncreaseMagnificationEvent:
self->mySMIncreaseMagnificationBtn = *((int*)callData);
return;
}
VVTK_InteractorStyle
::DecreaseGaussPointMagnification()
{
- printf( "\n--DecreaseGaussPointMagnification() NOT IMPLEMENTED--\n" );
+ Interactor->InvokeEvent(VISU::SetSMDecreaseMagnificationEvent,NULL);
}
//----------------------------------------------------------------------------
VVTK_InteractorStyle
::IncreaseGaussPointMagnification()
{
- printf( "\n--IncreaseGaussPointMagnification() NOT IMPLEMENTED--\n" );
+ Interactor->InvokeEvent(VISU::SetSMIncreaseMagnificationEvent,NULL);
}