Controllers for managing data display widgets.
copyright: | 2005-2008 by pygtkhelpers Authors |
---|---|
license: | LGPL 2 or later (see README/COPYING/LICENSE) |
An example session of using a proxy:
>>> import gtk
>>> from pygtkhelpers.proxy import proxy_for
>>> widget = gtk.Entry()
>>> proxy = proxy_for(widget)
>>> proxy
<GtkEntryProxy object at 0x9aea25c (PyGTKHelperGObjectProxy at 0x9e6ec50)>
>>> proxy.update('hello')
>>> proxy.read()
'hello'
>>> def changed(proxy, value):
... print proxy, 'changed to', value
...
...
>>> proxy.connect('changed', changed)
32L
>>> proxy.update('bye bye')
<GtkEntryProxy object at 0x9aea25c (PyGTKHelperGObjectProxy at 0x9e6ec50)> changed to bye bye
>>> widget.get_text()
'bye bye'
>>> widget.set_text('banana')
<GtkEntryProxy object at 0x9aea25c (PyGTKHelperGObjectProxy at 0x9e6ec50)> changed to banana
>>> proxy.read()
'banana'
A proxy for a gtk.Widget
This proxy provides a common api to gtk widgets, so that they can be used without knowing which specific widget they are. All proxy types should extend this class.
Get the widget’s value
Update the widget’s value
Proxy for a gtk.ColorButton
Proxy for a gtk.ComboBox.
Proxy for a gtk.Entry.
Proxy for a gtk.FileChooser.
Proxy for a gtk.FontButton.
Proxy for a gtk.Image.
Proxy for a gtk.Label.
Proxy for a gtk.LinkButton.
Proxy for a gtk.ProgressBar.
Base class for widgets employing a gtk.Range.
Proxy for a gtk.TextView.
Proxy for a gtk.ToggleButton.
A controller to handle multiple proxies, and sub-groups
A ProxyGroup is a bridge to reduce multiple proxies and sub-groups to a single signal based on the key of the individual proxies.
Add an existing group to this group and proxy its signals
Parameters: | group – The ProxyGroup instance to add |
---|
Add a proxy to this group
Parameters: |
|
---|
Create a proxy for a widget and add it to this group
Parameters: |
|
---|
Proxy which uses a delegated property on its widget.
Proxy which uses a single property to set and get the value.
Proxy for a pygtkhelpers.ui.widgets.StringList.
Create a proxy for a Widget
Parameters: | widget – A gtk.Widget to proxy |
---|
This will raise a KeyError if there is no proxy type registered for the widget type.