email/mail/ViewerSrc/CMailBaseControlAdapter.h
changeset 0 72b543305e3a
equal deleted inserted replaced
-1:000000000000 0:72b543305e3a
       
     1 /*
       
     2 * Copyright (c) 2004 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:  Adapter between CMsgBaseControl and CCoeControl
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef CMAILBASECONTROLADAPTER_H
       
    21 #define CMAILBASECONTROLADAPTER_H
       
    22 
       
    23 //  INCLUDES
       
    24 #include <MsgBaseControl.h>
       
    25 
       
    26 
       
    27 // CLASS DECLARATION
       
    28 
       
    29 /**
       
    30 *  Base control adapter.
       
    31 *
       
    32 *  @since Series 60 3.0
       
    33 */
       
    34 class CMailBaseControlAdapter : public CMsgBaseControl
       
    35     {
       
    36     public:  // Constructors and destructor
       
    37         
       
    38         /**
       
    39         * Two-phased constructor.
       
    40         * @param aParent Window owning parent control where 
       
    41         * aControl will be added. 
       
    42         * @param aControl a non window owning control to be added.
       
    43         */
       
    44         static CMailBaseControlAdapter* NewL(
       
    45             CCoeControl* aParent,
       
    46             CCoeControl& aControl);
       
    47         
       
    48         /**
       
    49         * Destructor.
       
    50         */
       
    51         virtual ~CMailBaseControlAdapter();
       
    52         
       
    53     public: // Functions from base classes
       
    54         
       
    55         /// From CMsgBaseControl
       
    56         TRect CurrentLineRect();
       
    57         void SetAndGetSizeL(TSize& aSize);        
       
    58         void ClipboardL(TMsgClipboardFunc aFunc);
       
    59         void EditL(TMsgEditFunc aFunc);
       
    60         TBool IsFocusChangePossible(TMsgFocusDirection aDirection) const;
       
    61         TBool IsCursorLocation(TMsgCursorLocation aLocation) const;
       
    62         TUint32 EditPermission() const;
       
    63         TInt VirtualHeight();
       
    64         TInt VirtualVisibleTop();
       
    65         
       
    66 		// From CCoeControl
       
    67         TInt CountComponentControls() const;
       
    68         CCoeControl* ComponentControl(TInt aIndex) const;
       
    69         void SizeChanged();
       
    70         void FocusChanged(TDrawNow aDrawNow);
       
    71 		void HandleResourceChange(TInt aType);
       
    72         TKeyResponse OfferKeyEventL(const TKeyEvent& aKeyEvent,TEventCode aType);
       
    73 
       
    74     protected:  // Functions from base classes
       
    75         
       
    76         /// From CMsgBaseControl
       
    77         void PrepareForReadOnly(TBool aReadOnly);
       
    78 
       
    79     private:  // Implementation
       
    80        
       
    81     private:
       
    82 
       
    83         /**
       
    84         * Constructor.
       
    85         */
       
    86         CMailBaseControlAdapter(CCoeControl& aControl);
       
    87         void ConstructL();
       
    88 
       
    89     private:    // Data
       
    90         // Ref: to added control
       
    91         CCoeControl& iControl;
       
    92          
       
    93     };
       
    94 
       
    95 #endif      // CMAILBASECONTROLADAPTER_H
       
    96             
       
    97 // End of File