Changes between Version 46 and Version 47 of Development

Show
Ignore:
Timestamp:
02/08/12 09:36:51 (16 months ago)
Author:
ian
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Development

    v46 v47  
    3131 * .contents property (GET) (SET as well in most cases) is a mapping or list-like (for simple containers) object whose keys are positions and values are (widget, container_specific_options) tuples.  container_specific_options may be created from .options() class method on the container class, for forwards compatibility. '''DONE''' 
    3232 * `[x]` (a.k.a. `.__getitem__(x)`) is equivalent to `.contents[x][0].base_widget` '''DONE''' 
    33  * .get_focus_path() method list of focus positions down to the leaf widget, skipping all decoration widgets (they only ever contain one item) 
    34  * .set_focus_path(x) set the focus positions along each widget in the path.  useful for restoring a value previously returned from get_focus_path().  raises IndexError on failure 
    35  * .get_descendant(x) get the base_widget with path x 
    36  * .__iter__() iterate over all the positions in the container in a consistent, but possibly surprising order (ListBox is currently the only widget that *might* return these in a "strange" order -- starting from focus and moving down).  This may be an unbounded iterator. 
    37  * .__reversed__() iterate like __iter__() but in reverse, for supporting reversed() in Python 2.6 and later. 
     33 * `.get_focus_path()` method list of focus positions down to the leaf widget, skipping all decoration widgets (they only ever contain one item) 
     34 * `.set_focus_path(x)` set the focus positions along each widget in the path.  useful for restoring a value previously returned from get_focus_path().  raises IndexError on failure 
     35 * `.get_descendant(x)` get the base_widget with path x 
     36 * `.__iter__()` iterate over all the positions in the container in a consistent, but possibly surprising order (ListBox is currently the only widget that *might* return these in a "strange" order -- starting from focus and moving down).  This may be an unbounded iterator. 
     37 * `.__reversed__()` iterate like `__iter__()` but in reverse, for supporting reversed() in Python 2.6 and later. 
    3838 
    3939"Maybe-later" additions to container API: 
    4040 
    4141 * .set_descendant(x, w) attempt to set the base_widget at path x, returns the original base_widget that was replaced.  raises IndexError or ContainerWidgetError on failure 
    42  * .contents_from_focus(reverse=False) iterator over child (widget, position) tuples 
    43  
    44 eg. 
    45  
    46 {{{ 
    47 bottom_focus = w.get_descendant(w.get_focus_path()) 
    48 one_above_bottom_focus = w.get_descendant(w.get_focus_path()[:-1]) 
    49 }}} 
    5042 
    5143