email/mail/UtilsSrc/MsgMailAppUi.inl
branchRCL_3
changeset 27 7fdbb852d323
parent 0 72b543305e3a
equal deleted inserted replaced
26:ebe688cedc25 27:7fdbb852d323
       
     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: 
       
    15 *     Application UI base class of Mail editor and viewer, inline functions
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 #ifndef MSGMAILAPPUI_INL
       
    21 #define MSGMAILAPPUI_INL
       
    22 
       
    23 // FORWARD DECLARATIONS
       
    24 
       
    25 // INCLUDES
       
    26 #include <MsgExpandableControl.h>
       
    27 #include <MsgAddressControl.h>
       
    28 #include <MsgAttachmentControl.h>
       
    29 #include <MsgBodyControl.h>
       
    30 #include <MsgEditorView.h>
       
    31 #include <MsgEditor.hrh>
       
    32 
       
    33 // INLINE FUNCTIONS
       
    34 
       
    35 // ----------------------------------------------------------------------------
       
    36 //  CMsgMailAppUi::AppCoeEnv()
       
    37 // ----------------------------------------------------------------------------
       
    38 // 
       
    39 inline CCoeEnv& CMsgMailAppUi::AppCoeEnv()
       
    40 	{
       
    41 	return *iCoeEnv;
       
    42 	}
       
    43 
       
    44 
       
    45 // ----------------------------------------------------------------------------
       
    46 //  CMsgMailAppUi::SubjectControl()
       
    47 //  Returns the pointer to the subject control.
       
    48 // ----------------------------------------------------------------------------
       
    49 // 
       
    50 inline CMsgExpandableControl* CMsgMailAppUi::SubjectControl() const
       
    51     {
       
    52     return static_cast<CMsgExpandableControl*> 
       
    53         (iView->ControlById(EMsgComponentIdSubject));
       
    54     }
       
    55 
       
    56 // ----------------------------------------------------------------------------
       
    57 //  CMsgMailAppUi::AddressControl()
       
    58 //  Returns the pointer to the given address control (header field).
       
    59 // ----------------------------------------------------------------------------
       
    60 //
       
    61 inline CMsgAddressControl* CMsgMailAppUi::AddressControl(
       
    62     const TInt aId) const
       
    63     {
       
    64     CMsgAddressControl* addressCtrl(NULL);
       
    65     
       
    66     CMsgBaseControl* ctrl = iView->ControlById(aId);
       
    67     if ( ctrl && ctrl->ControlType() == EMsgAddressControl )
       
    68     	{
       
    69     	addressCtrl = static_cast<CMsgAddressControl*> (ctrl);
       
    70     	}
       
    71     return addressCtrl; 
       
    72     }
       
    73     
       
    74 // ----------------------------------------------------------------------------
       
    75 //  CMsgMailAppUi::AttachmentControl()
       
    76 // ----------------------------------------------------------------------------
       
    77 //
       
    78 inline CMsgAttachmentControl* CMsgMailAppUi::AttachmentControl() const
       
    79     {
       
    80     CMsgBaseControl* ctrl = iView->ControlById( EMsgComponentIdAttachment );
       
    81     ASSERT( ctrl );
       
    82             
       
    83     return static_cast<CMsgAttachmentControl*>( ctrl );
       
    84     }
       
    85 
       
    86 // ----------------------------------------------------------------------------
       
    87 //  CMsgMailAppUi::BodyControl()
       
    88 //  Returns the pointer to the body control.
       
    89 // ----------------------------------------------------------------------------
       
    90 //
       
    91 inline CMsgBodyControl* CMsgMailAppUi::BodyControl() const
       
    92     {
       
    93     return static_cast<CMsgBodyControl*> (iView->ControlById(EMsgComponentIdBody));
       
    94     }
       
    95 
       
    96 
       
    97 #endif      // MSGMAILAPPUI_INL
       
    98 
       
    99 // End of File