Gtk.TreeRowReference - Structures - Gtk 3.0 (original) (raw)
Fields¶
None
Methods¶
class | deleted (proxy, path) |
---|---|
class | inserted (proxy, path) |
class | new (model, path) |
class | new_proxy (proxy, model, path) |
copy () | |
free () | |
get_model () | |
get_path () | |
valid () |
Details¶
class Gtk.TreeRowReference¶
A Gtk.TreeRowReference tracks model changes so that it always refers to the same row (a Gtk.TreePath refers to a position, not a fixed row). Create a new Gtk.TreeRowReference with Gtk.TreeRowReference.new().
classmethod deleted(proxy, path)[source]¶
Parameters:
- proxy (GObject.Object) – a GObject.Object
- path (Gtk.TreePath) – the path position that was deleted
Lets a set of row reference created byGtk.TreeRowReference.new_proxy() know that the model emitted the Gtk.TreeModel ::row-deleted signal.
classmethod inserted(proxy, path)[source]¶
Parameters:
- proxy (GObject.Object) – a GObject.Object
- path (Gtk.TreePath) – the row position that was inserted
Lets a set of row reference created byGtk.TreeRowReference.new_proxy() know that the model emitted the Gtk.TreeModel ::row-inserted signal.
classmethod new(model, path)[source]¶
Parameters:
- model (Gtk.TreeModel) – a Gtk.TreeModel
- path (Gtk.TreePath) – a valid Gtk.TreePath-struct to monitor
Returns:
a newly allocated Gtk.TreeRowReference, or None
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. Ifpath isn’t a valid path in model, then None is returned.
classmethod new_proxy(proxy, model, path)[source]¶
Parameters:
- proxy (GObject.Object) – a proxy GObject.Object
- model (Gtk.TreeModel) – a Gtk.TreeModel
- path (Gtk.TreePath) – a valid Gtk.TreePath-struct to monitor
Returns:
a newly allocated Gtk.TreeRowReference, or None
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 None is returned. However, unlike references created with Gtk.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 Gtk.TreeView already use this mechanism internally, using them as the proxy object will produce unpredictable results. Further more, passing the same object as model and proxydoesn’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.
Returns:
a copy of self
Return type:
Copies a Gtk.TreeRowReference.
New in version 2.2.
Free’s self. self may be None
Returns:
the model
Return type:
Returns the model that the row reference is monitoring.
New in version 2.8.
Returns:
a current path, or None
Return type:
Gtk.TreePath or None
Returns a path that the row reference currently points to, or None if the path pointed to is no longer valid.
Returns:
True if self points to a valid path
Return type:
Returns True if the self is non-None and refers to a current valid path.