Struct gtk::TreeRowReference
source · [−]#[repr(transparent)]pub struct TreeRowReference { /* private fields */ }
Expand description
Implementations
sourceimpl TreeRowReference
impl TreeRowReference
sourcepub fn new(
model: &impl IsA<TreeModel>,
path: &TreePath
) -> Option<TreeRowReference>
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.
model
path
a valid TreePath
-struct to monitor
Returns
a newly allocated TreeRowReference
, or None
sourcepub fn new_proxy(
proxy: &impl IsA<Object>,
model: &impl IsA<TreeModel>,
path: &TreePath
) -> Option<TreeRowReference>
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 new()
, it
does not listen to the model for changes. The creator of
the row reference must do this explicitly using
inserted()
, 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.
proxy
a proxy glib::Object
model
path
a valid TreePath
-struct to monitor
Returns
a newly allocated TreeRowReference
, or None
sourcepub fn deleted(proxy: &impl IsA<Object>, path: &TreePath)
pub fn deleted(proxy: &impl IsA<Object>, path: &TreePath)
Lets a set of row reference created by
new_proxy()
know that the
model emitted the signal::TreeModel::row-deleted
signal.
proxy
path
the path position that was deleted
sourceimpl TreeRowReference
impl TreeRowReference
sourcepub unsafe fn reordered<T: IsA<Object>>(
proxy: &T,
path: &TreePath,
iter: Option<&TreeIter>,
new_order: &[u32]
)
pub unsafe fn reordered<T: IsA<Object>>(
proxy: &T,
path: &TreePath,
iter: Option<&TreeIter>,
new_order: &[u32]
)
This is unsafe because new_order bounds can’t be checked.
Lets a set of row reference created by
new_proxy()
know that the
model emitted the signal::TreeModel::rows-reordered
signal.
proxy
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
sourceimpl Clone for TreeRowReference
impl Clone for TreeRowReference
sourceimpl Debug for TreeRowReference
impl Debug for TreeRowReference
sourceimpl Hash for TreeRowReference
impl Hash for TreeRowReference
sourceimpl Ord for TreeRowReference
impl Ord for TreeRowReference
sourceimpl PartialEq<TreeRowReference> for TreeRowReference
impl PartialEq<TreeRowReference> for TreeRowReference
sourcefn eq(&self, other: &TreeRowReference) -> bool
fn eq(&self, other: &TreeRowReference) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &TreeRowReference) -> bool
fn ne(&self, other: &TreeRowReference) -> bool
This method tests for !=
.
sourceimpl PartialOrd<TreeRowReference> for TreeRowReference
impl PartialOrd<TreeRowReference> for TreeRowReference
sourcefn partial_cmp(&self, other: &TreeRowReference) -> Option<Ordering>
fn partial_cmp(&self, other: &TreeRowReference) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
sourceimpl StaticType for TreeRowReference
impl StaticType for TreeRowReference
sourcefn static_type() -> Type
fn static_type() -> Type
Returns the type identifier of Self
.
impl Eq for TreeRowReference
impl StructuralEq for TreeRowReference
impl StructuralPartialEq for TreeRowReference
Auto Trait Implementations
impl RefUnwindSafe for TreeRowReference
impl !Send for TreeRowReference
impl !Sync for TreeRowReference
impl Unpin for TreeRowReference
impl UnwindSafe for TreeRowReference
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> StaticTypeExt for T where
T: StaticType,
impl<T> StaticTypeExt for T where
T: StaticType,
sourcefn ensure_type()
fn ensure_type()
Ensures that the type has been registered with the type system.
sourceimpl<T> ToClosureReturnValue for T where
T: ToValue,
impl<T> ToClosureReturnValue for T where
T: ToValue,
fn to_closure_return_value(&self) -> Option<Value>
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more