Salome HOME
Manual Merge from V5_1_main 16July09
[plugins/blsurfplugin.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 #include "SALOMEDSClient.hxx"
26 #include "SALOME_InteractiveObject.hxx"
27 #include <SALOME_ListIO.hxx>
28 #include <SalomeApp_Application.h>
29
30 #include <TopoDS_Shape.hxx>
31 #include <GeomAbs_SurfaceType.hxx>
32
33 class LightApp_SelectionMgr;
34
35
36 /*!
37  * The GeomSelectionTools class gives high level tools to select Geom (and other objects)
38  * A specific attention has been given to analyze selected GEOM objects.
39  *
40  * @param myStudy This class is specific to the study !
41  *
42  */
43
44 class GeomSelectionTools
45 {
46
47 private:
48
49   _PTR(Study) myStudy;
50
51 public:
52
53   GeomSelectionTools(_PTR(Study));
54   static SalomeApp_Application*  GetSalomeApplication();
55   static LightApp_SelectionMgr* selectionMgr();
56   SALOME_ListIO* getSelectedSalomeObjects();
57   Handle(SALOME_InteractiveObject) getFirstSelectedSalomeObject();
58   std::string getFirstSelectedEntry();
59   std::string getEntryOfObject(Handle(SALOME_InteractiveObject));
60   std::string getNameFromEntry(std::string);
61   std::string getFirstSelectedComponentDataType();
62   TopoDS_Shape getFirstSelectedTopoDSShape();
63   TopAbs_ShapeEnum getFirstSelectedShapeType();
64   TopoDS_Shape entryToShape(std::string );
65   GeomAbs_SurfaceType getFaceInformation();
66   _PTR(Study) getMyStudy();
67 };
68
69
70 #endif // _GEOMSELECTIONTOOLS_H_