rox.templates | index |
Support for loading glade files from your application directory.
The simplest interface will be templates.load() which will return a set
of widgets loaded from $APP_DIR/Templates.glade, e.g.
widgets=templates.load('main')
class MyWindow:
def __init__(self):
self.window=widgets.getWindow('main')
self.entry=widgets['text_entry']
widgets.autoConnect(self)
self.window.show_all()
To use a template as part of a class, derive a class from ProxyWindow
class MyWindow(templates.ProxyWindow):
def __init__(self, window, widgets):
templates.ProxyWindow.__init__(self, window, widgets)
self.cancel_button=widgets['cancel']
# ...
widgets=templates.load('main')
window=widgets.getWindow('main', MyWindow)
Classes | ||||||||||||||||||
|
Functions | ||
|