TreeViews that are object orientated, and mimic Pythonic lists
| copyright: | 2005-2008 by pygtkhelpers Authors |
|---|---|
| license: | LGPL 2 or later (see README/COPYING/LICENSE) |
A Column for an ObjectList.
A column loosely combines a GUI TreeView column with an attribute of an instance. The column encapsulates the type of the attribute, how it is displayed, whether fields are editable, the column headings, whether sorting can be applied, and other features.
The mapping between columns and attributes is not exactly correct as there is the flexibility to add multiple cells per column.
| Parameters: |
|
|---|
Create a gtk.TreeViewColumn for the configuration.
Render the tooltip for this column for an object
Search by this column on an ObjectList
| Parameters: | objectlist – An ObjectList or ObjectTree |
|---|
An object list
Add an item to the end of the list.
| Parameters: |
|
|---|
Clear all the items in the list
Add a sequence of items to the end of the list
| Parameters: | iter – The iterable of items to add. |
|---|
The item after an item
The item before an item
| Parameters: | item – The item to get the previous item relative to |
|---|
Return whether an item is visible
| Parameters: | item – The item to test visibility |
|---|---|
| Return type: | bool |
Move an item down in the list.
Essentially swap it with the item below it.
| Parameters: | item – The item to be moved. |
|---|
Move an item up in the list.
Essentially swap it with the item above it.
| Parameters: | item – The item to be moved. |
|---|
Remove an item from the list
| Parameters: | item – The item to remove from the list. |
|---|---|
| Raises ValueError: | |
| If the item is not present in the list. | |
The currently selected item
List of currently selected items
Set the function to decide visibility of an item
| Parameters: | visible_func – A callable that returns a boolean result to decide if an item should be visible, for example: def is_visible(item):
return True
|
|---|
Sort the view by an attribute or key
| Parameters: |
|
|---|
Manually update an item’s display in the list
| Parameters: | item – The item to be updated. |
|---|
An object tree
Add an item to the end of the list.
| Parameters: |
|
|---|
Clear all the items in the list
Display a node as collapsed
| Parameters: | item – The item to show collapsed |
|---|
Display a node as expanded
| Parameters: |
|
|---|
Add a sequence of items to the end of the list
| Parameters: |
|
|---|
The item after an item
The item before an item
| Parameters: | item – The item to get the previous item relative to |
|---|
Return whether an item is expanded or collapsed
| Parameters: | item – The item that is queried for expanded state |
|---|
Return whether an item is visible
| Parameters: | item – The item to test visibility |
|---|---|
| Return type: | bool |
Move an item down in the list.
Essentially swap it with the item below it.
| Parameters: | item – The item to be moved. |
|---|
Move an item up in the list.
Essentially swap it with the item above it.
| Parameters: | item – The item to be moved. |
|---|
Remove an item from the list
| Parameters: | item – The item to remove from the list. |
|---|---|
| Raises ValueError: | |
| If the item is not present in the list. | |
The currently selected item
List of currently selected items
Set the function to decide visibility of an item
| Parameters: | visible_func – A callable that returns a boolean result to decide if an item should be visible, for example: def is_visible(item):
return True
|
|---|
Sort the view by an attribute or key
| Parameters: |
|
|---|
Manually update an item’s display in the list
| Parameters: | item – The item to be updated. |
|---|