Class InputBindings<TEvent, TBinding> | Terminal.Gui v2 (original) (raw)
Namespace
Assembly
Terminal.Gui.dll
public abstract class InputBindings<TEvent, TBinding> where TEvent : notnull where TBinding : IInputBinding, new()
Type Parameters
TEvent
The type of the event (e.g. Key or MouseFlags).
TBinding
The binding type (e.g. KeyBinding).
Inheritance
InputBindings<TEvent, TBinding>
Derived
Inherited Members
Constructors
InputBindings(Func<Command[], TEvent, TBinding>, IEqualityComparer)
Initializes a new instance.
Methods
Adds a new TEvent
that will trigger the commands in commands
.
If the TEvent
is already bound to a different set of Commands it will be reboundcommands
.
Adds a TEvent
bound to TBinding
to the collection.
Removes all TEvent
objects from the collection.
Removes all bindings that trigger the given command set. Views can have multiple different TEvent
bound to the same command sets and this method will clear all of them.
Gets the TBinding
for the specified TEvent
.
GetAllFromCommands(params Command[])
Gets all TEvent
bound to the set of commands specified by commands
.
Gets the bindings.
Gets the array of Commands bound to eventArgs
if it exists.
GetFirstFromCommands(params Command[])
Gets the first matching TEvent
bound to the set of commands specified bycommands
.
Tests whether eventArgs
is valid or not.
Removes a TEvent
from the collection.
Replaces a TEvent
combination already bound to a set of Commands.
ReplaceCommands(TEvent, params Command[])
Replaces the commands already bound to a combination of TEvent
.
Gets the commands bound with the specified TEvent
.