fix progressbar, slider
[enigma2.git] / lib / python / Components / Label.py
1 from HTMLComponent import *
2 from GUIComponent import *
3 from VariableText import *
4
5 from ConditionalWidget import *
6
7 from enigma import eLabel
8
9 class Label(VariableText, HTMLComponent, GUIComponent):
10         def __init__(self, text=""):
11                 GUIComponent.__init__(self)
12                 VariableText.__init__(self)
13                 self.setText(text)
14         
15 # html: 
16         def produceHTML(self):
17                 return self.getText()
18
19 # GUI:
20         GUI_WIDGET = eLabel
21
22         def getSize(self):
23                 s = self.instance.calculateSize()
24                 return (s.width(), s.height())
25
26 class LabelConditional(Label, ConditionalWidget):
27         def __init__(self, text = "", withTimer = True):
28                 ConditionalWidget.__init__(self, withTimer = withTimer)
29                 Label.__init__(self, text = text)
30                 
31 class BlinkingLabel(Label, BlinkingWidget):
32         def __init__(self, text = ""):
33                 Label.__init__(text = text)
34                 BlinkingWidget.__init__()
35
36 class BlinkingLabelConditional(BlinkingWidgetConditional, LabelConditional):
37         def __init__(self, text = ""):
38                 LabelConditional.__init__(self, text = text)
39                 BlinkingWidgetConditional.__init__(self)