fix slowblank
[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(HTMLComponent, GUIComponent, VariableText):
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         def createWidget(self, parent):
21                 return eLabel(parent)
22         
23         def getSize(self):
24                 s = self.instance.calculateSize()
25                 return (s.width(), s.height())
26
27         def show(self):
28                 self.instance.show()
29
30         def hide(self):
31                 self.instance.hide()
32
33 class LabelConditional(Label, ConditionalWidget):
34         def __init__(self, text = "", withTimer = True):
35                 ConditionalWidget.__init__(self, withTimer = withTimer)
36                 Label.__init__(self, text = text)
37                 
38 class BlinkingLabel(Label, BlinkingWidget):
39         def __init__(self, text = ""):
40                 Label.__init__(text = text)
41                 BlinkingWidget.__init__()
42
43         def GUIcreate(self, parent):
44                 LabelConditional.GUIcreate(self, parent)
45         
46         def GUIdelete(self):
47                 LabelConditional.GUIcreate(self)
48                 
49 class BlinkingLabelConditional(BlinkingWidgetConditional, LabelConditional):
50         def __init__(self, text = ""):
51                 LabelConditional.__init__(self, text = text)
52                 BlinkingWidgetConditional.__init__(self)
53                 
54         def GUIcreate(self, parent):
55                 LabelConditional.GUIcreate(self, parent)
56         
57         def GUIdelete(self):
58                 LabelConditional.GUIcreate(self)
59