+//================================================================
+// Function : selectedIO
+// Purpose : Return the list of selected SALOME_InteractiveObject's
+//================================================================
+const SALOME_ListIO& GEOMBase_Helper::selectedIO()
+{
+ mySelected.Clear();
+
+ SalomeApp_Application* app = dynamic_cast< SalomeApp_Application* >( SUIT_Session::session()->activeApplication() );
+ if ( app ) {
+ LightApp_SelectionMgr* aSelMgr = app->selectionMgr();
+ if ( aSelMgr )
+ aSelMgr->selectedObjects( mySelected );
+ }
+
+ return mySelected;
+}
+
+//================================================================
+// Function : IObjectCount
+// Purpose : Return the number of selected objects
+//================================================================
+int GEOMBase_Helper::IObjectCount()
+{
+ return selectedIO().Extent();
+}
+
+//================================================================
+// Function : firstIObject
+// Purpose : Return the first selected object in the selected object list
+//================================================================
+Handle(SALOME_InteractiveObject) GEOMBase_Helper::firstIObject()
+{
+ const SALOME_ListIO& aList = selectedIO();
+ return aList.Extent() > 0 ? aList.First() : Handle(SALOME_InteractiveObject)();
+}
+
+//================================================================
+// Function : lastIObject
+// Purpose : Return the last selected object in the selected object list
+//================================================================
+Handle(SALOME_InteractiveObject) GEOMBase_Helper::lastIObject()
+{
+ const SALOME_ListIO& aList = selectedIO();
+ return aList.Extent() > 0 ? aList.Last() : Handle(SALOME_InteractiveObject)();
+}
+
+//================================================================
+// Function : getDesktop
+// Purpose : Returns myDesktop field. Initialized in constructor, usually as dynamic_cast<SUIT_Desktop*>(parentWidget())
+//================================================================
+SUIT_Desktop* GEOMBase_Helper::getDesktop() const
+{
+ return myDesktop;
+}