Package autoglade :: Module autoglade :: Class AutoGlade |
[show private | hide private]
[frames | no frames]

## Class AutoGlade

AutoGlade main class.

This is the main AutoGlade class.

# Conventions

These are the conventions used to relate Glade files.

Method Summary
| ``__init__`(self, glade, root, autorun, autoinit, autodump)` Constructor
| `__call__(args)`
| ``__getattr__`(self, name)` __getattr__
| ``__getitem__`(self, key)` __getitem__
| `abbreviations(self)`
| `autoAddTimeout(self, msecs, method, *args)`
| `autoDumpShell(self, var, val)`
| `autoDumpText(self, var, val)`
| `autoDumpValues(self)`
| `autoErrorDialog(self, ex)`
| `autoInfoDialog(self, msg, message_format)`
| ``autoInit`(self, autoinit)` Default autoInit method, can be overriden by children.
| ``autoInvoke`(self, widget, *args)` Auto invoke the method codified in widget name
| `autoProgressBar(self, args)`
| `autoQuestionDialog(self, msg, buttons)`
| ``autoRun`(self)` auto run the graphical user interface
| `autoWarningDialog(self, msg, message_format)`
| `getDom(self)`
| `getGladeInterface(self)`
| `getSignalHandlers(self)`
| `getTopLevelWidgets(self)`
| `help(self)`
| `isInputClass(self, widgetClass)`
| ``on_autobutton_clicked`(self, widget, *args)` on_autobutton_clicked
| `on_autobuttoncollapseall_clicked(self, widget)`
| `on_autobuttonexpandall_clicked(self, widget)`
| ``on_autodialog_response`(self, widget, response, *args)` Default handler for `gtk.Dialog` `response` signal
| ``on_automenuitem_activate`(self, widget, *args)` Default handler for menu items `activate` signal
| ``on_autosensitize`(self, widget, targetWidget)` Toggle the 'sensitive' property on a target widget
| ``on_autoshow`(self, widget, targetWidget)` Toggle the 'visible' property on a target widget
| ``on_autotoolbutton_clicked`(self, widget)` on_autotoolbutton_clicked
| ``on_cancelbutton_clicked`(self, widget)` Default handler for Cancel buttons `clicked` signal.
| `quit(self, widget, *args)`
| ``VOID__getAboutDialogElement`(self)` This method uses a value set by self.__getAboutDialogWidget
| `VOID_get_children(self, widget)`
| `VOID_printWidgetTree(self, widget)`

Class Variable Summary
bool | `DEBUG`: Set debugging output

Method Details

### __init__(self, glade=None, root=None, autorun=True, autoinit=None, autodump='text') (Constructor) Constructor Constructs the AutoGlade object based on the arguments passed. Parameters: `glade` - The glade filename, defaults to the name of the class. Default `None` (type=str) `root` - The root widget name. Default `None`. (type=str) `autorun` - Will autoglade auto run the GUI ? (type=boolean) `autoinit` - Autoinit initialization string (type=str) `autodump` - Autodump type output format (i.e.: text, shell) (type=str)

### __getattr__(self, name) (Qualification operator) __getattr__ Provides self.name.method() access Parameters: `name` - Item name (type=`str`) Returns: Returns `__getitem__``(name)`

### __getitem__(self, key) (Indexing operator) __getitem__ Provides self['name'].method() access. If the `key` starts with `on_` then the corresponding method is executed instead of returning the attribute value. Parameters: `key` - The key to search (type=str) Returns: if key starts with 'on_' returns the value of the execution of self.key, if key matches `AUTO_TREEVIEW_SET_CELL_RE` (or whatever `self.__reSetTreeviewCell` has compiled in) then returns an instance of `AutoTreeviewSetCell` or returns the corresponding widget if exists, otherwise raise an `AutoGladeAttributeError`. Raises: `AutoGladeAttributeError` - If the key is not found

### autoInit(self, autoinit=None) Default autoInit method, can be overriden by children. Parameters: `autoinit` - The string containing autoinit commands (type=`str`)

### autoInvoke(self, widget, *args) Auto invoke the method codified in widget name Auto invoke the method codified and described in the Glade widget name. The pattern string is described by the regular expression in self.__reAutoInvoke which typically is '(.*):auto:(.*)' or everything before ':auto:' is the standard widget name, and everything after is the method name or widget (in the case of `gtk.Dialog`) to be invoked. The the methods `name`Pre, `name` amd `name`Post are invoked in order (if exist) and if and only if the predecesor returns `True`. Parameters: `widget` - The widget receiving the signal (type=`gtk.Widget`)

### autoRun(self) auto run the graphical user interface Runs the graphical user interface automatically. There ase some special cases contempled. #. If there's no `__mainTopLevelWidget` then it does nothing #. If the `__mainTopLevelWidget` is a `gtk.Dialog` then the dialog box is run. Loops forever until one of the values of a valid response is received, then return this value # if the `__mainTolLvelWidget` is not a `gtk.Dialog` then the main GTK loop is entered

### on_autobutton_clicked(self, widget, *args) on_autobutton_clicked Parameters: `widget` - The widget receiving the signal (type=`gtk.Widget`)

### on_autodialog_response(self, widget, response, *args) Default handler for `gtk.Dialog` `response` signal This is a handler method intended to be a simple dialog handler. response signal of widget must be connected to this method and the user data parameter must be left untouched (as of Glade 3.0 and libglade 2). Note: Perhaps this method should set a Singleton object value to the response received # gtk response values `gtk.RESPONSE_NONE=-1 gtk.RESPONSE_REJECT=-2 gtk.RESPONSE_ACCEPT=-3 gtk.RESPONSE_DELETE_EVENT=-4 gtk.RESPONSE_OK=-5 gtk.RESPONSE_CANCEL=-6 gtk.RESPONSE_CLOSE=-7 gtk.RESPONSE_YES=-8 gtk.RESPONSE_NO=-9 gtk.RESPONSE_APPLY=-10 gtk.RESPONSE_HELP=-11` Parameters: `widget` - The widget receiving the signal (type=`gtk.Widget`) `response` - The dialog response (i.e.: button pressed) (type=int)

### on_automenuitem_activate(self, widget, *args) Default handler for menu items `activate` signal This is a handler method intended to be a simple menu item handler. The idea is to simplify handling menu items usually connected to dialog boxes. activate signal on the menu item object must point to this function and user data parameter of this signal must point to the object to call. In the case of a dialog, user data parameter is the dialog object which this method will run. This can also be used (and it's used by autoInvoke) in `gtk.ToolButton` objects. Parameters: `widget` - The widget receiving the signal (type=`gtk.Widget`)

### on_autosensitize(self, widget, targetWidget) Toggle the 'sensitive' property on a target widget

### on_autoshow(self, widget, targetWidget) Toggle the 'visible' property on a target widget

### on_autotoolbutton_clicked(self, widget) on_autotoolbutton_clicked Parameters: `widget` - The widget receiving the signal (type=`gtk.Widget`)

### on_cancelbutton_clicked(self, widget) Default handler for Cancel buttons `clicked` signal. Parameters: `widget` - The widget receiving the signal (type=`gtk.Widget`)

### VOID__getAboutDialogElement(self) This method uses a value set by self.__getAboutDialogWidget

Class Variable Details

    ### DEBUG Set debugging output Type: bool Value:
        True

Generated by Epydoc 2.1 on Tue Oct 2 22:07:38 2007 | http://epydoc.sf.net