1 from HTMLComponent import *
2 from GUIComponent import *
6 class ServiceList(HTMLComponent, GUIComponent):
12 GUIComponent.__init__(self)
13 self.l = eListboxServiceContent()
16 r = eServiceReference()
21 self.instance.moveSelection(self.instance.moveUp)
24 self.instance.moveSelection(self.instance.moveDown)
26 def GUIcreate(self, parent):
27 self.instance = eListbox(parent)
28 self.instance.setContent(self.l)
33 def setRoot(self, root):
37 def clearMarked(self):
43 def isMarked(self, ref):
44 return self.l.isMarked(ref)
46 def addMarked(self, ref):
49 def removeMarked(self, ref):
50 self.l.removeMarked(ref)
55 ref = eServiceReference()
57 while i.markedQueryNext(ref) == 0:
59 ref = eServiceReference()
63 def setMode(self, mode):
64 if mode == self.MODE_NORMAL:
65 self.instance.setItemHeight(20)
66 self.l.setVisualMode(eListboxServiceContent.visModeSimple)
68 self.instance.setItemHeight(40)
69 self.l.setElementFont(self.l.celServiceName, gFont("Arial", 30))
70 self.l.setElementPosition(self.l.celServiceName, eRect(40, 0, self.instance.size().width(), 40))
71 self.l.setElementFont(self.l.celServiceNumber, gFont("Arial", 20))
72 self.l.setElementPosition(self.l.celServiceNumber, eRect(0, 10, 40, 30))
74 self.l.setVisualMode(eListboxServiceContent.visModeComplex)