|
Nokia N97 SDK Example Applications Guide |
#include <Billboardinput.h>
Note that this class supports mapping of multiple scancodes to a single input signal. But only one input signal can be mapped to one scancode (that means single keypress can't change multiple input signals to pressed state).
Definition at line 70 of file Billboardinput.h.
Public Member Functions |
|
| virtual | ~CBillboardInput () |
| TKeyResponse | KeyDown (const int aKeyCode) |
| TKeyResponse | KeyUp (const int aKeyCode) |
| TBool | IsInputPressed (TUint aInput) |
Static Public Member Functions |
|
| static CBillboardInput * | NewL () |
Protected Member Functions |
|
| CBillboardInput () | |
| void | ConstructL (void) |
Private Attributes |
|
| TBool * | iInputPressed |
|
|
Destructor. Does nothing. Definition at line 77 of file Billboardinput.cpp. References iInputPressed. 00078 { 00079 delete iInputPressed; 00080 }
|
|
|
Standard constructor that must never Leave. Definition at line 54 of file Billboardinput.cpp. Referenced by NewL().
|
|
|
Factory method for creating a new CBillboard object. Calls the hidden constructors. Definition at line 36 of file Billboardinput.cpp. References CBillboardInput(). Referenced by CBillboardContainer::ConstructL(). 00037 { 00038 // Symbian 2-phase constructor. Calls both the default 00039 // C++ constructor and Symbian ConstructL methods 00040 CBillboardInput* self = new (ELeave) CBillboardInput(); 00041 CleanupStack::PushL( self ); 00042 self->ConstructL(); 00043 CleanupStack::Pop(); 00044 00045 return self; 00046 }
|
|
|
Second phase constructor that can call methods that may leave. Does nothing. Definition at line 63 of file Billboardinput.cpp. References iInputPressed. 00064 { 00065 iInputPressed = new (ELeave) TBool[ MAX_NUM_INPUTS ]; 00066 for( int i = 0; i < MAX_NUM_INPUTS; i++ ) 00067 { 00068 iInputPressed[i] = EFalse; 00069 } 00070 }
|
|
|
If a signal mapping exists for the given keycode, then that input signal is set to pressed state.
Definition at line 87 of file Billboardinput.cpp. Referenced by CBillboardContainer::OfferKeyEventL(). 00088 { 00089 TInt inputIdx = -1; 00090 for( int i = 0; i < KKeyCodeMapSize; i +=2 ) 00091 { 00092 if( KKeyCodeMap[i] == aKeyCode ) 00093 { 00094 inputIdx = KKeyCodeMap[i + 1]; 00095 break; 00096 } 00097 } 00098 00099 if( inputIdx >= 0 ) 00100 { 00101 iInputPressed[ inputIdx ] = ETrue; 00102 return EKeyWasConsumed; 00103 } 00104 00105 return EKeyWasNotConsumed; 00106 }
|
|
|
If a signal mapping exists for the given keycode, then that input signal is set to non-pressed state.
Definition at line 113 of file Billboardinput.cpp. 00114 { 00115 TInt inputIdx = -1; 00116 for( int i = 0; i < KKeyCodeMapSize; i +=2 ) 00117 { 00118 if( KKeyCodeMap[i] == aKeyCode ) 00119 { 00120 inputIdx = KKeyCodeMap[i + 1]; 00121 break; 00122 } 00123 } 00124 00125 if( inputIdx >= 0 ) 00126 { 00127 iInputPressed[ inputIdx ] = EFalse; 00128 return EKeyWasConsumed; 00129 } 00130 00131 return EKeyWasNotConsumed; 00132 }
|
|
|
Returns whether or not a given input signal is pressed at the moment or not.
Definition at line 139 of file Billboardinput.cpp. Referenced by CBillboard::MoveCamera(). 00140 { 00141 return iInputPressed[ aInput ]; 00142 }
|
|
|
Pressed status for each input. Definition at line 124 of file Billboardinput.h. Referenced by ConstructL(), and ~CBillboardInput(). |
|
© Nokia 2009 |