diff -r 12c456ceeff2 -r 5253a20d2a1e emailuis/emailui/inc/FreestyleEmailUiSettingsListView.h --- a/emailuis/emailui/inc/FreestyleEmailUiSettingsListView.h Thu Jan 07 12:38:38 2010 +0200 +++ b/emailuis/emailui/inc/FreestyleEmailUiSettingsListView.h Mon Jan 18 20:08:26 2010 +0200 @@ -1,5 +1,5 @@ /* -* Copyright (c) 2005-2008 Nokia Corporation and/or its subsidiary(-ies). +* Copyright (c) 2005 - 2009 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" @@ -15,27 +15,28 @@ * */ - - #ifndef FSEMAILSETTINGSLISTVIEW_H #define FSEMAILSETTINGSLISTVIEW_H -// SYSTEM INCLUDES +// SYSTEM INCLUDES #include +// INTERNAL INCLUDES #include "FreestyleEmailUiViewBase.h" -// FORWARD DECLARATIONS +// FORWARD DECLARATIONS class CFsEmailSettingsList; class CFSMailClient; class CFreestyleEmailUiAppUi; class CAsyncCallBack; +class CAknStylusPopUpMenu; + // CLASS DECLARATION class CFsEmailSettingsListView : public CFsEmailUiViewBase { -public: - // constructors and destructor +public: // Constructors and destructor. + static CFsEmailSettingsListView* NewL( CFSMailClient& aMailClient, CFreestyleEmailUiAppUi* aAppUi, @@ -48,64 +49,107 @@ virtual ~CFsEmailSettingsListView(); -public: - // from base class CAknView + +private: // Construction. + + CFsEmailSettingsListView( CAlfControlGroup& aControlGroup, + CFreestyleEmailUiAppUi& aAppUi, + CFSMailClient& aMailClient ); + + void ConstructL(); + + +public: // From base class CAknView. + + /** + * @return The UID for this view + */ TUid Id() const; + + /** + * Handles commands for this view (override). + * @param aCommand The ID of the command to handle. + */ void HandleCommandL( TInt aCommand ); -public: - // set main list index in parent + +public: // New methods. + + /** + * Set the main list index in parent. + * @param aIndex The index to set. + */ void SetSelectedMainListIndex( TInt aIndex ); - - // get main list index from parent - TInt GetSelectedMainListIndex()const; + + /** + * Returns the main list index from parent. + * @return The list index. + */ + TInt GetSelectedMainListIndex() const; void StartMailboxAsyncQueryL(); -protected: - // from base class CAknView - // Toolbar - /*void DoActivateL( - const TVwsViewId& aPrevViewId, - TUid aCustomMessageId, - const TDesC8& aCustomMessage );*/ - // Toolbar - void ChildDoDeactivate(); + /** + * Displays the pop-up menu. + * @param aPosition The position of the pop-up menu. + */ + void DisplayStylusPopUpMenu( const TPoint& aPosition ); + + +protected: // From base class CAknView. + + /** + * Handle status pane size change for this view (override). + */ void HandleStatusPaneSizeChange(); - void DynInitMenuPaneL( - TInt aResourceId, - CEikMenuPane* aMenuPan ); + + void DynInitMenuPaneL( TInt aResourceId, CEikMenuPane* aMenuPan ); -// Toolbar -private: // from - + +protected: // From CFsEmailUiViewBase. + + /** + * Handles user actions during activation of the view, + * such as initializing the content. + */ + void ChildDoDeactivate(); + /** * @see CFsEmailUiViewBase::ChildDoActivateL */ void ChildDoActivateL( const TVwsViewId& aPrevViewId, - TUid aCustomMessageId, - const TDesC8& aCustomMessage ); - -// Toolbar - -private: - CFsEmailSettingsListView( CAlfControlGroup& aControlGroup, - CFreestyleEmailUiAppUi& aAppUi, CFSMailClient& aMailClient ); - void ConstructL(); - + TUid aCustomMessageId, + const TDesC8& aCustomMessage ); + + +private: // New methods. + void SetupStatusPaneL(); + + /** + * Sets application default title when leaving this view. + */ void CleanupStatusPaneL(); static TInt DisplayCreateQuery( TAny* aViewPtr ); + void DisplayCreateMailboxNoteIfNeededL(); - -private: + + +private: // Data. + CFsEmailSettingsList* iFsEmailSettingsList; CFSMailClient& iMailClient; TBool iMailboxSettings; TInt iContainerListIndex; + // Async callback for create mailbox query CAsyncCallBack* iAsyncCallback; + + // A long tap detector and a pop-up menu that is invoked by long tap + // events. Used for e.g. deleting mail boxes. + CAknStylusPopUpMenu* iStylusPopUpMenu; }; -#endif // FSEMAILSETTINGSLISTVIEW_H +#endif // FSEMAILSETTINGSLISTVIEW_H +