CurrentItemList is a standard list that only accepts instances of the type specified upon construction.
This class supports the 'current' property which allows one to get and set the "current" list item. The default current item is the first item added. A non-empty list always has a current item.
Note: currently only apppend, remove and __setitem__ interfaces are "supported". If other list modification methods such as insert, extend and pop are needed by users of this class they will have to be added here and invoke the changed method appropriately.
Public Member Functions |
|
__init__ () | |
append () | |
appendCurrent () | |
Insert an element and set it to current.
|
|
remove () | |
changed () | |
Override the changed method if you need to
be notified when the list is modified. |
|
__setitem__ () | |
Public Attributes |
|
current = property( __getCurrent, __setCurrent ) |
CurrentItemList.CurrentItemList.__init__ | ( | ) |
Reimplemented in CustomUIData.List, EnvironmentIO.EnvironmentList, and Navigation.NavigatorList.
CurrentItemList.CurrentItemList.append | ( | ) |
CurrentItemList.CurrentItemList.appendCurrent | ( | ) |
Insert an element and set it to current.
Equivalent to append, setCurrent but is much more efficient because it only updates the list once
CurrentItemList.CurrentItemList.remove | ( | ) |
CurrentItemList.CurrentItemList.changed | ( | ) |
Override the changed method if you need to be notified when the list is modified.
The argument will either be the previous current item or a recently added/removed member.
CurrentItemList.CurrentItemList.__setitem__ | ( | ) |
CurrentItemList.CurrentItemList.current = property( __getCurrent, __setCurrent ) |