idlehomescreen/widgetmanager/inc/wmmaincontainerview.h
changeset 1 5315654608de
child 9 f966699dea19
equal deleted inserted replaced
0:f72a12da539e 1:5315654608de
       
     1 /*
       
     2 * Copyright (c) 2009 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 * Declares main container view for Widget Manager application.
       
    16 *
       
    17 */
       
    18 
       
    19 #ifndef WMMAINCONTAINERVIEW_H
       
    20 #define WMMAINCONTAINERVIEW_H
       
    21 
       
    22 #include <aknview.h>
       
    23 
       
    24 
       
    25 class CWmMainContainer;
       
    26 class CWmPlugin;
       
    27 
       
    28 /**
       
    29  * Avkon view class for WmMainContainerView. It is register with the view server
       
    30  * by the AppUi. It owns the container control.
       
    31  * @class	CWmMainContainerView WmMainContainerView.h
       
    32  */						
       
    33 NONSHARABLE_CLASS( CWmMainContainerView ) : public CAknView
       
    34 	{
       
    35 
       
    36 public: // constructors and destructor
       
    37 	/**
       
    38 	 * Two-phased constructor.
       
    39 	 * 
       
    40 	 * @param aWmPlugin wm plugin
       
    41 	 */
       
    42 	static CWmMainContainerView* NewL( CWmPlugin& aWmPlugin );
       
    43 	
       
    44     /**
       
    45      * Two-phased constructor.
       
    46      * 
       
    47      * @param aWmPlugin wm plugin
       
    48      */
       
    49 	static CWmMainContainerView* NewLC( CWmPlugin& aWmPlugin );	
       
    50 	
       
    51 	/** Destructor */
       
    52 	virtual ~CWmMainContainerView();
       
    53 
       
    54 	
       
    55 public:	// from base class CAknView
       
    56     /**
       
    57      * Returns views id, intended for overriding by sub classes.
       
    58      * 
       
    59      * @see CAknView::Id
       
    60      */
       
    61 	TUid Id() const;
       
    62 	
       
    63 	/**
       
    64 	 * Command handling function intended for overriding by sub classes.
       
    65 	 *
       
    66 	 * @see CAknView::HandleCommandL
       
    67 	 */
       
    68 	void HandleCommandL( TInt aCommand );
       
    69 
       
    70 public:	
       
    71 	/**
       
    72 	 * Creates CWmMainContainer
       
    73 	 */
       
    74 	CWmMainContainer* CreateContainerL();
       
    75 	
       
    76 private:
       
    77     CWmMainContainerView( CWmPlugin& aWmPlugin );    
       
    78     void ConstructL();    
       
    79     
       
    80 protected: // from base class CAknView
       
    81     /**
       
    82      * Avkon view architecture system.
       
    83      * 
       
    84      * @see CAknView::DoActivateL
       
    85      */
       
    86 	void DoActivateL(
       
    87 		const TVwsViewId& aPrevViewId,
       
    88 		TUid aCustomMessageId,
       
    89 		const TDesC8& aCustomMessage );
       
    90 	
       
    91 	/**
       
    92 	 * View deactivation function intended for overriding by sub classes.
       
    93 	 * 
       
    94 	 * @see CAknView::DoActivateL
       
    95 	 */
       
    96 	void DoDeactivate();
       
    97 	
       
    98    /**
       
    99      * Event handler for status pane size changes.
       
   100      * 
       
   101      * @see CAknView::HandleStatusPaneSizeChange
       
   102      */
       
   103 	void HandleStatusPaneSizeChange();
       
   104 
       
   105 protected:	// From MEikMenuObserver
       
   106     /*
       
   107      * Menu observer interface.
       
   108      * 
       
   109      * @see MEikMenuObserver::DynInitMenuPaneL
       
   110      */
       
   111     void DynInitMenuPaneL(TInt aResourceId, CEikMenuPane* aMenuPane);
       
   112 
       
   113 private:
       
   114     
       
   115     /** menu commands */
       
   116     TBool HandleOpenMenuItemSelectedL();
       
   117     TBool HandleAddMenuItemSelectedL();
       
   118     TBool HandleLaunchMenuItemSelectedL();
       
   119     TBool HandleSearchMenuItemSelectedL();
       
   120     TBool HandleSortAlphaMenuItemSelectedL();
       
   121     TBool HandleUninstallMenuItemSelectedL();
       
   122     TBool HandleHelpMenuItemSelectedL();
       
   123 	TBool HandleDetailsMenuItemSelectedL();
       
   124 	TBool HandleDeactivateFindPaneL();
       
   125 	/** setup status pane */
       
   126 	void SetupStatusPaneL();
       
   127 
       
   128 private:
       
   129     /** 
       
   130      * the container 
       
   131      */
       
   132 	CWmMainContainer* iWmMainContainer;
       
   133 
       
   134 	/** 
       
   135 	 * the plugin root (not owned) 
       
   136 	 */
       
   137 	CWmPlugin& iWmPlugin;
       
   138 
       
   139 	};
       
   140 
       
   141 #endif // WMMAINCONTAINERVIEW_H