profilesservices/FileList/Src/CFLDCommandAbsorbingControl.h
branchRCL_3
changeset 24 8ee96d21d9bf
parent 23 8bda91a87a00
child 25 7e0eff37aedb
equal deleted inserted replaced
23:8bda91a87a00 24:8ee96d21d9bf
     1 /*
       
     2 * Copyright (c) 2003 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:  Command absorber to eat all key presses.
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef __CFLDCOMMANDABSORBINGCONTROL_H
       
    19 #define __CFLDCOMMANDABSORBINGCONTROL_H
       
    20 
       
    21 // INTERNAL INCLUDES
       
    22 
       
    23 // EXTERNAL INCLUDES
       
    24 #include <coecntrl.h>
       
    25 
       
    26 
       
    27 // FORWARD DECLARATIONS
       
    28 class CEikAppUi;
       
    29 class CEikButtonGroupContainer;
       
    30 
       
    31 // CLASS DECLARATION
       
    32 /**
       
    33  * Command absorber.
       
    34  *
       
    35  * Puts empty CBA on the screen and absorbs
       
    36  * all the key events.
       
    37  *
       
    38  * @lib FileList.lib
       
    39  * @since 2.1
       
    40  */
       
    41 NONSHARABLE_CLASS( CFLDCommandAbsorbingControl ) : public CCoeControl
       
    42     {
       
    43     public:
       
    44     
       
    45       /**
       
    46          * Two-phased constructor.
       
    47          */
       
    48         static CFLDCommandAbsorbingControl* NewL();
       
    49         
       
    50         /**
       
    51          * Two-phased constructor.
       
    52          * Leaves object on the CleanupStack.
       
    53          */
       
    54         static CFLDCommandAbsorbingControl* NewLC();
       
    55 
       
    56         /**
       
    57          * Destructor.
       
    58          */
       
    59         virtual ~CFLDCommandAbsorbingControl();
       
    60 
       
    61     private:
       
    62 
       
    63         /**
       
    64          * Symbian OS constructor.
       
    65          */
       
    66         void ConstructL();
       
    67 
       
    68 
       
    69         /**
       
    70          * C++ default constructor.
       
    71          */
       
    72         CFLDCommandAbsorbingControl();
       
    73 
       
    74     public:  // From CCoeControl
       
    75 
       
    76        /**
       
    77         * Absorbing OfferkeyEvent() method.
       
    78         * Absorbs all offered key events (returns
       
    79         * always EKeyWasConsumed).
       
    80         */
       
    81         TKeyResponse OfferKeyEventL( const TKeyEvent& aKeyEvent,
       
    82                                      TEventCode aType );
       
    83 
       
    84     private:  // own helpers
       
    85 
       
    86 		void Release();
       
    87 		
       
    88        /**
       
    89         * Alters CBA visibility.
       
    90         *
       
    91         * @since 2.1
       
    92         * @param aVisible If ETrue makes buttons visible. Else
       
    93         * makes them invisible.
       
    94         */
       
    95         void MakeCbaVisible( TBool aVisible ) const;
       
    96 
       
    97     private: //data
       
    98     
       
    99 		/// Ref: Application under what we are running
       
   100         CEikAppUi* iAppUi;  
       
   101         
       
   102 		 /// Ref: Used CBA button container
       
   103         CEikButtonGroupContainer* iCba; 
       
   104     };
       
   105 
       
   106 #endif      // __CFLDCOMMANDABSORBINGCONTROL_H
       
   107 // End of File
       
   108