pub struct TreeRowReference { /* private fields */ }
Expand description
A GtkTreeRowReference tracks model changes so that it always refers to the
same row (a TreePath
refers to a position, not a fixed row). Create a
new GtkTreeRowReference with gtk_tree_row_reference_new().
§Deprecated since 4.10
Use gio::ListModel
instead
GLib type: Boxed type with copy-on-clone semantics.
Implementations§
Source§impl TreeRowReference
impl TreeRowReference
Sourcepub fn as_ptr(&self) -> *mut GtkTreeRowReference
pub fn as_ptr(&self) -> *mut GtkTreeRowReference
Return the inner pointer to the underlying C value.
Sourcepub unsafe fn from_glib_ptr_borrow(ptr: &*mut GtkTreeRowReference) -> &Self
pub unsafe fn from_glib_ptr_borrow(ptr: &*mut GtkTreeRowReference) -> &Self
Borrows the underlying C value.
Sourcepub unsafe fn from_glib_ptr_borrow_mut(
ptr: &mut *mut GtkTreeRowReference,
) -> &mut Self
pub unsafe fn from_glib_ptr_borrow_mut( ptr: &mut *mut GtkTreeRowReference, ) -> &mut Self
Borrows the underlying C value mutably.
Source§impl TreeRowReference
impl TreeRowReference
Sourcepub fn new(
model: &impl IsA<TreeModel>,
path: &TreePath,
) -> Option<TreeRowReference>
👎Deprecated: Since 4.10
pub fn new( model: &impl IsA<TreeModel>, path: &TreePath, ) -> Option<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 None
is returned.
§Deprecated since 4.10
§model
§path
a valid TreePath
to monitor
§Returns
a newly allocated TreeRowReference
Sourcepub fn new_proxy(
proxy: &impl IsA<Object>,
model: &impl IsA<TreeModel>,
path: &TreePath,
) -> Option<TreeRowReference>
👎Deprecated: Since 4.10
pub fn new_proxy( proxy: &impl IsA<Object>, model: &impl IsA<TreeModel>, path: &TreePath, ) -> Option<TreeRowReference>
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_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 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 @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 4.10
§proxy
a proxy GObject
§model
§path
a valid TreePath
to monitor
§Returns
a newly allocated TreeRowReference
Source§impl TreeRowReference
impl TreeRowReference
Sourcepub fn reordered(
&self,
proxy: &impl IsA<Object>,
path: &TreePath,
iter: &TreeIter,
new_order: &[i32],
)
👎Deprecated: Since 4.10
pub fn reordered( &self, proxy: &impl IsA<Object>, path: &TreePath, iter: &TreeIter, new_order: &[i32], )
Lets a set of row reference created by gtk_tree_row_reference_new_proxy() know that the model emitted the ::rows-reordered signal.
§Deprecated since 4.10
§proxy
a GObject
§path
the parent path of the reordered signal
§iter
the iter pointing to the parent of the reordered
§new_order
the new order of rows
Trait Implementations§
Source§impl Clone for TreeRowReference
impl Clone for TreeRowReference
Source§impl Debug for TreeRowReference
impl Debug for TreeRowReference
Source§impl From<TreeRowReference> for Value
impl From<TreeRowReference> for Value
Source§fn from(o: TreeRowReference) -> Self
fn from(o: TreeRowReference) -> Self
Source§impl HasParamSpec for TreeRowReference
impl HasParamSpec for TreeRowReference
type ParamSpec = ParamSpecBoxed
Source§type SetValue = TreeRowReference
type SetValue = TreeRowReference
type BuilderFn = fn(_: &str) -> ParamSpecBoxedBuilder<'_, TreeRowReference>
fn param_spec_builder() -> Self::BuilderFn
Source§impl Hash for TreeRowReference
impl Hash for TreeRowReference
Source§impl Ord for TreeRowReference
impl Ord for TreeRowReference
Source§fn cmp(&self, other: &TreeRowReference) -> Ordering
fn cmp(&self, other: &TreeRowReference) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for TreeRowReference
impl PartialEq for TreeRowReference
Source§impl PartialOrd for TreeRowReference
impl PartialOrd for TreeRowReference
Source§impl StaticType for TreeRowReference
impl StaticType for TreeRowReference
Source§fn static_type() -> Type
fn static_type() -> Type
Self
.impl Eq for TreeRowReference
impl StructuralPartialEq for TreeRowReference
Auto Trait Implementations§
impl Freeze for TreeRowReference
impl RefUnwindSafe for TreeRowReference
impl !Send for TreeRowReference
impl !Sync for TreeRowReference
impl Unpin for TreeRowReference
impl UnwindSafe for TreeRowReference
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)