×
Namespaces

Variants
Actions

Getting T9 state in 3rd Edition

From Nokia Developer Wiki
Jump to: navigation, search
Article Metadata
Article
Created: bharatuppal (13 Jul 2007)
Last edited: hamishwillee (30 May 2013)

Header Required:

#include <aknindicatorcontainer.h>  //CAknIndicatorContainer 
#include <akneditstateindicator.h> //MAknEditingStateIndicator
#include <aknenv.h>

Library Needed:

LIBRARY avkon.lib //CAknIndicatorContainer

Sourrce Code:

enum TEdwinStates
{
EAbc,
EAbcDictionary,
Eabc,
EabcDictionary,
EABC,
EAlphaABCDictionary,
ENumeric123,
EHideStateIndication
};
 
 
MAknEditingStateIndicator *editing = CAknEnv::Static()->EditingStateIndicator();
CAknIndicatorContainer *indicator = editing->IndicatorContainer();
 
TBool isDictionary = EFalse;
TInt iState
 
if(indicator->IndicatorState(S_uid(EAknNaviPaneEditorIndicatorT9)))
{
isDictionary = ETrue;
}
else if(indicator->IndicatorState(S_uid(EAknNaviPaneEditorIndicatorQuery)))
{
//pen mode
}
 
if(indicator->IndicatorState(S_uid(EAknNaviPaneEditorIndicatorLowerCase))&&
isDictionary)
{
iState = EabcDictionary;
}
else if(indicator->IndicatorState(S_uid(EAknNaviPaneEditorIndicatorLowerCase)))
{
iState = Eabc;
}
else if(indicator->IndicatorState(S_uid(EAknNaviPaneEditorIndicatorUpperCase)) &&
isDictionary)
{
iState = EABCDictionary;
}
else if(indicator->IndicatorState(S_uid(EAknNaviPaneEditorIndicatorUpperCase)))
{
iState = EABC;
}
else if(indicator->IndicatorState(S_uid(EAknNaviPaneEditorIndicatorTextCase))&&
isDictionary)
{
iState = EAlphaABCDictionary;
}
else if(indicator->IndicatorState(S_uid(EAknNaviPaneEditorIndicatorTextCase)))
{
iState = EAbc;
}
else if(indicator->IndicatorState(S_uid(EAknNaviPaneEditorIndicatorNumberCase)))
{
iState = ENumeric123;
}

Based on iState value you can perform necessary actions

This page was last modified on 30 May 2013, at 07:33.
23 page views in the last 30 days.