blob: 7402d722f0b925a6688131271f01d99887bd8d91 (
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
|
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())
|