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 = [ ]
20 # in order to support screens *without* a help,
21 # we need the list in every screen. how ironic.
25 self.active_components = [ ]
26 for x in self.onExecBegin:
28 if self.session.currentDialog != self:
31 # assert self.session == None, "a screen can only exec one per time"
32 # self.session = session
34 for (name, val) in self.items():
36 if self.session.currentDialog != self:
38 self.active_components.append(val)
42 for x in self.onShown:
46 # for (name, val) in self.items():
47 for val in self.active_components:
49 # assert self.session != None, "execEnd on non-execing screen!"
53 # never call this directly - it will be called from the session!
55 for x in self.onClose:
58 # fixup circular references
63 for (name, val) in self.items():
66 def close(self, *retval):
67 self.session.close(*retval)
69 def setFocus(self, o):
70 self.instance.setFocus(o.instance)