+
+void XGUI_Displayer::appendResultObject(ObjectPtr theObject, AISObjectPtr theAIS)
+{
+ myResult2AISObjectMap[theObject] = theAIS;
+
+#ifdef DEBUG_DISPLAY
+ std::ostringstream aPtrStr;
+ aPtrStr << theObject.get();
+ qDebug(QString("display object: %1").arg(aPtrStr.str().c_str()).toStdString().c_str());
+ qDebug(getResult2AISObjectMapInfo().c_str());
+#endif
+}
+
+std::string XGUI_Displayer::getResult2AISObjectMapInfo() const
+{
+ QStringList aContent;
+ foreach (ObjectPtr aObj, myResult2AISObjectMap.keys()) {
+ AISObjectPtr aAISObj = myResult2AISObjectMap[aObj];
+ std::ostringstream aPtrStr;
+ aPtrStr << "aObj = " << aObj.get() << ":";
+ aPtrStr << "anAIS = " << aAISObj.get() << ":";
+ aPtrStr << "[" << ModuleBase_Tools::objectInfo(aObj).toStdString().c_str() << "]";
+
+ aContent.append(aPtrStr.str().c_str());
+ }
+ return QString("myResult2AISObjectMap: size = %1\n%2\n").arg(myResult2AISObjectMap.size()).
+ arg(aContent.join("\n")).toStdString().c_str();
+}
+
+void XGUI_Displayer::activateTrihedron(bool theIsActive)
+{
+ myIsTrihedronActive = theIsActive;
+ if (!myIsTrihedronActive) {
+ deactivateTrihedron(true);
+ }
+}
+
+void XGUI_Displayer::displayTrihedron(bool theToDisplay) const
+{
+ Handle(AIS_InteractiveContext) aContext = AISContext();
+ if (aContext.IsNull())
+ return;
+
+ Handle(AIS_Trihedron) aTrihedron = myWorkshop->viewer()->trihedron();
+
+ if (theToDisplay) {
+ if (!aContext->IsDisplayed(aTrihedron))
+ aContext->Display(aTrihedron,
+ 0 /*wireframe*/,
+ -1 /* selection mode */,
+ Standard_True /* update viewer*/,
+ Standard_False /* allow decomposition */,
+ AIS_DS_Displayed /* xdisplay status */);
+
+ if (!isTrihedronActive())
+ deactivateTrihedron(false);
+ else
+ activate(aTrihedron, myActiveSelectionModes, false);
+ } else {
+ deactivateTrihedron(false);
+ //aContext->LocalContext()->ClearOutdatedSelection(aTrihedron, true);
+ // the selection from the previous activation modes should be cleared manually (#26172)
+
+ aContext->Erase(aTrihedron);
+ }
+
+ updateViewer();
+}