Gtk.TreeListRow¶
- Subclasses:
- None 
Methods¶
- Inherited:
- Structs:
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | 
Virtual Methods¶
- Inherited:
Properties¶
| Name | Type | Flags | Short Description | 
|---|---|---|---|
| r | |||
| r | |||
| r | |||
| r/w/en | |||
| r | 
Signals¶
- Inherited:
Fields¶
- Inherited:
Class Details¶
- class Gtk.TreeListRow(**kwargs)¶
- Bases:
- Abstract:
- No 
- Structure:
 - The type of item used by - GtkTreeListModel.- It allows navigating the model as a tree and modify the state of rows. - GtkTreeListRowinstances are created by a- GtkTreeListModelonly when the [property`Gtk`.TreeListModel:passthrough] property is not set.- There are various support objects that can make use of - GtkTreeListRowobjects, such as the [class`Gtk`.TreeExpander] widget that allows displaying an icon to expand or collapse a row or [class`Gtk`.TreeListRowSorter] that makes it possible to sort trees properly.- get_child_row(position)[source]¶
- Parameters:
- position ( - int) – position of the child to get
- Returns:
- the child in position 
- Return type:
 - If self is not expanded or position is greater than the number of children, - Noneis returned.
 - get_children()[source]¶
- Returns:
- The model containing the children 
- Return type:
 - If the row is expanded, gets the model holding the children of self. - This model is the model created by the [callback`Gtk`.TreeListModelCreateModelFunc] and contains the original items, no matter what value [property`Gtk`.TreeListModel:passthrough] is set to. 
 - get_depth()[source]¶
- Returns:
- The depth of this row 
- Return type:
 - Gets the depth of this row. - Rows that correspond to items in the root model have a depth of zero, rows corresponding to items of models of direct children of the root model have a depth of 1 and so on. - The depth of a row never changes until the row is removed from its model at which point it will forever return 0. 
 - get_item()[source]¶
- Returns:
- The item of this row. This function is only marked as nullable for backwards compatibility reasons. 
- Return type:
 - Gets the item corresponding to this row, 
 - get_parent()[source]¶
- Returns:
- The parent of self 
- Return type:
 - Gets the row representing the parent for self. - That is the row that would need to be collapsed to make this row disappear. - If self is a row corresponding to the root model, - Noneis returned.- The value returned by this function never changes until the row is removed from its model at which point it will forever return - None.
 - get_position()[source]¶
- Returns:
- The position in the model 
- Return type:
 - Returns the position in the - GtkTreeListModelthat self occupies at the moment.
 - is_expandable()[source]¶
- 
Checks if a row can be expanded. This does not mean that the row is actually expanded, this can be checked with [method`Gtk`.TreeListRow.get_expanded]. If a row is expandable never changes until the row is removed from its model at which point it will forever return False.
 - set_expanded(expanded)[source]¶
- 
Expands or collapses a row. If a row is expanded, the model of calling the [callback`Gtk`.TreeListModelCreateModelFunc] for the row’s item will be inserted after this row. If a row is collapsed, those items will be removed from the model. If the row is not expandable, this function does nothing. 
 
Property Details¶
- Gtk.TreeListRow.props.children¶
- Name:
- children
- Type:
- Default Value:
- Flags:
 - The model holding the row’s children. 
- Gtk.TreeListRow.props.depth¶
- 
The depth in the tree of this row. 
- Gtk.TreeListRow.props.expandable¶
- 
If this row can ever be expanded. 
- Gtk.TreeListRow.props.expanded¶
- Name:
- expanded
- Type:
- Default Value:
- Flags:
 - If this row is currently expanded. 
- Gtk.TreeListRow.props.item¶
- Name:
- item
- Type:
- Default Value:
- Flags:
 - The item held in this row.