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
constructArgumentsConstructArgument[]
MapListModel(CreationData)
[Obsolete("This constructor is a workaround to keep legacy APIs alive. Do not use it.")]
protected MapListModel(CreationData data)
Parameters
dataCreationData
MapListModel(MapListModelHandle)
protected MapListModel(MapListModelHandle handle)
Parameters
handleMapListModelHandle
Fields
HasMapPropertyDefinition
public static readonly Property<bool, MapListModel> HasMapPropertyDefinition
Field Value
ItemsChangedSignal
Signal Descriptor for OnItemsChanged.
public static readonly Signal<ListModel, ListModel.ItemsChangedSignalArgs> ItemsChangedSignal
Field Value
ModelPropertyDefinition
public static readonly Property<ListModel, MapListModel> ModelPropertyDefinition
Field Value
NItemsPropertyDefinition
public static readonly Property<uint, MapListModel> NItemsPropertyDefinition
Field Value
SectionsChangedSignal
Signal Descriptor for OnSectionsChanged.
public static readonly Signal<SectionModel, SectionModel.SectionsChangedSignalArgs> SectionsChangedSignal
Field Value
Properties
HasMap
public bool HasMap { get; }
Property Value
Model
public ListModel Model { get; set; }
Property Value
NItems
public uint NItems { get; }
Property Value
Methods
GetGType()
public static Type GetGType()
Returns
GetHasMap()
public bool GetHasMap()
Returns
GetItem(uint)
[Version("2.44")]
public nint GetItem(uint position)
Parameters
positionuint
Returns
GetItemType()
[Version("2.44")]
public Type GetItemType()
Returns
GetModel()
public ListModel? GetModel()
Returns
GetNItems()
[Version("2.44")]
public uint GetNItems()
Returns
GetObject(uint)
[Version("2.44")]
public Object? GetObject(uint position)
Parameters
positionuint
Returns
GetSection(uint, out uint, out uint)
[Version("4.12")]
public void GetSection(uint position, out uint outStart, out uint outEnd)
Parameters
ItemsChanged(uint, uint, uint)
[Version("2.44")]
public void ItemsChanged(uint position, uint removed, uint added)
Parameters
New(ListModel?, MapListModelMapFunc?)
public static MapListModel New(ListModel? model, MapListModelMapFunc? mapFunc)
Parameters
modelListModelmapFuncMapListModelMapFuncA callback. If it raises an exception the application will terminate. To receive this unhandled exception see SetHandler(Action<Exception>?).
Returns
NewFromPointer(nint, bool)
Creates a new managed MapListModel instance for a given pointer.
public static MapListModel NewFromPointer(nint ptr, bool ownsHandle)
Parameters
Returns
NewWithProperties(ConstructArgument[])
Creates a new MapListModel and sets the properties specified by the construct arguments.
public static MapListModel NewWithProperties(ConstructArgument[] constructArguments)
Parameters
constructArgumentsConstructArgument[]The properties to set.
Returns
SectionsChanged(uint, uint)
[Version("4.12")]
public void SectionsChanged(uint position, uint nItems)
Parameters
SetMapFunc(MapListModelMapFunc?)
public void SetMapFunc(MapListModelMapFunc? mapFunc)
Parameters
mapFuncMapListModelMapFuncA 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
modelListModel
Events
OnItemsChanged
public event SignalHandler<ListModel, ListModel.ItemsChangedSignalArgs> OnItemsChanged
Event Type
OnSectionsChanged
public event SignalHandler<SectionModel, SectionModel.SectionsChangedSignalArgs> OnSectionsChanged