meetingrequest/mrgui/mrfieldbuilderplugin/inc/cesmrviewerlocationfield.h
branchRCL_3
changeset 64 3533d4323edc
child 80 726fba06891a
equal deleted inserted replaced
63:d189ee25cf9d 64:3533d4323edc
       
     1 /*
       
     2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:  Meeting request location field
       
    15  *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef CESMRVIEWERLOCATIONFIELD_H_
       
    20 #define CESMRVIEWERLOCATIONFIELD_H_
       
    21 
       
    22 // INCLUDES
       
    23 #include <e32base.h>
       
    24 #include <eikedwob.h>
       
    25 #include <eikmobs.h>
       
    26 #include <coecobs.h>
       
    27 
       
    28 #include "cesmrfield.h"
       
    29 
       
    30 // FORWARD DECLARATIONS
       
    31 class CMRImage;
       
    32 class CESMRRichTextViewer;
       
    33 class CAknButton;
       
    34 class CESMRFeatureSettings;
       
    35 
       
    36 /**
       
    37  * Shows the location of the meeting/event
       
    38  */
       
    39 NONSHARABLE_CLASS( CESMRViewerLocationField ): public CESMRField,
       
    40                                                       public MEikEdwinSizeObserver,
       
    41                                                       public MCoeControlObserver
       
    42     {
       
    43     public:
       
    44         /**
       
    45          * Creates new CESMRViewerLocationField object. Ownership
       
    46          * is transferred to caller.
       
    47          * @return Pointer to created object,
       
    48          */
       
    49         static CESMRViewerLocationField* NewL( );
       
    50 
       
    51 
       
    52         /**
       
    53          * C++ Destructor.
       
    54          */
       
    55         ~CESMRViewerLocationField( );
       
    56 
       
    57     protected:// From CESMRField
       
    58         void InternalizeL( MESMRCalEntry& aEntry );
       
    59         TSize MinimumSize();
       
    60         void InitializeL();
       
    61         void ListObserverSet();
       
    62         TBool ExecuteGenericCommandL( TInt aCommand );
       
    63         void SetOutlineFocusL( TBool aFocus );
       
    64         void HandleLongtapEventL( const TPoint& aPosition );
       
    65         void DynInitMenuPaneL( TInt aResourceId, CEikMenuPane* aMenuPane );
       
    66         void LockL();
       
    67         TBool SupportsLongTapFunctionalityL(
       
    68             		 const TPointerEvent &aPointerEvent );
       
    69 
       
    70     protected:
       
    71 		TBool HandleSingletapEventL( const TPoint& aPosition );
       
    72 
       
    73     protected: // From CCoeControl
       
    74         TKeyResponse OfferKeyEventL(const TKeyEvent& aEvent, TEventCode aType );
       
    75         TInt CountComponentControls() const;
       
    76         CCoeControl* ComponentControl( TInt aInd ) const;
       
    77         void SizeChanged();
       
    78         void GetCursorLineVerticalPos(TInt& aUpper, TInt& aLower);
       
    79 
       
    80     protected: // From MEikEdwinSizeObserver
       
    81         TBool HandleEdwinSizeEventL( CEikEdwin* aEdwin, TEdwinSizeEvent aType,
       
    82                 TSize aSize );
       
    83 
       
    84     protected: // From MCoeControlObserver
       
    85         void HandleControlEventL(CCoeControl* aControl,TCoeEvent aEventType);
       
    86 
       
    87     private: // Implementation
       
    88         CESMRViewerLocationField( );
       
    89         void ConstructL( );
       
    90         void SetWaypointIconL( TBool aEnabled );
       
    91         TBool HandleTapEventL( const TPoint& aPosition );
       
    92 
       
    93     private: // data
       
    94         // Own: Edwin size
       
    95         TSize iSize;
       
    96         /// Own: Field button
       
    97         CAknButton* iFieldButton;
       
    98         /// Ref: Field text label
       
    99         CESMRRichTextViewer* iRichTextViewer;
       
   100         /// Own: Waypoint icon
       
   101         CMRImage* iWaypointIcon;
       
   102         /// Own: RichTextViewer line count.
       
   103         TInt iLineCount;
       
   104         /// Own: Middle softkey command id
       
   105         TInt iMskCommandId;
       
   106         /// Own: Feature settings
       
   107         CESMRFeatureSettings* iFeatures;
       
   108     };
       
   109 
       
   110 #endif /*CESMRVIEWERLOCATIONFIELD_H_*/