1.208 <GtkTreeListRow>

Class: <GtkTreeListRow>

It derives from <GObject>.

The type of item used by <GtkTreeListModel>.

It allows navigating the model as a tree and modify the state of rows.

<GtkTreeListRow> instances are created by a <GtkTreeListModel> only when the tree-list-model:passthrough property is not set.

There are various support objects that can make use of <GtkTreeListRow> objects, such as the <GtkTreeExpander> widget that allows displaying an icon to expand or collapse a row or <GtkTreeListRowSorter> that makes it possible to sort trees properly.

Properties

Property: tree-list-row:children self

The model holding the row’s children.

Its value is a <GListModel>, or #f.

It is read only.

Property: tree-list-row:depth self

The depth in the tree of this row.

Its value is an unsigned 32-bit integer.

It is read only.

Property: tree-list-row:expandable self

If this row can ever be expanded.

Its value is a boolean.

It is read only.

Property: tree-list-row:expanded self

If this row is currently expanded.

Its value is a boolean.

Set it with (set! (tree-list-row:expanded self) value).

Property: tree-list-row:item self

The item held in this row.

Its value is a <GObject>, or #f.

It is read only.

Procedures

Method: tree-list-row:get-child-row self position ⇒ %return
Method: get-child-row self position ⇒ %return

If self is not expanded or position is greater than the number of children, #f is returned.

self

Passed: a <GtkTreeListRow>.

a <GtkTreeListRow>

position

Passed: an unsigned 32-bit integer.

position of the child to get

%return

Returned: a <GtkTreeListRow>, or #f.

the child in position

Method: tree-list-row:get-children self ⇒ %return
Method: get-children self ⇒ %return

If the row is expanded, gets the model holding the children of self.

This model is the model created by the GtkTreeListModelCreateModelFunc and contains the original items, no matter what value tree-list-model:passthrough is set to.

self

Passed: a <GtkTreeListRow>.

a <GtkTreeListRow>

%return

Returned: a <GListModel>, or #f.

The model containing the children

Method: tree-list-row:get-depth self ⇒ %return
Method: get-depth self ⇒ %return

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.

self

Passed: a <GtkTreeListRow>.

a <GtkTreeListRow>

%return

Returned: an unsigned 32-bit integer.

The depth of this row

Method: tree-list-row:get-expanded? self ⇒ %return
Method: get-expanded? self ⇒ %return

Gets if a row is currently expanded.

self

Passed: a <GtkTreeListRow>.

a <GtkTreeListRow>

%return

Returned: a boolean.

#t if the row is expanded

Method: tree-list-row:get-item self ⇒ %return
Method: get-item self ⇒ %return

Gets the item corresponding to this row,

self

Passed: a <GtkTreeListRow>.

a <GtkTreeListRow>

%return

Returned: a <GObject>, or #f.

The item of this row. This function is only marked as nullable for backwards compatibility reasons.

Method: tree-list-row:get-parent self ⇒ %return
Method: get-parent self ⇒ %return

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, #f is returned.

The value returned by this function never changes until the row is removed from its model at which point it will forever return #f.

self

Passed: a <GtkTreeListRow>.

a <GtkTreeListRow>

%return

Returned: a <GtkTreeListRow>, or #f.

The parent of self

Method: tree-list-row:get-position self ⇒ %return
Method: get-position self ⇒ %return

Returns the position in the <GtkTreeListModel> that self occupies at the moment.

self

Passed: a <GtkTreeListRow>.

a <GtkTreeListRow>

%return

Returned: an unsigned 32-bit integer.

The position in the model

Method: tree-list-row:is-expandable? self ⇒ %return
Method: is-expandable? self ⇒ %return

Checks if a row can be expanded.

This does not mean that the row is actually expanded, this can be checked with tree-list-row:get-expanded?.

If a row is expandable never changes until the row is removed from its model at which point it will forever return #f.

self

Passed: a <GtkTreeListRow>.

a <GtkTreeListRow>

%return

Returned: a boolean.

#t if the row is expandable

Method: tree-list-row:set-expanded self expanded
Method: set-expanded self expanded

Expands or collapses a row.

If a row is expanded, the model of calling the GtkTreeListModelCreateModelFunc 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.

self

Passed: a <GtkTreeListRow>.

a <GtkTreeListRow>

expanded

Passed: a boolean.

#t if the row should be expanded