uifw/AvKon/src/AknSctDialog.cpp
branchRCL_3
changeset 19 aecbbf00d063
parent 18 fcdfafb36fe7
child 20 d48ab3b357f1
equal deleted inserted replaced
18:fcdfafb36fe7 19:aecbbf00d063
    52 #include <akntransitionutils.h>
    52 #include <akntransitionutils.h>
    53 #endif
    53 #endif
    54 
    54 
    55 #include <AknTasHook.h>
    55 #include <AknTasHook.h>
    56 #include "aknsctfocushandler.h"
    56 #include "aknsctfocushandler.h"
    57 
       
    58 #include <eikdialogext.h>
       
    59 
    57 
    60 //
    58 //
    61 // class CAknCharMapDialog
    59 // class CAknCharMapDialog
    62 //
    60 //
    63 
    61 
   432 
   430 
   433     // Selection key / select softkey adds a character only if 5-key was not used
   431     // Selection key / select softkey adds a character only if 5-key was not used
   434     // to select multiple characters before.
   432     // to select multiple characters before.
   435     if (aButtonId == EAknSoftkeyOk || aButtonId == EAknSoftkeySelect || aButtonId == EAknSoftkeyExit)
   433     if (aButtonId == EAknSoftkeyOk || aButtonId == EAknSoftkeySelect || aButtonId == EAknSoftkeyExit)
   436         {
   434         {
   437         // In Korean UI, SCT isn't closed by pressing "Select" softkey,
   435         // In Japanese UI, SCT isn't closed by pressing "Select" softkey,
   438         // but SCT is closed by pressing "Back"(button id is EAknSoftkeyClose).
   436         // but SCT is closed by pressing "Back"(button id is EAknSoftkeyClose).
   439         // Japanese feature for SCT will not be supported since TB9.2 PS2,
       
   440         // so remove the code for Japanese SCT.
       
   441         MAknSctFocusHandler* handler = charmapControl->FocusHandler();
   437         MAknSctFocusHandler* handler = charmapControl->FocusHandler();
   442         if ( charmapControl->IsKoreanSctUi() &&
   438         if (charmapControl->IsJapaneseSctUi() &&
   443             aButtonId != EAknSoftkeyExit &&
   439             aButtonId != EAknSoftkeyExit &&
   444             handler->FocusedControl() == charmapControl)
   440             handler->FocusedControl() == charmapControl)
   445             {
   441             {
   446             TKeyEvent key;
   442             TKeyEvent key;
   447             key.iCode=EKeySpace;
   443             key.iCode=EKeySpace;
   533         }
   529         }
   534 
   530 
   535 	/// -- Change Window Priority for dialog and CBA 
   531 	/// -- Change Window Priority for dialog and CBA 
   536 	
   532 	
   537 	DrawableWindow()->SetOrdinalPosition(0,ECoeWinPriorityAlwaysAtFront); //
   533 	DrawableWindow()->SetOrdinalPosition(0,ECoeWinPriorityAlwaysAtFront); //
   538 	ButtonGroupContainer().ButtonGroup()->AsControl()->DrawableWindow()->SetOrdinalPosition(0,ECoeWinPriorityAlwaysAtFront);
   534 	ButtonGroupContainer().ButtonGroup()->AsControl()->DrawableWindow()->SetOrdinalPosition(0,ECoeWinPriorityAlwaysAtFront); 	
   539 	
   535 
   540 	CEikDialog::Extension()->SetPriority(CActive::EPriorityStandard);
       
   541     }
   536     }
   542 
   537 
   543 EXPORT_C void CAknCharMapDialog::SetSizeAndPosition( const TSize& aSize )
   538 EXPORT_C void CAknCharMapDialog::SetSizeAndPosition( const TSize& aSize )
   544     {
   539     {
   545     if ( AknLayoutUtils::PenEnabled() )
   540     if ( AknLayoutUtils::PenEnabled() )
   595             case EKeyRightArrow:
   590             case EKeyRightArrow:
   596             case EKeyUpArrow:
   591             case EKeyUpArrow:
   597             case EKeyDownArrow:
   592             case EKeyDownArrow:
   598                 {
   593                 {
   599                 TKeyResponse res = charmapControl->OfferKeyEventL(aKeyEvent, aModifiers);
   594                 TKeyResponse res = charmapControl->OfferKeyEventL(aKeyEvent, aModifiers);
   600                 RefreshTitleAndNaviL();
   595                 RefreshTitleAndNavi();
   601                 return res;
   596                 return res;
   602                 }
   597                 }
   603 
   598 
   604             case EKeyEnter:
   599             case EKeyEnter:
   605             case EKeyDevice3:
   600             case EKeyDevice3:
   606                 {
   601                 {
   607                 TryExitL(EAknSoftkeySelect);
   602                 TryExitL(EAknSoftkeySelect);
   608                 return EKeyWasConsumed;
   603                 return EKeyWasConsumed;
   609                 }
   604                 }
       
   605                 break;
       
   606                     
   610             case '*':
   607             case '*':
   611                 {
   608                 {
   612                 if (!aKeyEvent.iRepeats) // switch another table when repeat count is 0 only.
   609                 if (!aKeyEvent.iRepeats) // switch another table when repeat count is 0 only.
   613                     {
   610                     {
   614                     if(iExtension->iHaveReceivedKeyEvent)
   611                     if(iExtension->iHaveReceivedKeyEvent)
   956 // Handles pointer events
   953 // Handles pointer events
   957 // -----------------------------------------------------------------------------
   954 // -----------------------------------------------------------------------------
   958 //
   955 //
   959 EXPORT_C void CAknCharMapDialog::HandlePointerEventL(const TPointerEvent& aPointerEvent)
   956 EXPORT_C void CAknCharMapDialog::HandlePointerEventL(const TPointerEvent& aPointerEvent)
   960     {
   957     {
   961     if(!Rect().Contains(aPointerEvent.iPosition))
   958     if (!Rect().Contains( aPointerEvent.iPosition))
   962         {
   959         {
   963         if(aPointerEvent.iType == TPointerEvent::EButton1Down)
   960         if(aPointerEvent.iType == TPointerEvent::EButton1Down)
   964             {
   961             {
   965             TryExitL(EAknSoftkeyCancel);
   962             TryExitL (EAknSoftkeyCancel);
   966             return;
   963             return;
   967             }
   964             }
   968         }
   965          else if(aPointerEvent.iType == TPointerEvent::EButton1Up)
   969 
   966             {
   970     CAknDialog::HandlePointerEventL(aPointerEvent);
   967             CAknCharMap* charMap = STATIC_CAST( CAknCharMap*, Control( EAknSCTQueryContentId ) );
       
   968             charMap->HandlePointerEventL( aPointerEvent);
       
   969             }
       
   970         }
       
   971     else
       
   972         {
       
   973         CAknDialog::HandlePointerEventL(aPointerEvent);
       
   974         }
   971     }
   975     }
   972 
   976 
   973 void CAknCharMapDialog::SwitchTablesOrPagesL()
   977 void CAknCharMapDialog::SwitchTablesOrPagesL()
   974     {
   978     {
   975     if(!SwitchTablesL())
   979     if(!SwitchTablesL())
  1000     {
  1004     {
  1001     CAknCharMap* charmapControl = STATIC_CAST(CAknCharMap*, Control(EAknSCTQueryContentId));
  1005     CAknCharMap* charmapControl = STATIC_CAST(CAknCharMap*, Control(EAknSCTQueryContentId));
  1002     CAknPopupHeadingPane* headingPane = STATIC_CAST(CAknPopupHeadingPane*, Control(EAknSCTQueryHeadingId));
  1006     CAknPopupHeadingPane* headingPane = STATIC_CAST(CAknPopupHeadingPane*, Control(EAknSCTQueryHeadingId));
  1003     
  1007     
  1004     charmapControl->NextPageL();
  1008     charmapControl->NextPageL();
  1005     RefreshTitleAndNaviL();
  1009     RefreshTitleAndNavi();
  1006     }
  1010     }
  1007 
  1011 
  1008 void CAknCharMapDialog::RefreshTitleAndNaviL()
  1012 void CAknCharMapDialog::RefreshTitleAndNavi()
  1009     {
  1013     {
  1010     CAknCharMap* charmapControl = STATIC_CAST(CAknCharMap*, Control(EAknSCTQueryContentId));
  1014     CAknCharMap* charmapControl = STATIC_CAST(CAknCharMap*, Control(EAknSCTQueryContentId));
  1011     CAknPopupHeadingPane* headingPane = STATIC_CAST(CAknPopupHeadingPane*, Control(EAknSCTQueryHeadingId));
  1015     CAknPopupHeadingPane* headingPane = STATIC_CAST(CAknPopupHeadingPane*, Control(EAknSCTQueryHeadingId));
  1012     
  1016     
  1013     if (!AknLayoutUtils::PenEnabled())
  1017     if (!AknLayoutUtils::PenEnabled())