git.cweiske.de
/
enigma2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
use new setTarget
[enigma2.git]
/
lib
/
python
/
Components
/
GUIComponent.py
diff --git
a/lib/python/Components/GUIComponent.py
b/lib/python/Components/GUIComponent.py
index 5483d181773a54f08c0033630edd58505376d6a8..493df681482f4fd96c3acb4c625d2770dbbc511d 100644
(file)
--- a/
lib/python/Components/GUIComponent.py
+++ b/
lib/python/Components/GUIComponent.py
@@
-5,8
+5,12
@@
from enigma import ePoint
class GUIComponent:
""" GUI component """
class GUIComponent:
""" GUI component """
+ SHOWN = 0
+ HIDDEN = 1
+
def __init__(self):
def __init__(self):
- pass
+ self.state = self.SHOWN
+ self.instance = None
def execBegin(self):
pass
def execBegin(self):
pass
@@
-14,9
+18,27
@@
class GUIComponent:
def execEnd(self):
pass
def execEnd(self):
pass
+ def onShow(self):
+ pass
+
+ def onHide(self):
+ pass
+
# this works only with normal widgets - if you don't have self.instance, override this.
def applySkin(self, desktop):
# this works only with normal widgets - if you don't have self.instance, override this.
def applySkin(self, desktop):
+ if self.state == self.HIDDEN:
+ self.instance.hide()
skin.applyAllAttributes(self.instance, desktop, self.skinAttributes)
def move(self, x, y):
self.instance.move(ePoint(int(x), int(y)))
skin.applyAllAttributes(self.instance, desktop, self.skinAttributes)
def move(self, x, y):
self.instance.move(ePoint(int(x), int(y)))
+
+ def show(self):
+ self.state = self.SHOWN
+ if self.instance is not None:
+ self.instance.show()
+
+ def hide(self):
+ self.state = self.HIDDEN
+ if self.instance is not None:
+ self.instance.hide()