Package ch.bailu.gtk.gtk
Class TreeRowReference
java.lang.Object
ch.bailu.gtk.type.Type
ch.bailu.gtk.type.Pointer
ch.bailu.gtk.type.Record
ch.bailu.gtk.gtk.TreeRowReference
- All Implemented Interfaces:
PointerInterface
A GtkTreeRowReference tracks model changes so that it always refers to the
same row (a `GtkTreePath` refers to a position, not a fixed row). Create a
new GtkTreeRowReference with gtk_tree_row_reference_new().
same row (a `GtkTreePath` refers to a position, not a fixed row). Create a
new GtkTreeRowReference with gtk_tree_row_reference_new().
-
Field Summary
-
Constructor Summary
ConstructorsConstructorDescriptionTreeRowReference(TreeModel model, TreePath path) Creates a row reference based on @path.TreeRowReference(PointerContainer pointer) -
Method Summary
Modifier and TypeMethodDescriptioncopy()Copies a `GtkTreeRowReference`.static voidLets a set of row reference created by
gtk_tree_row_reference_new_proxy() know that the
model emitted the ::row-deleted signal.voidfree()Free’s @reference.static ClassHandlerstatic intgetModel()Returns the model that the row reference is monitoring.static longstatic TypeSystem.TypeSizegetPath()Returns a path that the row reference currently points to,
or %NULL if the path pointed to is no longer valid.static longstatic TypeSystem.TypeSizestatic voidLets a set of row reference created by
gtk_tree_row_reference_new_proxy() know that the
model emitted the ::row-inserted signal.static TreeRowReferencenewProxyTreeRowReference(Object proxy, TreeModel model, TreePath path) You do not need to use this function.static voidLets a set of row reference created by
gtk_tree_row_reference_new_proxy() know that the
model emitted the ::rows-reordered signal.booleanvalid()Returns %TRUE if the @reference is non-%NULL and refers to
a current valid path.Methods inherited from class ch.bailu.gtk.type.Pointer
asCPointer, cast, connectSignal, disconnectSignals, disconnectSignals, equals, hashCode, throwIfNull, throwNullPointerException, toString, unregisterCallbacks, unregisterCallbacksMethods inherited from class ch.bailu.gtk.type.Type
asCPointer, asCPointer, asCPointerNotNull, asJnaPointer, asJnaPointer, asPointer, asPointer, cast, cast, throwIfNullMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface ch.bailu.gtk.type.PointerInterface
asCPointerNotNull, asJnaPointer, asPointer, isNotNull, isNull
-
Constructor Details
-
TreeRowReference
-
TreeRowReference
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 %NULL is returned.- Parameters:
model- a `GtkTreeModel`path- a valid `GtkTreePath` to monitor
-
-
Method Details
-
getClassHandler
-
newProxyTreeRowReference
public static TreeRowReference newProxyTreeRowReference(@Nonnull Object proxy, @Nonnull TreeModel model, @Nonnull TreePath path) 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 %NULL is returned. However, unlike
references created with gtk_tree_row_reference_new(), it
does not listen to the model for changes. The creator of
the row reference must do this explicitly using
gtk_tree_row_reference_inserted(), gtk_tree_row_reference_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 `GtkTreeView` already 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.- Parameters:
proxy- a proxy `GObject`model- a `GtkTreeModel`path- a valid `GtkTreePath` to monitor- Returns:
- a newly allocated `GtkTreeRowReference`
-
copy
Copies a `GtkTreeRowReference`.- Returns:
- a copy of @reference
-
free
public void free()Free’s @reference. @reference may be %NULL -
getModel
Returns the model that the row reference is monitoring.- Returns:
- the model
-
getPath
Returns a path that the row reference currently points to,
or %NULL if the path pointed to is no longer valid.- Returns:
- a current path
-
valid
public boolean valid()Returns %TRUE if the @reference is non-%NULL and refers to
a current valid path.- Returns:
- %TRUE if @reference points to a valid path
-
deleted
Lets a set of row reference created by
gtk_tree_row_reference_new_proxy() know that the
model emitted the ::row-deleted signal.- Parameters:
proxy- a `GObject`path- the path position that was deleted
-
inserted
Lets a set of row reference created by
gtk_tree_row_reference_new_proxy() know that the
model emitted the ::row-inserted signal.- Parameters:
proxy- a `GObject`path- the row position that was inserted
-
reordered
public static void reordered(@Nonnull Object proxy, @Nonnull TreePath path, @Nonnull TreeIter iter, @Nonnull Int new_order) Lets a set of row reference created by
gtk_tree_row_reference_new_proxy() know that the
model emitted the ::rows-reordered signal.- Parameters:
proxy- a `GObject`path- the parent path of the reordered signaliter- the iter pointing to the parent of the reorderednew_order- the new order of rows
-
getTypeID
public static long getTypeID() -
getParentTypeID
public static long getParentTypeID() -
getTypeSize
-
getParentTypeSize
-
getInstanceSize
public static int getInstanceSize()
-