?? eb_keyproxy.h
字號:
/***************************************************************************
EB_KeyProxy.h -
-------------------
begin : Tue Mar 3 2004
copyright : (C) 2004 by DigitalAirways
email : info@digitalairways.com
***************************************************************************/
/*
* Copyright (c) 2000-2004 DigitalAirways, sarl. All Rights Reserved.
*
* This software is the confidential and proprietary information of
* DigitalAirways, sarl. ("Confidential Information"). You shall not
* disclose such Confidential Information and shall use it only in
* accordance with the terms of the license agreement you entered into
* with DigitalAirways.
* A copy of this license is included in the licence.txt file included
* in this software package.
*/
/*
**************************************************************
* TODO
**************************************************************
-
**************************************************************
* HISTORY
**************************************************************
-
*/
#ifndef __EB_KEYPROXY__
#define __EB_KEYPROXY__
#include "EB_Defs.h"
#include "EB_Graphics.h"
#include "EB_GContext.h"
#include "KR_Plugin.h"
class KREBDLIBS_API KeyProxy : public Plugin {
protected :
GContext* gContext ;
int currentMask ;
KALEIDO_TIME_TYPE lastActionTime ; // Time of the last action
int lastActionCode ; // Code of the last action
int lastScanValue ; // Last scan value for rolling keys
public:
DEFINE_NEW(KeyProxy);
DEFINE_DELETE(KeyProxy);
/*
<api>
<class>KeyProxy</class>
<method>KeyProxy</method>
<java>KeyProxy()</java>
<cpp>KeyProxy(GContext* newGContext, int newMask=0)</cpp>
<descr>
<p>newMask is described later.</p>
</descr>
</api>
*/
KeyProxy(GContext* newGContext, int newMask=0) ;
virtual ~KeyProxy() ;
#ifdef DEV_CONSISTENCY
virtual char *getInfo(int itemType, int itemIdx) ;
#endif // def DEV_CONSISTENCY
/*
<api>
<class>KeyProxy</class>
<method>getContext</method>
<java>GContext getContext()</java>
<cpp>GContext* getContext()</cpp>
<descr>
<p>Returns the current global context.</p>
</descr>
</api>
*/
GContext* getContext() { return gContext; }
GContext* getGContext() { return gContext; } // deprecated
/*
<api>
<class>KeyProxy</class>
<method>keyReleased</method>
<java>public void keyReleased(int actionCode)</java>
<cpp>virtual void keyReleased(int actionCode)</cpp>
<descr>
<p>keyReleased is the counter part of keyPressed.</p>
</descr>
</api>
*/
virtual boolean keyReleased(int actionCode) ;
/*
<api>
<class>KeyProxy</class>
<method>keyPressed</method>
<java>public void keyPressed(int actionCode)</java>
<cpp>virtual void keyPressed(int actionCode)</cpp>
<descr>
<p>This method is called each time a key is pressed, usually from the shell application. actionCode is the value of the key that has been pressed.</p>
<note>Note that this value is not necessarily related to the character that is normally generated by the concerned key on the concerned device.</note>
</descr>
</api>
*/
virtual boolean keyPressed(int actionCode) ;
/*
<api>
<class>KeyProxy</class>
<method>paint</method>
<java>public void paint(Graphics g)</java>
<cpp>virtual void paint(Graphics* g)</cpp>
<descr>
<p>Depending on the MMI design, this method may be called at several points. For instance, each time a Layout is redrawn by EB, once all the visible options have been painted, or by a JitMapper in charge of an editing component. It usually does nothing, but may be useful to display information about the current rotating keys' state for instance.</p>
</descr>
</api>
*/
virtual void paint(Graphics* g);
/*
<api>
<class>KeyProxy</class>
<method>setMask</method>
<java>public int setMask(int newMask)</java>
<cpp>virtual int setMask(int newMask)</cpp>
<descr>
<p>This method allows to define a mask for the KeyProxy. The typical use of a mask allows to define the kind of character that is expected from the KeyProxy by the Option that is currently processing the incoming characters.</p>
<p>KR/EB's default KeyProxy accepts the following mask values:</p>
<fp>- 0 : basic rotating keys
- 1 : num first (the numeric value of rotating keys must be sent first)
- 2 : num only (only the numeric value of rotating keys must be sent)
- 3 : char first (the non-numeric value of rotating keys must be sent first)</fp>
</descr>
</api>
*/
virtual int setMask(int newMask) ;
/*
<api>
<class>KeyProxy</class>
<method>isHandleAction</method>
<java></java>
<cpp>virtual boolean isHandleAction(long actionid)</cpp>
<descr>
<p>This method allows a KeyProxy to tell the actions that it may handle. It reduces dependencies as it may not be necessary to keep this knowledge at the caller's level.</p>
</descr>
</api>
*/
virtual boolean isHandleAction(long actionid) ;
} ;
typedef KeyProxy* pKeyProxy ;
typedef pKeyProxy (*keyProxyInstanciator)(GContext* newGContext) ;
#endif // ndef __EB_KEYPROXY__
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -