Salome HOME
967c0937727d5023aa4e482ef637fd7a9c3ac770
[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   bool hasDesktop();
55
56   void         updateObjBrowser( bool updateSelection );
57   QAD_Study*   getActiveStudy();
58   int          getActiveStudyId();
59   const char*  getActiveStudyName();
60
61 /* selection */
62   int          SelectedCount();
63   const char*  getSelected(int i);
64
65   void AddIObject(const char *Entry);
66   void RemoveIObject(const char *Entry);
67   void ClearIObjects();
68
69 /* display */           
70   void Display(const char *Entry);
71   void DisplayOnly(const char *Entry);
72   void Erase(const char *Entry);
73   void DisplayAll();
74   void EraseAll();
75
76 /* check */
77   bool IsInCurrentView(const char *Entry);
78
79 /* component name */
80   const char* getComponentName( const char* ComponentUserName );
81   const char* getComponentUserName( const char* ComponentName );
82
83 protected:
84   int _studyId;
85   QString _name;
86 };
87
88
89 #endif