The KeyboardState class represents the state of a keyboard for a particular event. More...
Public Member Functions | |
override void | Dispose () |
KeyboardState () | |
The default constructor creates an empty KeyboardState object. More... | |
KeyboardState (HPS.KeyboardState in_that) | |
The copy constructor creates a new KeyboardState object that contains the same settings as the source KeyboardState. More... | |
override HPS.Type | ObjectType () |
This function returns the type the object, as declared. This does not necessarily give the true type of the underlying object. More... | |
void | Assign (HPS.KeyboardState in_that) |
Copies the source KeyboardState into this KeyboardState. More... | |
override bool | Equals (System.Object obj) |
override int | GetHashCode () |
bool | Equals (HPS.KeyboardState in_that) |
Check if the source KeyboardState is equivalent to this KeyboardState. More... | |
void | Set (HPS.Key[] in_path, HPS.KeyboardEvent in_event, HPS.KeyboardCode[] in_keyboard_codes, HPS.ModifierKeys in_modifiers) |
Sets the properties of this KeyboardState. More... | |
void | Set (HPS.Key[] in_path, HPS.KeyboardEvent in_event, HPS.KeyboardCode[] in_keyboard_codes) |
Sets the properties of this KeyboardState. More... | |
HPS.KeyboardEvent | GetActiveEvent () |
Get the active event for this KeyboardState. This will throw an exception if there is no active action for this KeyboardState. More... | |
HPS.WindowKey | GetEventSource () |
Get the window which had focus when the keys represented by this KeyboardState were pressed or released. This will throw an exception if there is no event source for this KeyboardState. More... | |
HPS.Key[] | GetEventPath () |
Get the relevant list of keys up to the window which had focus when the keys represented by this KeyboardState were pressed or released. This will throw an exception if there is no event path for this KeyboardState. More... | |
ulong | GetKeyboardCodeCount () |
Get the number of keys currently down in this KeyboardState. More... | |
HPS.KeyboardCode[] | GetKeyboardCodes () |
Get the list of keyboard codes for keys currently down in this KeyboardState. More... | |
bool | GetKeyState (HPS.KeyboardCode in_key_code) |
Get the state of a specific keyboard code for this KeyboardState. More... | |
HPS.ModifierKeys | GetModifierKeys () |
Get an object representing the state of modifier keys for this KeyboardState. More... | |
void | SetActiveEvent (HPS.KeyboardEvent in_event) |
Sets the active event for this KeyboardState. More... | |
void | SetEventPath (HPS.Key[] in_path) |
Sets the relevant list of keys up to the window which had focus for this keyboard event. More... | |
void | SetKeyboardCodes (HPS.KeyboardCode[] in_keyboard_codes) |
Sets the list of keyboard codes for keys currently down in this KeyboardState. More... | |
void | SetModifierKeys (HPS.ModifierKeys in_modifiers) |
Sets an object representing the state of modifier keys for this KeyboardState. More... | |
![]() | |
IntPtr | GetClassID () |
Object (HPS.Object in_that) | |
The move constructor creates an Object by transferring the underlying impl of the rvalue reference to this Object thereby avoiding a copy and allocation. More... | |
HPS.Type | Type () |
This function returns the true type of the underlying object. This function is useful for finding the type of smart pointer objects that have been cast to more generic types. More... | |
virtual bool | Empty () |
Indicates whether this object has any values set on it. More... | |
virtual void | Reset () |
Resets this object to its initial, uninitialized state. More... | |
bool | HasType (HPS.Type in_mask) |
This function indicates whether this Object has the given Type mask. More... | |
IntPtr | GetInstanceID () |
Returns an identifier that can be used to identify which instance of a class an object is. Different keys and controls will return the same value if they are backed by the same database resource. More... | |
Static Public Member Functions | |
static bool | operator== (HPS.KeyboardState a, HPS.KeyboardState b) |
static bool | operator!= (HPS.KeyboardState a, HPS.KeyboardState b) |
![]() | |
static IntPtr | ClassID< T > () |
Protected Member Functions | |
override void | deleteCptr () |
![]() | |
virtual IntPtr | GetNonDirectorClassID () |
Additional Inherited Members | |
![]() | |
HandleRef | cptr |
HandleRef | scptr |
bool | cMemOwn |
The KeyboardState class represents the state of a keyboard for a particular event.
|
inline |
The default constructor creates an empty KeyboardState object.
|
inline |
The copy constructor creates a new KeyboardState object that contains the same settings as the source KeyboardState.
in_that | The source <ref refid="class_h_p_s_1_1_keyboard_state" kindref="compound">KeyboardState</ref> to copy. |
|
inline |
Copies the source KeyboardState into this KeyboardState.
in_that | The source <ref refid="class_h_p_s_1_1_keyboard_state" kindref="compound">KeyboardState</ref> to copy. |
|
inline |
Check if the source KeyboardState is equivalent to this KeyboardState.
in_that | The source <ref refid="class_h_p_s_1_1_keyboard_state" kindref="compound">KeyboardState</ref> to compare to this <ref refid="class_h_p_s_1_1_keyboard_state" kindref="compound">KeyboardState</ref>. |
|
inline |
Get the active event for this KeyboardState. This will throw an exception if there is no active action for this KeyboardState.
|
inline |
Get the relevant list of keys up to the window which had focus when the keys represented by this KeyboardState were pressed or released. This will throw an exception if there is no event path for this KeyboardState.
|
inline |
Get the window which had focus when the keys represented by this KeyboardState were pressed or released. This will throw an exception if there is no event source for this KeyboardState.
|
inline |
Get the number of keys currently down in this KeyboardState.
|
inline |
Get the list of keyboard codes for keys currently down in this KeyboardState.
|
inline |
Get the state of a specific keyboard code for this KeyboardState.
in_key_code | The keyboard code for which to query the action. |
|
inline |
Get an object representing the state of modifier keys for this KeyboardState.
|
inlinevirtual |
This function returns the type the object, as declared. This does not necessarily give the true type of the underlying object.
Reimplemented from HPS.Object.
|
inline |
Sets the properties of this KeyboardState.
in_path | The list of keys up to the window which had focus for this keyboard event. |
in_event | The keyboard event. |
in_keyboard_codes | The list of keyboard codes for keys currently down during this keyboard event. |
in_modifiers | The state of modifier keys for this keyboard event. |
|
inline |
Sets the properties of this KeyboardState.
in_path | The list of keys up to the window which had focus for this keyboard event. |
in_event | The keyboard event. |
in_keyboard_codes | The list of keyboard codes for keys currently down during this keyboard event. |
|
inline |
Sets the active event for this KeyboardState.
in_event | The action for this <ref refid="class_h_p_s_1_1_keyboard_state" kindref="compound">KeyboardState</ref>. |
|
inline |
Sets the relevant list of keys up to the window which had focus for this keyboard event.
in_path | The relevant list of keys up to the window which had focus when the keyboard event represented by this <ref refid="class_h_p_s_1_1_keyboard_state" kindref="compound">KeyboardState</ref> underwent the active action. |
|
inline |
Sets the list of keyboard codes for keys currently down in this KeyboardState.
in_keyboard_codes | The list of keyboard codes for keys currently down during this keyboard event. |
|
inline |
Sets an object representing the state of modifier keys for this KeyboardState.
in_modifiers | An object representing the state of modifier keys. |