aboutsummaryrefslogtreecommitdiff
path: root/lib/python/Components/Label.py
blob: c2d577435e7c09b4891a6676fcafa67fb3b20818 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
from HTMLComponent import *
from GUIComponent import *
from VariableText import *

from enigma import eLabel

class Label(HTMLComponent, GUIComponent, VariableText):
	def __init__(self, text=""):
		GUIComponent.__init__(self)
		VariableText.__init__(self)
		self.setText(text)
	
# html:	
	def produceHTML(self):
		return self.getText()

# GUI:
	def createWidget(self, parent):
		return eLabel(parent)
	
	def getSize(self):
		s = self.instance.calculateSize()
		return (s.width(), s.height())

	def show(self):
		self.instance.show()

	def hide(self):
		self.instance.hide()