Salome HOME
PR: mergefrom_PAL_OCC_21Oct04
[modules/kernel.git] / src / SALOMEGUI / SALOMEGUI_Swig.hxx
1 //  SALOME SALOMEGUI : implementation of desktop and GUI kernel
2 //
3 //  Copyright (C) 2003  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 //  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS 
5 // 
6 //  This library is free software; you can redistribute it and/or 
7 //  modify it under the terms of the GNU Lesser General Public 
8 //  License as published by the Free Software Foundation; either 
9 //  version 2.1 of the License. 
10 // 
11 //  This library is distributed in the hope that it will be useful, 
12 //  but WITHOUT ANY WARRANTY; without even the implied warranty of 
13 //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
14 //  Lesser General Public License for more details. 
15 // 
16 //  You should have received a copy of the GNU Lesser General Public 
17 //  License along with this library; if not, write to the Free Software 
18 //  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA 
19 // 
20 //  See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org 
21 //
22 //
23 //
24 //  File   : SALOMEGUI_Swig.hxx
25 //  Author : Nicolas REJNERI
26 //  Module : SALOME
27 //  $Header$
28
29 #ifndef _SALOMEGUI_SWIG_HXX_
30 #define _SALOMEGUI_SWIG_HXX_
31
32 //QT Include
33 #include <qstring.h>
34
35 #include <Standard.hxx>
36
37 #include "SALOME_InteractiveObject.hxx"
38
39 class QAD_Study;
40 class QAD_ViewFrame;
41
42 namespace SALOME{
43   QAD_ViewFrame* GetViewFrame(QAD_Study* theStudy);
44   Handle(SALOME_InteractiveObject) FindIObject(QAD_Study* theStudy, const char *theEntry);
45 }
46
47
48 class SALOMEGUI_Swig
49 {
50 public:
51   SALOMEGUI_Swig();
52   ~SALOMEGUI_Swig();
53
54   void         updateObjBrowser( bool updateSelection );
55   QAD_Study*   getActiveStudy();
56   int          getActiveStudyId();
57   const char*  getActiveStudyName();
58
59 /* selection */
60   int          SelectedCount();
61   const char*  getSelected(int i);
62
63   void AddIObject(const char *Entry);
64   void RemoveIObject(const char *Entry);
65   void ClearIObjects();
66
67 /* display */           
68   void Display(const char *Entry);
69   void DisplayOnly(const char *Entry);
70   void Erase(const char *Entry);
71   void DisplayAll();
72   void EraseAll();
73
74 /* check */
75   bool IsInCurrentView(const char *Entry);
76
77 /* component name */
78   const char* getComponentName( const char* ComponentUserName );
79   const char* getComponentUserName( const char* ComponentName );
80
81 protected:
82   int _studyId;
83   QString _name;
84 };
85
86
87 #endif