williamr@2: // Copyright (c) 2000-2009 Nokia Corporation and/or its subsidiary(-ies). williamr@2: // All rights reserved. williamr@2: // This component and the accompanying materials are made available williamr@2: // under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members williamr@2: // which accompanies this distribution, and is available williamr@2: // at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". williamr@2: // williamr@2: // Initial Contributors: williamr@2: // Nokia Corporation - initial contribution. williamr@2: // williamr@2: // Contributors: williamr@2: // williamr@2: // Description: williamr@2: // williamr@2: williamr@2: #ifndef __LAFMSG_H__ williamr@2: #define __LAFMSG_H__ williamr@2: williamr@2: #include williamr@2: #include williamr@2: #include williamr@2: #include williamr@2: #include williamr@2: williamr@2: williamr@2: class LafMsgWin williamr@2: /** Provides LAF settings for the system environment's message windows (CEikMsgWin). williamr@2: williamr@2: @publishedPartner williamr@2: @released */ williamr@2: { williamr@2: public: williamr@2: class TDisplayParameters; williamr@2: public: williamr@2: /** Sets the shadow on the blank window which the message is contained in. williamr@2: williamr@2: @param aBlankWindow Message window */ williamr@2: IMPORT_C static void SetUpBlankWindow(RBlankWindow& aBlankWindow); williamr@2: /** Completes the intitialisation of the message window. williamr@2: williamr@2: This function should select a font and call RMessageWindow::ConstructL() for williamr@2: aMessageWin. williamr@2: williamr@2: @param aMessageWin Message window williamr@2: @param aEnv LAF environment functions */ williamr@2: IMPORT_C static void CompleteMessageWinConstructionL(RMessageWindow& aMessageWin,const MLafEnv& aEnv); williamr@2: /** Handles a change to the system resources that may affect how the window is williamr@2: displayed. williamr@2: williamr@2: The function should update aMessageWin appropriately. williamr@2: williamr@2: @param aMessageWin Message window williamr@2: @param aEnv LAF environment functions */ williamr@2: IMPORT_C static void HandleResourceChange(RMessageWindow& aMessageWin,const MLafEnv& aEnv); williamr@2: /** Formats message text display. williamr@2: williamr@2: The function should truncate the text in aParams.iTextToDisplay to fit williamr@2: the device display, and set aParms.iMsgWinSize and aParams.iMsgWinPosition williamr@2: appropriately, depending on the corner aParams.iDisplayCorner, and the williamr@2: font for the device. williamr@2: williamr@2: aParams.iClientRect is provided for devices that wish to set the position williamr@2: relative to the client rect of the application rather than the screen rect. williamr@2: williamr@2: @param aParams Display parameters williamr@2: @param aEnv LAF environment functions */ williamr@2: IMPORT_C static void ConfigureText(TDisplayParameters& aParams,const MLafEnv& aEnv); williamr@2: }; williamr@2: williamr@2: williamr@2: class LafMsgWin::TDisplayParameters williamr@2: /** Holds message window text display parameters. williamr@2: williamr@2: @publishedPartner williamr@2: @released */ williamr@2: { williamr@2: public: williamr@2: /** Constructor. williamr@2: williamr@2: @param aTextToDispay Message window text. */ williamr@2: IMPORT_C TDisplayParameters(TDes& aTextToDispay); williamr@2: public: williamr@2: /** Message window position. */ williamr@2: TPoint iMsgWinPosition; williamr@2: /** Message window size. */ williamr@2: TSize iMsgWinSize; williamr@2: /** Message window text. */ williamr@2: TDes& iTextToDisplay; williamr@2: /** Message window margins. */ williamr@2: TMargins iMsgWinBorders; williamr@2: /** Message window alignment. */ williamr@2: TGulAlignment iDisplayCorner; williamr@2: /** Associated control environment. */ williamr@2: CCoeEnv* iEnv; williamr@2: /** Message window client screen area. */ williamr@2: TRect iClientRect; williamr@2: }; williamr@2: williamr@2: williamr@2: class LafInfoMsgWin williamr@2: /** Provides LAF settings for the system environment's information message williamr@2: window (CEikonEnv::InfoMsg() etc.). williamr@2: williamr@2: @publishedPartner williamr@2: @released */ williamr@2: { williamr@2: public: williamr@2: /** Gets the default number of microseconds for which a message is displayed. williamr@2: williamr@2: @return Default duration */ williamr@2: IMPORT_C static TTimeIntervalMicroSeconds32 DefaultDuration(); williamr@2: }; williamr@2: williamr@2: williamr@2: class LafBusyMsgWin williamr@2: /** Provides LAF settings for the system environment's busy message window williamr@2: (CEikonEnv::BusyMsgL()). williamr@2: williamr@2: @publishedPartner williamr@2: @released */ williamr@2: { williamr@2: public: williamr@2: /** Gets the default number of microseconds for which a message is displayed. williamr@2: williamr@2: @return Default delay */ williamr@2: IMPORT_C static TTimeIntervalMicroSeconds32 DefaultInitialDelay(); williamr@2: }; williamr@2: williamr@2: #endif //__LAFMSG_H__