1 from GUIComponent import GUIComponent
2 from skin import applyAllAttributes
3 from Tools.CList import CList
4 from Sources.Source import Source
10 self.onLayoutFinish = [ ]
11 self.summaries = CList()
13 def createGUIScreen(self, parent, desktop):
14 for val in self.renderer:
15 if isinstance(val, GUIComponent):
17 if not val.applySkin(desktop):
18 print "warning, skin is missing renderer", val, "in", self
22 if isinstance(val, GUIComponent):
24 if not val.applySkin(desktop):
25 print "warning, skin is missing element", key, "in", self
27 for w in self.additionalWidgets:
28 w.instance = w.widget(parent)
29 # w.instance.thisown = 0
30 applyAllAttributes(w.instance, desktop, w.skinAttributes)
32 for f in self.onLayoutFinish:
33 if type(f) is not type(self.close): # is this the best way to do this?
34 exec(f) in globals(), locals()
38 def deleteGUIScreen(self):
39 seenFakeSource = False
40 for (name, val) in self.items():
41 if name == "fake" and isinstance(val, Source):
43 if isinstance(val, GUIComponent):
46 print "DEL FAKE SOURCE"
50 self.deleteGUIScreen()
52 def createSummary(self):
55 def addSummary(self, summary):
56 self.summaries.append(summary)
58 def removeSummary(self, summary):
59 self.summaries.remove(summary)
61 def setTitle(self, title):
62 self.instance.setTitle(title)
64 self.summaries.setTitle(title)