added ci-selection / setup-menu screen
[enigma2.git] / lib / python / Screens / Screen.py
1 from Components.HTMLSkin import *
2 from Components.GUISkin import *
3
4 import sys
5
6 class Screen(dict, HTMLSkin, GUISkin):
7         """ bla """
8
9         def __init__(self, session):
10                 self.skinName = self.__class__.__name__
11                 self.session = session
12                 GUISkin.__init__(self)
13                 
14         def execBegin(self):
15 #               assert self.session == None, "a screen can only exec one per time"
16 #               self.session = session
17                 for (name, val) in self.items():
18                         val.execBegin()
19         
20         def execEnd(self):
21                 for (name, val) in self.items():
22                         val.execEnd()
23 #               assert self.session != None, "execEnd on non-execing screen!"
24 #               self.session = None
25         
26         # never call this directly - it will be called from the session!
27         def doClose(self):
28                 GUISkin.close(self)
29                 
30                 del self.session
31                 for (name, val) in self.items():
32                         del self[name]
33         
34         def close(self, retval=None):
35                 self.session.close()
36
37         def setFocus(self, o):
38                 self.instance.setFocus(o.instance)