browserui/browser/BrowserAppSrc/BrowserGotoPane.cpp
author Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Thu, 17 Dec 2009 08:47:18 +0200
changeset 31 868cceedabd3
parent 18 4530440261a8
child 32 92a061761a7b
permissions -rw-r--r--
Revision: 200948 Kit: 200951
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
0
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
     1
/*
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
     2
* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
     3
* All rights reserved.
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
     4
* This component and the accompanying materials are made available
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
     5
* under the terms of the License "Eclipse Public License v1.0"
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
     6
* which accompanies this distribution, and is available
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
     7
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
     8
*
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
     9
* Initial Contributors:
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    10
* Nokia Corporation - initial contribution.
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    11
*
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    12
* Contributors:
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    13
*
10
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
    14
* Description:
0
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    15
*
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    16
*
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    17
*
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    18
*/
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    19
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    20
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    21
// INCLUDE FILES
18
4530440261a8 Revision: 200929
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 15
diff changeset
    22
#include <Browser_Platform_Variant.hrh>
0
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    23
#include <eikmenub.h>
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    24
#include <eikdef.h>
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    25
#include <akninfrm.h>
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    26
#include <eikon.rsg>
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    27
#include <eikenv.h>
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    28
#include <txtglobl.h>
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    29
#include <gulfont.h>
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    30
#include <txtfrmat.h>
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    31
#include <eikgted.h>
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    32
#include <aknconsts.h>
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    33
#include <akneditstateindicator.h>
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    34
#include <AknsListBoxBackgroundControlContext.h>
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    35
#include <BrowserNG.rsg>
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    36
#include <Featmgr.h>
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    37
#include <fepbase.h>
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    38
#include <aknutils.h>
31
868cceedabd3 Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 18
diff changeset
    39
#include <browseruisdkcrkeys.h>
0
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    40
10
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
    41
#include <centralrepository.h>
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
    42
#include <AknLayout2ScalableDef.h>
0
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    43
#include <AknFepInternalCRKeys.h>
10
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
    44
#include <aknlayoutfont.h>
0
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    45
#include <PtiDefs.h>
10
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
    46
#include <aknlayoutscalable_avkon.cdl.h>
0
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    47
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    48
#include "CommonConstants.h"
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    49
#include "BrowserGotoPane.h"
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    50
#include "BrowserAppUi.h"
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    51
#include "BrowserUtil.h"
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    52
#include "browser.hrh"
31
868cceedabd3 Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 18
diff changeset
    53
#include "favouriteslimits.h"
0
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    54
#include "BrowserAdaptiveListPopup.h"
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    55
#include "BrowserContentView.h"
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    56
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    57
#include "eikon.hrh"
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    58
10
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
    59
#include <StringLoader.h>
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
    60
0
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    61
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    62
// ---------------------------------------------------------------------------
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    63
// CBrowserGotoPane::NewL
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    64
// ---------------------------------------------------------------------------
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    65
//
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    66
CBrowserGotoPane* CBrowserGotoPane::NewL(
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    67
        const CCoeControl* aParent, TInt aIconBitmapId, TInt aIconMaskId,
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    68
        TBool aPopupListStatus, CBrowserContentView* aContentView,
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    69
        TBool aFindKeywordMode )
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    70
    {
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    71
    CBrowserGotoPane* gotoPane = new(ELeave)
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    72
        CBrowserGotoPane( aContentView, aFindKeywordMode );
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    73
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    74
    CleanupStack::PushL( gotoPane );
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    75
    gotoPane->ConstructL( aParent, aIconBitmapId, aIconMaskId, aPopupListStatus );
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    76
    gotoPane->MakeVisibleL( EFalse );
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    77
    gotoPane->SetFocus( EFalse );
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    78
    CleanupStack::Pop();    // gotoPane
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    79
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    80
    return gotoPane;
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    81
    }
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    82
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    83
// ---------------------------------------------------------------------------
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    84
// CBrowserGotoPane::MakeVisibleL
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    85
// ---------------------------------------------------------------------------
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    86
//
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    87
void CBrowserGotoPane::MakeVisibleL( TBool aVisible )
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    88
    {
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    89
    if ( aVisible )
10
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
    90
        {
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
    91
        if ( iSearchEditor )
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
    92
            {
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
    93
            ConstructSearchPaneL();
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
    94
            }
0
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    95
        HandleFindSizeChanged();
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    96
        if ( AUTOCOMP ) //ask the feature manager
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    97
        {
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    98
        //2.1 does not put http:// there
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    99
            SetTextL( KNullDesC );
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   100
        }
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   101
        else
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   102
        {
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   103
        //2.0 does put the http:// there
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   104
            SetTextL( KHttpString );
10
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   105
            }
0
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   106
        }
10
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   107
    else
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   108
        {
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   109
        // Clear the search text if goto is cancelled ( hidden ).
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   110
        if ( iSearchEditor )
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   111
            {
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   112
            SetSearchTextL( KNullDesC );
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   113
            }
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   114
        }
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   115
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   116
    if (AknLayoutUtils::PenEnabled() &&  ( !iSearchEditor )  )
0
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   117
        {
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   118
        SetPointerCapture(aVisible);
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   119
        if (aVisible)
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   120
            {
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   121
            ActivateVKB();
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   122
            }
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   123
        }
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   124
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   125
    CCoeControl::MakeVisible( aVisible );
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   126
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   127
    iGotoKeyHandled->Reset();
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   128
    iGotoKeyHandled->EnableL( aVisible );
10
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   129
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   130
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   131
    if ( iSearchEditor )
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   132
        {
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   133
        SetTextModeItalicL();
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   134
        }
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   135
    // To avoid Flickring Effect when SearchInputFrame is
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   136
    // re-created with new search provider icon.
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   137
    DrawNow( );
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   138
0
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   139
    }
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   140
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   141
// ---------------------------------------------------------------------------
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   142
// CBrowserGotoPane::MakeVisible
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   143
// ---------------------------------------------------------------------------
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   144
//
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   145
void CBrowserGotoPane::MakeVisible( TBool aVisible )
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   146
    {
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   147
    TRAP_IGNORE( MakeVisibleL( aVisible ) );
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   148
    }
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   149
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   150
// ---------------------------------------------------------------------------
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   151
// CBrowserGotoPane::~CBrowserGotoPane
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   152
// ---------------------------------------------------------------------------
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   153
//
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   154
CBrowserGotoPane::~CBrowserGotoPane()
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   155
    {
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   156
    if (iAvkonAppUi!=NULL)
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   157
        {
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   158
        iAvkonAppUi->RemoveFromStack( iGotoKeyHandled );
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   159
        }
10
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   160
    delete iSearchEditor;
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   161
    delete iSearchInputFrame;
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   162
0
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   163
    delete iGotoKeyHandled;
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   164
    delete iEditor;
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   165
    delete iInputFrame;
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   166
    delete iPrevKeyword;
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   167
    delete iBAdaptiveListPopup;
10
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   168
    delete iDefaultSearchText;
0
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   169
    iContentView = NULL;
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   170
    CCoeEnv::Static()->RemoveFepObserver(static_cast<MCoeFepObserver &>(*this));
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   171
    }
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   172
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   173
// ---------------------------------------------------------------------------
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   174
// CBrowserGotoPane::CBrowserGotoPane
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   175
// ---------------------------------------------------------------------------
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   176
//
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   177
CBrowserGotoPane::CBrowserGotoPane( CBrowserContentView* aContentView, TBool aFindKeywordMode )
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   178
:   iContentView( aContentView),
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   179
    iFindKeywordMode( aFindKeywordMode ),
10
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   180
    iHandleFEPFind( ETrue ),
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   181
    iBAdaptiveListPopup( NULL ),
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   182
    iGotoPaneActive( ETrue ),
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   183
    iSearchPaneActive( EFalse),
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   184
    iSearchIconId( 0 )
