Table of Contents

HappyDoc Generated Documentation: OpenSave  

Standard open/save panels for Chimera

The classes that are designed for developer use are SaveModal, SaveModeless, OpenModal, and OpenModeless. Initializer keywords that aren't directly understood by these classes are passed on to the initializer of the MillerBrowser (self.millerBrowser). See the MillerBrowser class (in miller.py) for documentation on those keywords. The parent, fileEntryCommand, and style keywords of the MillerBrowser should never be supplied by the developer as the open/save classes supply these.

If the developer doesn't explicitly supply values for the addAll or multiple keywords, then the dialog will supply a value. For open dialogs, addAll and multiple will be true, whereas for save dialogs they will be false.

If the developer needs to place additional widgets in the dialog, then they should supply a clientPos keyword specifying what side of the dialog to place the widgets (n, s, e, or w). If clientPos is specified, a Frame will be placed on the appropriate side of the dialog (self.clientArea) with the grid() method and a "stickiness" given by the clientSticky keyword (if provided). The developer should populate the client area by overriding the fillInUI method, calling the parent fillInUI() method and then creating widgets with self.clientArea as a parent.

The command keyword can be used to supply a function to call when Apply, OK, or Cancel are invoked in Modeless dialogs. The two arguments given to the function are a boolean and the dialog instance. The boolean is 1 if Apply or OK were chosen, 0 otherwise. It is expected that if command is supplied, then the developer will not be overriding the Apply method.

The title keyword allows the developer to supply a title without having to subclass. The subclassing method still works (though the keyword has precedence if supplied).

In open dialogs, the sample keyword (or self.sample class attribute) allows a path to a directory containing sample data to be specified. If sample is provided, a "Sample" button will be added to the dialog.

The "public" MillerBrowser methods are accepted by the dialog instance directly and forwarded to self.millerBrowser. They are:

setPath getPaths getPathsAndTypes getFilter setFilter addFilter rememberDir rememberFile [see MillerBrowser class for more info]

The most frequently used of these is 'getPaths'/'getPathsAndTypes' to find out the path name(s) chosen by the user.

Modules and Packages   

OpenSave/

__init__

Standard open/save panels for Chimera

miller

Table of Contents

This document was automatically generated on Tue Nov 5 16:56:36 2002 by HappyDoc version 2.0.1