--- /dev/null
+# - Try to find DFBrowser
+# Once done this will define
+#
+# DBROWSER_FOUND - system has DFBrowser
+# DFBROWSER_INCLUDE_DIRS - the DFBrowser include directory
+# DFBROWSER_LIBRARIES - Link these to use DFBrowser
+
+#=============================================================================
+## Copyright (C) 2014-20xx CEA/DEN, EDF R&D
+#=============================================================================
+
+IF(NOT DFBROWSER_FIND_QUIETLY)
+ MESSAGE(STATUS "Try to find DFBrowser at $ENV{DFBROWSER_ROOT_DIR}...")
+ENDIF()
+
+SET(DFBROWSER_ROOT_DIR $ENV{DFBROWSER_ROOT_DIR} CACHE PATH "Path to the DFBrowser directory")
+IF(EXISTS ${DFBROWSER_ROOT_DIR})
+ SET(DFBROWSER_INCLUDE_DIR "${DFBROWSER_ROOT_DIR}/include")
+ SET(DFBROWSER_LIB_DIR "${DFBROWSER_ROOT_DIR}/lib")
+
+ FIND_LIBRARY(DFBrowserAPI DFBrowserAPI "${DFBROWSER_LIB_DIR}")
+ SET(DFBrowserAPI ${DFBrowserAPI})
+
+ MESSAGE(STATUS "DFBrowser found at ${DFBROWSER_ROOT_DIR}")
+ MESSAGE(STATUS "DFBrowser include dir at ${DFBROWSER_INCLUDE_DIR}")
+ MESSAGE(STATUS "DFBrowser lib dir at ${DFBROWSER_LIB_DIR}")
+ENDIF(EXISTS ${DFBROWSER_ROOT_DIR})
--- /dev/null
+# - Try to find VInspector
+# Once done this will define
+#
+# VINSPECTOR_FOUND - system has VInspector
+# VINSPECTOR_INCLUDE_DIRS - the VInspector include directory
+# VINSPECTOR_LIBRARIES - Link these to use VInspector
+
+#=============================================================================
+## Copyright (C) 2014-20xx CEA/DEN, EDF R&D
+#=============================================================================
+
+IF(NOT VINSPECTOR_FIND_QUIETLY)
+ MESSAGE(STATUS "Try to find VInspector at $ENV{VINSPECTOR_ROOT_DIR}...")
+ENDIF()
+
+SET(VINSPECTOR_ROOT_DIR $ENV{VINSPECTOR_ROOT_DIR} CACHE PATH "Path to the VInspector directory")
+IF(EXISTS ${VINSPECTOR_ROOT_DIR})
+ SET(VINSPECTOR_INCLUDE_DIR "${VINSPECTOR_ROOT_DIR}/include")
+ SET(VINSPECTOR_LIB_DIR "${VINSPECTOR_ROOT_DIR}/lib")
+
+ FIND_LIBRARY(VInspectorAPI VInspectorAPI "${VINSPECTOR_LIB_DIR}")
+ SET(VInspectorAPI ${VInspectorAPI})
+
+ MESSAGE(STATUS "VInspector found at ${VINSPECTOR_ROOT_DIR}")
+ MESSAGE(STATUS "VInspector include dir at ${VINSPECTOR_INCLUDE_DIR}")
+ MESSAGE(STATUS "VInspector lib dir at ${VINSPECTOR_LIB_DIR}")
+ENDIF(EXISTS ${VINSPECTOR_ROOT_DIR})
INCLUDE(FindSalome)
INCLUDE(FindCAS)
INCLUDE(FindSUIT)
+INCLUDE(FindDFBrowser)
+INCLUDE(FindVInspector)
# Find LibXml2
IF(DEFINED ENV{LIBXML2_ROOT_DIR})
)
-IF(EXISTS ${OCAFBROWSER_ROOT_DIR})
+IF(EXISTS ${DFBROWSER_ROOT_DIR})
SET(PROJECT_LIBRARIES ${PROJECT_LIBRARIES} ${DFBrowserAPI})
- SET(PROJECT_INCLUDES ${PROJECT_INCLUDES} ${OCAFBROWSER_INCLUDE_DIR})
+ SET(PROJECT_INCLUDES ${PROJECT_INCLUDES} ${DFBROWSER_INCLUDE_DIR})
- ADD_DEFINITIONS(-DOCAFBROWSER)
+ ADD_DEFINITIONS(-DDFBROWSER)
ENDIF()
ADD_DEFINITIONS(-DMODEL_EXPORTS ${CAS_DEFINITIONS})
#include <ModelAPI_Events.h>
-#ifdef OCAFBROWSER
-#include <DFBrowserAPI_PluginMgr.h>
-#include <DFBrowserAPI_Communicator.h>
+#ifdef DFBROWSER
+#include <DFBrowserAPI_Communicator.hxx>
static bool FirstCall = true;
#endif
//=======================================================================
Handle(Model_Application) Model_Application::getApplication()
{
-#ifdef OCAFBROWSER
- if (FirstCall) {
- DFBrowserAPI_PluginMgr::activateBrowser("OCAFBrowser.dll", TheApplication);
- FirstCall = false;
- }
+#ifdef DFBROWSER
+ if (FirstCall) {
+ DFBrowserAPI_Communicator* aCommunicator =
+ DFBrowserAPI_Communicator::loadPluginLibrary("DFBrowser.dll");
+ aCommunicator->setApplication(TheApplication);
+ FirstCall = false;
+ }
#endif
return TheApplication;
}
: myID(theID), myKind(theKind), myIsActive(false),
myDoc(new TDocStd_Document("BinOcaf")) // binary OCAF format
{
-#ifdef OCAFBROWSER
+#ifdef DFBROWSER
CDF_Session::CurrentSession()->Directory()->Add(myDoc);
#endif
myObjs = new Model_Objects(myDoc->Main());
${CAS_INCLUDE_DIRS}
${SUIT_INCLUDE})
+IF(EXISTS ${VINSPECTOR_ROOT_DIR})
+ SET(PROJECT_LIBRARIES ${PROJECT_LIBRARIES} ${VInspectorAPI})
+ SET(PROJECT_INCLUDES ${PROJECT_INCLUDES} ${VINSPECTOR_INCLUDE_DIR})
+
+ ADD_DEFINITIONS(-DVINSPECTOR)
+ENDIF()
+
IF(NOT ${HAVE_SALOME})
SET(PROJECT_INCLUDES ${PROJECT_INCLUDES} ${APPELEMENTS_INCLUDE_DIR})
ENDIF(NOT ${HAVE_SALOME})
#include <AppElements_Viewer.h>
#endif
+#ifdef VINSPECTOR\r
+#include <VInspectorAPI_PluginMgr.h>\r
+#include <VInspectorAPI_Communicator.h>\r
+
+static bool FirstCall = true;\r
+
+#endif
+
#include <ModuleBase_IViewWindow.h>
#include <QEvent>
Handle(AIS_InteractiveContext) XGUI_ViewerProxy::AISContext() const
{
+ Handle(AIS_InteractiveContext) aContext;
#ifdef HAVE_SALOME
- return myWorkshop->salomeConnector()->viewer()->AISContext();
+ aContext = myWorkshop->salomeConnector()->viewer()->AISContext();
#else
- return myWorkshop->mainWindow()->viewer()->AISContext();
+ aContext = myWorkshop->mainWindow()->viewer()->AISContext();
#endif
+
+#ifdef VINSPECTOR\r
+ if (FirstCall) {\r
+ VInspectorAPI_PluginMgr::activateVInspector("VInspector.dll", aContext);
+ FirstCall = false;
+ }
+#endif
+
+
+ return aContext;
}
Handle(AIS_Trihedron) XGUI_ViewerProxy::trihedron() const