- 1、本文档共19页,可阅读全部内容。
- 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
- 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
小键盘实现(Keyboard implementation)
小键盘实现(Keyboard implementation)
C++ Code: the small keyboard (soft keyboard) of the input method
/ / this is the input method used to write a small keyboard (keyboard) class
/ / the small keyboard input method is used when special characters
For example, / / Sogou input method on the small keyboard button, will pop up a small keyboard
/ /
/ / Note: This is a document together, download the packaged file see article link:
/ / /realfun/archive/2005/03/28/127174.html
////////////////////////////////////////////////
/ /
/ / CIMESoftKbd.h
*
* Author: yuchifang (realfun)
* email: realfun, at, Gmail, dot, com
* /
#ifndef _IME_SOFTKBD_H_
#define _IME_SOFTKBD_H_
#include
#include
#include
#include
Using namespace std;
Const SOFT_KEY_COUNT = 47;
/ / represents a soft keyboard layout
Class CIMESkbTab
{
Public:
CIMESkbTab (const, TCHAR, keys[], const, TCHAR, shiftKeys[], LPCTSTR, name);
CIMESkbTab (const, CIMESkbTab, skb);
TCHAR GetChar (int index);
TCHAR GetShiftChar (int index);
/ / conversion keyboard keys to soft keyboard characters, there is no return to the 0
TCHAR ConvVKey2SKBChar (UINT, vKey, bool, bShift);
Get / / tab name
Void, GetName (TCHAR, name[]) {_tcscpy (name, this-name)}
Private:
TCHAR tab[SOFT_KEY_COUNT]; / / soft keyboard layout
TCHAR shiftTab[SOFT_KEY_COUNT]; soft keyboard layout after //Shift
TCHAR name[10]; / / soft keyboard layout.
};
/ / this class encapsulates the soft keyboard operation
Class CIMESoftKbd
{
Public:
CIMESoftKbd ();
A soft keyboard / display layout
Void, ShowNext ()
{
M_tabIndex = (m_tabIndex + 1)% m_tabs.size ();
Show ();
}
/ / display the previous soft keyboard layout
Void, ShowPrev ()
{
M_tabIndex = (m_tabIndex + m_tabs.size () - 1)% m_tabs.size ();
Show ();
}
Specify the location of the soft keyboard / display layout
Void ShowAtPos (int index)
{
M_tabIndex = ABS (index)% m_tabs.size ();
Show ();
}
/ / display and update the soft keyboard
Void, Show ();
Hide / soft keyboard
Void, Hide ();
To determine whether to open / soft keyboard
Bo
您可能关注的文档
- 国际融资租赁公约(International Financial Leasing Convention).doc
- 图形的相似与(Similarity of graphs and).doc
- 图形步骤(Graphical steps).doc
- 图情学各类刊物(All kinds of publications).doc
- 土力学与地基础(Soil mechanics and ground foundation).doc
- 在hr的方圆之间超越自我(Surpass yourself in the circumference of HR).doc
- 在linux 和firewire上创建自己的rac 集群(Create your own RAC cluster on Linux and FireWire).doc
- 土地承包经营权流转并非土地私有化(The transfer of land contractual management right is not privatization of land).doc
- 在vc++ 中使用内嵌汇编(Using inline assembly in vc++).doc
- 在全面小康新农村建设中巩固和提高村党组织领导核心地位的调查与思考(Investigation and Reflection on consolidating and improving the leading position of village Party organizations in the construction of a well-off society in an all-round way).doc
- 青岛版7年级下册数学期末测试卷及完整答案详解(夺冠系列).docx
- 青岛版7年级下册数学期末测试卷【考点提分】附答案详解.docx
- 青岛版7年级下册数学期末试卷及参考答案详解【综合题】.docx
- 2025年塑铝稳态管项目规划申请报告.docx
- 难点详解鲁教版(五四制)8年级数学下册试题附参考答案详解(达标题).docx
- 难点详解鲁教版(五四制)8年级数学下册试题(培优B卷)附答案详解.docx
- 做账实操-肯尼亚公司全盘账务处理分录实例.doc
- 青岛版7年级下册数学期末试题附答案详解【黄金题型】.docx
- 做账实操-柬埔寨公司全盘会计账务处理分录实例.doc
- 青岛版7年级下册数学期末试题及答案详解(典优).docx
文档评论(0)