pub struct TreeModelSort { /* private fields */ }
Expand description
Use SortListModel
instead
A GtkTreeModel which makes an underlying tree model sortable
The TreeModelSort
is a model which implements the TreeSortable
interface. It does not hold any data itself, but rather is created with
a child model and proxies its data. It has identical column types to
this child model, and the changes in the child are propagated. The
primary purpose of this model is to provide a way to sort a different
model without modifying it. Note that the sort function used by
TreeModelSort
is not guaranteed to be stable.
The use of this is best demonstrated through an example. In the
following sample code we create two TreeView
widgets each with a
view of the same data. As the model is wrapped here by a
TreeModelSort
, the two TreeView
s can each sort their
view of the data without affecting the other. By contrast, if we
simply put the same model in each widget, then sorting the first would
sort the second.
§Using a TreeModelSort
⚠️ The following code is in C ⚠️
{
GtkTreeView *tree_view1;
GtkTreeView *tree_view2;
GtkTreeModel *sort_model1;
GtkTreeModel *sort_model2;
GtkTreeModel *child_model;
// get the child model
child_model = get_my_model ();
// Create the first tree
sort_model1 = gtk_tree_model_sort_new_with_model (child_model);
tree_view1 = gtk_tree_view_new_with_model (sort_model1);
// Create the second tree
sort_model2 = gtk_tree_model_sort_new_with_model (child_model);
tree_view2 = gtk_tree_view_new_with_model (sort_model2);
// Now we can sort the two models independently
gtk_tree_sortable_set_sort_column_id (GTK_TREE_SORTABLE (sort_model1),
COLUMN_1, GTK_SORT_ASCENDING);
gtk_tree_sortable_set_sort_column_id (GTK_TREE_SORTABLE (sort_model2),
COLUMN_1, GTK_SORT_DESCENDING);
}
To demonstrate how to access the underlying child model from the sort
model, the next example will be a callback for the TreeSelection
GtkTreeSelection::changed
signal. In this callback, we get a string
from COLUMN_1 of the model. We then modify the string, find the same
selected row on the child model, and change the row there.
§Accessing the child model of in a selection changed callback
⚠️ The following code is in C ⚠️
void
selection_changed (GtkTreeSelection *selection, gpointer data)
{
GtkTreeModel *sort_model = NULL;
GtkTreeModel *child_model;
GtkTreeIter sort_iter;
GtkTreeIter child_iter;
char *some_data = NULL;
char *modified_data;
// Get the current selected row and the model.
if (! gtk_tree_selection_get_selected (selection,
&sort_model,
&sort_iter))
return;
// Look up the current value on the selected row and get
// a new value to change it to.
gtk_tree_model_get (GTK_TREE_MODEL (sort_model), &sort_iter,
COLUMN_1, &some_data,
-1);
modified_data = change_the_data (some_data);
g_free (some_data);
// Get an iterator on the child model, instead of the sort model.
gtk_tree_model_sort_convert_iter_to_child_iter (GTK_TREE_MODEL_SORT (sort_model),
&child_iter,
&sort_iter);
// Get the child model and change the value of the row. In this
// example, the child model is a GtkListStore. It could be any other
// type of model, though.
child_model = gtk_tree_model_sort_get_model (GTK_TREE_MODEL_SORT (sort_model));
gtk_list_store_set (GTK_LIST_STORE (child_model), &child_iter,
COLUMN_1, &modified_data,
-1);
g_free (modified_data);
}
§Properties
§model
The model of the tree model sort.
Readable | Writeable | Construct Only
§Implements
TreeModelSortExt
, [trait@glib::ObjectExt
], TreeDragSourceExt
, TreeModelExt
, TreeSortableExt
, TreeModelExtManual
, TreeSortableExtManual
GLib type: GObject with reference counted clone semantics.
Implementations§
Source§impl TreeModelSort
impl TreeModelSort
pub const NONE: Option<&'static TreeModelSort> = None
Sourcepub fn with_model(child_model: &impl IsA<TreeModel>) -> TreeModelSort
👎Deprecated: Since 4.10
pub fn with_model(child_model: &impl IsA<TreeModel>) -> TreeModelSort
Creates a new TreeModelSort
, with @child_model as the child model.
§child_model
§Returns
A new TreeModelSort
.
Trait Implementations§
Source§impl Clone for TreeModelSort
impl Clone for TreeModelSort
Source§impl Debug for TreeModelSort
impl Debug for TreeModelSort
Source§impl HasParamSpec for TreeModelSort
impl HasParamSpec for TreeModelSort
type ParamSpec = ParamSpecObject
Source§type SetValue = TreeModelSort
type SetValue = TreeModelSort
type BuilderFn = fn(_: &str) -> ParamSpecObjectBuilder<'_, TreeModelSort>
fn param_spec_builder() -> Self::BuilderFn
Source§impl Hash for TreeModelSort
impl Hash for TreeModelSort
Source§impl Ord for TreeModelSort
impl Ord for TreeModelSort
Source§fn cmp(&self, other: &Self) -> Ordering
fn cmp(&self, other: &Self) -> Ordering
Comparison for two GObjects.
Compares the memory addresses of the provided objects.
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl ParentClassIs for TreeModelSort
impl ParentClassIs for TreeModelSort
Source§impl<OT: ObjectType> PartialEq<OT> for TreeModelSort
impl<OT: ObjectType> PartialEq<OT> for TreeModelSort
Source§impl<OT: ObjectType> PartialOrd<OT> for TreeModelSort
impl<OT: ObjectType> PartialOrd<OT> for TreeModelSort
Source§impl StaticType for TreeModelSort
impl StaticType for TreeModelSort
Source§fn static_type() -> Type
fn static_type() -> Type
Self
.impl Eq for TreeModelSort
impl IsA<TreeDragSource> for TreeModelSort
impl IsA<TreeModel> for TreeModelSort
impl IsA<TreeSortable> for TreeModelSort
Auto Trait Implementations§
impl Freeze for TreeModelSort
impl RefUnwindSafe for TreeModelSort
impl !Send for TreeModelSort
impl !Sync for TreeModelSort
impl Unpin for TreeModelSort
impl UnwindSafe for TreeModelSort
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> Cast for Twhere
T: ObjectType,
impl<T> Cast for Twhere
T: ObjectType,
Source§fn upcast<T>(self) -> Twhere
T: ObjectType,
Self: IsA<T>,
fn upcast<T>(self) -> Twhere
T: ObjectType,
Self: IsA<T>,
T
. Read moreSource§fn upcast_ref<T>(&self) -> &Twhere
T: ObjectType,
Self: IsA<T>,
fn upcast_ref<T>(&self) -> &Twhere
T: ObjectType,
Self: IsA<T>,
T
. Read moreSource§fn downcast<T>(self) -> Result<T, Self>where
T: ObjectType,
Self: MayDowncastTo<T>,
fn downcast<T>(self) -> Result<T, Self>where
T: ObjectType,
Self: MayDowncastTo<T>,
T
. Read moreSource§fn downcast_ref<T>(&self) -> Option<&T>where
T: ObjectType,
Self: MayDowncastTo<T>,
fn downcast_ref<T>(&self) -> Option<&T>where
T: ObjectType,
Self: MayDowncastTo<T>,
T
. Read moreSource§fn dynamic_cast<T>(self) -> Result<T, Self>where
T: ObjectType,
fn dynamic_cast<T>(self) -> Result<T, Self>where
T: ObjectType,
T
. This handles upcasting, downcasting
and casting between interface and interface implementors. All checks are performed at
runtime, while upcast
will do many checks at compile-time already. downcast
will
perform the same checks at runtime as dynamic_cast
, but will also ensure some amount of
compile-time safety. Read moreSource§fn dynamic_cast_ref<T>(&self) -> Option<&T>where
T: ObjectType,
fn dynamic_cast_ref<T>(&self) -> Option<&T>where
T: ObjectType,
T
. This handles upcasting, downcasting
and casting between interface and interface implementors. All checks are performed at
runtime, while downcast
and upcast
will do many checks at compile-time already. Read moreSource§unsafe fn unsafe_cast<T>(self) -> Twhere
T: ObjectType,
unsafe fn unsafe_cast<T>(self) -> Twhere
T: ObjectType,
T
unconditionally. Read moreSource§unsafe fn unsafe_cast_ref<T>(&self) -> &Twhere
T: ObjectType,
unsafe fn unsafe_cast_ref<T>(&self) -> &Twhere
T: ObjectType,
&T
unconditionally. Read moreSource§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
)Source§impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
Source§impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GPtrArray> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GPtrArray> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
Source§impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GSList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GSList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
Source§impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
Source§impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GPtrArray> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GPtrArray> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
Source§impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GSList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GSList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
Source§impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
unsafe fn from_glib_none_as_vec(ptr: *const GList) -> Vec<T>
unsafe fn from_glib_container_as_vec(_: *const GList) -> Vec<T>
unsafe fn from_glib_full_as_vec(_: *const GList) -> Vec<T>
Source§impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GPtrArray> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GPtrArray> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
unsafe fn from_glib_none_as_vec(ptr: *const GPtrArray) -> Vec<T>
unsafe fn from_glib_container_as_vec(_: *const GPtrArray) -> Vec<T>
unsafe fn from_glib_full_as_vec(_: *const GPtrArray) -> Vec<T>
Source§impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GSList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GSList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
unsafe fn from_glib_none_as_vec(ptr: *const GSList) -> Vec<T>
unsafe fn from_glib_container_as_vec(_: *const GSList) -> Vec<T>
unsafe fn from_glib_full_as_vec(_: *const GSList) -> Vec<T>
Source§impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
unsafe fn from_glib_none_as_vec(ptr: *mut GList) -> Vec<T>
unsafe fn from_glib_container_as_vec(ptr: *mut GList) -> Vec<T>
unsafe fn from_glib_full_as_vec(ptr: *mut GList) -> Vec<T>
Source§impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GPtrArray> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GPtrArray> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
unsafe fn from_glib_none_as_vec(ptr: *mut GPtrArray) -> Vec<T>
unsafe fn from_glib_container_as_vec(ptr: *mut GPtrArray) -> Vec<T>
unsafe fn from_glib_full_as_vec(ptr: *mut GPtrArray) -> Vec<T>
Source§impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GSList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GSList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
unsafe fn from_glib_none_as_vec(ptr: *mut GSList) -> Vec<T>
unsafe fn from_glib_container_as_vec(ptr: *mut GSList) -> Vec<T>
unsafe fn from_glib_full_as_vec(ptr: *mut GSList) -> Vec<T>
Source§impl<O> GObjectPropertyExpressionExt for O
impl<O> GObjectPropertyExpressionExt for O
Source§fn property_expression(&self, property_name: &str) -> PropertyExpression
fn property_expression(&self, property_name: &str) -> PropertyExpression
Source§fn property_expression_weak(&self, property_name: &str) -> PropertyExpression
fn property_expression_weak(&self, property_name: &str) -> PropertyExpression
Source§fn this_expression(property_name: &str) -> PropertyExpression
fn this_expression(property_name: &str) -> PropertyExpression
this
object.Source§impl<T> IntoClosureReturnValue for T
impl<T> IntoClosureReturnValue for T
fn into_closure_return_value(self) -> Option<Value>
Source§impl<U> IsSubclassableExt for Uwhere
U: IsClass + ParentClassIs,
impl<U> IsSubclassableExt for Uwhere
U: IsClass + ParentClassIs,
fn parent_class_init<T>(class: &mut Class<U>)
fn parent_instance_init<T>(instance: &mut InitializingObject<T>)
Source§impl<T> ObjectExt for Twhere
T: ObjectType,
impl<T> ObjectExt for Twhere
T: ObjectType,
Source§fn is<U>(&self) -> boolwhere
U: StaticType,
fn is<U>(&self) -> boolwhere
U: StaticType,
true
if the object is an instance of (can be cast to) T
.Source§fn object_class(&self) -> &Class<Object>
fn object_class(&self) -> &Class<Object>
ObjectClass
of the object. Read moreSource§fn class_of<U>(&self) -> Option<&Class<U>>where
U: IsClass,
fn class_of<U>(&self) -> Option<&Class<U>>where
U: IsClass,
T
. Read moreSource§fn interface<U>(&self) -> Option<InterfaceRef<'_, U>>where
U: IsInterface,
fn interface<U>(&self) -> Option<InterfaceRef<'_, U>>where
U: IsInterface,
T
of the object. Read moreSource§fn set_property_from_value(&self, property_name: &str, value: &Value)
fn set_property_from_value(&self, property_name: &str, value: &Value)
Source§fn set_properties(&self, property_values: &[(&str, &dyn ToValue)])
fn set_properties(&self, property_values: &[(&str, &dyn ToValue)])
Source§fn set_properties_from_value(&self, property_values: &[(&str, Value)])
fn set_properties_from_value(&self, property_values: &[(&str, Value)])
Source§fn property<V>(&self, property_name: &str) -> Vwhere
V: for<'b> FromValue<'b> + 'static,
fn property<V>(&self, property_name: &str) -> Vwhere
V: for<'b> FromValue<'b> + 'static,
property_name
of the object and cast it to the type V. Read moreSource§fn property_value(&self, property_name: &str) -> Value
fn property_value(&self, property_name: &str) -> Value
property_name
of the object. Read moreSource§fn property_type(&self, property_name: &str) -> Option<Type>
fn property_type(&self, property_name: &str) -> Option<Type>
property_name
of this object. Read moreSource§fn find_property(&self, property_name: &str) -> Option<ParamSpec>
fn find_property(&self, property_name: &str) -> Option<ParamSpec>
ParamSpec
of the property property_name
of this object.Source§fn list_properties(&self) -> PtrSlice<ParamSpec>
fn list_properties(&self) -> PtrSlice<ParamSpec>
ParamSpec
of the properties of this object.Source§fn freeze_notify(&self) -> PropertyNotificationFreezeGuard
fn freeze_notify(&self) -> PropertyNotificationFreezeGuard
Source§unsafe fn set_qdata<QD>(&self, key: Quark, value: QD)where
QD: 'static,
unsafe fn set_qdata<QD>(&self, key: Quark, value: QD)where
QD: 'static,
key
. Read moreSource§unsafe fn qdata<QD>(&self, key: Quark) -> Option<NonNull<QD>>where
QD: 'static,
unsafe fn qdata<QD>(&self, key: Quark) -> Option<NonNull<QD>>where
QD: 'static,
key
. Read moreSource§unsafe fn steal_qdata<QD>(&self, key: Quark) -> Option<QD>where
QD: 'static,
unsafe fn steal_qdata<QD>(&self, key: Quark) -> Option<QD>where
QD: 'static,
key
. Read moreSource§unsafe fn set_data<QD>(&self, key: &str, value: QD)where
QD: 'static,
unsafe fn set_data<QD>(&self, key: &str, value: QD)where
QD: 'static,
key
. Read moreSource§unsafe fn data<QD>(&self, key: &str) -> Option<NonNull<QD>>where
QD: 'static,
unsafe fn data<QD>(&self, key: &str) -> Option<NonNull<QD>>where
QD: 'static,
key
. Read moreSource§unsafe fn steal_data<QD>(&self, key: &str) -> Option<QD>where
QD: 'static,
unsafe fn steal_data<QD>(&self, key: &str) -> Option<QD>where
QD: 'static,
key
. Read moreSource§fn block_signal(&self, handler_id: &SignalHandlerId)
fn block_signal(&self, handler_id: &SignalHandlerId)
Source§fn unblock_signal(&self, handler_id: &SignalHandlerId)
fn unblock_signal(&self, handler_id: &SignalHandlerId)
Source§fn stop_signal_emission(&self, signal_id: SignalId, detail: Option<Quark>)
fn stop_signal_emission(&self, signal_id: SignalId, detail: Option<Quark>)
Source§fn stop_signal_emission_by_name(&self, signal_name: &str)
fn stop_signal_emission_by_name(&self, signal_name: &str)
Source§fn connect<F>(
&self,
signal_name: &str,
after: bool,
callback: F,
) -> SignalHandlerId
fn connect<F>( &self, signal_name: &str, after: bool, callback: F, ) -> SignalHandlerId
signal_name
on this object. Read moreSource§fn connect_id<F>(
&self,
signal_id: SignalId,
details: Option<Quark>,
after: bool,
callback: F,
) -> SignalHandlerId
fn connect_id<F>( &self, signal_id: SignalId, details: Option<Quark>, after: bool, callback: F, ) -> SignalHandlerId
signal_id
on this object. Read moreSource§fn connect_local<F>(
&self,
signal_name: &str,
after: bool,
callback: F,
) -> SignalHandlerId
fn connect_local<F>( &self, signal_name: &str, after: bool, callback: F, ) -> SignalHandlerId
signal_name
on this object. Read moreSource§fn connect_local_id<F>(
&self,
signal_id: SignalId,
details: Option<Quark>,
after: bool,
callback: F,
) -> SignalHandlerId
fn connect_local_id<F>( &self, signal_id: SignalId, details: Option<Quark>, after: bool, callback: F, ) -> SignalHandlerId
signal_id
on this object. Read moreSource§unsafe fn connect_unsafe<F>(
&self,
signal_name: &str,
after: bool,
callback: F,
) -> SignalHandlerId
unsafe fn connect_unsafe<F>( &self, signal_name: &str, after: bool, callback: F, ) -> SignalHandlerId
signal_name
on this object. Read moreSource§unsafe fn connect_unsafe_id<F>(
&self,
signal_id: SignalId,
details: Option<Quark>,
after: bool,
callback: F,
) -> SignalHandlerId
unsafe fn connect_unsafe_id<F>( &self, signal_id: SignalId, details: Option<Quark>, after: bool, callback: F, ) -> SignalHandlerId
signal_id
on this object. Read moreSource§fn connect_closure(
&self,
signal_name: &str,
after: bool,
closure: RustClosure,
) -> SignalHandlerId
fn connect_closure( &self, signal_name: &str, after: bool, closure: RustClosure, ) -> SignalHandlerId
signal_name
on this object. Read moreSource§fn connect_closure_id(
&self,
signal_id: SignalId,
details: Option<Quark>,
after: bool,
closure: RustClosure,
) -> SignalHandlerId
fn connect_closure_id( &self, signal_id: SignalId, details: Option<Quark>, after: bool, closure: RustClosure, ) -> SignalHandlerId
signal_id
on this object. Read moreSource§fn watch_closure(&self, closure: &impl AsRef<Closure>)
fn watch_closure(&self, closure: &impl AsRef<Closure>)
closure
to the lifetime of the object. When
the object’s reference count drops to zero, the closure will be
invalidated. An invalidated closure will ignore any calls to
invoke_with_values
, or
invoke
when using Rust closures.Source§fn emit<R>(&self, signal_id: SignalId, args: &[&dyn ToValue]) -> Rwhere
R: TryFromClosureReturnValue,
fn emit<R>(&self, signal_id: SignalId, args: &[&dyn ToValue]) -> Rwhere
R: TryFromClosureReturnValue,
Source§fn emit_with_values(&self, signal_id: SignalId, args: &[Value]) -> Option<Value>
fn emit_with_values(&self, signal_id: SignalId, args: &[Value]) -> Option<Value>
Self::emit
but takes Value
for the arguments.Source§fn emit_by_name<R>(&self, signal_name: &str, args: &[&dyn ToValue]) -> Rwhere
R: TryFromClosureReturnValue,
fn emit_by_name<R>(&self, signal_name: &str, args: &[&dyn ToValue]) -> Rwhere
R: TryFromClosureReturnValue,
Source§fn emit_by_name_with_values(
&self,
signal_name: &str,
args: &[Value],
) -> Option<Value>
fn emit_by_name_with_values( &self, signal_name: &str, args: &[Value], ) -> Option<Value>
Source§fn emit_by_name_with_details<R>(
&self,
signal_name: &str,
details: Quark,
args: &[&dyn ToValue],
) -> Rwhere
R: TryFromClosureReturnValue,
fn emit_by_name_with_details<R>(
&self,
signal_name: &str,
details: Quark,
args: &[&dyn ToValue],
) -> Rwhere
R: TryFromClosureReturnValue,
Source§fn emit_by_name_with_details_and_values(
&self,
signal_name: &str,
details: Quark,
args: &[Value],
) -> Option<Value>
fn emit_by_name_with_details_and_values( &self, signal_name: &str, details: Quark, args: &[Value], ) -> Option<Value>
Source§fn emit_with_details<R>(
&self,
signal_id: SignalId,
details: Quark,
args: &[&dyn ToValue],
) -> Rwhere
R: TryFromClosureReturnValue,
fn emit_with_details<R>(
&self,
signal_id: SignalId,
details: Quark,
args: &[&dyn ToValue],
) -> Rwhere
R: TryFromClosureReturnValue,
Source§fn emit_with_details_and_values(
&self,
signal_id: SignalId,
details: Quark,
args: &[Value],
) -> Option<Value>
fn emit_with_details_and_values( &self, signal_id: SignalId, details: Quark, args: &[Value], ) -> Option<Value>
Source§fn disconnect(&self, handler_id: SignalHandlerId)
fn disconnect(&self, handler_id: SignalHandlerId)
Source§fn connect_notify<F>(&self, name: Option<&str>, f: F) -> SignalHandlerId
fn connect_notify<F>(&self, name: Option<&str>, f: F) -> SignalHandlerId
notify
signal of the object. Read moreSource§fn connect_notify_local<F>(&self, name: Option<&str>, f: F) -> SignalHandlerId
fn connect_notify_local<F>(&self, name: Option<&str>, f: F) -> SignalHandlerId
notify
signal of the object. Read moreSource§unsafe fn connect_notify_unsafe<F>(
&self,
name: Option<&str>,
f: F,
) -> SignalHandlerId
unsafe fn connect_notify_unsafe<F>( &self, name: Option<&str>, f: F, ) -> SignalHandlerId
notify
signal of the object. Read moreSource§fn notify(&self, property_name: &str)
fn notify(&self, property_name: &str)
Source§fn notify_by_pspec(&self, pspec: &ParamSpec)
fn notify_by_pspec(&self, pspec: &ParamSpec)
Source§fn add_weak_ref_notify<F>(&self, f: F) -> WeakRefNotify<T>
fn add_weak_ref_notify<F>(&self, f: F) -> WeakRefNotify<T>
Source§fn add_weak_ref_notify_local<F>(&self, f: F) -> WeakRefNotify<T>where
F: FnOnce() + 'static,
fn add_weak_ref_notify_local<F>(&self, f: F) -> WeakRefNotify<T>where
F: FnOnce() + 'static,
Source§fn bind_property<'a, 'f, 't, O>(
&'a self,
source_property: &'a str,
target: &'a O,
target_property: &'a str,
) -> BindingBuilder<'a, 'f, 't>where
O: ObjectType,
fn bind_property<'a, 'f, 't, O>(
&'a self,
source_property: &'a str,
target: &'a O,
target_property: &'a str,
) -> BindingBuilder<'a, 'f, 't>where
O: ObjectType,
Source§unsafe fn run_dispose(&self)
unsafe fn run_dispose(&self)
Source§impl<T> PropertyGet for Twhere
T: HasParamSpec,
impl<T> PropertyGet for Twhere
T: HasParamSpec,
Source§impl<T> StaticTypeExt for Twhere
T: StaticType,
impl<T> StaticTypeExt for Twhere
T: StaticType,
Source§fn ensure_type()
fn ensure_type()
Source§impl<T> TransparentType for Twhere
T: TransparentPtrType,
impl<T> TransparentType for Twhere
T: TransparentPtrType,
type GlibType = <T as GlibPtrDefault>::GlibType
Source§impl<O> TreeDragSourceExt for Owhere
O: IsA<TreeDragSource>,
impl<O> TreeDragSourceExt for Owhere
O: IsA<TreeDragSource>,
Source§fn drag_data_delete(&self, path: &TreePath) -> bool
fn drag_data_delete(&self, path: &TreePath) -> bool
TreeDragSource
to delete the row at @path, because
it was moved somewhere else via drag-and-drop. Returns false
if the deletion fails because @path no longer exists, or for
some model-specific reason. Should robustly handle a @path no
longer found in the model! Read moreSource§fn drag_data_get(&self, path: &TreePath) -> Option<ContentProvider>
fn drag_data_get(&self, path: &TreePath) -> Option<ContentProvider>
TreeDragSource
to return a gdk::ContentProvider
representing
the row at @path. Should robustly handle a @path no
longer found in the model! Read moreSource§fn row_draggable(&self, path: &TreePath) -> bool
fn row_draggable(&self, path: &TreePath) -> bool
TreeDragSource
whether a particular row can be used as
the source of a DND operation. If the source doesn’t implement
this interface, the row is assumed draggable. Read moreSource§impl<O> TreeModelExt for O
impl<O> TreeModelExt for O
Source§fn foreach<P: FnMut(&TreeModel, &TreePath, &TreeIter) -> bool>(&self, func: P)
fn foreach<P: FnMut(&TreeModel, &TreePath, &TreeIter) -> bool>(&self, func: P)
Source§fn column_type(&self, index_: i32) -> Type
fn column_type(&self, index_: i32) -> Type
Source§fn flags(&self) -> TreeModelFlags
fn flags(&self) -> TreeModelFlags
Source§fn iter(&self, path: &TreePath) -> Option<TreeIter>
fn iter(&self, path: &TreePath) -> Option<TreeIter>
Source§fn iter_first(&self) -> Option<TreeIter>
fn iter_first(&self) -> Option<TreeIter>
Source§fn iter_from_string(&self, path_string: &str) -> Option<TreeIter>
fn iter_from_string(&self, path_string: &str) -> Option<TreeIter>
Source§fn n_columns(&self) -> i32
fn n_columns(&self) -> i32
Source§fn string_from_iter(&self, iter: &TreeIter) -> Option<GString>
fn string_from_iter(&self, iter: &TreeIter) -> Option<GString>
Source§fn iter_children(&self, parent: Option<&TreeIter>) -> Option<TreeIter>
fn iter_children(&self, parent: Option<&TreeIter>) -> Option<TreeIter>
Source§fn iter_has_child(&self, iter: &TreeIter) -> bool
fn iter_has_child(&self, iter: &TreeIter) -> bool
Source§fn iter_n_children(&self, iter: Option<&TreeIter>) -> i32
fn iter_n_children(&self, iter: Option<&TreeIter>) -> i32
Source§fn iter_next(&self, iter: &TreeIter) -> bool
fn iter_next(&self, iter: &TreeIter) -> bool
Source§fn iter_nth_child(&self, parent: Option<&TreeIter>, n: i32) -> Option<TreeIter>
fn iter_nth_child(&self, parent: Option<&TreeIter>, n: i32) -> Option<TreeIter>
Source§fn iter_parent(&self, child: &TreeIter) -> Option<TreeIter>
fn iter_parent(&self, child: &TreeIter) -> Option<TreeIter>
Source§fn iter_previous(&self, iter: &TreeIter) -> bool
fn iter_previous(&self, iter: &TreeIter) -> bool
Source§fn row_changed(&self, path: &TreePath, iter: &TreeIter)
fn row_changed(&self, path: &TreePath, iter: &TreeIter)
Source§fn row_deleted(&self, path: &TreePath)
fn row_deleted(&self, path: &TreePath)
Source§fn row_has_child_toggled(&self, path: &TreePath, iter: &TreeIter)
fn row_has_child_toggled(&self, path: &TreePath, iter: &TreeIter)
Source§fn row_inserted(&self, path: &TreePath, iter: &TreeIter)
fn row_inserted(&self, path: &TreePath, iter: &TreeIter)
Source§fn connect_row_changed<F: Fn(&Self, &TreePath, &TreeIter) + 'static>(
&self,
f: F,
) -> SignalHandlerId
fn connect_row_changed<F: Fn(&Self, &TreePath, &TreeIter) + 'static>( &self, f: F, ) -> SignalHandlerId
Source§fn connect_row_deleted<F: Fn(&Self, &TreePath) + 'static>(
&self,
f: F,
) -> SignalHandlerId
fn connect_row_deleted<F: Fn(&Self, &TreePath) + 'static>( &self, f: F, ) -> SignalHandlerId
Source§fn connect_row_has_child_toggled<F: Fn(&Self, &TreePath, &TreeIter) + 'static>(
&self,
f: F,
) -> SignalHandlerId
fn connect_row_has_child_toggled<F: Fn(&Self, &TreePath, &TreeIter) + 'static>( &self, f: F, ) -> SignalHandlerId
Source§fn connect_row_inserted<F: Fn(&Self, &TreePath, &TreeIter) + 'static>(
&self,
f: F,
) -> SignalHandlerId
fn connect_row_inserted<F: Fn(&Self, &TreePath, &TreeIter) + 'static>( &self, f: F, ) -> SignalHandlerId
Source§impl<O> TreeModelExtManual for O
impl<O> TreeModelExtManual for O
Source§impl<O> TreeModelSortExt for Owhere
O: IsA<TreeModelSort>,
impl<O> TreeModelSortExt for Owhere
O: IsA<TreeModelSort>,
Source§fn clear_cache(&self)
fn clear_cache(&self)
Source§fn convert_child_iter_to_iter(&self, child_iter: &TreeIter) -> Option<TreeIter>
fn convert_child_iter_to_iter(&self, child_iter: &TreeIter) -> Option<TreeIter>
Source§fn convert_child_path_to_path(&self, child_path: &TreePath) -> Option<TreePath>
fn convert_child_path_to_path(&self, child_path: &TreePath) -> Option<TreePath>
Source§fn convert_iter_to_child_iter(&self, sorted_iter: &TreeIter) -> TreeIter
fn convert_iter_to_child_iter(&self, sorted_iter: &TreeIter) -> TreeIter
Source§fn convert_path_to_child_path(&self, sorted_path: &TreePath) -> Option<TreePath>
fn convert_path_to_child_path(&self, sorted_path: &TreePath) -> Option<TreePath>
Source§fn model(&self) -> TreeModel
fn model(&self) -> TreeModel
TreeModelSort
is sorting. Read moreSource§fn iter_is_valid(&self, iter: &TreeIter) -> bool
fn iter_is_valid(&self, iter: &TreeIter) -> bool
This function is slow. Only use it for debugging and/or testing purposes.Read more
Source§fn reset_default_sort_func(&self)
fn reset_default_sort_func(&self)
TreeModelSort
is in “unsorted” state. Read moreSource§impl<O> TreeSortableExt for Owhere
O: IsA<TreeSortable>,
impl<O> TreeSortableExt for Owhere
O: IsA<TreeSortable>,
Source§fn has_default_sort_func(&self) -> bool
fn has_default_sort_func(&self) -> bool
Source§fn sort_column_changed(&self)
fn sort_column_changed(&self)
GtkTreeSortable::sort-column-changed
signal on @self. Read moreSource§fn connect_sort_column_changed<F: Fn(&Self) + 'static>(
&self,
f: F,
) -> SignalHandlerId
fn connect_sort_column_changed<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId
Source§impl<O> TreeSortableExtManual for Owhere
O: IsA<TreeSortable>,
impl<O> TreeSortableExtManual for Owhere
O: IsA<TreeSortable>,
Source§fn set_default_sort_func<F>(&self, sort_func: F)
fn set_default_sort_func<F>(&self, sort_func: F)
GTK_TREE_SORTABLE_DEFAULT_SORT_COLUMN_ID
, then the model will sort using
this function. Read moreSource§fn set_sort_func<F>(&self, sort_column_id: SortColumn, sort_func: F)
fn set_sort_func<F>(&self, sort_column_id: SortColumn, sort_func: F)
Source§fn sort_column_id(&self) -> Option<(SortColumn, SortType)>
fn sort_column_id(&self) -> Option<(SortColumn, SortType)>
Source§fn set_sort_column_id(&self, sort_column_id: SortColumn, order: SortType)
fn set_sort_column_id(&self, sort_column_id: SortColumn, order: SortType)
GtkTreeSortable::sort-column-changed
signal. @sort_column_id may either be
a regular column id, or one of the following special values: Read more