0
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   185
    {
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   186
    }
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   187
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   188
// ---------------------------------------------------------------------------
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   189
// CBrowserGotoPane::ConstructL
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   190
// ---------------------------------------------------------------------------
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   191
//
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   192
void CBrowserGotoPane::ConstructL ( const CCoeControl* aParent, TInt aIconBitmapId, TInt aIconMaskId,
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   193
            TBool
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   194
            aPopupListStatus
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   195
            )
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   196
    {
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   197
    CreateWindowL();
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   198
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   199
    // remove 'const' modifier and set parent control
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   200
    SetMopParent( CONST_CAST( CCoeControl*, aParent ) );
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   201
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   202
    iEditor = new (ELeave) CEikGlobalTextEditor;
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   203
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   204
    iInputFrame = CAknInputFrame::NewL(
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   205
        iEditor,
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   206
        EFalse,
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   207
        KAvkonBitmapFile,
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   208
        aIconBitmapId,
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   209
        aIconMaskId,
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   210
        CAknInputFrame::EPopupLayout );
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   211
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   212
    iInputFrame->SetContainerWindowL( *this );
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   213
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   214
    AknEditUtils::ConstructEditingL (   iEditor,
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   215
                                        KFavouritesMaxUrlGotoPaneDefine,
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   216
                                        1,
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   217
                                        EAknEditorCharactersLowerCase,
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   218
                                        EAknEditorAlignRight,
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   219
                                        EFalse,
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   220
                                        ETrue,
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   221
                                        EFalse );
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   222
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   223
    iEditor->SetContainerWindowL( *this );
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   224
    iEditor->SetObserver( this );
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   225
    iEditor->SetBorder( TGulBorder::ENone );
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   226
    iEditor->SetAknEditorCase( EAknEditorLowerCase );
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   227
    iEditor->SetAknEditorInputMode( EAknEditorTextInputMode );
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   228
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   229
    if (AVKONAPAC)
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   230
        {
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   231
        // Disallow chinese input.
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   232
        iEditor->SetAknEditorAllowedInputModes( EAknEditorTextInputMode |
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   233
                                            EAknEditorNumericInputMode );
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   234
        }
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   235
    TInt editorFlags =  ((iFindKeywordMode) ? EAknEditorFlagDefault : EAknEditorFlagLatinInputModesOnly) |EAknEditorFlagUseSCTNumericCharmap;
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   236
#ifdef RD_INTELLIGENT_TEXT_INPUT
10
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   237
    TInt physicalKeyboards = 0;
0
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   238
    CRepository* aknFepRepository = CRepository::NewL( KCRUidAknFep );
10
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   239
    User::LeaveIfNull( aknFepRepository );
0
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   240
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   241
    aknFepRepository->Get( KAknFepPhysicalKeyboards,  physicalKeyboards );
10
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   242
    delete aknFepRepository;
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   243
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   244
    if ( physicalKeyboards &&   EPtiKeyboardQwerty3x11 ) {
0
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   245
        editorFlags = (editorFlags | EAknEditorFlagNoT9);
10
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   246
    }
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   247
#endif
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   248
    iEditor->SetAknEditorFlags( editorFlags );
0
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   249
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   250
    iEditor->SetAknEditorPermittedCaseModes (   EAknEditorUpperCase |
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   251
                                                EAknEditorLowerCase );
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   252
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   253
    iGotoKeyHandled = new (ELeave) CBrowserKeyEventHandled( *this );
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   254
    iAvkonAppUi->AddToStackL( iGotoKeyHandled,
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   255
                                ECoeStackPriorityFep + 1,
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   256
                                ECoeStackFlagRefusesFocus );
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   257
    iEditor->SetEdwinObserver( iGotoKeyHandled );
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   258
    iEditor->SetSkinBackgroundControlContextL(NULL);
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   259
10
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   260
    TBool searchFeature = iContentView->ApiProvider().Preferences().SearchFeature();
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   261
    if (  searchFeature && !iFindKeywordMode )
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   262
        {
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   263
        iDefaultSearchText = StringLoader::LoadL( R_IS_WEB_SEARCH );
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   264
        ConstructSearchPaneL();
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   265
        }
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   266
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   267
      //adaptive popuplist
0
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   268
    if ( aPopupListStatus && AUTOCOMP )
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   269
        {
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   270
        iBAdaptiveListPopup =
10
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   271
            new (ELeave) CBrowserAdaptiveListPopup( iEditor, this, EGotoPane, searchFeature );
0
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   272
        iBAdaptiveListPopup->ConstructL();
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   273
        iEditor->SetObserver( iBAdaptiveListPopup );
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   274
        if (iContentView)
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   275
            {
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   276
            iBAdaptiveListPopup->SetUrlSuffixList(iContentView->ApiProvider().Preferences().URLSuffixList());
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   277
            iBAdaptiveListPopup->SetMaxRecentUrls(iContentView->ApiProvider().Preferences().MaxRecentUrls());
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   278
            }
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   279
        }
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   280
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   281
    CCoeEnv::Static()->AddFepObserverL(static_cast<MCoeFepObserver &>(*this));
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   282
    iPrevKeyword = KNullDesC().AllocL();
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   283
    }
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   284
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   285
// ---------------------------------------------------------------------------
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   286
// CBrowserGotoPane::SetOrdinalPosition
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   287
// ---------------------------------------------------------------------------
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   288
//
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   289
void CBrowserGotoPane::SetOrdinalPosition( TInt aPos )
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   290
    {
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   291
    Window().SetOrdinalPosition( aPos );
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   292
    if ( iBAdaptiveListPopup )
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   293
        {
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   294
        iBAdaptiveListPopup->SetOrdinalPosition( aPos );
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   295
        }
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   296
    }
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   297
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   298
// ---------------------------------------------------------------------------
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   299
// CBrowserGotoPane::HandleFindSizeChanged
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   300
// ---------------------------------------------------------------------------
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   301
//
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   302
void CBrowserGotoPane::HandleFindSizeChanged()
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   303
    {
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   304
    if ( !AknLayoutUtils::PenEnabled() )
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   305
        {
10
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   306
        if ( iSearchEditor && !iFindKeywordMode)
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   307
            {
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   308
            TRect clientRect = CBrowserAppUi::Static()->ClientRect();
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   309
            TAknWindowLineLayout findWindow = AknLayout::popup_find_window();
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   310
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   311
            TRect findWindowRect = AknLayoutUtils::RectFromCoords( clientRect,findWindow.il, findWindow.it,
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   312
                    findWindow.ir, findWindow.ib, findWindow.iW, findWindow.iH);
0
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   313
10
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   314
            // Now Increase the height of rect to make room for two editors (Goto + search)//
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   315
            findWindowRect.iTl.iY -= ( findWindow.iH  );
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   316
            SetRect( findWindowRect );
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   317
            }
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   318
        else
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   319
            {
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   320
            TRect parentrect = iAvkonAppUi->ApplicationRect();
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   321
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   322
            TAknLayoutRect lrect;
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   323
            lrect.LayoutRect( parentrect,
0
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   324
                        AknLayout::main_pane( CBrowserAppUi::Static()->ApplicationRect(), 0, 1, 1 )
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   325
                        );
10
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   326
            AknLayoutUtils::LayoutControl ( this,
0
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   327
                                        lrect.Rect(),
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   328
                                        AknLayout::popup_find_window() );
10
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   329
            }
0
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   330
        }
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   331
    else
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   332
        {
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   333
        // The ClientRect() will be the application rectangle minus any
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   334
        // toolbars/menu bars etc.
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   335
        AknLayoutUtils::LayoutControl ( this,
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   336
                                        CBrowserAppUi::Static()->ClientRect(),
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   337
                                        AknLayout::popup_find_window() );
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   338
        }
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   339
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   340
    }
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   341
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   342
// ---------------------------------------------------------------------------
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   343
// CBrowserGotoPane::EnableKeyEventHandler
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   344
// ---------------------------------------------------------------------------
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   345
//
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   346
void CBrowserGotoPane::EnableKeyEventHandlerL( TBool aEnable )
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   347
    {
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   348
    iGotoKeyHandled->EnableL( aEnable );
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   349
    }
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   350
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   351
// ---------------------------------------------------------------------------
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   352
// CBrowserGotoPane::HandleControlEventL
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   353
// ---------------------------------------------------------------------------
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   354
//
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   355
void CBrowserGotoPane::HandleControlEventL ( CCoeControl* /*aControl*/,
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   356
                                                        TCoeEvent aEventType )
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   357
    {
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   358
    if ( iFindKeywordMode )
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   359
        {
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   360
        if ( iEditor->AknEditorCurrentInputMode() == EAknEditorCalculatorNumberModeKeymap
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   361
            // When the user copies and paste's content to the find dialog, the editor
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   362
            // is in Text Input mode, The engine should still get the find keyword request
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   363
            || iEditor->AknEditorCurrentInputMode() == EAknEditorTextInputMode
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   364
            )
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   365
            {
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   366
            if ( aEventType == MCoeControlObserver::EEventStateChanged )
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   367
                {
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   368
                HBufC* newText = GetTextL();
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   369
                if (!newText)
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   370
                    {
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   371
                    newText = KNullDesC().AllocL();
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   372
                    }
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   373
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   374
                if ( iPrevKeyword->Compare( *newText ) )
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   375
                    {
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   376
                    delete iPrevKeyword;
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   377
                    iPrevKeyword = NULL;
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   378
                    iPrevKeyword = newText;
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   379
                    // Find the typed keyword.
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   380
                    iContentView->FindKeywordL( GetTextL() );
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   381
                    iHandleFEPFind = EFalse;
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   382
                    }
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   383
                else
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   384
                    {
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   385
                    delete newText;
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   386
                    }
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   387
                }
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   388
            }
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   389
        }
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   390
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   391
    switch (aEventType)
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   392
        {
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   393
        case EEventRequestFocus:
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   394
            {
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   395
            FocusChanged( EDrawNow );
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   396
            break;
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   397
            }
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   398
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   399
        default:
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   400
            break;
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   401
        }
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   402
    }
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   403
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   404
// ----------------------------------------------------------------------------
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   405
// CBrowserGotoPane::OfferKeyEventL
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   406
// ----------------------------------------------------------------------------
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   407
//
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   408
TKeyResponse CBrowserGotoPane::OfferKeyEventL
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   409
( const TKeyEvent& aKeyEvent, TEventCode aType )
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   410
    {
10
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   411
    TKeyResponse resp = EKeyWasNotConsumed;
0
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   412
10
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   413
    if (    AknLayoutUtils::PenEnabled()
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   414
         && PopupList()
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   415
         && PopupList()->DrawableWindow()->OrdinalPosition() > 0 )
0
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   416
        {
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   417
        PopupList()->SetOrdinalPosition(0);
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   418
        }
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   419
10
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   420
    if ( aType == EEventKey && aKeyEvent.iCode == EKeyEscape )  // Escape key event handling
0
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   421
        {
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   422
        CCoeEnv::Static()->AppUi()->RemoveFromStack( this );
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   423
        if ( PopupList() )
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   424
            {
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   425
            PopupList()->SetDirectoryModeL( ETrue );
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   426
            PopupList()->HidePopupL();
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   427
            }
10
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   428
        MakeVisible( EFalse );                                  // Hide Goto pane
0
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   429
        SetFocus( EFalse );
10
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   430
        resp = EKeyWasConsumed;                                 // should set the focus of container to ETrue...how?
0
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   431
        }
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   432
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   433
    if ( iFindKeywordMode )
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   434
        {
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   435
        if ( iContentView->MenuBar()->MenuPane()->IsVisible() )
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   436
            {
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   437
            return iContentView->MenuBar()->MenuPane()->OfferKeyEventL(  aKeyEvent, aType );
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   438
            }
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   439
        else
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   440
            {
10
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   441
            if ( aType == EEventKey )                           // Handle up and down arow keys to search for
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   442
                {                                               //   next and previous keywords.
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   443
0
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   444
                if (    aKeyEvent.iCode == EKeyLeftUpArrow      // Northwest
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   445
                     || aKeyEvent.iCode == EStdKeyDevice10      //   : Extra KeyEvent supports diagonal event simulator wedge
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   446
                     || aKeyEvent.iCode == EKeyUpArrow          // North
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   447
                     || aKeyEvent.iCode == EKeyRightUpArrow     // Northeast
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   448
                     || aKeyEvent.iCode == EStdKeyDevice11 )    //   : Extra KeyEvent supports diagonal event simulator wedge
10
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   449
                    {                                           // Any of those? If so, then...
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   450
                    iContentView->FindKeywordL( NULL, EFalse ); // Find previous keyword
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   451
                    iHandleFEPFind = EFalse;                    //   :
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   452
                    return EKeyWasConsumed;                     // And that consumes the key
0
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   453
                    }
10
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   454
0
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   455
                if (    aKeyEvent.iCode == EKeyLeftDownArrow    // Southwest
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   456
                     || aKeyEvent.iCode == EStdKeyDevice13      //   : Extra KeyEvent supports diagonal event simulator wedge
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   457
                     || aKeyEvent.iCode == EKeyDownArrow        // South
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   458
                     || aKeyEvent.iCode == EKeyRightDownArrow   // Southeast
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   459
                     || aKeyEvent.iCode == EStdKeyDevice12 )    //   : Extra KeyEvent supports diagonal event simulator wedge
10
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   460
                    {                                           // Any of those? If so, then...
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   461
                    iContentView->FindKeywordL( NULL, ETrue );  // Find next keyword
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   462
                    iHandleFEPFind = EFalse;                    //   :
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   463
                    return EKeyWasConsumed;                     // And that consumes the key
0
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   464
                    }
10
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   465
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   466
                if ( aKeyEvent.iCode == EKeyDevice3 )           // Select key?
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   467
                    {                                           // If so, then...
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   468
                    return EKeyWasConsumed;                     // Ignore select key
0
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   469
                    }
10
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   470
0
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   471
                }
10
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   472
            return iEditor->OfferKeyEventL( aKeyEvent, aType );  // Otherwise, just pass the key on to the editor
0
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   473
            }
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   474
        }
10
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   475
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   476
    else                                                        // *NOT* iFindKeywordMode
0
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   477
        {
10
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   478
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   479
        if (    aKeyEvent.iCode == EKeyRightUpArrow             // Northeast
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   480
             || aKeyEvent.iCode == EStdKeyDevice11              //   : Extra KeyEvent supports diagonal event simulator wedge
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   481
             || aKeyEvent.iCode == EKeyRightDownArrow           // Southeast
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   482
             || aKeyEvent.iCode == EStdKeyDevice12              //   : Extra KeyEvent supports diagonal event simulator wedge
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   483
             || aKeyEvent.iCode == EKeyLeftDownArrow            // Southwest
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   484
             || aKeyEvent.iCode == EStdKeyDevice13              //   : Extra KeyEvent supports diagonal event simulator wedge
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   485
             || aKeyEvent.iCode == EKeyLeftUpArrow              // Northwest
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   486
             || aKeyEvent.iCode == EStdKeyDevice10 )            //   : Extra KeyEvent supports diagonal event simulator wedge
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   487
            {                                                   // Any of those? If so, then...
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   488
            return EKeyWasConsumed;                             // Ignore diagonal navigation events here
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   489
            }
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   490
15
e45c3f40ea5f Revision: 200919
Pat Downey <patrick.downey@nokia.com>
parents: 10
diff changeset
   491
        // For touch UI, handle enter key from VKB as a "GOTO"
e45c3f40ea5f Revision: 200919
Pat Downey <patrick.downey@nokia.com>
parents: 10
diff changeset
   492
        if (AknLayoutUtils::PenEnabled() && aKeyEvent.iCode == EKeyEnter)
e45c3f40ea5f Revision: 200919
Pat Downey <patrick.downey@nokia.com>
parents: 10
diff changeset
   493
            {
e45c3f40ea5f Revision: 200919
Pat Downey <patrick.downey@nokia.com>
parents: 10
diff changeset
   494
            CBrowserAppUi::Static()->ActiveView()->HandleCommandL(EWmlCmdGotoPaneGoTo);
e45c3f40ea5f Revision: 200919
Pat Downey <patrick.downey@nokia.com>
parents: 10
diff changeset
   495
            return EKeyWasConsumed;
e45c3f40ea5f Revision: 200919
Pat Downey <patrick.downey@nokia.com>
parents: 10
diff changeset
   496
            }
e45c3f40ea5f Revision: 200919
Pat Downey <patrick.downey@nokia.com>
parents: 10
diff changeset
   497
        else if ( ((aKeyEvent.iCode == EKeyOK ) || (aKeyEvent.iCode == EKeyEnter))
e45c3f40ea5f Revision: 200919
Pat Downey <patrick.downey@nokia.com>
parents: 10
diff changeset
   498
             && iGPObserver 
e45c3f40ea5f Revision: 200919
Pat Downey <patrick.downey@nokia.com>
parents: 10
diff changeset
   499
             && IsFocused() )
0
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   500
            {
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   501
            if ( CBrowserAppUi::Static()->ContentView()->MenuBar()->MenuPane()->IsVisible() )
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   502
                {
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   503
                return CBrowserAppUi::Static()->ContentView()->MenuBar()->MenuPane()->OfferKeyEventL( aKeyEvent, aType );
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   504
                }
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   505
            else
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   506
                {
15
e45c3f40ea5f Revision: 200919
Pat Downey <patrick.downey@nokia.com>
parents: 10
diff changeset
   507
                // If there is an observer and we have the focus, enter key is
e45c3f40ea5f Revision: 200919
Pat Downey <patrick.downey@nokia.com>
parents: 10
diff changeset
   508
                // consumed and observer is notified.
0
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   509
                iGPObserver->HandleGotoPaneEventL
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   510
                                ( this, MGotoPaneObserver::EEventEnterKeyPressed );
15
e45c3f40ea5f Revision: 200919
Pat Downey <patrick.downey@nokia.com>
parents: 10
diff changeset
   511
                return EKeyWasConsumed;
e45c3f40ea5f Revision: 200919
Pat Downey <patrick.downey@nokia.com>
parents: 10
diff changeset
   512
                }
e45c3f40ea5f Revision: 200919
Pat Downey <patrick.downey@nokia.com>
parents: 10
diff changeset
   513
            }        
0
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   514
10
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   515
        if ( iSearchEditor && iSearchPaneActive )
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   516
            {
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   517
            resp = iSearchEditor->OfferKeyEventL( aKeyEvent, aType );
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   518
            }
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   519
        else
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   520
            {
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   521
            resp = iEditor->OfferKeyEventL( aKeyEvent, aType );
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   522
            }
0
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   523
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   524
        if ((iBAdaptiveListPopup ) && (resp != EKeyWasConsumed))
10
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   525
          {
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   526
          resp = iBAdaptiveListPopup->OfferKeyEventL( aKeyEvent, aType );
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   527
          }
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   528
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   529
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   530
        if ( iSearchEditor )
0
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   531
            {
10
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   532
            if (    ( iGotoPaneActive || iSearchPaneActive)
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   533
                 && (resp != EKeyWasConsumed) )
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   534
                {
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   535
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   536
                if (  aKeyEvent.iCode == EKeyUpArrow )
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   537
                    {
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   538
                    resp = EKeyWasConsumed;
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   539
                    if ( iSearchPaneActive )
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   540
                        {
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   541
                        SetGotoPaneActiveL();
18
4530440261a8 Revision: 200929
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 15
diff changeset
   542
4530440261a8 Revision: 200929
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 15
diff changeset
   543
#if defined(BRDO_SEARCH_INTEGRATION_FF)
10
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   544
                        iEditor->RemoveFlagFromUserFlags( CEikEdwin::EAvkonDisableVKB );
18
4530440261a8 Revision: 200929
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 15
diff changeset
   545
#endif
4530440261a8 Revision: 200929
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 15
diff changeset
   546
10
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   547
                        }
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   548
                    }
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   549
                if ( aKeyEvent.iCode == EKeyDownArrow )
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   550
                    {
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   551
                    resp = EKeyWasConsumed;
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   552
                    if ( iGotoPaneActive )
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   553
                        {
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   554
                        SetSearchPaneActiveL();
18
4530440261a8 Revision: 200929
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 15
diff changeset
   555
4530440261a8 Revision: 200929
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 15
diff changeset
   556
#if defined(BRDO_SEARCH_INTEGRATION_FF)
10
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   557
                        iSearchEditor->RemoveFlagFromUserFlags( CEikEdwin::EAvkonDisableVKB );
18
4530440261a8 Revision: 200929
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 15
diff changeset
   558
#endif
4530440261a8 Revision: 200929
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 15
diff changeset
   559
10
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   560
                        }
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   561
                    }
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   562
                }
0
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   563
            }
18
4530440261a8 Revision: 200929
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 15
diff changeset
   564
0
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   565
        }
10
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   566
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   567
    return resp;
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   568
0
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   569
    }
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   570
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   571
// ----------------------------------------------------------------------------
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   572
// CBrowserGotoPane::HandlePointerEventL
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   573
// ----------------------------------------------------------------------------
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   574
//
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   575
void CBrowserGotoPane::HandlePointerEventL(const TPointerEvent& aPointerEvent)
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   576
    {
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   577
    if ( !AknLayoutUtils::PenEnabled() )
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   578
        {
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   579
        return;
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   580
        }
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   581
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   582
    // ponter is in goto pane
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   583
    if (Rect().Contains(aPointerEvent.iPosition))
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   584
        {
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   585
        iGotoKeyHandled->EnableL(ETrue);
18
4530440261a8 Revision: 200929
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 15
diff changeset
   586
10
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   587
        // If search feature exists, check and route to appropriate editor //
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   588
        if ( iSearchEditor  )
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   589
            {
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   590
            if ( iSearchInputFrame->Rect().Contains(aPointerEvent.iPosition))
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   591
                {
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   592
                if ( iSearchPaneActive )
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   593
                    {
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   594
                    iSearchEditor->HandlePointerEventL(aPointerEvent);
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   595
                    }
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   596
                else
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   597
                    {
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   598
                    SetSearchPaneActiveL();
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   599
                    }
18
4530440261a8 Revision: 200929
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 15
diff changeset
   600
#if defined(BRDO_SEARCH_INTEGRATION_FF)
10
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   601
                iSearchEditor->RemoveFlagFromUserFlags( CEikEdwin::EAvkonDisableVKB);
18
4530440261a8 Revision: 200929
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 15
diff changeset
   602
#endif
10
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   603
                }
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   604
            else
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   605
                {
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   606
                if ( iGotoPaneActive )
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   607
                    {
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   608
                    iEditor->HandlePointerEventL(aPointerEvent);
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   609
                    }
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   610
                else
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   611
                    {
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   612
                    SetGotoPaneActiveL();
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   613
                    }
18
4530440261a8 Revision: 200929
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 15
diff changeset
   614
#if defined(BRDO_SEARCH_INTEGRATION_FF)
10
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   615
                iEditor->RemoveFlagFromUserFlags( CEikEdwin::EAvkonDisableVKB);
18
4530440261a8 Revision: 200929
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 15
diff changeset
   616
#endif
10
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   617
                }
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   618
            }
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   619
        else
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   620
            {
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   621
            iEditor->HandlePointerEventL(aPointerEvent);
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   622
            }
0
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   623
        iGotoKeyHandled->SetFirstKeyEvent(EFalse);
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   624
        }
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   625
    else
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   626
        {
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   627
        // pointer outside of control
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   628
        CBrowserAppUi::Static()->ActiveView()->HandleCommandL(EWmlCmdGotoPaneCancel);
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   629
        }
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   630
    }
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   631
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   632
// ----------------------------------------------------------------------------
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   633
// CBrowserGotoPane::CountComponentControls
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   634
// ----------------------------------------------------------------------------
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   635
//
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   636
TInt CBrowserGotoPane::CountComponentControls() const
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   637
    {
10
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   638
    if ( iSearchEditor && !iFindKeywordMode )
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   639
        {
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   640
        return 4; // iEditor, input frame, SearchEditor and Searchinput frame.
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   641
        }
0
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   642
    return 2;   // iEditor and input frame
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   643
    }
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   644
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   645
// ----------------------------------------------------------------------------
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   646
// CBrowserGotoPane::ComponentControl
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   647
// ----------------------------------------------------------------------------
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   648
//
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   649
CCoeControl* CBrowserGotoPane::ComponentControl ( TInt aIndex ) const
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   650
    {
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   651
    switch(aIndex)
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   652
        {
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   653
        case 0:
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   654
            {
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   655
            return iInputFrame;
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   656
            }
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   657
        case 1:
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   658
            {
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   659
            return iEditor;
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   660
            }
10
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   661
        case 2:
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   662
            {
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   663
            return iSearchInputFrame;
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   664
            }
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   665
        case 3:
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   666
            {
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   667
            return iSearchEditor;
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   668
            }
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   669
0
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   670
        default:
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   671
            return NULL;
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   672
        }
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   673
    }
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   674
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   675
// ----------------------------------------------------------------------------
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   676
// CBrowserGotoPane::SizeChanged
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   677
// ----------------------------------------------------------------------------
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   678
//
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   679
void CBrowserGotoPane::SizeChanged()
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   680
    {
10
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   681
    if (iSearchEditor && !iFindKeywordMode )
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   682
        {
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   683
        // We need height and width of FindWindow
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   684
        TAknWindowLineLayout findWindow = AknLayout::popup_find_window();
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   685
        TRect findWindowRect = AknLayoutUtils::RectFromCoords( Rect(), findWindow.il,
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   686
                findWindow.it, findWindow.ir, findWindow.ib, findWindow.iW, findWindow.iH);
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   687
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   688
        TSize gotoSize( findWindowRect.Size() );
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   689
        TRect gotoRect( TPoint( 0,0 ), gotoSize );
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   690
        iInputFrame->SetRect( gotoRect );
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   691
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   692
        // Now set SearchPane right below GoTo pane //
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   693
        TRect searchRect( TPoint( 0, gotoRect.iBr.iY ), gotoSize );
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   694
        iSearchInputFrame->SetRect( searchRect );
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   695
        }
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   696
    else
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   697
        {
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   698
        iInputFrame->SetRect( Rect() );
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   699
        }
0
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   700
    }
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   701
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   702
// ----------------------------------------------------------------------------
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   703
// CBrowserGotoPane::FocusChanged
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   704
// ----------------------------------------------------------------------------
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   705
//
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   706
void CBrowserGotoPane::FocusChanged( TDrawNow aDrawNow )
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   707
    {
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   708
    // this is a workaround
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   709
    TRAP_IGNORE( iGotoKeyHandled->EnableL( IsFocused() ) );
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   710
    CCoeControl::FocusChanged( aDrawNow );
10
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   711
    if ( iGotoPaneActive )
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   712
        {
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   713
        iEditor->SetFocus( IsFocused() );
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   714
        }
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   715
    else if ( iSearchEditor && !iFindKeywordMode && iSearchPaneActive )
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   716
        {
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   717
        iSearchEditor->SetFocus( IsFocused() );
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   718
        }
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   719
    }
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   720
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   721
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   722
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   723
// ----------------------------------------------------------------------------
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   724
// CBrowserGotoPane::TextLength
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   725
// ----------------------------------------------------------------------------
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   726
//
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   727
TInt CBrowserGotoPane::SearchTextLength() const
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   728
    {
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   729
    TInt len = 0;
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   730
    if ( iSearchEditor )
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   731
        {
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   732
        len = iSearchEditor->TextLength();
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   733
        }
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   734
    return len;
0
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   735
    }
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   736
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   737
// ----------------------------------------------------------------------------
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   738
// CBrowserGotoPane::TextLength
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   739
// ----------------------------------------------------------------------------
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   740
//
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   741
TInt CBrowserGotoPane::TextLength() const
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   742
    {
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   743
    return iEditor->TextLength();
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   744
    }
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   745
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   746
// ----------------------------------------------------------------------------
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   747
// CBrowserGotoPane::GetText
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   748
// ----------------------------------------------------------------------------
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   749
//
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   750
HBufC* CBrowserGotoPane::GetTextL() const
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   751
    {
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   752
    HBufC *retVal = NULL;
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   753
10
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   754
    if ( TextLength()
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   755
            || SearchTextLength()
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   756
            || iFindKeywordMode)
0
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   757
        {
10
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   758
        if ( iSearchEditor && iSearchPaneActive )
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   759
            {
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   760
            retVal = HBufC::NewL( SearchTextLength() + 1 );
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   761
            }
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   762
        else
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   763
            {
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   764
            retVal = HBufC::NewL( TextLength() + 1 );
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   765
            }
0
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   766
        TPtr ptr = retVal->Des();
10
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   767
        if ( iSearchEditor && iSearchPaneActive )
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   768
            {
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   769
            iSearchEditor->GetText( ptr );
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   770
            }
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   771
        else
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   772
            {
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   773
            iEditor->GetText( ptr );
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   774
            }
0
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   775
        ptr.ZeroTerminate();
10
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   776
        if ( !iFindKeywordMode && !iSearchPaneActive )
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   777
            {
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   778
            Util::EncodeSpaces(retVal);
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   779
            }
0
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   780
        }
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   781
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   782
    return retVal;
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   783
    }
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   784
10
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   785
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   786
// ----------------------------------------------------------------------------
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   787
// CBrowserGotoPane::SetSearchTextL
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   788
// ----------------------------------------------------------------------------
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   789
//
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   790
void CBrowserGotoPane::SetSearchTextL( const TDesC& aTxt )
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   791
    {
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   792
    // for search pane, no default text
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   793
    if ( aTxt == KHttpString || aTxt == KWWWString)
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   794
        {
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   795
        iSearchEditor->SetTextL( &KNullDesC );
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   796
        }
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   797
    else
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   798
        {
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   799
        iSearchEditor->SetTextL( &aTxt );
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   800
        }
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   801
    TInt curPos = SearchTextLength();
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   802
    // Cursor to end, no selection.
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   803
    iSearchEditor->SetSelectionL( curPos, curPos );
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   804
    iSearchEditor->DrawNow();
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   805
    }
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   806
0
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   807
// ----------------------------------------------------------------------------
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   808
// CBrowserGotoPane::SetTextL
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   809
// ----------------------------------------------------------------------------
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   810
//
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   811
void CBrowserGotoPane::SetTextL( const TDesC& aTxt )
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   812
    {
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   813
    iEditor->SetTextL( &aTxt );
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   814
    TInt curPos = TextLength();
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   815
    // Cursor to end, no selection.
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   816
    iEditor->SetSelectionL( curPos, curPos );
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   817
    iEditor->DrawNow();
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   818
    }
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   819
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   820
// ----------------------------------------------------------------------------
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   821
// CBrowserGotoPane::SelectAllL
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   822
// ----------------------------------------------------------------------------
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   823
//
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   824
void CBrowserGotoPane::SelectAllL()
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   825
    {
10
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   826
    if ( iSearchEditor && iSearchPaneActive )
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   827
        {
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   828
        iSearchEditor->SelectAllL();
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   829
        }
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   830
    else
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   831
        {
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   832
        iEditor->SelectAllL();
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   833
        }
0
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   834
    }
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   835
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   836
// ----------------------------------------------------------------------------
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   837
// CBrowserGotoPane::SetInfoTextL
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   838
// ----------------------------------------------------------------------------
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   839
//
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   840
void CBrowserGotoPane::SetInfoTextL( const TDesC& aText )
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   841
    {
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   842
    iInputFrame->SetInfoTextL( aText );
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   843
    }
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   844
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   845
// ----------------------------------------------------------------------------
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   846
// CBrowserGotoPane::ClipboardL
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   847
// ----------------------------------------------------------------------------
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   848
//
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   849
void CBrowserGotoPane::ClipboardL( CEikEdwin::TClipboardFunc aClipboardFunc )
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   850
    {
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   851
    iEditor->ClipboardL( aClipboardFunc );
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   852
    }
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   853
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   854
// ----------------------------------------------------------------------------
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   855
// CBrowserGotoPane::Editor
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   856
// ----------------------------------------------------------------------------
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   857
CEikEdwin* CBrowserGotoPane::Editor() const
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   858
    {
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   859
    return iEditor;
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   860
    }
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   861
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   862
// ----------------------------------------------------------------------------
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   863
// CBrowserGotoPane::SetGPObserver
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   864
// ----------------------------------------------------------------------------
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   865
//
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   866
void CBrowserGotoPane::SetGPObserver( MGotoPaneObserver* aObserver )
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   867
    {
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   868
    __ASSERT_DEBUG( !iGPObserver, \
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   869
        Util::Panic( Util::EGotoPaneObserverAlreadySet ) );
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   870
    iGPObserver = aObserver;
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   871
    }
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   872
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   873
// ----------------------------------------------------------------------------
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   874
// CBrowserKeyEventHandled::CBrowserKeyEventHandled
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   875
// ----------------------------------------------------------------------------
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   876
//
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   877
CBrowserKeyEventHandled::CBrowserKeyEventHandled(
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   878
                                    CBrowserGotoPane& aGotoPane ) :
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   879
    iEnabled( EFalse )
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   880
    ,iFirstKeyEvent( ETrue )
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   881
    ,iLeftRightEvent ( EFalse )
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   882
    ,iGotoPane( aGotoPane )
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   883
    {
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   884
    }
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   885
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   886
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   887
// ----------------------------------------------------------------------------
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   888
// CBrowserKeyEventHandled::OfferKeyEventL
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   889
// ----------------------------------------------------------------------------
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   890
//
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   891
TKeyResponse
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   892
    CBrowserKeyEventHandled::OfferKeyEventL( const TKeyEvent& aKeyEvent,
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   893
                                                TEventCode aType)
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   894
    {
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   895
    TKeyResponse response( EKeyWasNotConsumed );
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   896
    iLeftRightEvent = EFalse;
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   897
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   898
    if ( iEnabled && aType == EEventKey )
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   899
        {
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   900
        switch( aKeyEvent.iCode )
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   901
            {
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   902
            case    EKeyUpArrow:
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   903
            case    EKeyDownArrow:
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   904
                {
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   905
                iFirstKeyEvent = EFalse;
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   906
                break;
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   907
                }
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   908
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   909
            case    EKeyLeftArrow:
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   910
            case    EKeyRightArrow:
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   911
                {
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   912
                iFirstKeyEvent = EFalse;
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   913
                iLeftRightEvent = ETrue;
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   914
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   915
                // Below added to compensate for a weird key event situation:
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   916
                //   For some reason the CBrowserGotoPane::OfferKeyEventL function
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   917
                //   is not being called for an EEventKey when you press the left/right
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   918
                //   arrows in the menupane produced to paste previously used special
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   919
                //   chars (this is brought up by pressing the pen button on the phone).
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   920
                //   This only happens when the cursor is in the first or last position in
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   921
                //   the goto pane with text in it.
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   922
                //   Therefore, in this particular scenario, we need to process the EEventKey
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   923
                //   here since we will not be able to in CBrowserGotoPane::OfferKeyEventL
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   924
                if (CBrowserAppUi::Static()->ContentView()->MenuBar()->MenuPane()->IsFocused())
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   925
                    {
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   926
                    response = CBrowserAppUi::Static()->ContentView()->MenuBar()->MenuPane()->OfferKeyEventL( aKeyEvent, aType );
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   927
                    }
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   928
                break;
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   929
                }
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   930
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   931
            case    EKeyBackspace:
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   932
            case    EKeyDelete:
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   933
                {
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   934
                if ( iFirstKeyEvent )
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   935
                    {
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   936
                    iFirstKeyEvent = EFalse;
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   937
                    iCoeEnv->SimulateKeyEventL( aKeyEvent, aType );
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   938
                    response = EKeyWasConsumed;
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   939
                    }
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   940
                break;
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   941
                }
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   942
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   943
            default:
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   944
                {
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   945
                if ( iFirstKeyEvent )
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   946
                    {
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   947
                    if ( TChar( aKeyEvent.iCode ).IsPrint() )
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   948
                        {
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   949
                        iFirstKeyEvent = EFalse;
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   950
                        response = EKeyWasConsumed;
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   951
                        iCoeEnv->SimulateKeyEventL( aKeyEvent, aType );
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   952
                        }
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   953
                    }
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   954
                break;
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   955
                }
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   956
            }
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   957
//        CBrowserAppUi::Static()->UpdateCbaL();
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   958
        }
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   959
    return response;
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   960
    }
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   961
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   962
// ----------------------------------------------------------------------------
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   963
// CBrowserKeyEventHandled::HandleEdwinEventL
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   964
// ----------------------------------------------------------------------------
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   965
//
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   966
void CBrowserKeyEventHandled::HandleEdwinEventL( CEikEdwin* /*aEdwin*/,
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   967
                                                    TEdwinEvent aEventType )
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   968
    {
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   969
    // if text changed in the editor we don't have to handle clear key anymore
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   970
    if ( aEventType == EEventTextUpdate )
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   971
        {
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   972
        iFirstKeyEvent = EFalse;
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   973
        }
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   974
    }
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   975
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   976
// ----------------------------------------------------------------------------
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   977
// CBrowserKeyEventHandled::EnableL
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   978
// ----------------------------------------------------------------------------
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   979
//
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   980
void CBrowserKeyEventHandled::EnableL( TBool aEnable )
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   981
    {
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   982
    iEnabled = aEnable;
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   983
    }
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   984
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   985
// ----------------------------------------------------------------------------
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   986
// CBrowserKeyEventHandled::Reset
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   987
// ----------------------------------------------------------------------------
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   988
//
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   989
void CBrowserKeyEventHandled::Reset()
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   990
    {
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   991
    iFirstKeyEvent = ETrue;
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   992
    }
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   993
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   994
// ---------------------------------------------------------------------------
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   995
// CBrowserGotoPane::PopupList
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   996
// ---------------------------------------------------------------------------
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   997
//
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   998
CBrowserAdaptiveListPopup* CBrowserGotoPane::PopupList()
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   999
    {
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
  1000
    return iBAdaptiveListPopup;
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
  1001
    }
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
  1002
