Table of Contents

Class MapListModel

Namespace
Gtk
Assembly
Gtk-4.0.dll
public class MapListModel : Object, ListModel, SectionModel, NativeObject, IDisposable, GTypeProvider, InstanceFactory
Inheritance
MapListModel
Implements
Inherited Members

Constructors

MapListModel(params ConstructArgument[])

[Obsolete("Regular C# constructors on native classes will be removed in a future version. Please see the linked documentation for more details. It contains scenarios and possible solutions to prepare for the upcoming changes.", DiagnosticId = "GirCore1007", UrlFormat = "https://gircore.github.io/docs/integration/diagnostic/1007.html")]
public MapListModel(params ConstructArgument[] constructArguments)

Parameters

constructArguments ConstructArgument[]

MapListModel(CreationData)

[Obsolete("This constructor is a workaround to keep legacy APIs alive. Do not use it.")]
protected MapListModel(CreationData data)

Parameters

data CreationData

MapListModel(MapListModelHandle)

protected MapListModel(MapListModelHandle handle)

Parameters

handle MapListModelHandle

Fields

HasMapPropertyDefinition

public static readonly Property<bool, MapListModel> HasMapPropertyDefinition

Field Value

Property<bool, MapListModel>

ItemsChangedSignal

Signal Descriptor for OnItemsChanged.

public static readonly Signal<ListModel, ListModel.ItemsChangedSignalArgs> ItemsChangedSignal

Field Value

Signal<ListModel, ListModel.ItemsChangedSignalArgs>

ModelPropertyDefinition

public static readonly Property<ListModel, MapListModel> ModelPropertyDefinition

Field Value

Property<ListModel, MapListModel>

NItemsPropertyDefinition

public static readonly Property<uint, MapListModel> NItemsPropertyDefinition

Field Value

Property<uint, MapListModel>

SectionsChangedSignal

Signal Descriptor for OnSectionsChanged.

public static readonly Signal<SectionModel, SectionModel.SectionsChangedSignalArgs> SectionsChangedSignal

Field Value

Signal<SectionModel, SectionModel.SectionsChangedSignalArgs>

Properties

HasMap

public bool HasMap { get; }

Property Value

bool

Model

public ListModel Model { get; set; }

Property Value

ListModel

NItems

public uint NItems { get; }

Property Value

uint

Methods

GetGType()

public static Type GetGType()

Returns

Type

GetHasMap()

public bool GetHasMap()

Returns

bool

GetItem(uint)

[Version("2.44")]
public nint GetItem(uint position)

Parameters

position uint

Returns

nint

GetItemType()

[Version("2.44")]
public Type GetItemType()

Returns

Type

GetModel()

public ListModel? GetModel()

Returns

ListModel

GetNItems()

[Version("2.44")]
public uint GetNItems()

Returns

uint

GetObject(uint)

[Version("2.44")]
public Object? GetObject(uint position)

Parameters

position uint

Returns

Object

GetSection(uint, out uint, out uint)

[Version("4.12")]
public void GetSection(uint position, out uint outStart, out uint outEnd)

Parameters

position uint
outStart uint
outEnd uint

ItemsChanged(uint, uint, uint)

[Version("2.44")]
public void ItemsChanged(uint position, uint removed, uint added)

Parameters

position uint
removed uint
added uint

New(ListModel?, MapListModelMapFunc?)

public static MapListModel New(ListModel? model, MapListModelMapFunc? mapFunc)

Parameters

model ListModel
mapFunc MapListModelMapFunc

A callback. If it raises an exception the application will terminate. To receive this unhandled exception see SetHandler(Action<Exception>?).

Returns

MapListModel

NewFromPointer(nint, bool)

Creates a new managed MapListModel instance for a given pointer.

public static MapListModel NewFromPointer(nint ptr, bool ownsHandle)

Parameters

ptr nint
ownsHandle bool

Returns

MapListModel

NewWithProperties(ConstructArgument[])

Creates a new MapListModel and sets the properties specified by the construct arguments.

public static MapListModel NewWithProperties(ConstructArgument[] constructArguments)

Parameters

constructArguments ConstructArgument[]

The properties to set.

Returns

MapListModel

SectionsChanged(uint, uint)

[Version("4.12")]
public void SectionsChanged(uint position, uint nItems)

Parameters

position uint
nItems uint

SetMapFunc(MapListModelMapFunc?)

public void SetMapFunc(MapListModelMapFunc? mapFunc)

Parameters

mapFunc MapListModelMapFunc

A callback. If it raises an exception the application will terminate. To receive this unhandled exception see SetHandler(Action<Exception>?).

SetModel(ListModel?)

public void SetModel(ListModel? model)

Parameters

model ListModel

Events

OnItemsChanged

public event SignalHandler<ListModel, ListModel.ItemsChangedSignalArgs> OnItemsChanged

Event Type

SignalHandler<ListModel, ListModel.ItemsChangedSignalArgs>

OnSectionsChanged

public event SignalHandler<SectionModel, SectionModel.SectionsChangedSignalArgs> OnSectionsChanged

Event Type

SignalHandler<SectionModel, SectionModel.SectionsChangedSignalArgs>