meetingrequest/mrgui/mrfieldbuilderplugin/inc/cesmrlocationfield.h
changeset 0 8466d47a6819
child 16 4ce476e64c59
equal deleted inserted replaced
-1:000000000000 0:8466d47a6819
       
     1 /*
       
     2 * Copyright (c) 2007-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:  ESMR location field for CESMRListComponent
       
    15  *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef CESMRLOCATIONFIELD_H
       
    20 #define CESMRLOCATIONFIELD_H
       
    21 
       
    22 #include <e32base.h>
       
    23 #include <eikedwob.h>//MEikEdwinSizeObserver
       
    24 #include "cesmriconfield.h"
       
    25 
       
    26 //Forward declarations
       
    27 class CESMREditor;
       
    28 class CAknsFrameBackgroundControlContext;
       
    29 class MAknsControlContext;
       
    30 class CAknsFrameBackgroundControlContext;
       
    31 class CESMRFeatureSettings;
       
    32 class CFbsBitmap;
       
    33 
       
    34 /**
       
    35  * This class is a custom field control that shows the location of calendar events
       
    36  */
       
    37 NONSHARABLE_CLASS( CESMRLocationField ): public CESMRIconField, 
       
    38                                          public MEikEdwinSizeObserver,
       
    39                                          public MEikEdwinObserver
       
    40     {
       
    41 public:
       
    42     /**
       
    43      * Creates new CESMRLocationField object. Ownership
       
    44      * is transferred to caller.
       
    45      * @return Pointer to created object,
       
    46      */
       
    47     static CESMRLocationField* NewL();
       
    48 
       
    49     /**
       
    50      * C++ Destructor.
       
    51      */
       
    52     ~CESMRLocationField();
       
    53 
       
    54 public: // From CESMRField
       
    55     void InitializeL();
       
    56     void InternalizeL( MESMRCalEntry& aEntry );
       
    57     void ExternalizeL( MESMRCalEntry& aEntry );
       
    58     void SetOutlineFocusL( TBool aFocus );
       
    59     TInt ExpandedHeight() const;
       
    60     void GetMinimumVisibleVerticalArea(TInt& aUpper, TInt& aLower);
       
    61     void ListObserverSet();
       
    62     void ExecuteGenericCommandL( TInt aCommand );
       
    63     TSize BorderSize() const;
       
    64     
       
    65 public: // From MEikEdwinSizeObserver
       
    66     TBool HandleEdwinSizeEventL( CEikEdwin* aEdwin, TEdwinSizeEvent aType, TSize aSize );
       
    67 
       
    68 public: // From MEikEdwinObserver
       
    69 	void HandleEdwinEventL(CEikEdwin* aEdwin, TEdwinEvent aEventType);
       
    70     
       
    71 public: // From CCoeControl
       
    72     void ActivateL();
       
    73     void PositionChanged();
       
    74     TInt CountComponentControls() const;
       
    75     CCoeControl* ComponentControl( TInt aInd ) const;
       
    76     void SizeChanged();
       
    77     
       
    78 private:
       
    79     /**
       
    80      * Constructor.
       
    81      */
       
    82     CESMRLocationField();
       
    83 
       
    84     /**
       
    85      * Second phase constructor.
       
    86      */
       
    87     void ConstructL();
       
    88 
       
    89     CESMRFeatureSettings& FeaturesL();
       
    90     void SetWaypointIconL( TBool aEnabled );
       
    91     void PositionFieldElements();
       
    92     void LayoutWaypointIcon();
       
    93     
       
    94     // From MESMRFieldEventObserver
       
    95     void HandleFieldEventL( const MESMRFieldEvent& aEvent );
       
    96     TSize CalculateEditorSize( const TSize& aSize );
       
    97     
       
    98 private:
       
    99     // Not owned. Location editor.
       
   100     CESMREditor* iLocation;
       
   101     // Field size.
       
   102     TSize iSize;
       
   103     // Background control context. not owned
       
   104     MAknsControlContext* iBackground;
       
   105     // Actual background for the editor. owned
       
   106     CAknsFrameBackgroundControlContext* iFrameBgContext;
       
   107     // Feature settings. own.
       
   108     CESMRFeatureSettings* iFeatures;
       
   109     // waypointicon bitmap for coordinates. Own
       
   110     CFbsBitmap* iWaypointIcon;
       
   111     // waypointicon bitmap for coordinates. Own
       
   112     CFbsBitmap* iWaypointIconMask;
       
   113     // waypointicon icon for coordinates. Own
       
   114     CEikImage* iIcon;
       
   115     // Location text. Own.
       
   116     HBufC* iLocationText;
       
   117     };
       
   118 
       
   119 #endif  // CESMRLOCATIONFIELD_H
       
   120