// ---------------------------------------------------------------------------
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
  1003
// CBrowserGotoPane::HandleResourceChange
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
  1004
// ---------------------------------------------------------------------------
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
  1005
//
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
  1006
void CBrowserGotoPane::HandleResourceChange(
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
  1007
                TInt
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
  1008
                aType
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
  1009
                )
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
  1010
    {
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
  1011
    CCoeControl::HandleResourceChange( aType );
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
  1012
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
  1013
    if ( iBAdaptiveListPopup )
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
  1014
        {
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
  1015
        iBAdaptiveListPopup->HandleResourceChange( aType );
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
  1016
        }
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
  1017
    }
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
  1018
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
  1019
// ---------------------------------------------------------------------------
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
  1020
// CBrowserGotoPane::HandleStartOfTransactionL()
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
  1021
// ---------------------------------------------------------------------------
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
  1022
//
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
  1023
void CBrowserGotoPane::HandleStartOfTransactionL()
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
  1024
    {
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
  1025
    }
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
  1026
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
  1027
// ---------------------------------------------------------------------------
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
  1028
// CBrowserGotoPane::HandleCompletionOfTransactionL()
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
  1029
// ---------------------------------------------------------------------------
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
  1030
//
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
  1031
void CBrowserGotoPane::HandleCompletionOfTransactionL()
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
  1032
    {
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
  1033
    if ( iContentView && iFindKeywordMode && this->IsVisible() &&
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
  1034
        !iContentView->MenuBar()->MenuPane()->IsVisible() )
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
  1035
        {
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
  1036
        if ( GetTextL() )
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
  1037
            {
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
  1038
            // Find the typed keyword.
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
  1039
            if ( iHandleFEPFind && iPrevKeyword->Compare(GetTextL()->Des()) )
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
  1040
                {
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
  1041
                iContentView->FindKeywordL( GetTextL() );
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
  1042
                }
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
  1043
            }
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
  1044
        }
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
  1045
    iHandleFEPFind = ETrue;
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
  1046
    }
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
  1047
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
  1048
