+XGUI_ViewWindow* XGUI_Viewer::activeViewWindow() const
+{
+ return dynamic_cast<XGUI_ViewWindow*>(myActiveView->widget());
+}
+
+void XGUI_Viewer::getSelectedObjects(AIS_ListOfInteractive& theList)
+{
+ theList.Clear();
+ for (myAISContext->InitSelected(); myAISContext->MoreSelected(); myAISContext->NextSelected())
+ theList.Append(myAISContext->SelectedInteractive());
+}
+
+void XGUI_Viewer::getSelectedShapes(NCollection_List<TopoDS_Shape>& theList)
+{
+ Handle(AIS_InteractiveContext) ic = AISContext();
+
+ for (ic->InitSelected(); ic->MoreSelected(); ic->NextSelected()) {
+ TopoDS_Shape aShape = ic->SelectedShape();
+ if (!aShape.IsNull())
+ theList.Append(aShape);
+ }
+}
+
+void XGUI_Viewer::setObjectsSelected(const AIS_ListOfInteractive& theList)
+{
+ AIS_ListIteratorOfListOfInteractive aIt;
+ for (aIt.Initialize(theList); aIt.More(); aIt.Next())
+ myAISContext->AddOrRemoveSelected(aIt.Value(), false);
+ myAISContext->UpdateCurrentViewer();
+}
+