< Home

< Table of Contents

REFERENCE MANUAL

HPS.KeyboardState Class Reference

The KeyboardState class represents the state of a keyboard for a particular event. More...

Inheritance diagram for HPS.KeyboardState:
HPS.Object

Public Member Functions

void Assign (HPS.KeyboardState in_that)
 Copies the source KeyboardState into this KeyboardState. More...
 
override void Dispose ()
 
override bool Equals (System.Object obj)
 
bool Equals (HPS.KeyboardState in_that)
 Check if the source KeyboardState is equivalent to this KeyboardState. More...
 
HPS.KeyboardEvent GetActiveEvent ()
 Get the active event 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. More...
 
HPS.WindowKey GetEventSource ()
 Get the window which had focus when the keys represented by this KeyboardState were pressed or released. More...
 
override int GetHashCode ()
 
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. 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...
 
 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. More...
 
- Public Member Functions inherited from HPS.Object
virtual bool Empty ()
 Indicates whether this object has any values set on it. More...
 
IntPtr GetClassID ()
 
IntPtr GetInstanceID ()
 Returns an identifier that can be used to identify which instance of a class an object is. More...
 
bool HasType (HPS.Type in_mask)
 This function indicates whether this Object has the given Type mask. More...
 
 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...
 
virtual void Reset ()
 Resets this object to its initial, uninitialized state. More...
 
HPS.Type Type ()
 This function returns the true type of the underlying object. More...
 

Static Public Member Functions

static bool operator!= (HPS.KeyboardState a, HPS.KeyboardState b)
 
static bool operator== (HPS.KeyboardState a, HPS.KeyboardState b)
 
- Static Public Member Functions inherited from HPS.Object
static IntPtr ClassID< T > ()
 

Protected Member Functions

override void deleteCptr ()
 
- Protected Member Functions inherited from HPS.Object
virtual IntPtr GetNonDirectorClassID ()
 

Additional Inherited Members

- Protected Attributes inherited from HPS.Object
bool cMemOwn
 
HandleRef cptr
 
HandleRef scptr
 

Detailed Description

The KeyboardState class represents the state of a keyboard for a particular event.

Constructor & Destructor Documentation

HPS.KeyboardState.KeyboardState ( )

The default constructor creates an empty KeyboardState object.

HPS.KeyboardState.KeyboardState ( HPS.KeyboardState  in_that)

The copy constructor creates a new KeyboardState object that contains the same settings as the source KeyboardState.

Parameters
in_thatThe source <ref refid="class_h_p_s_1_1_keyboard_state" kindref="compound">KeyboardState</ref> to copy.

Member Function Documentation

void HPS.KeyboardState.Assign ( HPS.KeyboardState  in_that)

Copies the source KeyboardState into this KeyboardState.

Parameters
in_thatThe source <ref refid="class_h_p_s_1_1_keyboard_state" kindref="compound">KeyboardState</ref> to copy.
bool HPS.KeyboardState.Equals ( HPS.KeyboardState  in_that)

Check if the source KeyboardState is equivalent to this KeyboardState.

Returns
true if the objects are equivalent, false otherwise.
HPS.KeyboardEvent HPS.KeyboardState.GetActiveEvent ( )

Get the active event for this KeyboardState.

This will throw an exception if there is no active action for this KeyboardState.

Returns
The action for the active keyboard codes for this KeyboardState.
HPS.Key [] HPS.KeyboardState.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.

Returns
The relevant list of keys up to the window which had focus when the keys represented by this KeyboardState were pressed or released.
HPS.WindowKey HPS.KeyboardState.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.

Returns
The window which had focus when the keys represented by this KeyboardState were pressed or released.
ulong HPS.KeyboardState.GetKeyboardCodeCount ( )

Get the number of keys currently down in this KeyboardState.

Returns
Number of active and inactive keyboard codes.
HPS.KeyboardCode [] HPS.KeyboardState.GetKeyboardCodes ( )

Get the list of keyboard codes for keys currently down.

Returns
The list of active and inactive keyboard codes.
bool HPS.KeyboardState.GetKeyState ( HPS.KeyboardCode  in_key_code)

Get the state of a specific keyboard code for this KeyboardState.

Parameters
in_key_codeThe keyboard code for which to query the action.
Returns
true if the key is down, false otherwise.
HPS.ModifierKeys HPS.KeyboardState.GetModifierKeys ( )

Get an object representing the state of modifier keys for this KeyboardState.

Returns
An object representing the state of modifier keys.
override HPS.Type HPS.KeyboardState.ObjectType ( )
virtual

This function returns the type the object, as declared.

This does not necessarily give the true type of the underlying object.

Returns
The declared type of the object in question, which may differ from the true, underlying type.

Reimplemented from HPS.Object.


The documentation for this class was generated from the following file: