--- a/fep/aknfep/UiPlugins/AknFepUiInterface/AvkonImpl/src/AknFepQuery.cpp Fri Sep 17 17:26:50 2010 +0100
+++ b/fep/aknfep/UiPlugins/AknFepUiInterface/AvkonImpl/src/AknFepQuery.cpp Fri Oct 22 15:38:27 2010 +0100
@@ -79,15 +79,7 @@
{
underlyingEditorSCTResId = R_AVKON_SPECIAL_CHARACTER_TABLE_DIALOG_CHINESE;
}
- }
- else if (FeatureManager::FeatureSupported(KFeatureIdKorean))
- {
- // Use the special sct resource file for Korean variant.
- if (!underlyingEditorSCTResId || underlyingEditorSCTResId == R_AVKON_SPECIAL_CHARACTER_TABLE_DIALOG)
- {
- underlyingEditorSCTResId = R_AVKON_SPECIAL_CHARACTER_TABLE_DIALOG_KOREAN;
- }
- }
+ }
else if (!underlyingEditorSCTResId)
{
underlyingEditorSCTResId = R_AVKON_SPECIAL_CHARACTER_TABLE_DIALOG;
--- a/fep/aknfep/UiPlugins/AknFepUiInterface/AvkonImpl/src/AknFepUiAvkonImpl.cpp Fri Sep 17 17:26:50 2010 +0100
+++ b/fep/aknfep/UiPlugins/AknFepUiInterface/AvkonImpl/src/AknFepUiAvkonImpl.cpp Fri Oct 22 15:38:27 2010 +0100
@@ -131,6 +131,18 @@
void CAknFepUIAvkonImpl::DeleteDialogs()
{
+ // If there is no dialog displayed, do not need delete the dialog,
+ // but set all dialog pointer to null and return
+ if( !CEikonEnv::Static()->EikAppUi()->IsDisplayingMenuOrDialog())
+ {
+ iDialog = NULL;
+ iCharMapDialog = NULL;
+ iListQueryDialog = NULL;
+ iTextQueryDialog = NULL;
+ iPredictiveSettingDialog = NULL;
+ return;
+ }
+
if(iDialog)
{
delete iDialog;
@@ -332,13 +344,12 @@
TInt commandId;
if (version == KAknCbaVersion)
{
- TUint32 shortCommandId = reader.ReadUint16();
- TUint32 longCommandId = reader.ReadUint16();
- commandId = (longCommandId << 16) | shortCommandId;
+ commandId = reader.ReadInt16();
+ reader.ReadInt16(); //long press id
}
else
{
- commandId = TInt(TUint(reader.ReadUint16()));
+ commandId =reader.ReadInt16();
}
TPtrC text=reader.ReadTPtrC();
reader.ReadTPtrC(); // bmp filename
Binary file fep/aknfep/conf/aknfep.confml has changed
Binary file fep/aknfep/conf/aknfep_101F876D.crml has changed
--- a/fep/aknfep/inc/AknFepLanguageManager.h Fri Sep 17 17:26:50 2010 +0100
+++ b/fep/aknfep/inc/AknFepLanguageManager.h Fri Oct 22 15:38:27 2010 +0100
@@ -89,7 +89,6 @@
CAknFepCaseManager* aCaseMan,
CAknFepSharedDataInterface* aSharedData = NULL );
-
/**
* Destructor.
*
@@ -262,7 +261,7 @@
* @since S60 v3.2
*/
TBool iIsSplitView;
-
+
/**
* Shared data manager
*/
--- a/fep/aknfep/inc/AknFepManager.h Fri Sep 17 17:26:50 2010 +0100
+++ b/fep/aknfep/inc/AknFepManager.h Fri Oct 22 15:38:27 2010 +0100
@@ -267,7 +267,11 @@
/* Flag to set decide when to set multiple observer for FEP. Set this flag whenever a FEP aware dialog is launched */
EExtendedFlagFepAwareDialogLaunched =0x00000020,
/* Flag to specify that pointer event type EDrag has happened */
- EExtendedFlagPointerEventTypeEDrag =0x00000040
+ EExtendedFlagPointerEventTypeEDrag =0x00000040,
+ /* Flag to specify that Fn key will be set as lock mode when long press occurs*/
+ EExtendedFlagFnKeyNeedLockMode =0x00000080,
+ /* Flag to specify point in editor when EFlagNoMatches flag is set*/
+ EExtendedFlagPointInNoMatchEditor =0x00000100
};
//public constants
@@ -913,6 +917,11 @@
void HandleChangeInFocusForSettingFep();
+ /**
+ * Returns initial rectangle used for the top-left point of split candidate.
+ */
+ TRect InitRectForSplitCandL();
+
private:
/**
--- a/fep/aknfep/inc/AknFepManagerUIInterface.h Fri Sep 17 17:26:50 2010 +0100
+++ b/fep/aknfep/inc/AknFepManagerUIInterface.h Fri Oct 22 15:38:27 2010 +0100
@@ -401,13 +401,6 @@
* An editor of unlimited length will return its maximum size as zero
*/
virtual TBool EditorHasFreeSpace( TInt aNumberOfCharacter = 0 ) const = 0;
-
- /**
- * Check whether the editor is a Java number editor
- * Return ETrue if the editor is a Java number editor
- */
- virtual TBool IsSpecialNumericEditor() = 0;
-
virtual void RedecorateAfterDeletionL( const TDesC& aTextThatWasDeleted ) = 0;
--- a/fep/aknfep/inc/AknFepPluginManager.h Fri Sep 17 17:26:50 2010 +0100
+++ b/fep/aknfep/inc/AknFepPluginManager.h Fri Oct 22 15:38:27 2010 +0100
@@ -319,6 +319,8 @@
*/
void SetCursorSelectionL(const TCursorSelection& aCurSel, TBool aSyncCursor);
+ void VietSyncToneMarkerL(const TDesC& aEditorContent, const TCursorSelection& aCursorPos);
+
HBufC* GetNumberKeymapResource(TInt aCaseMode);
HBufC* DoGetNumberKeymapResourceL(TInt aCaseMode);
--- a/fep/aknfep/inc/AknFepSharedDataInterface.h Fri Sep 17 17:26:50 2010 +0100
+++ b/fep/aknfep/inc/AknFepSharedDataInterface.h Fri Oct 22 15:38:27 2010 +0100
@@ -584,6 +584,7 @@
* @param Replace value of KAknFepLastUsedPortraitInput value.
*/
void SetPluginPortraitInputMode( TPluginInputMode aLastUsedPortraitInputMode );
+
private:
/**
* C++ Constructor
--- a/fep/aknfep/inc/AknFepUiInputStateEntryQwertyWesternPredictive.h Fri Sep 17 17:26:50 2010 +0100
+++ b/fep/aknfep/inc/AknFepUiInputStateEntryQwertyWesternPredictive.h Fri Oct 22 15:38:27 2010 +0100
@@ -93,6 +93,7 @@
* @param aLength The key press length.
*/
TBool HandleNaviKeysL(TInt aKey, TKeyPressLength aLength);
+
private:
/**
@@ -111,6 +112,7 @@
* @Return ETrue : yes it is on the key; EFalse : No it is not on the Key
*/
TBool MapAgainst(TInt aKey, TInt aMode, TInt16 aAgainst, TInt aCase) const;
+
};
#endif //__AKN_FEP_UI_INPUT_STATE_ENTRY_QWERTY_WESTERN_PREDICTIVE_H__
--- a/fep/aknfep/inc/AknFepUiInputStateQwertyKorean.h Fri Sep 17 17:26:50 2010 +0100
+++ b/fep/aknfep/inc/AknFepUiInputStateQwertyKorean.h Fri Oct 22 15:38:27 2010 +0100
@@ -38,7 +38,9 @@
private:
virtual TBool HandleKeyL(TInt aKey, TKeyPressLength aLength);
-
+
+ void KeyTimerExpired();
+
private:
};
--- a/fep/aknfep/inc/AknFepUiManagerBase.h Fri Sep 17 17:26:50 2010 +0100
+++ b/fep/aknfep/inc/AknFepUiManagerBase.h Fri Oct 22 15:38:27 2010 +0100
@@ -442,7 +442,8 @@
* @since 3.2
*/
virtual TBool RollbackPreviousCharL();
-
+
+
/**
* Check whether the character mapped on given key
* @param aKey The scancode of the key to be checked.
@@ -453,6 +454,7 @@
*/
TBool MapAgainst(TInt aKey, TInt aMode, TInt16 aAgainst, TInt aCase) const;
+
#endif //RD_INTELLIGENT_TEXT_INPUT
#endif // __ITI_LONGPRESS_NUM_SHIFT_COPYPASTE__
--- a/fep/aknfep/inc/AknFepUiManagerChinese.h Fri Sep 17 17:26:50 2010 +0100
+++ b/fep/aknfep/inc/AknFepUiManagerChinese.h Fri Oct 22 15:38:27 2010 +0100
@@ -274,8 +274,8 @@
* @since 2.6
*/
void ConstructL(TLanguage aLanguage);
-
- /**
+
+ /**
* Tell whether this key mapped valid zhuyin, pinyin, or cangjie symbol
*/
TBool IsValidChineseInputSymbol(TInt aKey, TPtiEngineInputMode aMode) const;
@@ -285,6 +285,7 @@
*/
TBool IsValidChineseToneMarkKey(TInt aKey, TPtiEngineInputMode aMode) const;
+
private: // Data
TAknFepInputStateChineseBase iFepUiState;
MAknFepUICtrlContainerChinese* iContainerPane;
--- a/fep/aknfep/peninputplugins/PeninputPluginKr/src/PluginKrFepManagerBase.cpp Fri Sep 17 17:26:50 2010 +0100
+++ b/fep/aknfep/peninputplugins/PeninputPluginKr/src/PluginKrFepManagerBase.cpp Fri Oct 22 15:38:27 2010 +0100
@@ -539,9 +539,13 @@
// Not derived from edwin
if ( aPermittedMode == EAknEditorNumericInputMode )
{
- // Only number range is supported in Korean Variant
- iPermittedRange = ERangeNumber;
+ if ( SupportNativeNumberRange() )
+ {
+ iPermittedRange = ERangeNativeNumber;
+ }
+ iPermittedRange |= ERangeNumber;
}
+
else if ( aPermittedMode & EAknEditorTextInputMode )
{
// Derived from edwin and EAknEditorTextInputMode
--- a/fep/aknfep/peninputplugins/peninputimeplugingeneric/src/pluginfepmanagerbase.cpp Fri Sep 17 17:26:50 2010 +0100
+++ b/fep/aknfep/peninputplugins/peninputimeplugingeneric/src/pluginfepmanagerbase.cpp Fri Oct 22 15:38:27 2010 +0100
@@ -295,6 +295,7 @@
+ sizeof(TInt) // for langcode
+ sizeof(TInt)*( itemArray->Count() ) // For the size of each item
+ sumSize// For all of char data
+ + 4*sizeof(TInt) // For the Rect
);
TPtr8 buf8Ptr = buf8->Des();
RDesWriteStream writeStream;
@@ -309,6 +310,12 @@
writeStream.WriteInt32L( (*itemArray)[i].Size() );
writeStream.WriteL( (*itemArray)[i].Ptr(), (*itemArray)[i].Length() );
}
+
+ writeStream.WriteInt32L( candidatelist->iRect.iTl.iX);
+ writeStream.WriteInt32L( candidatelist->iRect.iTl.iY );
+ writeStream.WriteInt32L( candidatelist->iRect.iBr.iX);
+ writeStream.WriteInt32L( candidatelist->iRect.iBr.iY );
+
writeStream.CommitL();
CleanupStack::PopAndDestroy( &writeStream );
SendCommandToServer( aCommandId, buf8Ptr );
--- a/fep/aknfep/peninputplugins/peninputimepluginitut/src/pluginfepmanagerbase.cpp Fri Sep 17 17:26:50 2010 +0100
+++ b/fep/aknfep/peninputplugins/peninputimepluginitut/src/pluginfepmanagerbase.cpp Fri Oct 22 15:38:27 2010 +0100
@@ -220,10 +220,11 @@
RArray<TInt> sizeArray;
for (TInt i = 0; i < count; i++)
{
- TInt size = (*listArray)[i].Size();
+ TInt size = (*listArray)[i].Size();
sizeArray.Append(size);
transferSize += size + sizeof(TInt);
}
+ transferSize += 4 * sizeof( TInt );
HBufC8* buf = HBufC8::NewLC(transferSize);
TPtr8 bufPtr = buf->Des();
@@ -242,14 +243,19 @@
const TUint16* piData = (*listArray)[i].Ptr();
writeStream.WriteL(piData, sizeArray[i] / 2);
}
-
+
+ writeStream.WriteInt32L( pCanData->iRect.iTl.iX );
+ writeStream.WriteInt32L( pCanData->iRect.iTl.iY );
+ writeStream.WriteInt32L( pCanData->iRect.iBr.iX );
+ writeStream.WriteInt32L( pCanData->iRect.iBr.iY );
+
writeStream.CommitL();
SendCommandToServer( aCommandId, bufPtr );
sizeArray.Close();
- CleanupStack::PopAndDestroy(&writeStream);
- CleanupStack::PopAndDestroy(buf);
+ CleanupStack::PopAndDestroy(&writeStream);
+ CleanupStack::PopAndDestroy(buf);
}
break;
--- a/fep/aknfep/src/AknFepManager.cpp Fri Sep 17 17:26:50 2010 +0100
+++ b/fep/aknfep/src/AknFepManager.cpp Fri Oct 22 15:38:27 2010 +0100
@@ -239,6 +239,9 @@
// The passwd timeout is same as defined on CEikSecretEditor.
const TInt KSyncPasswdTimeout = 1000000;
+// The offset to show underline
+const TInt KUnderlineHeight = 4;
+
#ifdef RD_SCALABLE_UI_V2
TUid AppUidFromWndGroupId(TInt aWndGrpId);
extern TUid GetCurAppUid();
@@ -3129,7 +3132,7 @@
{
FepUI()->HandleKeyL(EKeyLeftCtrl, EShortKeyPress);
}*/
-
+
//The default value of response is EKeyWasConsumed. So in some case, fep don¡¯t
//do anything, but it return Consumed.
//This make app miss the event EEventKeyUp.
@@ -3540,6 +3543,32 @@
HandleChangeInFocus();
}
+// -----------------------------------------------------------------------------
+// CAknFepManager::InitRectForSplitCandL
+// Returns initial rectangle used for the top-left point of split candidate.
+// -----------------------------------------------------------------------------
+//
+TRect CAknFepManager::InitRectForSplitCandL()
+ {
+ // Popup Position was not right for RTL
+ TInt documentOffset = iLanguageCapabilities.iRightToLeftLanguage ?
+ 0 : iPtiEngine->CurrentWord().Length();
+
+ // Determine the place where to spawn the candidate popup.
+ TPoint inlineEditorTl;
+ TPoint inlineEditorBr;
+ TInt height;
+ TInt ascent;
+ GetScreenCoordinatesL( inlineEditorTl, height, ascent, documentOffset );
+ GetScreenCoordinatesL( inlineEditorBr, height, ascent );
+
+ // move 4 pixeles down to show underline when pops up candidate.
+ inlineEditorTl.iY += KUnderlineHeight;
+ inlineEditorBr.iY += KUnderlineHeight;
+
+ return TRect( inlineEditorTl, inlineEditorBr );
+ }
+
void CAknFepManager::HandleDestructionOfFocusedItem()
{
if (iInputCapabilities.FepAwareTextEditor())
@@ -3897,21 +3926,27 @@
if( IsFlagSet( EFlagInsideInlineEditingTransaction ) )
{
if (IsFeatureSupportedJapanese())
- {
- TryCloseUiL();
- }
- else
- {
-#ifdef RD_INTELLIGENT_TEXT_INPUT
- iPtiEngine->CommitCurrentWord();
- CommitInlineEditL();
- TryCloseUiL();
+ {
+ TryCloseUiL();
+ }
+ else
+ {
+#ifdef RD_INTELLIGENT_TEXT_INPUT
+ iPtiEngine->CommitCurrentWord();
+ CommitInlineEditL();
+ TryCloseUiL();
#else
- CommitInlineEditL();
-#endif
- }
- }
+ CommitInlineEditL();
+#endif
+ }
+ }
+
+ // The flag should be removed when touch input is not launched.
+ if ( IsExtendedFlagSet( EExtendedFlagPointInNoMatchEditor ) )
+ {
+ ClearExtendedFlag( EExtendedFlagPointInNoMatchEditor );
+ }
break;
case CAknExtendedInputCapabilities::MAknEventObserver::EControlContentUpdatedInternally:
SendEventsToPluginManL( EPluginSyncFepAwareText, EPluginSyncAll );
@@ -3921,6 +3956,8 @@
// to be displayed.
LaunchStylusCcpuMenuL(iClickPoint);
break;
+ default:
+ break;
}
}
@@ -4251,9 +4288,7 @@
// Edit mode menu commands
//The soft CBA event from touch screen.
case EAknSoftkeyCancel:
- // case (TUint16)EAknSoftkeyCancel:
case EAknSoftkeySelect:
- // case (TUint16)EAknSoftkeySelect:
currentFepUI = FepUI();
if (currentFepUI)
currentFepUI->HandleCommandL( aCommandId );
@@ -6426,6 +6461,14 @@
aMenuPane->SetItemDimmed(EAknCmdEditModeLatinText, ETrue);
aMenuPane->SetItemDimmed(EChinFepCmdModeLatinUpper, ETrue);
aMenuPane->SetItemDimmed(EChinFepCmdModeLatinLower, ETrue);
+ if( iMode == EHangul || inputLanguage == ELangKorean)
+ {
+ TInt index;
+ if ( aMenuPane->MenuItemExists( EAknCmdEditModeKorean, index ) )
+ {
+ aMenuPane->SetItemDimmed(EAknCmdEditModeKorean, EFalse);
+ }
+ }
}
if ( IsModePermitted(ENumber) )
@@ -7034,6 +7077,38 @@
void CAknFepManager::HandlePointerEventInInlineTextL(TPointerEvent::TType /*aType*/, TUint /*aModifiers*/, TInt /*aPositionInInlineText*/)
{
+ if( iFepPluginManager && iLangMan && iLangMan->IsSplitView() )
+ {
+ switch ( iFepPluginManager->PluginInputMode() )
+ {
+ case EPluginInputModeFSQ:
+ //case EPluginInputModePortraitFSQ:
+ {
+ if ( iExactWordPopupContent )
+ {
+ iExactWordPopupContent->HidePopUp();
+ }
+
+ iFepPluginManager->HandleServerEventL( ESignalShowCandidate );
+ }
+ break;
+ case EPluginInputModeItut:
+ {
+ if( IsExtendedFlagSet( EExtendedFlagPointInNoMatchEditor ) )
+ {
+ ClearExtendedFlag( EExtendedFlagPointInNoMatchEditor );
+ iFepPluginManager->HandleServerEventL( ESignalEnterSpellMode );
+ }
+ else
+ {
+ iFepPluginManager->EnterMatchSelectionState();
+ }
+ }
+ break;
+ default:
+ break;
+ }
+ }
}
void CAknFepManager::GetFormatOfFepInlineText(TCharFormat& aFormat,
@@ -10005,8 +10080,7 @@
}
else
{
- if(IsKoreanInputLanguage( ) && !IsQwerty() &&
- IsFlagSet(CAknFepManager::EFlagInsideInlineEditingTransaction))
+ if(IsKoreanInputLanguage( ) && IsFlagSet(CAknFepManager::EFlagInsideInlineEditingTransaction))
{
showCursor = EFalse;
}
@@ -10680,13 +10754,12 @@
// Any latin input mode is not permitted by the editor.
// For compatibility permitted japanese input modes are checked and
// corresponding latin input modes are allowed.
- if ( iPermittedInputModes & ( EAknEditorKatakanaInputMode |
+ if ( iPermittedInputModes & (EAknEditorKatakanaInputMode |
EAknEditorHalfWidthTextInputMode |
EAknEditorFullWidthTextInputMode |
EAknEditorFullWidthKatakanaInputMode |
EAknEditorHiraganaKanjiInputMode |
- EAknEditorHiraganaInputMode
- | EAknEditorHangulInputMode ) )
+ EAknEditorHiraganaInputMode))
{
iPermittedInputModes |= EAknEditorTextInputMode;
}
@@ -10697,13 +10770,12 @@
if ( !(defaultInputMode & (EAknEditorTextInputMode | EAknEditorNumericInputMode)))
{
- if ( defaultInputMode & ( EAknEditorKatakanaInputMode |
+ if (defaultInputMode & (EAknEditorKatakanaInputMode |
EAknEditorHalfWidthTextInputMode|
EAknEditorFullWidthTextInputMode |
EAknEditorFullWidthKatakanaInputMode |
EAknEditorHiraganaKanjiInputMode |
- EAknEditorHiraganaInputMode
- | EAknEditorHangulInputMode ) )
+ EAknEditorHiraganaInputMode))
{
defaultInputMode = EAknEditorTextInputMode;
}
@@ -10791,7 +10863,7 @@
{
if (IsKoreanInputLanguage())
{
- if( iMode == EAknEditorNullInputMode )
+ if(iMode == EHangul || iMode == ENumber || iMode == EAknEditorNullInputMode )
{
SetWesternPredictive(EFalse);
TryChangeModeL(EHangul);
@@ -10807,12 +10879,6 @@
TryChangeModeL(ELatin);
}
}
- else if ( editorMode == EAknEditorHangulInputMode )
- {
- // Choose EHangul as the current fep mode
- // if the editor mode stored in editor state is EAknEditorHangulInputMode.
- TryChangeModeL(EHangul);
- }
else if (!iStrokeUsedInQWERTY)
{
if (editorMode == EStroke && sharedDataMode == ECangJie)
@@ -11423,7 +11489,7 @@
}
break;
case EHangul:
- editorMode = EAknEditorHangulInputMode;
+ editorMode = EAknEditorTextInputMode;
break;
default:
if (IsFeatureSupportedJapanese())
@@ -12296,30 +12362,31 @@
}
if (!iLanguageCapabilities.iLocalInputLanguageInUse)
- {
- switch (iSharedDataInterface->InputTextLanguage())
- {
- case ELangPrcChinese:
- {
- iSharedDataInterface->SetInputMode(EPinyin);
- SetFlag(EFlagNewSharedDataInputMode);
- break;
- }
+ {
+ switch (iSharedDataInterface->InputTextLanguage())
+ {
+ case ELangPrcChinese:
+ {
+ iSharedDataInterface->SetInputMode(EPinyin);
+ SetFlag(EFlagNewSharedDataInputMode);
+ break;
+ }
case ELangTaiwanChinese:
- {
- iSharedDataInterface->SetInputMode(EZhuyin);
- SetFlag(EFlagNewSharedDataInputMode);
- break;
- }
- case ELangHongKongChinese:
- {
- iSharedDataInterface->SetInputMode(EStroke);
- SetFlag(EFlagNewSharedDataInputMode);
- break;
- }
- default:
- break;
- }
+ {
+ iSharedDataInterface->SetInputMode(EZhuyin);
+ SetFlag(EFlagNewSharedDataInputMode);
+ break;
+ }
+ case ELangHongKongChinese:
+ {
+ iSharedDataInterface->SetInputMode(EStroke);
+ iSharedDataInterface->SetCangJieMode(ECangJieNormal);
+ SetFlag(EFlagNewSharedDataInputMode);
+ break;
+ }
+ default:
+ break;
+ }
}
SetHashKeyStyle();
@@ -13864,16 +13931,6 @@
}
}
}
-
- if ( FeatureManager::FeatureSupported(KFeatureIdKorean) )
- {
- // Use the special sct resource file for Korean variant.
- if (currentEditorSCTResId == R_AVKON_SPECIAL_CHARACTER_TABLE_DIALOG)
- {
- currentEditorSCTResId = R_AVKON_SPECIAL_CHARACTER_TABLE_DIALOG_KOREAN;
- }
- }
-
if (currentEditorSCTResId == EDefaultSCTResourceId) // -1 forces the default in SCT resource definition
{
if (iAknEditorFlags & EAknEditorFlagLatinInputModesOnly)
@@ -13908,12 +13965,7 @@
if ( FeatureManager::FeatureSupported(KFeatureIdChinese) )
{
currentEditorSCTResId = R_AVKON_SPECIAL_CHARACTER_TABLE_DIALOG_CHINESE;
- }
- else if( FeatureManager::FeatureSupported(KFeatureIdKorean) )
- {
- // Use the special sct resource file for Korean variant.
- currentEditorSCTResId = R_AVKON_SPECIAL_CHARACTER_TABLE_DIALOG_KOREAN;
- }
+ }
else
{
currentEditorSCTResId = R_AVKON_SPECIAL_CHARACTER_TABLE_DIALOG;
@@ -15228,26 +15280,6 @@
{
return response;
}
-
- // You will not understand the flowing lines,
- // for it is just a "hole stem" than normal logic.
- //
- // Let me explain:
- // In HWR, 4x12 keyboard is used, and predictive should be disabled for it.
- // unfortunately, the existed codes enable predictive in some special case.
- // when you switch from FSQ to HWR, with ITI on, you will get that.
- // then if you press arrow key,
- // the code blow of "HandlePredictiveNaviEventOutsideInlineEditL" will be called.
- // which is writen for FSQ, not HWR, that finally cause navi-event being consumed.
- // No navigation action being performed.
- //
- // It is not a complete fix, just for simplicity.
- if (iFepPluginManager &&
- iFepPluginManager->PluginInputMode() == EPluginInputModeFingerHwr)
- {
- return EKeyWasNotConsumed;
- }
-
if (WesternPredictive())
{
response = HandlePredictiveNaviEventOutsideInlineEditL(aCode, aLength);
@@ -15601,24 +15633,7 @@
// we have text selected - set cursor to start/end of current selection
TTmDocPosSpec newPos;
aResponse = NavigateFromSelectionL( currentEditorSelection, naviEvent, newPos );
-
- // You will not understand the following lines,
- // for it is just a "hole stem" than normal logic.
- //
- // Let me explain:
- // In HWR, 4x12 keyboard is used, and predictive should be disabled for it.
- // unfortunately, the existing codes enable predictive in some special case.
- // when you switch from FSQ to HWR, with ITI on, you will get that.
- // then if you select some words and press arrow key,
- // the if bratch of the code blow will be excuted.
- // which is writen for FSQ, not HWR,
- // MoveCursorToEndOfWordL or MoveCursorToStartOfWordL is called unexpected
- //
- // It is not a complete fix, just for simplicity.
- TBool isFingerHwr = ( iFepPluginManager != NULL ) &&
- ( iFepPluginManager->PluginInputMode() == EPluginInputModeFingerHwr );
-
- if ( aCode != EKeyBackspace && !isFingerHwr && WesternPredictive() )
+ if ( aCode != EKeyBackspace && WesternPredictive() )
{
if (CursorInsideWord())
{
@@ -18390,14 +18405,6 @@
charMap = R_AVKON_SPECIAL_CHARACTER_TABLE_DIALOG_CHINESE;
}
}
- else if ( FeatureManager::FeatureSupported(KFeatureIdKorean) )
- {
- // Use the special sct resource file for Korean variant.
- if (charMap == R_AVKON_SPECIAL_CHARACTER_TABLE_DIALOG)
- {
- charMap = R_AVKON_SPECIAL_CHARACTER_TABLE_DIALOG_KOREAN;
- }
- }
if (!charMap)
{
// override numeric keymap if necessary. flag is for non standard charmaps
@@ -18417,7 +18424,10 @@
{
currentEditorSCTResId = charMap;
}
- if(R_AKNFEP_SCT_NUMERIC_MODE_CHARS_PLAIN == charMap)
+ if(R_AKNFEP_SCT_NUMERIC_MODE_CHARS_PLAIN == charMap &&
+ ( R_AVKON_SPECIAL_CHARACTER_TABLE_DIALOG_LATIN_ONLY == currentEditorSCTResId ||
+ R_AVKON_SPECIAL_CHARACTER_TABLE_DIALOG == currentEditorSCTResId ||
+ R_AVKON_URL_SPECIAL_CHARACTER_TABLE_DIALOG == currentEditorSCTResId) )
{
TBool isEmpty = ETrue;
TRAP_IGNORE(isEmpty = GetSctLengthL(charMap));
@@ -18531,7 +18541,7 @@
{
SetStopProcessFocus(ETrue, EFalse);
iFepPluginManager->SetMenuState();
- }
+ }
else if (!iFepPluginManager->IsGlobleNotes())
{
iFepPluginManager->ClosePluginInputUiL( ETrue );
@@ -18589,9 +18599,10 @@
iFepPluginManager->PluginInputMode() == EPluginInputModeFSQ ||
iFepPluginManager->PluginInputMode() == EPluginInputModeFingerHwr ||
iFepPluginManager->PluginInputMode() == EPluginInputModePortraitFSQ )
+
{
SetStopProcessFocus(EFalse);
- }
+ }
else
{
HandleChangeInFocus();
@@ -18969,9 +18980,11 @@
}
void CAknFepManager::HandlePointerEventL(const TPointerEvent& aPointerEvent)
{
- if (IsFlagSet(CAknFepManager::EFlagNoMatches))
- {
- ClearFlag(CAknFepManager::EFlagNoMatches);
+ if ( IsFlagSet( CAknFepManager::EFlagNoMatches ) )
+ {
+ // Set this flag to launch spell mode on split itut
+ SetExtendedFlag( EExtendedFlagPointInNoMatchEditor );
+ ClearFlag(CAknFepManager::EFlagNoMatches);
}
if(aPointerEvent.iType == TPointerEvent::EDrag)
@@ -20007,7 +20020,19 @@
switch(aEventCode)
{
case EEventKeyDown:
- ActivateFnkeyPressMonitor();
+ {
+ //if current state of fn key is EFnKeyNone or EFnKeyNext..., EFnKeyLock will be set;
+ //otherwise, EFnKeyNone will be set.
+ if ( iFnKeyManager->FnKeyState() == CAknFepFnKeyManager::EFnKeyLock )
+ {
+ ClearExtendedFlag( EExtendedFlagFnKeyNeedLockMode );
+ }
+ else
+ {
+ SetExtendedFlag( EExtendedFlagFnKeyNeedLockMode );
+ }
+ ActivateFnkeyPressMonitor();
+ }
break;
case EEventKeyUp:
{
@@ -20015,6 +20040,10 @@
{
//when long pressing event occurrs,
//event has been already handled in HandleFnKeyPressMonitorCallback()
+ if ( !IsExtendedFlagSet ( EExtendedFlagFnKeyNeedLockMode ))
+ {
+ iFnKeyManager->SetFnKeyState(CAknFepFnKeyManager::EFnKeyNone);
+ }
return EKeyWasConsumed;
}
//when short pressing event occurs,
@@ -21248,21 +21277,10 @@
//
void CAknFepManager::HandleFnKeyPressMonitor()
{
- DeactivateFnkeyPressMonitor();
-
- //if previous state of fn key is EFnKeyNone or EFnKeyNext, EFnKeyLock will be set;
- //otherwise, if previous state is EFnKeyLock, EFnKeyNone will be set.
- switch(iFnKeyManager->FnKeyState())
- {
- case CAknFepFnKeyManager::EFnKeyPressed:
- case CAknFepFnKeyManager::EFnKeyPressedAgain:
- iFnKeyManager->SetFnKeyState(CAknFepFnKeyManager::EFnKeyLock);
- break;
- case CAknFepFnKeyManager::EFnKeyDown:
- iFnKeyManager->SetFnKeyState(CAknFepFnKeyManager::EFnKeyNone);
- break;
- default:
- break;
+ DeactivateFnkeyPressMonitor();
+ if (IsExtendedFlagSet ( EExtendedFlagFnKeyNeedLockMode ) )
+ {
+ iFnKeyManager->SetFnKeyState(CAknFepFnKeyManager::EFnKeyLock);
}
}
@@ -21274,7 +21292,11 @@
void CAknFepManager::ActivateFnkeyPressMonitor()
{
if( iFnKeypressMonitor )
- {
+ {
+ if ( iFnKeypressMonitor->IsActive() )
+ {
+ iFnKeypressMonitor->Cancel();
+ }
iFnKeypressMonitor->Start(KFnKeyLongPressTimeout, KFnKeyLongPressTimeout,
TCallBack(HandleFnKeyPressMonitorCallback, this));
}
--- a/fep/aknfep/src/AknFepPluginManager.cpp Fri Sep 17 17:26:50 2010 +0100
+++ b/fep/aknfep/src/AknFepPluginManager.cpp Fri Oct 22 15:38:27 2010 +0100
@@ -60,6 +60,7 @@
#include <AknFepGlobalEnums.h>
#include <AknFepInternalCRKeys.h>
#include <AknFepInternalPSKeys.h>
+#include <aknFepVietnameseInputTables.h>
// User includes
#include "AknFepManagerInterface.h" // MAknFepManagerInterface
@@ -316,10 +317,7 @@
if( !iPenInputSvrConnected || !iPenInputServer.IsVisible() || iPenInputServer.IsDimmed() )
{
if( iFepMan.FepAwareTextEditor() )
- {
- // Enable transition effect when close pen ui
- // by pressing close button.
- iPenInputServer.EnableGfxTransEffect( ETrue );
+ {
iPreferredUiMode = ETrue;
TryChangePluginInputModeByModeL((TPluginInputMode)(iSharedData.PluginInputMode()),
EPenInputOpenManually,
@@ -577,8 +575,6 @@
}
break;
case ESignalLayoutClosed:
- // Enable transition effect when close pen ui by pressing close button.
- iPenInputServer.EnableGfxTransEffect( ETrue );
if(iPluginInputMode == EPluginInputModeItut)
{
iFepMan.PtiEngine()->CancelTimerActivity();
@@ -678,17 +674,21 @@
TInt activeIdx = 0;
CDesCArray* candidates = new (ELeave) CDesCArrayFlat
( KDefaultCandidateArraySize );
- CleanupStack::PushL( candidates );
- iFepMan.GetCandidatesL(*candidates, activeIdx);
-
- TFepITICandidateList candidateListData;
- candidateListData.iItemArray = candidates;
- candidateListData.iActiveIndex
- = ( candidates->Count() >= 2 ) ? 1 : activeIdx;
- candidateListData.iLangCode = iFepMan.CurrentInputLangCode();
-
- ShowCandidateListL( candidateListData );
- CleanupStack::PopAndDestroy( candidates );
+ CleanupStack::PushL( candidates );
+ iFepMan.GetCandidatesL(*candidates, activeIdx);
+
+ TFepITICandidateList candidateListData;
+ candidateListData.iItemArray = candidates;
+ candidateListData.iActiveIndex
+ = ( candidates->Count() >= 2 ) ? 1 : activeIdx;
+ candidateListData.iLangCode = iFepMan.CurrentInputLangCode();
+ if ( iLangMan.IsSplitView() )
+ {
+ candidateListData.iRect = iFepMan.InitRectForSplitCandL();
+ }
+
+ ShowCandidateListL( candidateListData );
+ CleanupStack::PopAndDestroy( candidates );
}
break;
@@ -923,7 +923,7 @@
return edwinState;
}
-
+
// -----------------------------------------------------------------------------
// CAknFepPluginManager::HandleEventsFromFepL
// Handle events from FEP
@@ -1332,21 +1332,6 @@
}
}
- if(aSuggestMode == EPluginInputModeFingerHwr
- && iSharedData.InputTextLanguage() == ELangArabic)
- {
- if(IsEditorSupportSplitIme())
- {
- if(landscape)
- {
- aSuggestMode = EPluginInputModeFSQ;
- }
- else
- {
- aSuggestMode = iSharedData.PluginPortraitInputMode();
- }
- }
- }
if ( aSuggestMode == EPluginInputModeFSQ)
{
@@ -1496,6 +1481,15 @@
// Notify application touch window state
NotifyAppUiImeTouchWndStateL( ETrue );
+ if (iPluginInputMode == EPluginInputModeItut)
+ {
+ RProperty::Set( KPSUidAknFep, KAknFepVirtualKeyboardType, EPtiKeyboard12Key );
+ if(iFepMan.PtiEngine())
+ {
+ iFepMan.PtiEngine()->SetKeyboardType(EPtiKeyboard12Key);
+ }
+ iFepMan.SetQwertyMode( EFalse );
+ }
rtn = ETrue;
}
@@ -1886,7 +1880,6 @@
ProcessChangingInputModeCmdL(EPluginInputModeFSQ);
}
}
-
break;
// "Edit landscape" menu - switch to landscape FSQ
case EPeninputCmdLandscapeEditor:
@@ -2252,9 +2245,6 @@
TInt disabledInputMode = iPenInputServer.DisabledLayout();
TInt curInputMode = iLangMan.CurrentImePlugin()->CurrentMode();
TBool isChinese = iFepMan.IsChineseInputLanguage();
- TBool isKorean = iFepMan.IsKoreanInputLanguage();
- // similar with chinese layout, there is a switching button,so when writing language is korean
- // no need to insert 'Qwerty' or 'Alphabet keypad' item into option menu
/* US2/US4/US5
1. Orientation sensor off
@@ -2298,7 +2288,7 @@
// 1) Non-Chinese language
// 2) Current input mode is not portrait FSQ and also the mode is not disabled
// 3) Current orientation is portrait
- if ( !isKorean && !isChinese
+ if ( !isChinese
&& ( curInputMode != EPluginInputModePortraitFSQ )
&& !( disabledInputMode & EPluginInputModePortraitFSQ )
&& isPortrait )
@@ -2309,7 +2299,7 @@
}
else
{
- if ( !isKorean && !isChinese && ( curInputMode != EPluginInputModeFSQ )
+ if ( !isChinese && ( curInputMode != EPluginInputModeFSQ )
&& !( disabledInputMode & EPluginInputModeFSQ )
&& FeatureManager::FeatureSupported( KFeatureIdVirtualFullscrQwertyInput ) )
{
@@ -2321,7 +2311,7 @@
// 1) Non-Chinese language
// 2) Current input mode is not ITU-T and also the mode is not disabled
// 3) ITU-T feature flag is enabled
- if ( !isKorean && !isChinese
+ if ( !isChinese
&& ( curInputMode != EPluginInputModeItut )
&& !( disabledInputMode & EPluginInputModeItut )
&& FeatureManager::FeatureSupported( KFeatureIdVirtualItutInput ) )
@@ -2334,7 +2324,7 @@
// 3) Current input mode is not portrait FSQ and also the mode is not disabled
// 4) Current orientation is landscape
if ( iPortraitFSQEnabled
- && !isKorean && !isChinese
+ && !isChinese
&& ( curInputMode != EPluginInputModePortraitFSQ )
&& !( disabledInputMode & EPluginInputModePortraitFSQ )
&& !isPortrait )
@@ -2351,7 +2341,7 @@
// 5) Current orientation is portrait
if ( iPortraitFSQEnabled
&& FeatureManager::FeatureSupported( KFeatureIdVirtualFullscrQwertyInput )
- && !isKorean && !isChinese
+ && !isChinese
&& ( curInputMode != EPluginInputModeFSQ )
&& !( disabledInputMode & EPluginInputModeFSQ )
&& isPortrait )
@@ -2421,31 +2411,15 @@
//Show number mode menu item.
if(iFepMan.InputMode() == ENumber || iFepMan.InputMode() == ENativeNumber)
{
- CAknEdwinState* editorState = iFepMan.EditorState();
- TUint permittedInputModes;
- if( editorState )
+ if(iSharedData.DefaultArabicNumberMode())
{
- permittedInputModes= editorState->PermittedInputModes();
+ aMenuPane->SetItemDimmed(EAknCmdEditModeNumber, EFalse);
}
else
{
- permittedInputModes = EAknEditorNumericInputMode;
- }
- TBool IsOnlyNumericPermitted = !(permittedInputModes
- &(EAknEditorTextInputMode | EAknEditorSecretAlphaInputMode));
- if(IsOnlyNumericPermitted)
- {
- if(iSharedData.DefaultArabicNumberMode())
- {
- aMenuPane->SetItemDimmed(EAknCmdEditModeNumber, EFalse);
- }
- else
- {
- aMenuPane->SetItemDimmed(EAknCmdEditModeArabicIndicNumber, EFalse);
- }
+ aMenuPane->SetItemDimmed(EAknCmdEditModeArabicIndicNumber, EFalse);
}
}
-
// add the writing speed menu
index = 0;
if(aMenuPane->MenuItemExists(EPenInputCmdWritingSpeed, index))
@@ -2500,11 +2474,8 @@
return;
}
- // if pen ui is being opened on a non-global editor, which popped by capserver or notify server,
- // and also other global notes from capserver or notify server pop up at the moment,
- // pen ui should be dimmed as the definitino of dim feature.
- // Set bClose = EFalse is used to prevent from closing pen ui later.
- if( !iLaunchMenu && IsGlobalNotesApp(focusAppId) && !IsInGlobleNoteEditor() )
+ if( !iLaunchMenu && IsGlobalNotesApp(focusAppId))
+
{
if ( iPluginInputMode == EPluginInputModeItut ||
iPluginInputMode == EPluginInputModeFSQ ||
@@ -2727,6 +2698,11 @@
icfData.iCmd = EPeninputICFInitial;
icfData.iText.Set(*iLastEditorContentBuf);
icfData.iCurSel = iCurSelPre;
+ // special case for vietnamese, we need en/disable tone marker
+ // when the text in editor changes,
+ // by checking whether the character before insertion point is vowel or not
+ VietSyncToneMarkerL(*iLastEditorContentBuf, icfData.iCurSel);
+
if ( iFepMan.IsFlagSet(CAknFepManager::EFlagNoMatches) )
{
icfData.iFlag = EFepICFDataInlineNoMatch;
@@ -2850,16 +2826,16 @@
HBufC* currentEditorContentBuf = HBufC::NewLC( editContentLen );
TPtr16 currentEditorContent = currentEditorContentBuf->Des();
edit->GetEditorContentForFep( currentEditorContent, 0, editContentLen );
-
+ // special case for vietnamese, we need en/disable tone marker
+ // when the text in editor changes,
+ // by checking whether the character before insertion point is vowel or not
+ VietSyncToneMarkerL(currentEditorContent, icfData.iCurSel);
+
if (SetSyncIcfDataL( icfData, lastEditorContent, currentEditorContent))
{
iCurrentPluginInputFepUI->HandleCommandL
(ECmdPenInputSendEditorTextAndCurPos, reinterpret_cast<TInt>(&icfData));
- if ( icfData.iMidPos >= 0 )
- {
- // icfData.iMidPos >= 0 means the text which will be sent to ICF is inline text.
- iFepMan.TryPopExactWordInICFL();
- }
+ iFepMan.TryPopExactWordInICFL();
}
if ( secretEditor )
@@ -2879,6 +2855,36 @@
iPreDocumentLengthForFep = editContentLen;
}
+void CAknFepPluginManager::VietSyncToneMarkerL(
+ const TDesC& aEditorContent, const TCursorSelection& aCursorPos)
+ {
+ if(ELangVietnamese != iLangMan.InputLanguage())
+ {
+ return;
+ }
+
+ TBool bEnable = EFalse;
+ TInt low = aCursorPos.LowerPos();
+
+ if(low > 0)
+ {
+ ASSERT(aEditorContent.Length() >= low);
+ TBuf<1> buf = aEditorContent.Mid(low - 1, 1);
+ TBuf<1> vowel;
+ TInt cnt = sizeof(VietVowelList) / sizeof(VietVowelList[0]);
+
+ for(TInt i = 0; !bEnable && i < cnt; ++i)
+ {
+ const TText* text = &VietVowelList[i];
+ vowel.SetLength(0);
+ vowel.Append(text, 1);
+ bEnable = (buf.Compare(vowel) == 0);
+ }
+ }
+
+ iCurrentPluginInputFepUI->HandleCommandL(ECmdPeninputVietSyncToneMarker, bEnable);
+ }
+
TBool CAknFepPluginManager::SetSyncIcfDataL( TFepInputContextFieldData& aIcfData,
const TDesC& aLastEditorContent,
const TDesC& aCurrentEditorContent )
@@ -4819,15 +4825,19 @@
}
void CAknFepPluginManager::SendMatchListCmd(const RArray<TPtrC>& aList)
- {
+ {
TFepITICandidateList list;
list.iActiveIndex = 0;
list.iItemArray2 = &aList;
list.iLangCode = iFepMan.CurrentInputLangCode();
+ if ( iLangMan.IsSplitView() )
+ {
+ TRAP_IGNORE( list.iRect = iFepMan.InitRectForSplitCandL() );
+ }
TRAP_IGNORE(iCurrentPluginInputFepUI->HandleCommandL(ECmdPenInputFingerMatchList,
reinterpret_cast<TInt>(&list)));
- }
+ }
TBool CAknFepPluginManager::GetIndicatorImgID(const TInt IndicatorUID,TInt &aImage, TInt &aMask)
{
@@ -5097,15 +5107,7 @@
{
editorSCTResId = R_AVKON_SPECIAL_CHARACTER_TABLE_DIALOG_CHINESE;
}
- }
- else if (FeatureManager::FeatureSupported(KFeatureIdKorean))
- {
- // Use the special sct resource file for Korean variant.
- if (!editorSCTResId || editorSCTResId == R_AVKON_SPECIAL_CHARACTER_TABLE_DIALOG)
- {
- editorSCTResId = R_AVKON_SPECIAL_CHARACTER_TABLE_DIALOG_KOREAN;
- }
- }
+ }
else if (!editorSCTResId)
{
editorSCTResId = R_AVKON_SPECIAL_CHARACTER_TABLE_DIALOG;
@@ -5984,8 +5986,7 @@
}
TInt flags = editorState->Flags();
- return ( flags & EAknEditorFlagAvkonSecretEditor ) == EAknEditorFlagAvkonSecretEditor;
-
+ return ( flags & EEikEdwinAvkonDisableCursor ) == EEikEdwinAvkonDisableCursor;
}
// ---------------------------------------------------------------------------
@@ -6082,6 +6083,7 @@
// Change to input mode to EPtiEngineQwertyPredictive, after that
// qwerty keymapping can be got
iFepMan.PtiEngine()->SetInputMode( EPtiEngineQwertyPredictive );
+ iFepMan.PtiEngine()->SetKeyboardType(EPtiKeyboardQwerty4x12);
// Find scancode by keycode from qwerty keymapping
TInt retKey = keymapping->KeyForCharacter( aKeyCode );
// Restore the old input mode
@@ -6174,7 +6176,7 @@
if ( oldInputMode != EPtiEngineQwertyPredictive )
{
// if current input mode isn't EPtiEngineQwertyPredictive,
- // current input mode has been set to EPtiEngineQwertyPredictive temporarily before,
+ // current input mode is set to EPtiEngineQwertyPredictive temporarily before,
// now we need to restore it,
// because state machine is responsible for changing it practically.
iFepMan.PtiEngine()->SetInputMode( oldInputMode );
--- a/fep/aknfep/src/AknFepUiInputStateEntryQwertyWesternPredictive.cpp Fri Sep 17 17:26:50 2010 +0100
+++ b/fep/aknfep/src/AknFepUiInputStateEntryQwertyWesternPredictive.cpp Fri Oct 22 15:38:27 2010 +0100
@@ -47,7 +47,6 @@
static const TInt KKeyMappingsLength = 63;
-
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//
TAknFepInputStateEntryQwertyWesternPredictive::
@@ -606,8 +605,6 @@
// Framework will handle the key event.
return EFalse;
}
-
-
// use ptiengine's api to tell whether a character mapped on a given key.
TBool TAknFepInputStateEntryQwertyWesternPredictive::MapAgainst(TInt aKey, TInt aMode, TInt16 aAgainst, TInt aCase) const
{
@@ -624,8 +621,6 @@
}
return EFalse;
}
-
-
// Get Scancode from a given character and tell the case at the same time.
TInt TAknFepInputStateEntryQwertyWesternPredictive::ScanCodeForCharacter( TUint aChar, TPtiTextCase& aCase )
{
--- a/fep/aknfep/src/AknFepUiInputStateEntryWesternPredictive.cpp Fri Sep 17 17:26:50 2010 +0100
+++ b/fep/aknfep/src/AknFepUiInputStateEntryWesternPredictive.cpp Fri Oct 22 15:38:27 2010 +0100
@@ -778,6 +778,17 @@
MAknFepManagerUIInterface* fepMan = iOwner->FepMan();
iIsLastWord = ETrue;
+
+#ifdef RD_SCALABLE_UI_V2
+ // Because this function is a callback function of ptixt9core,
+ // this function is called when gets last candidate, but for virtual intput,
+ // cba should not be updated.
+ if ( fepMan && fepMan->PluginUIManager()
+ && fepMan->PluginUIManager()->PluginInputMode() == EPluginInputModeItut )
+ {
+ return;
+ }
+#endif
if (iMatchState != EWordMatchAfterLast)
{
--- a/fep/aknfep/src/AknFepUiInputStateInitialChineseGenericQwerty.cpp Fri Sep 17 17:26:50 2010 +0100
+++ b/fep/aknfep/src/AknFepUiInputStateInitialChineseGenericQwerty.cpp Fri Oct 22 15:38:27 2010 +0100
@@ -117,7 +117,6 @@
}
return number;
}
-
TBool TAknFepInputStateInitialChineseGenericQwerty::HandleKeyL(TInt aKey, TKeyPressLength aLength)
{
CPtiEngine* ptiengine = iOwner->PtiEngine();
@@ -320,11 +319,6 @@
return response;
}
-//--------------------------------------------------------------------------
-// The gate to decide whether it is a character is whether it has valid mapping
-// If return ETrue, the key will pass to ptiengine.
-//--------------------------------------------------------------------------
-//
TBool TAknFepInputStateInitialChineseGenericQwerty::IsCharacter(TInt aKey)
{
TBool response = EFalse;
@@ -340,8 +334,6 @@
response = ETrue;
}
}
-
- // exception Z might has no mapping but need to put into ptiengine.
if(!response && aKey == EPtiKeyQwertyZ)
{
response = ETrue;
--- a/fep/aknfep/src/AknFepUiInputStateQwerty.cpp Fri Sep 17 17:26:50 2010 +0100
+++ b/fep/aknfep/src/AknFepUiInputStateQwerty.cpp Fri Oct 22 15:38:27 2010 +0100
@@ -698,6 +698,7 @@
CPtiQwertyKeyMappings* maps = static_cast<CPtiQwertyKeyMappings*>(lang->GetQwertyKeymappings());
+ maps->SetKeyboardType(ptiengine->KeyboardType());
TBool keyNotMapToNumeric(ETrue);
#ifdef RD_INTELLIGENT_TEXT_INPUT
if(maps)
@@ -1196,11 +1197,8 @@
}
}
// Disable UI framewroks's qwerty iCode conversion for simulated event.
- numKey.iModifiers |= EModifierSpecial;
-
- //as the editor is a Java number editor, we did not simulate the number key event
- if(!(fepMan->IsHybridAplhaEditor() && !fepMan->IsHybridAlphaModeChangedtoAplhanumeric())
- && !fepMan->IsSpecialNumericEditor() )
+ numKey.iModifiers |= EModifierSpecial;
+ if(!(fepMan->IsHybridAplhaEditor() && !fepMan->IsHybridAlphaModeChangedtoAplhanumeric()))
{
CCoeEnv::Static()->SimulateKeyEventL(numKey, EEventKey);
#ifdef RD_INTELLIGENT_TEXT_INPUT
--- a/fep/aknfep/src/AknFepUiManagerBase.cpp Fri Sep 17 17:26:50 2010 +0100
+++ b/fep/aknfep/src/AknFepUiManagerBase.cpp Fri Oct 22 15:38:27 2010 +0100
@@ -1022,7 +1022,6 @@
{
return iFepMan->ZhuyinAnalyser();
}
-
TBool CAknFepUIManagerBase::MapAgainst(TInt aKey, TInt aMode, TInt16 aAgainst, TInt aCase) const
{
if(iPtiEngine)
@@ -1037,4 +1036,5 @@
}
return EFalse;
}
+
// End of file
--- a/fep/aknfep/src/AknFepUiManagerChinese.cpp Fri Sep 17 17:26:50 2010 +0100
+++ b/fep/aknfep/src/AknFepUiManagerChinese.cpp Fri Oct 22 15:38:27 2010 +0100
@@ -133,7 +133,6 @@
const TInt16 KStrokeUnicode = 0x2461;
const TInt16 KZhuyinIndicator = 0x2462;
const TInt16 KPinyinIndicator = 0x2460;
-//const TInt16 KStrokeIndicator = 0x2461;
const TInt16 KCanjieIndicator = 0x2463;
const TInt16 KChineseTone1 = 0x02c9;
const TInt16 KChineseTone2 = 0x02ca;
--- a/fep/aknfep/src/AknFepUiManagerKorean.cpp Fri Sep 17 17:26:50 2010 +0100
+++ b/fep/aknfep/src/AknFepUiManagerKorean.cpp Fri Oct 22 15:38:27 2010 +0100
@@ -219,17 +219,14 @@
{
switch(iMode)
{
- case EHangul:
+ case ELatin:
+ {
iFepUiState = TAknFepInputStateQwertyKorean(this);
- break;
- case ELatin:
- case ENumber:
- case ENativeNumber:
- iFepUiState = TAknFepInputStateQwerty(this);
- break;
+ break;
+ }
default:
- AknFepPanic(EAknFepPanicBadInputState);
- break;
+ AknFepPanic(EAknFepPanicBadInputState);
+ break;
}
break;
}
--- a/fep/aknfep/src/aknfepuiinputminiqwertypinyinphrasebase.cpp Fri Sep 17 17:26:50 2010 +0100
+++ b/fep/aknfep/src/aknfepuiinputminiqwertypinyinphrasebase.cpp Fri Oct 22 15:38:27 2010 +0100
@@ -1306,7 +1306,6 @@
uiContainer->SetControlInVisible( EFalse );
}
}
-
//-------------------------------------------------------------------------------
// Purpose: to adjust the scancode to make pinyin works
// Pinyin symbol inheritantly accepts A-Z, any input out of this range will make it crash.
@@ -1327,6 +1326,7 @@
}
}
}
+
// ---------------------------------------------------------------------------
// TAknFepInputMiniQwertyPinyinPhraseBase::GetShowKeystroke
//Handle horizontal navigation.
@@ -1701,7 +1701,6 @@
}
GetShowKeystroke(aKey, keystroke);
-
//Add this condition to avoid crash in case keystroke is empty.
if(keystroke.Length() == 0)
{
--- a/fep/aknfep/src/aknfepuiinputstateminiqwertyzhuyinphrase.cpp Fri Sep 17 17:26:50 2010 +0100
+++ b/fep/aknfep/src/aknfepuiinputstateminiqwertyzhuyinphrase.cpp Fri Oct 22 15:38:27 2010 +0100
@@ -513,7 +513,7 @@
fepMan->NewTextL( currentText );
fepMan->CommitInlineEditL();
}
-
+
if ( fepMan->IsFlagSet( CAknFepManager::EFlagEditorFull ) )
{
fepMan->ClearFlag( CAknFepManager::EFlagEditorFull );
--- a/fep/aknfep/src/aknfepuiinputstateqwertykorean.cpp Fri Sep 17 17:26:50 2010 +0100
+++ b/fep/aknfep/src/aknfepuiinputstateqwertykorean.cpp Fri Oct 22 15:38:27 2010 +0100
@@ -24,9 +24,7 @@
#include <PtiEngine.h>
#include <PtiDefs.h>
#include <PtiKeyMappings.h>
-#include <PtiDefs.h>
-
-const TInt KMaxPtiTextBufSize = 255;
+#include <PtiDefs.h>
TAknFepInputStateQwertyKorean::TAknFepInputStateQwertyKorean(
MAknFepUIManagerStateInterface* aOwner)
@@ -41,113 +39,42 @@
{
}
-TBool TAknFepInputStateQwertyKorean::HandleKeyL(TInt aKey, TKeyPressLength aLength)
- {
- MAknFepManagerUIInterface* fepMan = iOwner->FepMan();
- CPtiEngine* ptiengine = iOwner->PtiEngine();
- TBool ret = ETrue;
-
- switch( aKey )
- {
- case EKeyDelete:
- case EStdKeyDelete:
- case EKeyBackspace:
- case EStdKeyBackspace:
- {
- if (fepMan->IsFlagSet(CAknFepManager::EFlagInsideInlineEditingTransaction))
- {
- TPtrC newText = ptiengine->DeleteKeyPress();
- if( newText.Length() > 0 )
- {
- fepMan->UpdateInlineEditL(newText, newText.Length());
- }
- else
- {
- fepMan->CancelInlineEdit();
- ptiengine->ClearCurrentWord();
- }
- }
- else
- {
- ret = EFalse;
- }
- }
- break;
- case EStdKeyEnter:
- case EStdKeySpace:
- case EStdKeyTab:
- case EStdKeyLeftArrow:
- case EStdKeyRightArrow:
- case EStdKeyDownArrow:
- case EStdKeyUpArrow:
- {
- fepMan->CommitInlineEditL();
- ptiengine->CommitCurrentWord();
- ret = EFalse;
- }
- break;
- default:
- {
- //normal character handled here
- if ( EShortKeyPress == aLength )
- {
- if (!(fepMan->IsFlagSet(CAknFepManager::EFlagInsideInlineEditingTransaction)))
- {
- // start inline edit
- ptiengine->ClearCurrentWord();
- fepMan->StartInlineEditL();
- fepMan->SetInlineEditingCursorVisibilityL(ETrue);
- }
-
- TPtrC aText = ptiengine->AppendKeyPress((TPtiKey)aKey);
- if( aText.Length() > 0 )
- {
- fepMan->UpdateInlineEditL(aText, aText.Length());
- if( aText.Length() >= KMaxPtiTextBufSize )
- {
- // force commit
- fepMan->CommitInlineEditL();
- ptiengine->CommitCurrentWord();
- }
- }
- }
- else // long press
- {
- if (!fepMan->IsFlagSet(CAknFepManager::EFlagInsideInlineEditingTransaction))
- {
- return ETrue;
- }
-
- //delete last input text
- TPtrC text = ptiengine->DeleteKeyPress();
- if( text.Length() >0 )
- {
- fepMan->UpdateInlineEditL(text, text.Length());
- }
-
- // add new text
- TPtiTextCase previousCase = ptiengine->Case();
- switch ( previousCase )
- {
- case EPtiCaseLower:
- case EPtiCaseUpper:
- ptiengine->SetCase( EPtiCaseFnLower );
- break;
- default:
- break;
- }
-
- TPtrC newText = ptiengine->AppendKeyPress((TPtiKey)aKey);
- if( newText.Length() >0 )
- {
- fepMan->UpdateInlineEditL(newText, newText.Length());
- }
- ptiengine->SetCase( previousCase );
- fepMan->CommitInlineEditL();
- ptiengine->ClearCurrentWord();
- }
- }
- break;
- }
- return ret;
+TBool TAknFepInputStateQwertyKorean::HandleKeyL(TInt aKey, TKeyPressLength /*aLength*/)
+ {
+// LOG2("KO.IS.QWERTY.HandleKeyL %d,%d",aKey,aLength);
+ CPtiEngine& ptiEngine(*(iOwner->PtiEngine()));
+ MAknFepManagerUIInterface& fepMan(*(iOwner->FepMan()));
+
+ TPtrC text(ptiEngine.AppendKeyPress((TPtiKey)aKey));
+ TBuf<1> chr;
+ for (TInt jj = 0; jj < text.Length(); jj++)
+ {
+ chr.Zero();
+ chr.Append(text[jj]);
+ fepMan.NewCharacterL(chr);
+ }
+ return ETrue;
}
+
+void TAknFepInputStateQwertyKorean::KeyTimerExpired()
+ {
+// LOG1("KO.IS.QWERTY.KeyTimerExpired %d",iData);
+ CPtiEngine& ptiEngine(*(iOwner->PtiEngine()));
+ MAknFepManagerUIInterface& fepMan(*(iOwner->FepMan()));
+
+ TPtrC text(ptiEngine.CurrentWord());
+ TBuf<1> chr;
+ for (TInt jj = 0; jj < text.Length(); jj++)
+ {
+ chr.Zero();
+ chr.Append(text[jj]);
+ TRAP_IGNORE( fepMan.NewCharacterL(chr) );
+ }
+
+ //TRAPD(err, fepMan.CommitInlineEditL())
+ TRAP_IGNORE( fepMan.CommitInlineEditL() )
+ }
+
+//fepMan.StartInlineEditL(text);
+//iFepMan.StartInlineEditL()
+//virtual void SetCursorSelectionL(const TCursorSelection& aCurSel, TBool aSyncCursor) = 0;
--- a/inputmethods_plat/aknfep_pen_support_api/inc/aknfeppeninputenums.h Fri Sep 17 17:26:50 2010 +0100
+++ b/inputmethods_plat/aknfep_pen_support_api/inc/aknfeppeninputenums.h Fri Oct 22 15:38:27 2010 +0100
@@ -177,12 +177,14 @@
ECmdPenInputHideCandidateList,
ECmdPeninputITIStatus,
ECmdPeninputSpellLanguageMode,
- ECmdPeninputSpellICFDisplayContent,
- ECmdPenInputDimEnterKey,
+ ECmdPeninputSpellICFDisplayContent,
+ ECmdPenInputDimEnterKey,
ECmdPeninputEnableOwnBitmap,
- ECmdPeninputDisableLayoutDrawing,
- ECmdPeninputArabicNumModeChanged,
+ ECmdPeninputDisableLayoutDrawing,
+ ECmdPeninputArabicNumModeChanged,
ECmdPeninputEnalbeLayoutReDrawWhenActive,
+ ECmdPeninputVietSyncToneMarker,
+ ECmdPeninputSelectServerCandidate,
ECmdPenInputImeCmdBase = 2000
};
@@ -235,7 +237,19 @@
//Abc
ECaseText = 4,
//aBC
- ECaseInverseText = 8
+ ECaseInverseText = 8,
+ // Paging 1/1 for number & special characters
+ ECaseNumberSpecialPaging11 = 0x10,
+ // Paging 1/2 for number & special characters
+ ECaseNumberSpecialPaging12 = 0x20,
+ // Paging 2/2 for number & special characters
+ ECaseNumberSpecialPaging22 = 0x40,
+ // Paging 1/1 for number & special characters
+ ECaseNumberSpecialPagingArabic11 = 0x80,
+ // Paging 1/2 for number & special characters
+ ECaseNumberSpecialPagingArabic12 = 0x100,
+ // Paging 2/2 for number & special characters
+ ECaseNumberSpecialPagingArabic22 = 0x200
};
--- a/inputmethods_plat/aknfep_settings_api/inc/AknFepInternalCRKeys.h Fri Sep 17 17:26:50 2010 +0100
+++ b/inputmethods_plat/aknfep_settings_api/inc/AknFepInternalCRKeys.h Fri Oct 22 15:38:27 2010 +0100
@@ -380,47 +380,6 @@
* and the default value is EPluginInputModeItut.
*/
const TUint32 KAknFepLastUsedPortraitInput = 0x00000026;
-
-/**
- * following keys are used for tap accuracy enhancement, default input mode
- */
-const TUint32 KAknFepTapAccuracyDefaultButtonExtMargins = 0x27;
-const TUint32 KAknFepTapAccuracyDefaultKeyCtrlExtMargins = 0x28;
-const TUint32 KAknFepTapAccuracyDefaultPointerMoveMaxMovement = 0x29;
-const TUint32 KAknFepTapAccuracyDefaultPointerMoveTimeout = 0x2a;
-const TUint32 KAknFepTapAccuracyDefaultPointerUpMaxMovement = 0x2b;
-const TUint32 KAknFepTapAccuracyDefaultPointerUpTimeout = 0x2c;
-
-/**
- * following keys are used for tap accuracy enhancement, FSQ
- */
-const TUint32 KAknFepTapAccuracyFsqButtonExtMargins = 0x2d;
-const TUint32 KAknFepTapAccuracyFsqKeyCtrlExtMargins = 0x2e;
-const TUint32 KAknFepTapAccuracyFsqPointerMoveMaxMovement = 0x2f;
-const TUint32 KAknFepTapAccuracyFsqPointerMoveTimeout = 0x30;
-const TUint32 KAknFepTapAccuracyFsqPointerUpMaxMovement = 0x31;
-const TUint32 KAknFepTapAccuracyFsqPointerUpTimeout = 0x32;
-
-/**
- * following keys are used for tap accuracy enhancement, Portrait FSQ
- */
-const TUint32 KAknFepTapAccuracyPFsqButtonExtMargins = 0x33;
-const TUint32 KAknFepTapAccuracyPFsqKeyCtrlExtMargins = 0x34;
-const TUint32 KAknFepTapAccuracyPFsqPointerMoveMaxMovement = 0x35;
-const TUint32 KAknFepTapAccuracyPFsqPointerMoveTimeout = 0x36;
-const TUint32 KAknFepTapAccuracyPFsqPointerUpMaxMovement = 0x37;
-const TUint32 KAknFepTapAccuracyPFsqPointerUpTimeout = 0x38;
-
-/**
- * following keys are used for tap accuracy enhancement, Finger HWR
- */
-const TUint32 KAknFepTapAccuracyFhwrButtonExtMargins = 0x39;
-const TUint32 KAknFepTapAccuracyFhwrKeyCtrlExtMargins = 0x3a;
-const TUint32 KAknFepTapAccuracyFhwrPointerMoveMaxMovement = 0x3b;
-const TUint32 KAknFepTapAccuracyFhwrPointerMoveTimeout = 0x3c;
-const TUint32 KAknFepTapAccuracyFhwrPointerUpMaxMovement = 0x3d;
-const TUint32 KAknFepTapAccuracyFhwrPointerUpTimeout = 0x3e;
-
#endif
// End of file
--- a/inputmethods_plat/pen_input_server_api/inc/peninputclient.h Fri Sep 17 17:26:50 2010 +0100
+++ b/inputmethods_plat/pen_input_server_api/inc/peninputclient.h Fri Oct 22 15:38:27 2010 +0100
@@ -428,7 +428,6 @@
IMPORT_C TInt ConnectAsyc(TRequestStatus& aStatus);
IMPORT_C void SetDataQueryPopped(TBool aFlag);
IMPORT_C void EnablePriorityChangeOnOriChange(TBool aEnabled);
- IMPORT_C void EnableGfxTransEffect( TBool aEnable );
private: // Data
/**
* The singleton client to the input server
--- a/inputmethods_plat/pen_input_server_api/inc/peninputcmd.h Fri Sep 17 17:26:50 2010 +0100
+++ b/inputmethods_plat/pen_input_server_api/inc/peninputcmd.h Fri Oct 22 15:38:27 2010 +0100
@@ -75,7 +75,6 @@
EPeninputOpLastCommand ,
EPeninputOpRequestDSAState,
EPeninputOpChangeFeedbackType,
- EPeninputOpUpdatePointerSuppressor,
EPeninputUserCmdBase = 1000
};
@@ -113,7 +112,8 @@
ESignalDisableUpdating,
ESignalDrawBackground,
ESignalEnableLayoutRedrawWhenActive,
- ESignalUpdatePointerSuppressor,
+ ESignalShowServerCandidate,
+ ESignalHideServerCandidate,
ESignalFepEventBase = 1500, //Event base for Fep. All fep event
//is re-directed to Fep.
ESignalKeyEvent = 1501, //hwr recongition selection event.
--- a/inputmethods_plat/pen_input_server_api/inc/peninputcmdparam.h Fri Sep 17 17:26:50 2010 +0100
+++ b/inputmethods_plat/pen_input_server_api/inc/peninputcmdparam.h Fri Oct 22 15:38:27 2010 +0100
@@ -63,6 +63,21 @@
EAppMessageTypeChangeMsg
/* Teleca change begin, 9.09.2009 ssal */
};
+
+/**
+ * The command type of choice canidate list item .
+ */
+enum TPeninputCandItemCommand
+ {
+ ECandItemCmdNone,
+ ECandItemCmdGetNextPage,
+ ECandItemCmdGetPage,
+ ECandItemCmdExisted,
+ ECandItemCmdItemSelected,
+ ECandItemCmdEnterSpellMode,
+ ECandItemCmdArrowUp,
+ ECandItemCmdArrowDown
+ };
//structure for input context field data
struct TFepInputContextFieldData
@@ -140,6 +155,7 @@
};
TInt iActiveIndex;
TInt iLangCode;
+ TRect iRect;
};
class CPtiEngine;
@@ -162,4 +178,23 @@
TPtrC iICFText;
TPtrC iPromptText;
};
+
+/**
+ * Pen input server candidate data
+ */
+struct TPeninputCandidateData
+ {
+ // The alienment of text in candidate
+ TInt iAlign;
+ // The init rect used for the top-left point of candidate
+ TRect iInitRect;
+ // Enable spell functionality of candidate
+ TBool iSpellEnabled;
+ // Enable minimal text width when calculates item width.
+ TBool iTextWidthEnabled;
+ // The contents to be shown in candidate
+ CDesCArray* iItemArray;
+ // The default index
+ TInt iActiveIndex;
+ };
#endif
--- a/textinput/group/bld.inf Fri Sep 17 17:26:50 2010 +0100
+++ b/textinput/group/bld.inf Fri Oct 22 15:38:27 2010 +0100
@@ -50,6 +50,5 @@
#include "../peninputhwrfscn/group/bld.inf"
#include "../peninputvkbkr/group/bld.inf"
#include "../peninputfingerhwr/group/bld.inf"
-#include "../peninputfingerhwrar/group/bld.inf"
#include "../peninputsplititut/group/bld.inf"
#include "../peninputsplitqwerty/group/bld.inf"
--- a/textinput/peninputarc/bwins/peninputClientU.DEF Fri Sep 17 17:26:50 2010 +0100
+++ b/textinput/peninputarc/bwins/peninputClientU.DEF Fri Oct 22 15:38:27 2010 +0100
@@ -64,5 +64,4 @@
?ConnectAsyc@RPeninputServer@@QAEHAAVTRequestStatus@@@Z @ 63 NONAME ; int RPeninputServer::ConnectAsyc(class TRequestStatus &)
?SetDataQueryPopped@RPeninputServer@@QAEXH@Z @ 64 NONAME ; void RPeninputServer::SetDataQueryPopped(int)
?EnablePriorityChangeOnOriChange@RPeninputServer@@QAEXH@Z @ 65 NONAME ; void RPeninputServer::EnablePriorityChangeOnOriChange(int)
- ?EnableGfxTransEffect@RPeninputServer@@QAEXH@Z @ 66 NONAME ; void RPeninputServer::EnableGfxTransEffect(int)
--- a/textinput/peninputarc/eabi/peninputClientU.DEF Fri Sep 17 17:26:50 2010 +0100
+++ b/textinput/peninputarc/eabi/peninputClientU.DEF Fri Oct 22 15:38:27 2010 +0100
@@ -73,5 +73,4 @@
_ZN15RPeninputServer11ConnectAsycER14TRequestStatus @ 72 NONAME
_ZN15RPeninputServer18SetDataQueryPoppedEi @ 73 NONAME
_ZN15RPeninputServer31EnablePriorityChangeOnOriChangeEi @ 74 NONAME
- _ZN15RPeninputServer20EnableGfxTransEffectEi @ 75 NONAME
--- a/textinput/peninputarc/group/bld.inf Fri Sep 17 17:26:50 2010 +0100
+++ b/textinput/peninputarc/group/bld.inf Fri Oct 22 15:38:27 2010 +0100
@@ -148,4 +148,11 @@
OPTION SOURCES -c8,8 qgn_prop_cp_dev_pen.svg
END
+PRJ_EXTENSIONS
+START EXTENSION s60/mifconv
+OPTION TARGETFILE peninputserver.mif
+OPTION HEADERFILE peninputserver.mbg
+OPTION SOURCEFILE ../src/peninputserverapp/iconlist.txt
+END
+
// End of file
--- a/textinput/peninputarc/gsplugin/gspeninputplugin/loc/gspeninputplugin.loc Fri Sep 17 17:26:50 2010 +0100
+++ b/textinput/peninputarc/gsplugin/gspeninputplugin/loc/gspeninputplugin.loc Fri Oct 22 15:38:27 2010 +0100
@@ -313,108 +313,4 @@
// r:5.0
//
#define qtn_tin_option_menu_arabic_wdic "Recognition with dictionary"
-
-// d:Text in Handwriting input setting
-// d:Label's text for handwriting input setting in device view
-// l:list_single_large_graphic_pane_t1
-// r:TB9.2
-#define qtn_cp_folder_handwriting_input "Handwriting input settings"
-
-// d:Text in Handwriting input setting
-// d:It is title text in handwriting input setting view
-// l:title_pane_t2/opt9
-// r:TB9.2
-#define qtn_cp_title_handwriting_input "Handwriting input settings"
-
-// d:Text in Handwriting input setting
-// d:It is caption text for handwriting input settings in general settings
-// l:title_pane_t2/opt9
-// r:TB9.2
-#define qtn_gen_settings_handwriting_input "Handwriting input settings"
-
-// d:Text in Handwriting input setting
-// d:Setting name for handwriting input
-// l:list_setting_pane_t1
-// r:TB9.2
-#define qtn_as_settings_simple_hwr "Handwriting input"
-
-// d:Text in Handwriting input setting
-// d:Handwriting input can be actived
-// l:list_set_graphic_pane_t1
-// r:TB9.2
-#define qtn_ads_settings_enable_simple_hwr "On"
-
-// d:Text in Handwriting input setting
-// d:Handwriting input can not be actived
-// l:list_set_graphic_pane_t1
-// r:TB9.2
-#define qtn_ads_settings_disable_simple_hwr "Off"
-
-
-// d:It is text for selecting the fuzzy pinyin input settings
-// l:list_setting_pane_t1
-// r:9.2
-//
-#define qtn_tin_settings_fuzzy_pinyin "Fuzzy Pinyin"
-
-
-// d:It is text for showing fuzzy pinyin value in input settings
-// l:list_set_graphic_pane_t1
-// r:9.2
-//
-#define qtn_tin_settings_fuzzy_pinyin_no_setting "No setting"
-
-
-// d:It is text for selecting the import contacts in input settings
-// l:list_setting_pane_t1
-// r:9.2
-//
-#define qtn_tin_settings_import_contacts_name "Import contacts name of Phonebook"
-
-
-// d:It is text for showing the import date in input settings
-// l:list_set_graphic_pane_t1
-// r:9.2
-//
-#define qtn_tin_settings_import_contacts_name_time "Import date: %U"
-
-
-// d:It is text for showing not import in input settings
-// l:list_set_graphic_pane_t1
-// r:9.2
-//
-#define qtn_tin_settings_import_contacts_name_not_import_yet "Not imported"
-
-// d:It is text for softkey to stop import dialog
-// l:control_pane_t2/opt7
-// r:9.2
-//
-#define qtn_tin_settings_import_contacts_name_stop "stop"
-
-// d:It is note text for succeed import contacts
-// l:popup_note_window/opt2
-// r:9.2
-//
-#define qtn_tin_settings_import_contacts_name_note "%0N contact names have been imported."
-
-// d:It is text for no phonebook contacts when import.
-// l:popup_note_window/opt2
-// r:9.2
-//
-#define qtn_tin_settings_import_contacts_name_empty "No contact in Phonebook."
-
-// d:It is text for showing the import process.
-// l:popup_note_wait_window
-// r:9.2
-//
-#define qtn_tin_settings_import_contacts_name_wait "Importing, please wait...\n(%0N/%1N)"
-
-
-// d:text display when we can't access the phonebook data
-// l:popup_note_window/opt2
-// r:9.2
-//
-#define qtn_tin_settings_import_contacts_name_error_access "Can't access phonebook data"
-
-
// End Of File
--- a/textinput/peninputarc/inc/peninputlayoutcontrolinc/peninputlayout.h Fri Sep 17 17:26:50 2010 +0100
+++ b/textinput/peninputarc/inc/peninputlayoutcontrolinc/peninputlayout.h Fri Oct 22 15:38:27 2010 +0100
@@ -567,7 +567,7 @@
/**
* Get extra response area of virtual key controls.
*
- * @since Symbian^3
+ * since Symbian^3
* @param aMargins output the margins around the original response area.
*/
void GetKeyExtResponseArea( TMargins& aMargins );
@@ -575,11 +575,10 @@
/**
* Get extra response area of button controls.
*
- * @since Symbian^3
+ * since Symbian^3
* @param aMargins output the margins around the original response area.
*/
void GetButtonExtResponseArea( TMargins& aMargins );
-
protected:
/**
* Constructor
@@ -647,13 +646,13 @@
void SendEditorTextAndCursorPosL(TUint8* aData);
void SetSelfBmpDeviceFlag(TBool aFlag);
- /**
- * Load tap accuracy enhancement settings according to the specified input mode.
- *
- * @since Symbian^3
- * @param alayoutType specifies the input mode(refer to TPluginInputMode) of this layout.
- */
- void LoadTapAccuracySettingsL( TInt alayoutType );
+ /**
+ * Load tap accuracy enhancement settings according to the specified input mode.
+ *
+ * since Symbian^3
+ * @param aInputMode specifies the input mode(refer to TPluginInputMode) of this layout.
+ */
+ void LoadTapAccuracySettings( TInt aInputMode );
private:
NONSHARABLE_CLASS( CFepUiLayoutExt) : public CBase
@@ -675,26 +674,6 @@
TBool iDisableDrawing;
/**
- * PointerMove event suppressor parameter: max movement(in pixel)
- */
- TSize iPointerMoveSuppressMaxMovement;
-
- /**
- * PointerMove event suppressor parameter: timeout(in microsecond)
- */
- TInt iPointerMoveSuppressTimeout;
-
- /**
- * PointerUp event suppressor parameter: max movement(in pixel)
- */
- TSize iPointerUpSuppressMaxMovement;
-
- /**
- * PointerUp event suppressor parameter: timeout(in microsecond)
- */
- TInt iPointerUpSuppressTimeout;
-
- /**
* extra response area of virtual key controls
*/
TMargins iKeyExtResponseMargins;
@@ -703,8 +682,6 @@
* extra response area of virtual button controls
*/
TMargins iButtonExtResponseMargins;
-
-
};
private:
--- a/textinput/peninputarc/inc/peninputlayoutcontrolinc/peninputlayoutmultilineicf.h Fri Sep 17 17:26:50 2010 +0100
+++ b/textinput/peninputarc/inc/peninputlayoutcontrolinc/peninputlayoutmultilineicf.h Fri Oct 22 15:38:27 2010 +0100
@@ -506,13 +506,19 @@
inline TBool TextSelectionOn();
- void SetInlineStateL(TBool aInline,
+ /**
+ * @return ETrue if redraw is required.
+ */
+ TBool SetInlineStateL(TBool aInline,
TInt aStartPos = 0,
TInt aEndPos = 0,
TBool aNoMatchState = EFalse,
const TDesC& aNoMatchText = KNullDesC);
- void SetAutoCompleteStateL(TBool aAutoComplete,
+ /**
+ * @return ETrue if redraw is required.
+ */
+ TBool SetAutoCompleteStateL(TBool aAutoComplete,
TInt aStartPos = 0,
TInt aMidPos = 0,
TInt aEndPos = 0);
@@ -562,13 +568,22 @@
TBool IsTextPosValid(TInt aPos);
- void UpdateTextL(const TFepInputContextFieldData& aData);
+ /**
+ * @return ETrue if text was updated.
+ */
+ TBool UpdateTextL(const TFepInputContextFieldData& aData);
static TInt UpdateSecretTextL(TAny* aEditArea);
- void SetSelectionL(TCursorSelection aCurSel);
+ /**
+ * @return ETrue if redraw is required.
+ */
+ TBool SetSelectionL(TCursorSelection aCurSel);
- void UpdateNoMatchTextL(TInt aPos, const TDesC& aNoMatchText, TBool aNoMatchState);
+ /**
+ * @return ETrue if text was modified.
+ */
+ TBool UpdateNoMatchTextL(TInt aPos, const TDesC& aNoMatchText, TBool aNoMatchState);
void RemoveOverlappedCtrlIfNeeded();
@@ -604,11 +619,19 @@
void ResetApplyFont();
- void TryDisplayMaxTextL(TInt aCursorPos);
+ /**
+ * Scrolls text so that cursor becomes visible.
+ *
+ * @return ETrue if text was scrolled.
+ */
+ TBool TryDisplayMaxTextL(TInt aCursorPos);
TBool MoveCursorL( const TPoint& aPt, TInt& aCursorPos );
- void ResetViewHeightL();
+ /**
+ * @return ETrue if redraw is required.
+ */
+ TBool ResetViewHeightL();
void SetMfneTextL(const TFepInputContextFieldData& aData);
@@ -624,7 +647,7 @@
TBool HighlightOverlapWithBubble( const TRect& aRect );
- void AdjustSelectionL( const TCursorSelection& aCurSel );
+ TBool AdjustSelectionL( const TCursorSelection& aCurSel );
void ApplyLineSpaceFormatL( TInt aLineHeight );
void CalcPromptTextRectL();
--- a/textinput/peninputarc/inc/peninputlayoutcontrolinc/peninputlayoutvirtualkeyctrl.h Fri Sep 17 17:26:50 2010 +0100
+++ b/textinput/peninputarc/inc/peninputlayoutcontrolinc/peninputlayoutvirtualkeyctrl.h Fri Oct 22 15:38:27 2010 +0100
@@ -174,7 +174,7 @@
*
* @since S60 V5.0
*/
- void DrawKeyText(CFbsBitGc* aGc);
+ void DrawKeyText(CFbsBitGc* aGc, const TRect& aRect);
/**
* Redraw and update the key
--- a/textinput/peninputarc/inc/peninputlayoutcontrolinc/peninputtapsettingmanager.h Fri Sep 17 17:26:50 2010 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,203 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0""
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: header file of peninput ui layout
-*
-*/
-
-
-#ifndef PENINPUTTAPSETTINGMANAGER_H
-#define PENINPUTTAPSETTINGMANAGER_H
-
-#include <e32cmn.h>
-#include <e32base.h>
-#include <gdi.h>
-
-NONSHARABLE_CLASS(CPeninputTapSettingManager) : public CBase
- {
-public: //constructors
- /**
- * Symbian constructor.
- *
- * @since Symbian^3
- * @return Pointer to created object
- */
- static CPeninputTapSettingManager* NewL();
-
- /**
- * Symbian constructor.
- *
- * @since Symbian^3
- * @return Pointer to created object
- */
- static CPeninputTapSettingManager* NewLC();
-
- /*
- * Standard c++ destructor.
- * @since Symbian^3
- */
- virtual ~CPeninputTapSettingManager();
-
-public:
- /**
- * Load all parameters of tap accuracy enhancement for specified layout.
- *
- * @since Symbian^3
- * @param aLayoutType layout type, refer to TPluginInputMode
- * @return none
- */
- void Load( TInt aLayoutType );
-
- /**
- * Load all parameters of tap accuracy enhancement for specified layout.
- *
- * @since Symbian^3
- * @param aLayoutType layout type, refer to TPluginInputMode
- * @param aFileName path name of configuration file
- * @return none
- */
- void Load( TInt aLayoutType, const TDesC& aFileName );
-
- /**
- * Get configuration of PointerMove event suppressor.
- *
- * @since Symbian^3
- * @param aMaxMovement output max movement of PointerMove event
- * @param aTimeout output timeout(in microsecond) of PointerMove event
- * @return none
- */
- void GetPointerMoveSuppressor( TSize& aMaxMovement, TInt& aTimeout );
-
- /**
- * Get configuration of PointerUp event suppressor.
- *
- * @since Symbian^3
- * @param aMaxMovement output max movement of PointerUp event
- * @param aTimeout output timeout(in microsecond) of PointerUp event
- * @return none
- */
- void GetPointerUpSuppressor( TSize& aMaxMovement, TInt& aTimeout );
-
- /**
- * Get extra response area of virtual key controls.
- *
- * @since Symbian^3
- * @param aMargins output the margins around the original response area.
- * @return none
- */
- void GetKeyExtResponseArea( TMargins& aMargins );
-
- /**
- * Get extra response area of button controls.
- *
- * @since Symbian^3
- * @param aMargins output the margins around the original response area.
- * @return none
- */
- void GetButtonExtResponseArea( TMargins& aMargins );
-
-private:
- /**
- * C++ constructor
- *
- * @since Symbian^3
- * @return None
- */
- CPeninputTapSettingManager();
-
- /**
- * Symbian second-phase constructor
- *
- * @since Symbian^3
- * @return None
- */
- void ConstructL();
-private:
- /**
- * Load all parameters of tap accuracy enhancement for specified layout.
- *
- * @since Symbian^3
- * @param aLayoutType layout type, refer to TPluginInputMode
- * @return none
- */
- void LoadFromRepositoryL( TInt aLayoutType );
-
- /**
- * Load all parameters of tap accuracy enhancement for specified layout
- *
- * @since Symbian^3
- * @param aLayoutType layout type, refer to TPluginInputMode
- * @param aFileName path name of configuration file
- * @return none
- */
- void LoadFromFileL( TInt aLayoutType, const TDesC& aFileName );
-
- /**
- * Load default parameters
- *
- * @since Symbian^3
- * @return none
- */
- void LoadDefault();
-
- /**
- * parse a TPoint from a comma separated values string.
- *
- * @since Symbian^3
- * @return number of values in aText
- */
- TInt ParsePoints( TPoint& aPoint, const TDesC& aText );
-
- /**
- * parse a TMargins from a comma separated values string.
- *
- * @since Symbian^3
- * @param aMargins output parse result
- * @param aText source string
- * @return number of values in aText
- */
- TInt ParseMargins( TMargins& aMargins, const TDesC& aText );
-
-private:
- /**
- * max movement of PointerMove event
- */
- TSize iPointerMoveMaxMovement;
-
- /**
- * timeout of PointerMove event, microsecond
- */
- TInt iPointerMoveTimeout;
-
- /**
- * max movement of PointerUp event
- */
- TSize iPointerUpMaxMovement;
-
- /**
- * timeout of PointerUp event, microsecond
- */
- TInt iPointerUpTimeout;
-
- /**
- * extra response area of virtual key controls
- */
- TMargins iKeyMargins;
-
- /**
- * extra response area of button controls
- */
- TMargins iButtonMargins;
- };
-
-#endif // PENINPUTTAPSETTINGMANAGER_H
--- a/textinput/peninputarc/inc/pensrvcliinc/peninputanimclientobj.h Fri Sep 17 17:26:50 2010 +0100
+++ b/textinput/peninputarc/inc/pensrvcliinc/peninputanimclientobj.h Fri Oct 22 15:38:27 2010 +0100
@@ -231,16 +231,6 @@
* @return ETrue if command added successfully.
*/
TBool SetDiscreetPopArea(const TRect& aArea);
-
- /**
- * Update parameters of pointer event suppressor.
- *
- * @since Symbian^3
- * @param aParameters parameters of pointer event suppressor
- * @return none
- */
- void UpdatePointerEventSuppressor( const TPointerEventSuppressorParameters& aParameters );
-
private:
/**
* Default constructor.
--- a/textinput/peninputarc/inc/pensrvcliinc/peninputanimcommand.h Fri Sep 17 17:26:50 2010 +0100
+++ b/textinput/peninputarc/inc/pensrvcliinc/peninputanimcommand.h Fri Oct 22 15:38:27 2010 +0100
@@ -494,37 +494,6 @@
private:
TRect iArea;
};
-
-//class TAnimUpdatePointerEventSuppressorCmd
-/**
- * Class for handling pointer event suppressor command
- *
- *
- * @since Symbian^3
- */
-class TAnimUpdatePointerEventSuppressorCmd : public TAnimCmd
- {
-public:
- /**
- * Default constructor
- * @param aAnim The animation cliet which executes the command
- * @param aParameters parameters of pointer event suppressor
- */
- TAnimUpdatePointerEventSuppressorCmd( RPeninputAnim& aAnim,
- const TPointerEventSuppressorParameters& aParameters );
-
- /**
- * Execute the command
- *
- * @since Symbian^3
- * @return ETrue if command has been executed successfully.
- */
- virtual TBool ExecuteAnimCommand() const;
-
-private:
- TPointerEventSuppressorParameters iParameters;
- };
-
#include "peninputanimcommand.inl"
#endif //C_CPENINPUTANIM_CMD_H
--- a/textinput/peninputarc/inc/pensrvcliinc/peninputclientimpl.h Fri Sep 17 17:26:50 2010 +0100
+++ b/textinput/peninputarc/inc/pensrvcliinc/peninputclientimpl.h Fri Oct 22 15:38:27 2010 +0100
@@ -468,15 +468,6 @@
TBool ServerReady();
void OnServerStarted(TInt aErr);
- /**
- * Enable or disable transition effect.
- *
- * @since Symbian^3
- * @param aEnable, ETrue: enable transition effect
- * EFalse: disable transition effect.
- */
- void EnableGfxTransEffect( TBool aEnable );
-
private:
/**
* Constructor
--- a/textinput/peninputarc/inc/pensrvcliinc/peninputclientserver.h Fri Sep 17 17:26:50 2010 +0100
+++ b/textinput/peninputarc/inc/pensrvcliinc/peninputclientserver.h Fri Oct 22 15:38:27 2010 +0100
@@ -89,8 +89,7 @@
EPeninputRequestDimResChangeLayout,
EPeninputRequestSupportInputMode,
EPeninputRequestSetInputLanguage,
- EPeninputEnablePriorityChangeOnOriChange,
- EPeninputRequestEnableGfxTransEffect
+ EPeninputEnablePriorityChangeOnOriChange
};
//server error code
--- a/textinput/peninputarc/inc/pensrvcliinc/peninputcmdparamext.h Fri Sep 17 17:26:50 2010 +0100
+++ b/textinput/peninputarc/inc/pensrvcliinc/peninputcmdparamext.h Fri Oct 22 15:38:27 2010 +0100
@@ -45,19 +45,4 @@
// see MAnimSpriteFunctions::UpdateMember
TBool iFullUpdateFlag;
};
-
-/**
- * parameters for pointer event suppressor
- */
-struct TPointerEventSuppressorParameters
- {
- TBool iMoveEventSuppressEnabled;
- TSize iMoveEventMaxMovement;
- TInt iMoveEventTimeout;
-
- TBool iUpEventSuppressEnabled;
- TSize iUpEventMaxMovement;
- TInt iUpEventTimeout;
- };
-
#endif //_PENINPUTPARAM_EXT_H
--- a/textinput/peninputarc/inc/pensrvcliinc/peninputserver.h Fri Sep 17 17:26:50 2010 +0100
+++ b/textinput/peninputarc/inc/pensrvcliinc/peninputserver.h Fri Oct 22 15:38:27 2010 +0100
@@ -42,6 +42,9 @@
class CInternalBkCtrl;
class CKeyRotator;
class CPenInputCrpServiceClient;
+class CPenUiCandidateWnd;
+class MPenUiWndEventObserver;
+
// panic code
enum TPeninputServerPanic
{
@@ -288,6 +291,13 @@
* @return a CSharableSession instance
*/
CSession2* NewSessionL(const TVersion& aVersion, const RMessage2& aMessage) const;
+
+ /**
+ * Return pen ui layout
+ *
+ * @since Symbian^3
+ */
+ inline MPenUiLayoutBase* PenUiLayout() const;
public: // From MRawEventHandler
/**
@@ -693,15 +703,6 @@
void CheckSessionValidL(CPeninputServerSession* aSession1,
CPeninputServerSession* aSession2) const;
- /**
- * Update parameters of pointer event suppressor.
- *
- * @since Symbian^3
- * @param aData parameters of pointer event suppressor
- * @return none
- */
- void UpdatePointerEventSuppressor( const TDesC& aData );
-
public:
TInt DisabledByDSA();
TInt DisabledByDSAFromAnim();
@@ -991,9 +992,31 @@
TRect iDiscreetPopArea;
TBool iEnablePriorityChangeOnOriChange;
TBool iIsLayoutReDrawAllowWhenActive;
+
+ /**
+ * Pen ui candidate window.
+ *
+ * Owned.
+ */
+ CPenUiCandidateWnd* iCandidateWnd;
+
+ /**
+ * Pen ui window event observer.
+ *
+ * Owned.
+ */
+ MPenUiWndEventObserver* iObserver;
};
/**
+* Return pen ui layout
+*/
+inline MPenUiLayoutBase* CPeninputServer::PenUiLayout() const
+ {
+ return iUiLayout;
+ }
+
+/**
* Class CEventQueue
* Event message queue. It's an active object.
*
--- a/textinput/peninputarc/inc/pensrvcliinc/peninputsrvobserver.h Fri Sep 17 17:26:50 2010 +0100
+++ b/textinput/peninputarc/inc/pensrvcliinc/peninputsrvobserver.h Fri Oct 22 15:38:27 2010 +0100
@@ -104,7 +104,17 @@
*/
TInt RunError(TInt aError);
private:
- virtual TBool HandleServerEventL(TInt aEventId);
+ virtual TBool HandleServerEventL(TInt aEventId);
+
+ /**
+ * Stop the server
+ *
+ * @since Symbian^3
+ *
+ * @param none
+ * @return void
+ */
+ void HandleServerTerminatedL();
public:
/**
--- a/textinput/peninputarc/inc/pensrvcliinc/penpointereventsuppressor.h Fri Sep 17 17:26:50 2010 +0100
+++ b/textinput/peninputarc/inc/pensrvcliinc/penpointereventsuppressor.h Fri Oct 22 15:38:27 2010 +0100
@@ -85,9 +85,8 @@
* @param aPointerEvent the pointer event which may need to be suppressed.
* @return ETrue if the pointer event should be suppressed, or EFalse if it should be handled.
*/
-
- TBool SuppressPointerEvent( TPointerEvent& aPointerEvent );
-
+ TBool SuppressPointerEvent( TPointerEvent& aPointerEvent );
+
/**
* Set the maximum time period that drag events should be
* ignored during a pointer interaction.
@@ -111,23 +110,23 @@
*/
void SetMinInterDragInterval(TTimeIntervalMicroSeconds aInterval);
- /**
- * Set the maximum pointer movement for up events.
- * All up events within maximum movement and timeout are moved to the down position.
- *
- * @since Symbian^3
- * @param aMaxDownUpMove maximum movement(in pixel) of up event
- */
- void SetMaxDownUpMove( TSize aMaxDownUpMove );
-
- /**
- * Set the maximum time between up and down events.
- * All up events within maximum movement and timeout are moved to the down position.
- *
- * @since Symbian^3
- * @param aDuration time between down and up events.
- */
- void SetMaxDownUpDuration( TTimeIntervalMicroSeconds aDuration );
+ /**
+ * Set the maximum pointer movement for up events.
+ * All up events within maximum movement and timeout are moved to the down position.
+ *
+ * @since Symbian^3
+ * @param aMaxDownUpMove maximum movement(in pixel) of up event
+ */
+ void SetMaxDownUpMove( TSize aMaxDownUpMove );
+
+ /**
+ * Set the maximum time between up and down events.
+ * All up events within maximum movement and timeout are moved to the down position.
+ *
+ * @since Symbian^3
+ * @param aDuration time between down and up events.
+ */
+ void SetMaxDownUpDuration( TTimeIntervalMicroSeconds aDuration );
private:
CPenPointerEventSuppressor();
@@ -141,18 +140,18 @@
TBool iTap;
TTime iLastEventTime;
-
- /**
- * The maximum pointer movement for up events.
- * All up events within maximum movement and timeout are moved to the down position.
- */
- TSize iMaxDownUpMove;
+ /**
+ * The maximum pointer movement for up events.
+ * All up events within maximum movement and timeout are moved to the down position.
+ */
+ TSize iMaxDownUpMove;
+
+ /**
+ * The maximum time between up and down events.
+ * All up events within maximum movement and timeout are moved to the down position.
+ */
+ TTimeIntervalMicroSeconds iMaxDownUpDuration;
- /**
- * The maximum time between up and down events.
- * All up events within maximum movement and timeout are moved to the down position.
- */
- TTimeIntervalMicroSeconds iMaxDownUpDuration;
- };
+ };
#endif
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/textinput/peninputarc/inc/pensrvcliinc/penuicandidatewnd.h Fri Oct 22 15:38:27 2010 +0100
@@ -0,0 +1,688 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0""
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+#ifndef PENUICANDIDATEWND_H
+#define PENUICANDIDATEWND_H
+
+#include <coecntrl.h>
+#include <AknsItemID.h>
+#include <AknLayoutDef.h>
+
+class MPenUiWndEventObserver;
+
+/**
+ * The constant for max text length of
+ * choice list item title.
+ */
+const TInt KMaxItemTextLength = 100;
+
+/**
+ * CPenUiCandidateWnd
+ *
+ * CCoeControl based class used for candidate list
+ *
+ */
+class CPenUiCandidateWnd : public CCoeControl
+ {
+public:
+ /**
+ * Store LAF data for candidate list
+ */
+ class TPenUiCandidateLafData
+ {
+ public:
+ TSize iItemSize;
+ TInt iHorMargin;
+ TInt iVerMargin;
+ TSize iNaviSize;
+ TSize iNaviInnerSize;
+ TAknTextLineLayout iTextLine;
+ TAknTextLineLayout iPageTextLine;
+ const CFont* iFont;
+ };
+
+ /**
+ * Choice list item data structure.
+ */
+ class TPenUiCandidateItem
+ {
+ public:
+ /*
+ * Command of choice list item.
+ */
+ TInt iCommand;
+ /*
+ * Title of choice list item.
+ */
+ TBuf<KMaxItemTextLength> iText;
+ };
+
+ /**
+ * Two-phased constructor.
+ *
+ * @since symbian^3
+ * @param aServer the pointer to the owner of the control
+ * @return Pointer to CPenUiCandidateWnd's instance
+ */
+ static CPenUiCandidateWnd* NewL( MPenUiWndEventObserver* aObserver );
+
+ /**
+ * Two-phased constructor.
+ *
+ * @since symbian^3
+ * @param aServer the pointer to the owner of the control
+ * @return Pointer to CPenUiCandidateWnd's instance
+ */
+ static CPenUiCandidateWnd* NewLC( MPenUiWndEventObserver* aObserver );
+
+ /**
+ * Destructor
+ */
+ ~CPenUiCandidateWnd();
+
+ /**
+ * Handle raw events of pen input.
+ *
+ * @since Symbian^3
+ * @param aEventData The event data.
+ * @return ETrue if layout has processed the event, otherwise EFalse
+ */
+ TBool HandleRawEventL( const TAny* aEventData );
+
+ /**
+ * Set window priority.
+ *
+ * @since Symbian^3
+ * @param aPriority the priority of candidate
+ * @return None
+ */
+ inline void SetPriority( TInt aPriority );
+
+ /**
+ * Set the alienment of text in candidate.
+ *
+ * @since Symbian^3
+ * @param aAlign The alignment to be used.
+ * @return None
+ */
+ inline void SetAlign( CGraphicsContext::TTextAlign aAlign );
+
+ /**
+ * Set the init rect used for the top-left point of candidate.
+ *
+ * @since Symbian^3
+ * @param aInitRect The initial rect used for the top-left position
+ * of candidate.
+ * @return None
+ */
+ inline void SetInitRect( const TRect& aInitRect );
+
+ /**
+ * Enable spell functionality of candidate
+ *
+ * @since Symbian^3
+ * @param aSpellEnabled ETrue: enable spell;
+ * EFalse: disable spell.
+ * @return None
+ */
+ inline void EnableSpell( TBool aSpellEnabled );
+
+ /**
+ * Enable minimal text width when calculates item width.
+ *
+ * @since Symbian^3
+ * @param aTextWidthEnabled ETrue: enable text line;
+ * EFalse: disable text line.
+ * @return None
+ */
+ inline void EnableTextWidth( TBool aTextWidthEnabled );
+
+ /**
+ * Show candidate list
+ *
+ * @since Symbain^3
+ * @param aItemArray, the contents to be shown
+ * @param aActiveIndex, the default index
+ * @return None
+ */
+ void ShowCandidateListL( const CDesCArray* aItemArray, TInt aActiveIndex );
+
+ /**
+ * Hide candidate list
+ *
+ * @since Symbian^3
+ * @return None
+ */
+ void HideCandidateList();
+
+// From CCoeControl
+ /**
+ * Handles a change to the control's resources.
+ *
+ * @since symbian^3
+ * @param aType, a message UID value.
+ * @return None
+ */
+ void HandleResourceChange( TInt aType );
+
+private:
+
+ /**
+ * C++ Default Constructor
+ */
+ CPenUiCandidateWnd( MPenUiWndEventObserver* aObserver );
+
+ /**
+ * 2nd phase constructor.
+ *
+ * @since Symbain^3
+ * @return None
+ */
+ void ConstructL();
+
+ /**
+ * Set all kinds of frame ids
+ *
+ * @since Symbain^3
+ * @param aBgFrId, background frame id;
+ * @param aNaviFrId, normal navi button frame id;
+ * @param aNaviActiveFrId, pressed navi button frame id;
+ * @param aNaviDimFrId, dimmed navi button frame id;
+ * @param aItemActiveFrId, heightligh item frame id;
+ * @return None
+ */
+ void SetImgFrId( TAknsItemID aBgFrId,
+ TAknsItemID aNaviFrId,
+ TAknsItemID aNaviActiveFrId,
+ TAknsItemID aNaviDimFrId,
+ TAknsItemID aItemActiveFrId );
+
+ /**
+ * Construct candidate list from resource.
+ *
+ * @return None
+ */
+ void ConstructFromResourceL();
+
+ /**
+ * Construct up / down arrow buttons from resource.
+ *
+ * @since Symbain^3
+ * @param aReader: the resource reader;
+ * @param aUpDown, ETrue, construct up button;
+ * EFalse, construct down button;
+ * @return None
+ */
+ void ConstructPageInfoFromResourceL( TResourceReader& aReader, TBool aUpDown );
+
+
+ /**
+ * Read LAF data for candidate list
+ *
+ * @since Symbian^3
+ * @return None
+ */
+ void ReadLafInfo();
+
+ /**
+ * Set size for bitmaps
+ *
+ * @since Symbian^3
+ * @return None
+ */
+ void SetBitmapSize();
+
+ /**
+ * Create mask bitmap for dimmed icons
+ *
+ * @since Symbian^3
+ * @param aDimmedMask, store the generated mask bitmap for dimmed icons.
+ * @param aMask. the source bitmap
+ * @return None
+ */
+ void CreateDimmedMaskL( CFbsBitmap*& aDimmedMask,
+ const CFbsBitmap* aMask );
+
+ /**
+ * Capture all poninters of full screen when candidate list is opened.
+ *
+ * @since Symbain^3
+ * @param aFlag, ETrue: capture all pointers of full screen.
+ * EFalse: don't capture all pointers of full screen.
+ * @return None
+ */
+ void SetCapturePointer( TBool aFlag );
+
+ /**
+ * Get page info and transfer it to descritor.
+ *
+ * @since Symbian^3
+ * @return None.
+ */
+ void GetPageInfoBufL();
+
+ /**
+ * Set the text item array to candidate list
+ *
+ * @since Symbian^3
+ * @param aItemArray: The text item array to be shown.
+ * @return None
+ */
+ void SetItemArrayL( const CDesCArray* aItemArray );
+
+ /**
+ * Add spell item
+ *
+ * @since Symbian^3
+ * @return None
+ */
+ void AddSpellItemL();
+
+ /**
+ * Calculate the displaying rect of candidate.
+ *
+ * @since Symbian^3
+ * @return None
+ */
+ void ReCalcLayout();
+
+ /**
+ * Return the dynamical width for displaying text.
+ *
+ * @since Symbian^3
+ * @return The fittable width of candidate.
+ */
+ TInt WidthToFitText();
+
+ /**
+ * Return the rect to fit the screen size.
+ *
+ * @since Symbian^3
+ * @param aRect: the source rect to be checked
+ * @return the rect of fittable to screen size
+ */
+ TRect RectToFitScreen( const TRect& aRect );
+
+ /**
+ * Draw each item.
+ *
+ * @since Symbian^3
+ * @param aGc: the pointer of window gc
+ * @param aIndex: the index of the item to be drawn.
+ * @return None
+ */
+ void DrawItem( CWindowGc* aGc, TInt aIndex ) const;
+
+ /**
+ * Draw page down / up arrow button.
+ *
+ * @since Symbian^3
+ * @param aGc: the pointer of window gc
+ * @param aUpDown: ETrue, the up arrow button,
+ * EFalse, the down arrow button
+ * @return None
+ */
+ void DrawPageButton( CWindowGc* aGc, TBool aUpDown ) const;
+
+ /**
+ * Draw page into text.
+ *
+ * @since Symbian^3
+ * @param aGc: the pointer of window gc
+ * @return None
+ */
+ void DrawPageInfo( CWindowGc* aGc ) const;
+
+ /**
+ * Handle pointer down event
+ *
+ * @since Symbian^3
+ * @param aPoint The point position relative the layout
+ * @return None.
+ */
+ void HandlePointerDownEvent(const TPoint& aPoint);
+
+ /**
+ * Handle pointer move event
+ *
+ * @since Symbian^3
+ * @param aPoint The point position relative the layout
+ * @return None.
+ */
+ void HandlePointerMoveEvent(const TPoint& aPoint);
+
+ /**
+ * Handle pointer up event
+ *
+ * @since Symbian^3
+ * @return None.
+ */
+ void HandlePointerUpEventL();
+
+ /**
+ * Check pointer area of pointer event
+ *
+ * @param aPoint The point position relative the layout
+ * @return None.
+ */
+ void CheckPointerEvent(const TPoint& aPoint);
+
+ /**
+ * Return the index of pointed text item.
+ *
+ * @since symbian^3
+ * @param aPoint, the position of pointer down.
+ * @return the index of the pointed text item.
+ */
+ TInt ItemIndexByPoint( const TPoint& aPoint );
+
+ /**
+ * Report item selected event to ui layout
+ *
+ * @since Symbian^3
+ * @return None.
+ */
+ void ReportItemSelectedEventL();
+
+ /**
+ * Delete all bitmaps.
+ *
+ * @since Symbian^3
+ * @return None.
+ */
+ void DeleteAllBitmaps();
+
+ /**
+ * Handle skin change.
+ *
+ * @since Symbian^3
+ * @return None.
+ */
+ void HandleSkinChangeL();
+
+ // From CCoeControl
+ /**
+ * Responds to changes to the size and position of the contents of this control.
+ *
+ * @since Symbian^3
+ * @return None
+ */
+ void SizeChanged();
+
+ /**
+ * Draw candidate control.
+ *
+ * @since Symbian^3
+ * @param aRect: the rect to be drawn.
+ * @return None
+ */
+ void Draw( const TRect& aRect ) const;
+
+private:
+ /**
+ * The alignment of text in candidate list
+ *
+ */
+ CGraphicsContext::TTextAlign iAlign;
+
+ /**
+ * The initial rect for the top-left point
+ *
+ */
+ TRect iInitRect;
+
+ /**
+ * If enabling the spell functionality
+ *
+ */
+ TBool iSpellEnabled;
+
+ /**
+ * If enabling text width
+ *
+ */
+ TBool iTextWidthEnabled;
+
+ /**
+ * Store Laf Data.
+ *
+ */
+ CPenUiCandidateWnd::TPenUiCandidateLafData iLafData;
+
+ /**
+ * Store the item list.
+ *
+ */
+ RPointerArray<CPenUiCandidateWnd::TPenUiCandidateItem> iItemList;
+
+ /**
+ * Background frame id.
+ *
+ */
+ TAknsItemID iBgFrId;
+
+ /**
+ * Hilight frame id.
+ *
+ */
+ TAknsItemID iItemActiveFrId;
+
+ /**
+ * Navi buttons normal frame id.
+ *
+ */
+ TAknsItemID iNaviFrId;
+
+ /**
+ * Navi buttons pressed frame id.
+ *
+ */
+ TAknsItemID iNaviActiveFrId;
+
+ /**
+ * Navi buttons dim frame id.
+ *
+ */
+ TAknsItemID iNaviDimFrId;
+
+ /**
+ * The width of text area
+ *
+ */
+ TInt iItemWidth;
+
+ /**
+ * The rect of list pane
+ *
+ */
+ TRect iListRect;
+
+ /**
+ * The rect of scroll pane
+ *
+ */
+ TRect iScrollRect;
+
+ /**
+ * The rect of up arrow button
+ *
+ */
+ TRect iPageUpRect;
+
+ /**
+ * The rect of down arrow button
+ *
+ */
+ TRect iPageDownRect;
+
+ /**
+ * The rect of each item.
+ *
+ */
+ RArray<TRect> iItemRects;
+
+ /**
+ * The size of separator line.
+ *
+ */
+ TSize iSeparatorSize;
+
+ /**
+ * The index of current page.
+ *
+ */
+ TInt iCurrentPage;
+
+ /**
+ * The number of total page.
+ *
+ */
+ TInt iTotalPages;
+
+ /**
+ * The index of focused item.
+ *
+ */
+ TInt iFocusItem;
+
+ /**
+ * The text of page info
+ *
+ * Owned
+ */
+ HBufC* iPageInfo;
+
+ /**
+ * The area type of pointer
+ *
+ */
+ TInt iPointerArea;
+
+ /**
+ * If navi buttons need to be shown
+ *
+ */
+ TBool iNaviBtnShown;
+
+ /**
+ * The bitmap of page up button.
+ *
+ * Owned.
+ */
+ CFbsBitmap* iPageUpBmp;
+
+ /**
+ * The mask bitmap of page up button.
+ *
+ * Owned.
+ */
+ CFbsBitmap* iPageUpBmpMask;
+
+ /**
+ * The mask bitmap of dimmed page up button.
+ *
+ * Owned.
+ */
+ CFbsBitmap* iPageUpDimBmpMask;
+
+ /**
+ * The mask bitmap of dimmed page down button.
+ *
+ * Owned.
+ */
+ CFbsBitmap* iPageDownBmp;
+
+ /**
+ * The bitmap of page down button.
+ *
+ * Owned.
+ */
+ CFbsBitmap* iPageDownBmpMask;
+
+ /**
+ * The mask bitmap of page down button.
+ *
+ * Owned.
+ */
+ CFbsBitmap* iPageDownDimBmpMask;
+
+ /**
+ * The bitmap of separator.
+ *
+ * Owned.
+ */
+ CFbsBitmap* iSeperationBmp;
+
+ /**
+ * The mask bitmap of separator.
+ *
+ * Owned.
+ */
+ CFbsBitmap* iSeperationMaskBmp;
+
+ /**
+ * The observer of the control
+ *
+ * Now own
+ */
+ MPenUiWndEventObserver* iObserver;
+ };
+
+
+/**
+* Set window priority.
+*/
+inline void CPenUiCandidateWnd::SetPriority( TInt aPriority )
+ {
+ Window().SetOrdinalPosition( 0, aPriority );
+ }
+
+/**
+* Set the alienment of text in candidate.
+*/
+inline void CPenUiCandidateWnd::SetAlign(CGraphicsContext::TTextAlign aAlign)
+ {
+ iAlign = aAlign;
+ }
+
+/**
+* Set the init rect used for the top-left point of candidate.
+*/
+inline void CPenUiCandidateWnd::SetInitRect( const TRect& aInitRect )
+ {
+ iInitRect = aInitRect;
+ }
+
+/**
+* Enable spell functionality of candidate
+*/
+inline void CPenUiCandidateWnd::EnableSpell( TBool aSpellEnabled )
+ {
+ iSpellEnabled = aSpellEnabled;
+ }
+
+/**
+* Enable minimal text width when calculates item width.
+*/
+inline void CPenUiCandidateWnd::EnableTextWidth( TBool aTextWidthEnabled )
+ {
+ iTextWidthEnabled = aTextWidthEnabled;
+ }
+
+#endif //R_RPENINPUTANIM_H
+
+// End of File
--- a/textinput/peninputarc/inc/pensrvcliinc/penuiwndctrl.h Fri Sep 17 17:26:50 2010 +0100
+++ b/textinput/peninputarc/inc/pensrvcliinc/penuiwndctrl.h Fri Oct 22 15:38:27 2010 +0100
@@ -196,37 +196,8 @@
void UpdateCursor(TBool aOnFlag,const CFbsBitmap* aCursorBmp,const TRect& aPos);
void SetPopupArea(const TRect& aRect, TBool aFlag);
void UpdateICFArea(const CFbsBitmap* aBmp,const TPoint& aPos);
-
- /**
- * Update the bubble area list
- *
- * @since S60 v5.0
- * @param aCtrl the Ctrl's address
- * @param aBmp the bubble bitmap's address
- * @param aRect the bubble rect
- * @param aFlag ETrue means add bubble area and
- * EFalse means remove bubble area
- * @return void
- */
- void UpdateChangedArea( const TUint32 aCtrl,
- const CFbsBitmap* aBmp, const TRect& aRect, TBool aFlag );
-
- /**
- * Update the bubble area list
- *
- * @since S60 v5.0
- * @param aCtrl the Ctrl's address
- * @param aBmp the bubble bitmap's address
- * @param aMaskBmp the bubble mask bitmap's address
- * @param aPos the bubble rect
- * @param aFlag ETrue means add bubble area and
- * EFalse means remove bubble area
- * @return void
- */
- void UpdateBubble( const TUint32 aCtrl,
- const CFbsBitmap* aBmp, const CFbsBitmap* aMaskBmp,
- const TRect& aPos, TBool aFlag );
-
+ void UpdateChangedArea(const CFbsBitmap* aBmp,const TRect& aRect,TBool aFlag);
+ void UpdateBubble(const CFbsBitmap* aBmp,const CFbsBitmap* aMaskBmp,const TRect& aPos,TBool aFlag);
void Clean();
void HandleNGASpecificSignal(TInt aEventType, const TDesC& aEventData);
@@ -241,18 +212,6 @@
*/
void SetCursorColor();
- /**
- * Enable or disable transition effect.
- *
- * @since Symbian^3
- * @param aEnableGfxTransEffect, ETrue: enable transition effect
- * EFalse: disable transition effect.
- */
- inline void EnableGfxTransEffect( TBool aEnableGfxTransEffect )
- {
- iEnableGfxTransEffect = aEnableGfxTransEffect;
- };
-
public: // Functions from base classes.
/**
@@ -353,12 +312,6 @@
CFbsBitmap* iChangedBmp;
RPointerArray<CFbsBitmap> iBubblesArea;
RPointerArray<CFbsBitmap> iBubblesMaskArea;
-
- /**
- * An array of the Controls' addresses
- */
- RArray<TUint32> iBubblesCtrl;
-
RArray<TRect> iBubblesPos;
TPoint iCursorPos;
@@ -397,12 +350,6 @@
*/
TRgb iCursorColor;
-
- /**
- * If transition effect is enabled.
- */
- TBool iEnableGfxTransEffect;
-
friend class CCursorWindow;
};
class CInternalBkCtrl : public CCoeControl
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/textinput/peninputarc/inc/pensrvcliinc/penuiwndeventhandler.h Fri Oct 22 15:38:27 2010 +0100
@@ -0,0 +1,100 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0""
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+#ifndef PENUIWNDEVENTHANDLER_H_
+#define PENUIWNDEVENTHANDLER_H_
+
+#include "penuiwndeventobserver.h"
+
+class CPeninputServer;
+
+/**
+ * CPenUiWndEventHandler
+ *
+ * The pen ui window event handler
+ *
+ */
+class CPenUiWndEventHandler : public CBase, public MPenUiWndEventObserver
+ {
+public:
+ /**
+ * Two-phased constructor.
+ *
+ * @since symbian^3
+ * @param aServer the pointer to the owner of the control
+ * @return Pointer to CPenUiCandidateWnd's instance
+ */
+ static CPenUiWndEventHandler* NewL( CPeninputServer* aServer );
+
+ /**
+ * Two-phased constructor.
+ *
+ * @since symbian^3
+ * @param aServer the pointer to the owner of the control
+ * @return Pointer to CPenUiCandidateWnd's instance
+ */
+ static CPenUiWndEventHandler* NewLC( CPeninputServer* aServer );
+
+ /**
+ * Destructor
+ */
+ ~CPenUiWndEventHandler();
+
+// From MPenUiWndEventObserver
+ /**
+ * Signal owner that there is an event
+ *
+ * @since symbian^3
+ * @param aEventType The event type
+ * @param aEventData The event data
+ */
+ virtual void SignalOwner( TInt aEventType, const TDesC& aEventData );
+
+ /**
+ * Handle layout command event.
+ *
+ * @since symbian^3
+ * @param aCmd Command Id.
+ * @param aData Data for command.
+ */
+ virtual void HandleCommand( TInt aCmd, TUint8* aData );
+
+private:
+
+ /**
+ * C++ Default Constructor
+ */
+ CPenUiWndEventHandler( CPeninputServer* aServer );
+
+ /**
+ * 2nd phase constructor.
+ *
+ * @since Symbain^3
+ * @return None
+ */
+ void ConstructL();
+
+private:
+ /**
+ * The owner of the control
+ *
+ * Now own
+ */
+ CPeninputServer* iServer;
+ };
+
+#endif /* PENUIWNDEVENTHANDLER_H_ */
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/textinput/peninputarc/inc/pensrvcliinc/penuiwndeventobserver.h Fri Oct 22 15:38:27 2010 +0100
@@ -0,0 +1,49 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0""
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+#ifndef PENUIWNDEVENTOBSERVER_H_
+#define PENUIWNDEVENTOBSERVER_H_
+
+/**
+ * MPenUiWndEventObserver
+ *
+ * The observer to handle pen ui window event
+ *
+ */
+class MPenUiWndEventObserver
+ {
+public:
+ /**
+ * Signal owner that there is an event
+ *
+ * @since symbian^3
+ * @param aEventType The event type
+ * @param aEventData The event data
+ */
+ virtual void SignalOwner( TInt aEventType, const TDesC& aEventData ) = 0;
+
+ /**
+ * Handle layout command event.
+ *
+ * @since symbian^3
+ * @param aCmd Command Id.
+ * @param aData Data for command.
+ */
+ virtual void HandleCommand( TInt aCmd, TUint8* aData ) = 0;
+ };
+
+#endif /* PENUIWNDEVENTOBSERVER_H_ */
--- a/textinput/peninputarc/inc/pensrvcliinc/rpeninputanim.h Fri Sep 17 17:26:50 2010 +0100
+++ b/textinput/peninputarc/inc/pensrvcliinc/rpeninputanim.h Fri Oct 22 15:38:27 2010 +0100
@@ -186,16 +186,6 @@
void GetDSAState(TBool& aState);
void SetDiscreeptPop(const TRect& aArea);
-
- /**
- * Update parameters of pointer event suppressor.
- *
- * @since Symbian^3
- * @param aParameters parameters of pointer event suppressor
- * @return none
- */
- void UpdatePointerEventSuppressor( const TPointerEventSuppressorParameters& aParameters );
-
private:
/**
--- a/textinput/peninputarc/rom/peninputarc.iby Fri Sep 17 17:26:50 2010 +0100
+++ b/textinput/peninputarc/rom/peninputarc.iby Fri Oct 22 15:38:27 2010 +0100
@@ -36,6 +36,7 @@
S60_APP_AIF_RSC(peninputserver)
data = \EPOC32\DATA\Z\resource\apps\peninputserver.RSC "resource\apps\peninputserver.rsc"
+data = \EPOC32\DATA\Z\resource\apps\peninputserver.mif "resource\apps\peninputserver.mif"
ECOM_PLUGIN(gspeninputplugin.dll, gspeninputplugin.rsc)
ECOM_PLUGIN(2000B5E7.dll, 2000B5E7.rss)
--- a/textinput/peninputarc/src/peninputanim/peninputanim.cpp Fri Sep 17 17:26:50 2010 +0100
+++ b/textinput/peninputarc/src/peninputanim/peninputanim.cpp Fri Oct 22 15:38:27 2010 +0100
@@ -142,6 +142,13 @@
iFunctions->RegisterForNotifications(EDirectScreenAccess);
iPointerEventSuppressor = CPenPointerEventSuppressor::NewL();
+
+ //Setup pointer event suppressor with the parameters provided by UE.
+ //hard code is used here to minimize code changes
+ iPointerEventSuppressor->SetMaxTapMove( TSize( 10, 10 ) );
+ iPointerEventSuppressor->SetMaxTapDuration( 400000 );
+ iPointerEventSuppressor->SetMaxDownUpMove( TSize( 40 , 40 ) );
+ iPointerEventSuppressor->SetMaxDownUpDuration( 400000 );
}
@@ -300,7 +307,7 @@
default:
{
return EFalse;
- }
+ }
}
}
@@ -704,18 +711,6 @@
SetDiscreeptPop(area);
}
break;
- case EPeninputOpUpdatePointerSuppressor:
- {
- TPointerEventSuppressorParameters parameters;
- TPckg<TPointerEventSuppressorParameters> msgData( parameters );
- msg->ReadL( KMsgSlot1, msgData );
-
- iPointerEventSuppressor->SetMaxTapMove( parameters.iMoveEventMaxMovement );
- iPointerEventSuppressor->SetMaxTapDuration( parameters.iMoveEventTimeout );
- iPointerEventSuppressor->SetMaxDownUpMove( parameters.iUpEventMaxMovement );
- iPointerEventSuppressor->SetMaxDownUpDuration( parameters.iUpEventTimeout );
- }
- break;
default:
// unsupported opcode, panic the client
{
@@ -1072,7 +1067,7 @@
//
void CPeninputAnim::StartTimer()
{
- if ( iIsActive && !iFlushTimer->IsActive())
+ if ( iIsActive && !iFlushTimer->IsActive() )
{
iFlushTimer->Start(
KFlushTimerPeriod,
--- a/textinput/peninputarc/src/peninputanim/penpointereventsuppressor.cpp Fri Sep 17 17:26:50 2010 +0100
+++ b/textinput/peninputarc/src/peninputanim/penpointereventsuppressor.cpp Fri Oct 22 15:38:27 2010 +0100
@@ -21,6 +21,7 @@
const TInt KPenPointerEventSuppressorDefaultMinInterDragInterval = 0;
const TInt KPenPointerEventSuppressorDefaultMovement = 6;
+
const TInt KPenPointerEventSuppressorDefaultMaxDownUpDuration = 400000; // 0.4 seconds
const TInt KPenPointerEventSuppressorDefaultDownUpMovement = 7;
@@ -48,6 +49,7 @@
iMaxDownUpMove.iHeight = KPenPointerEventSuppressorDefaultDownUpMovement;
}
+
TBool CPenPointerEventSuppressor::SuppressPointerEvent( TPointerEvent& aPointerEvent )
{
switch ( aPointerEvent.iType )
@@ -94,17 +96,18 @@
break;
}
case TPointerEvent::EButton1Up:
- {
- TTime now;
- now.HomeTime();
- TPoint delta = aPointerEvent.iPosition - iDownPos;
- if ( now.MicroSecondsFrom( iDownTime ) < iMaxDownUpDuration
- && Abs( delta.iX ) < iMaxDownUpMove.iWidth
- && Abs( delta.iY ) < iMaxDownUpMove.iHeight )
- {
+ {
+ TTime now;
+ now.HomeTime();
+ TPoint delta = aPointerEvent.iPosition - iDownPos;
+ if ( now.MicroSecondsFrom( iDownTime ) < iMaxDownUpDuration
+ && Abs( delta.iX ) < iMaxDownUpMove.iWidth
+ && Abs( delta.iY ) < iMaxDownUpMove.iHeight )
+ {
//within maximum movement and timeout, so move to position of down
aPointerEvent.iPosition = iDownPos;
- }
+ }
+
iTap = EFalse;
break;
}
@@ -135,6 +138,7 @@
iMinInterDragInterval = aInterval;
}
+
void CPenPointerEventSuppressor::SetMaxDownUpMove( TSize aMaxDownUpMove )
{
iMaxDownUpMove = aMaxDownUpMove;
@@ -144,3 +148,4 @@
{
iMaxDownUpDuration = aDuration;
}
+
--- a/textinput/peninputarc/src/peninputclient/penclientimpl.cpp Fri Sep 17 17:26:50 2010 +0100
+++ b/textinput/peninputarc/src/peninputclient/penclientimpl.cpp Fri Oct 22 15:38:27 2010 +0100
@@ -1262,6 +1262,15 @@
if(iStatus.Int() < 0)
{
+
+ // the pen input server has been terminated, so there is no need to post message again
+ // just notify the handler the message of ESignalServerExit
+ if ( iStatus.Int() == KErrServerTerminated )
+ {
+ HandleServerTerminatedL();
+ return;
+ }
+
//check server status
RThread srvThread;
TInt err = srvThread.Open(iSrvThreadId);
@@ -1274,9 +1283,7 @@
}
if(err != KErrNone || exitReason != 0) //server has exited
{
- iServerExit = ETrue;
- iPeninputServer->HandleServerExit();
- iHandler->HandleServerEventL(ESignalServerExit);
+ HandleServerTerminatedL();
return;
}
}
@@ -1301,6 +1308,26 @@
}
// ---------------------------------------------------------------------------
+// CPeninputServerObserver::HandleServerTerminatedL()
+// ---------------------------------------------------------------------------
+//
+void CPeninputServerObserver::HandleServerTerminatedL()
+ {
+ iServerExit = ETrue;
+
+ if ( iPeninputServer )
+ {
+ iPeninputServer->HandleServerExit();
+ }
+
+ if ( iHandler )
+ {
+ iHandler->HandleServerEventL( ESignalServerExit );
+ }
+
+ }
+
+// ---------------------------------------------------------------------------
// CPeninputServerObserver::RunError
// ---------------------------------------------------------------------------
//
@@ -1542,18 +1569,6 @@
User::RequestComplete(iPendingRequest, aErr);
}
-// ---------------------------------------------------------------------------
-// Enable or disable transition effect.
-// ---------------------------------------------------------------------------
-//
-void RPeninputServerImpl::EnableGfxTransEffect( TBool aEnable)
- {
- TPckg<TBool> msg( aEnable );
- TIpcArgs arg;
- arg.Set( KMsgSlot0, &msg );
- SendReceive(EPeninputRequestEnableGfxTransEffect, arg );
- }
-
CWaitingServerAo::CWaitingServerAo(RPeninputServerImpl* aClient)
: CActive(CActive::EPriorityStandard),
iClient(aClient)
--- a/textinput/peninputarc/src/peninputclient/peninputclient.cpp Fri Sep 17 17:26:50 2010 +0100
+++ b/textinput/peninputarc/src/peninputclient/peninputclient.cpp Fri Oct 22 15:38:27 2010 +0100
@@ -509,18 +509,5 @@
{
iSingletonServer->EnablePriorityChangeOnOriChange(aEnabled);
}
-
-// ---------------------------------------------------------------------------
-// Enable or disable transition effect.
-// ---------------------------------------------------------------------------
-//
-EXPORT_C void RPeninputServer::EnableGfxTransEffect( TBool aEnable )
- {
- if ( iSingletonServer )
- {
- iSingletonServer->EnableGfxTransEffect( aEnable );
- }
- }
-
//end of class RPeninputServer
// End of File
--- a/textinput/peninputarc/src/peninputlayoutcontrol/peninputlayoutbubblectrl.cpp Fri Sep 17 17:26:50 2010 +0100
+++ b/textinput/peninputarc/src/peninputlayoutcontrol/peninputlayoutbubblectrl.cpp Fri Oct 22 15:38:27 2010 +0100
@@ -66,8 +66,6 @@
EXPORT_C CBubbleCtrl::~CBubbleCtrl()
{
- Close();
-
if ( iText )
delete iText;
@@ -230,14 +228,12 @@
{
struct SData
{
- TUint32 ctrl;
TBool flag;
TRect pos;
CFbsBitmap* bmp;
CFbsBitmap* mask;
} data;
- data.ctrl = (TUint32)this;
data.flag = ETrue;
data.pos = Rect();
data.bmp = iBitmap;
@@ -317,13 +313,11 @@
{
struct SData
{
- TUint32 ctrl;
TBool flag;
TRect pos;
CFbsBitmap* bmp;
} data;
- data.ctrl = (TUint32)this;
data.flag = EFalse;
data.pos = Rect();
data.bmp = iBitmap;
--- a/textinput/peninputarc/src/peninputlayoutcontrol/peninputlayoutbutton.cpp Fri Sep 17 17:26:50 2010 +0100
+++ b/textinput/peninputarc/src/peninputlayoutcontrol/peninputlayoutbutton.cpp Fri Oct 22 15:38:27 2010 +0100
@@ -59,7 +59,7 @@
CFepUiBaseCtrl::BaseConstructL();
//tap accuracy enhancement
- if ( FeatureManager::FeatureSupported( KFeatureIdFfCapacitiveDisplay ) )
+ if( FeatureManager::FeatureSupported( KFeatureIdFfCapacitiveDisplay ))
{
TMargins margins;
UiLayout()->GetButtonExtResponseArea( margins );
--- a/textinput/peninputarc/src/peninputlayoutcontrol/peninputlayoutcontrol.mmp Fri Sep 17 17:26:50 2010 +0100
+++ b/textinput/peninputarc/src/peninputlayoutcontrol/peninputlayoutcontrol.mmp Fri Oct 22 15:38:27 2010 +0100
@@ -58,7 +58,6 @@
SOURCE peninputfloatctrl.cpp
SOURCE peninputfloatbubble.cpp
SOURCE peninputaknvkbpreviewbubblerenderer.cpp
-SOURCE peninputtapsettingmanager.cpp
userinclude ../../inc/peninputlayoutcontrolinc
--- a/textinput/peninputarc/src/peninputlayoutcontrol/peninputlayoutmultilineicfeditor.cpp Fri Sep 17 17:26:50 2010 +0100
+++ b/textinput/peninputarc/src/peninputlayoutcontrol/peninputlayoutmultilineicfeditor.cpp Fri Oct 22 15:38:27 2010 +0100
@@ -643,9 +643,11 @@
iLeadingEdge = icfdata.iLeadingEdge;
+ TInt draw = icfdata.iCmd == EPeninputICFSetCurSel ? 0 : 1;
+
if (icfdata.iFlag != EFepICFDataInlineNoMatch && iNoMatchState)
{
- UpdateNoMatchTextL(iPreInlineEndPos, KNullDesC, EFalse);
+ draw += UpdateNoMatchTextL(iPreInlineEndPos, KNullDesC, EFalse);
}
switch (icfdata.iCmd)
@@ -683,7 +685,7 @@
RecalcualteTextPositionL();
//SetMsgBubbleRect();
SetMsgBubbleRectAccordingToLanguage();
- Draw();
+// Draw();
}
break;
case EPeninputICFReplace:
@@ -744,13 +746,13 @@
}
}
- UpdateTextL(icfdata);
+ draw += UpdateTextL(icfdata);
// Need to set selection visible before set selection for textview
SetCursorSelVisibility( icfdata.iCursorSelVisible );
- SetSelectionL(icfdata.iCurSel);
- ResetViewHeightL();
+ draw += SetSelectionL(icfdata.iCurSel);
+ draw += ResetViewHeightL();
if (icfdata.iMidPos == 0)
{
@@ -759,13 +761,13 @@
// set to inline state
if (icfdata.iText.Locate(KParagraphSeperator) == KErrNotFound)
{
- SetAutoCompleteStateL(EFalse);
+ draw += SetAutoCompleteStateL(EFalse);
icfdata.iFlag == EFepICFDataInlineNoMatch ?
- SetInlineStateL(ETrue, icfdata.iStartPos,
- icfdata.iCurSel.iCursorPos,
- ETrue, icfdata.iText) :
- SetInlineStateL(ETrue, icfdata.iStartPos,
- icfdata.iCurSel.iCursorPos);
+ draw += SetInlineStateL( ETrue, icfdata.iStartPos,
+ icfdata.iCurSel.iCursorPos,
+ ETrue, icfdata.iText) :
+ draw += SetInlineStateL(ETrue, icfdata.iStartPos,
+ icfdata.iCurSel.iCursorPos);
}
}
else if (icfdata.iMidPos > 0)
@@ -773,7 +775,7 @@
// auto complete state
// Q: does insertion point need to be shown when auto complete?
// on the assumption that insertion point do not shown
- SetAutoCompleteStateL( ETrue, icfdata.iStartPos,
+ draw += SetAutoCompleteStateL( ETrue, icfdata.iStartPos,
icfdata.iStartPos + icfdata.iText.Length() - icfdata.iMidPos,
icfdata.iCurSel.iCursorPos );
}
@@ -781,47 +783,52 @@
{
// icfdata.iMidPos < 0, normal state
//
- SetInlineStateL(EFalse, icfdata.iStartPos, icfdata.iCurSel.iCursorPos);
- SetAutoCompleteStateL(EFalse);
-
+ draw += SetInlineStateL(EFalse, icfdata.iStartPos, icfdata.iCurSel.iCursorPos);
+ draw += SetAutoCompleteStateL(EFalse);
}
// after inline adjust, cusor position may be updated
if( bScroll )
{
- TryDisplayMaxTextL(iCursorSel.iCursorPos);
+ draw += TryDisplayMaxTextL(iCursorSel.iCursorPos);
}
-
- iTextView->DrawL(iViewRect);
- //if(iMsgBubble)
-// iMsgBubble->Draw();
iInsertionPoint->SetVisible( EFalse );
SetCursorVisible(icfdata.iCursorVisibility);
- if (AbleToDraw())
+ if ( AbleToDraw() )
{
- UpdateAreaImmed(Rect(),EFalse);
+ if(draw > 0)
+ {
+ iTextView->DrawL(iViewRect);
+ }
+
+ UpdateAreaImmed(iViewRect,EFalse);
}
}
-void CFepLayoutMultiLineIcfEditor::SetSelectionL(TCursorSelection aCurSel)
+TBool CFepLayoutMultiLineIcfEditor::SetSelectionL(TCursorSelection aCurSel)
{
+ TBool changed = EFalse;
+
if ( !IsTextPosValid(aCurSel.LowerPos()) ||
!IsTextPosValid(aCurSel.HigherPos()) )
{
- return;
+ return changed;
}
- AdjustSelectionL( aCurSel );
+ changed = AdjustSelectionL( aCurSel );
if ( iLayout->FirstLineInBand() != 0 && iLineMaxCount > 1 &&
iPromptTextLen > 0 && aCurSel.iCursorPos == iPromptTextLen )
{
- iTextView->SetViewLineAtTopL( 1 );
+ if ( iTextView->SetViewLineAtTopL( 1 ) != TPoint( 0, 0 ) )
+ {
+ changed = ETrue;
+ }
}
-
+
RecalcualteTextPositionL();
if ( iCursorSel.Length() > 0 )
@@ -841,7 +848,9 @@
//SetMsgBubbleRect();
SetMsgBubbleRectAccordingToLanguage();
SetInfoBubbleRect();
- }
+ }
+
+ return changed;
}
TBool CFepLayoutMultiLineIcfEditor::HighlightOverlapWithBubble( const TRect& aRect )
@@ -892,11 +901,11 @@
}
// for secret editor
-void CFepLayoutMultiLineIcfEditor::UpdateTextL(const TFepInputContextFieldData& aData)
+TBool CFepLayoutMultiLineIcfEditor::UpdateTextL(const TFepInputContextFieldData& aData)
{
if (!iTextIsSecret)
{
- return;
+ return EFalse;
}
switch (aData.iCmd)
@@ -915,7 +924,7 @@
iTextView->HandleInsertDeleteL
( TCursorSelection( iRichText->DocumentLength(), iPromptTextLen ), 0 );
}
- break;
+ return ETrue;
case EPeninputICFReplace:
{
if (iSecretTextTimer->IsActive())
@@ -961,13 +970,15 @@
aData.iText.Length()>1?KSecretInstantShowTimer:KSecretUpdateTimer,
KSecretUpdateTimer, TCallBack(UpdateSecretTextL, this));
}
- break;
+ return ETrue;
case EPeninputICFSetCurSel:
default:
{
break;
}
}
+
+ return EFalse;
}
TInt CFepLayoutMultiLineIcfEditor::UpdateSecretTextL(TAny* aEditArea)
@@ -1053,7 +1064,6 @@
}
TFontSpec fontSpec;
- fontSpec = aFont->FontSpecInTwips();
fontSpec.iHeight = aFont->HeightInPixels();
CFont* font;
iCoeEnv->ScreenDevice()->ReleaseFont(CONST_CAST(CFont*, iFont));
@@ -1072,7 +1082,6 @@
iCharFormat.iFontSpec.iHeight = iCoeEnv->ScreenDevice()->VerticalPixelsToTwips(iFontHeight);
iCharFormat.iFontSpec.iFontStyle.SetStrokeWeight(EStrokeWeightNormal);
iCharFormat.iFontSpec.iFontStyle.SetBitmapType(EAntiAliasedGlyphBitmap);
- iCharFormat.iFontSpec.iTypeface = iFont->FontSpecInTwips().iTypeface;
iRichText->ApplyCharFormatL(iCharFormat, iCharFormatMask, 0, iRichText->DocumentLength());
if( InlineStateOn() || AutoCompletionStateOn() )
@@ -1333,20 +1342,21 @@
SetMsgBubbleRectAccordingToLanguage();
}
-void CFepLayoutMultiLineIcfEditor::ResetViewHeightL()
+TBool CFepLayoutMultiLineIcfEditor::ResetViewHeightL()
{
- const TInt height = iLayout->FormattedHeightInPixels();
const TInt lineCount=iLayout->NumFormattedLines();
+
if ( lineCount <= 0 )
{
- return;
+ return EFalse;
}
+ const TInt height = iLayout->FormattedHeightInPixels();
TInt lineHeight = (height+lineCount-1) / lineCount;
if ( iFormatLineHeight == lineHeight )
{
- return;
+ return EFalse;
}
if ( lineHeight > iMaxIcfEditorHeight )
@@ -1380,6 +1390,8 @@
iViewRect.iBr.iY -= margin;
}
iTextView->SetViewRect(iViewRect);
+
+ return ETrue;
}
void CFepLayoutMultiLineIcfEditor::SetMsgBubbleRectAccordingToLanguage()
@@ -2512,12 +2524,12 @@
return (aPos >= 0 && aPos <= iRichText->DocumentLength());
}
-void CFepLayoutMultiLineIcfEditor::UpdateNoMatchTextL(TInt aPos, const TDesC& aNoMatchText,
+TBool CFepLayoutMultiLineIcfEditor::UpdateNoMatchTextL(TInt aPos, const TDesC& aNoMatchText,
TBool aNoMatchState)
{
if ( iNoMatchState == aNoMatchState )
{
- return;
+ return EFalse;
}
if (aNoMatchState)
@@ -2534,7 +2546,9 @@
iRichText->DeleteL(aPos, 1);
iTextView->HandleInsertDeleteL(TCursorSelection(aPos, aPos),1);
SetSelectionL( TCursorSelection( aPos - 1, aPos - 1 ) );
- }
+ }
+
+ return ETrue;
}
void CFepLayoutMultiLineIcfEditor::SetPromptTextFormatL(TInt aPromptTextLen)
@@ -2643,35 +2657,53 @@
}
}
-void CFepLayoutMultiLineIcfEditor::SetInlineStateL(TBool aInline,
+TBool CFepLayoutMultiLineIcfEditor::SetInlineStateL(TBool aInline,
TInt aStartPos,
TInt aEndPos,
TBool aNoMatchState,
const TDesC& aNoMatchText)
{
- if (aInline)
+ TInt oldState = iState;
+
+ if ( aInline )
+ {
iState = CFepLayoutMultiLineIcf::EIcfInline;
+ }
else
{
iState = CFepLayoutMultiLineIcf::EIcfNormal;
- UpdateNoMatchTextL(iPreInlineEndPos, KNullDesC, EFalse);
}
+
+ TBool changed = ( oldState != iState );
+
+ if ( changed )
+ {
+ if ( iState == CFepLayoutMultiLineIcf::EIcfNormal )
+ {
+ UpdateNoMatchTextL(iPreInlineEndPos, KNullDesC, EFalse);
+ }
- SetSpecialStateL(aInline,
- aStartPos,
- aEndPos,
- iPreInlineStartPos,
- iPreInlineEndPos,
- EAttFontUnderline,
- aNoMatchState,
- aNoMatchText);
+ SetSpecialStateL(aInline,
+ aStartPos,
+ aEndPos,
+ iPreInlineStartPos,
+ iPreInlineEndPos,
+ EAttFontUnderline,
+ aNoMatchState,
+ aNoMatchText);
+ }
+
+ return changed;
}
-void CFepLayoutMultiLineIcfEditor::SetAutoCompleteStateL(TBool aAutoComplete,
+TBool CFepLayoutMultiLineIcfEditor::SetAutoCompleteStateL(TBool aAutoComplete,
TInt aStartPos,
TInt aMidPos,
TInt aEndPos)
{
+ // If auto is on, we need draw every time, as grey part is not making the text changed
+ // if we use traditional way to check change, auto part is not turn to black when grey part is there.
+ TBool changed = ( aAutoComplete || iAutoComplete != aAutoComplete );
iAutoComplete = aAutoComplete;
if ( aAutoComplete )
@@ -2683,19 +2715,24 @@
iState = CFepLayoutMultiLineIcf::EIcfNormal;
}
- SetSpecialStateL(aAutoComplete,
- aStartPos,
- aMidPos,
- iPreInlineStartPos,
- iPreInlineEndPos,
- EAttFontUnderline);
-
- SetSpecialStateL(aAutoComplete,
- aMidPos,
- aEndPos,
- iPreAutoStartPos,
- iPreAutoEndPos,
- EAttColor);
+ if ( changed )
+ {
+ SetSpecialStateL(aAutoComplete,
+ aStartPos,
+ aMidPos,
+ iPreInlineStartPos,
+ iPreInlineEndPos,
+ EAttFontUnderline);
+
+ SetSpecialStateL(aAutoComplete,
+ aMidPos,
+ aEndPos,
+ iPreAutoStartPos,
+ iPreAutoEndPos,
+ EAttColor);
+ }
+
+ return changed;
}
TAknsItemID CFepLayoutMultiLineIcfEditor::BgImgSkinId() const
@@ -2831,8 +2868,10 @@
TRAP_IGNORE(SetFontL(font));
}
-void CFepLayoutMultiLineIcfEditor::TryDisplayMaxTextL( TInt aCursorPos )
+TBool CFepLayoutMultiLineIcfEditor::TryDisplayMaxTextL( TInt aCursorPos )
{
+ TBool scrolled = EFalse;
+
iTextView->FinishBackgroundFormattingL();
TInt lineIndex = iLayout->GetLineNumber( aCursorPos );
@@ -2843,10 +2882,12 @@
CalculateCursorPos(cursorPt);
if ( !iViewRect.Contains( cursorPt ) && ( lineIndex + 1 ) > ( iLineMaxCount - 1 ) )
{
- iTextView->SetViewLineAtTopL(( lineIndex + 1 ) - ( iLineMaxCount - 1 ));
- RecalcualteTextPositionL();
- //SetMsgBubbleRect();
- SetMsgBubbleRectAccordingToLanguage();
+ if ( iTextView->SetViewLineAtTopL(( lineIndex + 1 ) - ( iLineMaxCount - 1 )) != TPoint( 0, 0 ) )
+ {
+ scrolled = ETrue;
+ RecalcualteTextPositionL();
+ SetMsgBubbleRectAccordingToLanguage();
+ }
}
}
@@ -2860,15 +2901,18 @@
- iViewRect.iTl.iY) / iFormatLineHeight + 1;
if( lineCursor < pageCount )
{
-
- iTextView->SetViewLineAtTopL(
- lineCount - pageCount + 1 < 1 ? 1 : lineCount - pageCount + 1 );
-
- RecalcualteTextPositionL();
- //SetMsgBubbleRect();
- SetMsgBubbleRectAccordingToLanguage();
+ if ( iTextView->SetViewLineAtTopL(
+ lineCount - pageCount + 1 < 1 ? 1 : lineCount - pageCount + 1 )
+ != TPoint( 0, 0 ) )
+ {
+ scrolled = ETrue;
+ RecalcualteTextPositionL();
+ SetMsgBubbleRectAccordingToLanguage();
+ }
}
}
+
+ return scrolled;
}
void CFepLayoutMultiLineIcfEditor::DrawIcfBackground( CFbsBitGc& /*aGc*/, const TRect& aDrawnRect,
@@ -2892,14 +2936,18 @@
iRichText->Extract( aBuf, aPos + iPromptTextLen, aLength);
}
-void CFepLayoutMultiLineIcfEditor::AdjustSelectionL( const TCursorSelection& aCurSel )
+TBool CFepLayoutMultiLineIcfEditor::AdjustSelectionL( const TCursorSelection& aCurSel )
{
if (!IsTextPosValid(aCurSel.LowerPos()) ||
!IsTextPosValid(aCurSel.HigherPos()) )
{
- return;
+ return EFalse;
}
-
+ if (iCursorSel.iAnchorPos == aCurSel.iAnchorPos
+ && iCursorSel.iCursorPos == aCurSel.iCursorPos)
+ {
+ return EFalse;
+ }
iCursorSel = aCurSel;
if ( BelongToPromptText(aCurSel.iCursorPos) )
@@ -2917,6 +2965,8 @@
iTextView->SetSelectionL( iCursorSel );
iTextView->SetSelectionVisibilityL( iCursorSelVisible );
+
+ return ETrue;
}
void CFepLayoutMultiLineIcfEditor::ReDrawRect(const TRect& aRect)
--- a/textinput/peninputarc/src/peninputlayoutcontrol/peninputlayoutvkbkeyctrl.cpp Fri Sep 17 17:26:50 2010 +0100
+++ b/textinput/peninputarc/src/peninputlayoutcontrol/peninputlayoutvkbkeyctrl.cpp Fri Oct 22 15:38:27 2010 +0100
@@ -106,7 +106,7 @@
BaseConstructL();
//tap accuracy enhancement
- if ( FeatureManager::FeatureSupported( KFeatureIdFfCapacitiveDisplay ))
+ if( FeatureManager::FeatureSupported( KFeatureIdFfCapacitiveDisplay ))
{
TMargins margins;
UiLayout()->GetKeyExtResponseArea( margins );
@@ -122,7 +122,7 @@
// (other items were commented in a header).
// ---------------------------------------------------------------------------
//
-void CVirtualKeyCtrl::DrawKeyText(CFbsBitGc* aGc)
+void CVirtualKeyCtrl::DrawKeyText(CFbsBitGc* aGc, const TRect& aRect)
{
TBool textlineset = EFalse;
@@ -136,7 +136,7 @@
if (iKeyInfo->KeyUnicodes(TVirtualKeyTextPos(i)) != KNullDesC)
{
TAknLayoutText textLayout;
- textLayout.LayoutText(GetRect(),
+ textLayout.LayoutText(aRect,
iKeyboard->TextLineLayout(TVirtualKeyTextPos(i)));
TRgb color( KRgbBlack ); // sane default for nonskinned case
if ( AknsUtils::AvkonSkinEnabled() )
@@ -195,7 +195,7 @@
if (!textlineset)
{
TAknLayoutText textLayout;
- textLayout.LayoutText(GetRect(), iKeyboard->iVKBTextLineLayout);
+ textLayout.LayoutText(aRect, iKeyboard->iVKBTextLineLayout);
//CFbsBitGc* gc = static_cast<CFbsBitGc*>(BitGc());
@@ -323,7 +323,8 @@
gc->SetPenColor(KRgbBlack);
gc->SetBrushStyle( CGraphicsContext::ENullBrush );
//Draw text again.
- DrawKeyText(gc);
+
+ DrawKeyText(gc,GetRect());
}
// ---------------------------------------------------------------------------
@@ -458,7 +459,7 @@
gc->SetPenColor( KRgbBlack );
gc->SetBrushStyle( CGraphicsContext::ENullBrush );
gc->SetFaded(EFalse);
- DrawKeyText(gc);
+ DrawKeyText(gc,Rect());
}
CFbsBitGc* CVirtualKeyCtrl::GetGc()
@@ -526,11 +527,6 @@
TBool bHasDrawn = EFalse;
if(UiLayout()->NotDrawToLayoutDevice())
{
- /*TBool ret = iKeyboard->PrepareKeyBmp(iKeyboard->HighightKeyBmp(),
- iKeyboard->HighlightKeyDev(),
- rect,innerrect,
- iKeyboard->KeySkinId(EKeyBmpHighlight),
- KAknsIIDDefault,Rect());*/
TBool ret = iKeyboard->PrepareHighlightKeyBmp(rect,innerrect,Rect());
if(ret)
{
@@ -588,12 +584,12 @@
gc->SetFaded(EFalse);
if(UiLayout()->NotDrawToLayoutDevice())
{
- DrawKeyText(Keyboard()->HighlightGc());
+ DrawKeyText(Keyboard()->HighlightGc(), GetRect());
UpdateChangedArea(ETrue);
}
else
{
- DrawKeyText(gc);
+ DrawKeyText(gc, Rect());
}
}
@@ -629,7 +625,19 @@
}
if(iKeyInfo->Latched()||(PointerDown()&&!iKeyInfo->IsLatchKey()))
- {
+ {
+ // If some layout initializes a RootCtrl redraw operation when the key was in a highlighted state, the normal key would not be seen
+ // after key was returned to the normal state, that's because the layout device has been cleaned and redrawn again so when it comes to draw
+ // this highlighted virtual key, it just draws the bitmap on its own device, so the area the highlighted key occupied on the layout device
+ // is totally undrawn with the normal state key bitmap.
+ // So we have to redraw the normal state key first to make sure the normal key was drawn on the layout bitmap.
+ // [use case: Open the chinse VITUT, input some pinyin letter to bring the candidate list to the forground by clicking the virtual key ctrl
+ // ==> select some chinese words in the candidate list ==> then click and release the virtual key agian]
+ if(UiLayout()->NotDrawToLayoutDevice())
+ {
+ DrawNormalStateKey();
+ }
+
DrawHighlightKey();
// remove DrawBubble() into HandlePointerDownEventL()
@@ -714,9 +722,15 @@
}
if(UiLayout()->NotDrawToLayoutDevice())
{
- //no need to draw again, just remove the highlight bitmap
- UpdateChangedArea(EFalse);
- Draw();
+ if(!iKeyInfo->Latched())
+ {
+ //no need to draw again, just remove the highlight bitmap
+ UpdateChangedArea(EFalse);
+ }
+
+ // no need to draw the normal key to layout bitmap since the highlighted key bitmap is drawn in a seperate device instead of layout device
+ // so just notify the PEN UI to simply remove the highlighted key bitmap. It will somehow improve the performance and decrease the CPU usage
+ //Draw();
}
else
{
@@ -1104,13 +1118,10 @@
{
struct SData
{
- TUint32 ctrl;
TBool flag;
CFbsBitmap* bmp;
TRect pos;
} data;
-
- data.ctrl = (TUint32)this;
data.flag = aFlag;
data.bmp = Keyboard()->Bitmap();//aFlag ? Keyboard()->iBitmap : 0;
data.pos = Rect();
--- a/textinput/peninputarc/src/peninputlayoutcontrol/peninputtapsettingmanager.cpp Fri Sep 17 17:26:50 2010 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,385 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0""
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Implementation for CFepUiLayout
-*
-*/
-
-
-#include "peninputtapsettingmanager.h"
-
-#include <centralrepository.h>
-#include <AknFepGlobalEnums.h>
-#include <AknFepInternalCRKeys.h>
-
-_LIT( KSeparatorComma, "," );
-
-const TInt KTextBufferLength = 128;
-
-const TInt KDefaultMovement = 5;
-const TInt KDefaultTimeout = 200000;
-const TInt KDefaultMargin = 9;
-
-// ---------------------------------------------------------------------------
-// Symbian Constructor
-// ---------------------------------------------------------------------------
-//
-CPeninputTapSettingManager* CPeninputTapSettingManager::NewL()
- {
- CPeninputTapSettingManager* self = CPeninputTapSettingManager::NewLC();
- CleanupStack::Pop( self );
- return self;
- }
-
-// ---------------------------------------------------------------------------
-// Symbian Constructor
-// ---------------------------------------------------------------------------
-//
-CPeninputTapSettingManager* CPeninputTapSettingManager::NewLC()
- {
- CPeninputTapSettingManager* self = new ( ELeave ) CPeninputTapSettingManager();
- CleanupStack::PushL( self );
- self->ConstructL();
- return self;
- }
-
-// ---------------------------------------------------------------------------
-// c++ destructor
-// ---------------------------------------------------------------------------
-//
-CPeninputTapSettingManager::~CPeninputTapSettingManager()
- {
-
- }
-
-// ---------------------------------------------------------------------------
-// Load all parameters of tap accuracy enhancement for specified layout
-// ---------------------------------------------------------------------------
-//
-void CPeninputTapSettingManager::Load( TInt aLayoutType )
- {
- TRAPD( err, LoadFromRepositoryL( aLayoutType ) );
- if ( err != KErrNone )
- {
- LoadDefault();
- }
- }
-
-// ---------------------------------------------------------------------------
-// Load all parameters of tap accuracy enhancement for specified layout
-// ---------------------------------------------------------------------------
-//
-void CPeninputTapSettingManager::Load( TInt aLayoutType, const TDesC& aFileName )
- {
- TRAPD( err, LoadFromFileL( aLayoutType, aFileName ) );
- if ( err != KErrNone )
- {
- LoadDefault();
- }
- }
-
-// ---------------------------------------------------------------------------
-// Get configuration of PointerMove event suppressor
-// ---------------------------------------------------------------------------
-//
-void CPeninputTapSettingManager::GetPointerMoveSuppressor( TSize& aMaxMovement,
- TInt& aTimeout )
- {
- aMaxMovement = iPointerMoveMaxMovement;
- aTimeout = iPointerMoveTimeout;
- }
-
-// ---------------------------------------------------------------------------
-// Get configuration of PointerUp event suppressor
-// ---------------------------------------------------------------------------
-//
-void CPeninputTapSettingManager::GetPointerUpSuppressor( TSize& aMaxMovement,
- TInt& aTimeout )
- {
- aMaxMovement = iPointerUpMaxMovement;
- aTimeout = iPointerUpTimeout;
- }
-
-// ---------------------------------------------------------------------------
-// Get extra response area of virtual key controls.
-// ---------------------------------------------------------------------------
-//
-void CPeninputTapSettingManager::GetKeyExtResponseArea( TMargins& aMargins )
- {
- aMargins = iKeyMargins;
- }
-
-// ---------------------------------------------------------------------------
-// Get extra response area of button controls.
-// ---------------------------------------------------------------------------
-//
-void CPeninputTapSettingManager::GetButtonExtResponseArea( TMargins& aMargins )
- {
- aMargins = iButtonMargins;
- }
-
-// ---------------------------------------------------------------------------
-// C++ constructor.
-// ---------------------------------------------------------------------------
-//
-CPeninputTapSettingManager::CPeninputTapSettingManager()
- {
-
- }
-
-// ---------------------------------------------------------------------------
-// Symbian second-phase constructor.
-// ---------------------------------------------------------------------------
-//
-void CPeninputTapSettingManager::ConstructL()
- {
- }
-
-// ---------------------------------------------------------------------------
-// Load all parameters of tap accuracy enhancement for specified layout.
-// From Repository.
-// ---------------------------------------------------------------------------
-//
-void CPeninputTapSettingManager::LoadFromRepositoryL( TInt aLayoutType )
- {
- TUint32 uidButtonExtMargins = 0;
- TUint32 uidKeyCtrlExtMargins = 0;
- TUint32 uidPointerMoveMaxMove = 0;
- TUint32 uidPointerMoveTimeout = 0;
- TUint32 uidPointerUpMaxMove = 0;
- TUint32 uidPointerUpTimeout = 0;
-
- switch( aLayoutType )
- {
- case EPluginInputModeFSQ:
- {
- uidButtonExtMargins = KAknFepTapAccuracyFsqButtonExtMargins;
- uidKeyCtrlExtMargins = KAknFepTapAccuracyFsqKeyCtrlExtMargins;
- uidPointerMoveMaxMove = KAknFepTapAccuracyFsqPointerMoveMaxMovement;
- uidPointerMoveTimeout = KAknFepTapAccuracyFsqPointerMoveTimeout;
- uidPointerUpMaxMove = KAknFepTapAccuracyFsqPointerUpMaxMovement;
- uidPointerUpTimeout = KAknFepTapAccuracyFsqPointerUpTimeout;
- }
- break;
- case EPluginInputModePortraitFSQ:
- {
- uidButtonExtMargins = KAknFepTapAccuracyPFsqButtonExtMargins;
- uidKeyCtrlExtMargins = KAknFepTapAccuracyPFsqKeyCtrlExtMargins;
- uidPointerMoveMaxMove = KAknFepTapAccuracyPFsqPointerMoveMaxMovement;
- uidPointerMoveTimeout = KAknFepTapAccuracyPFsqPointerMoveTimeout;
- uidPointerUpMaxMove = KAknFepTapAccuracyPFsqPointerUpMaxMovement;
- uidPointerUpTimeout = KAknFepTapAccuracyPFsqPointerUpTimeout;
- }
- break;
- case EPluginInputModeFingerHwr:
- {
- uidButtonExtMargins = KAknFepTapAccuracyFhwrButtonExtMargins;
- uidKeyCtrlExtMargins = KAknFepTapAccuracyFhwrKeyCtrlExtMargins;
- uidPointerMoveMaxMove = KAknFepTapAccuracyFhwrPointerMoveMaxMovement;
- uidPointerMoveTimeout = KAknFepTapAccuracyFhwrPointerMoveTimeout;
- uidPointerUpMaxMove = KAknFepTapAccuracyFhwrPointerUpMaxMovement;
- uidPointerUpTimeout = KAknFepTapAccuracyFhwrPointerUpTimeout;
- }
- break;
- default:
- {
- uidButtonExtMargins = KAknFepTapAccuracyDefaultButtonExtMargins;
- uidKeyCtrlExtMargins = KAknFepTapAccuracyDefaultKeyCtrlExtMargins;
- uidPointerMoveMaxMove = KAknFepTapAccuracyDefaultPointerMoveMaxMovement;
- uidPointerMoveTimeout = KAknFepTapAccuracyDefaultPointerMoveTimeout;
- uidPointerUpMaxMove = KAknFepTapAccuracyDefaultPointerUpMaxMovement;
- uidPointerUpTimeout = KAknFepTapAccuracyDefaultPointerUpTimeout;
- }
- }
-
- CRepository* repository = CRepository::NewL( KCRUidAknFep );
- TBuf<KTextBufferLength> str;
- TInt num = 0;
- TPoint point;
- TMargins margins;
-
- //pointer move event
- repository->Get( uidPointerMoveTimeout, num );
- repository->Get( uidPointerMoveMaxMove, str );
- ParsePoints( point, str );
-
- iPointerMoveTimeout = num;
- iPointerMoveMaxMovement.iWidth = point.iX;
- iPointerMoveMaxMovement.iHeight = point.iY;
-
- //pointer up event
- repository->Get( uidPointerUpTimeout, num );
- repository->Get( uidPointerUpMaxMove, str );
- ParsePoints( point, str );
-
- iPointerUpTimeout = num;
- iPointerUpMaxMovement.iWidth = point.iX;
- iPointerUpMaxMovement.iHeight = point.iY;
-
- //key control
- repository->Get( uidKeyCtrlExtMargins, str );
- ParseMargins( margins, str );
- iKeyMargins = margins;
-
- //button control
- repository->Get( uidButtonExtMargins, str );
- ParseMargins( margins, str );
- iButtonMargins = margins;
-
- delete repository;
- }
-
-// ---------------------------------------------------------------------------
-// Load all parameters of tap accuracy enhancement for specified layout.
-// From file.
-// ---------------------------------------------------------------------------
-//
-void CPeninputTapSettingManager::LoadFromFileL( TInt /*aLayoutType*/,
- const TDesC& /*aFileName*/ )
- {
- //reserved
- }
-
-// ---------------------------------------------------------------------------
-// Load default parameters.
-// ---------------------------------------------------------------------------
-//
-void CPeninputTapSettingManager::LoadDefault()
- {
- iPointerMoveMaxMovement = TSize( KDefaultMovement, KDefaultMovement );
- iPointerMoveTimeout = KDefaultTimeout;
-
- iPointerUpMaxMovement = TSize( KDefaultMovement, KDefaultMovement );
- iPointerUpTimeout = KDefaultTimeout;
-
- iKeyMargins.iTop = KDefaultMargin;
- iKeyMargins.iLeft = KDefaultMargin;
- iKeyMargins.iBottom = KDefaultMargin;
- iKeyMargins.iRight = KDefaultMargin;
-
- iButtonMargins.iTop = KDefaultMargin;
- iButtonMargins.iLeft = KDefaultMargin;
- iButtonMargins.iBottom = KDefaultMargin;
- iButtonMargins.iRight = KDefaultMargin;
- }
-
-// ---------------------------------------------------------------------------
-// parse a TPoint from a comma separated values string.
-// ---------------------------------------------------------------------------
-//
-TInt CPeninputTapSettingManager::ParsePoints( TPoint& aPoint, const TDesC& aText )
- {
- TPtrC tokenizer( aText );
- TInt pos = tokenizer.Find( KSeparatorComma );
- if ( pos == KErrNotFound )
- {
- TInt value = 0;
- TLex converter( tokenizer );
- TInt error = converter.Val( value );
- aPoint.iX = ( KErrNone == error ? value : 0 );
- aPoint.iY = aPoint.iX;
- return 0;
- }
-
- TInt value = 0;
-
- TLex converter( tokenizer.Left( pos ) );
- TInt error = converter.Val( value );
- aPoint.iX = ( KErrNone == error ? value : 0 );
-
- converter = TLex( tokenizer.Mid( pos + 1 ) );
- error = converter.Val( value );
- aPoint.iY = ( KErrNone == error ? value : 0 );
-
- return 0;
- }
-
-// ---------------------------------------------------------------------------
-// parse a TMargins from a comma separated values string.
-// ---------------------------------------------------------------------------
-//
-TInt CPeninputTapSettingManager::ParseMargins( TMargins& aMargins, const TDesC& aText )
- {
- RArray<TInt> values;
-
- TPtrC tokenizer( aText );
- TInt pos = 0;
- while ( pos != KErrNotFound )
- {
- pos = tokenizer.Find( KSeparatorComma );
-
- TPtrC substr = ( pos == KErrNotFound ) ? tokenizer : tokenizer.Left( pos );
- TInt value = 0;
- TLex converter( substr );
- TInt error = converter.Val( value );
- values.Append( KErrNone == error ? value : 0 );
-
- if ( pos != KErrNotFound )
- {
- TPtrC right = tokenizer.Mid( pos + 1 );
- tokenizer.Set( right );
- }
- }
-
- TInt count = values.Count();
-
- //one value, applies to all sides
- if( count == 1 )
- {
- aMargins.iTop = values[0];
- aMargins.iLeft = values[0];
- aMargins.iBottom = values[0];
- aMargins.iRight = values[0];
- }
-
- //two values, first one specifies margins of top and bottom,
- //the second specifies left and right.
- else if( count == 2 )
- {
- aMargins.iTop = values[0];
- aMargins.iLeft = values[1];
- aMargins.iBottom = values[0];
- aMargins.iRight = values[1];
- }
-
- //three values, first is top, second is the left and right, last is bottom.
- else if( count == 3 )
- {
- aMargins.iTop = values[0];
- aMargins.iLeft = values[1];
- aMargins.iBottom = values[1];
- aMargins.iRight = values[2];
- }
-
- //four values, specify top,left,bottom and right respectively
- else if ( count >= 4 )
- {
- aMargins.iTop = values[0];
- aMargins.iLeft = values[1];
- aMargins.iBottom = values[2];
- aMargins.iRight = values[3];
- }
-
- else
- {
- aMargins.iTop = 0;
- aMargins.iLeft = 0;
- aMargins.iBottom = 0;
- aMargins.iRight = 0;
- }
-
- values.Close();
- return count;
- }
-
-//end of file
--- a/textinput/peninputarc/src/peninputlayoutcontrol/peninputuilayout.cpp Fri Sep 17 17:26:50 2010 +0100
+++ b/textinput/peninputarc/src/peninputlayoutcontrol/peninputuilayout.cpp Fri Oct 22 15:38:27 2010 +0100
@@ -38,7 +38,6 @@
#include <AknFepGlobalEnums.h>
#include <layoutmetadata.cdl.h>
-#include "peninputtapsettingmanager.h"
// ======== MEMBER FUNCTIONS ========
@@ -90,20 +89,20 @@
iExtension->iSkinInstance = AknsUtils::SkinInstance();
iExtension->iTouchFeedbackInstance = MTouchFeedback::Instance();
iExtension->iDisableDrawing = EFalse;
-
- TInt inputMode = PenInputType();
- TBool isPortraitFSQEnabled = FeatureManager::FeatureSupported(
- KFeatureIdFfVirtualFullscrPortraitQwertyInput );
-
- //detect real type of two qwerty layout
- if ( inputMode == EPluginInputModeFSQ && isPortraitFSQEnabled
- && !Layout_Meta_Data::IsLandscapeOrientation() )
- {
+
+ TInt inputMode = PenInputType();
+ TBool isPortraitFSQEnabled = FeatureManager::FeatureSupported(
+ KFeatureIdFfVirtualFullscrPortraitQwertyInput );
+
+ //detect real type of two qwerty layout
+ if ( inputMode == EPluginInputModeFSQ &&
+ isPortraitFSQEnabled && !Layout_Meta_Data::IsLandscapeOrientation() )
+ {
inputMode = EPluginInputModePortraitFSQ;
- }
-
- //load settings of tap accuracy enhancement
- LoadTapAccuracySettingsL( inputMode );
+ }
+
+ //load settings of tap accuracy enhancement
+ LoadTapAccuracySettings( inputMode );
}
// ---------------------------------------------------------------------------
@@ -493,22 +492,7 @@
iRootCtrl->OnActivate();
#ifdef RD_TACTILE_FEEDBACK
iExtension->iTactileSupported = FeatureManager::FeatureSupported( KFeatureIdTactileFeedback );
-#endif // RD_TACTILE_FEEDBACK
-
- //update pointer event suppressor
- if ( FeatureManager::FeatureSupported( KFeatureIdFfCapacitiveDisplay ) )
- {
- TPointerEventSuppressorParameters parameters;
- parameters.iMoveEventMaxMovement = iExtension->iPointerMoveSuppressMaxMovement;
- parameters.iMoveEventTimeout = iExtension->iPointerMoveSuppressTimeout;
- parameters.iUpEventMaxMovement = iExtension->iPointerUpSuppressMaxMovement;
- parameters.iUpEventTimeout = iExtension->iPointerUpSuppressTimeout;
-
- TPtrC data( reinterpret_cast<TUint16*>(¶meters),
- sizeof(TPointerEventSuppressorParameters) / 2 );
-
- SignalOwner( ESignalUpdatePointerSuppressor, data );
- }
+#endif // RD_TACTILE_FEEDBACK
}
// ---------------------------------------------------------------------------
@@ -979,21 +963,46 @@
// Load tap accuracy enhancement settings according to the specified input mode.
// ---------------------------------------------------------------------------
//
-void CFepUiLayout::LoadTapAccuracySettingsL( TInt alayoutType )
+void CFepUiLayout::LoadTapAccuracySettings( TInt aInputMode )
{
- CPeninputTapSettingManager* manager = CPeninputTapSettingManager::NewL();
-
- manager->Load( alayoutType );
- manager->GetPointerMoveSuppressor( iExtension->iPointerMoveSuppressMaxMovement,
- iExtension->iPointerMoveSuppressTimeout );
-
- manager->GetPointerUpSuppressor( iExtension->iPointerUpSuppressMaxMovement,
- iExtension->iPointerUpSuppressTimeout );
-
- manager->GetKeyExtResponseArea( iExtension->iKeyExtResponseMargins );
- manager->GetButtonExtResponseArea( iExtension->iButtonExtResponseMargins );
-
- delete manager;
+ //config tap accuracy enhancement with the parameters provided by UE.
+ //hard code is used here to minimize code changes
+ if ( aInputMode == EPluginInputModeFSQ )
+ {
+ iExtension->iKeyExtResponseMargins.iTop = 20;
+ iExtension->iKeyExtResponseMargins.iLeft = 20;
+ iExtension->iKeyExtResponseMargins.iBottom = 20;
+ iExtension->iKeyExtResponseMargins.iRight = 20;
+
+ iExtension->iButtonExtResponseMargins.iTop = 20;
+ iExtension->iButtonExtResponseMargins.iLeft = 20;
+ iExtension->iButtonExtResponseMargins.iBottom = 20;
+ iExtension->iButtonExtResponseMargins.iRight = 20;
+ }
+ else if ( aInputMode == EPluginInputModePortraitFSQ )
+ {
+ iExtension->iKeyExtResponseMargins.iTop = 11;
+ iExtension->iKeyExtResponseMargins.iLeft = 11;
+ iExtension->iKeyExtResponseMargins.iBottom = 11;
+ iExtension->iKeyExtResponseMargins.iRight = 11;
+
+ iExtension->iButtonExtResponseMargins.iTop = 11;
+ iExtension->iButtonExtResponseMargins.iLeft = 11;
+ iExtension->iButtonExtResponseMargins.iBottom = 11;
+ iExtension->iButtonExtResponseMargins.iRight = 11;
+ }
+ else
+ {
+ iExtension->iKeyExtResponseMargins.iTop = 10;
+ iExtension->iKeyExtResponseMargins.iLeft = 10;
+ iExtension->iKeyExtResponseMargins.iBottom = 10;
+ iExtension->iKeyExtResponseMargins.iRight = 10;
+
+ iExtension->iButtonExtResponseMargins.iTop = 10;
+ iExtension->iButtonExtResponseMargins.iLeft = 10;
+ iExtension->iButtonExtResponseMargins.iBottom = 10;
+ iExtension->iButtonExtResponseMargins.iRight = 10;
+ }
}
//end of file
--- a/textinput/peninputarc/src/peninputserverapp/data/peninputserver.rss Fri Sep 17 17:26:50 2010 +0100
+++ b/textinput/peninputarc/src/peninputserverapp/data/peninputserver.rss Fri Oct 22 15:38:27 2010 +0100
@@ -26,11 +26,17 @@
#include <avkon.rh>
#include <avkon.mbg>
+#include <peninputserver.mbg>
+#include <aknsconstants.hrh>
+#include "peninputcommonlayout.rh"
+#include <peninputcommonctrls.loc>
+
#ifdef RD_SCALABLE_UI
#include <appinfo.rh>
#endif
#include <data_caging_paths_strings.hrh>
+#define AKN_SERVER_BMP "z:\\resource\\apps\\peninputserver.mbm"
// CONSTANTS
@@ -56,6 +62,45 @@
caption = "peninputserver";
};
}
+
+RESOURCE TBUF r_peninput_server_finger_spell {buf = qtn_t9_match_selection_list;}
+
+RESOURCE AKN_FEP_SCROLLABLE_LIST_IMAGE r_peninput_server_candidate_list
+ {
+ bmpfile = AKN_SERVER_BMP;
+ imgmajorskinid = EAknsMajorGeneric;
+ pageup = r_peninput_server_candidate_list_pageup;
+ pagedown = r_peninput_server_candidate_list_pagedown;
+ listsep = EMbmPeninputserverQgn_graf_line_primary_horizontal_dashed;
+ listsepmsk = EMbmPeninputserverQgn_graf_line_primary_horizontal_dashed_mask;
+ listspeskinid = EAknsMinorGenericQgnGrafLinePrimaryHorizontalDashed;
+ }
+
+RESOURCE AKN_FEP_COMMON_BUTTON_IMAGE r_peninput_server_candidate_list_pageup
+ {
+ bmpfile = AKN_SERVER_BMP;
+ imgmajorskinid = EAknsMajorGeneric;
+
+ forground = EMbmPeninputserverQgn_indi_itut_cursor_up;
+ forgroundmsk = EMbmPeninputserverQgn_indi_itut_cursor_up_mask;
+ forgroundskinid = EAknsMinorGenericQgnIndiItutCursorUp;
+ }
+
+RESOURCE AKN_FEP_COMMON_BUTTON_IMAGE r_peninput_server_candidate_list_pagedown
+ {
+ bmpfile = AKN_SERVER_BMP;
+ imgmajorskinid = EAknsMajorGeneric;
+
+ forground = EMbmPeninputserverQgn_indi_itut_cursor_down;
+ forgroundmsk = EMbmPeninputserverQgn_indi_itut_cursor_down_mask;
+ forgroundskinid = EAknsMinorGenericQgnIndiItutCursorDown;
+ }
+
+RESOURCE TBUF r_peninput_server_candidate_list_page_num
+ {
+ buf = "%0N/%1N";
+ }
+
#endif
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/textinput/peninputarc/src/peninputserverapp/iconlist.txt Fri Oct 22 15:38:27 2010 +0100
@@ -0,0 +1,3 @@
+-c8,8 qgn_indi_itut_cursor_up.svg
+-c8,8 qgn_indi_itut_cursor_down.svg
+-c8,8 qgn_graf_line_primary_horizontal_dashed.svg
\ No newline at end of file
--- a/textinput/peninputarc/src/peninputserverapp/peninputanimclientobj.cpp Fri Sep 17 17:26:50 2010 +0100
+++ b/textinput/peninputarc/src/peninputserverapp/peninputanimclientobj.cpp Fri Oct 22 15:38:27 2010 +0100
@@ -503,21 +503,4 @@
AddAnimCommand(cmd);
return ETrue;
}
-
-// ---------------------------------------------------------------------------
-// CPeninputAnimObj::UpdatePointerEventSuppressor()
-// Update parameters of pointer event suppressor.
-// ---------------------------------------------------------------------------
-//
-void CPeninputAnimObj::UpdatePointerEventSuppressor(
- const TPointerEventSuppressorParameters& aParameters )
- {
- TAnimUpdatePointerEventSuppressorCmd* cmd =
- new TAnimUpdatePointerEventSuppressorCmd( iAnim, aParameters );
-
- if ( cmd != NULL )
- {
- AddAnimCommand( cmd );
- }
- }
//end of file
--- a/textinput/peninputarc/src/peninputserverapp/peninputanimcommand.cpp Fri Sep 17 17:26:50 2010 +0100
+++ b/textinput/peninputarc/src/peninputserverapp/peninputanimcommand.cpp Fri Oct 22 15:38:27 2010 +0100
@@ -362,17 +362,3 @@
iAnim.SetDiscreeptPop(iArea);
return ETrue;
}
-
-TAnimUpdatePointerEventSuppressorCmd::TAnimUpdatePointerEventSuppressorCmd(
- RPeninputAnim& aAnim, const TPointerEventSuppressorParameters& aParameters )
- : TAnimCmd( aAnim ), iParameters( aParameters )
- {
-
- }
-
-TBool TAnimUpdatePointerEventSuppressorCmd::ExecuteAnimCommand() const
- {
- iAnim.UpdatePointerEventSuppressor( iParameters );
- return ETrue;
- }
-
--- a/textinput/peninputarc/src/peninputserverapp/peninputserver.cpp Fri Sep 17 17:26:50 2010 +0100
+++ b/textinput/peninputarc/src/peninputserverapp/peninputserver.cpp Fri Oct 22 15:38:27 2010 +0100
@@ -45,15 +45,20 @@
#include <AknDef.h>
#include <aknfeppeninputenums.h>
#include <aknappui.h>
+#include <peninputcmdparam.h>
#include "peninputcrpclient.h"
#include <avkondomainpskeys.h>
+#include "penuicandidatewnd.h"
+#include "penuiwndeventobserver.h"
+#include "penuiwndeventhandler.h"
//#define __WND_TEST_
// CONSTANTS
const TSize KInitialPeninputSize= TSize( 10, 10 );
const TInt KMsgQueueLen = 1000;
const TInt KMsgResponseQueueLen = 10;
+const TInt KLiftupPriority = 10;
const TInt KWsSessionFlushPerioid = 50000;//50ms
const TInt KInvalidValue = -1;
@@ -218,8 +223,8 @@
void CPeninputServer::ConstructL( )
{
#ifdef RD_TACTILE_FEEDBACK
- FeatureManager::InitializeLibL();
- iSupportFeedback = FeatureManager::FeatureSupported( KFeatureIdTactileFeedback );
+ FeatureManager::InitializeLibL();
+ iSupportFeedback = FeatureManager::FeatureSupported( KFeatureIdTactileFeedback );
#endif //RD_TACTILE_FEEDBACK
@@ -242,24 +247,26 @@
iHardwareLayoutChangeWatcher->StartWatching();
iSoftwareLayoutChangeWatcher->StartWatching();
- RWindowGroup& rootWin = CCoeEnv::Static()->RootWin();
- rootWin.EnableFocusChangeEvents (); // For cover UI/status pane refresh problems
- rootWin.EnableGroupListChangeEvents();
- rootWin.EnableReceiptOfFocus(EFalse);
- rootWin.AutoForeground(EFalse);
+ RWindowGroup& rootWin = CCoeEnv::Static()->RootWin();
+ rootWin.EnableFocusChangeEvents (); // For cover UI/status pane refresh problems
+ rootWin.EnableGroupListChangeEvents();
+ rootWin.EnableReceiptOfFocus(EFalse);
+ rootWin.AutoForeground(EFalse);
ConstructSpriteL();
//create animation object
- iAnimObj = CPeninputAnimObj::NewL(iSpriteMember);
-
- iLayoutOwner = CPeninputUiLayoutOwner::NewL( *this );
- iPenUiCtrl = new(ELeave) CPenUiWndCtrl(CCoeEnv::Static()->RootWin(),iSpriteMember.iBitmap);
- iInternalBackgroundCtrl = new(ELeave) CInternalBkCtrl(CCoeEnv::Static()->RootWin());
- iInternalBackgroundCtrl->ConstructL();
- iPenUiCtrl->ConstructL();
-
- iCurScreenFocusedWndGrpId = GetFocusAppUid().iUid;
+ iAnimObj = CPeninputAnimObj::NewL(iSpriteMember);
+
+ iLayoutOwner = CPeninputUiLayoutOwner::NewL( *this );
+ iPenUiCtrl = new(ELeave) CPenUiWndCtrl(CCoeEnv::Static()->RootWin(),iSpriteMember.iBitmap);
+ iInternalBackgroundCtrl = new(ELeave) CInternalBkCtrl(CCoeEnv::Static()->RootWin());
+ iInternalBackgroundCtrl->ConstructL();
+ iPenUiCtrl->ConstructL();
+ iObserver = CPenUiWndEventHandler::NewL( this );
+ iCandidateWnd = CPenUiCandidateWnd::NewL( iObserver );
+
+ iCurScreenFocusedWndGrpId = GetFocusAppUid().iUid;
#ifdef __LOG_WNDGROU__
iLogFile.Replace(CCoeEnv::Static()->FsSession(),KLogFile,EFileShareAny|EFileWrite);
iLogFile.Close();
@@ -342,6 +349,8 @@
#endif // RD_TACTILE_FEEDBACK
delete iPenUiCtrl;
delete iInternalBackgroundCtrl;
+ delete iCandidateWnd;
+ delete iObserver;
iClientProcess.Close();
iClientLayouts.Close();
@@ -783,7 +792,10 @@
RecoverButtonEventState();
iUiLayout->OnDeActivate();
if(iUseWindowCtrl)
- iPenUiCtrl->OnDeactivate(); //disable non fading
+ {
+ iPenUiCtrl->OnDeactivate(); //disable non fading
+ iCandidateWnd->HideCandidateList();
+ }
}
return ETrue;
@@ -840,7 +852,10 @@
iForegroundUiHandler->AddDelayedCmd();
if (iUseWindowCtrl)
+ {
iPenUiCtrl->ClosePenUi(aRotation);
+ iCandidateWnd->HideCandidateList();
+ }
//save current screen mode
iCurScrMode = CCoeEnv::Static()->ScreenDevice()->CurrentScreenMode();
@@ -863,17 +878,7 @@
//message requests UI attribute is always handled.
switch(aMessage.Function())
{
- case EPeninputRequestEnableGfxTransEffect:
- {
- if( iUseWindowCtrl && iPenUiCtrl )
- {
- TBool enable = EFalse;
- TPckg<TBool> msg( enable );
- aMessage.ReadL( 0,msg );
- iPenUiCtrl->EnableGfxTransEffect( enable );
- }
- }
- break;
+
case EPeninputRequestUiIsVisible:
{
TPckg<TBool> msg(iActive);
@@ -2025,9 +2030,34 @@
iIsLayoutReDrawAllowWhenActive = *retVal;
}
break;
- case ESignalUpdatePointerSuppressor:
- {
- UpdatePointerEventSuppressor( aEventData );
+ case ESignalShowServerCandidate:
+ {
+ if ( iUseWindowCtrl )
+ {
+ // Lift the priority of candidate list window to higher
+ // than pen ui wnd.
+ TInt priority = iPenUiCtrl->WndPriority();
+ iCandidateWnd->SetPriority( priority + KLiftupPriority );
+
+ TUint16* buf = const_cast<TUint16*>( aEventData.Ptr() );
+ TPeninputCandidateData* cmd =
+ reinterpret_cast< TPeninputCandidateData* >( buf );
+ iCandidateWnd->SetAlign(
+ CGraphicsContext::TTextAlign ( cmd->iAlign ) );
+ iCandidateWnd->SetInitRect( cmd->iInitRect );
+ iCandidateWnd->EnableSpell( cmd->iSpellEnabled );
+ iCandidateWnd->EnableTextWidth( cmd->iTextWidthEnabled );
+ TRAP_IGNORE( iCandidateWnd->ShowCandidateListL(
+ cmd->iItemArray, cmd->iActiveIndex ) );
+ }
+ }
+ break;
+ case ESignalHideServerCandidate:
+ {
+ if ( iUseWindowCtrl )
+ {
+ iCandidateWnd->HideCandidateList();
+ }
}
break;
default:
@@ -2140,6 +2170,9 @@
{
// Update the cursor color when resource is changed
iPenUiCtrl->SetCursorColor();
+
+ // Update candidate window when resource is changed
+ iCandidateWnd->HandleResourceChange( aType );
#ifdef FIX_FOR_NGA
// iEnablePriorityChangeOnOriChange will be set to be EFalse, if some dialog in FEP end were opened and
@@ -2491,9 +2524,14 @@
{
SignalOwner( ESignalLayoutClosed, KNullDesC );
}
-
- TBool handled = iUiLayout ? iUiLayout->HandleEventL(ERawEvent,&aEvent)
- : EFalse;
+
+ // Candidate window handles raw event firstly.
+ TBool handled = iCandidateWnd->HandleRawEventL( &aEvent );
+ if( !handled )
+ {
+ handled = iUiLayout ? iUiLayout->HandleEventL( ERawEvent,&aEvent )
+ : EFalse;
+ }
if (TRawEvent::EButton1Down == aEvent.Type())
{
@@ -3045,21 +3083,6 @@
iDiscreetPopArea = iAknUiSrv.GetInUseGlobalDiscreetPopupRect();
iAnimObj->SetDiscreetPopArea(iDiscreetPopArea);
}
-
-// ---------------------------------------------------------------------------
-// CPeninputServer::UpdatePointerEventSuppressor()
-// Update parameters of pointer event suppressor.
-// ---------------------------------------------------------------------------
-//
-void CPeninputServer::UpdatePointerEventSuppressor( const TDesC& aData )
- {
- TUint16* buf = const_cast<TUint16* >( aData.Ptr() );
- TPointerEventSuppressorParameters* parameters =
- reinterpret_cast<TPointerEventSuppressorParameters*> ( buf );
-
- iAnimObj->UpdatePointerEventSuppressor( *parameters );
- }
-
// ======== class CEventQueue========
//
// ---------------------------------------------------------------------------
--- a/textinput/peninputarc/src/peninputserverapp/peninputserver.mmp Fri Sep 17 17:26:50 2010 +0100
+++ b/textinput/peninputarc/src/peninputserverapp/peninputserver.mmp Fri Oct 22 15:38:27 2010 +0100
@@ -43,6 +43,8 @@
SOURCE penuiwndctrl.cpp
SOURCE keyrotator.cpp
SOURCE peninputcrpclient.cpp
+SOURCE penuicandidatewnd.cpp
+SOURCE penuiwndeventhandler.cpp
USERINCLUDE . ../../inc/pensrvcliinc
@@ -63,6 +65,7 @@
LIBRARY gdi.lib
LIBRARY peninputlayouteng.lib
LIBRARY centralrepository.lib
+LIBRARY CommonEngine.lib
LIBRARY apparc.lib
LIBRARY cone.lib
--- a/textinput/peninputarc/src/peninputserverapp/peninputserversession.cpp Fri Sep 17 17:26:50 2010 +0100
+++ b/textinput/peninputarc/src/peninputserverapp/peninputserversession.cpp Fri Oct 22 15:38:27 2010 +0100
@@ -320,7 +320,6 @@
case EPeninputRequestSupportInputMode:
case EPeninputRequestSetInputLanguage:
case EPeninputEnablePriorityChangeOnOriChange:
- case EPeninputRequestEnableGfxTransEffect:
ret = iPenInputSvr.HandleMessageL(aMessage);
break;
case EPeninputRequestUpdateAppInfo:
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/textinput/peninputarc/src/peninputserverapp/penuicandidatewnd.cpp Fri Oct 22 15:38:27 2010 +0100
@@ -0,0 +1,1452 @@
+/*
+* Copyright (c) 2008-2008 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0""
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: Implementation for button base and dragbar
+*
+*/
+
+#include <s32mem.h>
+#include <AknsConstants.h>
+#include <AknUtils.h>
+#include <AknsDrawUtils.h>
+#include <AknBidiTextUtils.h>
+#include <aknlayoutscalable_avkon.cdl.h>
+#include <aknlayoutscalable_apps.cdl.h>
+#include <barsread.h>
+#include <peninputserver.rsg>
+#include <StringLoader.h>
+#include <peninputcmdparam.h>
+
+#include "aknfeppeninputenums.h"
+#include "penuicandidatewnd.h"
+#include "penuiwndeventobserver.h"
+
+/**
+ * The capture type of pointing on canidate list.
+ */
+enum TCandWndCaptureType
+ {
+ ECandWndCapNone,
+ ECandWndCapItem,
+ ECandWndCapPageUp,
+ ECandWndCapPageDown,
+ ECandWndCapOther,
+ ECandWndCapOut
+ };
+
+const TInt KInvalidBmp = -1 ;
+const TInt KInvalidColorGroup = -1;
+
+const TInt KOnePageItemCount = 4;
+const TInt KTextRectMargin = 4;
+const TInt KDisplayTextLen = KMaxItemTextLength + KAknBidiExtraSpacePerLine;
+
+const TInt KPaneHorMarginCount = 2;
+const TInt KTotalHorMarginCount = 4;
+
+const TInt KTransparency[256] =
+ {
+ 0, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 7, 7, 7,
+ 8, 8, 8, 8, 9, 9, 9, 10, 10, 10, 11, 11, 11, 11, 12, 12, 12, 13, 13, 13,
+ 14, 14, 14, 14, 15, 15, 15, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 19,
+ 19, 19, 20, 20, 20, 20, 21, 21, 21, 22, 22, 22, 23, 23, 23, 23, 24, 24,
+ 24, 25, 25, 25, 26, 26, 26, 26, 27, 27, 27, 28, 28, 28, 29, 29, 29, 29,
+ 30, 30, 30, 31, 31, 31, 32, 32, 32, 32, 33, 33, 33, 34, 34, 34, 35, 35,
+ 35, 35, 36, 36, 36, 37, 37, 37, 38, 38, 38, 38, 39, 39, 39, 40, 40, 40,
+ 41, 41, 41, 41, 42, 42, 42, 43, 43, 43, 44, 44, 44, 44, 45, 45, 45, 46,
+ 46, 46, 47, 47, 47, 47, 48, 48, 48, 49, 49, 49, 50, 50, 50, 50, 51, 51,
+ 51, 52, 52, 52, 53, 53, 53, 53, 54, 54, 54, 55, 55, 55, 56, 56, 56, 56,
+ 57, 57, 57, 58, 58, 58, 59, 59, 59, 59, 60, 60, 60, 61, 61, 61, 62, 62,
+ 62, 62, 63, 63, 63, 64, 64, 64, 65, 65, 65, 65, 66, 66, 66, 67, 67, 67,
+ 68, 68, 68, 68, 69, 69, 69, 70, 70, 70, 71, 71, 71, 71, 72, 72, 72, 73,
+ 73, 73, 74, 74, 74, 74, 75, 75, 75, 76, 76, 76, 77, 77
+ };
+
+const TInt KServerBufferSize = 8;
+
+const TSize KInnerRectOffset = TSize( 4, 4 );
+const TSize KHighlightInnerRectOffset = TSize( 7, 7 );
+const TSize KPageButtonInnerRectOffset = TSize( 10, 10 );
+
+const TInt KSeparatorLineHeight = 2;
+const TInt KSeparatorLineYOffset = -4;
+
+const TInt KLafLandscapeCandidateIndex = 3;
+const TInt KLafPortraitCandidateIndex = 2;
+
+const TInt KHalfNumber = 2;
+const TInt KItemSelIntSize = 2;
+const TInt KPageInfoIntSize = 2;
+
+// ---------------------------------------------------------------------------
+// Two-phased constructor.
+// ---------------------------------------------------------------------------
+//
+CPenUiCandidateWnd* CPenUiCandidateWnd::NewL( MPenUiWndEventObserver* aObserver )
+ {
+ CPenUiCandidateWnd* self = CPenUiCandidateWnd::NewLC( aObserver );
+ CleanupStack::Pop( self );
+ return self;
+ }
+
+// ---------------------------------------------------------------------------
+// Two-phased constructor.
+// ---------------------------------------------------------------------------
+//
+CPenUiCandidateWnd* CPenUiCandidateWnd::NewLC( MPenUiWndEventObserver* aObserver )
+ {
+ CPenUiCandidateWnd* self = new (ELeave) CPenUiCandidateWnd( aObserver );
+ CleanupStack::PushL( self );
+ self->ConstructL();
+ return self;
+ }
+
+// ---------------------------------------------------------------------------
+// Destructor.
+// ---------------------------------------------------------------------------
+//
+CPenUiCandidateWnd::~CPenUiCandidateWnd()
+ {
+ iItemRects.Close();
+ iItemList.ResetAndDestroy();
+
+ DeleteAllBitmaps();
+
+ delete iPageInfo;
+ }
+
+// ---------------------------------------------------------------------------
+// Handle raw events of pen input.
+// ---------------------------------------------------------------------------
+//
+TBool CPenUiCandidateWnd::HandleRawEventL( const TAny* aEventData )
+ {
+ if( !IsVisible() && iPointerArea == ECandWndCapNone )
+ {
+ return EFalse;
+ }
+
+ TRawEvent event = *((TRawEvent*)aEventData);
+ switch( event.Type() )
+ {
+ case TRawEvent::EPointerMove:
+ {
+ TPoint point = event.Pos() - PositionRelativeToScreen();
+ HandlePointerMoveEvent( point );
+ return ETrue;
+ }
+ case TRawEvent::EButton1Down:
+ {
+ TPoint point = event.Pos() - PositionRelativeToScreen();
+ HandlePointerDownEvent( point );
+ return ETrue;
+ }
+ case TRawEvent::EButton1Up:
+ {
+ HandlePointerUpEventL();
+ return ETrue;
+ }
+ default:
+ break;
+ }
+ return EFalse;
+ }
+
+// --------------------------------------------------------------------------
+// Show candidate list
+// --------------------------------------------------------------------------
+//
+void CPenUiCandidateWnd::ShowCandidateListL( const CDesCArray* aItemArray,
+ TInt /*aActiveIndex*/ )
+ {
+ // Set the current item array.
+ SetItemArrayL( aItemArray );
+
+ // Set current page to the first page
+ iCurrentPage = 0;
+
+ // Calculate total page
+ iTotalPages = ( iItemList.Count() + KOnePageItemCount - 1) / KOnePageItemCount;
+
+ // Set the current page info text
+ GetPageInfoBufL();
+
+ // Clear focused item by default.
+ iFocusItem = KErrNotFound;
+
+ // Capture all pointers from full screen.
+ SetCapturePointer( ETrue );
+
+ // Calculate the displaying rect.
+ ReCalcLayout();
+
+ if( !IsVisible() )
+ {
+ MakeVisible( ETrue );
+ }
+
+ DrawDeferred();
+ }
+
+// ---------------------------------------------------------------------------
+// Hide candidate list.
+// ---------------------------------------------------------------------------
+//
+void CPenUiCandidateWnd::HideCandidateList()
+ {
+ if ( IsVisible())
+ {
+ MakeVisible( EFalse );
+ SetCapturePointer( EFalse );
+ }
+ }
+
+// ---------------------------------------------------------------------------
+// Handles a change to the control's resources.
+// ---------------------------------------------------------------------------
+//
+void CPenUiCandidateWnd::HandleResourceChange( TInt aType )
+ {
+ CCoeControl::HandleResourceChange( aType );
+ HideCandidateList();
+ switch ( aType )
+ {
+ case KEikDynamicLayoutVariantSwitch:
+ {
+ ReadLafInfo();
+ }
+ break;
+ case KAknsMessageSkinChange:
+ {
+ TRAP_IGNORE( HandleSkinChangeL() );
+ }
+ break;
+ default:
+ break;
+ }
+ }
+
+// ---------------------------------------------------------------------------
+// C++ default constructor can NOT contain any code, that might leave.
+// ---------------------------------------------------------------------------
+//
+CPenUiCandidateWnd::CPenUiCandidateWnd( MPenUiWndEventObserver* aObserver )
+ : iNaviBtnShown( ETrue ),
+ iObserver( aObserver )
+ {
+ }
+
+// ---------------------------------------------------------------------------
+// 2nd phase constructor.
+// ---------------------------------------------------------------------------
+//
+void CPenUiCandidateWnd::ConstructL()
+ {
+ CreateWindowL();
+
+ SetImgFrId( KAknsIIDQsnFrPopupSub,
+ KAknsIIDQsnFrFunctionButtonNormal,
+ KAknsIIDQsnFrFunctionButtonPressed,
+ KAknsIIDQsnFrFunctionButtonInactive,
+ KAknsIIDQsnFrList );
+
+ ConstructFromResourceL();
+
+ ReadLafInfo();
+
+ SetBitmapSize();
+
+ CreateDimmedMaskL( iPageUpDimBmpMask, iPageUpBmpMask );
+ CreateDimmedMaskL( iPageDownDimBmpMask, iPageDownBmpMask );
+
+ ActivateL();
+
+ MakeVisible( EFalse );
+ }
+
+// ---------------------------------------------------------------------------
+// Set all kinds of frame ids.
+// ---------------------------------------------------------------------------
+//
+void CPenUiCandidateWnd::SetImgFrId( TAknsItemID aBgFrId,
+ TAknsItemID aNaviFrId,
+ TAknsItemID aNaviActiveFrId,
+ TAknsItemID aNaviDimFrId,
+ TAknsItemID aItemActiveFrId )
+ {
+ iBgFrId = aBgFrId;
+ iItemActiveFrId = aItemActiveFrId;
+
+ // Page button
+ iNaviFrId = aNaviFrId;
+ iNaviActiveFrId = aNaviActiveFrId;
+ iNaviDimFrId = aNaviDimFrId;
+ }
+
+// ---------------------------------------------------------------------------
+// Construct candidate list from resource.
+// ---------------------------------------------------------------------------
+//
+void CPenUiCandidateWnd::ConstructFromResourceL()
+ {
+ TResourceReader reader;
+ CCoeEnv::Static()->CreateResourceReaderLC( reader,
+ R_PENINPUT_SERVER_CANDIDATE_LIST );
+
+ // Get bitmap file name
+ TPtrC bmpFileName = reader.ReadTPtrC();
+
+ // Get major skin id
+ TInt imgMajorSkinId = reader.ReadInt32();
+
+ // Get up arrow bitmap resource id
+ TInt32 pageUpId = reader.ReadInt32();
+
+ // Get down arrow bitmap resource id
+ TInt32 pageDownId = reader.ReadInt32();
+
+ // Get seperation line bitmap id and mask id
+ const TInt16 bmpId = reader.ReadInt16();
+ const TInt16 bmpMskId = reader.ReadInt16();
+
+ // Get seperation line skin item id
+ TAknsItemID id;
+ const TInt skinitemid = reader.ReadInt16();
+ id.Set(TInt(imgMajorSkinId), skinitemid);
+
+ // Get seperation line bitmap and mask bitmap
+ if (bmpId != KInvalidBmp)
+ {
+ if (bmpMskId != KInvalidBmp)
+ {
+ AknsUtils::CreateColorIconL( AknsUtils::SkinInstance(),
+ id,
+ KAknsIIDQsnIconColors,
+ EAknsCIQsnIconColorsCG30,
+ iSeperationBmp,
+ iSeperationMaskBmp,
+ bmpFileName,
+ bmpId,
+ bmpMskId,
+ AKN_LAF_COLOR( 0 ) );
+ }
+ else
+ {
+ AknsUtils::CreateIconL( AknsUtils::SkinInstance(),
+ id,
+ iSeperationBmp,
+ bmpFileName,
+ bmpId );
+ }
+ }
+
+ CleanupStack::PopAndDestroy(); // reader
+
+ // Construct page up button from resource
+ TResourceReader pageUpReader;
+ CCoeEnv::Static()->CreateResourceReaderLC( pageUpReader, pageUpId );
+ ConstructPageInfoFromResourceL ( pageUpReader, ETrue );
+ CleanupStack::PopAndDestroy(); // pageUpReader
+
+ // Construct page down button from resource
+ TResourceReader pageDownReader;
+ CCoeEnv::Static()->CreateResourceReaderLC( pageDownReader, pageDownId );
+ ConstructPageInfoFromResourceL( pageDownReader, EFalse );
+ CleanupStack::PopAndDestroy(); // pageDownReader
+ }
+
+// -----------------------------------------------------------------------------
+// Construct up / down arrow buttons from resource.
+// -----------------------------------------------------------------------------
+//
+void CPenUiCandidateWnd::ConstructPageInfoFromResourceL( TResourceReader& aReader,
+ TBool aUpDown )
+ {
+ // Get bimap file name of arrow buttons
+ TPtrC bmpFileName = aReader.ReadTPtrC();
+
+ // Get major skin id
+ TInt imgMajorSkinId = aReader.ReadInt32();
+
+ // Get color index
+ TInt colorIndex = aReader.ReadInt16();
+
+ // Get the image ids and mask ids from resource
+ TInt bmpId = aReader.ReadInt16();
+ TInt bmpMskId = aReader.ReadInt16();
+
+ // Get skin item id
+ const TInt skinitemid = aReader.ReadInt16();
+ TAknsItemID id;
+ id.Set( imgMajorSkinId, skinitemid );
+
+ // Get bitmaps
+ CFbsBitmap* forgroundBmp = NULL;
+ CFbsBitmap* forgroundBmpMask = NULL;
+ if ( bmpId != KInvalidBmp )
+ {
+ if (bmpMskId != KInvalidBmp)
+ {
+ if( colorIndex == KInvalidColorGroup )
+ {
+ AknsUtils::CreateIconL( AknsUtils::SkinInstance(),
+ id,
+ forgroundBmp,
+ forgroundBmpMask,
+ bmpFileName,
+ bmpId,
+ bmpMskId );
+ }
+ else
+ {
+ AknsUtils::CreateColorIconL( AknsUtils::SkinInstance(),
+ id,
+ KAknsIIDQsnIconColors,
+ colorIndex,
+ forgroundBmp,
+ forgroundBmpMask,
+ bmpFileName,
+ bmpId,
+ bmpMskId,
+ AKN_LAF_COLOR( 0 ) );
+ }
+ }
+ else
+ {
+ AknsUtils::CreateIconL( AknsUtils::SkinInstance(),
+ id,
+ forgroundBmp,
+ bmpFileName,
+ bmpId );
+ }
+ }
+
+ if ( aUpDown )
+ {
+ iPageUpBmp = forgroundBmp;
+ iPageUpBmpMask = forgroundBmpMask;
+ }
+ else
+ {
+ iPageDownBmp = forgroundBmp;
+ iPageDownBmpMask = forgroundBmpMask;
+ }
+ }
+
+// ---------------------------------------------------------------------------
+// Read LAF data for candidate list
+// ---------------------------------------------------------------------------
+//
+void CPenUiCandidateWnd::ReadLafInfo()
+ {
+ // Screen
+ TRect rect, rectcn;
+ AknLayoutUtils::LayoutMetricsRect(AknLayoutUtils::EScreen, rect);
+ TBool isLandScape = rect.Size().iWidth < rect.Size().iHeight ? EFalse : ETrue;
+
+ TAknWindowLineLayout appWnd;
+ appWnd = AknLayoutScalable_Avkon::application_window(0).LayoutLine();
+
+ TAknWindowLineLayout parentWnd;
+ TAknWindowLineLayout candidateList;
+ TAknWindowLineLayout listpane;
+ TAknWindowLineLayout scrollpane;
+ if (isLandScape)
+ {
+ parentWnd = AknLayoutScalable_Apps::popup_vitu2_window(1).LayoutLine();
+ candidateList = AknLayoutScalable_Apps::popup_vitu2_match_list_window
+ ( KLafLandscapeCandidateIndex )
+ .LayoutLine();
+ listpane = AknLayoutScalable_Apps::list_vitu2_match_list_pane(1).LayoutLine();
+ scrollpane = AknLayoutScalable_Apps::vitu2_page_scroll_pane(1).LayoutLine();
+ }
+ else
+ {
+ parentWnd = AknLayoutScalable_Apps::popup_vitu2_window(0).LayoutLine();
+ candidateList = AknLayoutScalable_Apps::popup_vitu2_match_list_window
+ ( KLafPortraitCandidateIndex )
+ .LayoutLine();
+ listpane = AknLayoutScalable_Apps::list_vitu2_match_list_pane(0).LayoutLine();
+ scrollpane = AknLayoutScalable_Apps::vitu2_page_scroll_pane(0).LayoutLine();
+ }
+
+ TAknLayoutRect parentRectLayout;
+ parentRectLayout.LayoutRect( appWnd.Rect(), parentWnd );
+ TRect parentRect = parentRectLayout.Rect();
+
+ // candidate list
+ TAknLayoutRect candidateListRect;
+ candidateListRect.LayoutRect( parentRect, candidateList );
+
+ // list pane, its parent is candidate list
+ TAknLayoutRect listpaneRect;
+ listpaneRect.LayoutRect( candidateListRect.Rect(), listpane );
+
+ // scroll pane, its parent is candidate list
+ TAknLayoutRect scrollRect;
+ scrollRect.LayoutRect( candidateListRect.Rect(), scrollpane );
+
+ // Item pane, its parent is list pane
+ TAknWindowLineLayout itemPane
+ = AknLayoutScalable_Apps::list_vitu2_match_list_item_pane( 0, 0, 0 )
+ .LayoutLine();
+ TAknLayoutRect itemPaneRect;
+ itemPaneRect.LayoutRect( listpaneRect.Rect(), itemPane );
+
+ iLafData.iHorMargin = listpaneRect.Rect().iTl.iX;
+ iLafData.iVerMargin = listpaneRect.Rect().iTl.iY;
+ iLafData.iItemSize = itemPaneRect.Rect().Size();
+
+ // Up button image. its parent is scroll pane
+ TAknWindowLineLayout arrowUpImagePane
+ = AknLayoutScalable_Apps::vitu2_page_scroll_pane_g1()
+ .LayoutLine();
+ TAknLayoutRect arrowUpImageRect;
+ arrowUpImageRect.LayoutRect( scrollRect.Rect(), arrowUpImagePane );
+ // Up button, its parent is scroll pane
+ TAknWindowLineLayout arrowUpPane
+ = AknLayoutScalable_Apps::bg_button_pane_cp023().LayoutLine();
+ TAknLayoutRect arrowUpRect;
+ arrowUpRect.LayoutRect( scrollRect.Rect(), arrowUpPane );
+
+ // Down button image, its parent is scroll pane
+ TAknWindowLineLayout arrowDownImagePane
+ = AknLayoutScalable_Apps::vitu2_page_scroll_pane_g2().LayoutLine();
+ TAknLayoutRect arrowDownImageRect;
+ arrowDownImageRect.LayoutRect( scrollRect.Rect(), arrowDownImagePane );
+
+ // Down button, its parent is scroll pane
+ TAknWindowLineLayout arrowDownPane
+ = AknLayoutScalable_Apps::bg_button_pane_cp024().LayoutLine();
+ TAknLayoutRect arrowDownRect;
+ arrowDownRect.LayoutRect( scrollRect.Rect(), arrowDownPane );
+
+ iLafData.iNaviSize = arrowUpRect.Rect().Size();
+ iLafData.iNaviInnerSize = arrowUpImageRect.Rect().Size();
+ iLafData.iTextLine
+ = AknLayoutScalable_Apps::list_vitu2_match_list_item_pane_t1()
+ .LayoutLine();
+ iLafData.iPageTextLine
+ = AknLayoutScalable_Apps::vitu2_page_scroll_pane_t1()
+ .LayoutLine();
+
+ TAknLayoutText list_item_pane_t1_layout_text;
+ list_item_pane_t1_layout_text.LayoutText( itemPaneRect.Rect(),
+ iLafData.iTextLine );
+ iLafData.iFont = list_item_pane_t1_layout_text.Font();
+ }
+
+// ---------------------------------------------------------------------------
+// Set size for bitmaps
+// ---------------------------------------------------------------------------
+//
+void CPenUiCandidateWnd::SetBitmapSize()
+ {
+ if ( iPageUpBmp )
+ {
+ AknIconUtils::SetSize( iPageUpBmp,
+ iLafData.iNaviSize,
+ EAspectRatioNotPreserved );
+ }
+
+ if ( iPageUpBmpMask )
+ {
+ AknIconUtils::SetSize( iPageUpBmpMask,
+ iLafData.iNaviSize,
+ EAspectRatioNotPreserved );
+ }
+
+ if ( iPageDownBmp )
+ {
+ AknIconUtils::SetSize( iPageDownBmp,
+ iLafData.iNaviSize,
+ EAspectRatioNotPreserved );
+ }
+
+ if ( iPageDownBmpMask )
+ {
+ AknIconUtils::SetSize( iPageDownBmpMask,
+ iLafData.iNaviSize,
+ EAspectRatioNotPreserved );
+ }
+
+ if ( iPageUpDimBmpMask )
+ {
+ AknIconUtils::SetSize( iPageUpDimBmpMask,
+ iLafData.iNaviSize,
+ EAspectRatioNotPreserved );
+ }
+
+ if ( iPageDownDimBmpMask )
+ {
+ AknIconUtils::SetSize( iPageDownBmpMask,
+ iLafData.iNaviSize,
+ EAspectRatioNotPreserved );
+ }
+ }
+
+// ---------------------------------------------------------------------------
+// Create mask bitmap for dimmed icons
+// ---------------------------------------------------------------------------
+//
+void CPenUiCandidateWnd::CreateDimmedMaskL( CFbsBitmap*& aDimmedMask,
+ const CFbsBitmap* aMask )
+ {
+ if (aMask && aMask->DisplayMode() == EGray256 )
+ {
+ if( NULL != aDimmedMask )
+ {
+ delete aDimmedMask;
+ aDimmedMask = NULL;
+ }
+
+ aDimmedMask = new (ELeave) CFbsBitmap;
+ User::LeaveIfError( aDimmedMask->Create( aMask->SizeInPixels(), EGray256 ) );
+ CleanupStack::PushL( aDimmedMask );
+ CFbsBitmapDevice* bitmapDevice = CFbsBitmapDevice::NewL( aDimmedMask );
+ CleanupStack::PushL( bitmapDevice );
+ CFbsBitGc* bitGc( NULL );
+ User::LeaveIfError( bitmapDevice->CreateContext( bitGc ) );
+ CleanupStack::PushL( bitGc );
+ bitGc->SetPenStyle( CGraphicsContext::ESolidPen );
+ bitGc->BitBlt( TPoint( 0, 0 ), aMask );
+ aDimmedMask->LockHeap();
+ TInt w = aMask->SizeInPixels().iWidth;
+ TInt h = aMask->SizeInPixels().iHeight;
+ TInt dataStride = aMask->DataStride() - w;
+ unsigned char* address = (unsigned char *)aDimmedMask->DataAddress();
+ for ( TInt i = 0; i < h; ++i )
+ {
+ for ( TInt j = 0; j < w; ++j )
+ {
+ *address = KTransparency[ *address ];
+ ++address;
+ }
+ address += dataStride;
+ }
+ aDimmedMask->UnlockHeap();
+ CleanupStack::PopAndDestroy( bitGc ); // bitGc
+ CleanupStack::PopAndDestroy( bitmapDevice ); // bitmapDevice
+ CleanupStack::Pop( aDimmedMask ); // aDimmedMask
+ }
+ }
+
+// --------------------------------------------------------------------------
+// Capture all poninters of full screen when candidate list is opened.
+// --------------------------------------------------------------------------
+//
+void CPenUiCandidateWnd::SetCapturePointer( TBool aFlag )
+ {
+ if ( iObserver )
+ {
+ TBuf<KServerBufferSize> buf;
+ buf.Append( ( const TUint16* )( &aFlag ), sizeof( TBool ) / sizeof( TUint16 ) );
+ buf.Append( ( const TUint16* )( this ), sizeof( TInt ) / sizeof( TUint16 ) );
+ iObserver->SignalOwner( ESignalCapturePointer, buf );
+ }
+ }
+
+// ---------------------------------------------------------------------------
+// Get page info and transfer it to descritor.
+// ---------------------------------------------------------------------------
+//
+void CPenUiCandidateWnd::GetPageInfoBufL()
+ {
+ if( NULL != iPageInfo )
+ {
+ delete iPageInfo;
+ iPageInfo = NULL;
+ }
+ CArrayFix<TInt>* pageNumbers =
+ new ( ELeave ) CArrayFixFlat<TInt>( KPageInfoIntSize );
+ CleanupStack::PushL( pageNumbers );
+ pageNumbers->AppendL( iCurrentPage + 1 );
+ pageNumbers->AppendL( iTotalPages );
+ iPageInfo = StringLoader::LoadL( R_PENINPUT_SERVER_CANDIDATE_LIST_PAGE_NUM,
+ *pageNumbers );
+ CleanupStack::PopAndDestroy( pageNumbers ); // pageNumbers
+ }
+
+// ---------------------------------------------------------------------------
+// Set the text item array to candidate list.
+// ---------------------------------------------------------------------------
+//
+void CPenUiCandidateWnd::SetItemArrayL( const CDesCArray* aItemArray )
+ {
+ if ( aItemArray )
+ {
+ iItemList.ResetAndDestroy();
+ for ( TInt i = 0; i < aItemArray->Count(); i++ )
+ {
+ CPenUiCandidateWnd::TPenUiCandidateItem* item
+ = new (ELeave) CPenUiCandidateWnd::TPenUiCandidateItem;
+ item->iCommand = ECandItemCmdItemSelected;
+ if ( (*aItemArray)[i].Length() <= item->iText.MaxLength() )
+ {
+ item->iText.Copy( (*aItemArray)[i] );
+ }
+ else
+ {
+ // Given longer than maxlength, display the part of less than max
+ item->iText.Copy( (*aItemArray)[i].Left( item->iText.MaxLength() ) );
+ }
+ CleanupStack::PushL(item);
+ iItemList.AppendL( item );
+ CleanupStack::Pop( item ); // item
+ }
+ AddSpellItemL();
+ }
+ }
+
+// ---------------------------------------------------------------------------
+// Add spell item
+// ---------------------------------------------------------------------------
+//
+void CPenUiCandidateWnd::AddSpellItemL()
+ {
+ if( iSpellEnabled && iItemList.Count() != 0 )
+ {
+ HBufC* spellText = StringLoader::LoadLC( R_PENINPUT_SERVER_FINGER_SPELL );
+ CPenUiCandidateWnd::TPenUiCandidateItem* item
+ = new (ELeave) CPenUiCandidateWnd::TPenUiCandidateItem;
+ item->iCommand = ECandItemCmdEnterSpellMode;
+ item->iText.Copy( *spellText );
+ CleanupStack::PushL( item );
+ iItemList.AppendL( item );
+ CleanupStack::Pop( item ); // item
+ CleanupStack::PopAndDestroy( spellText ); // spellText
+ }
+ }
+
+// ---------------------------------------------------------------------------
+// Calculate the displaying rect of candidate.
+// ---------------------------------------------------------------------------
+//
+void CPenUiCandidateWnd::ReCalcLayout()
+ {
+ // Dynamically adjust width
+ TInt width = WidthToFitText();
+
+ // Calculate the height of candidate
+ TInt height = ( KOnePageItemCount + 1 ) * iLafData.iVerMargin
+ + KOnePageItemCount * iLafData.iItemSize.iHeight;
+
+ // Calulate the rect of candidate
+ TRect rtCtrl( iInitRect.iTl, TSize( width, height ) );
+ rtCtrl = RectToFitScreen( rtCtrl );
+
+ SetRect( rtCtrl );
+ }
+
+// ---------------------------------------------------------------------------
+// Return the dynamical width for displaying text.
+// ---------------------------------------------------------------------------
+//
+TInt CPenUiCandidateWnd::WidthToFitText()
+ {
+ if ( iLafData.iFont )
+ {
+ // Calculate the maximum of width among all text to be shown
+ iItemWidth = iTextWidthEnabled ? iLafData.iItemSize.iWidth : 0;
+ const CFont* font = iLafData.iFont;
+ CFont::TMeasureTextInput::TFlags flg
+ = CFont::TMeasureTextInput::EFVisualOrder;
+ if( iAlign == CGraphicsContext::ERight )
+ {
+ flg = CFont::TMeasureTextInput::EFVisualOrderRightToLeft;
+ }
+ for( TInt i = 0; i < iItemList.Count(); ++i )
+ {
+ TInt itemWidth = AknBidiTextUtils::MeasureTextBoundsWidth(
+ *font, iItemList[i]->iText, flg );
+ if(itemWidth > iItemWidth)
+ {
+ iItemWidth = itemWidth;
+ }
+ }
+ }
+
+ // Make sure the total width ( text item + navi width + all horiezental margin )
+ // not to be larger than the screen width.
+ TInt naviWidth = iNaviBtnShown ? iLafData.iNaviSize.iWidth : 0;
+ TInt totalHorMargin = KTotalHorMarginCount * iLafData.iHorMargin;
+ TInt totalWidth = iItemWidth + totalHorMargin + naviWidth;
+ TPixelsTwipsAndRotation ptScreenSize;
+ CCoeEnv::Static()->ScreenDevice()->
+ GetDefaultScreenSizeAndRotation( ptScreenSize );
+ if( totalWidth > ptScreenSize.iPixelSize.iWidth )
+ {
+ iItemWidth = ptScreenSize.iPixelSize.iWidth - naviWidth - totalHorMargin;
+ totalWidth = iItemWidth + totalHorMargin + naviWidth;
+ }
+ return totalWidth;
+ }
+
+// ---------------------------------------------------------------------------
+// Return the rect to fit the screen size.
+// ---------------------------------------------------------------------------
+//
+TRect CPenUiCandidateWnd::RectToFitScreen( const TRect& aRect )
+ {
+ TPixelsTwipsAndRotation ptScreenSize;
+ CCoeEnv::Static()->ScreenDevice()->
+ GetDefaultScreenSizeAndRotation( ptScreenSize) ;
+ TRect rtScreen ( TPoint( 0, 0 ), ptScreenSize.iPixelSize );
+ if( aRect.Width() > rtScreen.Width() || aRect.Height() > rtScreen.Height() )
+ {
+ // If aRect is larger than the screen area, it is no need to adjust.
+ return aRect;
+ }
+
+ TRect rect = aRect;
+ if( rect.iBr.iY > rtScreen.iBr.iY )
+ {
+ // There is no enough space below the underline word.
+ // If there is no enough space at the right and enough space
+ // at the left, candidate list pops up on the left.
+ // Otherwise, candidate list pops up on the right.
+ TInt verOffset = rtScreen.iBr.iY - rect.iBr.iY;
+ if ( ( iInitRect.iBr.iX + rect.Width() > rtScreen.iBr.iX )
+ && ( rect.iTl.iX - rect.Width() > rtScreen.iTl.iX ) )
+ {
+ rect.Move( -rect.Width(), verOffset );
+ }
+ else
+ {
+ rect.Move( iInitRect.iBr.iX - rect.iTl.iX, verOffset );
+ }
+ }
+ if( rect.iBr.iX > rtScreen.iBr.iX )
+ {
+ rect.Move( rtScreen.iBr.iX - rect.iBr.iX , 0 );
+ }
+ if( rect.iTl.iX < rtScreen.iTl.iX )
+ {
+ rect.Move( rtScreen.iTl.iX - rect.iTl.iX , 0 );
+ }
+ if( rect.iTl.iY < rtScreen.iTl.iY )
+ {
+ rect.Move( 0, rtScreen.iTl.iY - rect.iTl.iY );
+ }
+ return rect;
+ }
+
+// ---------------------------------------------------------------------------
+// Draw each item.
+// ---------------------------------------------------------------------------
+//
+void CPenUiCandidateWnd::DrawItem( CWindowGc* aGc, TInt aIndex ) const
+ {
+ if ( aIndex < 0 || aIndex >= iItemRects.Count() )
+ {
+ return;
+ }
+
+ const CFont* font = iLafData.iFont;
+ if ( !font )
+ {
+ return;
+ }
+
+ TInt itemIndex = aIndex + iCurrentPage * iItemRects.Count();
+ if( itemIndex >= iItemList.Count() )
+ {
+ return;
+ }
+
+ // Get text rect
+ TRect textRect = iItemRects[ aIndex ];
+ textRect.SetWidth( iItemWidth );
+ textRect.Move( iLafData.iHorMargin, 0 );
+
+ // Draw seperation
+ if ( ( itemIndex == iItemList.Count() - 1) && iSpellEnabled )
+ {
+ // Calculate seperation bmp rect
+ TPoint separatorTl = textRect.iTl;
+ separatorTl.iY += KSeparatorLineYOffset;
+
+ // Draw bitmap
+ if( iSeperationBmp )
+ {
+ TRect srcRect( TPoint( 0, 0 ), iSeperationBmp->SizeInPixels() );
+ if( iSeperationMaskBmp )
+ {
+ aGc->BitBltMasked( separatorTl,
+ iSeperationBmp,
+ srcRect,
+ iSeperationMaskBmp,
+ ETrue );
+ }
+ else
+ {
+ aGc->BitBlt( separatorTl,
+ iSeperationBmp,
+ srcRect );
+ }
+ }
+ }
+
+ TAknsQsnTextColorsIndex clrIndex;
+ clrIndex = ( itemIndex == iFocusItem ) ? EAknsCIQsnTextColorsCG10
+ : EAknsCIQsnTextColorsCG20;
+ TRgb color = KRgbBlack;
+ if (AknsUtils::AvkonSkinEnabled())
+ {
+ AknsUtils::GetCachedColor( AknsUtils::SkinInstance(),
+ color,
+ KAknsIIDQsnTextColors,
+ clrIndex );
+ }
+
+ TBuf<KDisplayTextLen> buf;
+ if ( iAlign == CGraphicsContext::ERight )
+ {
+ AknBidiTextUtils::ConvertToVisualAndClip( iItemList[itemIndex]->iText,
+ buf,
+ *font,
+ textRect.Width(),
+ textRect.Width(),
+ AknBidiTextUtils::ERightToLeft );
+ }
+ else
+ {
+ AknBidiTextUtils::ConvertToVisualAndClip( iItemList[itemIndex]->iText,
+ buf,
+ *font,
+ textRect.Width(),
+ textRect.Width());
+ }
+
+ if ( textRect.Height() - font->FontMaxHeight() < KTextRectMargin )
+ {
+ // Make sure the height of the area for drawing text is larger than
+ // the max height of font by 4 pixels at least.
+ // The piece of code is used to avoid clipping some characters, like 'g'.
+ textRect.SetHeight( font->FontMaxHeight() + KTextRectMargin );
+ }
+
+ // Draw highlight item
+ if ( itemIndex == iFocusItem )
+ {
+ MAknsSkinInstance* skin = AknsUtils::SkinInstance();
+ TRect hightLightRect = iItemRects[ aIndex ];
+ TRect innerHightlightRect = hightLightRect;
+ innerHightlightRect.Shrink( KHighlightInnerRectOffset );
+ AknsDrawUtils::DrawFrame( skin,
+ *aGc,
+ hightLightRect,
+ innerHightlightRect,
+ iItemActiveFrId,
+ KAknsIIDDefault );
+ }
+
+ // Draw text
+ aGc->UseFont( font );
+ aGc->SetPenColor( color );
+ TInt baseLine = textRect.Height() / KHalfNumber
+ + font->AscentInPixels() / KHalfNumber;
+ aGc->DrawText( buf, textRect, baseLine, iAlign );
+ aGc->DiscardFont();
+ }
+
+// ---------------------------------------------------------------------------
+// Draw page down / up arrow button.
+// ---------------------------------------------------------------------------
+//
+void CPenUiCandidateWnd::DrawPageButton( CWindowGc* aGc, TBool aUpDown ) const
+ {
+ TRect buttonRect;
+ CFbsBitmap* buttonBmp = NULL;
+ CFbsBitmap* buttonBmpMask = NULL;
+ CFbsBitmap* buttonDimBmpMask = NULL;
+ if ( aUpDown )
+ {
+ buttonBmp = iPageUpBmp;
+ buttonBmpMask = iPageUpBmpMask;
+ buttonDimBmpMask = iPageUpDimBmpMask;
+ buttonRect = iPageUpRect;
+ }
+ else
+ {
+ buttonBmp = iPageDownBmp;
+ buttonBmpMask = iPageDownBmpMask;
+ buttonDimBmpMask = iPageDownDimBmpMask;
+ buttonRect = iPageDownRect;
+ }
+
+ // Inner rect
+ TRect innerRect = buttonRect;
+ innerRect.Shrink( KPageButtonInnerRectOffset );
+
+ // Draw arrow buttons
+ CFbsBitmap* bmpMask = NULL;
+ if( iTotalPages == 1 )
+ {
+ // Draw dim page buttons.
+ AknsDrawUtils::DrawFrame( AknsUtils::SkinInstance(),
+ *aGc,
+ buttonRect,
+ innerRect,
+ iNaviDimFrId,
+ KAknsIIDDefault );
+
+ bmpMask = buttonDimBmpMask;
+ }
+ else
+ {
+ // Draw normal state or pressed state
+ TBool isActive = ( aUpDown && iPointerArea == ECandWndCapPageUp )
+ || ( !aUpDown && iPointerArea == ECandWndCapPageDown );
+ TAknsItemID ImgID = isActive ? iNaviActiveFrId : iNaviFrId;
+ AknsDrawUtils::DrawFrame( AknsUtils::SkinInstance(),
+ *aGc,
+ buttonRect,
+ innerRect,
+ ImgID,
+ KAknsIIDDefault );
+
+ bmpMask = buttonBmpMask;
+ }
+
+ // Draw forground
+ if( buttonBmp )
+ {
+ TRect srcRect( TPoint( 0, 0 ), buttonBmp->SizeInPixels() );
+ if( bmpMask )
+ {
+ aGc->BitBltMasked( buttonRect.iTl, buttonBmp, srcRect,
+ bmpMask, EFalse );
+ }
+ else
+ {
+ aGc->BitBlt( buttonRect.iTl, buttonBmp, srcRect );
+ }
+ }
+ }
+
+// ---------------------------------------------------------------------------
+// Draw page into text.
+// ---------------------------------------------------------------------------
+//
+void CPenUiCandidateWnd::DrawPageInfo( CWindowGc* aGc ) const
+ {
+ if ( iPageInfo->Length() == 0)
+ {
+ return;
+ }
+
+ TRgb color( KRgbBlack ); // sane default for nonskinned case
+ TAknsQsnTextColorsIndex clrIndex;
+ clrIndex = EAknsCIQsnTextColorsCG20;
+ if ( AknsUtils::AvkonSkinEnabled() )
+ {
+ AknsUtils::GetCachedColor( AknsUtils::SkinInstance(),
+ color,
+ KAknsIIDQsnTextColors,
+ clrIndex );
+ }
+
+ TAknLayoutText textLayout;
+ textLayout.LayoutText( iScrollRect, iLafData.iPageTextLine );
+ textLayout.DrawText( *aGc, iPageInfo->Des(), EFalse, color );
+ }
+
+// ---------------------------------------------------------------------------
+// Handle pointer down event.
+// ---------------------------------------------------------------------------
+//
+void CPenUiCandidateWnd::HandlePointerDownEvent( const TPoint& aPoint )
+ {
+ if ( Rect().Contains( aPoint ) )
+ {
+ CheckPointerEvent ( aPoint );
+ }
+ else
+ {
+ iPointerArea = ECandWndCapOut;
+
+ HideCandidateList();
+ }
+ }
+
+// ---------------------------------------------------------------------------
+// Handle pointer move event.
+// ---------------------------------------------------------------------------
+//
+void CPenUiCandidateWnd::HandlePointerMoveEvent(const TPoint& aPoint)
+ {
+ if( !IsVisible() || iPointerArea == ECandWndCapNone )
+ {
+ return;
+ }
+
+ if ( !Rect().Contains( aPoint ) )
+ {
+ iPointerArea = ECandWndCapOut;
+ return;
+ }
+
+ CheckPointerEvent ( aPoint );
+ }
+
+// ---------------------------------------------------------------------------
+// Handle pointer up event.
+// ---------------------------------------------------------------------------
+//
+void CPenUiCandidateWnd::HandlePointerUpEventL()
+ {
+ if( !IsVisible() )
+ {
+ iPointerArea = ECandWndCapNone;
+ return;
+ }
+
+ TBool needReDraw = EFalse ;
+ switch ( iPointerArea )
+ {
+ case ECandWndCapItem:
+ {
+ if ( iFocusItem != KErrNotFound
+ && iFocusItem < iItemList.Count() )
+ {
+ ReportItemSelectedEventL();
+ HideCandidateList();
+ }
+ }
+ break;
+ case ECandWndCapPageUp:
+ {
+ iCurrentPage = ( iCurrentPage == 0 ) ? iTotalPages
+ : iCurrentPage;
+ iCurrentPage --;
+ GetPageInfoBufL();
+
+ needReDraw = ETrue;
+ }
+ break;
+ case ECandWndCapPageDown:
+ {
+ iCurrentPage++;
+ iCurrentPage = ( iCurrentPage == iTotalPages ) ? 0
+ : iCurrentPage;
+ GetPageInfoBufL();
+
+ needReDraw = ETrue;
+ }
+ break;
+ default:
+ break;
+ }
+
+ iPointerArea = ECandWndCapNone;
+ if ( needReDraw )
+ {
+ DrawDeferred();
+ }
+ }
+
+// ---------------------------------------------------------------------------
+// Check pointer area of pointer event.
+// ---------------------------------------------------------------------------
+//
+void CPenUiCandidateWnd::CheckPointerEvent( const TPoint& aPoint )
+ {
+ if( iListRect.Contains( aPoint ) )
+ {
+ TInt focus = ItemIndexByPoint( aPoint );
+ if ( focus != KErrNotFound )
+ {
+ iPointerArea = ECandWndCapItem;
+
+ // Enter text item
+ if ( focus != iFocusItem )
+ {
+ iFocusItem = focus;
+ DrawDeferred();
+ }
+ }
+ else
+ {
+ iPointerArea = ECandWndCapOther;
+ }
+ }
+ else
+ {
+ if ( iTotalPages > 1 )
+ {
+ if ( iPageUpRect.Contains( aPoint) )
+ {
+ // Enter page up button
+ if ( iPointerArea != ECandWndCapPageUp )
+ {
+ iPointerArea = ECandWndCapPageUp;
+ DrawDeferred();
+ }
+ }
+ else if ( iPageDownRect.Contains( aPoint ) )
+ {
+ // Enter page down button
+ if ( iPointerArea != ECandWndCapPageDown )
+ {
+ iPointerArea = ECandWndCapPageDown;
+ DrawDeferred();
+ }
+ }
+ else
+ {
+ iPointerArea = ECandWndCapOther;
+ }
+ }
+ else
+ {
+ iPointerArea = ECandWndCapOther;
+ }
+ }
+ }
+
+// ---------------------------------------------------------------------------
+// Return the index of pointed text item.
+// ---------------------------------------------------------------------------
+//
+TInt CPenUiCandidateWnd::ItemIndexByPoint( const TPoint& aPoint )
+ {
+ TInt ret = KErrNotFound;
+ for ( TInt i = 0; i < iItemRects.Count(); i++ )
+ {
+ if ( iItemRects[ i ].Contains( aPoint ) )
+ {
+ ret = i + iCurrentPage * iItemRects.Count();
+ if ( ret >= iItemList.Count() )
+ {
+ ret = KErrNotFound;
+ }
+ break;
+ }
+ }
+ return ret;
+ }
+
+// ---------------------------------------------------------------------------
+// Report item selected event to ui layout.
+// ---------------------------------------------------------------------------
+//
+void CPenUiCandidateWnd::ReportItemSelectedEventL()
+ {
+ if ( iObserver && iFocusItem != KErrNotFound
+ && iFocusItem < iItemList.Count() )
+ {
+ // Report success select item
+ TInt command = iItemList[ iFocusItem ]->iCommand;
+
+ HBufC8* buf8 = HBufC8::NewLC( KItemSelIntSize * sizeof( TInt ) );
+ TPtr8 buf8Ptr = buf8->Des();
+
+ RDesWriteStream writeStream;
+ CleanupClosePushL(writeStream);
+ writeStream.Open( buf8Ptr );
+
+ writeStream.WriteInt32L( command );
+ writeStream.WriteInt32L( iFocusItem );
+
+ writeStream.CommitL();
+ CleanupStack::PopAndDestroy( &writeStream );
+ iObserver->HandleCommand( ECmdPeninputSelectServerCandidate,
+ reinterpret_cast< TUint8* >( &buf8Ptr ) );
+
+ CleanupStack::PopAndDestroy( buf8 );
+ }
+ }
+
+// ---------------------------------------------------------------------------
+// Delete all bitmaps.
+// ---------------------------------------------------------------------------
+//
+void CPenUiCandidateWnd::DeleteAllBitmaps()
+ {
+ delete iPageUpBmp;
+ iPageUpBmp = NULL;
+
+ delete iPageUpBmpMask;
+ iPageUpBmpMask = NULL;
+
+ delete iPageUpDimBmpMask;
+ iPageUpDimBmpMask = NULL;
+
+ delete iPageDownBmp;
+ iPageDownBmp = NULL;
+
+ delete iPageDownBmpMask;
+ iPageDownBmpMask = NULL;
+
+ delete iPageDownDimBmpMask;
+ iPageDownDimBmpMask = NULL;
+
+ delete iSeperationBmp;
+ iSeperationBmp = NULL;
+
+ delete iSeperationMaskBmp;
+ iSeperationMaskBmp = NULL;
+ }
+
+// ---------------------------------------------------------------------------
+// Handle skin change.
+// ---------------------------------------------------------------------------
+//
+void CPenUiCandidateWnd::HandleSkinChangeL()
+ {
+ // Reconstruct all bitmaps as these bitmaps are based on current skin.
+ DeleteAllBitmaps();
+
+ ConstructFromResourceL();
+
+ SetBitmapSize();
+
+ CreateDimmedMaskL( iPageUpDimBmpMask, iPageUpBmpMask );
+ CreateDimmedMaskL( iPageDownDimBmpMask, iPageDownBmpMask );
+
+ // Set separator line size if the spell feature is enabled.
+ if ( iSpellEnabled && iItemRects.Count() > 0 )
+ {
+ if( NULL != iSeperationBmp )
+ {
+ AknIconUtils::SetSize( iSeperationBmp, iSeparatorSize,
+ EAspectRatioNotPreserved );
+ }
+
+ if( NULL != iSeperationMaskBmp )
+ {
+ AknIconUtils::SetSize( iSeperationMaskBmp, iSeparatorSize,
+ EAspectRatioNotPreserved );
+ }
+ }
+ }
+
+// ---------------------------------------------------------------------------
+// Responds to changes to the size and position of the contents of this control.
+// ---------------------------------------------------------------------------
+//
+void CPenUiCandidateWnd::SizeChanged()
+ {
+ TInt paneHorMargin = KPaneHorMarginCount * iLafData.iHorMargin;
+
+ // Calculate list pane rect
+ iListRect = Rect();
+ iListRect.SetWidth( iItemWidth + paneHorMargin );
+
+ if( iNaviBtnShown )
+ {
+ // scroll pane width = naviButton width + 2 horMargin width
+ TInt scorllPaneWidth = iLafData.iNaviSize.iWidth + paneHorMargin;
+ TInt scrollPaneTlX = iListRect.Width();
+ if ( iAlign == CGraphicsContext::ERight )
+ {
+ // If the layout is RTL, move list pane to the rightmost,
+ // move scroll pane to the leftmost.
+ iListRect.Move( scorllPaneWidth, 0 );
+ scrollPaneTlX = 0;
+ }
+
+ // calculate scroll pane rect
+ iScrollRect = TRect( TPoint( scrollPaneTlX, iListRect.iTl.iY ),
+ TSize( scorllPaneWidth, iListRect.Height() ) );
+
+ // calculate up button rect
+ TPoint tlPageUp( iScrollRect.iTl.iX + iLafData.iHorMargin,
+ iScrollRect.iTl.iY + iLafData.iVerMargin );
+ iPageUpRect = TRect( tlPageUp, iLafData.iNaviSize );
+
+ // calculate down button rect
+ TPoint tlPageDown( iPageUpRect.iTl.iX,
+ iScrollRect.iBr.iY - iLafData.iVerMargin
+ - iLafData.iNaviSize.iHeight );
+ iPageDownRect = TRect( tlPageDown, iLafData.iNaviSize );
+ }
+
+ // Calculate each the area of each text, not including the margin
+ iItemRects.Reset();
+ for ( TInt i = 0; i < KOnePageItemCount; i++ )
+ {
+ TPoint point( iListRect.iTl.iX , iListRect.iTl.iY +
+ ( i + 1 ) * iLafData.iVerMargin +
+ i * iLafData.iItemSize.iHeight );
+
+ TSize size( iListRect.Width(), iLafData.iItemSize.iHeight );
+ iItemRects.Append( TRect( point, size ) );
+ }
+
+ // Calculate separator line rect if the spell feature is enabled.
+ if ( iSpellEnabled && iItemRects.Count() > 0 )
+ {
+ TSize newSize ( iItemWidth, KSeparatorLineHeight );
+ if ( newSize != iSeparatorSize )
+ {
+ // Resize seperation bitmaps
+ if( iSeperationBmp )
+ {
+ AknIconUtils::SetSize( iSeperationBmp, newSize,
+ EAspectRatioNotPreserved );
+ }
+
+ if( iSeperationMaskBmp )
+ {
+ AknIconUtils::SetSize( iSeperationMaskBmp, newSize,
+ EAspectRatioNotPreserved );
+ }
+
+ iSeparatorSize = newSize;
+ }
+ }
+ }
+
+// ---------------------------------------------------------------------------
+// Draw candidate control.
+// ---------------------------------------------------------------------------
+//
+void CPenUiCandidateWnd::Draw( const TRect& /*aRect*/ ) const
+ {
+ if ( !IsVisible() || Rect().Size() == TSize(0,0))
+ {
+ return;
+ }
+
+ // Draw background of whole control
+ CWindowGc& gc = SystemGc();
+ TRect listRect = Rect();
+ gc.Clear( listRect );
+
+ TRect innerRect = listRect;
+ innerRect.Shrink( KInnerRectOffset );
+ AknsDrawUtils::DrawFrame( AknsUtils::SkinInstance(),
+ gc,
+ listRect,
+ innerRect,
+ iBgFrId,
+ KAknsIIDDefault );
+
+ // Draw item
+ for ( TInt i = 0; i < iItemRects.Count(); i++ )
+ {
+ DrawItem( &gc, i );
+ }
+
+ // Draw scroll area
+ if (iNaviBtnShown)
+ {
+ DrawPageButton( &gc, ETrue );
+ DrawPageButton( &gc, EFalse );
+ DrawPageInfo( &gc );
+ }
+ }
+
+// End Of File
--- a/textinput/peninputarc/src/peninputserverapp/penuiwndctrl.cpp Fri Sep 17 17:26:50 2010 +0100
+++ b/textinput/peninputarc/src/peninputserverapp/penuiwndctrl.cpp Fri Oct 22 15:38:27 2010 +0100
@@ -72,10 +72,10 @@
iAutoRefreshTimer->Cancel();
}
delete iAutoRefreshTimer;
-
-
- Clean();
-
+ iPopRegion.Close();
+ iBubblesArea.Close();
+ iBubblesMaskArea.Close();
+ iBubblesPos.Close();
delete iCursorWnd;
}
@@ -126,7 +126,7 @@
gc.BitBlt(pos, iBitmap, rect);
#ifdef FIX_FOR_NGA
//draw bubble
- for ( TInt i = 0; i < iBubblesCtrl.Count(); ++i )
+ for (TInt i = 0; i < iBubblesArea.Count(); ++i)
{
gc.BitBlt(iBubblesPos[i].iTl, iBubblesArea[i]);
}
@@ -138,7 +138,7 @@
#ifdef FIX_FOR_NGA
gc.BitBlt(TPoint(0, 0), iBitmap, Rect());
//draw bubble
- for ( TInt i = 0; i < iBubblesCtrl.Count(); ++i )
+ for (TInt i = 0; i < iBubblesArea.Count(); ++i)
{
gc.BitBlt(iBubblesPos[i].iTl, iBubblesArea[i]);
}
@@ -168,9 +168,8 @@
void CPenUiWndCtrl::Clean()
{
iCursorBmp = NULL;
- iBubblesArea.Close();
- iBubblesCtrl.Close();
- iBubblesPos.Close();
+ iBubblesArea.Reset();
+ iBubblesPos.Reset();
iBubblesMaskArea.Close();
iPopRegion.Close();
iChangedBmp= NULL;
@@ -276,29 +275,16 @@
}
iCursorWnd->SetCursorVisible(aOnFlag);
}
-
-// ---------------------------------------------------------------------------
-// CPenUiWndCtrl::UpdateBubble
-// ---------------------------------------------------------------------------
-//
-void CPenUiWndCtrl::UpdateBubble( const TUint32 aCtrl,
- const CFbsBitmap* aBmp,
- const CFbsBitmap* aMask,
- const TRect& aPos,
- TBool aFlag )
+
+void CPenUiWndCtrl::UpdateBubble(const CFbsBitmap* aBmp,const CFbsBitmap* aMask,
+ const TRect& aPos,TBool aFlag)
{
-
- // Check whether the Ctrl address is exist
- TInt idx = iBubblesCtrl.Find( aCtrl );
-
+ TInt idx = iBubblesArea.Find(aBmp);
if(aFlag)
{
if(KErrNotFound == idx)
{
-
- iBubblesCtrl.Append( aCtrl );
-
iBubblesArea.Append(aBmp);
iBubblesMaskArea.Append(aMask);
iBubblesPos.Append(aPos);
@@ -314,9 +300,6 @@
//remove
if(idx != KErrNotFound)
{
-
- iBubblesCtrl.Remove( idx );
-
iBubblesArea.Remove(idx);
iBubblesMaskArea.Remove(idx);
iBubblesPos.Remove(idx);
@@ -330,20 +313,13 @@
iIcfPos = aPos;
Invalidate(Rect(), ETrue);
}
-
+void CPenUiWndCtrl::UpdateChangedArea(const CFbsBitmap* aBmp,const TRect& aPos,TBool aFlag)
+ {
+ UpdateBubble(aBmp,0,aPos,aFlag);
+ return;
-// ---------------------------------------------------------------------------
-// CPenUiWndCtrl::UpdateChangedArea
-// ---------------------------------------------------------------------------
-//
-void CPenUiWndCtrl::UpdateChangedArea( const TUint32 aCtrl,
- const CFbsBitmap* aBmp,const TRect& aPos,TBool aFlag)
- {
- UpdateBubble( aCtrl, aBmp, 0, aPos, aFlag );
- return;
+
}
-
-
void CPenUiWndCtrl::SetPopupArea(const TRect& aRect, TBool aFlag)
{
if(aFlag) //add pop area
@@ -419,9 +395,8 @@
#ifdef RD_UI_TRANSITION_EFFECTS_POPUPS
- if ( iEnableGfxTransEffect && GfxTransEffect::IsRegistered( this ) && !IsVisible())
+ if ( GfxTransEffect::IsRegistered( this ) && !IsVisible())
{
- iEnableGfxTransEffect = EFalse;
this->MakeVisible(EFalse);
GfxTransEffect::NotifyExternalState( ENotifyGlobalAbort );
@@ -464,9 +439,9 @@
return;
}
#ifdef RD_UI_TRANSITION_EFFECTS_POPUPS
- if ( iEnableGfxTransEffect && GfxTransEffect::IsRegistered( this ) )
+ if ( GfxTransEffect::IsRegistered( this ))
{
- iEnableGfxTransEffect = EFalse;
+
GfxTransEffect::NotifyExternalState( ENotifyGlobalAbort );
//If still visible, do a transition to invisible state.
@@ -533,6 +508,10 @@
// Draw is always full-screen in such case. So I change to DrawNow
// for temprory solution.
/*********************************************************************/
+ if ( !IsVisible() )
+ {
+ return;
+ }
if(iShowPopup)
{
@@ -744,27 +723,25 @@
{
struct SData
{
- TUint32 ctrl;
TBool flag;
TRect pos;
CFbsBitmap* bmp;
CFbsBitmap* mask;
} data;
data = * (reinterpret_cast<SData*>( const_cast<TUint16*>( aEventData.Ptr() )));
- UpdateBubble( data.ctrl, data.bmp, data.mask, data.pos, data.flag );
+ UpdateBubble(data.bmp,data.mask,data.pos,data.flag);
}
break;
case ESignalUpdateChangedArea:
{
struct SData
{
- TUint32 ctrl;
TBool flag;
CFbsBitmap* bmp;
TRect pos;
} data;
data = * (reinterpret_cast<SData*>( const_cast<TUint16*>( aEventData.Ptr() )));
- UpdateChangedArea( data.ctrl, data.bmp, data.pos, data.flag );
+ UpdateChangedArea(data.bmp,data.pos,data.flag);
}
break;
case ESignalRegisterBkControl:
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/textinput/peninputarc/src/peninputserverapp/penuiwndeventhandler.cpp Fri Oct 22 15:38:27 2010 +0100
@@ -0,0 +1,96 @@
+/*
+* Copyright (c) 2008-2008 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0""
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: Implementation for pen ui window event handler
+*
+*/
+
+#include "peninputserver.h"
+#include "peninputuilayoutowner.h"
+#include "penuiwndeventobserver.h"
+#include "penuiwndeventhandler.h"
+
+// ---------------------------------------------------------------------------
+// Two-phased constructor.
+// ---------------------------------------------------------------------------
+//
+CPenUiWndEventHandler* CPenUiWndEventHandler::NewL( CPeninputServer* aServer )
+ {
+ CPenUiWndEventHandler* self = CPenUiWndEventHandler::NewLC( aServer );
+ CleanupStack::Pop( self );
+ return self;
+ }
+
+// ---------------------------------------------------------------------------
+// Two-phased constructor.
+// ---------------------------------------------------------------------------
+//
+CPenUiWndEventHandler* CPenUiWndEventHandler::NewLC( CPeninputServer* aServer )
+ {
+ CPenUiWndEventHandler* self = new (ELeave) CPenUiWndEventHandler( aServer );
+ CleanupStack::PushL( self );
+ self->ConstructL();
+ return self;
+ }
+
+// ---------------------------------------------------------------------------
+// Destructor.
+// ---------------------------------------------------------------------------
+//
+CPenUiWndEventHandler::~CPenUiWndEventHandler()
+ {
+ }
+
+// ---------------------------------------------------------------------------
+// Signal owner that there is an event
+// ---------------------------------------------------------------------------
+//
+void CPenUiWndEventHandler::SignalOwner( TInt aEventType,
+ const TDesC& aEventData )
+ {
+ if ( iServer )
+ {
+ iServer->SignalOwner( aEventType, aEventData );
+ }
+ }
+
+// ---------------------------------------------------------------------------
+// Handle layout command event.
+// ---------------------------------------------------------------------------
+//
+void CPenUiWndEventHandler::HandleCommand( TInt aCmd, TUint8* aData )
+ {
+ if ( iServer && iServer->PenUiLayout() )
+ {
+ iServer->PenUiLayout()->HandleCommand( aCmd, aData );
+ }
+ }
+
+// ---------------------------------------------------------------------------
+// C++ default constructor can NOT contain any code, that might leave.
+// ---------------------------------------------------------------------------
+//
+CPenUiWndEventHandler::CPenUiWndEventHandler( CPeninputServer* aServer )
+ : iServer( aServer )
+ {
+ }
+
+// ---------------------------------------------------------------------------
+// 2nd phase constructor.
+// ---------------------------------------------------------------------------
+//
+void CPenUiWndEventHandler::ConstructL()
+ {
+ }
+
+// End of File
--- a/textinput/peninputarc/src/peninputserverapp/rpeninputanim.cpp Fri Sep 17 17:26:50 2010 +0100
+++ b/textinput/peninputarc/src/peninputserverapp/rpeninputanim.cpp Fri Oct 22 15:38:27 2010 +0100
@@ -336,19 +336,4 @@
args.Set(KMsgSlot1,&msgData);
CommandReply(EPeninputOpSetDiscreeptPop,KNullDesC8,args);
}
-
-// ---------------------------------------------------------------------------
-// RPeniputAnim::UpdatePointerEventSuppressor()
-// Update parameters of pointer event suppressor.
-// ---------------------------------------------------------------------------
-//
-void RPeninputAnim::UpdatePointerEventSuppressor(
- const TPointerEventSuppressorParameters& aParameters )
- {
- TIpcArgs args( TIpcArgs::ENothing );
- TPckg<TPointerEventSuppressorParameters> msgData( aParameters );
- args.Set(KMsgSlot1, &msgData );
- CommandReply( EPeninputOpUpdatePointerSuppressor, KNullDesC8, args );
- }
-
// End of File
--- a/textinput/peninputcommonctrls/bwins/peninputcommonctrlsU.DEF Fri Sep 17 17:26:50 2010 +0100
+++ b/textinput/peninputcommonctrls/bwins/peninputcommonctrlsU.DEF Fri Oct 22 15:38:27 2010 +0100
@@ -359,3 +359,4 @@
??1CAknFepCtrlLongPressButton@@UAE@XZ @ 358 NONAME ; CAknFepCtrlLongPressButton::~CAknFepCtrlLongPressButton(void)
?HandleTimerOut@CAknFepCtrlLongPressButton@@UAEXPBVCAknFepTimer@@@Z @ 359 NONAME ; void CAknFepCtrlLongPressButton::HandleTimerOut(class CAknFepTimer const *)
?CancelTimer@CAknFepCtrlLongPressButton@@QAEXXZ @ 360 NONAME ; void CAknFepCtrlLongPressButton::CancelTimer(void)
+ ?ModeIndexByModeId@CAknFepCtrlMultiModeButton@@QAEHH@Z @ 361 NONAME ; int CAknFepCtrlMultiModeButton::ModeIndexByModeId(int)
--- a/textinput/peninputcommonctrls/eabi/peninputcommonctrlsU.DEF Fri Sep 17 17:26:50 2010 +0100
+++ b/textinput/peninputcommonctrls/eabi/peninputcommonctrlsU.DEF Fri Oct 22 15:38:27 2010 +0100
@@ -491,4 +491,5 @@
_ZTI26CAknFepCtrlLongPressButton @ 490 NONAME
_ZTV26CAknFepCtrlLongPressButton @ 491 NONAME
_ZThn804_N26CAknFepCtrlLongPressButton14HandleTimerOutEPK12CAknFepTimer @ 492 NONAME
+ _ZN26CAknFepCtrlMultiModeButton17ModeIndexByModeIdEi @ 493 NONAME
--- a/textinput/peninputcommonctrls/inc/peninputbuttons/peninputmultimodebutton.h Fri Sep 17 17:26:50 2010 +0100
+++ b/textinput/peninputcommonctrls/inc/peninputbuttons/peninputmultimodebutton.h Fri Oct 22 15:38:27 2010 +0100
@@ -249,6 +249,14 @@
IMPORT_C TInt GetRealCaseByMode(TInt aModeIndex) const;
/**
+ * Gets the button mode index by button mode id
+ *
+ * @param aModeId button mode id
+ * @return mode index
+ */
+ IMPORT_C TInt ModeIndexByModeId( TInt aModeId );
+
+ /**
* Get range list
*
* @since S60 v3.2
--- a/textinput/peninputcommonctrls/src/peninputbuttons/peninputbutton.cpp Fri Sep 17 17:26:50 2010 +0100
+++ b/textinput/peninputcommonctrls/src/peninputbuttons/peninputbutton.cpp Fri Oct 22 15:38:27 2010 +0100
@@ -1928,6 +1928,22 @@
return KErrNotFound;
}
+// ------------------------------------------------
+// CAknFepCtrlMultiModeButton::ModeIndexByModeId
+// ------------------------------------------------
+EXPORT_C TInt CAknFepCtrlMultiModeButton::ModeIndexByModeId( TInt aModeId )
+ {
+ TInt count = NumberOfModes();
+ for ( TInt i = 0; i < count; i++ )
+ {
+ if (iModesList[i]->iModeId == aModeId )
+ {
+ return i;
+ }
+ }
+ return KErrNotFound;
+ }
+
// -----------------------------------------------------------------------------
// CAknFepCtrlMultiModeButton::GetRangeListL()
// (other items were commented in a header).
--- a/textinput/peninputcommonlayout/BWINS/peninputcommonlayoutU.DEF Fri Sep 17 17:26:50 2010 +0100
+++ b/textinput/peninputcommonlayout/BWINS/peninputcommonlayoutU.DEF Fri Oct 22 15:38:27 2010 +0100
@@ -203,4 +203,4 @@
?SetPositionFromOutside@CPeninputCommonLayout@@UAEXABVTPoint@@@Z @ 202 NONAME ; void CPeninputCommonLayout::SetPositionFromOutside(class TPoint const &)
?SetPositionFromOutside@CPeninputCommonLayoutExt@@UAEXABVTPoint@@@Z @ 203 NONAME ; void CPeninputCommonLayoutExt::SetPositionFromOutside(class TPoint const &)
?HandleShiftAndCapslockBtnClicked@CPeninputLayoutWindowExt@@UAEXXZ @ 204 NONAME ; void CPeninputLayoutWindowExt::HandleShiftAndCapslockBtnClicked(void)
-
+ ?EnableToneMarker@CPeninputLayoutWindowExt@@QAEXH@Z @ 205 NONAME ; void CPeninputLayoutWindowExt::EnableToneMarker(int)
--- a/textinput/peninputcommonlayout/EABI/peninputcommonlayoutU.DEF Fri Sep 17 17:26:50 2010 +0100
+++ b/textinput/peninputcommonlayout/EABI/peninputcommonlayoutU.DEF Fri Oct 22 15:38:27 2010 +0100
@@ -316,4 +316,4 @@
_ZThn4_N21CPeninputCommonLayout22SetPositionFromOutsideERK6TPoint @ 315 NONAME ; #<thunk>#
_ZThn4_N24CPeninputCommonLayoutExt22SetPositionFromOutsideERK6TPoint @ 316 NONAME ; #<thunk>#
_ZN24CPeninputLayoutWindowExt32HandleShiftAndCapslockBtnClickedEv @ 317 NONAME
-
+ _ZN24CPeninputLayoutWindowExt16EnableToneMarkerEi @ 318 NONAME
--- a/textinput/peninputcommonlayout/inc/peninputlayoutwindowext.h Fri Sep 17 17:26:50 2010 +0100
+++ b/textinput/peninputcommonlayout/inc/peninputlayoutwindowext.h Fri Oct 22 15:38:27 2010 +0100
@@ -335,15 +335,7 @@
IMPORT_C void CPeninputLayoutWindowExt::SetTextAlignmentL( TInt aAlignment );
- /**
- * Unlatch the dead key for all kinds of vkb layout
- *
- * @since S60 v5.0
- * @param none
- * @return void
- */
- void CancelDeadKey();
-
+ IMPORT_C void EnableToneMarker(TBool aEnable);
protected:
/**
@@ -565,6 +557,25 @@
HBufC* GetKeyMappingStringL( TInt aKeyMapping, const TInt aLang );
void ResetLastColRow();
+
+ /**
+ * Handle paging button in number and special character mode
+ *
+ * @param aShifted Indicates whether case is shifted.
+ * @return None.
+ */
+ void HandleNumberModePagingL( TBool aShifted );
+
+ /**
+ * Gets the button mode id by current language and shift button state
+ *
+ * @param aShifted current shift key state, press down or not
+ * @param aLanguage current writing language
+ * @param aPagingPermitted shift key is dimmed or not
+ * @return mode id
+ */
+ TInt CurrentNumberModeId( TBool aShifted, TInt aLanguage, TBool aPagingPermitted );
+
protected: // data
/**
@@ -667,5 +678,6 @@
* Vowel char flag for Viet
*/
TBool iVowelChar;
+
};
#endif // C_CPeninputLayoutWindowExt_H
--- a/textinput/peninputcommonlayout/src/peninputlayoutwindowext.cpp Fri Sep 17 17:26:50 2010 +0100
+++ b/textinput/peninputcommonlayout/src/peninputlayoutwindowext.cpp Fri Oct 22 15:38:27 2010 +0100
@@ -372,42 +372,32 @@
static_cast<CFepLayoutMultiLineIcf*>( Control(EPeninputWindowCtrlIdMultiLineICF));
multiIcf->SetTextL( aData );
-
- if ( iLayoutContext->LayoutType() == EPluginInputModeVkb ||
- iLayoutContext->LayoutType() == EPluginInputModeFSQ )
- {
- TInt lang = CPeninputDataConverter::AnyToInt
- ( iLayoutContext->RequestData( EPeninputDataTypeInputLanguage ) );
- TInt curRange = CPeninputDataConverter::AnyToInt
- ( iLayoutContext->RequestData( EPeninputDataTypeCurrentRange ) );
-
- if ( lang == ELangVietnamese && curRange == ERangeEnglish )
- {
- TBuf<1> preData;
- multiIcf->ExtractText( preData, aData.iCurSel.LowerPos()-1, 1 );
- iVowelChar = EFalse;
-
- if ( KNullDesC() != preData )
- {
- for (TUint i = 0; i < sizeof(VietVowelList) / sizeof(TText); ++i)
- {
- TBuf<1> buf;
- buf.Append( VietVowelList[i] );
- if (preData == buf)
- {
- iVowelChar = ETrue;
- break;
- }
- }
- }
- CPeninputVkbCtrlExt* vkbCtrl = static_cast<CPeninputVkbCtrlExt*>
- ( Control( EPeninutWindowCtrlIdVkbCtrl ) );
- vkbCtrl->DimKeySet( iToneSet, !iVowelChar );
- }
- }
}
}
+EXPORT_C void CPeninputLayoutWindowExt::EnableToneMarker(TBool aEnable)
+ {
+ if (iLayoutContext->LayoutType() != EPluginInputModeVkb &&
+ iLayoutContext->LayoutType() != EPluginInputModeFSQ)
+ {
+ return;
+ }
+
+ TInt lang = CPeninputDataConverter::AnyToInt
+ ( iLayoutContext->RequestData( EPeninputDataTypeInputLanguage ) );
+ TInt curRange = CPeninputDataConverter::AnyToInt
+ ( iLayoutContext->RequestData( EPeninputDataTypeCurrentRange ) );
+
+ if ( lang != ELangVietnamese || curRange != ERangeEnglish )
+ {
+ return;
+ }
+
+ iVowelChar = aEnable;
+ CPeninputVkbCtrlExt* vkbCtrl = static_cast<CPeninputVkbCtrlExt*>
+ ( Control( EPeninutWindowCtrlIdVkbCtrl ) );
+ vkbCtrl->DimKeySet( iToneSet, !iVowelChar );
+ }
// ---------------------------------------------------------------------------
// CPeninputLayoutWindowExt::SetEditorTextL
// (other items were commented in a header)
@@ -490,57 +480,7 @@
return ETrue;
}
}
-
-// ---------------------------------------------------------------------------
-// CPeninputLayoutWindowExt::CancelDeadKey
-// (other items were commented in a header)
-// ---------------------------------------------------------------------------
-//
-void CPeninputLayoutWindowExt::CancelDeadKey()
- {
- // Get the dead key status
- TInt latchedFlag = CPeninputDataConverter::AnyToInt(
- iLayoutContext->RequestData( EAkninputDataTypeLatchedSet ));
- // If the DeadKey is latched, cancel it
- if ( latchedFlag )
- {
- RPointerArray<CPeninputVkbLayoutInfo> vkbListInfo;
- RPointerArray<CPeninputVkbKeyInfo> keyInfoList;
-
- // Get the vkb layout list supportted by current writing language
- vkbListInfo = iVkbLayout->VkbLayoutInfoList();
- TInt vkbListNum = vkbListInfo.Count();
-
- CVirtualKey* pKey;
- TBool deadKeyChange = EFalse;
-
- // Find the latched DeadKey in all kinds of vkb layout
- // which supportted by current writing language
- for ( TInt i = 0; i < vkbListNum && !deadKeyChange ; i++ )
- {
- // Get the key info list in one vkb layout
- keyInfoList = vkbListInfo[i]->KeyInfoList();
- TInt keyListNum = keyInfoList.Count();
- for ( TInt j = 0; j < keyListNum && !deadKeyChange ; j++ )
- {
- pKey = keyInfoList[j]->Key();
- // If the Dead key is latched
- if ( pKey->Latched())
- {
- // Unlatch the DeadKey
- pKey->SetLatched( EFalse );
-
- // Set the DeadKey state
- iLayoutContext->SetData(
- EAkninputDataTypeLatchedSet, &deadKeyChange );
-
- deadKeyChange = ETrue;
- }
- }
- }
- }
- }
-
+
// ---------------------------------------------------------------------------
// CPeninputLayoutWindowExt::ChangeInputLanguageL
// (other items were commented in a header)
@@ -568,9 +508,6 @@
if ( found )
{
- // Remove the dead key's latched status
- CancelDeadKey();
-
// Store language
iLayoutContext->SetData( EPeninputDataTypeInputLanguage, &aLangID );
@@ -873,10 +810,45 @@
//
EXPORT_C void CPeninputLayoutWindowExt::ChangeVkbLayout( TInt aVkbLayoutId )
{
-
- // Remove the dead key's latched status
- CancelDeadKey();
-
+ TInt latchedFlag = CPeninputDataConverter::AnyToInt(
+ iLayoutContext->RequestData(EAkninputDataTypeLatchedSet));
+ // If the DeadKey is latched, cancel it and then change the VKB layout
+ if(latchedFlag)
+ {
+ RPointerArray<CPeninputVkbLayoutInfo> vkbListInfo;
+ RPointerArray<CPeninputVkbKeyInfo> keyInfoList;
+
+ vkbListInfo = iVkbLayout->VkbLayoutInfoList();
+ TInt vkbListNum = vkbListInfo.Count();
+
+ CVirtualKey* pKey;
+ TBool deadKeyChange = EFalse;
+ // Find the latched DeadKey in all the Vkb layout
+ for(TInt i = 0; i < vkbListNum; i++)
+ {
+ // Get key info list in one VKB layout
+ keyInfoList = vkbListInfo[i]->KeyInfoList();
+ TInt keyListNum = keyInfoList.Count();
+ for(TInt j = 0; j < keyListNum; j++)
+ {
+ pKey = keyInfoList[j]->Key();
+ if(pKey->Latched())
+ {
+ // Unlatch the DeadKey
+ pKey->SetLatched(EFalse);
+
+ // Set the DeadKey state
+ iLayoutContext->SetData(EAkninputDataTypeLatchedSet, &deadKeyChange);
+ deadKeyChange = ETrue;
+ break;
+ }
+ }
+ if(deadKeyChange)
+ {
+ break;
+ }
+ }
+ }
TInt curVkbId = CPeninputDataConverter::AnyToInt
( iLayoutContext->RequestData( EPeninputDataTypeVkbLayout ) );
@@ -1260,6 +1232,7 @@
}
else
{
+ if ( permittedRange != ERangeNumber )
ChangeVkbLayout( vkbLayout );
}
@@ -1440,6 +1413,18 @@
{
return;
}
+
+ const TInt range = CPeninputDataConverter::AnyToInt(
+ iLayoutContext->RequestData(EPeninputDataTypeCurrentRange));
+
+ TBool shiftDown = ( aIsShiftCase > 0 );
+
+ if ( range == ERangeNumber || range == ERangeNativeNumber )
+ {
+ TRAP_IGNORE(HandleNumberModePagingL( shiftDown ));
+ }
+ else
+ {
switch ( aIsCapslockCase * 2 + aIsShiftCase )
{
case 1: // text case
@@ -1460,6 +1445,7 @@
button->SetHighlight( EFalse );
}
break;
+ }
}
}
// ---------------------------------------------------------------------------
@@ -1936,5 +1922,93 @@
icf->SetTextAlignmentL( aAlignment, ConfigInfo()->Language() );
}
}
-
+
+// ------------------------------------------------
+// CPeninputLayoutWindowExt::CurrentNumberModeId
+// ------------------------------------------------
+TInt CPeninputLayoutWindowExt::CurrentNumberModeId(TBool aShifted,
+ TInt aLanguage, TBool aPagingPermitted)
+ {
+ TInt ret = 0;
+ if (aPagingPermitted)
+ {
+ if (aLanguage == ELangArabic || aLanguage == ELangFarsi || aLanguage
+ == ELangUrdu)
+ {
+ if (aShifted)
+ {
+ ret = ECaseNumberSpecialPagingArabic22;
+ }
+ else
+ {
+ ret = ECaseNumberSpecialPagingArabic12;
+ }
+ }
+ else if (aLanguage == ELangThai)
+ {
+ if (aShifted)
+ {
+ ret = ECaseNumberSpecialPaging12;
+ }
+ else
+ {
+ ret = ECaseNumberSpecialPaging22;
+ }
+ }
+ else
+ {
+ if ( aShifted )
+ {
+ ret = ECaseNumberSpecialPaging22;
+ }
+ else
+ {
+ ret = ECaseNumberSpecialPaging12;
+ }
+ }
+ }
+ else
+ {
+ if (aLanguage == ELangArabic || aLanguage == ELangFarsi || aLanguage
+ == ELangUrdu)
+ {
+ ret = ECaseNumberSpecialPagingArabic11;
+ }
+ else
+ {
+ ret = ECaseNumberSpecialPaging11;
+ }
+ }
+ return ret;
+ }
+
+void CPeninputLayoutWindowExt::HandleNumberModePagingL( TBool aShifted )
+ {
+ CAknFepCtrlMultiModeButton* button = static_cast<CAknFepCtrlMultiModeButton*> (ControlById( EPeninutWindowCtrlIdShiftBtn ) );
+
+ if ( !button )
+ {
+ return;
+ }
+
+ const TInt lang = CPeninputDataConverter::AnyToInt( iLayoutContext->RequestData( EPeninputDataTypeInputLanguage ) );
+ TInt permittedRange = CPeninputDataConverter::AnyToInt
+ ( iLayoutContext->RequestData( EPeninputDataTypePermittedRange ));
+ TBool isPagingPermitted = EFalse;
+ if ( permittedRange == ERangeNumber || permittedRange == ERangeNativeNumber )
+ {
+ //if latin number only or native number only is permitted do not allow paging
+ isPagingPermitted = EFalse;
+ }
+ else
+ {
+ isPagingPermitted = !button->IsDimmed();
+ }
+
+ TInt modeId = CurrentNumberModeId( aShifted, lang, isPagingPermitted );
+ TInt index = button ->ModeIndexByModeId( modeId );
+
+ button->SetCurrentModeL( EBtnBmpActive, index );
+ button->SetHighlight( EFalse );
+ }
//End Of File
--- a/textinput/peninputfingerhwrar/data/peninputfingerhwrarwnd.rss Fri Sep 17 17:26:50 2010 +0100
+++ b/textinput/peninputfingerhwrar/data/peninputfingerhwrarwnd.rss Fri Oct 22 15:38:27 2010 +0100
@@ -1322,4 +1322,4 @@
scancode = 0x266B;
}
};
- }
+ }
\ No newline at end of file
--- a/textinput/peninputfingerhwrar/group/iconlist.txt Fri Sep 17 17:26:50 2010 +0100
+++ b/textinput/peninputfingerhwrar/group/iconlist.txt Fri Oct 22 15:38:27 2010 +0100
@@ -64,3 +64,4 @@
-c8,8 qgn_indi_input_hwr_arabic_symbol_table.svg
-c8,8 qgn_indi_input_hwr_arabic_writing_area.svg
-c8,8 qgn_indi_input_arabic_backspace.svg
+-c8,8 qgn_indi_input_enter.svg
\ No newline at end of file
--- a/textinput/peninputfingerhwrar/group/peninputfingerhwrar.mmp Fri Sep 17 17:26:50 2010 +0100
+++ b/textinput/peninputfingerhwrar/group/peninputfingerhwrar.mmp Fri Oct 22 15:38:27 2010 +0100
@@ -43,7 +43,6 @@
SOURCE hbufcarrayar.cpp
SOURCE peninputfingerhwrarwritingwnd.cpp
SOURCE peninputfingerhwrarnumsymboltable.cpp
-SOURCE peninputfingerhwarvkbutility.cpp
USERINCLUDE ../inc
--- a/textinput/peninputfingerhwrar/inc/peninputfingerhwarvkbutility.h Fri Sep 17 17:26:50 2010 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,73 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Implementation of virtual key ctrl utility for arabic hwr.
-*
-*/
-
-
-#ifndef C_PENINPUTFINGERHWARVKBUTILITY_H
-#define C_PENINPUTFINGERHWARVKBUTILITY_H
-
-// INCLUDES
-#include <e32std.h>
-#include <e32base.h>
-
-// FORWARD DECLARATIONS
-class TResourceReader;
-class CVirtualKeyboard;
-class CVirtualKey;
-
-// CLASS DECLARATION
-
-/**
- * The virtual key board utility which implement a set of funtions:
- * 1. create the virutal key
- * 2. load virutal key image
- * 3. load the virtual keys
- *
- * @lib peninputfingerhwrar.lib
- * @since S60 v5.0
- */
-
-class PeninputFingerHwrArVkbUtility
- {
-public:
- /**
- * Load VKB image
- *
- */
- static void LoadVkbKeyImageL(CVirtualKeyboard& aVkbCtrl, TInt aResId, const TSize& aKeySize);
-
- /**
- * Load virutal Key and set key rects.
- *
- */
- static void LoadVirtualKeypadKeyL(CVirtualKeyboard& aVkbCtrl, const TInt aResId, const RArray<TRect>& aCellRects);
-
- /**
- * create a new virtual key
- *
- */
- static CVirtualKey* CreateVkbKeyL(TResourceReader& aReader, const TRect& aKeyRect);
-
- /**
- * update the virtal key
- *
- */
- static void UpdateVkbKeyL( CVirtualKey* aVirtualKey, TResourceReader& aReader, const TRect& aKeyRect );
- };
-
-#endif // C_PENINPUTFINGERHWARVKBUTILITY_H
-
-// End Of File
--- a/textinput/peninputfingerhwrar/inc/peninputfingerhwrardatastore.h Fri Sep 17 17:26:50 2010 +0100
+++ b/textinput/peninputfingerhwrar/inc/peninputfingerhwrardatastore.h Fri Oct 22 15:38:27 2010 +0100
@@ -137,6 +137,14 @@
*/
TInt PrimaryRange();
+ /**
+ * Get current range
+ *
+ * @since Symbian TB9.2
+ * @return Current range.
+ */
+ TFingerHwrRange CurrentRange();
+
/**
* Set case
@@ -448,6 +456,11 @@
RArray<TInt> iPermittedRanges;
/**
+ * Current range
+ */
+ TFingerHwrRange iCurrentRange;
+
+ /**
* Permitted range in int format
*/
TInt iIntRange;
--- a/textinput/peninputfingerhwrar/inc/peninputfingerhwrarlafmanager.h Fri Sep 17 17:26:50 2010 +0100
+++ b/textinput/peninputfingerhwrar/inc/peninputfingerhwrarlafmanager.h Fri Oct 22 15:38:27 2010 +0100
@@ -153,13 +153,6 @@
*/
TInt IcfTextHeight();
- /**
- * get indicator bubble rect.
- *
- * @since Symbian TB9.2
- * @return bubble rect.
- */
- TRect IndicatorBubbleRect();
public: //buttons
/**
@@ -499,11 +492,6 @@
TInt iIcfTextAlignment;
CFont* iIcfFont;
- /**
- * Msg indicator bubble.
- */
- TRect iRectIndicatorBubble;
-
/**
* Candidate laf
*/
--- a/textinput/peninputfingerhwrar/inc/peninputfingerhwrarlayout.h Fri Sep 17 17:26:50 2010 +0100
+++ b/textinput/peninputfingerhwrar/inc/peninputfingerhwrarlayout.h Fri Oct 22 15:38:27 2010 +0100
@@ -30,6 +30,8 @@
class CPeninputFingerHwrArDataStore;
class CRepository;
class CPeninputFingerHwrArWnd;
+class CPeninputFingerHwrArCallBack;
+
// class DECLARATIONS
/**
@@ -509,12 +511,19 @@
*/
CRepository* iRepositorySetting;
+ /**
+ * repository object.
+ */
+// CRepository* iCommonEngineRepository;
+
/**
* Check if the stroke of drawing the character on the
* HWR box is started
*/
TBool iIsStrokeOfDrawingCharacerStarted;
+ CPeninputFingerHwrArCallBack* iCallBack;
+
/**
* Check if the editor is MFNE
*/
--- a/textinput/peninputfingerhwrar/inc/peninputfingerhwrarnumsymboltable.h Fri Sep 17 17:26:50 2010 +0100
+++ b/textinput/peninputfingerhwrar/inc/peninputfingerhwrarnumsymboltable.h Fri Oct 22 15:38:27 2010 +0100
@@ -100,7 +100,8 @@
* sizechanged
*
*/
- void SizeChanged(const TRect& aVirtualKeypadRect);
+ void SizeChanged(const TRect aVirtualKeypadRect, const RArray<TRect> aBtnRects,
+ const TInt aKeypadRow, const TInt aKeypadCol, TBool aIsLandscape = ETrue);
/**
* Load VKB image
@@ -121,6 +122,12 @@
inline CVirtualKeyboard* KeyPad(){return iNumKeypad;}
/**
+ * Navigate page
+ *
+ */
+ void UpdateNumSymbolTable(TInt aNumSctType = ENumSCTLatin);
+
+ /**
* Construct from resource
* This funciton will be called when the resource has changed for example skin was changed
*/
@@ -133,7 +140,7 @@
* @param aNumMapping a string contains numbers and related char. max length is 16.
* @return none
*/
- void UpdateTableSymbol( const TDesC& aNumMapping );
+ void SetNumericMapping( const TDesC& aNumMapping );
/*
* set arabic number mode.
@@ -142,14 +149,6 @@
* @return none.
*/
void SetNativeNumMode(const TBool aIsNativeNumMode);
-
- /**
- * Update the virtual keys rect.
- * @since s60 5.2.
- * @param aCellRects keypad cell rects.
- * @return None.
- */
- void UpdateAllVirtualKeysRect(const RArray<TRect> & aCellRects);
protected: //virtuals from CControlGroup (CFepUiBaseCtrl)
/**
@@ -208,6 +207,20 @@
*/
void CreateVirtualKeypadL();
+ /**
+ * create a new virtual key
+ *
+ */
+ CVirtualKey* CreateVkbKeyL(TResourceReader& aReader, const TRect aKeyRect);
+
+ /**
+ * update the virtal key
+ *
+ */
+ void UpdateVkbKeyL( CVirtualKey* aVirtualKey, TResourceReader& aReader,
+ const TRect aKeyRect );
+ void OnActivate();
+
/**
* Update the virtual key feedback
*
@@ -218,14 +231,7 @@
* Draw group control
*/
void Draw();
-
-private:
- /**
- * Refresh the symbol table
- *
- */
- void RefreshNumSymbolTable();
-
+
/**
* Load background from resource
*
@@ -236,13 +242,6 @@
* map latin number to arabic number.
*/
TInt16 MapLatinNumAccordingToNumMode(TInt16 aUnicode);
-
- /**
- * Generate the char talbe according to the aNumMapping
- *
- */
- HBufC* GenerateCharTable(const TDesC& aNumMapping);
-
private:
/**
* multipage viritual keyboard
@@ -255,6 +254,12 @@
*/
TBool iPopupVisible;
+ /**
+ * store the layout mode
+ */
+ TBool iIsLandscape;
+
+ TInt iCurrentNumSCTType;
/*
* Default number mode.
*/
--- a/textinput/peninputfingerhwrar/inc/peninputfingerhwrarsymboltable.h Fri Sep 17 17:26:50 2010 +0100
+++ b/textinput/peninputfingerhwrar/inc/peninputfingerhwrarsymboltable.h Fri Oct 22 15:38:27 2010 +0100
@@ -100,7 +100,7 @@
* sizechanged
*
*/
- void SizeChanged(const TRect aVirtualKeypadRect, const RArray<TRect> & aBtnRects,
+ void SizeChanged(const TRect aVirtualKeypadRect, const RArray<TRect> aBtnRects,
const TInt aKeypadRow, const TInt aKeypadCol, TBool aIsLandscape = ETrue);
/**
@@ -223,6 +223,20 @@
*/
void MoveIconButton( CAknFepCtrlEventButton* aButton, const TRect& aRect,
TInt aXPadding=0, TInt aYPadding=0, TBool aReloadImages=ETrue );
+
+ /**
+ * create a new virtual key
+ *
+ */
+ CVirtualKey* CreateVkbKeyL(TResourceReader& aReader, const TRect aKeyRect);
+
+ /**
+ * update the virtal key
+ *
+ */
+ void UpdateVkbKeyL( CVirtualKey* aVirtualKey, TResourceReader& aReader,
+ const TRect aKeyRect );
+ void OnActivate();
/**
* Show the visible page button
--- a/textinput/peninputfingerhwrar/inc/peninputfingerhwrarwnd.h Fri Sep 17 17:26:50 2010 +0100
+++ b/textinput/peninputfingerhwrar/inc/peninputfingerhwrarwnd.h Fri Oct 22 15:38:27 2010 +0100
@@ -504,8 +504,7 @@
* @param aCellRects rects of virtual keys.
* @return None
*/
- void LoadNumSymbolVirtualKeysL( const TInt aResId,
- const RArray<TRect>& aCellRects, TBool aReload = ETrue );
+ void LoadNumSymbolVirtualKeysL( const TInt aResId, const RArray<TRect>& aCellRects );
/**
* relayout full ui, reset all controls position.
--- a/textinput/peninputfingerhwrar/src/peninputfingerhwarvkbutility.cpp Fri Sep 17 17:26:50 2010 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,197 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Implementation of virtual key ctrl utility for arabic hwr.
-*
-*/
-
-// INCLUDE
-#include <e32std.h>
-#include <barsread.h>
-#include <coemain.h>
-
-#include "peninputfingerhwarvkbutility.h"
-#include "peninputlayoutvkb.h"
-#include "peninputpluginutils.h"
-#include "hbufcarrayar.h"
-#include "peninputfingerhwrarstoreconstants.h"
-
-// ---------------------------------------------------------------------------
-// Load virtual keys image
-// ---------------------------------------------------------------------------
-//
-void PeninputFingerHwrArVkbUtility::LoadVirtualKeypadKeyL(CVirtualKeyboard& aVkbCtrl, const TInt aResId, const RArray<TRect>& aCellRects)
- {
- aVkbCtrl.SetResourceId(aResId);
-
- TResourceReader reader;
- CCoeEnv::Static()->CreateResourceReaderLC( reader, aResId );
-
- // construct keys
- TInt resKeyCount = reader.ReadInt16();
- TInt existsKeyCount = aVkbCtrl.KeyArray().Count();
- TInt rectCount = aCellRects.Count();
-
- for ( TInt i = 0; i < resKeyCount; i++ )
- {
- if ( i < existsKeyCount )
- {
- CVirtualKey* vk = aVkbCtrl.KeyArray()[i];
- UpdateVkbKeyL( vk, reader, aCellRects[i%rectCount] );
- }
- else
- {
- CVirtualKey* vk = CreateVkbKeyL( reader, aCellRects[i%rectCount] );
- CleanupStack::PushL( vk );
- aVkbCtrl.AddKeyL( vk );
-
- CleanupStack::Pop( vk );
- }
- }
-
- CleanupStack::PopAndDestroy( 1 ); // reader
-
- aVkbCtrl.Draw();
- aVkbCtrl.UpdateArea( aVkbCtrl.Rect() );
- }
-
-// ---------------------------------------------------------------------------
-// Create the virtual key
-// ---------------------------------------------------------------------------
-//
-CVirtualKey* PeninputFingerHwrArVkbUtility::CreateVkbKeyL(TResourceReader& aReader,const TRect& aKeyRect)
- {
- CHBufCArray* keytexts = CHBufCArray::NewL();
- CleanupStack::PushL( keytexts );
-
- for ( TInt i = 0; i <= EPosLast; i++ )
- {
- HBufC* unicode = aReader.ReadHBufCL();
- keytexts->Array().AppendL( unicode );
- }
-
- TInt keyscancode = aReader.ReadInt16();
-
- HBufC* text = keytexts->Array()[0];
-
- CVirtualKey* vk = NULL;
- if ( text )
- {
- vk = CVirtualKey::NewL( *text, keyscancode, aKeyRect, aKeyRect, 0 );
- }
- else
- {
- vk = CVirtualKey::NewL( KNullDesC, keyscancode, aKeyRect, aKeyRect, 0 );
- }
-
- CleanupStack::PopAndDestroy( keytexts ); //keytexts
-
-
- TRect innerrect = aKeyRect;
- innerrect.Shrink( TSize(10, 10) );
- vk->SetInnerRect( innerrect );
-
- return vk;
- }
-
-// ---------------------------------------------------------------------------
-// Load virtual keys image
-// ---------------------------------------------------------------------------
-//
-void PeninputFingerHwrArVkbUtility::LoadVkbKeyImageL(CVirtualKeyboard& aVkbCtrl, TInt aResId, const TSize& aKeySize)
- {
- TResourceReader reader;
- CCoeEnv::Static()->CreateResourceReaderLC( reader, aResId );
-
- TPtrC bmpFileName = reader.ReadTPtrC();
- TInt32 imgMajorSkinId = reader.ReadInt32();
- TAknsItemID id;
-
- TSize keySize = aKeySize;
-
- for ( TInt index = 0; index <= EKeyBmpLastType ; index += 2 )
- {
- // Get the image ids and mask ids from resource
- TInt bmpId = reader.ReadInt16();
- TInt bmpMskId = reader.ReadInt16();
-
- // read skin item id
- const TInt skinitemid = reader.ReadInt16();
- id.Set( TInt( imgMajorSkinId ), skinitemid );
-
- if ( bmpId != KInvalidImg )
- {
- CFbsBitmap* bmp = NULL;
- CFbsBitmap* maskbmp = NULL;
-
- if ( bmpMskId != KInvalidImg )
- {
- AknsUtils::CreateIconL( AknsUtils::SkinInstance(),
- id, bmp, maskbmp, bmpFileName, bmpId, bmpMskId );
-
- // set maskbmp and size
- AknIconUtils::SetSize( maskbmp, keySize, EAspectRatioNotPreserved );
- aVkbCtrl.SetNonIrregularKeyBitmapL(TVirtualKeyBmpType(EKeyBmpNormal + index + 1 ),maskbmp);
- }
- else
- {
- AknsUtils::CreateIconL( AknsUtils::SkinInstance(), id,
- bmp, bmpFileName, bmpId );
- }
- // set bmp and size
- AknIconUtils::SetSize( bmp, keySize, EAspectRatioNotPreserved );
- aVkbCtrl.SetNonIrregularKeyBitmapL(TVirtualKeyBmpType( EKeyBmpNormal + index ),bmp);
- }
- }
- // Pop and destroy reader
- CleanupStack::PopAndDestroy( 1 );
- }
-
-// ---------------------------------------------------------------------------
-// update virtual key info.
-// ---------------------------------------------------------------------------
-//
-void PeninputFingerHwrArVkbUtility::UpdateVkbKeyL(CVirtualKey* aVirtualKey, TResourceReader& aReader, const TRect& aKeyRect)
- {
- CHBufCArray* keytexts = CHBufCArray::NewL();
- CleanupStack::PushL( keytexts );
-
- for ( TInt i = 0; i <= EPosLast; i++ )
- {
- HBufC* unicode = aReader.ReadHBufCL();
- keytexts->Array().AppendL( unicode );
- }
-
- TInt keyscancode = aReader.ReadInt16();
-
- HBufC* text = keytexts->Array()[0];
- if ( text )
- {
- aVirtualKey->SetKeyData( *text );
- }
- else
- {
- aVirtualKey->SetKeyData( KNullDesC );
- }
-
- aVirtualKey->SetKeyScancode( keyscancode );
-
- CleanupStack::PopAndDestroy( keytexts ); //keytexts
-
- aVirtualKey->SetRect(aKeyRect);
- TRect innerrect = aKeyRect;
- innerrect.Shrink( TSize(2,2) );
- aVirtualKey->SetInnerRect( innerrect );
- }
-
-// End Of File
--- a/textinput/peninputfingerhwrar/src/peninputfingerhwrardatastore.cpp Fri Sep 17 17:26:50 2010 +0100
+++ b/textinput/peninputfingerhwrar/src/peninputfingerhwrardatastore.cpp Fri Oct 22 15:38:27 2010 +0100
@@ -24,7 +24,6 @@
#include <aknfeppeninputenums.h>
#include <AknFepGlobalEnums.h>
#include <AknFepInternalCRKeys.h>
-#include <peninputcommonlayoutglobalenum.h>
//USER INCLUDE
#include "peninputfingerhwrarlayout.h"
@@ -73,6 +72,7 @@
delete iRepositoryFep;
delete iCommonEngineRepository;
+// delete iTriggerStr;
delete iHwrEngine;
delete iUserDefinedResource;
@@ -157,10 +157,6 @@
{
iPermittedRanges.Append( ERangeNative );
}
- if ( aPermittedRanges & ERangeNativeNumber )
- {
- iPermittedRanges.Append( ERangeNativeNumber );
- }
if ( aPermittedRanges & ERangeEnglish )
{
iPermittedRanges.Append( ERangeEnglish );
@@ -203,6 +199,15 @@
}
// ----------------------------------------------------------------------------
+// get current range
+// ----------------------------------------------------------------------------
+//
+TFingerHwrRange CPeninputFingerHwrArDataStore::CurrentRange()
+ {
+ return iCurrentRange;
+ }
+
+// ----------------------------------------------------------------------------
// Set case
// ----------------------------------------------------------------------------
//
@@ -700,7 +705,7 @@
//
TBool CPeninputFingerHwrArDataStore::IsNumberOnlyMode()
{
- if(PrimaryRange() == ERangeNumber || PrimaryRange() == ERangeNativeNumber)
+ if(PrimaryRange() == ERangeNumber)
{
return ETrue;
}
--- a/textinput/peninputfingerhwrar/src/peninputfingerhwrarengine.cpp Fri Sep 17 17:26:50 2010 +0100
+++ b/textinput/peninputfingerhwrar/src/peninputfingerhwrarengine.cpp Fri Oct 22 15:38:27 2010 +0100
@@ -16,13 +16,11 @@
*/
-//SYSTEM INCLUDES
+//FEP INCLUDES
#include <AknFepGlobalEnums.h>
#include <aknfeppeninputenums.h>
#include <PtiHwrRecognizer.h>
#include <e32property.h>
-#include <peninputcommonlayoutglobalenum.h>
-
#include "ptidefs.h"
//USER INCLUDES
@@ -369,13 +367,6 @@
aRecognitionRange.iSubRange = EPtiRangeNumber;
}
break;
- case ERangeNativeNumber:
- {
- //convert to ERangeNumber to let engine recognize both native number
- //and latin number.
- aRecognitionRange.iSubRange = EPtiRangeNumber;
- }
- break;
default:
break;
}
--- a/textinput/peninputfingerhwrar/src/peninputfingerhwrarlafmanager.cpp Fri Sep 17 17:26:50 2010 +0100
+++ b/textinput/peninputfingerhwrar/src/peninputfingerhwrarlafmanager.cpp Fri Oct 22 15:38:27 2010 +0100
@@ -156,18 +156,6 @@
// get font for text
iIcfFont = const_cast<CFont*>(AknLayoutUtils::FontFromId(icfTextLineLayoutRow1.iFont, NULL));
-
- //indicator bubble.
-#ifdef ARABIC_LAF
- if(iIsLandscape)
- {
- iRectIndicatorBubble.SetRect(543,17,624,41);
- }
- else
- {
- iRectIndicatorBubble.SetRect(263,17,344,41);
- }
-#endif
}
// ---------------------------------------------------------------------------
@@ -1094,14 +1082,6 @@
return iIcfTextHeight;
}
-// ---------------------------------------------------------------------------
-// get indicator bubble rect.
-// ---------------------------------------------------------------------------
-//
-TRect CPeninputFingerHwrArLafManager::IndicatorBubbleRect()
- {
- return iRectIndicatorBubble;
- }
// ---------------------------------------------------------------------------
// get inner padding of buttons.
--- a/textinput/peninputfingerhwrar/src/peninputfingerhwrarlayout.cpp Fri Sep 17 17:26:50 2010 +0100
+++ b/textinput/peninputfingerhwrar/src/peninputfingerhwrarlayout.cpp Fri Oct 22 15:38:27 2010 +0100
@@ -49,6 +49,46 @@
const TInt16 KEmotionKeyMark = 0xFFFE;
+class CPeninputFingerHwrArCallBack : public CActive
+ {
+ friend class CPeninputFingerHwrArLayout;
+public:
+ void IssueRequestL();
+private:
+ CPeninputFingerHwrArCallBack(CPeninputFingerHwrArLayout* aHwrArLayout);
+ void RunL();
+ void DoCancel();
+private:
+ CPeninputFingerHwrArLayout* iHwrArLayout;
+ };
+
+CPeninputFingerHwrArCallBack::CPeninputFingerHwrArCallBack(CPeninputFingerHwrArLayout* aHwrArLayout)
+ :CActive(EPriorityHigh)
+ {
+ CActiveScheduler::Add(this);
+ iHwrArLayout = aHwrArLayout;
+ }
+void CPeninputFingerHwrArCallBack::IssueRequestL()
+ {
+ if(!IsActive())
+ {
+ iStatus=KRequestPending;
+ SetActive();
+ TRequestStatus *pS=(&iStatus);
+
+ User::RequestComplete(pS,0);
+ }
+ }
+void CPeninputFingerHwrArCallBack::RunL()
+ {
+ iHwrArLayout->CallBackL();
+ }
+
+void CPeninputFingerHwrArCallBack::DoCancel()
+ {
+
+ }
+
// ============================ MEMBER FUNCTIONS =============================
// ---------------------------------------------------------------------------
@@ -101,7 +141,9 @@
//retrieve the settings
LoadAndPublishDefaultL();
-
+
+ //iCallBack = new (ELeave) CPeninputFingerHwrArCallBack(this);
+
//set screen layout extent
SetRect( TRect( TPoint( 0, 0 ), ScreenSize() ) );
}
@@ -585,7 +627,17 @@
iRepositorySetting->Get( KSettingsPenInputLang, newValue );
iDataStore->SetLanguageL( newValue );
-
+
+// TInt displayLang = 0;
+// iCommonEngineRepository->Get(KGSDisplayTxtLang,displayLang);
+// if(displayLang == ELangArabic)
+// {
+// iHwrWnd->SetNativeNumMode(ETrue);
+// }
+// else
+// {
+// iHwrWnd->SetNativeNumMode(EFalse);
+// }
iHwrWnd->SetNativeNumMode(iDataStore->IsNativeNumMode());
}
@@ -622,6 +674,8 @@
delete iStateMgr;
delete iGSRepositoryWatcher;
delete iRepositorySetting;
+// delete iCommonEngineRepository;
+ //delete iCallBack;
}
// ---------------------------------------------------------------------------
@@ -878,6 +932,7 @@
//
void CPeninputFingerHwrArLayout::OnHwrStrokeStartedL()
{
+ //iCallBack->IssueRequestL();
iHwrWnd->HideIndicator();
// The default candidate cell is not highlight
--- a/textinput/peninputfingerhwrar/src/peninputfingerhwrarnumsymboltable.cpp Fri Sep 17 17:26:50 2010 +0100
+++ b/textinput/peninputfingerhwrar/src/peninputfingerhwrarnumsymboltable.cpp Fri Oct 22 15:38:27 2010 +0100
@@ -41,9 +41,8 @@
#include "peninputfingerhwrarstoreconstants.h"
#include "peninputlayoutvkb.h"
#include "peninputfingerhwrarnumsymboltable.h"
-#include "peninputfingerhwarvkbutility.h"
-const TUint16 KInvalidChar = 0xFFFF;
+
// ---------------------------------------------------------------------------
// Symbian Constructor
// ---------------------------------------------------------------------------
@@ -100,25 +99,9 @@
{
CapturePointer( ETrue );
iPopupVisible = ETrue;
- UiLayout()->LockArea(UiLayout()->Rect(),this);
- // signal server to add the pop area
- if(UiLayout()->NotDrawToLayoutDevice())
- {
- struct SData
- {
- TRect rr;
- TBool flag;
- } data;
-
- data.rr = iNumKeypad->Rect();
- data.flag = ETrue;
- TPtrC ptrForAdd;
- ptrForAdd.Set(reinterpret_cast<const TUint16*>(&data),sizeof(data)/sizeof(TUint16));
-
- UiLayout()->SignalOwner(ESignalPopupArea,ptrForAdd);
- }
-
- RefreshNumSymbolTable();;
+ iCurrentNumSCTType = ENumSCTLatin;
+ UiLayout()->LockArea(UiLayout()->Rect(),this);
+ UpdateNumSymbolTable(ENumSCTLatin);
}
// ---------------------------------------------------------------------------
@@ -129,22 +112,6 @@
{
CapturePointer( EFalse );
iPopupVisible = EFalse;
- // signal server to remove the pop area
- if(UiLayout()->NotDrawToLayoutDevice())
- {
- struct SData
- {
- TRect rr;
- TBool flag;
- } data;
-
- data.rr = iNumKeypad->Rect();
- data.flag = EFalse;
- TPtrC ptrForRemove;
- ptrForRemove.Set(reinterpret_cast<const TUint16*>(&data),sizeof(data)/sizeof(TUint16));
-
- UiLayout()->SignalOwner(ESignalPopupArea,ptrForRemove);
- }
UiLayout()->UnLockArea(UiLayout()->Rect(),this);
}
@@ -243,10 +210,15 @@
// SizeChanged
// ---------------------------------------------------------------------------
//
-void CPeninputArabicFingerHwrNumSymbolTable::SizeChanged(const TRect& aVirtualKeypadRect)
+void CPeninputArabicFingerHwrNumSymbolTable::SizeChanged(
+ const TRect aVirtualKeypadRect, const RArray<TRect> /*aBtnRects*/,
+ const TInt /*aKeypadRow*/, const TInt /*aKeypadCol*/, TBool aIsLandscape)
{
+ iIsLandscape = aIsLandscape;
+
// relayout the virtual key pad
iNumKeypad->SetRect(aVirtualKeypadRect);
+
}
// ---------------------------------------------------------------------------
@@ -275,6 +247,11 @@
iNumKeypad->SetDrawOpaqueBackground( EFalse );
}
+void CPeninputArabicFingerHwrNumSymbolTable::OnActivate()
+ {
+ CControlGroup::OnActivate();
+ }
+
// ---------------------------------------------------------------------------
// Read control's background info.
// ---------------------------------------------------------------------------
@@ -362,7 +339,53 @@
//
void CPeninputArabicFingerHwrNumSymbolTable::LoadVkbKeyImageL(TInt aResId, const TSize& aKeySize)
{
- PeninputFingerHwrArVkbUtility::LoadVkbKeyImageL(*iNumKeypad,aResId,aKeySize);
+ TResourceReader reader;
+ CCoeEnv::Static()->CreateResourceReaderLC( reader, aResId );
+
+ TPtrC bmpFileName = reader.ReadTPtrC();
+ TInt32 imgMajorSkinId = reader.ReadInt32();
+ TAknsItemID id;
+
+ TSize keySize = aKeySize;
+
+ for ( TInt index = 0; index <= EKeyBmpLastType ; index += 2 )
+ {
+ // Get the image ids and mask ids from resource
+ TInt bmpId = reader.ReadInt16();
+ TInt bmpMskId = reader.ReadInt16();
+
+ // read skin item id
+ const TInt skinitemid = reader.ReadInt16();
+ id.Set( TInt( imgMajorSkinId ), skinitemid );
+
+ if ( bmpId != KInvalidImg )
+ {
+ CFbsBitmap* bmp = NULL;
+ CFbsBitmap* maskbmp = NULL;
+
+ if ( bmpMskId != KInvalidImg )
+ {
+ AknsUtils::CreateIconL( AknsUtils::SkinInstance(),
+ id, bmp, maskbmp, bmpFileName, bmpId, bmpMskId );
+
+ // set maskbmp and size
+ AknIconUtils::SetSize( maskbmp, keySize, EAspectRatioNotPreserved );
+ iNumKeypad->SetNonIrregularKeyBitmapL(
+ TVirtualKeyBmpType( EKeyBmpNormal + index + 1 ), maskbmp );
+ }
+ else
+ {
+ AknsUtils::CreateIconL( AknsUtils::SkinInstance(), id,
+ bmp, bmpFileName, bmpId );
+ }
+ // set bmp and size
+ AknIconUtils::SetSize( bmp, keySize, EAspectRatioNotPreserved );
+ iNumKeypad->SetNonIrregularKeyBitmapL(
+ TVirtualKeyBmpType( EKeyBmpNormal + index ), bmp );
+ }
+ }
+ // Pop and destroy reader
+ CleanupStack::PopAndDestroy( 1 );
}
// ---------------------------------------------------------------------------
@@ -371,57 +394,124 @@
//
void CPeninputArabicFingerHwrNumSymbolTable::LoadVirtualKeypadKeyL(const TInt aResId, const RArray<TRect>& aCellRects)
{
- PeninputFingerHwrArVkbUtility::LoadVirtualKeypadKeyL(*iNumKeypad,aResId,aCellRects);
+ iNumKeypad->SetResourceId(aResId);
+
+ TResourceReader reader;
+ CCoeEnv::Static()->CreateResourceReaderLC( reader, aResId );
+
+ // construct keys
+ TInt resKeyCount = reader.ReadInt16();
+ TInt existsKeyCount = iNumKeypad->KeyArray().Count();
+ TInt rectCount = aCellRects.Count();
+
+ for ( TInt i = 0; i < resKeyCount; i++ )
+ {
+ if ( i < existsKeyCount )
+ {
+ CVirtualKey* vk = iNumKeypad->KeyArray()[i];
+ UpdateVkbKeyL( vk, reader, aCellRects[i%rectCount] );
+ }
+ else
+ {
+ CVirtualKey* vk = CreateVkbKeyL( reader, aCellRects[i%rectCount] );
+ CleanupStack::PushL( vk );
+ iNumKeypad->AddKeyL( vk );
+
+ CleanupStack::Pop( vk );
+ }
+ }
+
+ CleanupStack::PopAndDestroy( 1 ); // reader
+
+ iNumKeypad->Draw();
+ iNumKeypad->UpdateArea( iNumKeypad->Rect() );
}
// ---------------------------------------------------------------------------
+// create virtual key.
+// ---------------------------------------------------------------------------
+//
+CVirtualKey* CPeninputArabicFingerHwrNumSymbolTable::CreateVkbKeyL( TResourceReader& aReader,
+ const TRect aKeyRect )
+ {
+ CHBufCArray* keytexts = CHBufCArray::NewL();
+ CleanupStack::PushL( keytexts );
+
+ for ( TInt i = 0; i <= EPosLast; i++ )
+ {
+ HBufC* unicode = aReader.ReadHBufCL();
+ keytexts->Array().AppendL( unicode );
+ }
+
+ TInt keyscancode = aReader.ReadInt16();
+
+ HBufC* text = keytexts->Array()[0];
+
+ CVirtualKey* vk = NULL;
+ if ( text )
+ {
+ vk = CVirtualKey::NewL( *text, keyscancode, aKeyRect, aKeyRect, 0 );
+ }
+ else
+ {
+ vk = CVirtualKey::NewL( KNullDesC, keyscancode, aKeyRect, aKeyRect, 0 );
+ }
+
+ CleanupStack::PopAndDestroy( keytexts ); //keytexts
+
+
+ TRect innerrect = aKeyRect;
+ innerrect.Shrink( TSize(10, 10) );
+ vk->SetInnerRect( innerrect );
+
+ return vk;
+ }
+
+// ---------------------------------------------------------------------------
+// update virtual key info.
+// ---------------------------------------------------------------------------
+//
+void CPeninputArabicFingerHwrNumSymbolTable::UpdateVkbKeyL( CVirtualKey* aVirtualKey,
+ TResourceReader& aReader, const TRect aKeyRect )
+ {
+ CHBufCArray* keytexts = CHBufCArray::NewL();
+ CleanupStack::PushL( keytexts );
+
+ for ( TInt i = 0; i <= EPosLast; i++ )
+ {
+ HBufC* unicode = aReader.ReadHBufCL();
+ keytexts->Array().AppendL( unicode );
+ }
+
+ TInt keyscancode = aReader.ReadInt16();
+
+ HBufC* text = keytexts->Array()[0];
+ if ( text )
+ {
+ aVirtualKey->SetKeyData( *text );
+ }
+ else
+ {
+ aVirtualKey->SetKeyData( KNullDesC );
+ }
+
+ aVirtualKey->SetKeyScancode( keyscancode );
+
+ CleanupStack::PopAndDestroy( keytexts ); //keytexts
+
+ aVirtualKey->SetRect(aKeyRect);
+ TRect innerrect = aKeyRect;
+ innerrect.Shrink( TSize(10,10) );
+ aVirtualKey->SetInnerRect( innerrect );
+ }
+
+// ---------------------------------------------------------------------------
// accept editor's number mapping restriction.
// ---------------------------------------------------------------------------
//
-void CPeninputArabicFingerHwrNumSymbolTable::UpdateTableSymbol( const TDesC& aNumMapping )
+void CPeninputArabicFingerHwrNumSymbolTable::SetNumericMapping( const TDesC& aNumMapping )
{
- HBufC* charTable = GenerateCharTable(aNumMapping);
- if(charTable)
- {
- TInt charTalbeCount = charTable->Length();
-
- //numberpad
- TInt keyCount = iNumKeypad->KeyArray().Count();
- for ( TInt i = 0; i < keyCount; i++ )
- {
- CVirtualKey* vk = iNumKeypad->KeyArray()[i];
-
- if(i < charTalbeCount && (*charTable)[i] != KInvalidChar)
- {
- TBuf<1> keydata;
- TUint16 keyCode = (*charTable)[i];
- keydata.Append(keyCode);
- vk->SetKeyData(keydata);
- vk->SetKeyScancode(keyCode);
- vk->SetDimmed( EFalse );
- }
- else
- {
- vk->SetKeyData( KNullDesC );
- vk->SetKeyScancode( KInvalidChar );
- vk->SetDimmed( EFalse );
- }
- }
-
- delete charTable;
-
- //sync feedback
- UpdateAllVirtualKeysFeedback();
- }
- }
-
-// ---------------------------------------------------------------------------
-// Get reordered char table for key pad to render them
-// ---------------------------------------------------------------------------
-//
-HBufC* CPeninputArabicFingerHwrNumSymbolTable::GenerateCharTable(const TDesC& aNumMapping)
- {
- //format of aNumMapping is "0123456789******"
+ //format of aNumMapping is "0123456789******"
//char offset in aNumMapping
//cell 0 using aNumMapping[KNumOffsets[0]]
@@ -433,36 +523,49 @@
14, 7, 8, 9,
15, 10, 0, 11
};
- TInt tableSize = sizeof(KNumOffsets)/sizeof(TInt);
+
+ TInt maxMappingItemCount = sizeof(KNumOffsets)/sizeof(TInt);
TInt mappingItemCount = aNumMapping.Length();
- HBufC* reorderedCharTable = HBufC::New(mappingItemCount +1);
- if(reorderedCharTable)
- {
- for(TInt i = 0; i < tableSize; i++)
- {
- if(KNumOffsets[i] < mappingItemCount)
- {
- TUint16 unicode = aNumMapping[KNumOffsets[i]];
- TUint16 mappedCode = MapLatinNumAccordingToNumMode(unicode);
- reorderedCharTable->Des().Append(mappedCode);
- }
- else
- {
- reorderedCharTable->Des().Append(KInvalidChar);
- }
- }
- }
+ //numberpad
+ TInt keyCount = iNumKeypad->KeyArray().Count();
+ for ( TInt i = 0; i < keyCount; i++ )
+ {
+ CVirtualKey* vk = iNumKeypad->KeyArray()[i];
+
+ TInt offset = ( i < maxMappingItemCount ) ? KNumOffsets[i] : -1;
+
+ if ( offset > -1 && offset < mappingItemCount )
+ {
+ TUint16 unicode = aNumMapping[offset];
+ TUint16 mappedCode = MapLatinNumAccordingToNumMode(unicode);
+ TBuf<1> keydata;
+ keydata.Append(mappedCode);
+ vk->SetKeyData(keydata);
+ vk->SetKeyScancode( mappedCode);
+ vk->SetDimmed( EFalse );
+ }
+ else
+ {
+ vk->SetKeyData( KNullDesC );
+ vk->SetKeyScancode( 0xFFFF );
+ vk->SetDimmed( EFalse );
+ }
+ }
- return reorderedCharTable;
- }
-
+
+ //sync feedback
+ UpdateAllVirtualKeysFeedback();
+ }
+
// ---------------------------------------------------------------------------
// Navigate the symbol page
// ---------------------------------------------------------------------------
//
-void CPeninputArabicFingerHwrNumSymbolTable::RefreshNumSymbolTable()
- {
+void CPeninputArabicFingerHwrNumSymbolTable::UpdateNumSymbolTable( TInt aNumSctType)
+ {
+
+ iCurrentNumSCTType = aNumSctType;
// Draw the symbol table
Draw();
@@ -479,7 +582,7 @@
//
void CPeninputArabicFingerHwrNumSymbolTable::UpdateAllVirtualKeysFeedback()
{
- //update numpad keys
+ //update sctpad keys
TInt keyCount = iNumKeypad->KeyArray().Count();
for ( TInt i = 0; i < keyCount; i++ )
{
@@ -490,30 +593,6 @@
}
// ---------------------------------------------------------------------------
-// update rect of all virtual keys.
-// ---------------------------------------------------------------------------
-//
-void CPeninputArabicFingerHwrNumSymbolTable::UpdateAllVirtualKeysRect(const RArray<TRect> & aCellRects)
- {
- //update numpad keys rect
- TInt keyCount = iNumKeypad->KeyArray().Count();
- TInt rectCount = aCellRects.Count();
- if(keyCount != rectCount)
- {
- return;
- }
- for ( TInt i = 0; i < keyCount; i++ )
- {
- CVirtualKey* vk = iNumKeypad->KeyArray()[i];
- TRect rect = aCellRects[i%rectCount];
- vk->SetRect(aCellRects[i%rectCount]);
- TRect innerrect = rect;
- innerrect.Shrink( TSize(10,10) );
- vk->SetInnerRect( innerrect );
- }
- }
-
-// ---------------------------------------------------------------------------
// Draw new content to the screen
// ---------------------------------------------------------------------------
//
--- a/textinput/peninputfingerhwrar/src/peninputfingerhwrarsymboltable.cpp Fri Sep 17 17:26:50 2010 +0100
+++ b/textinput/peninputfingerhwrar/src/peninputfingerhwrarsymboltable.cpp Fri Oct 22 15:38:27 2010 +0100
@@ -41,7 +41,7 @@
#include "peninputfingerhwrarstoreconstants.h"
#include "peninputfingerhwrarmultipagevkb.h"
#include "peninputfingerhwrarsymboltable.h"
-#include "peninputfingerhwarvkbutility.h"
+
//CONST DEFINATION
const TInt KSymbolButtonInnerPadding = 6;
@@ -216,16 +216,14 @@
// ---------------------------------------------------------------------------
//
void CPeninputArabicFingerHwrSymbolTable::SizeChanged(
- const TRect aVirtualKeypadRect, const RArray<TRect> & aBtnRects,
+ const TRect aVirtualKeypadRect, const RArray<TRect> aBtnRects,
const TInt aKeypadRow, const TInt aKeypadCol, TBool aIsLandscape)
{
- ASSERT(aBtnRects.Count() > 0);
-
iIsLandscape = aIsLandscape;
// relayout the button
- TRect pageBtnRect = aBtnRects[0];
-
+ TRect pageBtnRect(aBtnRects[0]);
+
if(aIsLandscape)
{
i2Page1Btn->Hide(EFalse);
@@ -255,7 +253,7 @@
iMutiPageKeypad->UpdatePaging(aKeypadRow,aKeypadCol);
}
-
+
// ---------------------------------------------------------------------------
// create symbol table keypad.
// ---------------------------------------------------------------------------
@@ -332,6 +330,11 @@
aButton->SizeChanged( aRect, rcInner, aReloadImages );
}
+void CPeninputArabicFingerHwrSymbolTable::OnActivate()
+ {
+ CControlGroup::OnActivate();
+ }
+
// ---------------------------------------------------------------------------
// Read control's background info.
// ---------------------------------------------------------------------------
@@ -419,7 +422,53 @@
//
void CPeninputArabicFingerHwrSymbolTable::LoadVkbKeyImageL(TInt aResId, const TSize& aKeySize)
{
- PeninputFingerHwrArVkbUtility::LoadVkbKeyImageL(*iMutiPageKeypad,aResId,aKeySize);
+ TResourceReader reader;
+ CCoeEnv::Static()->CreateResourceReaderLC( reader, aResId );
+
+ TPtrC bmpFileName = reader.ReadTPtrC();
+ TInt32 imgMajorSkinId = reader.ReadInt32();
+ TAknsItemID id;
+
+ TSize keySize = aKeySize;
+
+ for ( TInt index = 0; index <= EKeyBmpLastType ; index += 2 )
+ {
+ // Get the image ids and mask ids from resource
+ TInt bmpId = reader.ReadInt16();
+ TInt bmpMskId = reader.ReadInt16();
+
+ // read skin item id
+ const TInt skinitemid = reader.ReadInt16();
+ id.Set( TInt( imgMajorSkinId ), skinitemid );
+
+ if ( bmpId != KInvalidImg )
+ {
+ CFbsBitmap* bmp = NULL;
+ CFbsBitmap* maskbmp = NULL;
+
+ if ( bmpMskId != KInvalidImg )
+ {
+ AknsUtils::CreateIconL( AknsUtils::SkinInstance(),
+ id, bmp, maskbmp, bmpFileName, bmpId, bmpMskId );
+
+ // set maskbmp and size
+ AknIconUtils::SetSize( maskbmp, keySize, EAspectRatioNotPreserved );
+ iMutiPageKeypad->SetNonIrregularKeyBitmapL(
+ TVirtualKeyBmpType( EKeyBmpNormal + index + 1 ), maskbmp );
+ }
+ else
+ {
+ AknsUtils::CreateIconL( AknsUtils::SkinInstance(), id,
+ bmp, bmpFileName, bmpId );
+ }
+ // set bmp and size
+ AknIconUtils::SetSize( bmp, keySize, EAspectRatioNotPreserved );
+ iMutiPageKeypad->SetNonIrregularKeyBitmapL(
+ TVirtualKeyBmpType( EKeyBmpNormal + index ), bmp );
+ }
+ }
+ // Pop and destroy reader
+ CleanupStack::PopAndDestroy( 1 );
}
// ---------------------------------------------------------------------------
@@ -428,10 +477,118 @@
//
void CPeninputArabicFingerHwrSymbolTable::LoadVirtualKeypadKeyL(const TInt aResId, const RArray<TRect>& aCellRects)
{
- PeninputFingerHwrArVkbUtility::LoadVirtualKeypadKeyL(*iMutiPageKeypad,aResId,aCellRects);
+ iMutiPageKeypad->SetResourceId(aResId);
+
+ TResourceReader reader;
+ CCoeEnv::Static()->CreateResourceReaderLC( reader, aResId );
+
+ // construct keys
+ TInt resKeyCount = reader.ReadInt16();
+ TInt existsKeyCount = iMutiPageKeypad->KeyArray().Count();
+ TInt rectCount = aCellRects.Count();
+
+ for ( TInt i = 0; i < resKeyCount; i++ )
+ {
+ if ( i < existsKeyCount )
+ {
+ CVirtualKey* vk = iMutiPageKeypad->KeyArray()[i];
+ UpdateVkbKeyL( vk, reader, aCellRects[i%rectCount] );
+ }
+ else
+ {
+ CVirtualKey* vk = CreateVkbKeyL( reader, aCellRects[i%rectCount] );
+ CleanupStack::PushL( vk );
+ iMutiPageKeypad->AddKeyL( vk );
+
+ CleanupStack::Pop( vk );
+ }
+ }
+
+ CleanupStack::PopAndDestroy( 1 ); // reader
+
+ iMutiPageKeypad->Draw();
+ iMutiPageKeypad->UpdateArea( iMutiPageKeypad->Rect() );
}
// ---------------------------------------------------------------------------
+// create virtual key.
+// ---------------------------------------------------------------------------
+//
+CVirtualKey* CPeninputArabicFingerHwrSymbolTable::CreateVkbKeyL( TResourceReader& aReader,
+ const TRect aKeyRect )
+ {
+ CHBufCArray* keytexts = CHBufCArray::NewL();
+ CleanupStack::PushL( keytexts );
+
+ for ( TInt i = 0; i <= EPosLast; i++ )
+ {
+ HBufC* unicode = aReader.ReadHBufCL();
+ keytexts->Array().AppendL( unicode );
+ }
+
+ TInt keyscancode = aReader.ReadInt16();
+
+ HBufC* text = keytexts->Array()[0];
+
+ CVirtualKey* vk = NULL;
+ if ( text )
+ {
+ vk = CVirtualKey::NewL( *text, keyscancode, aKeyRect, aKeyRect, 0 );
+ }
+ else
+ {
+ vk = CVirtualKey::NewL( KNullDesC, keyscancode, aKeyRect, aKeyRect, 0 );
+ }
+
+ CleanupStack::PopAndDestroy( keytexts ); //keytexts
+
+
+ TRect innerrect = aKeyRect;
+ innerrect.Shrink( TSize(2, 2) );
+ vk->SetInnerRect( innerrect );
+
+ return vk;
+ }
+
+// ---------------------------------------------------------------------------
+// update virtual key info.
+// ---------------------------------------------------------------------------
+//
+void CPeninputArabicFingerHwrSymbolTable::UpdateVkbKeyL( CVirtualKey* aVirtualKey,
+ TResourceReader& aReader, const TRect aKeyRect )
+ {
+ CHBufCArray* keytexts = CHBufCArray::NewL();
+ CleanupStack::PushL( keytexts );
+
+ for ( TInt i = 0; i <= EPosLast; i++ )
+ {
+ HBufC* unicode = aReader.ReadHBufCL();
+ keytexts->Array().AppendL( unicode );
+ }
+
+ TInt keyscancode = aReader.ReadInt16();
+
+ HBufC* text = keytexts->Array()[0];
+ if ( text )
+ {
+ aVirtualKey->SetKeyData( *text );
+ }
+ else
+ {
+ aVirtualKey->SetKeyData( KNullDesC );
+ }
+
+ aVirtualKey->SetKeyScancode( keyscancode );
+
+ CleanupStack::PopAndDestroy( keytexts ); //keytexts
+
+ aVirtualKey->SetRect(aKeyRect);
+ TRect innerrect = aKeyRect;
+ innerrect.Shrink( TSize(2,2) );
+ aVirtualKey->SetInnerRect( innerrect );
+ }
+
+// ---------------------------------------------------------------------------
// Navigate the symbol page
// ---------------------------------------------------------------------------
//
@@ -534,14 +691,17 @@
{
if(AbleToDraw())
{
+ //Draw button area background.
+// DrawOpaqueMaskBackground( Rect() );
+// DrawOpaqueMaskBackground();
DrawOpaqueMaskBackground(iMutiPageKeypad->Rect());
if( BackgroundBmp() && BackgroundBmp()->SizeInPixels() != Rect().Size() )
{
AknIconUtils::SetSize(BackgroundBmp(), Rect().Size(), EAspectRatioNotPreserved);
}
- // draw background
+ // draw background
+// DrawBackground();
DrawBackground(iMutiPageKeypad->Rect());
-
// draw group
CControlGroup::Draw();
--- a/textinput/peninputfingerhwrar/src/peninputfingerhwrarwnd.cpp Fri Sep 17 17:26:50 2010 +0100
+++ b/textinput/peninputfingerhwrar/src/peninputfingerhwrarwnd.cpp Fri Oct 22 15:38:27 2010 +0100
@@ -87,7 +87,7 @@
CPeninputFingerHwrArWnd::~CPeninputFingerHwrArWnd()
{
#ifdef RD_TACTILE_FEEDBACK
- if(UiLayout() && iWritingBox)
+ if(UiLayout())
{
UiLayout()->DeRegisterFeedbackArea(reinterpret_cast<TInt>(iWritingBox),
iWritingBox->Rect());
@@ -352,10 +352,7 @@
{
if ( aInfo.Length() > 0 )
{
- TRect rect(iLafManager->IndicatorBubbleRect());
- iContextField->MsgBubbleCtrl()->SetRect(rect);
-// iContextField->ShowBubble( aInfo, iContextField->MsgBubbleCtrl()->Rect());
- iContextField->ShowBubble( aInfo, rect);
+ iContextField->ShowBubble( aInfo, iContextField->MsgBubbleCtrl()->Rect() );
}
else
{
@@ -622,7 +619,6 @@
KAknsIIDQsnFrInputPreviewMiddle,
KAknsIIDQsnFrInputPreviewSideR );
iContextField->SetMsgBubbleCtrlSize( TSize( bubbleLineLayout.iW,bubbleLineLayout.iH ) );
- iContextField->MsgBubbleCtrl()->SetTextL(KNullDesC);
iContextField->SetLineSeparatorAfterPrompt(ETrue);
@@ -825,7 +821,7 @@
// ---------------------------------------------------------------------------
//
void CPeninputFingerHwrArWnd::LoadNumSymbolVirtualKeysL( const TInt aResId,
- const RArray<TRect>& aCellRects, TBool aReload)
+ const RArray<TRect>& aCellRects )
{
TAknTextLineLayout txtlayout = iLafManager->NumpadKeyTxtLayout();
iNumSymbolTable->KeyPad()->SetTextLineLayout( txtlayout );
@@ -833,14 +829,8 @@
TInt fontid = txtlayout.FontId();
const CFont* font = AknLayoutUtils::FontFromId( fontid );
iNumSymbolTable->KeyPad()->SetFont( font );
- if(aReload)
- {
- iNumSymbolTable->LoadVirtualKeypadKeyL(aResId,aCellRects);
- }
- else
- {
- iNumSymbolTable->UpdateAllVirtualKeysRect(aCellRects);
- }
+
+ iNumSymbolTable->LoadVirtualKeypadKeyL(aResId,aCellRects);
}
// ---------------------------------------------------------------------------
@@ -953,7 +943,7 @@
iLafManager->GetNumVirtualKeyRects( numrects );
// load keys
- LoadNumSymbolVirtualKeysL(R_FINGER_HWR_NUMPAD, numrects,EFalse);
+ LoadNumSymbolVirtualKeysL(R_FINGER_HWR_NUMPAD, numrects);
CleanupStack::PopAndDestroy();//rects
@@ -964,7 +954,9 @@
rect = iLafManager->CtrlRect(iNumSymbolTable->ControlId());
iNumSymbolTable->SetRect(rect);
- iNumSymbolTable->SizeChanged(iLafManager->GetVirtualNumKeyRect());
+ iNumSymbolTable->SizeChanged(iLafManager->GetVirtualNumKeyRect(),
+ iLafManager->GetSymBtnArray(), numpadrows, numpadcols,
+ iLafManager->IsLandscape());
}
@@ -1492,7 +1484,7 @@
//
void CPeninputFingerHwrArWnd::SetNumericMapping( const TDesC& aNumMapping )
{
- iNumSymbolTable->UpdateTableSymbol(aNumMapping);
+ iNumSymbolTable->SetNumericMapping(aNumMapping);
}
// ---------------------------------------------------------------------------
// set native number mode on or off.
--- a/textinput/peninputgenericvkb/group/iconlist.txt Fri Sep 17 17:26:50 2010 +0100
+++ b/textinput/peninputgenericvkb/group/iconlist.txt Fri Oct 22 15:38:27 2010 +0100
@@ -40,6 +40,12 @@
-c8,8 qgn_indi_fep_button_capslock.svg
-c8,8 qgn_indi_fep_button_capslock_sel.svg
-c8,8 qgn_indi_fep_button_shift.svg
+-c8,8 qgn_indi_input_page.svg
+-c8,8 qgn_indi_input_page1.svg
+-c8,8 qgn_indi_input_page2.svg
+-c8,8 qgn_indi_input_qwerty_page1_1_ah.svg
+-c8,8 qgn_indi_input_qwerty_page1_2_ah.svg
+-c8,8 qgn_indi_input_qwerty_page2_2_ah.svg
-c8,8 qgn_indi_fep_button_shift_sel.svg
-c8,8 qgn_indi_fep_button_hwr.svg
-c8,8 qgn_indi_fep_button_hwr_sel.svg
--- a/textinput/peninputgenericvkb/src/peninputgenericlafdatamgr.cpp Fri Sep 17 17:26:50 2010 +0100
+++ b/textinput/peninputgenericvkb/src/peninputgenericlafdatamgr.cpp Fri Oct 22 15:38:27 2010 +0100
@@ -1038,7 +1038,7 @@
aDataInfo.iQwtRect = aParentWndRect;
TInt v1, v2, gridLayoutVariant;
-
+
// Get the variant for Portrait QWERTY
TInt cellVariantForPortraitQWERTY;
@@ -1199,6 +1199,7 @@
}
}
+
if ( !isPortraitFSQEnabled ||
( isPortraitFSQEnabled && Layout_Meta_Data::IsLandscapeOrientation() ) )
{
@@ -1230,7 +1231,7 @@
// the key rect without gap
rect = keypaneRect.Rect();
-
+
rect.Move( - rectXPane.iTl.iX, - rectXPane.iTl.iY );
TRect rectXBorder = rect;
rect = keylabelRect.Rect();
@@ -1243,14 +1244,14 @@
rect = keypadRect.Rect();
rect.Move( - base.iX, - base.iY );
-
+
TRect rectOfButtons = rect;
// The gap between the top of the first row key and the top of the keyboard
gapValue = keypaneRect.Rect().iTl.iY - keypadRect.Rect().iTl.iY;
// compute the top left Y coordinate of the function buttons
rectOfButtons.iTl.iY = rectOfButtons.iTl.iY +
keypaneRect.Rect().Height() * rowNumberOfKeyboard + gapValue;
-
+
TInt spaceBtnWidth = rectOfButtons.Width() - rectXPane.Width() * 8;
TInt dx = rectOfButtons.iTl.iX;
TInt dy = rectOfButtons.iTl.iY;
@@ -1716,7 +1717,7 @@
TAknLayoutText keyTextLayout;
TAknTextLineLayout keyText;
TRect keyRect;
- // The gap value of keyboard
+ // The gap value of keyboard
TInt gapValue;
TBool isLandscape = Layout_Meta_Data::IsLandscapeOrientation();
@@ -1791,12 +1792,11 @@
}
rectVkbCtrl = keypadRect.Rect();
- // Compute the gap between first row key's top line and keyboard's top line
+ // Compute the gap between first row key's top line and keyboard's top line
gapValue = keypaneRect.Rect().iTl.iY - rectVkbCtrl.iTl.iY;
// Compute keyboard position
rectVkbCtrl.iBr.iY = rectVkbCtrl.iTl.iY + keypaneRect.Rect().Height() * 3 + gapValue;
rectVkbCtrl.iTl.iY += gapValue;
-
dataInfo->iKeypad.iKaypadRect = rectVkbCtrl;
linelayout = AknLayoutScalable_Avkon::bg_cell_vkbss_key_g1(0).LayoutLine();
@@ -1805,6 +1805,7 @@
linelayout = AknLayoutScalable_Avkon::cell_vkbss_key_g1(0).LayoutLine();
keylabelRect.LayoutRect( keypaneRect.Rect(), linelayout );
+
TRect rectOfKeypad = RelativeRect( keypadRect.Rect(), base );
rectOfKeypad.iBr.iY -= keypaneRect.Rect().Height();
@@ -1826,7 +1827,7 @@
dataInfo->iKeypad.iRects.AppendL( bound );
TRect inner = rectXPane;
- inner.Move( j * rectXPane.Width(), i * rectXPane.Height() );
+ inner.Move( j * rectXPane.Width(), i * rectXPane.Height() );
TAknLayoutText keyTextLayout;
keyTextLayout.LayoutText( inner, keyText );
@@ -1944,13 +1945,11 @@
}
rectVkbCtrl = keypadRect.Rect();
-
- // Compute the gap between first row key's top line and keyboard's top line
+ // Compute the gap between first row key's top line and keyboard's top line
gapValue = keypaneRect.Rect().iTl.iY - rectVkbCtrl.iTl.iY;
// Compute keyboard position
rectVkbCtrl.iBr.iY = rectVkbCtrl.iTl.iY + keypaneRect.Rect().Height() * 3 + gapValue;
rectVkbCtrl.iTl.iY += gapValue;
-
dataInfo->iKeypad.iKaypadRect = rectVkbCtrl;
linelayout = AknLayoutScalable_Avkon::bg_cell_vkbss_key_g1(2).LayoutLine();
@@ -1959,6 +1958,7 @@
linelayout = AknLayoutScalable_Avkon::cell_vkbss_key_g1(2).LayoutLine();
keylabelRect.LayoutRect( keypaneRect.Rect(), linelayout );
+
rectOfKeypad = RelativeRect( keypadRect.Rect(), base );
rectOfKeypad.iBr.iY -= keypaneRect.Rect().Height();
@@ -1980,7 +1980,7 @@
dataInfo->iKeypad.iRects.AppendL( bound );
TRect inner = rectXPane;
- inner.Move( j * rectXPane.Width(), i * rectXPane.Height() );
+ inner.Move( j * rectXPane.Width(), i * rectXPane.Height() );
TAknLayoutText keyTextLayout;
keyTextLayout.LayoutText( inner, keyText );
@@ -2086,14 +2086,12 @@
keypaneRect.LayoutRect( keypadRect.Rect(), linelayout );
}
- rectVkbCtrl = keypadRect.Rect();
-
+ rectVkbCtrl = keypadRect.Rect();
// Compute the gap between first row key's top line and keyboard's top line
gapValue = keypaneRect.Rect().iTl.iY - rectVkbCtrl.iTl.iY;
// Compute keyboard position
rectVkbCtrl.iBr.iY = rectVkbCtrl.iTl.iY + keypaneRect.Rect().Height() * 4 + gapValue;
rectVkbCtrl.iTl.iY += gapValue;
-
dataInfo->iKeypad.iKaypadRect = rectVkbCtrl;
linelayout = AknLayoutScalable_Avkon::bg_cell_vkbss_key_g1(3).LayoutLine();
@@ -2102,6 +2100,7 @@
linelayout = AknLayoutScalable_Avkon::cell_vkbss_key_g1(3).LayoutLine();
keylabelRect.LayoutRect( keypaneRect.Rect(), linelayout );
+
rectOfKeypad = RelativeRect( keypadRect.Rect(), base );
rectOfKeypad.iBr.iY -= keypaneRect.Rect().Height();
@@ -2123,7 +2122,7 @@
dataInfo->iKeypad.iRects.AppendL( bound );
TRect inner = rectXPane;
- inner.Move( j * rectXPane.Width(), i * rectXPane.Height() );
+ inner.Move( j * rectXPane.Width(), i * rectXPane.Height() );
TAknLayoutText keyTextLayout;
keyTextLayout.LayoutText( inner, keyText );
--- a/textinput/peninputgenericvkb/src/peninputgenericvkblayout.cpp Fri Sep 17 17:26:50 2010 +0100
+++ b/textinput/peninputgenericvkb/src/peninputgenericvkblayout.cpp Fri Oct 22 15:38:27 2010 +0100
@@ -278,6 +278,12 @@
vkbWindow->DimArrowKeys( IsDimArrowKeys );
}
break;
+ case ECmdPeninputVietSyncToneMarker:
+ {
+ TBool bDimToneMarker = *aData;
+ vkbWindow->EnableToneMarker(bDimToneMarker);
+ }
+ break;
case ECmdPenInputDimEnterKey:
{
TBool isDimEnterKey = *((TUint16*)( aData ));
--- a/textinput/peninputgenericvkb/src/peninputgenericvkbwindow.cpp Fri Sep 17 17:26:50 2010 +0100
+++ b/textinput/peninputgenericvkb/src/peninputgenericvkbwindow.cpp Fri Oct 22 15:38:27 2010 +0100
@@ -2247,10 +2247,6 @@
static_cast<CAknFepCtrlEventButton*>
( Control( EPeninutWindowCtrlIdMultiRangeBtn ))->SizeChanged(
exRect, inRect, ETrue );
-
- TRAP_IGNORE( icf->MsgBubbleCtrl()->SetTextL( KEmptyString ));
- iIndiWithText = EFalse;
- IndiBubbleWithoutText();
}
iLafMgr->GetButtonRect(EPeninutWindowCtrlIdOptionBtn,exRect ,inRect);
--- a/textinput/peninputgenericvkb/srcdata/peninputvkbwindow.rss Fri Sep 17 17:26:50 2010 +0100
+++ b/textinput/peninputgenericvkb/srcdata/peninputvkbwindow.rss Fri Oct 22 15:38:27 2010 +0100
@@ -722,12 +722,48 @@
rangeid=0;
modeid=ECaseUpper;
},
- AKN_FEP_BUTTON_MODE
+ AKN_FEP_BUTTON_MODE
{
modeimage = r_peninput_layout_vkb_range_case_capslock;
rangeid=0;
modeid=ECaseText;
- }
+ },
+ AKN_FEP_BUTTON_MODE
+ {
+ modeimage = r_peninput_layout_vkb_range_case_paging_11;
+ rangeid=0;
+ modeid=ECaseNumberSpecialPaging11;
+ } ,
+ AKN_FEP_BUTTON_MODE
+ {
+ modeimage = r_peninput_layout_vkb_range_case_paging_12;
+ rangeid=0;
+ modeid=ECaseNumberSpecialPaging12;
+ },
+ AKN_FEP_BUTTON_MODE
+ {
+ modeimage = r_peninput_layout_vkb_range_case_paging_22;
+ rangeid=0;
+ modeid=ECaseNumberSpecialPaging22;
+ },
+ AKN_FEP_BUTTON_MODE
+ {
+ modeimage = r_peninput_layout_vkb_range_case_paging_arabic_11;
+ rangeid=0;
+ modeid=ECaseNumberSpecialPagingArabic11;
+ },
+ AKN_FEP_BUTTON_MODE
+ {
+ modeimage = r_peninput_layout_vkb_range_case_paging_arabic_12;
+ rangeid=0;
+ modeid=ECaseNumberSpecialPagingArabic12;
+ },
+ AKN_FEP_BUTTON_MODE
+ {
+ modeimage = r_peninput_layout_vkb_range_case_paging_arabic_22;
+ rangeid=0;
+ modeid=ECaseNumberSpecialPagingArabic22;
+ }
};
}
@@ -889,6 +925,138 @@
disableskinid=EAknsMinorGenericQgnIndiFepButtonSwitch;
}
+RESOURCE AKN_FEP_BUTTON_IMAGE r_peninput_layout_vkb_range_case_paging_11
+ {
+ bmpfile=PENINPUT_LAYOUT_VKB_BMP;
+ imgmajorskinid=EAknsMajorGeneric;
+
+ nactive=EMbmPeninputgenericvkbQgn_indi_input_page;
+ nactivemsk=EMbmPeninputgenericvkbQgn_indi_input_page_mask;
+ nactiveskinid=EAknsMinorGenericQgnIndiInputPage;
+
+ nactivep=EMbmPeninputgenericvkbQgn_indi_input_page;
+ nactivepmsk=EMbmPeninputgenericvkbQgn_indi_input_page_mask;
+ nactivepskinid=EAknsMinorGenericQgnIndiInputPage;
+
+ active=EMbmPeninputgenericvkbQgn_indi_input_page;
+ activemsk=EMbmPeninputgenericvkbQgn_indi_input_page_mask;
+ activeskinid=EAknsMinorGenericQgnIndiInputPage;
+
+ activep=EMbmPeninputgenericvkbQgn_indi_input_page;
+ activepmsk=EMbmPeninputgenericvkbQgn_indi_input_page_mask;
+ activepskinid=EAknsMinorGenericQgnIndiInputPage;
+ }
+
+RESOURCE AKN_FEP_BUTTON_IMAGE r_peninput_layout_vkb_range_case_paging_12
+ {
+ bmpfile=PENINPUT_LAYOUT_VKB_BMP;
+ imgmajorskinid=EAknsMajorGeneric;
+
+ nactive=EMbmPeninputgenericvkbQgn_indi_input_page1;
+ nactivemsk=EMbmPeninputgenericvkbQgn_indi_input_page1_mask;
+ nactiveskinid=EAknsMinorGenericQgnIndiInputPage1;
+
+ nactivep=EMbmPeninputgenericvkbQgn_indi_input_page1;
+ nactivepmsk=EMbmPeninputgenericvkbQgn_indi_input_page1_mask;
+ nactivepskinid=EAknsMinorGenericQgnIndiInputPage1;
+
+ active=EMbmPeninputgenericvkbQgn_indi_input_page1;
+ activemsk=EMbmPeninputgenericvkbQgn_indi_input_page1_mask;
+ activeskinid=EAknsMinorGenericQgnIndiInputPage1;
+
+ activep=EMbmPeninputgenericvkbQgn_indi_input_page1;
+ activepmsk=EMbmPeninputgenericvkbQgn_indi_input_page1_mask;
+ activepskinid=EAknsMinorGenericQgnIndiInputPage1;
+ }
+
+RESOURCE AKN_FEP_BUTTON_IMAGE r_peninput_layout_vkb_range_case_paging_22
+ {
+ bmpfile=PENINPUT_LAYOUT_VKB_BMP;
+ imgmajorskinid=EAknsMajorGeneric;
+
+ nactive=EMbmPeninputgenericvkbQgn_indi_input_page2;
+ nactivemsk=EMbmPeninputgenericvkbQgn_indi_input_page2_mask;
+ nactiveskinid=EAknsMinorGenericQgnIndiInputPage2;
+
+ nactivep=EMbmPeninputgenericvkbQgn_indi_input_page2;
+ nactivepmsk=EMbmPeninputgenericvkbQgn_indi_input_page2_mask;
+ nactivepskinid=EAknsMinorGenericQgnIndiInputPage2;
+
+ active=EMbmPeninputgenericvkbQgn_indi_input_page2;
+ activemsk=EMbmPeninputgenericvkbQgn_indi_input_page2_mask;
+ activeskinid=EAknsMinorGenericQgnIndiInputPage2;
+
+ activep=EMbmPeninputgenericvkbQgn_indi_input_page2;
+ activepmsk=EMbmPeninputgenericvkbQgn_indi_input_page2_mask;
+ activepskinid=EAknsMinorGenericQgnIndiInputPage2;
+ }
+
+RESOURCE AKN_FEP_BUTTON_IMAGE r_peninput_layout_vkb_range_case_paging_arabic_11
+ {
+ bmpfile=PENINPUT_LAYOUT_VKB_BMP;
+ imgmajorskinid=EAknsMajorGeneric;
+
+ nactive=EMbmPeninputgenericvkbQgn_indi_input_qwerty_page1_1_ah;
+ nactivemsk=EMbmPeninputgenericvkbQgn_indi_input_qwerty_page1_1_ah_mask;
+ nactiveskinid=EAknsMinorGenericQgnIndiInputQwertyPage11Ah;
+
+ nactivep=EMbmPeninputgenericvkbQgn_indi_input_qwerty_page1_1_ah;
+ nactivepmsk=EMbmPeninputgenericvkbQgn_indi_input_qwerty_page1_1_ah_mask;
+ nactivepskinid=EAknsMinorGenericQgnIndiInputQwertyPage11Ah;
+
+ active=EMbmPeninputgenericvkbQgn_indi_input_qwerty_page1_1_ah;
+ activemsk=EMbmPeninputgenericvkbQgn_indi_input_qwerty_page1_1_ah_mask;
+ activeskinid=EAknsMinorGenericQgnIndiInputQwertyPage11Ah;
+
+ activep=EMbmPeninputgenericvkbQgn_indi_input_qwerty_page1_1_ah;
+ activepmsk=EMbmPeninputgenericvkbQgn_indi_input_qwerty_page1_1_ah_mask;
+ activepskinid=EAknsMinorGenericQgnIndiInputQwertyPage11Ah;
+ }
+
+RESOURCE AKN_FEP_BUTTON_IMAGE r_peninput_layout_vkb_range_case_paging_arabic_12
+ {
+ bmpfile=PENINPUT_LAYOUT_VKB_BMP;
+ imgmajorskinid=EAknsMajorGeneric;
+
+ nactive=EMbmPeninputgenericvkbQgn_indi_input_qwerty_page1_2_ah;
+ nactivemsk=EMbmPeninputgenericvkbQgn_indi_input_qwerty_page1_2_ah_mask;
+ nactiveskinid=EAknsMinorGenericQgnIndiInputQwertyPage12Ah;
+
+ nactivep=EMbmPeninputgenericvkbQgn_indi_input_qwerty_page1_2_ah;
+ nactivepmsk=EMbmPeninputgenericvkbQgn_indi_input_qwerty_page1_2_ah_mask;
+ nactivepskinid=EAknsMinorGenericQgnIndiInputQwertyPage12Ah;
+
+ active=EMbmPeninputgenericvkbQgn_indi_input_qwerty_page1_2_ah;
+ activemsk=EMbmPeninputgenericvkbQgn_indi_input_qwerty_page1_2_ah_mask;
+ activeskinid=EAknsMinorGenericQgnIndiInputQwertyPage12Ah;
+
+ activep=EMbmPeninputgenericvkbQgn_indi_input_qwerty_page1_2_ah;
+ activepmsk=EMbmPeninputgenericvkbQgn_indi_input_qwerty_page1_2_ah_mask;
+ activepskinid=EAknsMinorGenericQgnIndiInputQwertyPage12Ah;
+ }
+
+RESOURCE AKN_FEP_BUTTON_IMAGE r_peninput_layout_vkb_range_case_paging_arabic_22
+ {
+ bmpfile=PENINPUT_LAYOUT_VKB_BMP;
+ imgmajorskinid=EAknsMajorGeneric;
+
+ nactive=EMbmPeninputgenericvkbQgn_indi_input_qwerty_page2_2_ah;
+ nactivemsk=EMbmPeninputgenericvkbQgn_indi_input_qwerty_page2_2_ah_mask;
+ nactiveskinid=EAknsMinorGenericQgnIndiInputQwertyPage22Ah;
+
+ nactivep=EMbmPeninputgenericvkbQgn_indi_input_qwerty_page2_2_ah;
+ nactivepmsk=EMbmPeninputgenericvkbQgn_indi_input_qwerty_page2_2_ah_mask;
+ nactivepskinid=EAknsMinorGenericQgnIndiInputQwertyPage22Ah;
+
+ active=EMbmPeninputgenericvkbQgn_indi_input_qwerty_page2_2_ah;
+ activemsk=EMbmPeninputgenericvkbQgn_indi_input_qwerty_page2_2_ah_mask;
+ activeskinid=EAknsMinorGenericQgnIndiInputQwertyPage22Ah;
+
+ activep=EMbmPeninputgenericvkbQgn_indi_input_qwerty_page2_2_ah;
+ activepmsk=EMbmPeninputgenericvkbQgn_indi_input_qwerty_page2_2_ah_mask;
+ activepskinid=EAknsMinorGenericQgnIndiInputQwertyPage22Ah;
+ }
+
RESOURCE LBUF r_peninput_vkb_accent1
{
txt=qtn_tin_vkb_accented_set1;
--- a/textinput/peninputsplititut/inc/peninputsplititutlayout.h Fri Sep 17 17:26:50 2010 +0100
+++ b/textinput/peninputsplititut/inc/peninputsplititutlayout.h Fri Oct 22 15:38:27 2010 +0100
@@ -309,7 +309,35 @@
* @return chinese ui mgr
*/
CSplitItutUiMgrBase* ChineseUiManager();
-
+
+ /**
+ * Handle show candidate list command
+ *
+ *
+ * @aData pointer is sent from FEP, point to a TPtrC
+ * @return None
+ */
+ void HandleShowMatchListCmdL( TUint8* aData );
+
+ /**
+ * Read text stored in a block of memory into HBufC
+ *
+ *
+ * @aData aStartPtr the starting address of a block of memory with a string in it
+ * @aLength The length of the string
+ * @return pointer of a HBufC storing the string in it
+ */
+ HBufC* ReadTextInfoHBufCL( TUint16* aStartPtr, TInt aLength );
+
+ /**
+ * Handle select candidate list item command
+ *
+ *
+ * @aData pointer is sent from FEP, point to a TPtrC
+ * @return None
+ */
+ void HandleSelectServerCandItemL( TUint8* aData );
+
private:
/**
* data manager.
--- a/textinput/peninputsplititut/src/peninputsplititutlayout.cpp Fri Sep 17 17:26:50 2010 +0100
+++ b/textinput/peninputsplititut/src/peninputsplititutlayout.cpp Fri Oct 22 15:38:27 2010 +0100
@@ -34,6 +34,7 @@
#include <peninputdataprovider.h>
#include <peninputcommonlayoutglobalenum.h>
+#include <peninputcmdparam.h>
#include "peninputsplititutlayout.h"
#include "peninputsplititutdatamgr.h"
@@ -44,6 +45,12 @@
#include "peninputsplititutconverter.h"
#include "peninputsplititutwindowmanager.h"
+// Buffer size
+const TInt KServerBufferSize = 8;
+
+// TInt number in command, used to show candidate list
+const TInt KStartIntNumber = 3;
+const TInt KEndIntNumber = 4;
// ---------------------------------------------------------------------------
// CSplitItutUiLayout::NewL
@@ -207,7 +214,6 @@
case ECmdPenInputFingerKeyPress:
case ECmdPenInputFingerLongKeyPress:
case ECmdPenInputCase:
- case ECmdPenInputFingerMatchSelection:
case ECmdPenInputFingerSpelling:
{
if (UiMgr())
@@ -218,14 +224,18 @@
}
}
break;
+ case ECmdPenInputFingerMatchSelection:
+ {
+ TBool special = *(reinterpret_cast<TBool*>(aData));
+ if( !special )
+ {
+ SignalOwner( ESignalHideServerCandidate );
+ }
+ }
+ break;
case ECmdPenInputFingerMatchList:
{
- if (UiMgr())
- {
- TInt handled = KErrNone;
- TRAP_IGNORE(handled = UiMgr()->HandleCommandL(aCmd, aData));
- return handled;
- }
+ TRAP_IGNORE( HandleShowMatchListCmdL( aData ) );
}
break;
case ECmdPenInputNoFreeSpace:
@@ -291,7 +301,11 @@
// iWindowMgr->ShowBubble(*aData);
}
break;
-
+ case ECmdPeninputSelectServerCandidate:
+ {
+ TRAP_IGNORE( HandleSelectServerCandItemL( aData ) );
+ }
+ break;
default:
break;
}
@@ -549,5 +563,141 @@
return iChnUiMgr;
}
+
+// ---------------------------------------------------------------------------
+// Handle show candidate list command.
+// ---------------------------------------------------------------------------
+//
+void CSplitItutUiLayout::HandleShowMatchListCmdL( TUint8* aData )
+ {
+ RDesReadStream readStream;
+ TPtr8 buf8( aData, KStartIntNumber * sizeof( TInt ),
+ KStartIntNumber * sizeof( TInt ) );
+ readStream.Open(buf8);
+ CleanupClosePushL(readStream);
+
+ TInt candcount = readStream.ReadInt32L();
+ TInt totalsize = readStream.ReadInt32L();
+ TInt langcode = readStream.ReadInt32L();
+ TBidiText::TDirectionality dir =
+ TBidiText::ScriptDirectionality( ( TLanguage ) langcode );
+ CGraphicsContext::TTextAlign align = ( dir == TBidiText::ELeftToRight ) ?
+ CGraphicsContext::ELeft :
+ CGraphicsContext::ERight;
+ CleanupStack::PopAndDestroy(&readStream);
+
+ CDesCArray* itemArray = NULL;
+ if ( candcount > 0 )
+ {
+ TUint8* curPointer = aData + sizeof(TInt) * KStartIntNumber;
+ itemArray = new (ELeave) CDesCArrayFlat( candcount );
+ CleanupStack::PushL( itemArray );
+ for ( TInt i = 0; i < candcount; i++ )
+ {
+ // Get length
+ buf8.Set( curPointer, sizeof( TInt32 ), sizeof( TInt32 ) );
+ readStream.Open( buf8 );
+ CleanupClosePushL( readStream );
+ TInt32 textSize = 0;
+ textSize = readStream.ReadInt32L();
+ CleanupStack::PopAndDestroy( &readStream );
+ if ( textSize > 0 )
+ {
+ // Get text
+ curPointer += sizeof( TInt32 );
+ HBufC* itemText = ReadTextInfoHBufCL
+ ( (TUint16*)curPointer,
+ ( textSize + 1 )/ 2 );
+ if ( itemText )
+ {
+ CleanupStack::PushL( itemText );
+ itemArray->AppendL( *itemText );
+ CleanupStack::PopAndDestroy( itemText );
+ }
+ curPointer += textSize;
+ }
+ }
+
+ buf8.Set( curPointer, sizeof( TInt32 ) * KEndIntNumber,
+ sizeof( TInt32 ) * KEndIntNumber );
+ readStream.Open( buf8 );
+ CleanupClosePushL( readStream );
+ TRect rect;
+ rect.iTl.iX = readStream.ReadInt32L();
+ rect.iTl.iY = readStream.ReadInt32L();
+ rect.iBr.iX = readStream.ReadInt32L();
+ rect.iBr.iY = readStream.ReadInt32L();
+ CleanupStack::PopAndDestroy( &readStream );
+
+ TPeninputCandidateData cmd;
+ cmd.iAlign = ( TInt ) align;
+ cmd.iInitRect = rect;
+ cmd.iSpellEnabled = ETrue;
+ cmd.iTextWidthEnabled = ETrue;
+ cmd.iItemArray = itemArray;
+ cmd.iActiveIndex = 0;
+
+ TPtrC buf( reinterpret_cast<TUint16*>( &cmd ), sizeof( cmd ) );
+ SignalOwner( ESignalShowServerCandidate, buf );
+
+ CleanupStack::PopAndDestroy( itemArray );
+ }
+ }
+
+// ---------------------------------------------------------------------------
+// Read text stored in a block of memory into HBufC.
+// ---------------------------------------------------------------------------
+//
+HBufC* CSplitItutUiLayout::ReadTextInfoHBufCL( TUint16* aStartPtr,
+ TInt aLength )
+ {
+ HBufC* itemText = NULL;
+ if ( aLength > 0 )
+ {
+ itemText = HBufC::NewLC( aLength );
+ TPtr itemTextPtr = itemText->Des();
+ itemTextPtr.Copy( aStartPtr, aLength );
+ CleanupStack::Pop( itemText );
+ }
+ return itemText;
+ }
+
+// ---------------------------------------------------------------------------
+// Handle select candidate list item command.
+// ---------------------------------------------------------------------------
+//
+void CSplitItutUiLayout::HandleSelectServerCandItemL( TUint8* aData )
+ {
+ TPtr8* ptr = reinterpret_cast< TPtr8* > ( aData );
+ RDesReadStream readStream;
+ readStream.Open( *ptr );
+ CleanupClosePushL( readStream );
+ TInt command = readStream.ReadInt32L();
+ TInt focusItem = readStream.ReadInt32L();
+ CleanupStack::PopAndDestroy(&readStream);
+
+ switch ( command )
+ {
+ case ECandItemCmdItemSelected:
+ {
+ TBool commit = ETrue;
+ TBuf<KServerBufferSize> buf;
+ buf.Append( reinterpret_cast< TUint16* >( &focusItem ),
+ sizeof( TInt ) );
+ buf.Append( reinterpret_cast< TUint16* >( &commit ),
+ sizeof( TBool ) );
+ SignalOwner ( ESignalSelectMatchSelectionText, buf );
+ }
+ break;
+ case ECandItemCmdEnterSpellMode:
+ {
+ SignalOwner ( ESignalEnterSpellMode );
+ }
+ break;
+ default:
+ break;
+ }
+ }
+
// End Of File
--- a/textinput/peninputsplititut/src/peninputsplititutwesternuimgr.cpp Fri Sep 17 17:26:50 2010 +0100
+++ b/textinput/peninputsplititut/src/peninputsplititutwesternuimgr.cpp Fri Oct 22 15:38:27 2010 +0100
@@ -133,23 +133,14 @@
}
iCurrentState = newstate;
- if ( DataMgr()->IsUpdate() )
- {
- DataMgr()->SetUpdate( EFalse );
- CSplitItutUiLayout* itutLayout =
- static_cast<CSplitItutUiLayout*>( LayoutContext()->UiLayout() );
- itutLayout->SizeChanged( NULL );
-
- iCurrentState->OnEntryL();
-
- //redraw layout immediately to minimize flicker
- itutLayout->DisableLayoutDrawing( EFalse );
- itutLayout->Draw();
- }
- else
- {
- iCurrentState->OnEntryL();
- }
+ if(DataMgr()->IsUpdate())
+ {
+ DataMgr()->SetUpdate(EFalse);
+ CSplitItutUiLayout* itutLayout =
+ static_cast<CSplitItutUiLayout*>( LayoutContext()->UiLayout() );
+ itutLayout->SizeChanged( NULL );
+ }
+ iCurrentState->OnEntryL();
}
// ---------------------------------------------------------------------------
--- a/textinput/peninputsplitqwerty/group/iconlist.txt Fri Sep 17 17:26:50 2010 +0100
+++ b/textinput/peninputsplitqwerty/group/iconlist.txt Fri Oct 22 15:38:27 2010 +0100
@@ -40,6 +40,12 @@
-c8,8 qgn_indi_fep_button_capslock.svg
-c8,8 qgn_indi_fep_button_capslock_sel.svg
-c8,8 qgn_indi_fep_button_shift.svg
+-c8,8 qgn_indi_input_page.svg
+-c8,8 qgn_indi_input_page1.svg
+-c8,8 qgn_indi_input_page2.svg
+-c8,8 qgn_indi_input_qwerty_page1_1_ah.svg
+-c8,8 qgn_indi_input_qwerty_page1_2_ah.svg
+-c8,8 qgn_indi_input_qwerty_page2_2_ah.svg
-c8,8 qgn_indi_fep_button_shift_sel.svg
-c8,8 qgn_indi_fep_button_hwr.svg
-c8,8 qgn_indi_fep_button_hwr_sel.svg
--- a/textinput/peninputsplitqwerty/inc/peninputsplitqwertylayout.h Fri Sep 17 17:26:50 2010 +0100
+++ b/textinput/peninputsplitqwerty/inc/peninputsplitqwertylayout.h Fri Oct 22 15:38:27 2010 +0100
@@ -265,6 +265,34 @@
*/
void HandleVirtualKeyUpL( TInt aEventType, CFepUiBaseCtrl* aCtrl,
const TDesC& aEventData );
+
+ /**
+ * Handle show candidate list command
+ *
+ *
+ * @aData pointer is sent from FEP, point to a TPtrC
+ * @return None
+ */
+ void HandleShowCandidateListCmdL( TUint8* aData );
+
+ /**
+ * Read text stored in a block of memory into HBufC
+ *
+ *
+ * @aData aStartPtr the starting address of a block of memory with a string in it
+ * @aLength The length of the string
+ * @return pointer of a HBufC storing the string in it
+ */
+ HBufC* ReadTextInfoHBufCL( TUint16* aStartPtr, TInt aLength );
+
+ /**
+ * Handle select candidate list item command
+ *
+ *
+ * @aData pointer is sent from FEP, point to a TPtrC
+ * @return None
+ */
+ void HandleSelectServerCandItemL( TUint8* aData );
private:
--- a/textinput/peninputsplitqwerty/src/peninputsplitqwertylafdatamgr.cpp Fri Sep 17 17:26:50 2010 +0100
+++ b/textinput/peninputsplitqwerty/src/peninputsplitqwertylafdatamgr.cpp Fri Oct 22 15:38:27 2010 +0100
@@ -379,7 +379,7 @@
}
}
- // Compute the gap between first row key's top line and keyboard's top line
+ // Compute the gap between first row key's top line and keyboard's top line
gapValue = keypaneRect.Rect().iTl.iY - keypadRect.Rect().iTl.iY;
// Compute function button's top left Y coordinate
rectOfButtons.iTl.iY = rectOfButtons.iTl.iY +
@@ -414,7 +414,7 @@
data->iKeypad.iRects.AppendL( bound );
TRect inner = rectXPane;
- inner.Move( j * rectXPane.Width(), i * rectXPane.Height() );
+ inner.Move( j * rectXPane.Width(), i * rectXPane.Height() );
TAknLayoutText keyTextLayout;
keyTextLayout.LayoutText( inner, keyText );
@@ -426,10 +426,8 @@
//all template rects are relative to TL of buttons row
rectXPane = keypaneRect.Rect();
-
// The key rect without gap
rectXBorder = RelativeRect( keypaneRect.Rect(), rectXPane.iTl );
-
rectXInner = RelativeRect( keylabelRect.Rect(), rectXPane.iTl );
TRect rect3PicPane = RelativeRect( pic3paneRect.Rect(), rectXPane.iTl );
rectXPane.Move( - rectXPane.iTl );
--- a/textinput/peninputsplitqwerty/src/peninputsplitqwertylayout.cpp Fri Sep 17 17:26:50 2010 +0100
+++ b/textinput/peninputsplitqwerty/src/peninputsplitqwertylayout.cpp Fri Oct 22 15:38:27 2010 +0100
@@ -31,6 +31,7 @@
#include <s32mem.h>
#include <peninputrangebar.h>
+#include <peninputcmdparam.h>
// User includes
#include "peninputsplitqwerty.hrh"
@@ -57,6 +58,9 @@
0xF73A,0xF747,0xF748,0xF749,0xF74A,0xF74B,0xF74C,0xF74D
};
+// TInt number in command, used to show candidate list
+const TInt KStartIntNumber = 3;
+const TInt KEndIntNumber = 4;
// ---------------------------------------------------------------------------
// Symbian constructor
// ---------------------------------------------------------------------------
@@ -185,6 +189,12 @@
vkbWindow->DimArrowKeys( IsDimArrowKeys );
}
break;
+ case ECmdPeninputVietSyncToneMarker:
+ {
+ TBool bDimToneMarker = *aData;
+ vkbWindow->EnableToneMarker(bDimToneMarker);
+ }
+ break;
case ECmdPenInputSetPromptText:
break;
case ECmdPenInputCharacterPreview:
@@ -197,11 +207,26 @@
iInEditWordQueryDlg = *aData;
}
break;
+ case ECmdPenInputPopupCandidateList:
+ {
+ TRAP_IGNORE( HandleShowCandidateListCmdL( aData ) );
+ }
+ break;
+ case ECmdPenInputHideCandidateList:
+ {
+ SignalOwner( ESignalHideServerCandidate );
+ }
+ break;
case ECmdPeninputITIStatus:
{
// Set the flag to indicate if FSQ with ITI feature is opened
iITIEnabled = CPeninputDataConverter::AnyToInt( aData );
- }
+ }
+ break;
+ case ECmdPeninputSelectServerCandidate:
+ {
+ TRAP_IGNORE( HandleSelectServerCandItemL( aData ) );
+ }
break;
default:
{
@@ -261,16 +286,6 @@
//
TInt CPeninputSplitQwertyLayout::SizeChanged( const TAny* aData )
{
- CPeninputSplitQwertyWindow*
- win = static_cast<CPeninputSplitQwertyWindow*>( iLayoutWindow );
-
- if ( win )
- {
- win->UpdateLafData();
-
- win->UpdateLayoutPosAndSize();
- }
-
return CPeninputCommonLayoutExt::SizeChanged( aData );
}
@@ -425,4 +440,130 @@
}
}
+
+// ---------------------------------------------------------------------------
+// Handle show candidate list command.
+// ---------------------------------------------------------------------------
+//
+void CPeninputSplitQwertyLayout::HandleShowCandidateListCmdL( TUint8* aData )
+ {
+ // Read candidate data from a block of memory staring from aData
+ // The format is activeIndex | count of candiates |
+ // length 1 | text 1 | length 2 | text 2 |...
+ TPtr8 buf8( aData, sizeof( TInt32 ) * KStartIntNumber,
+ sizeof( TInt32 ) * KStartIntNumber );
+ RDesReadStream readStream;
+ readStream.Open( buf8 );
+ CleanupClosePushL( readStream );
+ // Get activeIndex
+ TInt activeIndex = readStream.ReadInt32L();
+ // Get coutn of candidates
+ TInt count = readStream.ReadInt32L();
+ TInt langCode = readStream.ReadInt32L();
+ TBidiText::TDirectionality dir =
+ TBidiText::ScriptDirectionality( ( TLanguage )langCode );
+ CGraphicsContext::TTextAlign align = ( dir == TBidiText::ELeftToRight ) ?
+ CGraphicsContext::ELeft :
+ CGraphicsContext::ERight;
+ CleanupStack::PopAndDestroy( &readStream );
+
+ CDesCArray* itemArray = NULL;
+ if ( count > 0 )
+ {
+ TUint8* curPointer = aData + sizeof( TInt ) * KStartIntNumber;
+ itemArray = new ( ELeave ) CDesCArrayFlat( count );
+ CleanupStack::PushL( itemArray );
+ for ( TInt i = 0; i < count; i++ )
+ {
+ // Get length
+ buf8.Set( curPointer, sizeof( TInt32 ), sizeof( TInt32 ) );
+ readStream.Open( buf8 );
+ CleanupClosePushL( readStream );
+ TInt32 textSize = 0;
+ textSize = readStream.ReadInt32L();
+ CleanupStack::PopAndDestroy( &readStream );
+ if ( textSize > 0 )
+ {
+ // Get text
+ curPointer += sizeof( TInt32 );
+ HBufC* itemText = ReadTextInfoHBufCL
+ ( (TUint16*)curPointer,
+ ( textSize + 1 )/ 2 );
+ if ( itemText )
+ {
+ CleanupStack::PushL( itemText );
+ itemArray->AppendL( *itemText );
+ CleanupStack::PopAndDestroy( itemText );
+ }
+ curPointer += textSize;
+ }
+ }
+
+ buf8.Set( curPointer, sizeof( TInt32 ) * KEndIntNumber,
+ sizeof( TInt32 ) * KEndIntNumber );
+ readStream.Open( buf8 );
+ CleanupClosePushL( readStream );
+ TRect rect;
+ rect.iTl.iX = readStream.ReadInt32L();
+ rect.iTl.iY = readStream.ReadInt32L();
+ rect.iBr.iX = readStream.ReadInt32L();
+ rect.iBr.iY = readStream.ReadInt32L();
+ CleanupStack::PopAndDestroy( &readStream );
+
+ TPeninputCandidateData cmd;
+ cmd.iAlign = ( TInt ) align;
+ cmd.iInitRect = rect;
+ cmd.iSpellEnabled = EFalse;
+ cmd.iTextWidthEnabled = EFalse;
+ cmd.iItemArray = itemArray;
+ cmd.iActiveIndex = activeIndex;
+
+ TPtrC buf( reinterpret_cast<TUint16*>( &cmd ), sizeof( cmd ) );
+ SignalOwner( ESignalShowServerCandidate, buf );
+
+ CleanupStack::PopAndDestroy( itemArray );
+ }
+ }
+
+
+// ---------------------------------------------------------------------------
+// Read text stored in a block of memory into HBufC.
+// ---------------------------------------------------------------------------
+//
+HBufC* CPeninputSplitQwertyLayout::ReadTextInfoHBufCL( TUint16* aStartPtr,
+ TInt aLength )
+ {
+ HBufC* itemText = NULL;
+ if ( aLength > 0 )
+ {
+ itemText = HBufC::NewLC( aLength );
+ TPtr itemTextPtr = itemText->Des();
+ itemTextPtr.Copy( aStartPtr, aLength );
+ CleanupStack::Pop( itemText );
+ }
+ return itemText;
+ }
+
+// ---------------------------------------------------------------------------
+// Handle select candidate list item command.
+// ---------------------------------------------------------------------------
+//
+void CPeninputSplitQwertyLayout::HandleSelectServerCandItemL( TUint8* aData )
+ {
+ TPtr8* ptr = reinterpret_cast< TPtr8* > ( aData );
+ RDesReadStream readStream;
+ readStream.Open( *ptr );
+ CleanupClosePushL( readStream );
+ TInt command = readStream.ReadInt32L();
+ TInt focusItem = readStream.ReadInt32L();
+ CleanupStack::PopAndDestroy(&readStream);
+
+ if ( command == ECandItemCmdItemSelected )
+ {
+ TPtrC buf( reinterpret_cast< TUint16* >( &focusItem ),
+ sizeof( TInt ) );
+ SignalOwner ( ESignalSelectCandidate, buf );
+ }
+ }
+
// End Of File
--- a/textinput/peninputsplitqwerty/srcdata/peninputssqwin.rss Fri Sep 17 17:26:50 2010 +0100
+++ b/textinput/peninputsplitqwerty/srcdata/peninputssqwin.rss Fri Oct 22 15:38:27 2010 +0100
@@ -602,7 +602,43 @@
modeimage = r_peninput_layout_vkb_range_case_capslock;
rangeid=0;
modeid=ECaseText;
- }
+ },
+ AKN_FEP_BUTTON_MODE
+ {
+ modeimage = r_peninput_layout_vkb_range_case_paging_11;
+ rangeid=0;
+ modeid=ECaseNumberSpecialPaging11;
+ } ,
+ AKN_FEP_BUTTON_MODE
+ {
+ modeimage = r_peninput_layout_vkb_range_case_paging_12;
+ rangeid=0;
+ modeid=ECaseNumberSpecialPaging12;
+ },
+ AKN_FEP_BUTTON_MODE
+ {
+ modeimage = r_peninput_layout_vkb_range_case_paging_22;
+ rangeid=0;
+ modeid=ECaseNumberSpecialPaging22;
+ },
+ AKN_FEP_BUTTON_MODE
+ {
+ modeimage = r_peninput_layout_vkb_range_case_paging_arabic_11;
+ rangeid=0;
+ modeid=ECaseNumberSpecialPagingArabic11;
+ },
+ AKN_FEP_BUTTON_MODE
+ {
+ modeimage = r_peninput_layout_vkb_range_case_paging_arabic_12;
+ rangeid=0;
+ modeid=ECaseNumberSpecialPagingArabic12;
+ },
+ AKN_FEP_BUTTON_MODE
+ {
+ modeimage = r_peninput_layout_vkb_range_case_paging_arabic_22;
+ rangeid=0;
+ modeid=ECaseNumberSpecialPagingArabic22;
+ }
};
}
@@ -764,6 +800,139 @@
disableskinid=EAknsMinorGenericQgnIndiFepButtonSwitch;
}
+RESOURCE AKN_FEP_BUTTON_IMAGE r_peninput_layout_vkb_range_case_paging_11
+ {
+ bmpfile=PENINPUT_LAYOUT_VKB_BMP;
+ imgmajorskinid=EAknsMajorGeneric;
+
+ nactive=EMbmPeninputsplitqwertyQgn_indi_input_page;
+ nactivemsk=EMbmPeninputsplitqwertyQgn_indi_input_page_mask;
+ nactiveskinid=EAknsMinorGenericQgnIndiInputPage;
+
+ nactivep=EMbmPeninputsplitqwertyQgn_indi_input_page;
+ nactivepmsk=EMbmPeninputsplitqwertyQgn_indi_input_page_mask;
+ nactivepskinid=EAknsMinorGenericQgnIndiInputPage;
+
+ active=EMbmPeninputsplitqwertyQgn_indi_input_page;
+ activemsk=EMbmPeninputsplitqwertyQgn_indi_input_page_mask;
+ activeskinid=EAknsMinorGenericQgnIndiInputPage;
+
+ activep=EMbmPeninputsplitqwertyQgn_indi_input_page;
+ activepmsk=EMbmPeninputsplitqwertyQgn_indi_input_page_mask;
+ activepskinid=EAknsMinorGenericQgnIndiInputPage;
+ }
+
+RESOURCE AKN_FEP_BUTTON_IMAGE r_peninput_layout_vkb_range_case_paging_12
+ {
+ bmpfile=PENINPUT_LAYOUT_VKB_BMP;
+ imgmajorskinid=EAknsMajorGeneric;
+
+ nactive=EMbmPeninputsplitqwertyQgn_indi_input_page1;
+ nactivemsk=EMbmPeninputsplitqwertyQgn_indi_input_page1_mask;
+ nactiveskinid=EAknsMinorGenericQgnIndiInputPage1;
+
+ nactivep=EMbmPeninputsplitqwertyQgn_indi_input_page1;
+ nactivepmsk=EMbmPeninputsplitqwertyQgn_indi_input_page1_mask;
+ nactivepskinid=EAknsMinorGenericQgnIndiInputPage1;
+
+ active=EMbmPeninputsplitqwertyQgn_indi_input_page1;
+ activemsk=EMbmPeninputsplitqwertyQgn_indi_input_page1_mask;
+ activeskinid=EAknsMinorGenericQgnIndiInputPage1;
+
+ activep=EMbmPeninputsplitqwertyQgn_indi_input_page1;
+ activepmsk=EMbmPeninputsplitqwertyQgn_indi_input_page1_mask;
+ activepskinid=EAknsMinorGenericQgnIndiInputPage1;
+ }
+
+RESOURCE AKN_FEP_BUTTON_IMAGE r_peninput_layout_vkb_range_case_paging_22
+ {
+ bmpfile=PENINPUT_LAYOUT_VKB_BMP;
+ imgmajorskinid=EAknsMajorGeneric;
+
+ nactive=EMbmPeninputsplitqwertyQgn_indi_input_page2;
+ nactivemsk=EMbmPeninputsplitqwertyQgn_indi_input_page2_mask;
+ nactiveskinid=EAknsMinorGenericQgnIndiInputPage2;
+
+ nactivep=EMbmPeninputsplitqwertyQgn_indi_input_page2;
+ nactivepmsk=EMbmPeninputsplitqwertyQgn_indi_input_page2_mask;
+ nactivepskinid=EAknsMinorGenericQgnIndiInputPage2;
+
+ active=EMbmPeninputsplitqwertyQgn_indi_input_page2;
+ activemsk=EMbmPeninputsplitqwertyQgn_indi_input_page2_mask;
+ activeskinid=EAknsMinorGenericQgnIndiInputPage2;
+
+ activep=EMbmPeninputsplitqwertyQgn_indi_input_page2;
+ activepmsk=EMbmPeninputsplitqwertyQgn_indi_input_page2_mask;
+ activepskinid=EAknsMinorGenericQgnIndiInputPage2;
+ }
+
+RESOURCE AKN_FEP_BUTTON_IMAGE r_peninput_layout_vkb_range_case_paging_arabic_11
+ {
+ bmpfile=PENINPUT_LAYOUT_VKB_BMP;
+ imgmajorskinid=EAknsMajorGeneric;
+
+ nactive=EMbmPeninputsplitqwertyQgn_indi_input_qwerty_page1_1_ah;
+ nactivemsk=EMbmPeninputsplitqwertyQgn_indi_input_qwerty_page1_1_ah_mask;
+ nactiveskinid=EAknsMinorGenericQgnIndiInputQwertyPage11Ah;
+
+ nactivep=EMbmPeninputsplitqwertyQgn_indi_input_qwerty_page1_1_ah;
+ nactivepmsk=EMbmPeninputsplitqwertyQgn_indi_input_qwerty_page1_1_ah_mask;
+ nactivepskinid=EAknsMinorGenericQgnIndiInputQwertyPage11Ah;
+
+ active=EMbmPeninputsplitqwertyQgn_indi_input_qwerty_page1_1_ah;
+ activemsk=EMbmPeninputsplitqwertyQgn_indi_input_qwerty_page1_1_ah_mask;
+ activeskinid=EAknsMinorGenericQgnIndiInputQwertyPage11Ah;
+
+ activep=EMbmPeninputsplitqwertyQgn_indi_input_qwerty_page1_1_ah;
+ activepmsk=EMbmPeninputsplitqwertyQgn_indi_input_qwerty_page1_1_ah_mask;
+ activepskinid=EAknsMinorGenericQgnIndiInputQwertyPage11Ah;
+ }
+
+RESOURCE AKN_FEP_BUTTON_IMAGE r_peninput_layout_vkb_range_case_paging_arabic_12
+ {
+ bmpfile=PENINPUT_LAYOUT_VKB_BMP;
+ imgmajorskinid=EAknsMajorGeneric;
+
+ nactive=EMbmPeninputsplitqwertyQgn_indi_input_qwerty_page1_2_ah;
+ nactivemsk=EMbmPeninputsplitqwertyQgn_indi_input_qwerty_page1_2_ah_mask;
+ nactiveskinid=EAknsMinorGenericQgnIndiInputQwertyPage12Ah;
+
+ nactivep=EMbmPeninputsplitqwertyQgn_indi_input_qwerty_page1_2_ah;
+ nactivepmsk=EMbmPeninputsplitqwertyQgn_indi_input_qwerty_page1_2_ah_mask;
+ nactivepskinid=EAknsMinorGenericQgnIndiInputQwertyPage12Ah;
+
+ active=EMbmPeninputsplitqwertyQgn_indi_input_qwerty_page1_2_ah;
+ activemsk=EMbmPeninputsplitqwertyQgn_indi_input_qwerty_page1_2_ah_mask;
+ activeskinid=EAknsMinorGenericQgnIndiInputQwertyPage12Ah;
+
+ activep=EMbmPeninputsplitqwertyQgn_indi_input_qwerty_page1_2_ah;
+ activepmsk=EMbmPeninputsplitqwertyQgn_indi_input_qwerty_page1_2_ah_mask;
+ activepskinid=EAknsMinorGenericQgnIndiInputQwertyPage12Ah;
+ }
+
+RESOURCE AKN_FEP_BUTTON_IMAGE r_peninput_layout_vkb_range_case_paging_arabic_22
+ {
+ bmpfile=PENINPUT_LAYOUT_VKB_BMP;
+ imgmajorskinid=EAknsMajorGeneric;
+
+ nactive=EMbmPeninputsplitqwertyQgn_indi_input_qwerty_page2_2_ah;
+ nactivemsk=EMbmPeninputsplitqwertyQgn_indi_input_qwerty_page2_2_ah_mask;
+ nactiveskinid=EAknsMinorGenericQgnIndiInputQwertyPage22Ah;
+
+ nactivep=EMbmPeninputsplitqwertyQgn_indi_input_qwerty_page2_2_ah;
+ nactivepmsk=EMbmPeninputsplitqwertyQgn_indi_input_qwerty_page2_2_ah_mask;
+ nactivepskinid=EAknsMinorGenericQgnIndiInputQwertyPage22Ah;
+
+ active=EMbmPeninputsplitqwertyQgn_indi_input_qwerty_page2_2_ah;
+ activemsk=EMbmPeninputsplitqwertyQgn_indi_input_qwerty_page2_2_ah_mask;
+ activeskinid=EAknsMinorGenericQgnIndiInputQwertyPage22Ah;
+
+ activep=EMbmPeninputsplitqwertyQgn_indi_input_qwerty_page2_2_ah;
+ activepmsk=EMbmPeninputsplitqwertyQgn_indi_input_qwerty_page2_2_ah_mask;
+ activepskinid=EAknsMinorGenericQgnIndiInputQwertyPage22Ah;
+ }
+
+
RESOURCE LBUF r_peninput_vkb_accent1
{
txt=qtn_tin_vkb_accented_set1;
--- a/textinput/peninputvkbcn/ctrlsrc/peninputvkbclientarea.cpp Fri Sep 17 17:26:50 2010 +0100
+++ b/textinput/peninputvkbcn/ctrlsrc/peninputvkbclientarea.cpp Fri Oct 22 15:38:27 2010 +0100
@@ -952,10 +952,10 @@
TRect compositionRect;
TRect innerRect;
- // Get composition area rect from laf
+ // Get composition area rect from laf
TRect compositionAreaFromLaf = iLafMgr->compositionLayoutData();
TInt GapValue = compositionAreaFromLaf.iTl.iX;
-
+
if (range == ERangeNative)
{
if ( layoutType == EAknFepVkbImCnZhuyin )
@@ -1011,14 +1011,14 @@
compositionRect.SetSize(TSize(btnWidth * 3 + iCellAidGap - GapValue,
candidateHeight));
}
- else
- {
- compositionRect.iTl = Rect().iTl;
- // move the composition area rect with gap
+ else
+ {
+ compositionRect.iTl = Rect().iTl;
+ // move the composition area rect with gap
compositionRect.iTl.iX += GapValue;
compositionRect.SetSize(
TSize( btnWidth * 3 + iCellAidGap - GapValue * 2, candidateHeight ));
- }
+ }
iCompositionField->SetReady(ETrue);
iCompositionField->Hide(EFalse);
iCompositionField->SizeChanged(compositionRect);
@@ -1057,7 +1057,7 @@
}
else
{
- // move the gap
+ // move the gap
compositionRect.iTl.iX -= GapValue;
iVkbBoardLeftTop = TPoint(compositionRect.iTl.iX, compositionRect.iBr.iY);
}
@@ -1080,21 +1080,18 @@
vkbCtrl->SetTextFormat( iLafMgr->KeyTextLayout() ); //Read laf
TInt tempHeightForFSQ = btnHeight;
- // Modify begin
//if (UiLayout()->PenInputType() == EPluginInputModeFSQ )
// {
// tempHeightForFSQ = btnHeight + 3;
// }
TPoint rangeBarRefPoint = TPoint(vkbRect.iTl.iX, vkbRect.iBr.iY);
- // Modify begin
//rangeBarRefPoint.iY += yAxisOffset;
if (range != ERangeNative)
{
TRect shiftRect;
shiftRect.iTl = TPoint(Rect().iTl.iX, vkbRect.iBr.iY);
- // Modify begin
//shiftRect.iTl.iY += yAxisOffset;
shiftRect.SetSize(TSize(btnWidth, tempHeightForFSQ));
AknPenImageUtils::CalculateGraphicRect( shiftRect, innerRect );
--- a/textinput/peninputvkbcn/inc/peninputvkbcnlafdatamgr.h Fri Sep 17 17:26:50 2010 +0100
+++ b/textinput/peninputvkbcn/inc/peninputvkbcnlafdatamgr.h Fri Oct 22 15:38:27 2010 +0100
@@ -171,8 +171,8 @@
* LAF data for tooltip box
*/
TPeninputCnTooltipBoxLayoutData iTooltipBox;
-
- /*
+
+ /*
* LAF data for composition area
*/
TRect iCompositionRect;
@@ -201,8 +201,8 @@
const TPeninputCnKeyLayoutData& KeypadLayoutData() const ;
const TPeninputCnRangeBarLayoutData& RangbarLayoutData() const;
const CPeninputCnQwtLayoutDataInfo& QwtLayoutData() const;
-
- /*
+
+ /*
* Get layout rect for composition area
*
* @param none
@@ -445,15 +445,15 @@
* @return The layout data for tooltip box
*/
const TPeninputCnTooltipBoxLayoutData& TooltipBoxLayoutData() const;
-
- /*
+
+ /*
* Get layout rect for composition area
*
* @param none
* @return rect of composition area
*/
const TRect& compositionLayoutData() const;
-
+
protected:
/**
--- a/textinput/peninputvkbcn/src/peninputvkbcnlafdatamgr.cpp Fri Sep 17 17:26:50 2010 +0100
+++ b/textinput/peninputvkbcn/src/peninputvkbcnlafdatamgr.cpp Fri Oct 22 15:38:27 2010 +0100
@@ -233,7 +233,7 @@
ASSERT(iLafData);
return iLafData->KeypadLayoutData().iKaypadRect;
}
-
+
// ---------------------------------------------------------------------------
// CPeninputCnGenericVkbLafMgr::compositionLayoutData
// (other items were commented in a header)
@@ -243,8 +243,8 @@
{
ASSERT(iLafData);
return iLafData->compositionLayoutData();
- }
-
+ }
+
// ---------------------------------------------------------------------------
// CPeninputCnGenericVkbLafMgr::ICFRect
// (other items were commented in a header)
@@ -698,7 +698,7 @@
ASSERT( IsValid());
return iLayoutDataInfo[iLayoutType]->iCompositionRect;
}
-
+
// ---------------------------------------------------------------------------
// CPeninputLafDataCommon::RangbarLayoutData(TInt aRangbarID)
// (other items were commented in a header)
@@ -876,13 +876,13 @@
aDataInfo.iRightButton.iRect = cellBtnRect.Rect();
aDataInfo.iRightButton.iInnerRect = cellBtnRect.Rect();
}
-
- // Read composition area laf data
+
+ // Read composition area laf data
TAknWindowLineLayout compositionWindowLineLayout =
AknLayoutScalable_Avkon::vkb2_top_candi_pane(0).LayoutLine();
TAknLayoutRect compositionLayoutRect;
compositionLayoutRect.LayoutRect( toppaneRect.Rect(), compositionWindowLineLayout );
- aDataInfo.iCompositionRect = compositionLayoutRect.Rect();
+ aDataInfo.iCompositionRect = compositionLayoutRect.Rect();
// bottom pane
const TInt VKBParamBottom2Range[] = { 6, 8, 8 };
--- a/textinput/peninputvkbkr/src/PeninputVkbKrWindow.cpp Fri Sep 17 17:26:50 2010 +0100
+++ b/textinput/peninputvkbkr/src/PeninputVkbKrWindow.cpp Fri Oct 22 15:38:27 2010 +0100
@@ -490,13 +490,6 @@
else
{
iVkbCtrl->SetIrregularKeyBoard(EFalse);
-
-
- //Add Skin id to Vkb Control for 9 piece picture.
- iVkbCtrl->SetKeySkinId( EKeyBmpNormal, KAknsIIDQsnFrKeypadButtonFrNormal );
- iVkbCtrl->SetKeySkinId( EKeyBmpHighlight, KAknsIIDQsnFrKeypadButtonFrPressed );
- iVkbCtrl->SetKeySkinId( EKeyBmpDim, KAknsIIDQsnFrKeypadButtonFrInactive );
-
iVkbLayout->SetNonIrregularResourceId(R_AKN_FEP_VKB_NONIRREGULAR_BITMAP);
iVkbLayout->ConstructFromNonIrregularResourceL();
}
@@ -628,7 +621,8 @@
x = 0;
y = 0;
}
-
+
+
for ( TInt i = 0; i < count; i++ )
{
controlID = controlList[i]->ControlID();
@@ -693,9 +687,7 @@
TRAP_IGNORE(SetRangeBarSizeL(x, y));
}
}
- }
-
- RootControl()->Draw();
+ }
}
void CPeninputVkbKrWindow::DoCaseChange( TInt aNewCase )
@@ -1203,6 +1195,7 @@
{
iTableUpButton->Hide(EFalse);
iTableUpButton->SizeChanged( exRect, inRect, ETrue );
+ iTableUpButton->Draw();
}
iLafMgr->GetButtonRect(
@@ -1265,6 +1258,7 @@
{
iTablePageLabel->Hide(EFalse);
iTablePageLabel->SizeChanged( exRect, inRect, ETrue );
+ iTablePageLabel->Draw();
}
iLafMgr->GetButtonRect(
@@ -1281,6 +1275,7 @@
{
iTableDownButton->Hide(EFalse);
iTableDownButton->SizeChanged( exRect, inRect, ETrue );
+ iTableDownButton->Draw();
}
TRect updateArea;
@@ -1476,7 +1471,7 @@
buf.Format(_L("%d/%d"),SymbolTableUtil::FindIndex(vkbLayoutToUpdate)+1,KMaxSymbolTable);
//iTablePageLabel->SetCaptionL(buf);
iTablePageLabel->SetTextL(buf);
- RootControl()->Draw();
+ iTablePageLabel->Draw();
}
}
--- a/textinput/ptienginev2/src/PtiEngineImpl.cpp Fri Sep 17 17:26:50 2010 +0100
+++ b/textinput/ptienginev2/src/PtiEngineImpl.cpp Fri Oct 22 15:38:27 2010 +0100
@@ -768,7 +768,6 @@
return KErrNoSuitableCore;
}
-
// ---------------------------------------------------------------------------
// Group Unicode is that kind of mapping which one visible character with more
// than one unicode submitted.
@@ -790,7 +789,7 @@
{
aResult.Append(aKey);
}
- }
+ }
// ---------------------------------------------------------------------------
@@ -882,7 +881,7 @@
IsGroupUnicodeExist(aKey, mappings, 0);
if(mappings.Length() == 1)
{
- Core()->AppendKeyPress(aKey);
+ Core()->AppendKeyPress(aKey);
}
else
{
@@ -1156,7 +1155,7 @@
TPtrC CPtiEngineImpl::RedirectKeyForChineseQwerty(TPtiKey aKey, TBool& aRedirected)
{
aRedirected = EFalse;
- TPtiKeyboardType kbdType = KeyboardType();
+ TPtiKeyboardType kbdType = KeyboardType();
TBuf<KMaxName> data;
TInt key;
--- a/textinput/ptienginev2/src/PtiKeyMappings.cpp Fri Sep 17 17:26:50 2010 +0100
+++ b/textinput/ptienginev2/src/PtiKeyMappings.cpp Fri Oct 22 15:38:27 2010 +0100
@@ -19,7 +19,6 @@
#include "PtiKeyMappings.h"
#include <PtiKeyMapData.h>
-
// CONSTANTS
#ifdef _DEBUG
_LIT(KPtiNoKeyMapDataPanic, "PtiEngine: No ITU-T keymap data set.");