launcher/inc/launchercontainerapps.h
branchRCL_3
changeset 22 fad26422216a
parent 0 d6fe6244b863
equal deleted inserted replaced
21:b3cee849fa46 22:fad26422216a
       
     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 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef LAUNCHERCONTAINERAPPS_H
       
    20 #define LAUNCHERCONTAINERAPPS_H
       
    21 
       
    22 // INCLUDES
       
    23 #include <coecntrl.h>
       
    24 #include <aknlists.h>
       
    25 #include <eiklbo.h> 
       
    26    
       
    27 // FORWARD DECLARATIONS
       
    28 class CLauncherEngine;
       
    29 
       
    30 // CLASS DECLARATION
       
    31 
       
    32 /**
       
    33 *  CLauncherContainerApps  container control class.
       
    34 *  
       
    35 */
       
    36 class CLauncherContainerApps : public CCoeControl, MCoeControlObserver, MEikListBoxObserver
       
    37     {
       
    38     public: // Constructors and destructor
       
    39         
       
    40         /**
       
    41         * EPOC default constructor.
       
    42         * @param aRect Frame rectangle for container.
       
    43         */
       
    44         void ConstructL(const TRect& aRect, CLauncherEngine* aEngine);
       
    45 
       
    46         /**
       
    47         * Destructor.
       
    48         */
       
    49         ~CLauncherContainerApps();
       
    50 
       
    51     public: // New functions
       
    52 
       
    53     public: // Functions from base classes
       
    54 
       
    55     public: // From MEikListBoxObserver
       
    56         void HandleListBoxEventL(CEikListBox* aListBox, TListBoxEvent aEventType);
       
    57     
       
    58     private: // Functions from base classes
       
    59 
       
    60         /**
       
    61         * From CoeControl.
       
    62         */
       
    63         void SizeChanged();  
       
    64     
       
    65         /**
       
    66         * From CoeControl.
       
    67         */
       
    68         TInt CountComponentControls() const;
       
    69     
       
    70         /**
       
    71         * From CCoeControl.
       
    72         */
       
    73         CCoeControl* ComponentControl(TInt aIndex) const;
       
    74     
       
    75         /**
       
    76         * Event handling section, e.g Listbox events.
       
    77         */
       
    78         void HandleControlEventL(CCoeControl* aControl,TCoeEvent aEventType);
       
    79 
       
    80         /**
       
    81         * From CCoeControl,Draw.
       
    82         */
       
    83         void Draw(const TRect& aRect) const;
       
    84     
       
    85         /**
       
    86         * Key event handler. Handles up and down arrow keys, so that
       
    87         * output window can be scrolled.
       
    88         */
       
    89         TKeyResponse OfferKeyEventL(const TKeyEvent& aKeyEvent,TEventCode aType);
       
    90 
       
    91     public:
       
    92         void HandleResourceChange(TInt aType);
       
    93 
       
    94     public:    
       
    95         const CArrayFix<TInt>* SelectedApps();
       
    96         void UpdateFileListL();
       
    97         void MarkCurrentItemL();
       
    98         void UnmarkCurrentItem();
       
    99         TInt NumberOfSelectedItems() const;
       
   100         void MarkAllItemsL();
       
   101         void UnmarkAllItems();
       
   102         
       
   103         CEikListBox* ListBox() { return iListBox; }
       
   104         CLauncherEngine* Engine() { return iEngine; }
       
   105 
       
   106 
       
   107             
       
   108     private: //data
       
   109         CDesCArray* iSelectedItems;
       
   110         CAknSingleStyleListBox* iListBox;
       
   111 
       
   112         CLauncherEngine* iEngine;
       
   113     
       
   114     };
       
   115 
       
   116 #endif
       
   117 
       
   118 // End of File