| |
- UserDict.DictMixin
-
- Templates(gtk.glade.XML, UserDict.DictMixin)
- gtk.glade.XML(gobject._gobject.GObject)
-
- Templates(gtk.glade.XML, UserDict.DictMixin)
- ProxyWindow
class ProxyWindow |
|
This acts as a proxy for a GtkWindow or GtkDialog, except that
it calls the toplevel_(un)ref functions for you automatically.
It is designed to wrap a window loaded from a Glade template. You
can sub-class this to create your own classes. |
|
Methods defined here:
- __init__(self, window, widgets)
- Act as a proxy for window. Call toplevel_ref() and arrange
for toplevel_unref to be called on destruction. The signal
handlers are connected to this object.
|
class Templates(gtk.glade.XML, UserDict.DictMixin) |
|
A set of widget instances created from a glade file. |
|
Methods defined here:
- __init__(self, root, fname=None, dict_or_instance=None)
- A set of widget instances created from the glade file.
root - top level widget to create (and all its contained widgets),
fname - file name to load the glade file from
dict_or_instance - either a dictionary where the
signal handlers are indexed by the name of the handler in the glade
file, or an instance of a class where the methods have the same
names as given in the glade file.
NOTE: if fname is None the glade file
is loaded from Templates.glade in the app dir.
- get_window(self, name, klass=<class rox.templates.ProxyWindow at 0x17c87d0>, *args, **kwargs)
- Return the named widget, which should be a gtk.Window. The
window is tracked by the window counting system, see
rox.toplevel_ref().
name - name of the widget
klass - Python class to wrap the widget in
args - arguments to pass to the constructor for klass after the
widget
kwargs - keyword arguments to pass to the constructor for klass
- itervalues(self)
- keys(self)
- Return list of all named widgets.
- values(self)
- # More efficient implementations than UserDict.DictMixin
| |