uifw/AvKon/tsrc/bc/S60_SDK3.0/bctestlist/src/bctestlistcontainer.cpp
changeset 0 2f259fa3e83a
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/uifw/AvKon/tsrc/bc/S60_SDK3.0/bctestlist/src/bctestlistcontainer.cpp	Tue Feb 02 01:00:49 2010 +0200
@@ -0,0 +1,115 @@
+/*
+* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  container
+*
+*/
+
+
+#include "bctestlistcontainer.h"
+#include "bctestlistbasecase.h"
+
+// ======== MEMBER FUNCTIONS ========
+
+// ---------------------------------------------------------------------------
+// C++ default Constructor
+// ---------------------------------------------------------------------------
+//
+CBCTestListContainer::CBCTestListContainer()
+    {    
+    }
+
+// ---------------------------------------------------------------------------
+// Destructor
+// ---------------------------------------------------------------------------
+//
+CBCTestListContainer::~CBCTestListContainer()
+    {
+    delete iControl;
+    iControl = NULL;    
+    }
+    
+// ---------------------------------------------------------------------------
+// Symbian 2nd Constructor
+// ---------------------------------------------------------------------------
+//
+void CBCTestListContainer::ConstructL( const TRect& aRect )
+    {
+    CreateWindowL();
+    SetRect( aRect );
+    ActivateL();
+    }
+
+// ----------------------------------------------------------------------------
+// CBCTestListContainer::Draw
+// Fills the window's rectangle.
+// ----------------------------------------------------------------------------
+//
+void CBCTestListContainer::Draw( const TRect& aRect ) const
+    {    
+    CWindowGc& gc = SystemGc();
+    gc.SetPenStyle( CGraphicsContext::ENullPen );
+    gc.SetBrushColor( KRgbGray );
+    gc.SetBrushStyle( CGraphicsContext::ESolidBrush );
+    gc.DrawRect( aRect );      
+    }
+
+// ---------------------------------------------------------------------------
+// CBCTestListContainer::CountComponentControls
+// ---------------------------------------------------------------------------
+//
+TInt CBCTestListContainer::CountComponentControls() const
+    {
+    if ( iControl )
+        {
+        return 1;
+        }
+    else
+        {
+        return 0;
+        }
+    }
+    
+// ---------------------------------------------------------------------------
+// CBCTestListContainer::ComponentControl
+// ---------------------------------------------------------------------------
+//
+CCoeControl* CBCTestListContainer::ComponentControl( TInt ) const
+    {
+    return iControl;
+    }
+    
+// ---------------------------------------------------------------------------
+// CBCTestListContainer::SetControl
+// ---------------------------------------------------------------------------
+//
+void CBCTestListContainer::SetControl( CCoeControl* aControl )
+    {
+    iControl = aControl;    
+    if ( iControl )
+        {        
+        iControl->SetExtent( Rect().iTl, Rect().Size() );
+        iControl->ActivateL();
+        DrawNow();
+        }    
+    }
+    
+// ---------------------------------------------------------------------------
+// CBCTestListContainer::ResetControl
+// ---------------------------------------------------------------------------
+//
+void CBCTestListContainer::ResetControl()
+    {
+    delete iControl;
+    iControl = NULL;            
+    }