meetingrequest/mrgui/mrfieldbuilderplugin/inc/cesmrviewerdetailedsubjectfield.h
branchRCL_3
changeset 12 4ce476e64c59
parent 0 8466d47a6819
child 16 b5fbb9b25d57
equal deleted inserted replaced
11:0396474f30f5 12:4ce476e64c59
     1 /*
     1 /*
     2 * Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). 
     2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3 * All rights reserved.
     3 * All rights reserved.
     4 * This component and the accompanying materials are made available
     4 * This component and the accompanying materials are made available
     5 * under the terms of "Eclipse Public License v1.0"
     5 * under the terms of "Eclipse Public License v1.0"
     6 * which accompanies this distribution, and is available
     6 * which accompanies this distribution, and is available
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
    22 // INCLUDES
    22 // INCLUDES
    23 #include <e32cmn.h> // TSize
    23 #include <e32cmn.h> // TSize
    24 #include <eikedwob.h> // MEikEdwinSizeObserver
    24 #include <eikedwob.h> // MEikEdwinSizeObserver
    25 
    25 
    26 #include "cesmrfield.h"
    26 #include "cesmrfield.h"
       
    27 #include "cesmrrichtextviewer.h"
    27 
    28 
    28 // FORWARD DECLARATIONS
    29 // FORWARD DECLARATIONS
    29 class CESMRRichTextViewer;
    30 class CESMRRichTextViewer;
    30 class MESMRTitlePaneObserver;
    31 class MESMRTitlePaneObserver;
    31 class CMRImage;
    32 class CMRImage;
    35  * shows only first few words from the subject so this field is
    36  * shows only first few words from the subject so this field is
    36  * needed to show it all.
    37  * needed to show it all.
    37  */
    38  */
    38 NONSHARABLE_CLASS( CESMRViewerDetailedSubjectField ):
    39 NONSHARABLE_CLASS( CESMRViewerDetailedSubjectField ):
    39         public CESMRField,
    40         public CESMRField,
    40         public MEikEdwinSizeObserver
    41         public MEikEdwinSizeObserver,
       
    42         public MESMRRichTextObserver
    41     {
    43     {
    42 public:
    44 public:
    43     /**
    45     /**
    44      * Creates new CESMRViewerDetailedSubjectField object. Ownership
    46      * Creates new CESMRViewerDetailedSubjectField object. Ownership
    45      * is transferred to caller.
    47      * is transferred to caller.
    63 public: // From CESMRField
    65 public: // From CESMRField
    64     TSize MinimumSize();
    66     TSize MinimumSize();
    65     void InternalizeL( MESMRCalEntry& aEntry );
    67     void InternalizeL( MESMRCalEntry& aEntry );
    66     void InitializeL();
    68     void InitializeL();
    67     void ListObserverSet();
    69     void ListObserverSet();
    68     void ExecuteGenericCommandL( TInt aCommand );
    70     TBool ExecuteGenericCommandL( TInt aCommand );
    69     void SetOutlineFocusL( TBool aFocus );
    71     void SetOutlineFocusL( TBool aFocus );
    70 
    72     void GetCursorLineVerticalPos(TInt& aUpper, TInt& aLower); 
       
    73     void HandleLongtapEventL( const TPoint& aPosition );
       
    74     void LockL();
       
    75     
    71 public: // From CCoeControl
    76 public: // From CCoeControl
    72     TKeyResponse OfferKeyEventL( const TKeyEvent& aEvent, 
    77     TKeyResponse OfferKeyEventL( const TKeyEvent& aEvent, 
    73                                        TEventCode aType );
    78                                        TEventCode aType );
    74     TInt CountComponentControls() const;
    79     TInt CountComponentControls() const;
    75     CCoeControl* ComponentControl( TInt aInd ) const;
    80     CCoeControl* ComponentControl( TInt aInd ) const;
    79 public: // From MEikEdwinSizeObserver
    84 public: // From MEikEdwinSizeObserver
    80     TBool HandleEdwinSizeEventL(
    85     TBool HandleEdwinSizeEventL(
    81             CEikEdwin* aEdwin,
    86             CEikEdwin* aEdwin,
    82             TEdwinSizeEvent aType,
    87             TEdwinSizeEvent aType,
    83             TSize aSize );
    88             TSize aSize );
       
    89     
       
    90 protected: // From CESMRRichTextViewer
       
    91     TBool HandleRichTextLinkSelection( const CESMRRichTextLink* aLink );
    84 
    92 
    85 private: // Implementation
    93 private: // Implementation
    86     CESMRViewerDetailedSubjectField();
    94     CESMRViewerDetailedSubjectField();
    87     void ConstructL();
    95     void ConstructL();
    88     TRect RichTextViewerRect();
    96     void SetMiddleSoftkeyL();
    89 
    97 
    90 private: // data
    98 private: // data
    91     // Own: Edwin size
    99     // Own: Edwin size
    92     TSize iSize;
   100     TSize iSize;
    93     // Own: Field icon
   101     // Own: Field icon
    94     CMRImage* iFieldIcon;
   102     CMRImage* iFieldIcon;
    95     // Own: Subject text is storaged here
   103     // Own: Priority icon
       
   104     CMRImage* iPriorityIcon;
       
   105     // Not own: Subject text is storaged here
    96     CESMRRichTextViewer* iRichTextViewer;
   106     CESMRRichTextViewer* iRichTextViewer;
    97     // RichTextViewer line count. Own
       
    98     TInt iLineCount;
       
    99     /// Ref: Pointer to title pane observer
   107     /// Ref: Pointer to title pane observer
   100     MESMRTitlePaneObserver* iTitlePaneObserver;
   108     MESMRTitlePaneObserver* iTitlePaneObserver;
   101     };
   109     };
   102 
   110 
   103 #endif // CESMRVIEWERDETAILEDSUBJECTFIELD_H_
   111 #endif // CESMRVIEWERDETAILEDSUBJECTFIELD_H_