1 from Components.HTMLSkin import *
2 from Components.GUISkin import *
6 class Screen(dict, HTMLSkin, GUISkin):
9 def __init__(self, session):
10 self.skinName = self.__class__.__name__
11 self.session = session
12 GUISkin.__init__(self)
15 self.onExecBegin = [ ]
24 # in order to support screens *without* a help,
25 # we need the list in every screen. how ironic.
29 self.active_components = [ ]
30 for x in self.onExecBegin:
32 if self.session.current_dialog != self:
35 # assert self.session == None, "a screen can only exec once per time"
36 # self.session = session
38 for (name, val) in self.items():
40 if self.session.current_dialog != self:
42 self.active_components.append(val)
46 for x in self.onShown:
50 # for (name, val) in self.items():
51 for val in self.active_components:
53 del self.active_components
54 # assert self.session != None, "execEnd on non-execing screen!"
58 # never call this directly - it will be called from the session!
61 for x in self.onClose:
64 # fixup circular references
69 for (name, val) in self.items():
73 # really delete all elements now
76 def close(self, *retval):
77 self.session.close(self, *retval)
79 def setFocus(self, o):
80 self.instance.setFocus(o.instance)
89 for (name, val) in self.items():
90 if isinstance(val, GUIComponent):
100 for (name, val) in self.items():
101 if isinstance(val, GUIComponent):