Salome HOME
Use AdaoSchemaCreator wit python
[modules/adao.git] / src / daSalome / daGUI / ADAOGUI.py
1 # -*- coding: utf-8 -*-
2 #  Copyright (C) 2010  EDF R&D
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.salome-platform.org/ or email : webmaster.salome@opencascade.com
19 #
20
21 """
22 This python file provides the implementation of the interface of the GUI part of
23 this SALOME module. This interface is required by the SALOME GUI framework.
24 We use here a proxy module named under the alias GuiImpl for at least three
25 reasons:
26 1. To Keep the required interface as clear as possible in this file;
27 2. The concrete implementation can be substituted by an alternative version;
28 3. We could mix several concrete implementations provided by different proxy
29    modules, for example for test purposes.
30 """
31
32 from daGuiImpl import ADAOGUI_impl as GuiImpl
33
34
35 # called when module is initialized
36 # perform initialization actions
37 def initialize():
38     GuiImpl.initialize()
39
40 # called when module is initialized
41 # return map of popup windows to be used by the module
42 def windows():
43     return GuiImpl.windows()
44
45 # called when module is initialized
46 # export module's preferences
47 def createPreferences():
48     GuiImpl.createPreferences()
49
50 # called when module is activated
51 # returns True if activating is successfull and False otherwise
52 def activate():
53     return GuiImpl.activate()
54
55 # called when module is deactivated
56 def deactivate():
57     GuiImpl.deactivate()
58
59 # called when active study is changed
60 # active study ID is passed as parameter
61 def activeStudyChanged( studyID ):
62     GuiImpl.activeStudyChanged( studyID )
63
64 # called when popup menu is invoked
65 # popup menu and menu context are passed as parameters
66 def createPopupMenu( popup, context ):
67     GuiImpl.createPopupMenu(popup, context )
68
69 # called when GUI action is activated
70 # action ID is passed as parameter
71 def OnGUIEvent(commandID) :
72     GuiImpl.OnGUIEvent(commandID)
73
74 # called when module's preferences are changed
75 # preference's resources section and setting name are passed as parameters
76 def preferenceChanged( section, setting ):
77     GuiImpl.preferenceChanged( section, setting )