S60 3rd Edition
- 详细描述
S60应用程序可以获得当前的编辑状态,这些信息作为指示图标显示在状态栏上,某些程序可以自己指定当前的编辑状态,如在他们自己的状态栏中显示,下列是操控这些状态的示例代码:
我们通过使用CAknEnv类获得当前编辑状态指示:
//------------------------------------------------------------------------------ struct S_uid: public TUid { S_uid(int i){ iUid = i; } }; //Get a reference the indicator container using the CAKnEnv class. MAknEditingStateIndicator *ei = CAknEnv::Static()->EditingStateIndicator(); CAknIndicatorContainer *ic = ei->IndicatorContainer(); //Check which editing state is active if(ic->IndicatorState(S_uid(EAknNaviPaneEditorIndicatorT9))) { // T9 Mode ... } else if(ic->IndicatorState(S_uid(EAknNaviPaneEditorIndicatorQuery))) { // Pen Mode ... } const char *cp; if(ic->IndicatorState(S_uid(EAknNaviPaneEditorIndicatorLowerCase))) { // Lower case alphabet mode ... } else if(ic->IndicatorState(S_uid(EAknNaviPaneEditorIndicatorUpperCase))) { // Upper case alphabet mode ... } else if(ic->IndicatorState(S_uid(EAknNaviPaneEditorIndicatorTextCase))) { // Text Auto-case mode (Abc) ... } else if(ic->IndicatorState(S_uid(EAknNaviPaneEditorIndicatorNumberCase))) { // Numeric mode ... } //------------------------------------------------------------------------------
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/17096048/viewspace-590716/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/17096048/viewspace-590716/