c2d577435e7c09b4891a6676fcafa67fb3b20818
[enigma2.git] / lib / python / Components / Label.py
1 from HTMLComponent import *
2 from GUIComponent import *
3 from VariableText import *
4
5 from enigma import eLabel
6
7 class Label(HTMLComponent, GUIComponent, VariableText):
8         def __init__(self, text=""):
9                 GUIComponent.__init__(self)
10                 VariableText.__init__(self)
11                 self.setText(text)
12         
13 # html: 
14         def produceHTML(self):
15                 return self.getText()
16
17 # GUI:
18         def createWidget(self, parent):
19                 return eLabel(parent)
20         
21         def getSize(self):
22                 s = self.instance.calculateSize()
23                 return (s.width(), s.height())
24
25         def show(self):
26                 self.instance.show()
27
28         def hide(self):
29                 self.instance.hide()