GtkSelectionFilterModel

GtkSelectionFilterModel — A list model that turns a selection in a model

Properties

GtkSelectionModel * model Read / Write

Types and Values

Object Hierarchy

    GObject
    ╰── GtkSelectionFilterModel

Implemented Interfaces

GtkSelectionFilterModel implements GListModel.

Includes

#include <gtk/gtk.h>

Description

GtkSelectionFilterModel is a list model that presents the selected items in a GtkSelectionModel as its own list model.

Functions

gtk_selection_filter_model_new ()

GtkSelectionFilterModel *
gtk_selection_filter_model_new (GtkSelectionModel *model);

Creates a new GtkSelectionFilterModel that will include the selected items from the underlying selection model.

Parameters

model

the selection model to filter, or NULL.

[allow-none][transfer none]

Returns

a new GtkSelectionFilterModel

gtk_selection_filter_model_set_model ()

void
gtk_selection_filter_model_set_model (GtkSelectionFilterModel *self,
                                      GtkSelectionModel *model);

Sets the model to be filtered.

Note that GTK makes no effort to ensure that model conforms to the item type of self . It assumes that the caller knows what they are doing and have set up an appropriate filter to ensure that item types match.

Parameters

self

a GtkSelectionFilterModel

model

The model to be filtered.

[allow-none]

gtk_selection_filter_model_get_model ()

GtkSelectionModel *
gtk_selection_filter_model_get_model (GtkSelectionFilterModel *self);

Gets the model currently filtered or NULL if none.

Parameters

Returns

The model that gets filtered.

[nullable][transfer none]

Types and Values

GtkSelectionFilterModel

typedef struct _GtkSelectionFilterModel GtkSelectionFilterModel;

Property Details

The “model” property

  “model”                    GtkSelectionModel *

The model being filtered

Owner: GtkSelectionFilterModel

Flags: Read / Write

© 2005–2020 The GNOME Project
Licensed under the GNU Lesser General Public License version 2.1 or later.
https://developer.gnome.org/gtk4/4.0/GtkSelectionFilterModel.html