394 TBool IsEmotionEnabled() const; |
394 TBool IsEmotionEnabled() const; |
395 TBool IsShowingEmotion() const; |
395 TBool IsShowingEmotion() const; |
396 void SwitchEmotionVisibilityL(); |
396 void SwitchEmotionVisibilityL(); |
397 TBool NeedEmotionSwitchIcon() const; |
397 TBool NeedEmotionSwitchIcon() const; |
398 HBufC* ReadEmotionHBufCL(); |
398 HBufC* ReadEmotionHBufCL(); |
399 void LoadEmotionTumbnails(const TDesC& aChars); |
399 void LoadEmotionTumbnails(const TDesC& aText); |
|
400 void PlayAnimationL(const TDesC& aText); |
|
401 void StopAnimation(const TDesC& aText); |
400 void SetEmotionSize(const TSize& aSize); |
402 void SetEmotionSize(const TSize& aSize); |
401 TBool IsEmotionChar(TChar aChar); |
403 TBool IsEmotionChar(TChar aChar); |
402 TChar SwitchToSctChar(); |
404 TChar SwitchToSctChar(); |
403 TChar SwitchToEmotionChar(); |
405 TChar SwitchToEmotionChar(); |
404 CAknSmileyIcon* EmotionIcon(TChar aChar); |
406 CAknSmileyIcon* EmotionIcon(TChar aChar); |
435 // Whether or not kinetic scrolling is enabled in the device. |
437 // Whether or not kinetic scrolling is enabled in the device. |
436 // Focus scrolling is disabled if kinetic scrolling is used. |
438 // Focus scrolling is disabled if kinetic scrolling is used. |
437 TBool iKineticScrolling; |
439 TBool iKineticScrolling; |
438 // Indicates whether menu sct is highlighted or not. |
440 // Indicates whether menu sct is highlighted or not. |
439 TBool iMenuSctHighlighted; |
441 TBool iMenuSctHighlighted; |
|
442 |
|
443 // flag for focus status of char map dialog |
|
444 TBool iCharMapFocusGained; |
440 |
445 |
441 public: // for Emotion |
446 public: // for Emotion |
442 HBufC* iCharsSmiley; |
447 HBufC* iCharsSmiley; |
443 CSmileyModel* iSmileyModel; |
448 CSmileyModel* iSmileyModel; |
444 TChar iLastFocusedSmileyChar; |
449 TChar iLastFocusedSmileyChar; |
1069 if ( !emotionEnabled ) |
1074 if ( !emotionEnabled ) |
1070 { |
1075 { |
1071 // start complex dynamic logic to locate title rect when emotion is unable |
1076 // start complex dynamic logic to locate title rect when emotion is unable |
1072 TInt orientation = mirrored ? -1 : 1; |
1077 TInt orientation = mirrored ? -1 : 1; |
1073 TInt newLeft = titleRect.iTl.iX + orientation*rect.Width()/2; |
1078 TInt newLeft = titleRect.iTl.iX + orientation*rect.Width()/2; |
1074 TPoint titleTL( newLeft, titleRect.iTl.iY ); |
1079 TPoint titlePoint( newLeft, titleRect.iTl.iY ); |
1075 titleRect.SetRect( titleTL, titleRect.Size() ); |
1080 titleRect.SetRect( titlePoint, titleRect.Size() ); |
1076 } |
1081 } |
1077 AknLayoutUtils::LayoutLabel(iTitle, titleRect, textlayout.LayoutLine()); |
1082 AknLayoutUtils::LayoutLabel(iTitle, titleRect, textlayout.LayoutLine()); |
1078 |
1083 |
1079 // Page text color |
1084 // Page text color |
1080 TAknLayoutText textLayout; |
1085 TAknLayoutText textLayout; |
1494 } |
1499 } |
1495 |
1500 |
1496 return charsSmiley; |
1501 return charsSmiley; |
1497 } |
1502 } |
1498 |
1503 |
1499 void CAknCharMapExtension::LoadEmotionTumbnails(const TDesC& aChars) |
1504 void CAknCharMapExtension::LoadEmotionTumbnails(const TDesC& aText) |
1500 { |
1505 { |
1501 //If emotion tumbbails can't be load, |
1506 //If emotion tumbbails can't be load, |
1502 // no emotion tumbnail will be dispalyed. |
1507 // no emotion tumbnail will be dispalyed. |
1503 TRAP_IGNORE( iSmileyModel->LoadStillImagesL(aChars) ); |
1508 TRAP_IGNORE( iSmileyModel->LoadStillImagesL(aText) ); |
|
1509 } |
|
1510 |
|
1511 const TInt KAnimationRepeat = 30; |
|
1512 const TInt KAnimationDelay = 150*1000; |
|
1513 |
|
1514 void CAknCharMapExtension::PlayAnimationL(const TDesC& aText) |
|
1515 { |
|
1516 iSmileyModel->PlayAnimationL(aText, KAnimationRepeat, KAnimationDelay); |
|
1517 } |
|
1518 |
|
1519 void CAknCharMapExtension::StopAnimation(const TDesC& aText) |
|
1520 { |
|
1521 iSmileyModel->StopAnimation(aText); |
1504 } |
1522 } |
1505 |
1523 |
1506 void CAknCharMapExtension::SetEmotionSize(const TSize& aSize) |
1524 void CAknCharMapExtension::SetEmotionSize(const TSize& aSize) |
1507 { |
1525 { |
1508 TInt unit = Min(aSize.iWidth, aSize.iHeight); |
1526 TInt unit = Min(aSize.iWidth, aSize.iHeight); |
2098 else |
2116 else |
2099 { |
2117 { |
2100 iShowCasesRef = &iSpecialCharCases; |
2118 iShowCasesRef = &iSpecialCharCases; |
2101 iShowPagesRef = &iSpecialCharPages; |
2119 iShowPagesRef = &iSpecialCharPages; |
2102 |
2120 |
2103 // default |
|
2104 iSpecialCharCase = EAknSCTLowerCase; |
|
2105 iChars = iCharsBufferLower; |
|
2106 |
|
2107 if(iExtension->iCharsSmiley && iExtension->IsShowingEmotion()) |
2121 if(iExtension->iCharsSmiley && iExtension->IsShowingEmotion()) |
2108 { |
2122 { |
2109 iChars = iExtension->iCharsSmiley; |
2123 iChars = iExtension->iCharsSmiley; |
2110 } |
2124 } |
2111 else if (iCharsBufferUpper && iSpecialCharCase==EAknSCTUpperCase) |
2125 else if (iCharsBufferUpper && iSpecialCharCase==EAknSCTUpperCase) |
2125 iChars = iCharsBufferHalf; |
2139 iChars = iCharsBufferHalf; |
2126 } |
2140 } |
2127 else if (iExtension->iCharsQwerty && iSpecialCharCase==EAknSCTQwerty) |
2141 else if (iExtension->iCharsQwerty && iSpecialCharCase==EAknSCTQwerty) |
2128 { |
2142 { |
2129 iChars = iExtension->iCharsQwerty; |
2143 iChars = iExtension->iCharsQwerty; |
|
2144 } |
|
2145 else |
|
2146 { |
|
2147 iSpecialCharCase = EAknSCTLowerCase; |
|
2148 iChars = iCharsBufferLower; |
2130 } |
2149 } |
2131 } |
2150 } |
2132 |
2151 |
2133 // calculate page count for all pages |
2152 // calculate page count for all pages |
2134 iSpecialCharPages.Reset(); // reset the current page count for different charsets |
2153 iSpecialCharPages.Reset(); // reset the current page count for different charsets |
2171 iSBFrame->SetScrollBarVisibilityL(CEikScrollBarFrame::EOff,CEikScrollBarFrame::EAuto); |
2190 iSBFrame->SetScrollBarVisibilityL(CEikScrollBarFrame::EOff,CEikScrollBarFrame::EAuto); |
2172 iSBFrame->VerticalScrollBar()->SetMopParent(iExtension); |
2191 iSBFrame->VerticalScrollBar()->SetMopParent(iExtension); |
2173 UpdateScrollIndicatorL(); |
2192 UpdateScrollIndicatorL(); |
2174 } |
2193 } |
2175 |
2194 |
2176 iExtension->LoadEmotionTumbnails(*iChars); |
2195 Extension()->LoadEmotionTumbnails(*iChars); |
2177 |
|
2178 SetSmileyAnimationActivityInCurrentPageL(ETrue); |
|
2179 |
2196 |
2180 } |
2197 } |
2181 |
2198 |
2182 EXPORT_C void CAknCharMap::SetBuffer(TDes& aSpecialChars) |
2199 EXPORT_C void CAknCharMap::SetBuffer(TDes& aSpecialChars) |
2183 { |
2200 { |
2362 code == EKeyLeftArrow || code == EKeyRightArrow || |
2379 code == EKeyLeftArrow || code == EKeyRightArrow || |
2363 code == EKeyEnter ) |
2380 code == EKeyEnter ) |
2364 { |
2381 { |
2365 iExtension->iKeyBrdEvent = ETrue; |
2382 iExtension->iKeyBrdEvent = ETrue; |
2366 iExtension->iHighlightVisible = ETrue; |
2383 iExtension->iHighlightVisible = ETrue; |
2367 iCursorPos = TPoint( 0, 0 ); |
2384 if ( LengthOfRecentChar() == 0 && CurrentPage() == 1 ) |
|
2385 { |
|
2386 iCursorPos = TPoint( 0, 1 ); |
|
2387 } |
|
2388 else |
|
2389 { |
|
2390 iCursorPos = TPoint( 0, 0 ); |
|
2391 } |
2368 DrawCursor(); |
2392 DrawCursor(); |
2369 return EKeyWasConsumed; |
2393 return EKeyWasConsumed; |
2370 } |
2394 } |
2371 } |
2395 } |
2372 |
2396 |
2762 if (recentWasSetBeforeSwitch) AppendRecentCharL(); |
2786 if (recentWasSetBeforeSwitch) AppendRecentCharL(); |
2763 |
2787 |
2764 // Sets the character case because the buffer content may have changed. |
2788 // Sets the character case because the buffer content may have changed. |
2765 SetCharacterCaseL(iSpecialCharCase); |
2789 SetCharacterCaseL(iSpecialCharCase); |
2766 |
2790 |
2767 SetSmileyAnimationActivityInCurrentPageL(ETrue); |
|
2768 |
|
2769 TInt cursorIndexAfterSwitch; |
2791 TInt cursorIndexAfterSwitch; |
2770 if ( !iExtension->iKeyBrdEvent ) |
2792 if ( !iExtension->iKeyBrdEvent ) |
2771 { |
2793 { |
2772 cursorIndexAfterSwitch = cursorIndexBeforeSwitch; |
2794 cursorIndexAfterSwitch = cursorIndexBeforeSwitch; |
2773 } |
2795 } |
2787 } |
2809 } |
2788 } |
2810 } |
2789 // the new first row is the top row on the page where the new focus is. |
2811 // the new first row is the top row on the page where the new focus is. |
2790 TInt pageVolume = iMaxColumns * iExtension->iMaxVisibleRows; |
2812 TInt pageVolume = iMaxColumns * iExtension->iMaxVisibleRows; |
2791 iFirstVisibleRow = (cursorIndexAfterSwitch / pageVolume * pageVolume) / iMaxColumns; |
2813 iFirstVisibleRow = (cursorIndexAfterSwitch / pageVolume * pageVolume) / iMaxColumns; |
|
2814 |
|
2815 SetSmileyAnimationActivityInCurrentPageL(ETrue); |
2792 |
2816 |
2793 // the cursor positions are relative to current page |
2817 // the cursor positions are relative to current page |
2794 TInt cursorIndexAfterSwitchInPage = cursorIndexAfterSwitch - (iMaxColumns * iFirstVisibleRow); |
2818 TInt cursorIndexAfterSwitchInPage = cursorIndexAfterSwitch - (iMaxColumns * iFirstVisibleRow); |
2795 iCursorPos.iX = cursorIndexAfterSwitchInPage % iMaxColumns; |
2819 iCursorPos.iX = cursorIndexAfterSwitchInPage % iMaxColumns; |
2796 iCursorPos.iY = cursorIndexAfterSwitchInPage / iMaxColumns; |
2820 iCursorPos.iY = cursorIndexAfterSwitchInPage / iMaxColumns; |
2861 iOffscreenBgDrawn = EFalse; |
2885 iOffscreenBgDrawn = EFalse; |
2862 } |
2886 } |
2863 |
2887 |
2864 else if(aType == KEikMessageFadeAllWindows) // focus gained // KEikMessageWindowsFadeChange |
2888 else if(aType == KEikMessageFadeAllWindows) // focus gained // KEikMessageWindowsFadeChange |
2865 { |
2889 { |
|
2890 Extension()->iCharMapFocusGained = ETrue; |
2866 SetSmileyAnimationActivityInCurrentPageL(ETrue); |
2891 SetSmileyAnimationActivityInCurrentPageL(ETrue); |
2867 } |
2892 } |
2868 |
2893 |
2869 else if(aType == KAknMessageFocusLost) // focus lost |
2894 else if(aType == KAknMessageFocusLost) // focus lost |
2870 { |
2895 { |
|
2896 Extension()->iCharMapFocusGained = EFalse; |
2871 SetSmileyAnimationActivityInCurrentPageL(EFalse); |
2897 SetSmileyAnimationActivityInCurrentPageL(EFalse); |
2872 |
2898 |
2873 if ( iExtension->iHighlightVisible ) |
2899 if ( iExtension->iHighlightVisible ) |
2874 { |
2900 { |
2875 iExtension->iHighlightVisible = EFalse; |
2901 iExtension->iHighlightVisible = EFalse; |
3442 cc = AknsDrawUtils::ControlContext( this ); |
3468 cc = AknsDrawUtils::ControlContext( this ); |
3443 } |
3469 } |
3444 |
3470 |
3445 TPoint pos = iGridTopLeft; |
3471 TPoint pos = iGridTopLeft; |
3446 TSize size(iGridItemWidth*iMaxColumns+1, iGridItemHeight); |
3472 TSize size(iGridItemWidth*iMaxColumns+1, iGridItemHeight); |
3447 if(iIsMirrored) |
3473 |
3448 { |
|
3449 pos.iX += iGridItemWidth - size.iWidth; |
|
3450 } |
|
3451 // eliminate the overlap area between menu sct and the first menu item. |
3474 // eliminate the overlap area between menu sct and the first menu item. |
3452 if ( Extension()->iMenuSct ) |
3475 if ( Extension()->iMenuSct ) |
3453 { |
3476 { |
3454 size.iHeight--; |
3477 // provide a dirty fix for Menu SCT, since Layout data is not suitable for this |
|
3478 size = TSize( Rect().Width()- 1, iGridItemHeight - 1 ); |
|
3479 } |
|
3480 if(iIsMirrored) |
|
3481 { |
|
3482 pos.iX += iGridItemWidth - size.iWidth; |
3455 } |
3483 } |
3456 |
3484 |
3457 AknsDrawUtils::Background(skin, cc, this, aGc, TRect(pos,size)); |
3485 AknsDrawUtils::Background(skin, cc, this, aGc, TRect(pos,size)); |
3458 |
3486 |
3459 SetRecentCharFrameStyle(aGc); |
3487 SetRecentCharFrameStyle(aGc); |
4849 |
4877 |
4850 TAknLayoutRect firstCellLayRect; |
4878 TAknLayoutRect firstCellLayRect; |
4851 firstCellLayRect.LayoutRect(gridRect, |
4879 firstCellLayRect.LayoutRect(gridRect, |
4852 AknLayoutScalable_Avkon::cell_graphic_popup_pane_cp2(0,0,0)); |
4880 AknLayoutScalable_Avkon::cell_graphic_popup_pane_cp2(0,0,0)); |
4853 |
4881 |
4854 TRect firstCellRect; |
|
4855 if ( Extension()->iMenuSct ) |
|
4856 { |
|
4857 firstCellRect = TRect( TPoint(0, 0), |
|
4858 TSize( firstCellLayRect.Rect().Width(), Rect().Height() ) ); |
|
4859 } |
|
4860 else |
|
4861 { |
|
4862 firstCellRect = firstCellLayRect.Rect(); |
|
4863 } |
|
4864 |
|
4865 TAknLayoutRect rightCellLayRect; |
4882 TAknLayoutRect rightCellLayRect; |
4866 rightCellLayRect.LayoutRect(gridRect, |
4883 rightCellLayRect.LayoutRect(gridRect, |
4867 AknLayoutScalable_Avkon::cell_graphic_popup_pane_cp2(0,1,0)); |
4884 AknLayoutScalable_Avkon::cell_graphic_popup_pane_cp2(0,1,0)); |
|
4885 TRect firstCellRect; |
|
4886 |
|
4887 // Cell width. |
|
4888 iGridItemWidth = |
|
4889 rightCellLayRect.Rect().iTl.iX - firstCellLayRect.Rect().iTl.iX; |
|
4890 if (iGridItemWidth < 0) |
|
4891 { |
|
4892 iGridItemWidth = -iGridItemWidth; |
|
4893 } |
|
4894 |
|
4895 if ( Extension()->iMenuSct ) |
|
4896 { |
|
4897 firstCellRect = TRect( TPoint(0, 0), |
|
4898 TSize( iGridItemWidth, Rect().Height() ) ); |
|
4899 } |
|
4900 else |
|
4901 { |
|
4902 firstCellRect = firstCellLayRect.Rect(); |
|
4903 } |
|
4904 |
4868 |
4905 |
4869 TInt firstVisibleIndex = iFirstVisibleRow * iMaxColumns; |
4906 TInt firstVisibleIndex = iFirstVisibleRow * iMaxColumns; |
4870 // Max columns. |
4907 // Max columns. |
4871 iMaxColumns = gridRect.Width() / firstCellRect.Width(); |
4908 iMaxColumns = gridRect.Width() / firstCellRect.Width(); |
4872 iFirstVisibleRow = firstVisibleIndex / iMaxColumns; |
4909 iFirstVisibleRow = firstVisibleIndex / iMaxColumns; |
4873 |
4910 |
4874 // Max visible rows. |
4911 // Max visible rows. |
4875 iExtension->iMaxVisibleRows = gridRect.Height() / firstCellRect.Height(); |
4912 iExtension->iMaxVisibleRows = gridRect.Height() / firstCellRect.Height(); |
4876 |
|
4877 // Cell width. |
|
4878 iGridItemWidth = |
|
4879 rightCellLayRect.Rect().iTl.iX - firstCellLayRect.Rect().iTl.iX; |
|
4880 if (iGridItemWidth < 0) |
|
4881 { |
|
4882 iGridItemWidth = -iGridItemWidth; |
|
4883 } |
|
4884 |
4913 |
4885 // Cell height. |
4914 // Cell height. |
4886 if ( Extension()->iMenuSct ) |
4915 if ( Extension()->iMenuSct ) |
4887 { |
4916 { |
4888 iGridItemHeight = firstCellRect.Height(); |
4917 iGridItemHeight = firstCellRect.Height(); |
5651 TInt resourceId = R_AVKON_MENU_SCT_ROW_DEFAULT_CONTENTS; |
5680 TInt resourceId = R_AVKON_MENU_SCT_ROW_DEFAULT_CONTENTS; |
5652 if (FeatureManager::FeatureSupported(KFeatureIdChinese)) |
5681 if (FeatureManager::FeatureSupported(KFeatureIdChinese)) |
5653 { |
5682 { |
5654 resourceId = R_AVKON_MENU_SCT_ROW_DEFAULT_CONTENTS_CHINESE; |
5683 resourceId = R_AVKON_MENU_SCT_ROW_DEFAULT_CONTENTS_CHINESE; |
5655 } |
5684 } |
|
5685 else if (FeatureManager::FeatureSupported(KFeatureIdKorean)) |
|
5686 { |
|
5687 // Added korea character support |
|
5688 resourceId = R_AVKON_MENU_SCT_ROW_DEFAULT_CONTENTS_KOREAN; |
|
5689 } |
5656 |
5690 |
5657 CCoeEnv::Static()->CreateResourceReaderLC( reader, resourceId ); |
5691 CCoeEnv::Static()->CreateResourceReaderLC( reader, resourceId ); |
5658 ConstructFromResourceL( reader ); |
5692 ConstructFromResourceL( reader ); |
5659 CleanupStack::PopAndDestroy(); |
5693 CleanupStack::PopAndDestroy(); |
5660 } |
5694 } |
5884 } |
5918 } |
5885 else |
5919 else |
5886 { |
5920 { |
5887 iShowCasesRef = &iSpecialCharCases; |
5921 iShowCasesRef = &iSpecialCharCases; |
5888 iShowPagesRef = &iSpecialCharPages; |
5922 iShowPagesRef = &iSpecialCharPages; |
5889 iChars = iCharsBufferLower; |
5923 |
5890 if (iCharsBufferUpper && iSpecialCharCase==EAknSCTUpperCase) |
5924 if (iCharsBufferUpper && iSpecialCharCase==EAknSCTUpperCase) |
|
5925 { |
5891 iChars = iCharsBufferUpper; |
5926 iChars = iCharsBufferUpper; |
|
5927 } |
5892 else if (iCharsBufferNumeric && iSpecialCharCase==EAknSCTNumeric) |
5928 else if (iCharsBufferNumeric && iSpecialCharCase==EAknSCTNumeric) |
|
5929 { |
5893 iChars = iCharsBufferNumeric; |
5930 iChars = iCharsBufferNumeric; |
|
5931 } |
5894 else if (iCharsBufferFull && iSpecialCharCase==EAknSCTFullCase) |
5932 else if (iCharsBufferFull && iSpecialCharCase==EAknSCTFullCase) |
|
5933 { |
5895 iChars = iCharsBufferFull; |
5934 iChars = iCharsBufferFull; |
|
5935 } |
5896 else if (iCharsBufferHalf && iSpecialCharCase==EAknSCTHalfCase) |
5936 else if (iCharsBufferHalf && iSpecialCharCase==EAknSCTHalfCase) |
|
5937 { |
5897 iChars = iCharsBufferHalf; |
5938 iChars = iCharsBufferHalf; |
|
5939 } |
5898 else if (iExtension->iCharsQwerty && iSpecialCharCase==EAknSCTQwerty) |
5940 else if (iExtension->iCharsQwerty && iSpecialCharCase==EAknSCTQwerty) |
|
5941 { |
5899 iChars = iExtension->iCharsQwerty; |
5942 iChars = iExtension->iCharsQwerty; |
5900 |
5943 } |
5901 if(iChars == iCharsBufferLower) |
5944 else |
5902 { |
5945 { |
|
5946 // default |
5903 iSpecialCharCase = EAknSCTLowerCase; |
5947 iSpecialCharCase = EAknSCTLowerCase; |
|
5948 iChars = iCharsBufferLower; |
5904 } |
5949 } |
5905 } |
5950 } |
5906 // mark that iChars doesn't point to HBufC |
5951 // mark that iChars doesn't point to HBufC |
5907 iExtension->iFlags &= (~EAknCharMapCharsAllocated); |
5952 iExtension->iFlags &= (~EAknCharMapCharsAllocated); |
5908 } |
5953 } |
5955 iCursorPos = TPoint(0, 0); |
6000 iCursorPos = TPoint(0, 0); |
5956 } |
6001 } |
5957 iExtension->iFlags |= EAknCharMapCharsAllocated; // mark that iChars points to HBufC |
6002 iExtension->iFlags |= EAknCharMapCharsAllocated; // mark that iChars points to HBufC |
5958 } |
6003 } |
5959 |
6004 |
5960 iExtension->LoadEmotionTumbnails(*iChars); |
6005 Extension()->LoadEmotionTumbnails(*iChars); |
|
6006 |
|
6007 // control will never get focus event while it is in EditMenu mode |
|
6008 Extension()->iCharMapFocusGained = ETrue; |
5961 |
6009 |
5962 // The "PlayAnimationL" in "SetSmileyAnimationActivityInCurrentPageL" |
6010 // The "PlayAnimationL" in "SetSmileyAnimationActivityInCurrentPageL" |
5963 // will leave. If we ignore it, just no animation is played. |
6011 // will leave. If we ignore it, just no animation is played. |
5964 TRAP_IGNORE( SetSmileyAnimationActivityInCurrentPageL(ETrue) ); |
6012 TRAP_IGNORE( SetSmileyAnimationActivityInCurrentPageL(ETrue) ); |
5965 } |
6013 } |
6212 return EFalse; |
6260 return EFalse; |
6213 } |
6261 } |
6214 |
6262 |
6215 TBool CAknCharMap::IsJapaneseSctUi() const |
6263 TBool CAknCharMap::IsJapaneseSctUi() const |
6216 { |
6264 { |
|
6265 //Japanese feature for SCT will not be supported since TB9.2 PS2, |
|
6266 //so it always return EFalse. |
6217 return EFalse; |
6267 return EFalse; |
6218 } |
6268 } |
6219 |
6269 |
|
6270 TBool CAknCharMap::IsKoreanSctUi() const |
|
6271 { |
|
6272 return FeatureManager::FeatureSupported( KFeatureIdKorean ); |
|
6273 } |
6220 // ----------------------------------------------------------------------------- |
6274 // ----------------------------------------------------------------------------- |
6221 // CAknCharMap::TitleWithSelectingSpecialChar() |
6275 // CAknCharMap::TitleWithSelectingSpecialChar() |
6222 // Return the title string with the selecting special characters |
6276 // Return the title string with the selecting special characters |
6223 // ----------------------------------------------------------------------------- |
6277 // ----------------------------------------------------------------------------- |
6224 // |
6278 // |
6706 DrawCell(index, highlighted); |
6760 DrawCell(index, highlighted); |
6707 } |
6761 } |
6708 } |
6762 } |
6709 } |
6763 } |
6710 |
6764 |
6711 const TInt KAnimationRepeat = 30; |
|
6712 const TInt KAnimationDelay = 1000*1000; |
|
6713 |
|
6714 void CAknCharMap::SetSmileyAnimationActivityInCurrentPageL(TBool aIsActive) |
6765 void CAknCharMap::SetSmileyAnimationActivityInCurrentPageL(TBool aIsActive) |
6715 { |
6766 { |
6716 TInt begin = iFirstVisibleRow * iMaxColumns; |
6767 TInt pos = iFirstVisibleRow * iMaxColumns; |
6717 TInt end = iExtension->iMaxVisibleRows * iMaxColumns + begin; |
6768 TInt maxLength = iChars->Length() - pos; |
6718 if( end > iChars->Length() ) |
6769 TInt length = iExtension->iMaxVisibleRows * iMaxColumns; |
6719 { |
6770 if(length > maxLength) length = maxLength; |
6720 end = iChars->Length(); |
6771 |
6721 } |
6772 const TPtrC textInCurrentPage = iChars->Mid(pos, length); |
6722 |
6773 |
6723 for( TInt i(begin); i<end; i++ ) |
6774 if(Extension()->iCharMapFocusGained && aIsActive) |
6724 { |
6775 { |
6725 TChar code = (*iChars)[i]; |
6776 Extension()->PlayAnimationL(textInCurrentPage); |
6726 CAknSmileyIcon* icon = iExtension->EmotionIcon(code); |
6777 } |
6727 if( !icon ) |
6778 else |
6728 { |
6779 { |
6729 continue; |
6780 Extension()->StopAnimation(textInCurrentPage); |
6730 } |
|
6731 |
|
6732 if( ( aIsActive ) && |
|
6733 ( Extension()->IsShowingEmotion() || Extension()->iMenuSctHighlighted) |
|
6734 ) |
|
6735 { |
|
6736 icon->PlayAnimationL( KAnimationRepeat, KAnimationDelay ); |
|
6737 } |
|
6738 else |
|
6739 { |
|
6740 icon->StopAnimation(); |
|
6741 } |
|
6742 } |
6781 } |
6743 } |
6782 } |
6744 |
6783 |
6745 void CAknCharMap::GetFocusSctName(TChar& aChar, TDes& aName) const |
6784 void CAknCharMap::GetFocusSctName(TChar& aChar, TDes& aName) const |
6746 { |
6785 { |