1 // Copyright (C) 2007-2023 CEA, EDF, OPEN CASCADE
3 // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
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, or (at your option) any later version.
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.
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
20 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
23 // SALOME SALOMEGUI : implementation of desktop and GUI kernel
24 // File : SALOMEGUI_Swig.i
25 // Author : Paul RASCLE, EDF
28 #include "SALOMEGUI_Swig.hxx"
32 %include "std_string.i"
35 #if SWIG_VERSION >= 0x010329
36 %template() std::list<std::string>;
39 /* Exception handler for all functions */
41 class PyAllowThreadsGuard {
43 // Py_BEGIN_ALLOW_THREADS
44 PyAllowThreadsGuard() { _save = PyEval_SaveThread(); }
45 // Py_END_ALLOW_THREADS
46 ~PyAllowThreadsGuard() { PyEval_RestoreThread( _save ); }
51 PyAllowThreadsGuard guard;
60 virtual ~SALOMEGUI_Swig();
65 /* update object browser*/
66 void updateObjBrowser();
68 /* get active study */
69 const char *getActiveStudyName();
71 /* get component name/username */
72 const char* getComponentName( const char* ComponentUserName );
73 const char* getComponentUserName( const char* ComponentName );
75 /* selection processing */
77 const char *getSelected(int i);
78 void AddIObject(const char *Entry);
79 void RemoveIObject(const char *Entry);
83 void Display(const char *Entry);
84 void DisplayOnly(const char *Entry);
85 void Erase(const char *Entry);
88 bool IsInCurrentView(const char *Entry);
94 void FitIObjects(const std::list<std::string>&);
103 /* view parameters */
104 const char* getViewParameters();
105 void setCameraPosition( double x, double y, double z );
106 void setCameraFocalPoint( double x, double y, double z );
107 void setCameraViewUp( double x, double y, double z );
108 void setViewScale( double parallelScale,double x, double y, double z );