meetingrequest/mrgui/mrfieldbuilderplugin/inc/cesmrdescriptionfield.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 Description field for CESMRListComponent
       
    15  *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef CESMRDESCRIPTIONFIELD_H
       
    20 #define CESMRDESCRIPTIONFIELD_H
       
    21 
       
    22 #include <eikedwob.h>
       
    23 #include <frmtlay.h>
       
    24 #include "cesmrfield.h"
       
    25 
       
    26 class CESMREditor;
       
    27 class CCalEntry;
       
    28 class CAknsFrameBackgroundControlContext;
       
    29 class CESMRRichTextLink;
       
    30 class CESMRFeatureSettings;
       
    31 
       
    32 /**
       
    33  * This class is a custom field control that shows the description of calendar events
       
    34  */
       
    35 NONSHARABLE_CLASS( CESMRDescriptionField ): public CESMRField, 
       
    36 											public MEikEdwinSizeObserver,
       
    37 											public MEikEdwinObserver
       
    38     {
       
    39 public:
       
    40     /**
       
    41      * Creates new CESMRDescriptionField object. Ownership
       
    42      * is transferred to caller.
       
    43      * @return Pointer to created object,
       
    44      */
       
    45     static CESMRDescriptionField* NewL();
       
    46 
       
    47     /**
       
    48      * C++ Destructor.
       
    49      */
       
    50     ~CESMRDescriptionField();
       
    51 
       
    52 public: // From CESMRField
       
    53     void InitializeL();
       
    54     void InternalizeL( MESMRCalEntry& aEntry );
       
    55     void ExternalizeL( MESMRCalEntry& aEntry );
       
    56     void SetOutlineFocusL( TBool aFocus );
       
    57     TInt ExpandedHeight() const;
       
    58     TInt GetVerticalFocusPosition();
       
    59     void GetMinimumVisibleVerticalArea(TInt& aUpper, TInt& aLower);
       
    60     void ListObserverSet();
       
    61     void ExecuteGenericCommandL( TInt aCommand );
       
    62 public: // From CCoeControl
       
    63     TKeyResponse OfferKeyEventL(const TKeyEvent& aEvent, TEventCode aType);
       
    64     void ActivateL();
       
    65     void PositionChanged();
       
    66 
       
    67 public: // From MEikEdwinSizeObserver
       
    68     TBool HandleEdwinSizeEventL( CEikEdwin* aEdwin, TEdwinSizeEvent aType, TSize aSize );
       
    69 
       
    70 public: // From MEikEdwinObserver
       
    71 	void HandleEdwinEventL(CEikEdwin* aEdwin,TEdwinEvent aEventType);
       
    72     
       
    73 private:
       
    74     /**
       
    75      * Constructor.
       
    76      */
       
    77     CESMRDescriptionField();
       
    78 
       
    79     /**
       
    80      * Second phase constructor.
       
    81      */
       
    82     void ConstructL();
       
    83 
       
    84     /**
       
    85      * Converts raw URL text to a link in description editor field
       
    86      *  
       
    87      * @param aEntry Calendar entry from which the description text is received
       
    88      */ 
       
    89     void StoreLinkL( MESMRCalEntry& aEntry );
       
    90 
       
    91     /**
       
    92      * Adds link to the beginning of text from editor field
       
    93      * 
       
    94      * @param abuf initial description text buffer before addition
       
    95      * 
       
    96      * @return The description text buffer with link added
       
    97      */ 
       
    98     HBufC* AddLinkToTextL( const TDesC& aBuf );
       
    99     
       
   100     /**
       
   101      * Gets feature settings
       
   102      */
       
   103     CESMRFeatureSettings& FeaturesL();
       
   104         
       
   105 private:
       
   106     /**
       
   107      * Not owned. Description editor object.
       
   108      */
       
   109     CESMREditor* iDescription;
       
   110 
       
   111     /**
       
   112      * Field size.
       
   113      */
       
   114     TSize iSize;
       
   115 
       
   116     /**
       
   117      * Background control context
       
   118      */
       
   119     MAknsControlContext* iBackground;
       
   120 
       
   121     /**
       
   122      * Actual background for the editor
       
   123      */
       
   124     CAknsFrameBackgroundControlContext* iFrameBgContext;
       
   125     
       
   126     /**
       
   127      * Own: Location Url link
       
   128      */ 
       
   129     CESMRRichTextLink* iLocationLink;
       
   130     
       
   131     /**
       
   132      * Own: Feature settings.
       
   133      */
       
   134     CESMRFeatureSettings* iFeatures;
       
   135     };
       
   136 
       
   137 #endif  // CESMRDESCRIPTIONFIELD_H
       
   138