show "in timer" icon also in multiepg
[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         def destroy(self):
28                 pass
29         
30         # this works only with normal widgets - if you don't have self.instance, override this.
31         def applySkin(self, desktop):
32                 if self.state == self.HIDDEN:
33                         self.instance.hide()
34                 skin.applyAllAttributes(self.instance, desktop, self.skinAttributes)
35
36         def move(self, x, y):
37                 self.instance.move(ePoint(int(x), int(y)))
38
39         def show(self):
40                 self.state = self.SHOWN
41                 if self.instance is not None:
42                         self.instance.show()
43
44         def hide(self):
45                 self.state = self.HIDDEN
46                 if self.instance is not None:
47                         self.instance.hide()