-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
#include <LightApp_SelectionMgr.h>
#include <LightApp_DataOwner.h>
#include <SALOME_Prs.h>
-#include <SOCC_ViewModel.h>
-#include <SVTK_ViewModel.h>
-#include <SVTK_ViewWindow.h>
-#include <SOCC_ViewWindow.h>
-#include <SPlot2d_ViewWindow.h>
-
#include <SALOME_Event.h>
-#include <SALOME_ListIO.hxx>
-#include <SALOME_InteractiveObject.hxx>
-#include <SALOME_ListIteratorOfListIO.hxx>
+
+#ifndef DISABLE_SALOMEOBJECT
+ #include <SALOME_ListIO.hxx>
+ #include <SALOME_InteractiveObject.hxx>
+ #include <SALOME_ListIteratorOfListIO.hxx>
+#ifndef DISABLE_OCCVIEWER
+ #include <SOCC_ViewModel.h>
+ #include <SOCC_ViewWindow.h>
+#endif
+#ifndef DISABLE_VTKVIEWER
+ #include <SVTK_ViewModel.h>
+ #include <SVTK_ViewWindow.h>
+#endif
+#ifndef DISABLE_PLOT2DVIEWER
+ #include <SPlot2d_ViewWindow.h>
+#endif
+#endif
+
/*!
\class SALOMEGUI_Swig
if ( LightApp_Application* anApp = getApplication() ) {
SUIT_ViewWindow* window = anApp->desktop()->activeWindow();
if ( window ) {
- SALOME_View* view = dynamic_cast<SALOME_View*>( window->getViewManager()->getViewModel() );
+ SALOME_View* view = dynamic_cast<SALOME_View*>( window->getViewManager()->getActiveView() );
if ( view ) {
SALOME_Prs* aPrs = view->CreatePrs( myEntry.toLatin1() );
myResult = !aPrs->IsNull();
if ( LightApp_Application* anApp = getApplication() ) {
SUIT_ViewWindow* window = anApp->desktop()->activeWindow();
if ( window ) {
- SALOME_View* view = dynamic_cast<SALOME_View*>( window->getViewManager()->getViewModel() );
+ SALOME_View* view = dynamic_cast<SALOME_View*>( window->getViewManager()->getActiveView() );
if ( view )
view->Repaint();
}
if ( LightApp_Application* anApp = getApplication() ) {
SUIT_ViewWindow* window = anApp->desktop()->activeWindow();
if ( window ) {
+#ifndef DISABLE_SALOMEOBJECT
+#ifndef DISABLE_VTKVIEWER
if ( dynamic_cast<SVTK_ViewWindow*>( window ) )
( dynamic_cast<SVTK_ViewWindow*>( window ) )->onFitAll();
- else if ( dynamic_cast<OCCViewer_ViewWindow*>( window ) )
- ( dynamic_cast<OCCViewer_ViewWindow*>( window ) )->onFitAll();
- else if ( dynamic_cast<SPlot2d_ViewWindow*>( window ) )
+#endif
+#ifndef DISABLE_PLOT2DVIEWER
+ if ( dynamic_cast<SPlot2d_ViewWindow*>( window ) )
( dynamic_cast<SPlot2d_ViewWindow*>( window ) )->onFitAll();
+#endif
+#endif
+#ifndef DISABLE_OCCVIEWER
+ if ( dynamic_cast<OCCViewer_ViewWindow*>( window ) )
+ ( dynamic_cast<OCCViewer_ViewWindow*>( window ) )->onFitAll();
+#endif
}
}
}
if ( LightApp_Application* anApp = getApplication() ) {
SUIT_ViewWindow* window = anApp->desktop()->activeWindow();
if ( window ) {
+#ifndef DISABLE_SALOMEOBJECT
+#ifndef DISABLE_VTKVIEWER
if ( dynamic_cast<SVTK_ViewWindow*>( window ) )
(dynamic_cast<SVTK_ViewWindow*>( window ))->onResetView();
- else if ( dynamic_cast<OCCViewer_ViewWindow*>( window ) )
- (dynamic_cast<OCCViewer_ViewWindow*>( window ))->onResetView();
- else if ( dynamic_cast<SPlot2d_ViewWindow*>( window ) )
+#endif
+#ifndef DISABLE_PLOT2DVIEWER
+ if ( dynamic_cast<SPlot2d_ViewWindow*>( window ) )
(dynamic_cast<SPlot2d_ViewWindow*>( window ))->onFitAll();
// VSR: there is no 'ResetView' functionality for Plot2d viewer,
// so we use 'FitAll' instead.
+#endif
+#endif
+#ifndef DISABLE_OCCVIEWER
+ if ( dynamic_cast<OCCViewer_ViewWindow*>( window ) )
+ (dynamic_cast<OCCViewer_ViewWindow*>( window ))->onResetView();
+#endif
}
}
}
if ( LightApp_Application* anApp = getApplication() ) {
SUIT_ViewWindow* window = anApp->desktop()->activeWindow();
if ( window ) {
+#ifndef DISABLE_SALOMEOBJECT
+#ifndef DISABLE_VTKVIEWER
if ( dynamic_cast<SVTK_ViewWindow*>( window ) ) {
switch( myView ) {
case __ViewTop:
break;
}
}
- else if ( dynamic_cast<OCCViewer_ViewWindow*>( window ) ) {
+#endif
+#endif
+#ifndef DISABLE_OCCVIEWER
+ if ( dynamic_cast<OCCViewer_ViewWindow*>( window ) ) {
switch( myView ) {
case __ViewTop:
(dynamic_cast<OCCViewer_ViewWindow*>( window ))->onTopView(); break;
break;
}
}
+#endif
}
}
}