Salome HOME
To rollback mistaken integration
[modules/gui.git] / src / SALOME_SWIG / Help.py
1 #  Copyright (C) 2003  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
2 #  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS 
3
4 #  This library is free software; you can redistribute it and/or 
5 #  modify it under the terms of the GNU Lesser General Public 
6 #  License as published by the Free Software Foundation; either 
7 #  version 2.1 of the License. 
8
9 #  This library is distributed in the hope that it will be useful, 
10 #  but WITHOUT ANY WARRANTY; without even the implied warranty of 
11 #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
12 #  Lesser General Public License for more details. 
13
14 #  You should have received a copy of the GNU Lesser General Public 
15 #  License along with this library; if not, write to the Free Software 
16 #  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA 
17
18 #  See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org 
19 #
20 #
21 #
22 #  File   : Help.py
23 #  Author : Paul RASCLE, EDF
24 #  Module : SALOME
25 #  $Header$
26
27 class SalomeDoc:
28     def __init__(self, aDoc):
29         self.doc = aDoc
30     def __repr__(self):
31         print self.doc
32         return "---"
33     def salome(self):
34         doc_salome = '''
35 MODULE : salome
36 ---------------
37 module salome gives access to Salome ressources:
38 variables:
39
40   salome:orb             : CORBA
41   salome.naming_service  : instance of naming Service class
42       methods:
43           Resolve(name)  : find a CORBA object (ior) by its pathname
44           Register(name) : register a CORBA object under a pathname
45   salome.lcc             : instance of lifeCycleCORBA class
46       methods:
47           FindOrLoadComponent(server,name) :
48                            obtain an Engine (CORBA object)
49                            or launch the Engine if not found,
50                            with a Server name and an Engine name
51   salome.sg
52       methods:
53          updateObjBrowser(bool):
54          getActiveStudyId():
55          getActiveStudyName():
56          
57          SelectedCount():      returns number of selected objects
58          getSelected(i):       returns entry of selected object number i
59          getAllSelected():     returns list of entry of selected objects
60          AddIObject(Entry):    select an existing Interactive object
61          RemoveIObject(Entry): remove object from selection
62          ClearIObjects():      clear selection
63          
64          Display(*Entry):
65          DisplayOnly(Entry):
66          Erase(Entry):
67          DisplayAll():
68          EraseAll():
69
70          IDToObject(Entry):    returns CORBA reference from entry
71
72   salome.myStudyName     : active Study Name
73   salome.myStudyId       : active Study Id
74   salome.myStudy         : the active Study itself (CORBA ior)
75                            methods : defined in SALOMEDS.idl
76                                                          
77 methods:
78   salome.DumpStudy(study) : Dump a study, given the ior
79 ---
80 '''
81         print doc_salome
82         
83     def geompy(self):
84         doc_geompy = '''
85 MODULE : geompy
86 ---------------
87 module geompy provides an encapsulation of GEOM Engine methods
88 variables:
89   geompy.geom               : a Geometry Engine, found or loaded
90                               at first import of module geompy.
91                               methods : defined in GEOM_Gen.idl
92   geompy.myBuilder          : a study builder
93   geompy.father             : GEOM root in current study (salome.myStudy)
94
95 methods:
96   addToStudy(aShape, aName) : add the shape into the current study
97   --- all methods of GEOM_Gen.idl that returns a shape are encapsulated,
98       with the same interface : shapes are named with their ior
99 '''
100         print doc_geompy
101         
102     def supervision(self):
103         doc_supervision = '''
104 MODULES : SALOME_SuperVisionEditor and SALOME_SuperVisionExecutor
105 -----------------------------------------------------------------
106 this modules provide access to Editor and Executor Engine methods
107
108 See SUPERV.idl
109
110 In order to run the example (supervisionexample.py)
111
112     Type : from supervisionexample import *
113            supervisionexample.py contains comments
114
115 A new python example avoids references to LifeCycleCORBA
116                      avoids references to NamingService
117                      avoids references to ModuleCatalog
118                      avoids SuperVisionComponent creation
119                      allows G.Input(...) instead of AddInput(G,...)
120                      replaces Editor/Executor with Graph
121                      allows Nodes, Ports and Links CORBA objects
122                      shortens methods names
123                      ...
124
125     See /SuperVisionTest/resources/GraphExample.py
126                                    and GraphExample.xml
127 ---
128 '''
129         print doc_supervision
130         
131     
132
133 help = SalomeDoc('''
134 Availables modules:
135   salome      : gives access to Salome ressources
136   geompy      : encapsulation of GEOM Engine methods
137   supervision : gives access to SuperVision Engine
138 To obtain specific help on a module "truc", type: help.truc()
139 To run an example, type: import example3
140 ''')
141