stop update length timer when a movie was selected
[enigma2.git] / lib / python / Components / GUIComponent.py
1 import skin
2
3 from enigma import ePoint
4
5 class GUIComponent:
6         """ GUI component """
7         
8         SHOWN = 0
9         HIDDEN = 1
10         
11         def __init__(self):
12                 self.state = self.SHOWN
13                 self.instance = None
14         
15         def execBegin(self):
16                 pass
17         
18         def execEnd(self):
19                 pass
20         
21         def onShow(self):
22                 pass
23
24         def onHide(self):
25                 pass
26         
27         # this works only with normal widgets - if you don't have self.instance, override this.
28         def applySkin(self, desktop):
29                 if self.state == self.HIDDEN:
30                         self.instance.hide()
31                 skin.applyAllAttributes(self.instance, desktop, self.skinAttributes)
32
33         def move(self, x, y):
34                 self.instance.move(ePoint(int(x), int(y)))
35
36         def show(self):
37                 self.state = self.SHOWN
38                 if self.instance is not None:
39                         self.instance.show()
40
41         def hide(self):
42                 self.state = self.HIDDEN
43                 if self.instance is not None:
44                         self.instance.hide()