// ----------------------------------------------------------------------------
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
  1049
// CBrowserGotoPane::ActivateVKB
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
  1050
// ----------------------------------------------------------------------------
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
  1051
void CBrowserGotoPane::ActivateVKB()
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
  1052
    {
10
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1053
    if ( ( iEditor && iEditor->TextView() )
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1054
            || ( iSearchEditor && iSearchEditor->TextView()) )
0
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
  1055
        {
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
  1056
        // make sure observer is set
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
  1057
        iCoeEnv->SyncNotifyFocusObserversOfChangeInFocus();
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
  1058
10
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1059
           // simulate pointer event to force VKB
0
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
  1060
10
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1061
           // first get point at cursor location
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1062
        TInt pos = 0;
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1063
        CTextView* textView = NULL;
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1064
        if ( iSearchEditor && iSearchPaneActive )
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1065
            {
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1066
            pos = iSearchEditor->CursorPos();
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1067
            textView = iSearchEditor->TextView();
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1068
            }
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1069
        else
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1070
            {
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1071
            pos = iEditor->CursorPos();
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1072
            textView = iEditor->TextView();
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1073
            }
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1074
0
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
  1075
        TPoint curPos;
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
  1076
        textView->DocPosToXyPosL(pos, curPos);
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
  1077
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
  1078
        TPointerEvent pe;
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
  1079
        pe.iPosition = curPos;
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
  1080
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
  1081
        pe.iType = TPointerEvent::EButton1Down;
10
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1082
0
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
  1083
        TInt err(KErrNone);
10
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1084
        if ( iSearchEditor && iSearchPaneActive )
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1085
            {
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1086
            TRAP(err, iSearchEditor->HandlePointerEventL(pe));
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1087
            }
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1088
        else
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1089
            {
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1090
            TRAP(err, iEditor->HandlePointerEventL(pe));
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1091
            }
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1092
0
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
  1093
        if (err != KErrNone)
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
  1094
            {
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
  1095
            return;
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
  1096
            }
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
  1097
10
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1098
        pe.iType = TPointerEvent::EButton1Up;
0
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
  1099
10
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1100
        // VKB will only activate is nothing selected
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1101
        if ( iSearchEditor && iSearchPaneActive )
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1102
            {
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1103
            iSearchEditor->SetSelectionL(pos,pos);
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1104
            TRAP_IGNORE(iSearchEditor->HandlePointerEventL(pe));
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1105
            }
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1106
        else
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1107
            {
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1108
            iEditor->SetSelectionL(pos,pos);
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1109
            TRAP_IGNORE(iEditor->HandlePointerEventL(pe));
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1110
            }
0
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
  1111
        }
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
  1112
    }
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
  1113
