Package schrodinger :: Package application :: Package desmond :: Module guide :: Class _Step
[hide private]
[frames] | no frames]

Class _Step

ui.widget.tkinterwidget.schroWidget --+    
                                      |    
           Tkinter.Misc --+           |    
                          |           |    
         Tkinter.BaseWidget --+       |    
                              |       |    
               Tkinter.Pack --+       |    
                              |       |    
              Tkinter.Place --+       |    
                              |       |    
               Tkinter.Grid --+       |    
                              |       |    
                 Tkinter.Widget --+   |    
                                  |   |    
                      Tkinter.Frame --+    
                                      |    
          ui.widget.tkinterwidget.Frame --+
                                          |
                                         _Step

This is a class that represents the step as in the 'guide' widget (see below). A step is composed of a button and an arrow that is laid out to the right of the button.

Nested Classes [hide private]

Inherited from Tkinter.Misc: getdouble, getint

Instance Methods [hide private]
 
__init__(self, master, btn_state, prev, next, command, warn, guide)
Construct a _Step.
 
_btn_cmd(self)
A callback function in response to the clicking of the button.
 
hide(self, should_hide=True)
Hides this step.
 
enable(self, should_enable=True)
Changes the state of this button to the enabled state.
 
enter(self, should_enter=True, should_enable=True)
Enters this step.
 
next(self)
Returns the next visible step.
 
prev(self)
Returns the previous visible step.
 
config(self, **kw)
Configures the button and/or the arrow.
 
configure(self, **kw)
Just an alias of the config function.

Inherited from ui.widget.tkinterwidget.schroWidget: grid, pack

Inherited from Tkinter.BaseWidget: destroy

Inherited from Tkinter.BaseWidget (private): _do, _setup

Inherited from Tkinter.Misc: __contains__, __getitem__, __setitem__, __str__, after, after_cancel, after_idle, bbox, bell, bind, bind_all, bind_class, bindtags, cget, clipboard_append, clipboard_clear, clipboard_get, colormodel, columnconfigure, deletecommand, event_add, event_delete, event_generate, event_info, focus, focus_displayof, focus_force, focus_get, focus_lastfor, focus_set, getboolean, getvar, grab_current, grab_release, grab_set, grab_set_global, grab_status, grid_bbox, grid_columnconfigure, grid_location, grid_propagate, grid_rowconfigure, grid_size, grid_slaves, image_names, image_types, keys, lift, lower, mainloop, nametowidget, option_add, option_clear, option_get, option_readfile, pack_propagate, pack_slaves, place_slaves, propagate, quit, register, rowconfigure, selection_clear, selection_get, selection_handle, selection_own, selection_own_get, send, setvar, size, slaves, tk_bisque, tk_focusFollowsMouse, tk_focusNext, tk_focusPrev, tk_menuBar, tk_setPalette, tk_strictMotif, tkraise, unbind, unbind_all, unbind_class, update, update_idletasks, wait_variable, wait_visibility, wait_window, waitvar, winfo_atom, winfo_atomname, winfo_cells, winfo_children, winfo_class, winfo_colormapfull, winfo_containing, winfo_depth, winfo_exists, winfo_fpixels, winfo_geometry, winfo_height, winfo_id, winfo_interps, winfo_ismapped, winfo_manager, winfo_name, winfo_parent, winfo_pathname, winfo_pixels, winfo_pointerx, winfo_pointerxy, winfo_pointery, winfo_reqheight, winfo_reqwidth, winfo_rgb, winfo_rootx, winfo_rooty, winfo_screen, winfo_screencells, winfo_screendepth, winfo_screenheight, winfo_screenmmheight, winfo_screenmmwidth, winfo_screenvisual, winfo_screenwidth, winfo_server, winfo_toplevel, winfo_viewable, winfo_visual, winfo_visualid, winfo_visualsavailable, winfo_vrootheight, winfo_vrootwidth, winfo_vrootx, winfo_vrooty, winfo_width, winfo_x, winfo_y

Inherited from Tkinter.Misc (private): _bind, _configure, _displayof, _getboolean, _getconfigure, _getconfigure1, _getdoubles, _getints, _grid_configure, _gridconvvalue, _nametowidget, _options, _register, _report_exception, _root, _substitute

Inherited from Tkinter.Pack: forget, info, pack_configure, pack_forget, pack_info

Inherited from Tkinter.Place: place, place_configure, place_forget, place_info

Inherited from Tkinter.Grid: grid_configure, grid_forget, grid_info, grid_remove, location

Class Variables [hide private]
  BTN_DISABLED = {'padx': 4, 'relief': 'raised', 'state': 'disab...
  BTN_ENABLED = {'padx': 4, 'relief': 'raised', 'state': 'normal'}
  BTN_ENTERED = {'padx': 4, 'relief': 'sunken', 'state': 'normal'}
  BTN_STATE = {'disabled': {'padx': 4, 'relief': 'raised', 'stat...

Inherited from Tkinter.Misc: _noarg_

Inherited from Tkinter.Misc (private): _subst_format, _subst_format_str, _tclCommands

Properties [hide private]

Inherited from Tkinter.Misc (private): _windowingsystem

Method Details [hide private]

__init__(self, master, btn_state, prev, next, command, warn, guide)
(Constructor)

 

Construct a _Step.

Parameters:
  • master - The frame that this step widget is going to be constructed in.
  • btn_state - A dictionary that overwrites the default button looks (as given by the '_Step.BTN_STATE')
  • prev - A 'Step' object that is the previous step to this one.
  • next - A 'Step' object that is the next step after this one.
  • command - A callable object that will be called when the user enters/de-enters this step. This object should be able to take two arguments, via the first one the guide widget itself will be passed in, and via the 2nd one a boolean value will be passed in. A true value for the 2nd argument means the widget is entered, a false value means it is de-entered.
  • warn - When this step is de-entered, a warning dialog might pop up and warn the user. In this case, the user must provide a callable object to be called back to show the warning dialog. This callable object must take no argument and return true (indicating that it is OK to de-enter) or false (indicating that it is not OK to de-enter, and in this case we don't de-enter). None can be passed to this argument and then no warning dialog will pop out.
  • guide - The guide widget which the step widget is within.
Overrides: Tkinter.BaseWidget.__init__

_btn_cmd(self)

 

A callback function in response to the clicking of the button. It will adjust the button's look and call the enter function.

hide(self, should_hide=True)

 

Hides this step. If 'should_hide' is False, shows this step.

enable(self, should_enable=True)

 

Changes the state of this button to the enabled state. If 'should_enable' is False, changes it to the disabled state.

enter(self, should_enter=True, should_enable=True)

 

Enters this step.

If 'should_enable' is True, then it will enable the next step.

If 'should_enter' is False, it de-enters this step and all visited steps after.

config(self, **kw)

 

Configures the button and/or the arrow.

Parameters for the arrow should be prefixed by 'arrow_', e.g., 'arrow_state'.

Overrides: Tkinter.Grid.grid_configure

configure(self, **kw)

 

Just an alias of the config function.

Overrides: Tkinter.Grid.grid_configure

Class Variable Details [hide private]

BTN_DISABLED

Value:
{'padx': 4, 'relief': 'raised', 'state': 'disabled'}

BTN_STATE

Value:
{'disabled': {'padx': 4, 'relief': 'raised', 'state': 'disabled'},
 'enabled': {'padx': 4, 'relief': 'raised', 'state': 'normal'},
 'entered': {'padx': 4, 'relief': 'sunken', 'state': 'normal'}}