Table of Contents

Class SliceListModel

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

Constructors

SliceListModel(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 SliceListModel(params ConstructArgument[] constructArguments)

Parameters

constructArguments ConstructArgument[]

SliceListModel(CreationData)

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

Parameters

data CreationData

SliceListModel(SliceListModelHandle)

protected SliceListModel(SliceListModelHandle handle)

Parameters

handle SliceListModelHandle

Fields

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, SliceListModel> ModelPropertyDefinition

Field Value

Property<ListModel, SliceListModel>

NItemsPropertyDefinition

public static readonly Property<uint, SliceListModel> NItemsPropertyDefinition

Field Value

Property<uint, SliceListModel>

OffsetPropertyDefinition

public static readonly Property<uint, SliceListModel> OffsetPropertyDefinition

Field Value

Property<uint, SliceListModel>

SectionsChangedSignal

Signal Descriptor for OnSectionsChanged.

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

Field Value

Signal<SectionModel, SectionModel.SectionsChangedSignalArgs>

SizePropertyDefinition

public static readonly Property<uint, SliceListModel> SizePropertyDefinition

Field Value

Property<uint, SliceListModel>

Properties

Model

public ListModel Model { get; set; }

Property Value

ListModel

NItems

public uint NItems { get; }

Property Value

uint

Offset

public uint Offset { get; set; }

Property Value

uint

Size

public uint Size { get; set; }

Property Value

uint

Methods

GetGType()

public static Type GetGType()

Returns

Type

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

GetOffset()

public uint GetOffset()

Returns

uint

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

GetSize()

public uint GetSize()

Returns

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?, uint, uint)

public static SliceListModel New(ListModel? model, uint offset, uint size)

Parameters

model ListModel
offset uint
size uint

Returns

SliceListModel

NewFromPointer(nint, bool)

Creates a new managed SliceListModel instance for a given pointer.

public static SliceListModel NewFromPointer(nint ptr, bool ownsHandle)

Parameters

ptr nint
ownsHandle bool

Returns

SliceListModel

NewWithProperties(ConstructArgument[])

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

public static SliceListModel NewWithProperties(ConstructArgument[] constructArguments)

Parameters

constructArguments ConstructArgument[]

The properties to set.

Returns

SliceListModel

SectionsChanged(uint, uint)

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

Parameters

position uint
nItems uint

SetModel(ListModel?)

public void SetModel(ListModel? model)

Parameters

model ListModel

SetOffset(uint)

public void SetOffset(uint offset)

Parameters

offset uint

SetSize(uint)

public void SetSize(uint size)

Parameters

size uint

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>