10
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1114
// ----------------------------------------------------------------------------
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1115
// CBrowserGotoPane::ConstructSearchPaneL
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1116
// ----------------------------------------------------------------------------
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1117
void CBrowserGotoPane::ConstructSearchPaneL()
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1118
    {
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1119
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1120
    TFileName iconFile;
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1121
    TInt iconId = iContentView->ApiProvider().Preferences().GetIntValue( KBrowserSearchIconId );
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1122
    iContentView->ApiProvider().Preferences().GetStringValueL( KBrowserSearchIconPath, KMaxFileName, iconFile );
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1123
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1124
    // If Icon File Path Changed or Icon Id Changed, Refresh the Icon for Search Pane.
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1125
    // Comparing Icon File path as well, because it may be possible that two different
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1126
    // Icon files have same icon id.
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1127
    if ( iconId != iSearchIconId
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1128
            || iSearchIconFilePath.Compare( iconFile ) != 0 )
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1129
        {
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1130
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1131
        TInt iconMaskId = iContentView->ApiProvider().Preferences().GetIntValue( KBrowserSearchIconMaskId );
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1132
        // Save IconId
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1133
        iSearchIconId = iconId;
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1134
        // Save Icon File
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1135
        iSearchIconFilePath = iconFile;
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1136
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1137
        // No Icon file or IconId or IconMaskId set , then it means no search provider is still
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1138
        // selected and set by search application, in that case we use the default icon for Search.
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1139
        if ( ! iconFile.Length()
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1140
                || iconId == -1
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1141
                || iconMaskId == -1 )
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1142
            {
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1143
            iconId = EMbmAvkonQgn_indi_find_glass;
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1144
            iconMaskId = EMbmAvkonQgn_indi_find_glass_mask;
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1145
            iconFile = KAvkonBitmapFile;
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1146
            }
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1147
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1148
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1149
        if ( iSearchEditor )
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1150
           {
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1151
           delete iSearchEditor;
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1152
           iSearchEditor = NULL;
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1153
           }
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1154
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1155
        if ( iSearchInputFrame )
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1156
           {
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1157
           delete iSearchInputFrame;
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1158
           iSearchInputFrame = NULL;
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1159
           }
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1160
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1161
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1162
        // iSearchEditor != NULL, implies presence of Search Feature, which can be
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1163
        // used to validate search feature exsistence, avoiding unecessary feature
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1164
        // check calls and need of separate variable.
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1165
        iSearchEditor = new (ELeave) CEikGlobalTextEditor;
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1166
        iSearchInputFrame = CAknInputFrame::NewL(
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1167
                iSearchEditor,
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1168
                EFalse,
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1169
                iconFile,
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1170
                iconId,
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1171
                iconMaskId,
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1172
                CAknInputFrame::EPopupLayout );
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1173
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1174
        iSearchInputFrame->SetContainerWindowL( *this);
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1175
        AknEditUtils::ConstructEditingL (   iSearchEditor,
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1176
                                              KFavouritesMaxUrlGotoPaneDefine,
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1177
                                              1,
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1178
                                              EAknEditorCharactersLowerCase,
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1179
                                              EAknEditorAlignRight,
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1180
                                              EFalse,
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1181
                                              ETrue,
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1182
                                              EFalse );
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1183
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1184
        iSearchEditor->SetContainerWindowL( *this );
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1185
        iSearchEditor->SetObserver( this );
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1186
        iSearchEditor->SetBorder( TGulBorder::ENone );
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1187
        iSearchEditor->SetAknEditorCase( EAknEditorLowerCase );
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1188
        iSearchEditor->SetAknEditorInputMode( EAknEditorTextInputMode );
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1189
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1190
        if (AVKONAPAC)
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1191
            {
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1192
            // Disallow chinese input.
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1193
            iSearchEditor->SetAknEditorAllowedInputModes( EAknEditorTextInputMode |
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1194
                    EAknEditorNumericInputMode );
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1195
            }
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1196
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1197
        //Search should use EAknEditorFlagDefault as search allows all types of input
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1198
        iSearchEditor->SetAknEditorFlags
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1199
            ( EAknEditorFlagDefault | EAknEditorFlagUseSCTNumericCharmap );
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1200
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1201
        iSearchEditor->SetAknEditorPermittedCaseModes (   EAknEditorUpperCase |
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1202
            EAknEditorLowerCase );
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1203
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1204
        iSearchEditor->SetEdwinObserver( iGotoKeyHandled );
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1205
        iSearchEditor->SetSkinBackgroundControlContextL(NULL);
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1206
        iSearchEditor->MakeVisible( ETrue );
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1207
        iSearchInputFrame->MakeVisible( ETrue );
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1208
        // Set the default text if not active//
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1209
        if ( ! iSearchPaneActive )
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1210
            {
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1211
            SetSearchTextL( *iDefaultSearchText );
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1212
            }
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1213
        iSearchInputFrame->ActivateL();
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1214
        }
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1215
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1216
    }
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1217
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1218
// ----------------------------------------------------------------------------
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1219
// CBrowserGotoPane::SetGotoPaneActive
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1220
// ----------------------------------------------------------------------------
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1221
void CBrowserGotoPane::SetGotoPaneActiveL()
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1222
    {
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1223
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1224
    iGotoPaneActive = ETrue;
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1225
    iSearchPaneActive = EFalse;
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1226
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1227
    if ( iSearchEditor )
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1228
        {
18
4530440261a8 Revision: 200929
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 15
diff changeset
  1229
#if defined(BRDO_SEARCH_INTEGRATION_FF)
10
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1230
        iEditor->AddFlagToUserFlags( CEikEdwin::EAvkonDisableVKB );
18
4530440261a8 Revision: 200929
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 15
diff changeset
  1231
#endif
10
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1232
        // if searchpane is empty add default text
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1233
        if ( !SearchTextLength() )
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1234
            {
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1235
            SetSearchTextL( *iDefaultSearchText );
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1236
            }
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1237
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1238
        // if gotopane is empty add default text
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1239
        if ( !TextLength() )
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1240
            {
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1241
            SetTextL( KWWWString );
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1242
            }
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1243
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1244
        iSearchEditor->SetFocus( EFalse);
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1245
        }
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1246
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1247
    iEditor->SetFocus( ETrue );
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1248
    CBrowserAppUi::Static()->UpdateCbaL();
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1249
    SetTextModeItalicL();
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1250
    iEditor->SetCursorPosL(iEditor->TextLength(), EFalse);
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1251
    DrawDeferred();
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1252
    }
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1253
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1254
// ----------------------------------------------------------------------------
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1255
// CBrowserGotoPane::SetSearchPaneActive
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1256
// ----------------------------------------------------------------------------
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1257
void CBrowserGotoPane::SetSearchPaneActiveL()
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1258
    {
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1259
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1260
    if ( iSearchEditor )
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1261
        {
18
4530440261a8 Revision: 200929
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 15
diff changeset
  1262
#if defined(BRDO_SEARCH_INTEGRATION_FF)
10
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1263
        iSearchEditor->AddFlagToUserFlags( CEikEdwin::EAvkonDisableVKB );
18
4530440261a8 Revision: 200929
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 15
diff changeset
  1264
#endif
10
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1265
        // if gotopane is empty add default text
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1266
        if ( !TextLength() )
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1267
            {
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1268
            SetTextL( KWWWString );
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1269
            }
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1270
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1271
        // if searchpane has default text remove it
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1272
        HBufC* text = iSearchEditor->GetTextInHBufL();
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1273
        if ( text )
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1274
            {
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1275
            CleanupStack::PushL( text );
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1276
            if ( !text->Compare( iDefaultSearchText->Des() ) )
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1277
                {
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1278
                SetSearchTextL( KNullDesC );
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1279
                }
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1280
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1281
            CleanupStack::PopAndDestroy( text );
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1282
            }
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1283
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1284
        iSearchPaneActive = ETrue;
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1285
        iGotoPaneActive = EFalse;
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1286
        iEditor->SetFocus( EFalse );
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1287
        if ( iBAdaptiveListPopup )
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1288
            iBAdaptiveListPopup->HidePopupL();
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1289
        iSearchEditor->SetFocus( ETrue );
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1290
        iSearchEditor->SetCursorPosL(iSearchEditor->TextLength(), EFalse);
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1291
        CBrowserAppUi::Static()->UpdateCbaL();
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1292
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1293
        SetTextModeItalicL();
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1294
        DrawDeferred();
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1295
        }
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1296
    }
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1297
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1298
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1299
// ----------------------------------------------------------------------------
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1300
// CBrowserBookmarksGotoPane::SetTextModeItalic
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1301
// ----------------------------------------------------------------------------
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1302
void CBrowserGotoPane::SetTextModeItalicL()
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1303
    {
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1304
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1305
    // Editor Control is laid in a scalable way, so we need to get the correct font
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1306
    // specification for setting CharFormatLayer, We could have used GetNearestFontInTwips,
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1307
    // as done above in SetTextL() but it does not provide correct fonts for editor.
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1308
    // We do not need to set the FontPosture back to EPostureUpright ( Normal ), as it
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1309
    // is automatically handled by AknLayoutUtils::LayoutEdwinScalable called by
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1310
    // iInputFrame->SetRect(), which overwrites all the properties for Editor.
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1311
    if ( iSearchEditor )
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1312
        {
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1313
        TAknTextComponentLayout   editorLayout;
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1314
        TBool apac( AknLayoutUtils::Variant() == EApacVariant && ( CAknInputFrame::EShowIndicators ) );
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1315
        editorLayout    = AknLayoutScalable_Avkon::input_popup_find_pane_t1( apac ? 2 : 0 );
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1316
        TAknTextLineLayout lineLayout = editorLayout.LayoutLine();
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1317
        TInt fontid =  lineLayout.FontId();
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1318
        const CAknLayoutFont *font = AknLayoutUtils::LayoutFontFromId( fontid  );
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1319
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1320
        TCharFormat charFormat;
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1321
        TCharFormatMask charFormatMask;
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1322
        charFormat.iFontSpec = font->FontSpecInTwips();
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1323
        charFormat.iFontSpec.iFontStyle.SetPosture( EPostureItalic );
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1324
        charFormatMask.SetAttrib(EAttFontTypeface);
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1325
        charFormatMask.SetAttrib(EAttFontHeight);
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1326
        charFormatMask.SetAttrib(EAttFontStrokeWeight);
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1327
        charFormatMask.SetAttrib(EAttFontPosture);
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1328
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1329
        // Owner ship of charFormatLayer is taken by Editor
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1330
        CCharFormatLayer* charFormatLayerItalics = NULL;
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1331
        CCharFormatLayer* charFormatLayerUpright = NULL;
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1332
        charFormatLayerItalics = CCharFormatLayer::NewL(charFormat,charFormatMask);
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1333
        charFormat.iFontSpec.iFontStyle.SetPosture( EPostureUpright );
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1334
        charFormatLayerUpright = CCharFormatLayer::NewL(charFormat,charFormatMask);
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1335
        if ( iSearchPaneActive   )
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1336
            {
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1337
            iSearchEditor->SetCharFormatLayer(charFormatLayerUpright);
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1338
            iEditor->SetCharFormatLayer(charFormatLayerItalics);
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1339
            }
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1340
        else
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1341
            {
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1342
            iSearchEditor->SetCharFormatLayer(charFormatLayerItalics);
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1343
            iEditor->SetCharFormatLayer(charFormatLayerUpright);
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1344
            }
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1345
        }
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1346
   }
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1347
57d5b8e231c4 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
  1348
0
84ad3b177aa3 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
  1349
//  END OF FILE