#include <Standard_Version.hxx>
#ifdef TINSPECTOR
+#if OCC_VERSION_LARGE < 0x07070000
#include <inspector/VInspectorAPI_CallBack.hxx>
+#else
+#include <inspector/MessageView_Communicator.hxx>
+#include <inspector/MessageView_ActionsTest.hxx>
+#include <inspector/MessageView_MetricStatisticModel.hxx>
+#include <inspector/MessageView_VisibilityState.hxx>
+#include <inspector/MessageView_Window.hxx>
+#include <Message_Msg.hxx>
+#include <Message_Report.hxx>
+#endif
#endif
#include <Events_Loop.h>
aContext->SetDisplayPriority(anAISIO, FRONT_DISPLAY_PRIORITY);
}
#ifdef TINSPECTOR
+ #if OCC_VERSION_LARGE < 0x07070000
if (getCallBack()) getCallBack()->Display(anAISIO);
+ #else
+ if (getCallBack()) getCallBack()->Send("Display", Message_Info);
+ #endif
#endif
aDisplayed = true;
emit beforeObjectErase(theObject, anObject);
aContext->Remove(anAIS, false/*update viewer*/);
#ifdef TINSPECTOR
+ #if OCC_VERSION_LARGE < 0x07070000
if (getCallBack()) getCallBack()->Remove(anAIS);
+ #else
+ if (getCallBack()) getCallBack()->Send("Remove", Message_Info);
+ #endif
#endif
aErased = true;
}
aContext->Display(aAISIO, false);
}
#ifdef TINSPECTOR
- if (getCallBack()) getCallBack()->Redisplay(aAISIO);
+ #if OCC_VERSION_LARGE < 0x07070000
+ if (getCallBack()) getCallBack()->Redisplay(aAISIO);
+ #else
+ if (getCallBack()) getCallBack()->Send("Redisplay", Message_Info);
+ #endif
#endif
//if (aNeedToRestoreSelection)
aContext->UnhilightSelected(false);
aContext->ClearSelected(false);
#ifdef TINSPECTOR
+ #if OCC_VERSION_LARGE < 0x07070000
if (getCallBack()) getCallBack()->ClearSelected();
+ #else
+ if (getCallBack()) getCallBack()->Send("ClearSelected", Message_Info);
+ #endif
#endif
NCollection_DataMap<TopoDS_Shape, NCollection_Map<Handle(AIS_InteractiveObject)>>
aShapesToBeSelected;
// it might belong to another result
aContext->AddOrRemoveSelected(aShape, false);
#ifdef TINSPECTOR
+
+ #if OCC_VERSION_LARGE < 0x07070000
if (getCallBack()) getCallBack()->AddOrRemoveSelected(aShape);
+ #else
+ if (getCallBack()) getCallBack()->Send("AddOrRemoveSelected", Message_Info);
+ #endif
#endif
#else
NCollection_Map<Handle(AIS_InteractiveObject)> aPresentations;
aPresentations = aShapesToBeSelected.Find(aShape);
ObjectPtr anObject = aPrs->object();
getPresentations(anObject, aPresentations);
-
+#ifdef TINSPECTOR
+ #if OCC_VERSION_LARGE < 0x07070000
+ if (getCallBack()) getCallBack()->AddOrRemoveSelected(aShape);
+ #else
+ if (getCallBack()) getCallBack()->Send("AddOrRemoveSelected", Message_Info);
+ #endif
+#endif
aShapesToBeSelected.Bind(aShape, aPresentations);
#endif
} else {
// The selection in the context was cleared, so the method sets the objects are selected
aContext->AddOrRemoveSelected(anAIS, false);
#ifdef TINSPECTOR
+ #if OCC_VERSION_LARGE < 0x07070000
if (getCallBack()) getCallBack()->AddOrRemoveSelected(anAIS);
+ #else
+ if (getCallBack()) getCallBack()->Send("AddOrRemoveSelected", Message_Info);
+ #endif
#endif
}
}
aContext->UnhilightSelected(false);//UnhilightCurrents(false);
aContext->ClearSelected(theUpdateViewer);
#ifdef TINSPECTOR
+ #if OCC_VERSION_LARGE < 0x07070000
if (getCallBack()) getCallBack()->ClearSelected();
+ #else
+ if (getCallBack()) getCallBack()->Send("ClearSelected", Message_Info);
+ #endif
#endif
}
}
emit beforeObjectErase(aObj, aAISObj);
aContext->Remove(anIO, false/*update viewer*/);
#ifdef TINSPECTOR
+ #if OCC_VERSION_LARGE < 0x07070000
if (getCallBack()) getCallBack()->Remove(anIO);
+ #else
+ if (getCallBack()) getCallBack()->Send("Remove", Message_Info);
+ #endif
#endif
aErased = true;
}
if (!aContext.IsNull() && !anAISIO.IsNull()) {
aContext->Display(anAISIO, theDisplayMode, 0, false/*update viewer*/, AIS_DS_Displayed);
#ifdef TINSPECTOR
+ #if OCC_VERSION_LARGE < 0x07070000
if (getCallBack()) getCallBack()->Display(anAISIO);
+ #else
+ if (getCallBack()) getCallBack()->Send("Display", Message_Info);
#endif
+ #endif
+
aDisplayed = true;
aContext->Deactivate(anAISIO);
#ifdef TINSPECTOR
+ #if OCC_VERSION_LARGE < 0x07070000
if (getCallBack()) getCallBack()->Deactivate(anAISIO);
+ #else
+ if (getCallBack()) getCallBack()->Send("Deactivate", Message_Info);
+ #endif
#endif
+
aContext->Load(anAISIO);
#ifdef TINSPECTOR
+ #if OCC_VERSION_LARGE < 0x07070000
if (getCallBack()) getCallBack()->Load(anAISIO);
+ #else
+ if (getCallBack()) getCallBack()->Send("Load", Message_Info);
+ #endif
#endif
+
if (toActivateInSelectionModes)
myWorkshop->selectionActivate()->activateOnDisplay(anAISIO, theUpdateViewer);
if (!anAISIO.IsNull() && aContext->IsDisplayed(anAISIO)) {
aContext->Remove(anAISIO, false/*update viewer*/);
#ifdef TINSPECTOR
+ #if OCC_VERSION_LARGE < 0x07070000
if (getCallBack()) getCallBack()->Remove(anAISIO);
+ #else
+ if (getCallBack()) getCallBack()->Send("Remove", Message_Info);
+ #endif
#endif
aErased = true;
}
Standard_True /* update viewer*/,
AIS_DS_Displayed /* xdisplay status */);
#ifdef TINSPECTOR
+ #if OCC_VERSION_LARGE < 0x07070000
if (getCallBack()) getCallBack()->Display(aTrihedron);
+ #else
+ if (getCallBack()) getCallBack()->Send("Display", Message_Info);
+ #endif
#endif
if (!aSelectionActive->isTrihedronActive())
aContext->Erase(aTrihedron, Standard_True);
#ifdef TINSPECTOR
+ #if OCC_VERSION_LARGE < 0x07070000
if (getCallBack()) getCallBack()->Remove(aTrihedron);
+ #else
+ if (getCallBack()) getCallBack()->Send("Remove", Message_Info);
+ #endif
#endif
}
}
#include <QObject>
#include <QString>
+#include <Basics_OCCTVersion.hxx>
+
class ModuleBase_ViewerPrs;
class ModelAPI_Feature;
class XGUI_SelectionActivate;
#define OPTIMIZE_PRS
#ifdef TINSPECTOR
+#if OCC_VERSION_LARGE < 0x07070000
class VInspectorAPI_CallBack;
+#else
+class Message_Messenger;
+#endif
#endif
void displayTrihedron(bool theToDisplay) const;
#ifdef TINSPECTOR
+#if OCC_VERSION_LARGE < 0x07070000
void setCallBack(const Handle(VInspectorAPI_CallBack)& theCallBack)
{ myVCallBack = theCallBack; }
Handle(VInspectorAPI_CallBack) getCallBack() const { return myVCallBack; }
+#else
+ void setCallBack(const Handle(Message_Messenger)& theCallBack)
+ {
+ myVCallBack = theCallBack;
+ }
+ Handle(Message_Messenger) getCallBack() const { return myVCallBack; }
+#endif
#endif
/// Return true if the object is visible. If the object is feature, it returns true
private:
XGUI_Workshop* myWorkshop; ///< Reference to workshop
#ifdef TINSPECTOR
+#if OCC_VERSION_LARGE < 0x07070000
Handle(VInspectorAPI_CallBack) myVCallBack;
+#else
+ Handle(Message_Messenger) myVCallBack;
+#endif
#endif
Handle(SelectMgr_AndFilter) myAndFilter; ///< A container for selection filters
//#define DEBUG_DEACTIVATE_AIS
#ifdef TINSPECTOR
+#if OCC_VERSION_LARGE < 0x07070000
#include <inspector/VInspectorAPI_CallBack.hxx>
+#else
+#include <inspector/MessageView_Communicator.hxx>
+#include <inspector/MessageView_ActionsTest.hxx>
+#include <inspector/MessageView_MetricStatisticModel.hxx>
+#include <inspector/MessageView_VisibilityState.hxx>
+#include <inspector/MessageView_Window.hxx>
+#include <Message_Msg.hxx>
+#include <Message_Report.hxx>
+#endif
#endif
#define CLEAR_OUTDATED_SELECTION_BEFORE_REDISPLAY
//int aMode = (theMode > 8)? theMode : AIS_Shape::SelectionType(theMode);
aContext->Activate(theIO, theMode, false);
#ifdef TINSPECTOR
+#if OCC_VERSION_LARGE < 0x07070000
if (getDisplayer()->getCallBack()) getDisplayer()->getCallBack()->Activate(theIO, theMode);
+#else
+ if (getDisplayer()->getCallBack()) getDisplayer()->getCallBack()->Send("Activate", Message_Info);
+#endif
#endif
}
else {
aContext->Activate(theIO, theMode, false);
#ifdef TINSPECTOR
+#if OCC_VERSION_LARGE < 0x07070000
if (getDisplayer()->getCallBack()) getDisplayer()->getCallBack()->Activate(theIO, theMode);
+#else
+ if (getDisplayer()->getCallBack()) getDisplayer()->getCallBack()->Send("Activate", Message_Info);
+#endif
#endif
}
// the fix from VPA for more suitable selection of sketcher lines
#ifdef TINSPECTOR
#include <Model_Session.h>
+#include <Message_Report.hxx>
#include <TDocStd_Application.hxx>
#include <inspector/TInspector_Communicator.hxx>
+#if OCC_VERSION_LARGE < 0x07070000
#include <inspector/VInspector_CallBack.hxx>
-static TInspector_Communicator* MyTCommunicator;
static Handle(VInspector_CallBack) MyVCallBack;
+#else
+static Handle(Message_Messenger) aMessenger;
+#endif
+static TInspector_Communicator* MyTCommunicator;
#endif
#ifdef _DEBUG
if (!aContextReport.IsNull())
aParameters.Append(aContextReport);
#endif
+#if OCC_VERSION_LARGE < 0x07070000
MyVCallBack = new VInspector_CallBack();
myDisplayer->setCallBack(MyVCallBack);
+#else
+ aMessenger = new Message_Messenger();
+ myDisplayer->setCallBack(aMessenger);
+#endif
#ifndef HAVE_SALOME
AppElements_Viewer* aViewer = mainWindow()->viewer();
if (aViewer)
aViewer->setCallBack(MyVCallBack);
#endif
+#if OCC_VERSION_LARGE < 0x07070000
aParameters.Append(MyVCallBack);
+#else
+ aParameters.Append(aMessenger);
+#endif
MyTCommunicator->RegisterPlugin("TKDFBrowser");
MyTCommunicator->RegisterPlugin("TKShapeView");
MyTCommunicator->RegisterPlugin("TKVInspector");
-#ifdef DEBUG_WITH_MESSAGE_REPORT
+#ifndef DEBUG_WITH_MESSAGE_REPORT
MyTCommunicator->RegisterPlugin("TKMessageView");
#endif
//MyTCommunicator->RegisterPlugin("SMBrowser"); // custom plugin to view ModelAPI