Parent class for all Schrodinger Pmw widgets. Takes care of
retrieving defaults for different mega-widget classes, setting proper
behavior, etc.
The class has the capability to retrieve generic defaults, environment
specific defaults (environ is a possible widget argument,
"dialog," "normal," etc.), and packing or grid
defaults. The widget classes below provide examples of how to use the
schroWidget class.
The class also has the capability of setting options for individual
components of the mega-widget, ie each button of a ButtonBox, or the
Listbox component of a ScrolledListBox mega-widget.
|
__init__(self,
type,
baseclass,
parent,
**kwargs)
The initialization function simply retrieves the defaults for the
given mega-widget type (which includes defaults for seperate
components), and intializes the mega-widget with the specified
initialization function, using a combination of user-specified
options and those set in defaults |
|
|
|
_retrievePmwDflts(self,
widgettype,
**kwargs)
Method to retrieve defaults for mega-widgets. |
|
|
|
_retrieveTkDflts(self,
widgettype,
**kwargs)
Method to retrieve defaults for tkinter components of mega-widgets. |
|
|
|
_getDflts(self,
widgettype,
environment,
**kwargs)
Method responsible for fetching defaults for widgets and mega widgets
from the dflts dictionary in the widget/default module. |
|
|
|
_update_placement(self,
method,
**kwargs)
Method used by grid() and pack() to retrive proper placement defaults
for a widget (if they exist). |
|
|
|
pack(self,
**kwargs)
We capture the pack method of the widget so that we can add our
specific defaults. |
|
|
|
grid(self,
**kwargs)
We capture the grid method of the widget so that we can add our
specific defaults. |
|
|
|
_cleanup_component(self,
object,
objecttype=None)
Method responsible for setting defaults for mega-widget component
widgets (ie the Listbox component of a Pmw.ScrolledListBox). |
|
|
|
cleanup_components(self)
Does the equivalent of running the above method _cleanup_component()
on each componenet of this Pmw widget. |
|
|
|
_repack_component(self,
object,
objecttype)
Currently unused method which is intended to modify the pack options
to the defaults by repacking the object with defaults. |
|
|
|
_get_clean_dflts(self,
objecttype)
Called by "_cleanup_component" to retrieve defaults for the
specified widget. |
|
|
|
_get_geometry_defaults(self,
objecttype,
geo_method)
Method called by "_repack_component" to actually fetch the
proper placement defaults, if they exist. |
|
|