schrodinger.ui.widget.pmwwidget module¶
This module contains all Schrodinger-specific PMW widgets.
To use widgets from this module, do the following:
import schrodinger.ui.widget as stk
myfield = stk.EntryField(<args>)
Copyright Schrodinger, LLC. All rights reserved.
-
class
schrodinger.ui.widget.pmwwidget.
Balloon
(parent, **kw)¶ Bases:
schrodinger.ui.widget.pmwwidget.schroPmwWrapper
,_Pmw.Pmw_1_3_3.lib.PmwBalloon.Balloon
Class that mimics the Pmw.Balloon class. Accepts the additional argument “environ,” which sets defaults proper for different Maestro environments (“dialog,” “asl,” “joblaunch,” and “normal” are the possible values.)
-
cleanup_components
()¶ Overwrite this method, since the “label” widget has special defaults.
-
-
class
schrodinger.ui.widget.pmwwidget.
ButtonBox
(parent=None, **kw)¶ Bases:
schrodinger.ui.widget.pmwwidget.schroPmwWrapper
,_Pmw.Pmw_1_3_3.lib.PmwButtonBox.ButtonBox
Class that mimics the Pmw.ButtonBox class. Accepts the additional argument “environ,” which sets defaults proper for different Maestro environments (“dialog,” “asl,” “joblaunch,” and “normal” are the possible values.)
-
add
(componentName, **kw)¶ We catch the “add” method of the Pmw.ButtonBox class so that we can make adjustments to each button as it is created. This method simply creates the button, and cleans it up using the “_cleanup_component” method of the “schroPmwWrapper” class. The method returns the button just as the “Pmw.ButtonBox.add” method does.
-
insert
(componentName, beforeComponent=0, **kw)¶ We catch the “insert” method of the Pmw.ButtonBox class so that we can make adjustments to each button as it is created. This method simply creates the button, and cleans it up using the “_cleanup_component” method of the “schroPmwWrapper” class. The method returns the button just as the “Pmw.ButtonBox.insert” method does.
-
-
class
schrodinger.ui.widget.pmwwidget.
ComboBox
(parent=None, **kw)¶ Bases:
schrodinger.ui.widget.pmwwidget.schroPmwWrapper
,schrodinger.ui.widget._private._fixedComboBox
Class that mimics the Pmw.ComboBox class.
-
class
schrodinger.ui.widget.pmwwidget.
Counter
(parent, **kw)¶ Bases:
schrodinger.ui.widget.pmwwidget.schroPmwWrapper
,schrodinger.ui.widget._private._fixedCounter
Class that mimics the Pmw.Counter class. Accepts the additional argument “environ,” which sets defaults proper for different Maestro environments (“dialog,” “asl,” “joblaunch,” and “normal” are the possible values.)
Note: this is actually subclassed from an improved version of Counter which we supply (_fixedCounter). The improved version uses the Schrodinger EntryField instead of Tkinter’s
-
class
schrodinger.ui.widget.pmwwidget.
Dialog
(parent, **kw)¶ Bases:
schrodinger.ui.widget.pmwwidget.schroPmwWrapper
,schrodinger.ui.widget._private._enhancedDialog
Class that mimics the Pmw.Dialog class. Accepts the additional argument “environ,” which sets defaults proper for different Maestro environments (“dialog,” “asl,” “joblaunch,” and “normal” are the possible values.)
Note: this is actually subclassed from an improved version of Dialog which we supply (_enhancedDialog). The improved version allows us to set further default behavior, honor the “environ” argument, and fix bugs resulting from incorrect parenting of seperate Tk panels.
-
setButtonState
(button, state)¶ Set the state of the specified button, e.g.,
self.setButtonState(‘OK’, DISABLED)
The standard state is NORMAL. Raises a RuntimeError if the button doesn’t exist or if the requested state can’t be set.
-
-
class
schrodinger.ui.widget.pmwwidget.
EntryField
(parent, **kw)¶ Bases:
schrodinger.ui.widget.pmwwidget.schroPmwWrapper
,schrodinger.ui.widget._private._fixedEntryField
Class that mimics the Pmw.EntryField class. Accepts the additional argument “environ,” which sets defaults proper for different Maestro environments (“dialog,” “asl,” “joblaunch,” and “normal” are the possible values.)
-
class
schrodinger.ui.widget.pmwwidget.
Group
(parent, **kw)¶ Bases:
schrodinger.ui.widget.pmwwidget.schroPmwWrapper
,_Pmw.Pmw_1_3_3.lib.PmwGroup.Group
Class that mimics the Pmw.Group class. Accepts the additional argument “environ,” which sets defaults proper for different Maestro environments (“dialog,” “asl,” “joblaunch,” and “normal” are the possible values.)
-
class
schrodinger.ui.widget.pmwwidget.
MainMenuBar
(parent, **kw)¶ Bases:
schrodinger.ui.widget.pmwwidget.schroPmwWrapper
,_Pmw.Pmw_1_3_3.lib.PmwMainMenuBar.MainMenuBar
Class that mimics the Pmw.MainMenuBar class.
We catch the “addcascademenu” method of the Pmw.MainMenuBar class so that we can make adjustments to each one as it is created. This method simply creates the menu after modifying the options in order to get default behavior.
NOTE: user-specified options will be overwritten, in order to get non-default behavior, the user must customize the widget after initialization (this excludes necessary user-defined options requested for this method, eg. menuName).
We catch the “addmenu” method of the Pmw.MainMenuBar class so that we can make adjustments to each one as it is created. This method simply creates the menu, and cleans it up by hand.
We catch the “addmenuitem” method of the Pmw.MainMenuBar class so that we can make adjustments to each one as it is created. This method simply creates the item after modifying the options in order to get default behavior.
NOTE: user-specified options will be overwritten, in order to get non-default behavior, the user must customize the widget after initialization (this excludes necessary user-defined options requested for this method, eg. menuName).
-
class
schrodinger.ui.widget.pmwwidget.
MessageDialog
(parent, **kw)¶ Bases:
schrodinger.ui.widget.pmwwidget.schroPmwWrapper
,schrodinger.ui.widget._private._enhancedMessageDialog
Class that mimics the Pmw.Dialog class. Accepts the additional argument “environ,” which sets defaults proper for different Maestro environments (“dialog,” “asl,” “joblaunch,” and “normal” are the possible values.)
Note: this is actually subclassed from an improved version of Dialog which we supply (_enhancedMessageDialog), which subclasses the _enhancedDialog class for ButtonBox behavior). The improved version allows us to set further default behavior, honor the “environ” argument, and fix bugs resulting from incorrect parenting of seperate Tk panels.
-
class
schrodinger.ui.widget.pmwwidget.
NoteBook
(parent, **kw)¶ Bases:
schrodinger.ui.widget.pmwwidget.schroPmwWrapper
,schrodinger.ui.widget._private._roundNoteBook
Class that mimics the Pmw.NoteBook class. Accepts the additional argument “environ,” which sets defaults proper for different Maestro environments (“dialog,” “asl,” “joblaunch,” and “normal” are the possible values.)
Note: this is actually subclassed from an improved version of NoteBook which we supply (roundNoteBook). The improved version has rounded tabs (like in Maestro), and addresses some bugs.
-
add
(pageName, **kw)¶
-
insert
(pageName, before=0, **kw)¶
-
-
class
schrodinger.ui.widget.pmwwidget.
OptionMenu
(parent, **kw)¶ Bases:
schrodinger.ui.widget.pmwwidget.schroPmwWrapper
,_Pmw.Pmw_1_3_3.lib.PmwOptionMenu.OptionMenu
Class that mimics the Pmw.OptionMenu class. Accepts the additional argument “environ,” which sets defaults proper for different Maestro environments (“dialog,” “asl,” “joblaunch,” and “normal” are the possible values.)
-
setitems
(items, index=None)¶
-
-
class
schrodinger.ui.widget.pmwwidget.
PanedWidget
(parent, **kw)¶ Bases:
schrodinger.ui.widget.pmwwidget.schroPmwWrapper
,schrodinger.ui.widget._private._fixedPanedWidget
Class that mimics the Pmw.PanedWidget class. Accepts the additional argument “environ,” which sets defaults proper for different Maestro environments (“dialog,” “asl,” “joblaunch,” and “normal” are the possible values.)
-
add
(name, **kw)¶ We catch the “add” method of the Pmw.PanedWidget class so that we can make adjustments to each pane as it is created. This method simply creates the pane, and cleans it up using the “_cleanup_component” method of the “schroPmwWrapper” class. The method returns the pane just as the “Pmw.PanedWidget.add” method does.
-
insert
(name, before=0, **kw)¶ We catch the “insert” method of the “Pmw.PanedWidget” class so that we can make adjustments to each pane as it is created. This method simply creates the pane, and cleans it up using the “_cleanup_component” method of the “schroPmwWrapper” class. The method returns the pane just as the “Pmw.PanedWidget.insert” method does.
-
-
class
schrodinger.ui.widget.pmwwidget.
PromptDialog
(parent, **kw)¶ Bases:
schrodinger.ui.widget.pmwwidget.schroPmwWrapper
,schrodinger.ui.widget._private._enhancedPromptDialog
Class that mimics the Pmw.Dialog class. Accepts the additional argument “environ,” which sets defaults proper for different Maestro environments (“dialog,” “asl,” “joblaunch,” and “normal” are the possible values.)
Note: this is actually subclassed from an improved version of Dialog which we supply (_enhancedPromptDialog), which subclasses the _enhancedDialog class for ButtonBox behavior). The improved version allows us to set further default behavior, honor the “environ” argument, and fix bugs resulting from incorrect parenting of seperate Tk panels.
-
class
schrodinger.ui.widget.pmwwidget.
RadioSelect
(parent, **kw)¶ Bases:
schrodinger.ui.widget.pmwwidget.schroPmwWrapper
,_Pmw.Pmw_1_3_3.lib.PmwRadioSelect.RadioSelect
Class that mimics the Pmw.RadioSelect class. Accepts the additional argument “environ,” which sets defaults proper for different Maestro environments (“dialog,” “asl,” “joblaunch,” and “normal” are the possible values.)
-
add
(componentName, **kw)¶
-
-
class
schrodinger.ui.widget.pmwwidget.
ScrolledCanvas
(parent, **kw)¶ Bases:
schrodinger.ui.widget.pmwwidget.schroPmwWrapper
,_Pmw.Pmw_1_3_3.lib.PmwScrolledCanvas.ScrolledCanvas
Class that mimics the Pmw.ScrolledCanvas class. Accepts the additional argument “environ,” which sets defaults proper for different Maestro environments (“dialog,” “asl,” “joblaunch,” and “normal” are the possible values.)
-
class
schrodinger.ui.widget.pmwwidget.
ScrolledFrame
(parent, **kw)¶ Bases:
schrodinger.ui.widget.pmwwidget.schroPmwWrapper
,schrodinger.ui.widget._private._fixedScrolledFrame
Class that mimics the Pmw.ScrolledFrame class. Accepts the additional argument “environ,” which sets defaults proper for different Maestro environments (“dialog,” “asl,” “joblaunch,” and “normal” are the possible values.)
-
class
schrodinger.ui.widget.pmwwidget.
ScrolledListBox
(parent, **kw)¶ Bases:
schrodinger.ui.widget.pmwwidget.schroPmwWrapper
,schrodinger.ui.widget._private._fixedScrolledListBox
Class that mimics the Pmw.ScrolledListBox class. Accepts the additional argument “environ,” which sets defaults proper for different Maestro environments (“dialog,” “asl,” “joblaunch,” and “normal” are the possible values.)
-
class
schrodinger.ui.widget.pmwwidget.
ScrolledText
(parent, **kw)¶ Bases:
schrodinger.ui.widget.pmwwidget.schroPmwWrapper
,_Pmw.Pmw_1_3_3.lib.PmwScrolledText.ScrolledText
Class that mimics the Pmw.ScrolledText class. Accepts the additional argument “environ,” which sets defaults proper for different Maestro environments (“dialog,” “asl,” “joblaunch,” and “normal” are the possible values.)
-
class
schrodinger.ui.widget.pmwwidget.
schroPmwWrapper
(type, baseclass, parent, **kwargs)¶ 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.
-
cleanup_components
()¶ Does the equivalent of running the above method _cleanup_component() on each componenet of this Pmw widget. FIXME: MAY NOT WORK AS EXPECTED
-
grid
(**kwargs)¶ We capture the grid method of the widget so that we can add our specific defaults. After the defaults are added (user-specified options overwrite defaults), the original grid function is called.
-
pack
(**kwargs)¶ We capture the pack method of the widget so that we can add our specific defaults. After the defaults are added (user-specified options overwrite defaults), the original pack function is called.
-
-
class
schrodinger.ui.widget.pmwwidget.
showinfo
(title=None, message=None, **kwargs)¶ Bases:
schrodinger.ui.widget.pmwwidget.MessageDialog
Class designed to mimic the tkMessageBox.showinfo class with the caveat that a parent argument must be specified. This allows us to bypass bugs resulting from improper parenting. Options are also set so that the dialog looks like a Maestro information dialog.
-
class
schrodinger.ui.widget.pmwwidget.
showwarning
(title=None, message=None, **kwargs)¶ Bases:
schrodinger.ui.widget.pmwwidget.MessageDialog
Class designed to mimic the tkMessageBox.showwarning class with the caveat that a parent argument must be specified. This allows us to bypass bugs resulting from improper parenting. Options are also set so that the dialog looks like a Maestro warning dialog.