uifw/AvKon/src/aknuniversalindicatorcontainer.cpp
changeset 0 2f259fa3e83a
equal deleted inserted replaced
-1:000000000000 0:2f259fa3e83a
       
     1 /*
       
     2 * Copyright (c) 2006-2006 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:  Application side control in the status pane indicator area. 
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 // INCLUDE FILES
       
    21 #include "aknuniversalindicatorcontainer.h"
       
    22 #include "AknIndicatorContainer.h"
       
    23 
       
    24 #include <AknTasHook.h> // for testability hooks
       
    25 // ============================ MEMBER FUNCTIONS ===============================
       
    26 
       
    27 // -----------------------------------------------------------------------------
       
    28 // CAknUniversalIndicatorContainer::CAknUniversalIndicatorContainer
       
    29 // C++ default constructor can NOT contain any code, that
       
    30 // might leave.
       
    31 // -----------------------------------------------------------------------------
       
    32 //
       
    33 CAknUniversalIndicatorContainer::CAknUniversalIndicatorContainer()
       
    34 	{
       
    35 	AKNTASHOOK_ADD( this, "CAknUniversalIndicatorContainer" );
       
    36   	}
       
    37 
       
    38 // -----------------------------------------------------------------------------
       
    39 // Destructor
       
    40 // -----------------------------------------------------------------------------
       
    41 //
       
    42 CAknUniversalIndicatorContainer::~CAknUniversalIndicatorContainer()
       
    43 	{
       
    44 	AKNTASHOOK_REMOVE();
       
    45   	delete iPane;
       
    46   	}
       
    47 
       
    48 // -----------------------------------------------------------------------------
       
    49 // CAknUniversalIndicatorContainer::ConstructFromResourceL
       
    50 // (other items were commented in a header).
       
    51 // -----------------------------------------------------------------------------
       
    52 //
       
    53 void CAknUniversalIndicatorContainer::ConstructFromResourceL(TResourceReader& aReader)
       
    54     {
       
    55     iPane = new (ELeave) CAknIndicatorContainer();
       
    56     iPane->SetContainerWindowL(*this);
       
    57     iPane->ConstructFromResourceL(aReader);         
       
    58     MakeVisible( ETrue );
       
    59 	}
       
    60 
       
    61 // -----------------------------------------------------------------------------
       
    62 // CAknUniversalIndicatorContainer::SizeChanged
       
    63 // (other items were commented in a header).
       
    64 // -----------------------------------------------------------------------------
       
    65 //
       
    66 void CAknUniversalIndicatorContainer::SizeChanged()
       
    67     {
       
    68     TPoint tl = Rect().iTl;
       
    69     if (iPane)
       
    70     	iPane->SetExtent( tl, Size() );	
       
    71     }
       
    72 
       
    73 // -----------------------------------------------------------------------------
       
    74 // CAknUniversalIndicatorContainer::CountComponentControls
       
    75 // (other items were commented in a header).
       
    76 // -----------------------------------------------------------------------------
       
    77 //
       
    78 TInt CAknUniversalIndicatorContainer::CountComponentControls() const
       
    79     {
       
    80     if ( iPane )
       
    81         {
       
    82         return 1;
       
    83         }
       
    84     return 0;
       
    85     }
       
    86 
       
    87 // -----------------------------------------------------------------------------
       
    88 // CAknUniversalIndicatorContainer::ComponentControl
       
    89 // (other items were commented in a header).
       
    90 // -----------------------------------------------------------------------------
       
    91 //
       
    92 CCoeControl* CAknUniversalIndicatorContainer::ComponentControl(TInt /*aIndex*/) const
       
    93     {
       
    94     return iPane;
       
    95     }
       
    96     
       
    97 
       
    98 //  End of File  
       
    99 
       
   100