Class ShortcutController
- Namespace
- Gtk
- Assembly
- Gtk-4.0.dll
public class ShortcutController : EventController, ListModel, Buildable, NativeObject, IDisposable, GTypeProvider, InstanceFactory
- Inheritance
-
ShortcutController
- Implements
- Inherited Members
Constructors
ShortcutController(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 ShortcutController(params ConstructArgument[] constructArguments)
Parameters
constructArgumentsConstructArgument[]
ShortcutController(CreationData)
[Obsolete("This constructor is a workaround to keep legacy APIs alive. Do not use it.")]
protected ShortcutController(CreationData data)
Parameters
dataCreationData
ShortcutController(ShortcutControllerHandle)
protected ShortcutController(ShortcutControllerHandle handle)
Parameters
handleShortcutControllerHandle
Fields
ItemsChangedSignal
Signal Descriptor for OnItemsChanged.
public static readonly Signal<ListModel, ListModel.ItemsChangedSignalArgs> ItemsChangedSignal
Field Value
MnemonicModifiersPropertyDefinition
public static readonly Property<ModifierType, ShortcutController> MnemonicModifiersPropertyDefinition
Field Value
NItemsPropertyDefinition
public static readonly Property<uint, ShortcutController> NItemsPropertyDefinition
Field Value
ScopePropertyDefinition
public static readonly Property<ShortcutScope, ShortcutController> ScopePropertyDefinition
Field Value
Properties
MnemonicModifiers
public ModifierType MnemonicModifiers { get; set; }
Property Value
NItems
public uint NItems { get; }
Property Value
Scope
public ShortcutScope Scope { get; set; }
Property Value
Methods
AddShortcut(Shortcut)
public void AddShortcut(Shortcut shortcut)
Parameters
shortcutShortcut
GetBuildableId()
public string? GetBuildableId()
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
GetMnemonicsModifiers()
public ModifierType GetMnemonicsModifiers()
Returns
GetNItems()
[Version("2.44")]
public uint GetNItems()
Returns
GetObject(uint)
[Version("2.44")]
public Object? GetObject(uint position)
Parameters
positionuint
Returns
GetScope()
public ShortcutScope GetScope()
Returns
ItemsChanged(uint, uint, uint)
[Version("2.44")]
public void ItemsChanged(uint position, uint removed, uint added)
Parameters
New()
public static ShortcutController New()
Returns
NewForModel(ListModel)
public static ShortcutController NewForModel(ListModel model)
Parameters
modelListModel
Returns
NewFromPointer(nint, bool)
Creates a new managed ShortcutController instance for a given pointer.
public static ShortcutController NewFromPointer(nint ptr, bool ownsHandle)
Parameters
Returns
NewWithProperties(ConstructArgument[])
Creates a new ShortcutController and sets the properties specified by the construct arguments.
public static ShortcutController NewWithProperties(ConstructArgument[] constructArguments)
Parameters
constructArgumentsConstructArgument[]The properties to set.
Returns
RemoveShortcut(Shortcut)
public void RemoveShortcut(Shortcut shortcut)
Parameters
shortcutShortcut
SetMnemonicsModifiers(ModifierType)
public void SetMnemonicsModifiers(ModifierType modifiers)
Parameters
modifiersModifierType
SetScope(ShortcutScope)
public void SetScope(ShortcutScope scope)
Parameters
scopeShortcutScope
Events
OnItemsChanged
public event SignalHandler<ListModel, ListModel.ItemsChangedSignalArgs> OnItemsChanged