textinput/peninputvkbcn/ctrlsrc/peninputvkbwindow.cpp
author Simon Howkins <simonh@symbian.org>
Mon, 15 Nov 2010 14:00:51 +0000
branchRCL_3
changeset 59 7febbd162ded
parent 44 ecbabf52600f
permissions -rw-r--r--
Removed unnecessary #ifdef guards around an inclusion - the included file has them anyway.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
44
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
     1
/*
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
     2
* Copyright (c) 2002-2005 Nokia Corporation and/or its subsidiary(-ies).
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
     3
* All rights reserved.
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
     4
* This component and the accompanying materials are made available
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
     5
* under the terms of "Eclipse Public License v1.0""
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
     6
* which accompanies this distribution, and is available
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
     7
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
     8
*
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
     9
* Initial Contributors:
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    10
* Nokia Corporation - initial contribution.
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    11
*
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    12
* Contributors:
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    13
*
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    14
* Description:  vkb main window area implementation
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    15
*
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    16
*/
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    17
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    18
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    19
// system includes
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    20
#include <peninputcmdparam.h>            // use global signal
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    21
#include <peninputvkbcn.rsg>
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    22
#include <peninputlayoutmultilineicf.h>
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    23
#include <peninputeventbutton.h>
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    24
#include <peninputdragbutton.h>
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    25
#include <peninputrepeatbutton.h>
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    26
#include <AknLayoutDef.h>
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    27
#include <peninputcommonchoicelist.h>
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    28
#include <peninputlayout.h>
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    29
#include <AknIconUtils.h>
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    30
#include <AknLayoutDef.h>
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    31
#include <AknUtils.h>
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    32
#include <aknlayoutscalable_avkon.cdl.h>
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    33
#include <barsread.h>
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    34
#include <AknsUtils.h>
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    35
#include <AknFepGlobalEnums.h>
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    36
#include <peninputlayoutinputmodechoice.h>
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    37
#include <peninputcmd.h>            // use global signal
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    38
#include <aknfeppeninputenums.h>    //command from fep or IME to plugin
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    39
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    40
#include <aknlayoutscalable_apps.cdl.h>
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    41
#include <peninputlayoutbubblectrl.h>
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    42
#include <peninputscrollablelist.h>
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    43
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    44
#include <s32mem.h>
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    45
#include <peninputvkbctrllayout.h>
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    46
#include <peninputvkbctrlext.h>
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    47
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    48
// user includes
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    49
#include "peninputvkb.hrh"
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    50
#include "peninputvkbwindow.h"
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    51
#include "peninputvkbevent.h"
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    52
#include "peninputvkbclientarea.h"
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    53
#include "peninputvkbdataprovider.h"
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    54
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    55
#include "peninputvkbcnlafdatamgr.h"
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    56
#include "peninputvkblayout.h"
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    57
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    58
// constant definition
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    59
const TInt KInvalidImg = -1 ;
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    60
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    61
const TInt KTooltipLeftMargin = 10;
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    62
const TInt KTooltipTopMargin = 0;
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    63
const TInt KTooltipRightMargin = 10;
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    64
const TInt KTooltipBottomMargin = 0;
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    65
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    66
// ======== MEMBER FUNCTIONS ========
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    67
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    68
// ---------------------------------------------------------------------------
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    69
// CAknFepVkbWindow::NewL
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    70
// (other items were commented in a header).
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    71
// ---------------------------------------------------------------------------
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    72
//
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    73
CAknFepVkbWindow* CAknFepVkbWindow::NewL(CFepUiLayout* aUiLayout, 
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    74
                                         TInt aControlId,
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    75
                                         MAknFepVkbDataProvider* aDataProvider,
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    76
                                         CAknFepVkbUiStateMgr* aUiStateMgr)
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    77
    {
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    78
    CAknFepVkbWindow* self = 
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    79
        CAknFepVkbWindow::NewLC(aUiLayout, aControlId, aDataProvider, aUiStateMgr);
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    80
    CleanupStack::Pop(self);
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    81
    return self;
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    82
    }
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    83
        
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    84
// ---------------------------------------------------------------------------
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    85
// CAknFepVkbWindow::NewLC
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    86
// (other items were commented in a header).
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    87
// ---------------------------------------------------------------------------
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    88
//
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    89
CAknFepVkbWindow* CAknFepVkbWindow::NewLC(CFepUiLayout* aUiLayout, 
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    90
                                          TInt aControlId,
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    91
                                          MAknFepVkbDataProvider* aDataProvider,
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    92
                                          CAknFepVkbUiStateMgr* aUiStateMgr)
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    93
    {
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    94
    CAknFepVkbWindow* self = 
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    95
        new (ELeave) CAknFepVkbWindow(aUiLayout, aControlId, aDataProvider, aUiStateMgr);
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    96
    CleanupStack::PushL(self);
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    97
    self->ConstructL();
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    98
    return self;
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    99
    }
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   100
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   101
// ---------------------------------------------------------------------------
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   102
// CAknFepVkbWindow::~CAknFepVkbWindow
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   103
// (other items were commented in a header).
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   104
// ---------------------------------------------------------------------------
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   105
//
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   106
CAknFepVkbWindow::~CAknFepVkbWindow()
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   107
    {
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   108
    delete iIdle;
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   109
    delete iLafMgr;
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   110
    iLafMgr = NULL;
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   111
    }
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   112
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   113
// ---------------------------------------------------------------------------
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   114
// CAknFepVkbWindow::CAknFepVkbWindow
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   115
// (other items were commented in a header).
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   116
// ---------------------------------------------------------------------------
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   117
//
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   118
CAknFepVkbWindow::CAknFepVkbWindow(CFepUiLayout* aUiLayout, 
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   119
                                   TInt aControlId, 
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   120
                                   MAknFepVkbDataProvider* aDataProvider,
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   121
                                   CAknFepVkbUiStateMgr* aUiStateMgr )
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   122
    :CAknFepCtrlBaseWindowExt(aUiLayout, aControlId), 
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   123
    iLafMgr(NULL),
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   124
    iDataProvider(aDataProvider), 
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   125
    iUiStateMgr(aUiStateMgr),
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   126
    iFirstTimeConstruct(ETrue), 
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   127
    iPopupInited(EFalse),
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   128
    iPopupSet(EFalse)    
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   129
    {
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   130
    }
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   131
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   132
// ---------------------------------------------------------------------------
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   133
// CAknFepVkbWindow::ConstructL
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   134
// (other items were commented in a header).
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   135
// ---------------------------------------------------------------------------
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   136
//
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   137
void CAknFepVkbWindow::ConstructL()
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   138
    {
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   139
    iLafMgr = CPeninputCnGenericVkbLafMgr::NewL();
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   140
    iLafMgr->SetInputModeL((TPluginInputMode)(UiLayout()->PenInputType()));
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   141
    
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   142
    BaseConstructL();
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   143
    
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   144
    // Add input context field into the headpane
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   145
//    AddContextFieldL();
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   146
    
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   147
    // Read bitmaps of close and move button
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   148
    TInt resID = GetWindowResId();
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   149
    SetResourceId( resID );
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   150
    
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   151
    // Create client area
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   152
    iClientArea = CAknFepVkbClientArea::NewL(UiLayout(), 
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   153
                                             EAknFepVkbCtrlIdClientArea,
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   154
                                             iDataProvider,
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   155
                                             iLafMgr);    
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   156
                               
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   157
    // Then add it into the clientpane
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   158
    AddControlL(iClientArea);       
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   159
    iClientArea->SetTopParent(this);
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   160
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   161
    
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   162
    //Add popup window
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   163
    AddPopupWindowL();
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   164
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   165
    
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   166
    ConstructFromResourceL();
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   167
    
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   168
    // For addition of ITI features, add a candidate list in vkb window   
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   169
    CreateCandidateListOnFSQL();      
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   170
    }
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   171
    
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   172
// ---------------------------------------------------------------------------
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   173
// CAknFepVkbWindow::ConstructFromResourceL
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   174
// (other items were commented in a header).
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   175
// ---------------------------------------------------------------------------
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   176
//
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   177
void CAknFepVkbWindow::ConstructFromResourceL()
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   178
    {
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   179
    CAknFepCtrlBaseWindowExt::ConstructFromResourceL();
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   180
    iInputContextField = 
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   181
        static_cast<CFepLayoutMultiLineIcf*>
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   182
        (Control(EPeninputWindowCtrlIdMultiLineICF));
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   183
        
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   184
    iBubbleSize = AknLayoutScalable_Apps::popup_char_count_window().LayoutLine();
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   185
    iBubbleTextLayout = AknLayoutScalable_Apps::popup_char_count_window_t1(0).LayoutLine();
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   186
    
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   187
    iInputContextField->MsgBubbleCtrl()->SetTextFormat(iBubbleTextLayout);
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   188
    iInputContextField->MsgBubbleCtrl()->SetTextColorIndex( EAknsCIQsnTextColorsCG67 );
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   189
    //Change the ID when ID into release  
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   190
    iInputContextField->MsgBubbleCtrl()->SetBitmapParam(NULL,
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   191
									  NULL,
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   192
									  KAknsIIDQsnFrInputPreviewSideL,
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   193
									  KAknsIIDQsnFrInputPreviewMiddle,
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   194
									  KAknsIIDQsnFrInputPreviewSideR);  
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   195
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   196
    if(UiLayout()->PenInputType() == EPluginInputModeFSQ)
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   197
        {
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   198
        iInputContextField->SetMsgBubbleCtrlSize(TSize(iBubbleSize.iW,iBubbleSize.iH));
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   199
        }  
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   200
    }    
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   201
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   202
// ---------------------------------------------------------------------------
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   203
// CAknFepVkbWindow::ChangeImLayout
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   204
// (other items were commented in a header).
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   205
// ---------------------------------------------------------------------------
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   206
//
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   207
void CAknFepVkbWindow::ChangeImLayout(TInt aRange, TBool aChangeVkb)
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   208
    {
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   209
	UiLayout()->DisableLayoutDrawing(ETrue);   
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   210
    TInt imLayout = iDataProvider->RequestData(EAknFepDataTypeIMLayout);
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   211
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   212
    if ( iArrowLeftButton )
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   213
        {
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   214
        iArrowLeftButton->Hide( EAknFepVkbImCnZhuyin == imLayout );    
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   215
        }
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   216
    if ( iArrowRightButton )
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   217
        {
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   218
        iArrowRightButton->Hide( EAknFepVkbImCnZhuyin == imLayout );    
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   219
        }
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   220
    
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   221
    iClientArea->ChangeImLayout(aRange, aChangeVkb);
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   222
    SizeChangedForTitle();
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   223
    UiLayout()->DisableLayoutDrawing(EFalse);
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   224
    Draw();
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   225
    }
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   226
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   227
// ---------------------------------------------------------------------------
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   228
// CAknFepVkbWindow::ChangeVkbLayout
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   229
// (other items were commented in a header).
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   230
// ---------------------------------------------------------------------------
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   231
//
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   232
void CAknFepVkbWindow::ChangeVkbLayout(TInt aVkbLayoutId)
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   233
    {
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   234
    iClientArea->ChangeVkbLayout(aVkbLayoutId);
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   235
    }
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   236
        
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   237
// ---------------------------------------------------------------------------
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   238
// CAknFepVkbWindow::LoopVkbLayout
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   239
// (other items were commented in a header).
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   240
// ---------------------------------------------------------------------------
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   241
//
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   242
void CAknFepVkbWindow::LoopVkbLayout(TVkbShiftType aType, TBool aNotify )
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   243
    {
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   244
    iClientArea->LoopVkbLayout(aType, aNotify);
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   245
    }
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   246
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   247
// ---------------------------------------------------------------------------
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   248
// CAknFepVkbWindow::Draw
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   249
// (other items were commented in a header).
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   250
// ---------------------------------------------------------------------------
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   251
//
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   252
void CAknFepVkbWindow::Draw()
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   253
	{
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   254
	if ( Hiden() )
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   255
		{
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   256
		return;
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   257
		}
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   258
		
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   259
    CAknFepCtrlBaseWindowExt::Draw();
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   260
    UpdateArea(Rect(), EFalse);
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   261
	}
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   262
  
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   263
// ---------------------------------------------------------------------------
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   264
// CAknFepVkbWindow::SetRect
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   265
// (other items were commented in a header).
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   266
// ---------------------------------------------------------------------------
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   267
//
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   268
void CAknFepVkbWindow::SetRect(const TRect& aRect)
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   269
    {
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   270
	TRect rect = aRect;
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   271
	
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   272
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   273
    if(UiLayout()->PenInputType() == EPluginInputModeFSQ)
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   274
        {
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   275
        rect.Move( TPoint(- rect.iTl ));
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   276
        CFepUiBaseCtrl::SetRect( rect );
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   277
        UiLayout()->SetRect(rect);
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   278
        }
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   279
    else
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   280
                                    
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   281
    	{
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   282
        TSize shadowTl = *((TSize*)iDataProvider->RequestData(EAknFepDataTypeShadowTlSize));
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   283
        TSize shadowBr = *((TSize*)iDataProvider->RequestData(EAknFepDataTypeShadowBrSize));
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   284
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   285
	    TRect shadowRect = TRect( TPoint(), 
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   286
	                              TSize( aRect.Width() + shadowTl.iWidth + shadowBr.iWidth,
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   287
	                                     aRect.Height() + shadowTl.iHeight + shadowBr.iHeight)
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   288
	                            );
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   289
	    rect.Move( TPoint(shadowTl.iWidth, shadowTl.iHeight) - rect.iTl );
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   290
        
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   291
	CFepUiBaseCtrl::SetRect( rect );
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   292
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   293
	    RootControl()->SetRect( rect );
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   294
    UiLayout()->SetShadowRect(shadowRect);
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   295
	    }
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   296
     /*   
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   297
    CFepUiBaseCtrl::SetRect(aRect);
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   298
    ResetShadowSizeIfNeeded();*/
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   299
    }
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   300
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   301
// ---------------------------------------------------------------------------
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   302
// CAknFepVkbWindow::SetPopupProperty
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   303
// (other items were commented in a header).
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   304
// ---------------------------------------------------------------------------
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   305
//
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   306
void CAknFepVkbWindow::SetPopupProperty()
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   307
	{
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   308
	TRect mainPaneRect = *((TRect*)iDataProvider->RequestData(EAknFepDataTypeMainPaneRect));
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   309
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   310
    TAknWindowLineLayout choiceWnd = 
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   311
                                AknLayoutScalable_Avkon::popup_choice_list_window(1).LayoutLine();
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   312
    
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   313
    TAknLayoutRect choiceRect;
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   314
    choiceRect.LayoutRect(mainPaneRect, choiceWnd);
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   315
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   316
    TRect itemRect = TRect(0,
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   317
                           0,
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   318
                           choiceRect.Rect().Width(),
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   319
                           AknLayoutScalable_Avkon::list_single_choice_list_pane(0).LayoutLine().iH);
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   320
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   321
    TAknTextLineLayout choiceTextLayout = 
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   322
                         AknLayoutScalable_Avkon::list_single_choice_list_pane_t1(1).LayoutLine();
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   323
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   324
    const CFont* font = AknLayoutUtils::FontFromId(choiceTextLayout.iFont, NULL);
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   325
    iPopupWnd->SetFont(font);
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   326
        
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   327
    iPopupWnd->SetItemRect(itemRect, 
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   328
                           itemRect);
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   329
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   330
    TInt leftMargin = choiceTextLayout.il;
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   331
   
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   332
    iPopupWnd->SetMarginAndBaseline(leftMargin,font->HeightInPixels());
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   333
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   334
    iPopupWnd->SetFontColor(AKN_LAF_COLOR_STATIC(choiceTextLayout.iC));
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   335
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   336
    if (iPopupWndBgImg)
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   337
    	{
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   338
    	AknIconUtils::SetSize(iPopupWndBgImg, TSize(itemRect.Width(),itemRect.Height()*3), 
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   339
                            EAspectRatioNotPreserved);
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   340
    	}
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   341
    
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   342
    if (iPopupWndFocusImg)
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   343
    	{
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   344
    	AknIconUtils::SetSize(iPopupWndFocusImg, TSize(itemRect.Width(),itemRect.Height()*3), 
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   345
                            EAspectRatioNotPreserved);
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   346
    	}
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   347
    
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   348
    iPopupSet = ETrue;	
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   349
    iPopupItemSize = itemRect.Size();
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   350
	}
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   351
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   352
// ---------------------------------------------------------------------------
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   353
// CAknFepVkbWindow::SizeChanged
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   354
// (other items were commented in a header).
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   355
// ---------------------------------------------------------------------------
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   356
//
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   357
void CAknFepVkbWindow::SizeChanged(TBool /*aLandscapeStyle*/)
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   358
    {
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   359
    SizeChangedForTitle();
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   360
    iClientArea->SizeChanged();
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   361
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   362
    Draw();
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   363
        }
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   364
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   365
void CAknFepVkbWindow::SizeChangedForTitle()
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   366
    	{
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   367
	TRect innerRect;
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   368
	
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   369
    if (( iLafMgr == NULL ) || 
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   370
        ( iLafMgr && !iLafMgr->IsValid() ))
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   371
        {
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   372
        return;
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   373
        }
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   374
        
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   375
    if (iDataProvider->SizeChanging() || (!iDataProvider->UnitShadowSizeSet()))
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   376
    	{
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   377
    	iDataProvider->ReadUnitShadowSize();
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   378
    	}
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   379
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   380
	TSize shadowTl = *((TSize*)iDataProvider->RequestData(EAknFepDataTypeShadowTlSize));
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   381
    TInt x = shadowTl.iWidth;
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   382
    TInt y = shadowTl.iHeight;
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   383
    
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   384
    if ( UiLayout()->PenInputType() == EPluginInputModeFSQ )
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   385
        {
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   386
        x = 0;
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   387
        y = 0;
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   388
        }
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   389
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   390
    
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   391
            
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   392
    TInt btnWidth = iDataProvider->RequestData(EAknFepDataTypeUnitWidth);
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   393
    TInt btnHeight = iDataProvider->RequestData(EAknFepDataTypeUnitHeight);    
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   394
    
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   395
    
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   396
    // Close btn
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   397
    TRect closeBtnRect;
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   398
    closeBtnRect.iTl = TPoint(x, y);
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   399
    closeBtnRect.SetSize(TSize(btnWidth, btnHeight));
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   400
    AknPenImageUtils::CalculateGraphicRect( closeBtnRect, innerRect );
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   401
    static_cast<CAknFepCtrlCommonButton*>
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   402
        ( Control( EPeninutWindowCtrlIdCloseBtn ) )->SizeChanged( closeBtnRect, innerRect, ETrue );
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   403
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   404
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   405
    // ICF
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   406
    TInt columNum = iDataProvider->RequestData(EAknFepDataTypeIcfColumnNums); 
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   407
    TInt titlebarHeight = iDataProvider->RequestData(EAknFepDataTypeTitleBarHeight); 
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   408
    	
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   409
    TRect icfRect;
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   410
    icfRect.iTl = TPoint(closeBtnRect.iBr.iX, closeBtnRect.iTl.iY);
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   411
    icfRect.SetSize(TSize(btnWidth * columNum + iClientArea->iCellAidGap, titlebarHeight));   
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   412
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   413
    // Set ICF Margin 
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   414
   	TPeninputCnICFConfig icfCfg;
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   415
   	iLafMgr->GetICFConfig( icfCfg );
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   416
    const CFont* icfFont = iLafMgr->ICFTextFont();
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   417
	iInputContextField->SetTextMargin( icfCfg.iLeftMargin,
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   418
									   icfCfg.iRightMargin,
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   419
									   icfCfg.iTopMargin,
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   420
									   0 );
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   421
    iInputContextField->SetLineSpace( icfCfg.iLineSpaceMargin );
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   422
    TRAP_IGNORE(iInputContextField->SizeChangedL( icfRect, 
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   423
	                                  icfCfg.iTextLineHeight,
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   424
	                                  icfFont->FontMaxHeight(),
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   425
	                                  icfFont ));    
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   426
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   427
    // Option Button
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   428
    TRect optionBtnRect;
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   429
    optionBtnRect.iTl = TPoint(closeBtnRect.iTl.iX, closeBtnRect.iBr.iY);
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   430
    optionBtnRect.SetSize(TSize(btnWidth, btnHeight));
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   431
    AknPenImageUtils::CalculateGraphicRect( optionBtnRect, innerRect );
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   432
    static_cast<CAknFepCtrlEventButton*>
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   433
        (Control(EPeninutWindowCtrlIdOptionBtn))->SizeChanged(optionBtnRect, innerRect, ETrue);
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   434
    
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   435
    TPoint backSpaceRefPoint;
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   436
    
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   437
    // Move Button
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   438
    TInt imLayout = iDataProvider->RequestData(EAknFepDataTypeIMLayout);
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   439
    
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   440
    if (UiLayout()->PenInputType() == EPluginInputModeVkb)
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   441
        {
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   442
        TRect moveBtnRect;
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   443
        if(EAknFepVkbImCnZhuyin == imLayout)
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   444
            {
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   445
            moveBtnRect.iTl = TPoint(icfRect.iBr.iX + btnWidth, icfRect.iTl.iY);
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   446
            moveBtnRect.SetSize(TSize(btnWidth, btnHeight));
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   447
            }
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   448
        else
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   449
            {
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   450
            moveBtnRect.iTl = TPoint(icfRect.iBr.iX, icfRect.iTl.iY);
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   451
            moveBtnRect.SetSize(TSize(btnWidth * 2, btnHeight));            
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   452
            }
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   453
        AknPenImageUtils::CalculateGraphicRect( moveBtnRect, innerRect );
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   454
        static_cast<CAknFepCtrlDragButton*>
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   455
            ( Control( EPeninutWindowCtrlIdMoveBtn ) )->SizeChanged(moveBtnRect, innerRect, ETrue);
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   456
            
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   457
        backSpaceRefPoint = TPoint(moveBtnRect.iTl.iX, moveBtnRect.iBr.iY);
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   458
        }
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   459
    else if (UiLayout()->PenInputType() == EPluginInputModeFSQ)
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   460
        {
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   461
        if ( EAknFepVkbImCnZhuyin == imLayout )
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   462
            {
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   463
            /*TRect emptyRect= TRect();
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   464
            AknPenImageUtils::CalculateGraphicRect( emptyRect, innerRect );
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   465
            static_cast<CAknFepCtrlRepeatButton*>
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   466
                ( Control( EPeninupWindowCtrlIdArrowLeftBtn ) )->SizeChanged(emptyRect, innerRect, ETrue);
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   467
            static_cast<CAknFepCtrlRepeatButton*>
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   468
                ( Control( EPeninupWindowCtrlIdArrowRightBtn ) )->SizeChanged(emptyRect, innerRect, ETrue);*/
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   469
           /* TRect arrowRect;
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   470
            TRect innerRect;
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   471
            
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   472
            arrowRect.iTl = TPoint(closeBtnRect.iBr.iX, closeBtnRect.iBr.iY);
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   473
            arrowRect.SetSize(TSize(btnWidth + btnWidth*2, btnHeight));
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   474
            AknPenImageUtils::CalculateGraphicRect( arrowRect, innerRect );
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   475
            static_cast<CAknFepCtrlRepeatButton*>
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   476
                ( Control( EPeninupWindowCtrlIdArrowUpBtn ) )->SizeChanged(arrowRect, innerRect, ETrue);
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   477
                
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   478
            arrowRect.iTl = TPoint(arrowRect.iBr.iX, arrowRect.iTl.iY);
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   479
            arrowRect.SetSize(TSize(btnWidth + btnWidth*2, btnHeight));
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   480
            AknPenImageUtils::CalculateGraphicRect( arrowRect, innerRect );
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   481
            static_cast<CAknFepCtrlRepeatButton*>
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   482
                ( Control( EPeninupWindowCtrlIdArrowDownBtn ) )->SizeChanged(arrowRect, innerRect, ETrue);
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   483
                
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   484
            arrowRect.iTl = TPoint(arrowRect.iBr.iX, arrowRect.iTl.iY);
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   485
            arrowRect.SetSize(TSize(btnWidth + btnWidth*2, btnHeight));
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   486
            AknPenImageUtils::CalculateGraphicRect( arrowRect, innerRect );
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   487
            static_cast<CAknFepCtrlRepeatButton*>
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   488
                ( Control( EPeninupWindowCtrlIdArrowLeftBtn ) )->SizeChanged(arrowRect, innerRect, ETrue);
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   489
                
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   490
            arrowRect.iTl = TPoint(arrowRect.iBr.iX, arrowRect.iTl.iY);
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   491
            arrowRect.SetSize(TSize(btnWidth + btnWidth*2, btnHeight));
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   492
            AknPenImageUtils::CalculateGraphicRect( arrowRect, innerRect );
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   493
            static_cast<CAknFepCtrlRepeatButton*>
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   494
                ( Control( EPeninupWindowCtrlIdArrowRightBtn ) )->SizeChanged(arrowRect, innerRect, ETrue);*/
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   495
            }
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   496
        else
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   497
            {
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   498
            TRect leftBtnRect;
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   499
            leftBtnRect.iTl = TPoint(icfRect.iBr.iX, icfRect.iTl.iY);
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   500
            
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   501
            leftBtnRect.SetSize(TSize(btnWidth, btnHeight));        
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   502
			AknPenImageUtils::CalculateGraphicRect( leftBtnRect, innerRect );
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   503
            iArrowLeftButton->SizeChanged(leftBtnRect, innerRect, ETrue);
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   504
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   505
            TRect rightBtnRect;
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   506
            rightBtnRect.iTl = TPoint(leftBtnRect.iBr.iX, leftBtnRect.iTl.iY);
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   507
            rightBtnRect.SetSize(TSize(btnWidth, btnHeight));        
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   508
			AknPenImageUtils::CalculateGraphicRect( rightBtnRect, innerRect );
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   509
            iArrowRightButton->SizeChanged(rightBtnRect, innerRect, ETrue);
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   510
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   511
            backSpaceRefPoint = TPoint(leftBtnRect.iTl.iX, leftBtnRect.iBr.iY);
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   512
            }
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   513
        }
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   514
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   515
    // BackSpace button
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   516
    TRect backSpaceBtnRect;
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   517
    if(EAknFepVkbImCnZhuyin == imLayout)
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   518
        {
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   519
        if(UiLayout()->PenInputType() == EPluginInputModeFSQ)
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   520
            {
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   521
            backSpaceBtnRect.iTl = TPoint(icfRect.iBr.iX, icfRect.iTl.iY);
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   522
            backSpaceBtnRect.SetSize(TSize(btnWidth * 2, btnHeight));
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   523
            }
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   524
        else
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   525
            {
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   526
            backSpaceBtnRect.iTl = TPoint(icfRect.iBr.iX, icfRect.iTl.iY);
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   527
            backSpaceBtnRect.SetSize(TSize(btnWidth, btnHeight));
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   528
            }
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   529
        }
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   530
    else
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   531
        {
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   532
        backSpaceBtnRect.iTl = backSpaceRefPoint;
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   533
        backSpaceBtnRect.SetSize(TSize(btnWidth * 2, btnHeight));
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   534
        }
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   535
    AknPenImageUtils::CalculateGraphicRect( backSpaceBtnRect, innerRect );
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   536
    static_cast<CAknFepCtrlRepeatButton*>
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   537
        ( Control( EPeninutWindowCtrlIdBackspaceBtn ) )->SizeChanged(backSpaceBtnRect, 
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   538
                                                                     innerRect, ETrue);
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   539
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   540
    // Tooltip and candidate list
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   541
	SetITILayoutOnFSQ();
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   542
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   543
    if (iDataProvider->SizeChanging() || (!iPopupSet))
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   544
    	{
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   545
    	SetPopupProperty();
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   546
    	}
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   547
    
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   548
        }
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   549
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   550
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   551
    
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   552
// ---------------------------------------------------------------------------
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   553
// CAknFepVkbWindow::HandleControlEvent
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   554
// (other items were commented in a header).
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   555
// ---------------------------------------------------------------------------
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   556
//
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   557
void CAknFepVkbWindow::HandleControlEvent(TInt aEventType,
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   558
                                          CFepUiBaseCtrl* aCtrl, 
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   559
                                          const TDesC& aEventData)
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   560
    {
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   561
    //Call this function in base class
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   562
    CAknFepCtrlBaseWindowExt::HandleControlEvent(aEventType,aCtrl,aEventData);
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   563
    
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   564
    TUint16* data = (TUint16*) aEventData.Ptr();
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   565
    
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   566
    TBool dealFlag = EFalse;
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   567
    
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   568
    switch (aEventType)
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   569
        {
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   570
        case EEventControlFocusGained:
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   571
            //Get composition
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   572
            {
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   573
            CFepLayoutEditAreaBase* compField = ClientArea()->CompositionField();
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   574
            
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   575
            //if the event is sent by pen down in edit area
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   576
            if ( ( aCtrl ) && ( aCtrl->ControlId() == EPeninputWindowCtrlIdMultiLineICF ) )
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   577
                {
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   578
                //Notify compField lost focus
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   579
                if ( compField )
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   580
                    {
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   581
                    compField->SetFocus(EFalse);
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   582
                    }                
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   583
                }
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   584
            else if ( ( aCtrl ) && ( aCtrl->ControlId() == EAknFepVkbCtrlIdCompositionField ) )
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   585
                {
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   586
                //Notify iInputContextField lost focus
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   587
                if ( iInputContextField ) 
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   588
                    {
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   589
                    iInputContextField->SetFocus(EFalse);
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   590
                    }
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   591
                }
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   592
            
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   593
            //if the event is sent from by internal
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   594
            if ( *data == EInputContextFieldGetFocus )
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   595
                {
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   596
                if ( compField )
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   597
                    {
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   598
                    compField->SetFocus(EFalse);
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   599
                    }  
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   600
                if ( iInputContextField ) 
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   601
                    {
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   602
                    iInputContextField->SetFocus(ETrue);
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   603
                    }
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   604
                }                                    
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   605
            else if ( *data == ECompotisionFieldGetFocus )
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   606
                {
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   607
                if ( iInputContextField ) 
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   608
                    {
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   609
                    iInputContextField->SetFocus(EFalse);
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   610
                    }
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   611
                if ( compField )
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   612
                    {
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   613
                    compField->SetFocus(ETrue);
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   614
                    }                                
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   615
                }                
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   616
                
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   617
            dealFlag = ETrue;
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   618
            }
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   619
            break;
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   620
        case EVkbEventUpArrow:
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   621
            {
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   622
            TRAP_IGNORE(iInputContextField->HandleArrowBtnEventL(
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   623
                                                        CFepLayoutMultiLineIcf::EArrowUp));
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   624
            }
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   625
            break;
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   626
        case EVkbEventDownArrow:
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   627
            {
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   628
            TRAP_IGNORE(iInputContextField->HandleArrowBtnEventL(
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   629
                                                        CFepLayoutMultiLineIcf::EArrowDown));
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   630
            }
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   631
            break;                     
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   632
        default:
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   633
            break;
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   634
        }
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   635
    
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   636
    if ( !dealFlag )
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   637
        {
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   638
        iClientArea->HandleControlEvent(aEventType,aCtrl,aEventData);
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   639
        }
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   640
    }
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   641
    
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   642
// ---------------------------------------------------------------------------
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   643
// CAknFepVkbWindow::DoClose
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   644
// (other items were commented in a header).
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   645
// ---------------------------------------------------------------------------
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   646
//
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   647
TBool CAknFepVkbWindow::DoClose()
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   648
    {
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   649
    //Send EVkbEventWindowClose to layout
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   650
    this->ReportEvent(EVkbEventWindowClose,KNullDesC);
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   651
    
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   652
    //Return true which will permit the window close
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   653
    return EFalse;
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   654
    }
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   655
            
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   656
// ---------------------------------------------------------------------------
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   657
// CAknFepVkbWindow::ClientArea
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   658
// (other items were commented in a header).
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   659
// ---------------------------------------------------------------------------
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   660
//
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   661
CAknFepVkbClientArea* CAknFepVkbWindow::ClientArea()
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   662
    {
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   663
    return iClientArea;
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   664
    }       
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   665
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   666
// ---------------------------------------------------------------------------
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   667
// CAknFepVkbWindow::InputContextField
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   668
// (other items were commented in a header).
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   669
// ---------------------------------------------------------------------------
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   670
//
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   671
CFepLayoutMultiLineIcf* CAknFepVkbWindow::InputContextField()
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   672
    {
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   673
    return iInputContextField;
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   674
    }
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   675
    
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   676
// ---------------------------------------------------------------------------
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   677
// CAknFepVkbWindow::CompositionFieldStringLength
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   678
// (other items were commented in a header).
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   679
// ---------------------------------------------------------------------------
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   680
//
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   681
TInt CAknFepVkbWindow::CompositionFieldStringLength()
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   682
    {
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   683
    return iClientArea->CompositionFieldStringLength();
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   684
    }
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   685
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   686
// ---------------------------------------------------------------------------
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   687
// CAknFepVkbWindow::FocusedControlID
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   688
// (other items were commented in a header).
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   689
// ---------------------------------------------------------------------------
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   690
//
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   691
TInt CAknFepVkbWindow::FocusedControlID()
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   692
    {
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   693
    TInt ctrlID = iInputContextField->ControlId();
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   694
    CFepLayoutEditAreaBase* compField = ClientArea()->CompositionField();
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   695
    
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   696
    if ( compField && compField->IsFocused() )
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   697
        {
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   698
        return compField->ControlId();
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   699
        }
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   700
        
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   701
    return ctrlID;
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   702
    }
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   703
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   704
// ---------------------------------------------------------------------------
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   705
// CAknFepVkbWindow::SetEditorTextL
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   706
// (other items were commented in a header).
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   707
// ---------------------------------------------------------------------------
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   708
//
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   709
void CAknFepVkbWindow::SetEditorTextL(const TFepInputContextFieldData& aData)
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   710
    {
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   711
    if(iInputContextField)
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   712
        {
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   713
        iInputContextField->SetTextL(aData);
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   714
        }
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   715
    }
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   716
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   717
// ---------------------------------------------------------------------------
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   718
// CAknFepVkbWindow::SetEditorTextL
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   719
// (other items were commented in a header).
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   720
// ---------------------------------------------------------------------------
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   721
//
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   722
void CAknFepVkbWindow::SetTextIsSecret( TBool aIsSecret )
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   723
    {
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   724
    if(iInputContextField)
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   725
        {
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   726
        iInputContextField->SetTextIsSecret( aIsSecret );
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   727
        }
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   728
    }
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   729
            
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   730
    
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   731
    
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   732
// ---------------------------------------------------------------------------
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   733
// CAknFepVkbWindow::BackgroundConstructL
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   734
// Do background construct.
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   735
// ---------------------------------------------------------------------------
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   736
//
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   737
TInt CAknFepVkbWindow::BackgroundTaskL(TAny* aPtr)
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   738
    {
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   739
    CAknFepVkbWindow* self = static_cast<CAknFepVkbWindow*>(aPtr);
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   740
    self->DoIdleConstructL();
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   741
    return EFalse;
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   742
    }
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   743
    
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   744
void CAknFepVkbWindow::DoIdleConstructL()
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   745
    {
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   746
    if (iPopupInited)
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   747
        {
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   748
   	    return;
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   749
        }
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   750
    
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   751
    //set font   
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   752
    /*
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   753
    TAknWindowLineLayout appWnd = AknLayoutScalable_Avkon::application_window(0).LayoutLine();
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   754
    
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   755
    TAknWindowLineLayout mainPane = AknLayoutScalable_Avkon::main_pane(4).LayoutLine();
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   756
        
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   757
    TAknLayoutRect mainPaneRect;
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   758
    mainPaneRect.LayoutRect(appWnd.Rect(), mainPane);
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   759
    
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   760
    TAknWindowLineLayout choiceWnd = AknLayoutScalable_Avkon::popup_choice_list_window(1).LayoutLine();
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   761
    
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   762
    TAknLayoutRect choiceRect;
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   763
    choiceRect.LayoutRect(mainPaneRect.Rect(), choiceWnd);
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   764
    
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   765
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   766
    TRect itemRect = TRect(0,
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   767
                           0,
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   768
                           choiceRect.Rect().Width(),
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   769
                           AknLayoutScalable_Avkon::list_single_choice_list_pane(0).LayoutLine().iH);
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   770
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   771
    TAknTextLineLayout choiceTextLayout = AknLayoutScalable_Avkon::list_single_choice_list_pane_t1(1).LayoutLine();
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   772
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   773
    const CFont* font = AknLayoutUtils::FontFromId(choiceTextLayout.iFont, NULL);
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   774
    iPopupWnd->SetFont(font);
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   775
    iPopupWnd->SetItemRect(itemRect, 
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   776
                           itemRect);
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   777
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   778
    TInt leftMargin = choiceTextLayout.il;
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   779
   
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   780
    iPopupWnd->SetMarginAndBaseline(leftMargin,font->HeightInPixels());
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   781
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   782
    iPopupWnd->SetFontColor(AKN_LAF_COLOR_STATIC(choiceTextLayout.iC));
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   783
    */
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   784
    if (iDataProvider->SizeChanging() || (!iPopupSet))
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   785
    	{
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   786
        SetPopupProperty();
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   787
    	}
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   788
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   789
    // Read resource
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   790
    TResourceReader reader;
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   791
    CCoeEnv::Static()->CreateResourceReaderLC(reader, R_AKN_FEP_VKB_POPUP_WINDOW); 
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   792
    
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   793
    GetPopupWndInfoFromRes(reader);
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   794
      
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   795
    CleanupStack::PopAndDestroy(); // reader
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   796
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   797
    //add item
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   798
    CFepLayoutChoiceList::SItem item;
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   799
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   800
    item.iCommand = EAknFepVkbVkbAccented1;
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   801
    CCoeEnv::Static()->CreateResourceReaderLC( reader, R_PENINPUT_VKB_ACCENT1 );
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   802
    TPtrC p1 = reader.ReadTPtrC();
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   803
    item.iText.Copy( p1 );
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   804
    iPopupWnd->AddItemL( item );
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   805
    CleanupStack::PopAndDestroy( 1 );
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   806
    item.iCommand = EAknFepVkbVkbAccented2;
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   807
    CCoeEnv::Static()->CreateResourceReaderLC( reader, R_PENINPUT_VKB_ACCENT2 );
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   808
    TPtrC p2 = reader.ReadTPtrC();
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   809
    item.iText.Copy( p2 );
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   810
    iPopupWnd->AddItemL( item );
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   811
    CleanupStack::PopAndDestroy( 1 );
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   812
    item.iCommand = EAknFepVkbVkbAccented3;
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   813
    CCoeEnv::Static()->CreateResourceReaderLC( reader, R_PENINPUT_VKB_ACCENT3 );
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   814
    TPtrC p3 = reader.ReadTPtrC();
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   815
    item.iText.Copy( p3 );
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   816
    iPopupWnd->AddItemL( item );
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   817
    CleanupStack::PopAndDestroy( 1 );  
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   818
    iPopupInited = ETrue;
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   819
    
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   820
    iPopupWnd->SetListColumnNumWithLafL( iPopupWnd->ItemsCount() );
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   821
    }
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   822
    
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   823
// ---------------------------------------------------------------------------
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   824
// CAknFepVkbWindow::AddPopupWindowL
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   825
// (other items were commented in a header).
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   826
// ---------------------------------------------------------------------------
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   827
//
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   828
void CAknFepVkbWindow::AddPopupWindowL()
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   829
    {
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   830
    iPopupWnd = CPeninputCommonChoiceList::NewL(UiLayout(),
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   831
                                           EAknFepVkbPopupWindow,
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   832
                                			KAknsIIDQsnFrList,
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   833
                                			KAknsIIDQsnFrPopupSub );
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   834
    
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   835
    iPopupWnd->AddEventObserver(UiLayout());
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   836
    AddControlL(iPopupWnd);
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   837
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   838
    
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   839
    iIdle = CIdle::NewL(CActive::EPriorityIdle);
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   840
    iIdle ->Start(TCallBack(BackgroundTaskL,this));
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   841
    }
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   842
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   843
void  CAknFepVkbWindow::SetSwitchlistLanguage( TInt /*aLang*/ )
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   844
    {
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   845
    }
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   846
    
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   847
void  CAknFepVkbWindow::SetSwitchlistSecretFlag(TBool aSecret)
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   848
    {
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   849
    static_cast<CPeninputLayoutInputmodelChoice*>
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   850
        (Control( EPeninutWindowCtrlIdSwitcherPopupWindow))->SetSecretEditor(aSecret);
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   851
    }
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   852
// ---------------------------------------------------------------------------
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   853
// CPeninputGenericVkbWindow::DimArrowKeys
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   854
// (other items were commented in a header).
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   855
// ---------------------------------------------------------------------------
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   856
//
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   857
void CAknFepVkbWindow::DimArrowKeys( TBool aDimArrow )
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   858
    {
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   859
    //disable or enable arrow keys of FSQ in secret editor. 
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   860
    if(UiLayout()->PenInputType() == EPluginInputModeFSQ )
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   861
        {
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   862
        iArrowLeftButton->SetDimmed( aDimArrow );
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   863
        iArrowRightButton->SetDimmed( aDimArrow );
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   864
        iClientArea->DimArrowKeys( aDimArrow );
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   865
        }	    	
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   866
    }
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   867
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   868
void CAknFepVkbWindow::DimEnterKey( TBool aDimmed )
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   869
    {
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   870
	CAknFepCtrlEventButton* enterBtn = static_cast<CAknFepCtrlEventButton*>
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   871
	                              ( Control(EAknFepVkbCtrlIdEnterBtn) );	
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   872
    if( UiLayout()->PenInputType() == EPluginInputModeFSQ 
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   873
       && enterBtn )
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   874
        {
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   875
        enterBtn->SetDimmed( aDimmed );        
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   876
        }
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   877
    }
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   878
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   879
// --------------------------------------------------------------------------
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   880
// CAknFepVkbWindow::GetPopupWndInfoFromRes
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   881
// (other items were commented in a header)
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   882
// --------------------------------------------------------------------------
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   883
//
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   884
void CAknFepVkbWindow::GetPopupWndInfoFromRes(TResourceReader aReader)
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   885
    {
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   886
    TPtrC bmpFileName = aReader.ReadTPtrC();
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   887
    TInt32 imgMajorSkinId = aReader.ReadInt32();
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   888
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   889
    TAknsItemID id;
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   890
    
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   891
    MAknsSkinInstance* skininstance = UiLayout()->SkinInstance();
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   892
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   893
    TInt popWinBmpId = aReader.ReadInt16();
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   894
    TInt popWinBmpMaskId = aReader.ReadInt16();
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   895
    TInt popWinBmpSkinId = aReader.ReadInt16();
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   896
    
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   897
    id.Set( TInt( imgMajorSkinId ), popWinBmpSkinId );
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   898
    
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   899
    if ( popWinBmpId != KInvalidImg )
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   900
    	{
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   901
        TRAP_IGNORE(AknsUtils::CreateIconL( skininstance,
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   902
                                id,
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   903
                                iPopupWndBgImg,
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   904
                                bmpFileName,
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   905
                                popWinBmpId ));
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   906
            
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   907
        AknIconUtils::SetSize(iPopupWndBgImg, iPopupItemSize, EAspectRatioNotPreserved); 
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   908
        TRAP_IGNORE(iPopupWnd->SetBackgroundBitmapL( iPopupWndBgImg ));
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   909
    	}
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   910
    	
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   911
    TInt focusBmpId = aReader.ReadInt16();
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   912
    TInt focusBmpMaskId = aReader.ReadInt16();
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   913
    TInt focusBmpSkinId = aReader.ReadInt16();
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   914
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   915
    id.Set( TInt( imgMajorSkinId ), focusBmpSkinId );
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   916
    
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   917
    if ( focusBmpId != KInvalidImg )
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   918
    	{
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   919
    	TRAP_IGNORE(AknsUtils::CreateIconL( skininstance,
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   920
                                id,
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   921
                                iPopupWndFocusImg,
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   922
                                bmpFileName,
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   923
                                focusBmpId ));
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   924
                                
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   925
        AknIconUtils::SetSize(iPopupWndFocusImg, iPopupItemSize, EAspectRatioNotPreserved);  
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   926
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   927
        iPopupWnd->SetFocusBmp( iPopupWndFocusImg );
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   928
    	}
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   929
    }
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   930
      
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   931
// ---------------------------------------------------------------------------
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   932
// CAknFepVkbWindow::PopupAccentWindow
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   933
// (other items were commented in a header).
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   934
// ---------------------------------------------------------------------------
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   935
//
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   936
void CAknFepVkbWindow::PopupAccentWindow()
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   937
    {
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   938
    CFepUiBaseCtrl* accentBtn = Control(EAknFepVkbCtrlIdAccentedButton);
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   939
    if ( accentBtn )
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   940
        {
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   941
        if (!iPopupInited)
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   942
            {
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   943
            TRAP_IGNORE(DoIdleConstructL());
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   944
            }
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   945
        
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   946
        TRect rect = accentBtn->Rect();   
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   947
        iPopupWnd->Display(rect);
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   948
        iAccentPopup = ETrue;                 
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   949
        }         
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   950
    }
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   951
    
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   952
// ---------------------------------------------------------------------------
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   953
// CAknFepVkbWindow::PopupAccentWindow
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   954
// (other items were commented in a header).
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   955
// ---------------------------------------------------------------------------
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   956
//
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   957
void CAknFepVkbWindow::PopupSwitchWindow()
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   958
    {
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   959
    CFepUiBaseCtrl* accentBtn = Control(EAknFepVkbCtrlIdSwitchToHwrBtn);
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   960
    if ( accentBtn )
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   961
        {
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   962
        if (!iPopupInited)
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   963
            {
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   964
            TRAP_IGNORE(DoIdleConstructL());
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   965
            }
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   966
        
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   967
        iAccentPopup = ETrue;                 
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   968
        
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   969
       	TRAP_IGNORE( static_cast<CPeninputLayoutInputmodelChoice*>
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   970
		    (Control(EPeninutWindowCtrlIdSwitcherPopupWindow))->PopUpSwitchListL(accentBtn->Rect()) );
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   971
        }         
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   972
    }    
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   973
// CAknFepVkbWindow::ResetAccentButton
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   974
// (other items were commented in a header).
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   975
// ---------------------------------------------------------------------------
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   976
//
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   977
void CAknFepVkbWindow::ResetAccentButton()
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   978
    {
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   979
    CFepUiBaseCtrl* accentBtn = Control(EAknFepVkbCtrlIdAccentedButton);
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   980
    if ( accentBtn )
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   981
        {
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   982
        accentBtn->SetActive(EFalse);
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   983
        
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   984
        TRect innerRect;
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   985
        CAknFepCtrlCommonButton* accentBtnCtrl = static_cast<CAknFepCtrlCommonButton*> (accentBtn);
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   986
        AknPenImageUtils::CalculateGraphicRect( accentBtn->Rect(), innerRect );
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   987
        accentBtnCtrl->SizeChanged(accentBtn->Rect(), innerRect, EFalse);                    
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   988
        iAccentPopup = EFalse;
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   989
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   990
        iClientArea->ActiveCurrentRange();
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   991
        }          
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   992
    }
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   993
    
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   994
// ---------------------------------------------------------------------------
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   995
// CAknFepVkbWindow::NeedCreateWord
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   996
// (other items were commented in a header).
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   997
// ---------------------------------------------------------------------------
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   998
//
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   999
TBool CAknFepVkbWindow::NeedCreateWord()
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1000
	{
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1001
	return iClientArea->NeedCreateWord();
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1002
	}
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1003
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1004
void CAknFepVkbWindow::CloseAccentWindow()
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1005
    {
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1006
    if(iAccentPopup)
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1007
        {
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1008
        iPopupWnd->CloseWindow();
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1009
        ResetAccentButton();
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1010
        }
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1011
    }
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1012
    
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1013
// ---------------------------------------------------------------------------
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1014
// CAknFepVkbWindow::GetCreatedWordSpell
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1015
// (other items were commented in a header).
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1016
// ---------------------------------------------------------------------------
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1017
//
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1018
TPtrC CAknFepVkbWindow::GetCreatedWordSpell()
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1019
    {
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1020
    return iClientArea->GetCreatedWordSpell();
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1021
    }
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1022
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1023
// ---------------------------------------------------------------------------
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1024
// CAknFepVkbWindow::SetEnableSettingBtn
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1025
// (other items were commented in a header)
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1026
// ---------------------------------------------------------------------------
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1027
//     
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1028
void CAknFepVkbWindow::SetEnableSettingBtn(TBool aEnable)
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1029
    {
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1030
    CAknFepCtrlEventButton* optionBtn = static_cast<CAknFepCtrlEventButton*>
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1031
        (Control( EPeninutWindowCtrlIdOptionBtn ) );    
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1032
    if ( aEnable )    
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1033
        {
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1034
        optionBtn->SetDimmed(EFalse);
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1035
        }
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1036
    else
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1037
        {
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1038
        optionBtn->SetDimmed(ETrue);
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1039
        optionBtn->SetActive(EFalse);
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1040
        } 
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1041
    } 
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1042
// --------------------------------------------------------------------------
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1043
// CAknFepVkbWindow::GetWindowResId
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1044
// (other items were commented in a header)
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1045
// --------------------------------------------------------------------------
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1046
//
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1047
TInt CAknFepVkbWindow::GetWindowResId()
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1048
    {
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1049
    if ( UiLayout()->PenInputType() == EPluginInputModeFSQ )
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1050
        {
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1051
        return R_AKN_FEP_VKB_FSQ_WINDOW_INFO;
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1052
        }
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1053
    return R_AKN_FEP_VKB_WINDOW_INFO;        
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1054
    }
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1055
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1056
// --------------------------------------------------------------------------
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1057
// CAknFepVkbWindow::CreateCustomControlL
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1058
// (other items were commented in a header)
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1059
// --------------------------------------------------------------------------
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1060
//
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1061
TBool CAknFepVkbWindow::CreateCustomControlL( TInt16 aControlId, TInt32 aImageId )
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1062
	{
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1063
	TBool create = ETrue;
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1064
    switch ( aControlId )
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1065
        {
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1066
        case EPeninutWindowCtrlIdMoveBtn:
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1067
            {
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1068
            if ( !iMoveButton )
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1069
                {
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1070
                iMoveButton = CAknFepCtrlDragButton::NewL(UiLayout(), EPeninutWindowCtrlIdMoveBtn);
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1071
                iMoveButton->SetImageFrameId( KAknsIIDQsnFrFunctionButtonNormal,
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1072
        									  KAknsIIDQsnFrFunctionButtonPressed,
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1073
        									  KAknsIIDQsnFrFunctionButtonInactive ); 
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1074
                AddControlL(iMoveButton);
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1075
                iMoveButton->AddPositionObserver(this);
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1076
                iMoveButton->AddEventObserver( UiLayout() );
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1077
                iMoveButton->SetResourceId( aImageId );
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1078
                UiLayout()->EnableLayoutMoving( static_cast<CDragBar*>( iMoveButton ) );
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1079
                }
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1080
            iMoveButton->ConstructFromResourceL();
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1081
            }
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1082
            break;
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1083
        case EPeninupWindowCtrlIdArrowLeftBtn:
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1084
            {
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1085
            if ( UiLayout()->PenInputType() != EPluginInputModeFSQ )
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1086
                {
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1087
                break;
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1088
                }
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1089
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1090
            if (!iArrowLeftButton)
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1091
                {
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1092
	            iArrowLeftButton = CAknFepCtrlRepeatButton::NewL( 
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1093
	                UiLayout(), aControlId, EVkbEventLeftArrow, EKeyLeftArrow, 
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1094
	            								  KAknsIIDQsnFrFunctionButtonNormal,
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1095
	        									  KAknsIIDQsnFrFunctionButtonPressed,
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1096
	        									  KAknsIIDQsnFrFunctionButtonInactive );
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1097
                 AddControlL(iArrowLeftButton);
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1098
                iArrowLeftButton->AddEventObserver(UiLayout());
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1099
                iArrowLeftButton->SetResourceId( aImageId );
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1100
                }
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1101
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1102
            iArrowLeftButton->ConstructFromResourceL();
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1103
            }
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1104
            break;
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1105
        case EPeninupWindowCtrlIdArrowRightBtn:
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1106
            {
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1107
            if ( UiLayout()->PenInputType() != EPluginInputModeFSQ )
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1108
                {
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1109
                break;
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1110
                }
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1111
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1112
            if (!iArrowRightButton)
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1113
                {
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1114
	            iArrowRightButton = CAknFepCtrlRepeatButton::NewL( 
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1115
	                UiLayout(), aControlId, EVkbEventRightArrow, EKeyRightArrow, 
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1116
	            								  KAknsIIDQsnFrFunctionButtonNormal,
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1117
	        									  KAknsIIDQsnFrFunctionButtonPressed,
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1118
	        									  KAknsIIDQsnFrFunctionButtonInactive );                
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1119
                AddControlL(iArrowRightButton);
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1120
                iArrowRightButton->AddEventObserver(UiLayout());
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1121
                iArrowRightButton->SetResourceId( aImageId );
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1122
                }
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1123
            iArrowRightButton->ConstructFromResourceL();
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1124
            }
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1125
            break;
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1126
        default:
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1127
            {
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1128
            create = EFalse;
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1129
            }
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1130
        }
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1131
        return create;
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1132
    }
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1133
 
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1134
void CAknFepVkbWindow::AddCustomControlGroupL(CFepUiBaseCtrl* aCtrl)
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1135
	{
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1136
	AddControlL(aCtrl);
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1137
	}
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1138
	
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1139
void CAknFepVkbWindow::SimulateRawEvent(TInt aScanCode, TRawEvent::TType aType)
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1140
    {
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1141
    TRawEvent event; 
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1142
    event.Set(aType,aScanCode);
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1143
    
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1144
    TPtrC eventPtr(reinterpret_cast<const TUint16*>(&event),sizeof(event)/sizeof(TUint16));
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1145
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1146
    UiLayout()->SignalOwner(ESignalSimulateEvent,eventPtr);
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1147
    }	
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1148
	
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1149
void CAknFepVkbWindow::SetPromptTextL(TUint8* aData)
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1150
    {
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1151
    RDesReadStream readStream;
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1152
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1153
    TPtr8 countPtr(aData, 2*sizeof(TInt), 2*sizeof(TInt));
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1154
	  readStream.Open(countPtr);
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1155
	  CleanupClosePushL(readStream);
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1156
    const TInt dataCount = readStream.ReadInt32L();
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1157
	  const TInt textCount = readStream.ReadInt32L();
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1158
    CleanupStack::PopAndDestroy(&readStream);
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1159
    
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1160
    TPtr8 ptr( aData+2*sizeof(TInt), dataCount+textCount, dataCount+textCount );            
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1161
	  readStream.Open(ptr);
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1162
	  CleanupClosePushL(readStream);
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1163
	
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1164
	  HBufC8* dataBuf = HBufC8::NewLC(dataCount);
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1165
	  TPtr8 dataBufPtr = dataBuf->Des();
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1166
	  readStream.ReadL(dataBufPtr, dataCount);
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1167
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1168
    TFepPromptText* pIcfData = 
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1169
        reinterpret_cast<TFepPromptText*>(const_cast<TUint8*>(dataBufPtr.Ptr()));
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1170
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1171
    HBufC* textBuf;
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1172
    if (textCount > 0)
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1173
        {
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1174
        textBuf = HBufC::NewLC(textCount/2);
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1175
    	  TPtr textBufPtr = textBuf->Des();
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1176
    	  readStream.ReadL(textBufPtr, textCount/2);
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1177
        static_cast<CFepLayoutMultiLineIcf*>
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1178
            (Control(EPeninputWindowCtrlIdMultiLineICF))->SetPromptTextL
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1179
                (textBuf->Des(), pIcfData->iCleanContent);
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1180
        CleanupStack::PopAndDestroy(textBuf);
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1181
        }
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1182
    else
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1183
        {
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1184
        static_cast<CFepLayoutMultiLineIcf*>(Control(EPeninputWindowCtrlIdMultiLineICF))->
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1185
            SetPromptTextL( KNullDesC, pIcfData->iCleanContent );
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1186
        }
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1187
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1188
    CleanupStack::PopAndDestroy(dataBuf);
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1189
	CleanupStack::PopAndDestroy(&readStream);
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1190
    }    
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1191
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1192
void CAknFepVkbWindow::ChangeMergedButtonStatus( 
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1193
											const TInt aIsShiftCase, 
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1194
    								 		const TInt aIsCapslockCase )
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1195
    {
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1196
    iClientArea->ChangeMergedButtonStatus(aIsShiftCase, aIsCapslockCase);
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1197
    }
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1198
    
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1199
void CAknFepVkbWindow::ShowBubble(TInt aShow)
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1200
    {
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1201
    if (aShow > 0)
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1202
        {
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1203
        iClientArea->ShowBubble(ETrue);    
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1204
        }
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1205
    else
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1206
        {
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1207
        iClientArea->ShowBubble(EFalse);     
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1208
        }
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1209
    }
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1210
    
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1211
void CAknFepVkbWindow::SetTextAlignmentL( TInt aAlignment )	
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1212
	{
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1213
	TInt currentLanguage = iDataProvider->RequestData(EAknFepDataTypeInputLanguage);
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1214
	
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1215
	if ( iInputContextField && currentLanguage != ELangNone )
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1216
		{
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1217
		iInputContextField->SetTextAlignmentL( aAlignment, currentLanguage );
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1218
		}
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1219
	}  
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1220
	
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1221
void CAknFepVkbWindow::UpdateICFTextL()
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1222
    {
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1223
    if( iInputContextField )
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1224
        {
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1225
        iInputContextField->UpdateSecretTextL();
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1226
        }
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1227
    }
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1228
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1229
// --------------------------------------------------------------------------
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1230
// Show tooltip of ICF
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1231
// --------------------------------------------------------------------------
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1232
//
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1233
void CAknFepVkbWindow::ShowTooltipOnFSQL( const TDesC& aText )
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1234
    {
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1235
    if ( UiLayout()->PenInputType() != EPluginInputModeFSQ )
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1236
        {
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1237
        return;
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1238
        }    
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1239
        
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1240
    // Calculate tooltip width
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1241
    const TPeninputCnTooltipBoxLayoutData& tooltipBoxLAF 
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1242
                                      = iLafMgr->TooltipBoxLayoutData();
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1243
    TRect tooltipRect = tooltipBoxLAF.iRect;
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1244
    // Calculate inner rect
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1245
    TRect innerRect = tooltipRect;
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1246
    innerRect.iTl += TPoint( KTooltipLeftMargin, KTooltipTopMargin );
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1247
    innerRect.iBr -= TPoint( KTooltipRightMargin, KTooltipBottomMargin );          
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1248
    const CFont* font = tooltipBoxLAF.iFont;
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1249
    // Set inner width in terms of text width
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1250
    innerRect.SetWidth( font->TextWidthInPixels( aText ) );    
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1251
    tooltipRect.iTl 
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1252
           = innerRect.iTl - TPoint( KTooltipLeftMargin, KTooltipTopMargin );
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1253
    tooltipRect.iBr 
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1254
           = innerRect.iBr + TPoint( KTooltipRightMargin, KTooltipBottomMargin );
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1255
    // Set tooltip rect in terms of inner rect
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1256
    iInputContextField->ShowTooltipL( aText, tooltipRect );    
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1257
    }
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1258
	
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1259
// --------------------------------------------------------------------------
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1260
// Hide tooltip of ICF
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1261
// --------------------------------------------------------------------------
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1262
//
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1263
void CAknFepVkbWindow::HideTooltipOnFSQ()
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1264
    {
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1265
    if ( UiLayout()->PenInputType() != EPluginInputModeFSQ )
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1266
        {
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1267
        return;
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1268
        }
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1269
    iInputContextField->HideTooltip();
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1270
    }
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1271
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1272
// --------------------------------------------------------------------------
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1273
// Hide candidate list
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1274
// --------------------------------------------------------------------------
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1275
//
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1276
void CAknFepVkbWindow::HideCandidateListOnFSQ()
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1277
    {
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1278
    if ( UiLayout()->PenInputType() != EPluginInputModeFSQ )
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1279
        {
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1280
        return;
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1281
        }
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1282
    iCandidateList->Hide( ETrue );
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1283
    }
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1284
	
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1285
// --------------------------------------------------------------------------
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1286
// Show candidate list
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1287
// --------------------------------------------------------------------------
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1288
//
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1289
void CAknFepVkbWindow::ShowCandidateListOnFSQL(TInt aAlign, const CDesCArray* aItemArray,
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1290
                                                   TInt aActiveIndex)
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1291
    {
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1292
    if (UiLayout()->PenInputType() != EPluginInputModeFSQ)
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1293
        return;
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1294
             
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1295
    iCandidateList->ClearItemsL();
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1296
    iCandidateList->SetTextAlignment((CGraphicsContext::TTextAlign) aAlign);
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1297
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1298
    if (aItemArray)
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1299
        {
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1300
		CFepLayoutChoiceList::SItem item;
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1301
		item.iCommand = 0;
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1302
		
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1303
        for (TInt i = 0; i < aItemArray->Count(); ++i)
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1304
            {
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1305
            if ((*aItemArray)[i].Length() <= item.iText.MaxLength())
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1306
                {
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1307
                item.iText.Copy((*aItemArray)[i]);
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1308
                }
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1309
            else
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1310
                {
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1311
                // Given longer than maxlength, display the part of less than max
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1312
                item.iText.Copy((*aItemArray)[i].Left(item.iText.MaxLength()));
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1313
                }
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1314
            iCandidateList->AddItemL(item);
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1315
            }
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1316
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1317
        iCandidateList->SetCurrentFocusedIndex(aActiveIndex);
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1318
        }
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1319
    
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1320
    CFepLayoutMultiLineIcf* icf = static_cast<CFepLayoutMultiLineIcf*>
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1321
         (Control(EPeninputWindowCtrlIdMultiLineICF)); 
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1322
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1323
    TPoint posBelow(0, 0);
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1324
    TPoint posRight(0, 0);
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1325
    posBelow = posRight = icf->Rect().iTl;
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1326
    icf->InlineTextPos(posBelow, posRight);
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1327
    TPoint tlPos = posRight;
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1328
    iCandidateList->Display(TRect(tlPos, tlPos), 
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1329
                            CFepLayoutPopupWnd::EDispBottomRight);
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1330
    }
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1331
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1332
// --------------------------------------------------------------------------
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1333
// Handle candidate list selected events.
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1334
// --------------------------------------------------------------------------
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1335
//
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1336
void CAknFepVkbWindow::HandleCandidateListSelectedOnFSQL
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1337
                         ( CFepUiBaseCtrl* /*aCtrl*/, const TDesC& aEventData )
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1338
    {
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1339
    if ( UiLayout()->PenInputType() != EPluginInputModeFSQ )
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1340
        {
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1341
        return;
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1342
        }
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1343
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1344
    CFepLayoutChoiceList::SEvent* event = 
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1345
            (CFepLayoutChoiceList::SEvent*)aEventData.Ptr();
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1346
    if ( event->iIndex != KErrNotFound )
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1347
        {
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1348
        TPtrC ptr;
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1349
        ptr.Set( reinterpret_cast<TUint16*>(&( event->iIndex ) ), 
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1350
                 sizeof( TInt ) );            
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1351
        UiLayout()->SignalOwner( ESignalSelectCandidate, ptr );
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1352
        }
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1353
    }
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1354
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1355
// --------------------------------------------------------------------------
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1356
// Create a candidate list control.
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1357
// --------------------------------------------------------------------------
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1358
//    
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1359
void CAknFepVkbWindow::CreateCandidateListOnFSQL()
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1360
    {
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1361
    if ( UiLayout()->PenInputType() != EPluginInputModeFSQ )
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1362
        {
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1363
        return;
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1364
        }
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1365
    
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1366
    iCandidateList = CFepLayoutScrollableList::NewL( 
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1367
                            UiLayout(), 
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1368
                            EPentinputHwrCandidateList,
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1369
                            TSize( 0, 0 ),
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1370
                            0,
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1371
                            0,
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1372
                            TSize( 0, 0 ),
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1373
                            TSize( 0, 0 ) );
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1374
         
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1375
    iCandidateList->SetImgFrId(KAknsIIDQsnFrPopupSub, 
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1376
                                KAknsIIDQsnFrFunctionButtonNormal,
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1377
                                KAknsIIDQsnFrFunctionButtonPressed,
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1378
                                KAknsIIDQsnFrFunctionButtonInactive,
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1379
                                KAknsIIDQsnFrList,
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1380
                                KAknsIIDQsnFrPopupSub);
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1381
                                
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1382
    iCandidateList->SetResourceId(R_PENINPUT_FSQ_CANDIDATE_LIST);
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1383
    iCandidateList->ConstructFromResourceL();
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1384
    iCandidateList->SetPageInfoResID( R_PENINPUT_FSQ_CANDIDATE_LIST_PAGE_NUM );
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1385
    iCandidateList->AddEventObserver( UiLayout() );
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1386
    AddControlL(iCandidateList);    
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1387
    }
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1388
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1389
// --------------------------------------------------------------------------
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1390
// Retrieve text color from skin for candidiate list.
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1391
// --------------------------------------------------------------------------
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1392
//
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1393
const TRgb CAknFepVkbWindow::CandidateListTextColorOnFSQ()
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1394
    {
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1395
    TRgb matchlistcolor = KRgbBlack;
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1396
    if ( UiLayout()->PenInputType() == EPluginInputModeFSQ )
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1397
        {
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1398
        MAknsSkinInstance* skininstance = UiLayout()->SkinInstance();
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1399
        AknsUtils::GetCachedColor( skininstance, 
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1400
                                    matchlistcolor, 
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1401
                                    KAknsIIDQsnTextColors,
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1402
                                    EAknsCIQsnTextColorsCG43 );
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1403
        }
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1404
    
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1405
    return matchlistcolor;
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1406
    }
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1407
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1408
// --------------------------------------------------------------------------
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1409
// Retrieve text color from skin for autocompletion part.
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1410
// --------------------------------------------------------------------------
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1411
//
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1412
const TRgb CAknFepVkbWindow::AutoCompletionPartColorOnFSQ()
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1413
    {
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1414
    TRgb matchlistcolor = KRgbBlack;
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1415
    if ( UiLayout()->PenInputType() == EPluginInputModeFSQ )
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1416
        {
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1417
        MAknsSkinInstance* skininstance = UiLayout()->SkinInstance();
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1418
        AknsUtils::GetCachedColor( skininstance, 
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1419
                                    matchlistcolor, 
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1420
                                    KAknsIIDQsnTextColors,
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1421
                                    EAknsCIQsnTextColorsCG64 );
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1422
        }
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1423
    
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1424
    return matchlistcolor;
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1425
    }
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1426
// --------------------------------------------------------------------------
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1427
// Set property for tooltip and candidate list.
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1428
// --------------------------------------------------------------------------
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1429
//
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1430
void CAknFepVkbWindow::SetITILayoutOnFSQ()
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1431
	{
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1432
    if ( UiLayout()->PenInputType() != EPluginInputModeFSQ 
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1433
    		|| !iLafMgr || !iLafMgr->IsValid() )
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1434
        {
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1435
        return;
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1436
        }
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1437
    
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1438
    // Addition for ITI features, read LAF data for candidate list
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1439
    const TPeninputCnCandidateListLayoutData& candidateListLAF =    
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1440
                                        iLafMgr->CandidateListLayoutData();
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1441
    iCandidateList->SizeChanged( candidateListLAF.iSelectionItemSize, 
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1442
                                 candidateListLAF.iSelectionHorMargin,
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1443
                                 candidateListLAF.iSelectionVerMargin,
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1444
                                 candidateListLAF.iSelectionNaviSize,
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1445
                                 candidateListLAF.iSelectionNaviInnerSize );    
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1446
    iCandidateList->SetPageInfoTextLineLayout
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1447
                                ( candidateListLAF.iSelectionPageTextLine );
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1448
    
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1449
    
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1450
    const CFont* itemFont = candidateListLAF.iFont;    
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1451
    TRgb textColor = CandidateListTextColorOnFSQ();
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1452
    if ( itemFont )
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1453
        {
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1454
        // Set font defined in LAF
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1455
        iCandidateList->SetTextProperty( itemFont, textColor );
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1456
        }
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1457
    else
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1458
        {
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1459
        // If font in LAF is NULL, set ICF text font to candidate list
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1460
        iCandidateList->SetTextProperty( iLafMgr->ICFTextFont(), textColor );
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1461
        }
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1462
    
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1463
    if ( iInputContextField )
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1464
        {
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1465
        // read LAF data for tooltip box
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1466
        const TPeninputCnTooltipBoxLayoutData& tooltipBoxLAF 
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1467
                                        = iLafMgr->TooltipBoxLayoutData();
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1468
        iInputContextField->TooltipBubbleCtrl()->SetTextFormat( 
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1469
                                        tooltipBoxLAF.iTooltipTextLayout );
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1470
        iInputContextField->TooltipBubbleCtrl()->SetTextColorIndex( 
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1471
                                        EAknsCIQsnTextColorsCG55 );
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1472
        iInputContextField->TooltipBubbleCtrl()->SetBitmapParam(NULL,
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1473
                                        NULL,
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1474
                                        KAknsIIDQsnFrInputPreviewSideL,
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1475
                                        KAknsIIDQsnFrInputPreviewMiddle,
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1476
                                        KAknsIIDQsnFrInputPreviewSideR);        
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1477
        iInputContextField->TooltipBubbleCtrl()->SetFrameDiff( KTooltipLeftMargin, 
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1478
        		                                               KTooltipTopMargin,
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1479
        		                                               KTooltipRightMargin,
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1480
        		                                               KTooltipBottomMargin );        
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1481
        // read color from skin for autocompletion part
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1482
        iInputContextField->SetAutoCompleteTextColor( 
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1483
                                        AutoCompletionPartColorOnFSQ() );        
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1484
        }      
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1485
    }
ecbabf52600f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1486
// End Of File