1 // Copyright (C) 2011-2024 CEA, EDF
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, or (at your option) any later version.
8 // This library is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 // Lesser General Public License for more details.
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
20 #ifndef HOMARD_H_UTILS
21 #define HOMARD_H_UTILS
23 #include "HOMARDGUI_Exports.hxx"
25 #include <SALOMEconfig.h>
27 #include <omniORB4/CORBA.h>
28 #include CORBA_CLIENT_HEADER(HOMARD_Cas)
29 #include CORBA_CLIENT_HEADER(HOMARD_Gen)
31 #include "SALOMEDSClient_definitions.hxx"
32 #include "SALOME_InteractiveObject.hxx"
33 #include "LightApp_DataOwner.h"
34 #include "SalomeApp_Application.h"
35 #include <SALOME_ListIO.hxx>
40 class SUIT_ViewWindow;
43 class SUIT_ResourceMgr;
47 class SALOMEDSClient_Study;
48 class SALOMEDSClient_SObject;
50 class SalomeApp_Study;
51 class SalomeApp_Module;
52 class LightApp_SelectionMgr;
54 namespace HOMARD_UTILS {
56 HOMARD_EXPORT SUIT_Study* GetActiveStudy();
57 HOMARD_EXPORT _PTR(Study) getStudy();
59 HOMARD_EXPORT void updateObjBrowser();
61 HOMARD_EXPORT const SALOME_ListIO& selectedIO(); // Function returns a list of SALOME_InteractiveObject's from
62 // selection manager in GUI
64 HOMARD_EXPORT int IObjectCount() ; // Function returns the number of selected objects
66 HOMARD_EXPORT Handle(SALOME_InteractiveObject) firstIObject() ;
67 // Function returns the first selected object in the list
68 // of selected objects
70 HOMARD_EXPORT Handle(SALOME_InteractiveObject) lastIObject() ;
71 // Function returns the last selected object in the list
72 // of selected objects
74 HOMARD_EXPORT bool isBoundaryCAO(_PTR(SObject) MonObj);
75 HOMARD_EXPORT bool isBoundaryAn(_PTR(SObject) MonObj);
76 HOMARD_EXPORT bool isBoundaryDi(_PTR(SObject) MonObj);
77 HOMARD_EXPORT bool isCase(_PTR(SObject) MonObj);
78 HOMARD_EXPORT bool isHypo(_PTR(SObject) MonObj);
79 HOMARD_EXPORT bool isIter(_PTR(SObject) MonObj);
80 HOMARD_EXPORT bool isYACS(_PTR(SObject) MonObj);
81 HOMARD_EXPORT bool isZone(_PTR(SObject) MonObj);
82 HOMARD_EXPORT bool isFileType(_PTR(SObject) MonObj, QString TypeFile);
83 HOMARD_EXPORT bool isObject(_PTR(SObject) MonObj, QString TypeObject, int option );
85 HOMARD_EXPORT void PushOnHelp(QString monFichierAide, QString contexte, QString LanguageShort);
87 extern SALOME_ListIO mySelected;
90 #endif // ifndef HOMARD_H_UTILS