diff -r ebe688cedc25 -r 7fdbb852d323 email/mail/UtilsSrc/MsgMailAppUi.inl --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/email/mail/UtilsSrc/MsgMailAppUi.inl Wed Sep 01 12:31:54 2010 +0100 @@ -0,0 +1,99 @@ +/* +* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* Application UI base class of Mail editor and viewer, inline functions +* +*/ + + +#ifndef MSGMAILAPPUI_INL +#define MSGMAILAPPUI_INL + +// FORWARD DECLARATIONS + +// INCLUDES +#include +#include +#include +#include +#include +#include + +// INLINE FUNCTIONS + +// ---------------------------------------------------------------------------- +// CMsgMailAppUi::AppCoeEnv() +// ---------------------------------------------------------------------------- +// +inline CCoeEnv& CMsgMailAppUi::AppCoeEnv() + { + return *iCoeEnv; + } + + +// ---------------------------------------------------------------------------- +// CMsgMailAppUi::SubjectControl() +// Returns the pointer to the subject control. +// ---------------------------------------------------------------------------- +// +inline CMsgExpandableControl* CMsgMailAppUi::SubjectControl() const + { + return static_cast + (iView->ControlById(EMsgComponentIdSubject)); + } + +// ---------------------------------------------------------------------------- +// CMsgMailAppUi::AddressControl() +// Returns the pointer to the given address control (header field). +// ---------------------------------------------------------------------------- +// +inline CMsgAddressControl* CMsgMailAppUi::AddressControl( + const TInt aId) const + { + CMsgAddressControl* addressCtrl(NULL); + + CMsgBaseControl* ctrl = iView->ControlById(aId); + if ( ctrl && ctrl->ControlType() == EMsgAddressControl ) + { + addressCtrl = static_cast (ctrl); + } + return addressCtrl; + } + +// ---------------------------------------------------------------------------- +// CMsgMailAppUi::AttachmentControl() +// ---------------------------------------------------------------------------- +// +inline CMsgAttachmentControl* CMsgMailAppUi::AttachmentControl() const + { + CMsgBaseControl* ctrl = iView->ControlById( EMsgComponentIdAttachment ); + ASSERT( ctrl ); + + return static_cast( ctrl ); + } + +// ---------------------------------------------------------------------------- +// CMsgMailAppUi::BodyControl() +// Returns the pointer to the body control. +// ---------------------------------------------------------------------------- +// +inline CMsgBodyControl* CMsgMailAppUi::BodyControl() const + { + return static_cast (iView->ControlById(EMsgComponentIdBody)); + } + + +#endif // MSGMAILAPPUI_INL + +// End of File