Gtk.TreeRowReference¶
Fields¶
None
Methods¶
class |
|
class |
|
class |
|
class |
|
|
|
|
|
|
|
|
|
|
Details¶
- class Gtk.TreeRowReference¶
A
Gtk.TreeRowReferencetracks model changes so that it always refers to the same row (aGtkTreePathrefers to a position, not a fixed row). Create a newGtk.TreeRowReferencewithGtk.TreeRowReference.new().Deprecated since version 4.10: Use [iface`Gio`.ListModel] instead
- classmethod deleted(proxy, path)[source]¶
- Parameters:
proxy (
GObject.Object) – aGObjectpath (
Gtk.TreePath) – the path position that was deleted
Lets a set of row reference created by
Gtk.TreeRowReference.new_proxy() know that the model emitted the::row-deletedsignal.Deprecated since version 4.10.
- classmethod inserted(proxy, path)[source]¶
- Parameters:
proxy (
GObject.Object) – aGObjectpath (
Gtk.TreePath) – the row position that was inserted
Lets a set of row reference created by
Gtk.TreeRowReference.new_proxy() know that the model emitted the::row-insertedsignal.Deprecated since version 4.10.
- classmethod new(model, path)[source]¶
- Parameters:
model (
Gtk.TreeModel) – aGtkTreeModelpath (
Gtk.TreePath) – a validGtkTreePathto monitor
- Returns:
a newly allocated
GtkTreeRowReference- Return type:
Creates a row reference based on path.
This reference will keep pointing to the node pointed to by path, so long as it exists. Any changes that occur on model are propagated, and the path is updated appropriately. If path isn’t a valid path in model, then
Noneis returned.Deprecated since version 4.10.
- classmethod new_proxy(proxy, model, path)[source]¶
- Parameters:
proxy (
GObject.Object) – a proxyGObjectmodel (
Gtk.TreeModel) – aGtkTreeModelpath (
Gtk.TreePath) – a validGtkTreePathto monitor
- Returns:
a newly allocated
GtkTreeRowReference- Return type:
You do not need to use this function.
Creates a row reference based on path.
This reference will keep pointing to the node pointed to by path, so long as it exists. If path isn’t a valid path in model, then
Noneis returned. However, unlike references created withGtk.TreeRowReference.new(), it does not listen to the model for changes. The creator of the row reference must do this explicitly usingGtk.TreeRowReference.inserted(),Gtk.TreeRowReference.deleted(), gtk_tree_row_reference_reordered().These functions must be called exactly once per proxy when the corresponding signal on the model is emitted. This single call updates all row references for that proxy. Since built-in GTK objects like
GtkTreeViewalready use this mechanism internally, using them as the proxy object will produce unpredictable results. Further more, passing the same object as model and proxy doesn’t work for reasons of internal implementation.This type of row reference is primarily meant by structures that need to carefully monitor exactly when a row reference updates itself, and is not generally needed by most applications.
Deprecated since version 4.10.
- copy()[source]¶
- Returns:
a copy of self
- Return type:
Copies a
GtkTreeRowReference.Deprecated since version 4.10.
- get_model()[source]¶
- Returns:
the model
- Return type:
Returns the model that the row reference is monitoring.
Deprecated since version 4.10.
- get_path()[source]¶
- Returns:
a current path
- Return type:
Gtk.TreePathorNone
Returns a path that the row reference currently points to, or
Noneif the path pointed to is no longer valid.Deprecated since version 4.10.