Class SingleSelection
- Namespace
- Gtk
- Assembly
- Gtk-4.0.dll
public class SingleSelection : Object, ListModel, SectionModel, SelectionModel, NativeObject, IDisposable, GTypeProvider, InstanceFactory
- Inheritance
-
SingleSelection
- Implements
- Inherited Members
Constructors
SingleSelection(params ConstructArgument[])
public SingleSelection(params ConstructArgument[] constructArguments)
Parameters
constructArgumentsConstructArgument[]
SingleSelection(SingleSelectionHandle)
public SingleSelection(SingleSelectionHandle handle)
Parameters
handleSingleSelectionHandle
Fields
AutoselectPropertyDefinition
public static readonly Property<bool, SingleSelection> AutoselectPropertyDefinition
Field Value
CanUnselectPropertyDefinition
public static readonly Property<bool, SingleSelection> CanUnselectPropertyDefinition
Field Value
ItemsChangedSignal
Signal Descriptor for OnItemsChanged.
public static readonly Signal<ListModel, ListModel.ItemsChangedSignalArgs> ItemsChangedSignal
Field Value
ModelPropertyDefinition
public static readonly Property<ListModel, SingleSelection> ModelPropertyDefinition
Field Value
NItemsPropertyDefinition
public static readonly Property<uint, SingleSelection> NItemsPropertyDefinition
Field Value
SectionsChangedSignal
Signal Descriptor for OnSectionsChanged.
public static readonly Signal<SectionModel, SectionModel.SectionsChangedSignalArgs> SectionsChangedSignal
Field Value
SelectedItemPropertyDefinition
public static readonly Property<Object?, SingleSelection> SelectedItemPropertyDefinition
Field Value
SelectedPropertyDefinition
public static readonly Property<uint, SingleSelection> SelectedPropertyDefinition
Field Value
SelectionChangedSignal
Signal Descriptor for OnSelectionChanged.
public static readonly Signal<SelectionModel, SelectionModel.SelectionChangedSignalArgs> SelectionChangedSignal
Field Value
Properties
Autoselect
public bool Autoselect { get; set; }
Property Value
CanUnselect
public bool CanUnselect { get; set; }
Property Value
Model
public ListModel Model { get; set; }
Property Value
NItems
public uint NItems { get; }
Property Value
Selected
public uint Selected { get; set; }
Property Value
SelectedItem
public Object? SelectedItem { get; }
Property Value
Methods
GetAutoselect()
public bool GetAutoselect()
Returns
GetCanUnselect()
public bool GetCanUnselect()
Returns
GetGType()
public static Type GetGType()
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
GetSelected()
public uint GetSelected()
Returns
GetSelectedItem()
public Object? GetSelectedItem()
Returns
GetSelection()
public Bitset GetSelection()
Returns
GetSelectionInRange(uint, uint)
public Bitset GetSelectionInRange(uint position, uint nItems)
Parameters
Returns
IsSelected(uint)
public bool IsSelected(uint position)
Parameters
positionuint
Returns
ItemsChanged(uint, uint, uint)
[Version("2.44")]
public void ItemsChanged(uint position, uint removed, uint added)
Parameters
New(ListModel?)
public static SingleSelection New(ListModel? model)
Parameters
modelListModel
Returns
SectionsChanged(uint, uint)
[Version("4.12")]
public void SectionsChanged(uint position, uint nItems)
Parameters
SelectAll()
public bool SelectAll()
Returns
SelectItem(uint, bool)
public bool SelectItem(uint position, bool unselectRest)
Parameters
Returns
SelectRange(uint, uint, bool)
public bool SelectRange(uint position, uint nItems, bool unselectRest)
Parameters
Returns
SelectionChanged(uint, uint)
public void SelectionChanged(uint position, uint nItems)
Parameters
SetAutoselect(bool)
public void SetAutoselect(bool autoselect)
Parameters
autoselectbool
SetCanUnselect(bool)
public void SetCanUnselect(bool canUnselect)
Parameters
canUnselectbool
SetModel(ListModel?)
public void SetModel(ListModel? model)
Parameters
modelListModel
SetSelected(uint)
public void SetSelected(uint position)
Parameters
positionuint
SetSelection(Bitset, Bitset)
public bool SetSelection(Bitset selected, Bitset mask)
Parameters
Returns
UnselectAll()
public bool UnselectAll()
Returns
UnselectItem(uint)
public bool UnselectItem(uint position)
Parameters
positionuint
Returns
UnselectRange(uint, uint)
public bool UnselectRange(uint position, uint nItems)
Parameters
Returns
Events
OnItemsChanged
public event SignalHandler<ListModel, ListModel.ItemsChangedSignalArgs> OnItemsChanged
Event Type
OnSectionsChanged
public event SignalHandler<SectionModel, SectionModel.SectionsChangedSignalArgs> OnSectionsChanged
Event Type
OnSelectionChanged
public event SignalHandler<SelectionModel, SelectionModel.SelectionChangedSignalArgs> OnSelectionChanged