sl@0: // Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). sl@0: // All rights reserved. sl@0: // This component and the accompanying materials are made available sl@0: // under the terms of "Eclipse Public License v1.0" sl@0: // which accompanies this distribution, and is available sl@0: // at the URL "http://www.eclipse.org/legal/epl-v10.html". sl@0: // sl@0: // Initial Contributors: sl@0: // Nokia Corporation - initial contribution. sl@0: // sl@0: // Contributors: sl@0: // sl@0: // Description: sl@0: // sl@0: sl@0: /** sl@0: @file sl@0: @test sl@0: @internalComponent sl@0: */ sl@0: sl@0: #include sl@0: #include "t_dsaappview.h" sl@0: #include "t_dsaappeng.h" sl@0: sl@0: /** sl@0: * Private constructor, does nothing sl@0: * sl@0: */ sl@0: CDsaAppView::CDsaAppView() sl@0: { sl@0: } sl@0: sl@0: /** sl@0: * Standard 2 phase construction, constructs a View object sl@0: * @return pointer to the CDsaAppView sl@0: * @param aRect - rectangle coordinate defining control's extent sl@0: */ sl@0: CDsaAppView* CDsaAppView::NewL(const TRect& aRect) sl@0: { sl@0: CDsaAppView* self = new(ELeave) CDsaAppView(); sl@0: CleanupStack::PushL(self); sl@0: self->ConstructL(aRect); sl@0: CleanupStack::Pop(); sl@0: return self; sl@0: } sl@0: sl@0: /** sl@0: * sl@0: * Destructor sl@0: */ sl@0: CDsaAppView::~CDsaAppView() sl@0: { sl@0: delete iDsaText; sl@0: iDsaText = NULL; sl@0: delete iEng; sl@0: iEng = NULL; sl@0: } sl@0: sl@0: /** sl@0: * constructL method sl@0: * @param aRect - rectangle coordinate defining control's extent sl@0: * sl@0: */ sl@0: void CDsaAppView::ConstructL(const TRect& aRect) sl@0: { sl@0: CreateWindowL(); sl@0: SetRect(aRect); sl@0: sl@0: // Set up our engine sl@0: iEng = CTDsaAppEng::NewL(iEikonEnv->WsSession(), sl@0: *(CCoeEnv::Static()->ScreenDevice()), sl@0: Window()); sl@0: sl@0: ActivateL(); sl@0: } sl@0: sl@0: /** sl@0: * sl@0: * Draws the text on the screen sl@0: * sl@0: */ sl@0: sl@0: void CDsaAppView::Draw(const TRect& /*aRect*/) const sl@0: { sl@0: RDebug::Print(_L("dsa draw")); sl@0: sl@0: if(iEng->Drawing()) sl@0: { sl@0: return; sl@0: } sl@0: sl@0: iEng->StartDrawing(); sl@0: }