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.currentDialog != self:
35 # assert self.session == None, "a screen can only exec one per time"
36 # self.session = session
38 for (name, val) in self.items():
40 if self.session.currentDialog != 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!
60 for x in self.onClose:
63 # fixup circular references
68 for (name, val) in self.items():
71 # really delete all elements now
74 def close(self, *retval):
75 self.session.close(*retval)
77 def setFocus(self, o):
78 self.instance.setFocus(o.instance)