1 // Copyright (C) 2007-2008 CEA/DEN, EDF R&D
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License.
7 // This library is distributed in the hope that it will be useful,
8 // but WITHOUT ANY WARRANTY; without even the implied warranty of
9 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
10 // Lesser General Public License for more details.
12 // You should have received a copy of the GNU Lesser General Public
13 // License along with this library; if not, write to the Free Software
14 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
19 // File : GeomSelectionTools.h
20 // Authors : Nicolas GEIMER (OCC)
22 #ifndef _GEOMSELECTIONTOOLS_H_
23 #define _GEOMSELECTIONTOOLS_H_
26 # ifdef GeomSelectionTools_EXPORTS
27 # define GEOMSELECTIONTOOLS_EXPORT __declspec( dllexport )
29 # define GEOMSELECTIONTOOLS_EXPORT __declspec( dllimport )
32 # define GEOMSELECTIONTOOLS_EXPORT
35 #include "SALOMEDSClient.hxx"
36 #include "SALOME_InteractiveObject.hxx"
37 #include <SALOME_ListIO.hxx>
38 #include <SalomeApp_Application.h>
40 #include <TopoDS_Shape.hxx>
41 #include <GeomAbs_SurfaceType.hxx>
43 class LightApp_SelectionMgr;
47 * The GeomSelectionTools class gives high level tools to select Geom (and other objects)
48 * A specific attention has been given to analyze selected GEOM objects.
50 * @param myStudy This class is specific to the study !
54 class GEOMSELECTIONTOOLS_EXPORT GeomSelectionTools
63 GeomSelectionTools(_PTR(Study));
64 static SalomeApp_Application* GetSalomeApplication();
65 static LightApp_SelectionMgr* selectionMgr();
66 SALOME_ListIO* getSelectedSalomeObjects();
67 Handle(SALOME_InteractiveObject) getFirstSelectedSalomeObject();
68 std::string getFirstSelectedEntry();
69 std::string getEntryOfObject(Handle(SALOME_InteractiveObject));
70 std::string getNameFromEntry(std::string);
71 std::string getFirstSelectedComponentDataType();
72 TopAbs_ShapeEnum getFirstSelectedShapeType();
73 TopAbs_ShapeEnum entryToShapeType(std::string );
74 GeomAbs_SurfaceType getFaceInformation(TopoDS_Shape);
75 _PTR(Study) getMyStudy();
79 #endif // _GEOMSELECTIONTOOLS_H_