Volume Control
Application-specific hotkeys for Windows
|
Manages a list of Hotkey instances. More...
Public Member Functions | |
HotkeyManager (HotkeyActionManager actionManager) | |
Creates a new HotkeyManager instance from the specified actionManager . More... | |
HotkeyManager () | |
Creates a new HotkeyManager instance with a new Actions.HotkeyActionManager instance. More... | |
Hotkey? | GetHotkey (ushort id) |
Gets the Hotkey with the specified id . More... | |
void | AddHotkey (Hotkey hotkey) |
Adds the specified hotkey to the manager. More... | |
bool | RemoveHotkey (Hotkey hotkey) |
Removes the specified hotkey from the manager. More... | |
bool | RemoveHotkey (ushort id) |
Removes the hotkey with the specified id from the manager. More... | |
void | ClearHotkeys () |
Removes all hotkeys from the manager. More... | |
virtual JsonHotkey[] | GetJsonHotkeys () |
Gets a list of JsonHotkey instances for the list of managed hotkeys. More... | |
void | AddJsonHotkeys< THotkey > (params JsonHotkey[] hotkeyJsonObjects) |
Creates and adds a Hotkey for each element of the specified hotkeyJsonObjects . More... | |
void | SetHotkeysFromJsonHotkeys< THotkey > (JsonHotkey[] hotkeyJsonObjects) |
Sets the list of managed hotkeys from the specified hotkeyJsonObjects . More... | |
virtual void | SetHotkeysFromJsonHotkeys (JsonHotkey[] hotkeyJsonObjects) |
Properties | |
HotkeyActionManager | HotkeyActionManager [get] |
Gets the action manager instance for this HotkeyManager. More... | |
IReadOnlyList< Hotkey > | Hotkeys [get] |
Gets the hotkey instances that are being managed by this HotkeyManager. More... | |
IReadOnlyList< HotkeyMessageHookAbstractor > | HookAbstractors [get] |
Gets the list of HotkeyMessageHookAbstractor instances that are currently active. More... | |
Events | |
EventHandler< Hotkey >? | AddedHotkey |
Occurs when a hotkey is added to the list for any reason. More... | |
EventHandler< Hotkey >? | RemovedHotkey |
Occurs when a hotkey is removed from the list for any reason. More... | |
Manages a list of Hotkey instances.
VolumeControl.Core.Input.HotkeyManager.HotkeyManager | ( | HotkeyActionManager | actionManager | ) |
Creates a new HotkeyManager instance from the specified actionManager .
actionManager | A HotkeyActionManager instance to use for managing hotkey actions. |
VolumeControl.Core.Input.HotkeyManager.HotkeyManager | ( | ) |
Creates a new HotkeyManager instance with a new Actions.HotkeyActionManager instance.
void VolumeControl.Core.Input.HotkeyManager.AddHotkey | ( | Hotkey | hotkey | ) |
Adds the specified hotkey to the manager.
hotkey | A Hotkey instance to add to the list of managed hotkeys. |
ArgumentException | The hotkey is already being managed by this HotkeyManager. |
References VolumeControl.Core.Input.HotkeyManager.Hotkeys, and VolumeControl.Core.Input.Hotkey.Registering.
Referenced by VolumeControl.Core.Input.HotkeyManager.AddJsonHotkeys< THotkey >().
void VolumeControl.Core.Input.HotkeyManager.AddJsonHotkeys< THotkey > | ( | params JsonHotkey[] | hotkeyJsonObjects | ) |
Creates and adds a Hotkey for each element of the specified hotkeyJsonObjects .
THotkey | A type derived from Hotkey to create. Specifying this allows you to substitute derived types in place of the default Hotkey type. |
hotkeyJsonObjects | The JSON object representation of any number of Hotkeys. |
THotkey | : | Hotkey |
References VolumeControl.Core.Input.HotkeyManager.AddHotkey(), and VolumeControl.Core.Input.HotkeyManager.HotkeyActionManager.
Referenced by VolumeControl.Core.Input.HotkeyManager.SetHotkeysFromJsonHotkeys< THotkey >().
void VolumeControl.Core.Input.HotkeyManager.ClearHotkeys | ( | ) |
Removes all hotkeys from the manager.
References VolumeControl.Core.Input.HotkeyManager.Hotkeys, and VolumeControl.Core.Input.HotkeyManager.RemoveHotkey().
Referenced by VolumeControl.Core.Input.HotkeyManager.SetHotkeysFromJsonHotkeys< THotkey >().
Hotkey? VolumeControl.Core.Input.HotkeyManager.GetHotkey | ( | ushort | id | ) |
|
virtual |
Gets a list of JsonHotkey instances for the list of managed hotkeys.
References VolumeControl.Core.Input.HotkeyManager.Hotkeys.
bool VolumeControl.Core.Input.HotkeyManager.RemoveHotkey | ( | Hotkey | hotkey | ) |
Removes the specified hotkey from the manager.
hotkey | A Hotkey instance to remove from the list of managed hotkeys. |
true
when the hotkey was successfully removed; otherwise false
.ArgumentException | The hotkey is not being managed by this HotkeyManager. |
References VolumeControl.Core.Input.Hotkey.Dispose(), VolumeControl.Core.Input.HotkeyManager.Hotkeys, and VolumeControl.Core.Input.Hotkey.Registering.
Referenced by VolumeControl.Core.Input.HotkeyManager.ClearHotkeys().
bool VolumeControl.Core.Input.HotkeyManager.RemoveHotkey | ( | ushort | id | ) |
Removes the hotkey with the specified id from the manager.
id | The unique ID number of a hotkey to remove. |
true
when the hotkey was successfully removed; otherwise false
.ArgumentException | The hotkey with id is not being managed by this HotkeyManager. |
void VolumeControl.Core.Input.HotkeyManager.SetHotkeysFromJsonHotkeys< THotkey > | ( | JsonHotkey[] | hotkeyJsonObjects | ) |
Sets the list of managed hotkeys from the specified hotkeyJsonObjects .
THotkey | A type derived from Hotkey to create. Specifying this allows you to substitute derived types in place of the default Hotkey type. |
hotkeyJsonObjects | The JSON object representation of any number of Hotkeys. |
THotkey | : | Hotkey |
References VolumeControl.Core.Input.HotkeyManager.AddJsonHotkeys< THotkey >(), and VolumeControl.Core.Input.HotkeyManager.ClearHotkeys().
|
get |
Gets the list of HotkeyMessageHookAbstractor instances that are currently active.
|
get |
Gets the action manager instance for this HotkeyManager.
Referenced by VolumeControl.Core.Input.HotkeyManager.AddJsonHotkeys< THotkey >().
|
get |
Gets the hotkey instances that are being managed by this HotkeyManager.
Referenced by VolumeControl.Core.Input.HotkeyManager.AddHotkey(), VolumeControl.Core.Input.HotkeyManager.ClearHotkeys(), VolumeControl.Core.Input.HotkeyManager.GetJsonHotkeys(), and VolumeControl.Core.Input.HotkeyManager.RemoveHotkey().
EventHandler<Hotkey>? VolumeControl.Core.Input.HotkeyManager.AddedHotkey |
Occurs when a hotkey is added to the list for any reason.
EventHandler<Hotkey>? VolumeControl.Core.Input.HotkeyManager.RemovedHotkey |
Occurs when a hotkey is removed from the list for any reason.