logsui/AppSrc/CLogsSubAppListControlContainer.h
changeset 0 e686773b3f54
equal deleted inserted replaced
-1:000000000000 0:e686773b3f54
       
     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 *     Logs "Sub application list" view container control class implementation
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 #ifndef     __Logs_App_CLogsSubAppListControlContainer_H__
       
    21 #define     __Logs_App_CLogsSubAppListControlContainer_H__
       
    22 
       
    23 //  INCLUDES
       
    24 #include "CLogsBaseControlContainer.h"
       
    25 
       
    26 // CONSTANTS
       
    27 
       
    28 // MACROS
       
    29 
       
    30 // DATA TYPES
       
    31 
       
    32 // FUNCTION PROTOTYPES
       
    33 
       
    34 // FORWARD DECLARATIONS
       
    35 class CCoeControl;
       
    36 class CAknDoubleLargeStyleListBox;
       
    37 class CLogsBaseView;
       
    38 
       
    39 // CLASS DECLARATION
       
    40 
       
    41 /**
       
    42  * Logs "Sub application list" view container control class implementation.
       
    43  * From this view user can navigate to any sub application.
       
    44  */
       
    45 class CLogsSubAppListControlContainer : public CLogsBaseControlContainer
       
    46 	{
       
    47 	public:  // interface
       
    48 		/**
       
    49 		 * Standard creation function.
       
    50 		 *
       
    51 		 * @param aAppView this control's application view.
       
    52 		 * @param aRect control container visible size.
       
    53 		 *
       
    54 		 * @return New instance of this class.
       
    55 		 */
       
    56 		static CLogsSubAppListControlContainer* NewL
       
    57 												(	CLogsBaseView* aAppView
       
    58 												,	const TRect& aRect
       
    59 												);
       
    60 
       
    61 		/**
       
    62 		 * Destructor. Deletes child controls.
       
    63 		 */
       
    64 		~CLogsSubAppListControlContainer();
       
    65 
       
    66 	private:            
       
    67 		/**
       
    68 		 * C++ constructor
       
    69 		 * @param aAppView this control's application view.
       
    70 		 */
       
    71 		CLogsSubAppListControlContainer( CLogsBaseView* aAppView );
       
    72 
       
    73 		/**
       
    74 		 * Constructor, second phase.
       
    75 		 *
       
    76 		 * @param aRect control container visible size.
       
    77 		 */
       
    78 		void ConstructL( const TRect& aRect );
       
    79 		
       
    80         /**
       
    81          *  Handles focus change events. This will hand over focus changes to list so that 
       
    82          *  focus animations are displayed on the list.
       
    83          */
       
    84         void FocusChanged(TDrawNow aDrawNow);
       
    85 
       
    86 	public: 
       
    87 		/**
       
    88 		 * Returns the iListBox.
       
    89 		 * @return listbox instance
       
    90 		 */
       
    91 		CAknDoubleLargeStyleListBox* ListBox();
       
    92 
       
    93 		/**
       
    94 		 * Create listbox with contents 
       
    95 		 */
       
    96 		void CreateListBoxL();
       
    97 
       
    98 		/**
       
    99 		 * Create listbox contents, can be called to refresh 
       
   100 		 * data in listbox
       
   101 		 */
       
   102         void CreateListBoxContentsL();
       
   103             
       
   104 	protected:  // from CCoeControl
       
   105 		/**
       
   106 		 *  Returns the child controls at aIndex.
       
   107 		 *
       
   108 		 *  @param  aIndex  Index of the control.
       
   109 		 *
       
   110 		 *  @return Sub     control from the aIndex.
       
   111 		 */
       
   112 		CCoeControl* ComponentControl( TInt aIndex ) const;
       
   113 
       
   114 		/**
       
   115 		 * Called when control's size changed.
       
   116 		 */
       
   117 		void SizeChanged();
       
   118 
       
   119 		/**
       
   120 		 *  Help context getter
       
   121 		 *
       
   122 		 *  @param aContext reference to context
       
   123 		 */
       
   124 		void GetHelpContext( TCoeHelpContext& aContext ) const;
       
   125 
       
   126 	protected:  // CLogsBaseControlContainer
       
   127 		/**
       
   128 		 *  Called from HandleResourceChange. Calls AddIconL funtion
       
   129 		 *  for each icon in the list box.
       
   130 		 *
       
   131 		 */
       
   132 		void AddControlContainerIconsL();
       
   133 
       
   134 	private:  // data
       
   135 		/// Ref: The application view whose control container this class is.
       
   136 		CLogsBaseView*					iAppView;
       
   137 
       
   138 		/// Own: ListBox control
       
   139 		CAknDoubleLargeStyleListBox*	iListBox;
       
   140 	};
       
   141 
       
   142 #endif  // __Logs_App_CLogsSubAppListControlContainer_H__
       
   143 
       
   144 
       
   145 // End of File
       
   146