idlehomescreen/xmluirendering/renderingplugins/xnpopupfactory/src/xnpopup.cpp
changeset 0 f72a12da539e
equal deleted inserted replaced
-1:000000000000 0:f72a12da539e
       
     1 /*
       
     2 * Copyright (c) 2002-2004 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:  Implementation for a popup 
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #include <e32base.h>
       
    20 #include <coecntrl.h>
       
    21 #include <barsread.h>
       
    22 
       
    23 #include "xnpopup.h"
       
    24 #include "xnpopupadapter.h"
       
    25 
       
    26 // ============================ MEMBER FUNCTIONS ===============================
       
    27 
       
    28 
       
    29 
       
    30 
       
    31 // -----------------------------------------------------------------------------
       
    32 // CXnPopup::NewL
       
    33 // Symbian static 1st phase constructor
       
    34 // -----------------------------------------------------------------------------
       
    35 //
       
    36 CXnPopup* CXnPopup::NewL()
       
    37     {
       
    38 	CXnPopup* self = new( ELeave ) CXnPopup;
       
    39 
       
    40     CleanupStack::PushL( self );
       
    41     self->ConstructL();
       
    42     CleanupStack::Pop();
       
    43 
       
    44     return self;	
       
    45     }
       
    46 
       
    47 // -----------------------------------------------------------------------------
       
    48 // CXnPopup::ConstructL
       
    49 // Symbian 2nd phase constructor can leave.
       
    50 // -----------------------------------------------------------------------------
       
    51 //
       
    52 void CXnPopup::ConstructL()
       
    53     {
       
    54     CXnComponent::ConstructL();
       
    55     }
       
    56     
       
    57 // -----------------------------------------------------------------------------
       
    58 // CXnPopup::ConstructL
       
    59 // C++ default constructor
       
    60 // -----------------------------------------------------------------------------
       
    61 //
       
    62 CXnPopup::CXnPopup()
       
    63     {
       
    64     }
       
    65 
       
    66 // -----------------------------------------------------------------------------
       
    67 // CXnPopup::ConstructL
       
    68 // C++ destructor
       
    69 // -----------------------------------------------------------------------------
       
    70 //
       
    71 CXnPopup::~CXnPopup()
       
    72     {
       
    73     }
       
    74 
       
    75 
       
    76 // -----------------------------------------------------------------------------
       
    77 // CXnPopup::ShowPopup
       
    78 // Shows the popup
       
    79 // -----------------------------------------------------------------------------
       
    80 void CXnPopup::ShowPopupL(const TRect& aContainerRect)
       
    81     {
       
    82 		static_cast<CXnPopupAdapter*>(ControlAdapter())->ShowPopupL(aContainerRect);    	
       
    83     }
       
    84 void CXnPopup::ShowPopupL(const TRect& aContainerRect, TTimeIntervalMicroSeconds32 aShowDelay, TTimeIntervalMicroSeconds32 aDisplayTime)
       
    85     {
       
    86 		static_cast<CXnPopupAdapter*>(ControlAdapter())->ShowPopupL(aContainerRect, aShowDelay, aDisplayTime);    	
       
    87     }
       
    88 
       
    89 // -----------------------------------------------------------------------------
       
    90 // CXnPopup::HidePopup
       
    91 // Hides the popup
       
    92 // -----------------------------------------------------------------------------
       
    93 void CXnPopup::HidePopupL()
       
    94     {
       
    95     static_cast<CXnPopupAdapter*>(ControlAdapter())->HidePopupL();    		
       
    96     }
       
    97 // -----------------------------------------------------------------------------
       
    98 // CXnPopup::MakeInterfaceL
       
    99 // -----------------------------------------------------------------------------
       
   100 XnComponentInterface::MXnComponentInterface* CXnPopup::MakeInterfaceL(const TDesC8& aType)
       
   101     {
       
   102    if (aType != XnPopupInterface::KType)
       
   103        {
       
   104        return NULL;
       
   105        }
       
   106     XnPopupInterface::MXnPopupInterface* popup = static_cast<XnPopupInterface::MXnPopupInterface*>(this);
       
   107     return popup;
       
   108     }