Package kiwi :: Package ui :: Module listdialog :: Class ListDialog
[frames | no frames]

Type ListDialog

object --+    
         |    
  _GObject --+
             |
            ListDialog


A ListDialog implements a ListContainer in a gtk.Dialog with a close button.

It's a simple Base class which needs to be subclassed to provide interesting functionality.

Example: >>> class MyListDialog(ListDialog): ... ... columns = [Column('name')] ... list_type = ListType.UNEDITABLE ... ... def populate(self): ... return [Settable(name='test')] ... ... def add_item(self): ... return Settable(name="added")
>>> dialog = MyListDialog()
>>> dialog.run()

Method Summary
  add_item(self)
This must be implemented in a subclass if you want to be able to add items
  add_list_item(self, item)
  add_list_items(self, item)
  default_remove(self, item)
  edit_item(self, item)
A subclass must implement this if you want to support editing of objects.
sequence of objects populate(self)
This will be called once after the user interface construction is done.
  remove_item(self, item)
A subclass can implement this to get a notification after an item is removed.
  remove_list_item(self, item)
  selection_changed(self, selection)
This will be called when the selection changes in the ListDialog
  set_list_type(self, list_type)
  update_list_item(self, item)

Class Variable Summary
NoneType columns = None                                                                  
ListType list_type = <ListType value NORMAL>

Method Details

add_item(self)

This must be implemented in a subclass if you want to be able to add items

add_list_item(self, item)

See Also: Listcontainer.add_item

add_list_items(self, item)

See Also: Listcontainer.add_items

edit_item(self, item)

A subclass must implement this if you want to support editing of objects.
Returns:
False if the item should not be removed

populate(self)

This will be called once after the user interface construction is done. It should return a list of objects which will initially be inserted
Returns:
object to insert
           (type=sequence of objects)

remove_item(self, item)

A subclass can implement this to get a notification after an item is removed. If it's not implemented default_remove will be called
Returns:
False if the item should not be removed

remove_list_item(self, item)

See Also: Listcontainer.remove_item

selection_changed(self, selection)

This will be called when the selection changes in the ListDialog
Parameters:
selection - selected object or None if nothing is selected

set_list_type(self, list_type)

See Also: Listcontainer.set_list_type

update_list_item(self, item)

See Also: Listcontainer.edit_item


Class Variable Details

columns

Type:
NoneType
Value:
None                                                                  

list_type

Type:
ListType
Value:
<ListType value NORMAL>                                                

Generated by Epydoc 2.1 on Fri Mar 23 15:56:55 2007 http://epydoc.sf.net