Salome HOME
Move GeomSelectionTools from BLSURF module to SMESH
[modules/smesh.git] / src / PluginUtils / GeomSelectionTools.h
1 //  Copyright (C) 2007-2008  CEA/DEN, EDF R&D
2 //
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.
11 //
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
15 //
16 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
17 //
18 // ---
19 // File    : GeomSelectionTools.h
20 // Authors : Nicolas GEIMER (OCC)
21 // ---
22 #ifndef _GEOMSELECTIONTOOLS_H_
23 #define _GEOMSELECTIONTOOLS_H_
24
25 #ifdef WIN32
26 #  ifdef GeomSelectionTools_EXPORTS
27 #    define GEOMSELECTIONTOOLS_EXPORT __declspec( dllexport )
28 #  else
29 #    define GEOMSELECTIONTOOLS_EXPORT __declspec( dllimport )
30 #  endif
31 #else
32 #  define GEOMSELECTIONTOOLS_EXPORT
33 #endif
34
35 #include "SALOMEDSClient.hxx"
36 #include "SALOME_InteractiveObject.hxx"
37 #include <SALOME_ListIO.hxx>
38 #include <SalomeApp_Application.h>
39
40 #include <TopoDS_Shape.hxx>
41 #include <GeomAbs_SurfaceType.hxx>
42
43 class LightApp_SelectionMgr;
44
45
46 /*!
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.
49  *
50  * @param myStudy This class is specific to the study !
51  *
52  */
53
54 class GEOMSELECTIONTOOLS_EXPORT GeomSelectionTools
55 {
56
57 private:
58
59   _PTR(Study) myStudy;
60
61 public:
62
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();
76 };
77
78
79 #endif // _GEOMSELECTIONTOOLS_H_
80