meetingrequest/mrgui/mrfieldbuilderplugin/inc/cesmrviewerdetailedsubjectfield.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:  Detailed subject field.
       
    15  *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef CESMRVIEWERDETAILEDSUBJECTFIELD_H_
       
    20 #define CESMRVIEWERDETAILEDSUBJECTFIELD_H_
       
    21 
       
    22 // INCLUDES
       
    23 #include <e32cmn.h> // TSize
       
    24 #include <eikedwob.h> // MEikEdwinSizeObserver
       
    25 
       
    26 #include "cesmrfield.h"
       
    27 
       
    28 // FORWARD DECLARATIONS
       
    29 class CESMRRichTextViewer;
       
    30 class MESMRTitlePaneObserver;
       
    31 class CMRImage;
       
    32 
       
    33 /**
       
    34  * This field shows the whole subject of the event. Title pane
       
    35  * shows only first few words from the subject so this field is
       
    36  * needed to show it all.
       
    37  */
       
    38 NONSHARABLE_CLASS( CESMRViewerDetailedSubjectField ):
       
    39         public CESMRField,
       
    40         public MEikEdwinSizeObserver
       
    41     {
       
    42 public:
       
    43     /**
       
    44      * Creates new CESMRViewerDetailedSubjectField object. Ownership
       
    45      * is transferred to caller.
       
    46      * @return Pointer to created object,
       
    47      */
       
    48     static CESMRViewerDetailedSubjectField* NewL( );
       
    49     
       
    50     /**
       
    51      * C++ Destructor.
       
    52      */
       
    53     ~CESMRViewerDetailedSubjectField( );
       
    54 
       
    55 public: // Interface
       
    56     /**
       
    57      * Sets titlepane observer. Ownership is not transferred.
       
    58      * @param aObserver Pointer to titlepane objerver
       
    59      */
       
    60     void SetTitlePaneObserver( MESMRTitlePaneObserver* aObserver );
       
    61 
       
    62 
       
    63 public: // From CESMRField
       
    64     TSize MinimumSize();
       
    65     void InternalizeL( MESMRCalEntry& aEntry );
       
    66     void InitializeL();
       
    67     void ListObserverSet();
       
    68     void ExecuteGenericCommandL( TInt aCommand );
       
    69     void SetOutlineFocusL( TBool aFocus );
       
    70 
       
    71 public: // From CCoeControl
       
    72     TKeyResponse OfferKeyEventL( const TKeyEvent& aEvent, 
       
    73                                        TEventCode aType );
       
    74     TInt CountComponentControls() const;
       
    75     CCoeControl* ComponentControl( TInt aInd ) const;
       
    76     void SizeChanged();
       
    77     void SetContainerWindowL( const CCoeControl& aContainer );
       
    78 
       
    79 public: // From MEikEdwinSizeObserver
       
    80     TBool HandleEdwinSizeEventL(
       
    81             CEikEdwin* aEdwin,
       
    82             TEdwinSizeEvent aType,
       
    83             TSize aSize );
       
    84 
       
    85 private: // Implementation
       
    86     CESMRViewerDetailedSubjectField();
       
    87     void ConstructL();
       
    88     TRect RichTextViewerRect();
       
    89 
       
    90 private: // data
       
    91     // Own: Edwin size
       
    92     TSize iSize;
       
    93     // Own: Field icon
       
    94     CMRImage* iFieldIcon;
       
    95     // Own: Subject text is storaged here
       
    96     CESMRRichTextViewer* iRichTextViewer;
       
    97     // RichTextViewer line count. Own
       
    98     TInt iLineCount;
       
    99     /// Ref: Pointer to title pane observer
       
   100     MESMRTitlePaneObserver* iTitlePaneObserver;
       
   101     };
       
   102 
       
   103 #endif // CESMRVIEWERDETAILEDSUBJECTFIELD_H_