messagingappbase/msgeditor/viewinc/MsgBody.h
changeset 0 72b543305e3a
equal deleted inserted replaced
-1:000000000000 0:72b543305e3a
       
     1 /*
       
     2 * Copyright (c) 2002 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:  MsgBody  declaration
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef INC_MSGBODY_H
       
    21 #define INC_MSGBODY_H
       
    22 
       
    23 // ========== INCLUDE FILES ================================
       
    24 
       
    25 #include "MsgFormComponent.h"              // for CMsgFormComponent
       
    26 
       
    27 // ========== CONSTANTS ====================================
       
    28 
       
    29 // ========== MACROS =======================================
       
    30 
       
    31 // ========== DATA TYPES ===================================
       
    32 
       
    33 // ========== FUNCTION PROTOTYPES ==========================
       
    34 
       
    35 // ========== FORWARD DECLARATIONS =========================
       
    36 
       
    37 // ========== CLASS DECLARATION ============================
       
    38 
       
    39 /**
       
    40  * Defines body control container for message editors/viewers.
       
    41  *
       
    42  */
       
    43 class CMsgBody : public CMsgFormComponent
       
    44 {
       
    45 
       
    46 public:
       
    47 
       
    48     /**
       
    49      * Factory method that creates this control.
       
    50      * @param aParent
       
    51      * @param aMargins
       
    52      * @return
       
    53      */
       
    54     static CMsgBody* NewL(const CCoeControl& aParent, const TMargins& aMargins);
       
    55 
       
    56     /**
       
    57      * Destructor.
       
    58      */
       
    59     ~CMsgBody();
       
    60 
       
    61 public:  // from CMsgFormComponent
       
    62 
       
    63     /**
       
    64      * Calculates and sets the size for the body and returns new size as reference
       
    65      * aSize. If aInit == ETrue, sets also size for the controls by calling their
       
    66      * SetAndGetSizeL functions.
       
    67      *
       
    68      * @param aSize
       
    69      * @param aInit
       
    70      */
       
    71     void SetAndGetSizeL(TSize& aSize, TBool aInit);
       
    72 
       
    73 public:  // from CCoeControl
       
    74 
       
    75     /**
       
    76      * Returns a number of controls.
       
    77      * @return
       
    78      */
       
    79     TInt CountComponentControls() const;
       
    80 
       
    81     /**
       
    82      * Returns a control of index aIndex.
       
    83      * @param aIndex
       
    84      * @return
       
    85      */
       
    86     CCoeControl* ComponentControl(TInt aIndex) const;
       
    87 
       
    88 protected:  // from CCoeControl
       
    89 
       
    90     /**
       
    91      * Sets new position for all the controls.
       
    92      */
       
    93     void SizeChanged();
       
    94 
       
    95 private:
       
    96 
       
    97     /**
       
    98      * Constructor.
       
    99      * @param aMargins
       
   100      */
       
   101     CMsgBody(const TMargins& aMargins);
       
   102 
       
   103     /**
       
   104      * 2nd phase constructor.
       
   105      * @param aParent
       
   106      */
       
   107     void ConstructL(const CCoeControl& aParent);
       
   108 
       
   109 private:
       
   110 
       
   111     /**
       
   112      * Constructor (not available).
       
   113      */
       
   114     CMsgBody();
       
   115 
       
   116 };
       
   117 
       
   118 #endif
       
   119 
       
   120 // End of File