X-Git-Url: https://scm.cri.ensmp.fr/git/minwii.git/blobdiff_plain/346a9b8e1fcfe30629f0d1ee4675e9e8f89890cf..4c4732c6ed8cb0aaa70fb2d4c6e5a958868c5349:/src/pgu/gui/group.py?ds=inline diff --git a/src/pgu/gui/group.py b/src/pgu/gui/group.py deleted file mode 100644 index bcb231a..0000000 --- a/src/pgu/gui/group.py +++ /dev/null @@ -1,43 +0,0 @@ -""" -""" -from const import * -import widget - -class Group(widget.Widget): - """An object for grouping together Form elements. - -
Group(name=None,value=None)- -
See [[gui-button]] for several examples.
- -When the value changes, an gui.CHANGE event is sent. - Although note, that when the value is a list, it may have to be sent by hand via - g.send(gui.CHANGE)
- """ - - def __init__(self,name=None,value=None): - widget.Widget.__init__(self,name=name,value=value) - self.widgets = [] - - def add(self,w): - """Add a widget to this group. - -Group.add(w)- """ - self.widgets.append(w) - - def __setattr__(self,k,v): - _v = self.__dict__.get(k,NOATTR) - self.__dict__[k] = v - if k == 'value' and _v != NOATTR and _v != v: - self._change() - - def _change(self): - self.send(CHANGE) - for w in self.widgets: - w.repaint()