# Class k.u.o.ObjectTree(ObjectList):

Part of kiwi.ui.objectlist View In Hierarchy

# Signals

- row-expanded (list, object):
  - Emitted when a row is "expanded", eg the littler arrow to the left is opened. See the GtkTreeView documentation for more information.

Method | __init__ | Create a new ObjectList object.
Method | _append_internal | Undocumented
Method | append | Append the selected row in an instance.
Method | prepend | Prepend the selected row in an instance.
Method | expand | This method opens the row specified by path so its children
Method | collapse | This method collapses the row specified by path
Method | get_root | This method returns the root object of a certain instance. If
Method | get_descendants | This method returns the descendants objects of a certain instance.
Method | _on_treeview__row_expanded | Undocumented

Inherited from ObjectList:

Method | __len__ | len(list)
Method | __nonzero__ | if list
Method | __contains__ | item in list
Method | __iter__ | for item in list
Method | __getitem__ | list[n]
Method | __setitem__ | list[n] = m
Method | extend | Extend list by appending elements from the iterable
Method | index | Return first index of value
Method | count | L.count(item) -> integer -- return number of occurrences of value
Method | insert | Inserts an instance to the list
Method | pop | Remove and return item at index (default last)
Method | reverse | L.reverse() -- reverse *IN PLACE*
Method | sort | L.sort(cmp=None, key=None, reverse=False) -- stable sort *IN PLACE*;
Method | sort_by_attribute | Sort by an attribute in the object model.
Method | set_context_menu | Sets a context-menu (eg, when you right click) for the list.
Method | prop_set_selection_mode | Undocumented
Method | prop_get_selection_mode | Undocumented
Method | _load | Undocumented
Method | _setup_columns | Undocumented
Method | _attach_column | Undocumented
Method | _select_and_focus_row | Undocumented
Method | _on_model__row_inserted | Undocumented
Method | _on_model__row_deleted | Undocumented
Method | _model_sort_func | This method is used to sort the GtkTreeModel
Method | _on_selection__changed | This method is used to proxy selection::changed to selection-changed
Method | _on_scrolled_window__realize | Undocumented
Method | _on_scrolled_window__size_allocate | Resize the Vertical Scrollbar to make it smaller and let space
Method | _treeview_search_equal_func | for searching inside the treeview, case-insensitive by default
Method | _on_treeview_header__button_release_event | Undocumented
Method | _after_treeview__row_activated | After activated (double clicked or pressed enter) on a row
Method | _get_selection_or_selected_rows | Undocumented
Method | _emit_button_press_signal | Undocumented
Method | _on_treeview__button_press_event | Generic button-press-event handler to be able to catch double clicks
Method | _on_treeview__source_drag_data_get | Undocumented
Method | _get_column_button | Return the button widget of a particular TreeViewColumn.
Method | _setup_popup_button | Put a button on top of the vertical scrollbar to show the popup
Method | _find_vertical_scrollbar | This method is called from a .forall() method in the ScrolledWindow.
Method | _get_header_height | Undocumented
Method | get_model | Return treemodel of the current list
Method | get_treeview | Return treeview of the current list
Method | get_columns | Undocumented
Method | get_column_by_name | Returns the name of a column
Method | get_treeview_column | Get the treeview column given an objectlist column
Method | set_spinbutton_digits | Set the number of precision digits used by the spinbutton in
Method | grab_focus | Grabs the focus of the ObjectList
Method | _clear_columns | Undocumented
Method | set_columns | Set columns.
Method | _remove | Undocumented
Method | remove | Remove an instance from the list.
Method | update | Undocumented
Method | refresh | Reloads the values from all objects.
Method | set_column_visibility | Undocumented
Method | get_selection_mode | Undocumented
Method | set_selection_mode | Undocumented
Method | unselect_all | Undocumented
Method | select_paths | Selects a number of rows corresponding to paths
Method | select | Undocumented
Method | get_selected | Returns the currently selected object
Method | get_selected_rows | Returns a list of currently selected objects
Method | add_list | Allows a list to be loaded, by default clearing it first.
Method | clear | Removes all the instances of the list
Method | get_next | Returns the item after instance in the list.
Method | get_previous | Returns the item before instance in the list.
Method | get_selected_row_number | Get the selected row number or None if no rows were selected
Method | double_click | Same as double clicking on the row rowno
Method | set_headers_visible | Show or hide the headers.
Method | set_visible_rows | Sets the number of visible rows of the treeview. This is useful to use
Method | enable_dnd | Enables Drag and Drop from this object list
Method | get_dnd_targets | Get a list of dnd targets ObjectList supports

Inherited from PropertyObject (via ObjectList):

Class Method | __class_init__ | Undocumented
Method | __post_init__ | A hook which is called after the constructor is called.
Method | _set | Undocumented
Method | _get | Undocumented
Method | get_attribute_names | Undocumented
Method | is_default_value | Undocumented
Method | do_set_property | Undocumented
Method | do_get_property | Undocumented

def __init__(self, columns=, objects=None, mode=gtk.SELECTION_BROWSE, sortable=False, model=None):
overrides kiwi.ui.objectlist.ObjectList.__init__
Create a new ObjectList object.

Parameters | columns | a list of `Column`s
| objects | a list of objects to be inserted or None
| mode | selection mode
| sortable | whether the user can sort the list
| model | gtk.TreeModel to use or None to create one

def _append_internal(self, parent, instance, select, prepend):
Undocumented
def append(self, parent, instance, select=False):
overrides kiwi.ui.objectlist.ObjectList.append
Append the selected row in an instance.

Parameters | parent | Object or None, representing the parent
| instance | the instance to be added
| select | select the row
Returns | the appended object

def prepend(self, parent, instance, select=False):
Prepend the selected row in an instance.

Parameters | parent | Object or None, representing the parent
| instance | the instance to be added
| select | select the row
Returns | the prepended object

def expand(self, instance, open_all=True):
This method opens the row specified by path so its children are visible.

Parameters | instance | an instance to expand at
| open_all | If True, expand all rows, otherwise just the immediate children

def collapse(self, instance):
This method collapses the row specified by path (hides its child rows, if they exist).

Parameters | instance | an instance to collapse

def get_root(self, instance):
This method returns the root object of a certain instance. If the instance is the root, then returns the given instance.

Parameters | instance | an instance which we want the root object

def get_descendants(self, root_instance):
This method returns the descendants objects of a certain instance. If the given instance is a leaf, then return an empty sequence.

Parameters | root_instance | an instance which we want the descendants
Returns | a sequence of descendants objects

def _on_treeview__row_expanded(self, treeview, treeiter, treepath):
Undocumented