Package mrv :: Package maya :: Package ui :: Package browse :: Module control :: Class StackControlBase
[hide private]
[frames] | no frames]

Class StackControlBase

source code

TextScrollList --+
                 |
                StackControlBase

stack base implementation. A stack keeps multiple items which can be added 
and removed. Additionally, it allows to remap the items, effectively showing 
a formatted item, which is kept in sync with an unformatted item.
:note: for now, only adding items, format will be applied. All other methods
        operate on the formatted items.

Instance Methods [hide private]
 
__init__(self, *args, **kwargs) source code
    Interface
 
formatItem(self, item)
Returns: formatted version of item
source code
 
selectedUnformattedItem(self)
Returns: unformatted selected item or None
source code
 
selectUnformattedItem(self, index_or_item)
Select the unformatted item as identified by either the index or item...
source code
    Overridden Methods
 
removeItem(self, item)
Remove the given formatted item from the list, as well as the corresponding unformtted item.
source code
 
addItem(self, item) source code
Method Details [hide private]

formatItem(self, item)

source code 
Returns:
formatted version of item

selectedUnformattedItem(self)

source code 
Returns:
unformatted selected item or None

selectUnformattedItem(self, index_or_item)

source code 
Select the unformatted item as identified by either the index or item
:param index_or_item: integer representing the 0-based index of the item to 
        select, or the item's id
:raise ValueError: if the item does not exist

removeItem(self, item)

source code 
Remove the given formatted item from the list, as well as the corresponding unformtted item. Its not an error if the item does not exist