diff -r 000000000000 -r eb1f2e154e89 textinput/peninputhwrfscn/src/peninputhwrfscnbasepanel.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/textinput/peninputhwrfscn/src/peninputhwrfscnbasepanel.cpp Tue Feb 02 01:02:04 2010 +0200 @@ -0,0 +1,123 @@ +/* +* Copyright (c) 2005-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: Implementation for chinese peninput full screen hwr +* +*/ + + +#include "peninputhwrfscnlayout.h" +#include "peninputhwrfscnbasepanel.h" + +// ============================ MEMBER FUNCTIONS =============================== + +// ----------------------------------------------------------------------------- +// CPeninputHwrfscnBasePanel::~CPeninputHwrfscnBasePanel() +// . +// ----------------------------------------------------------------------------- +// +CPeninputHwrfscnBasePanel::~CPeninputHwrfscnBasePanel() + { + iEventObserverList.Reset(); + iEventObserverList.Close(); + } + +// ----------------------------------------------------------------------------- +// CPeninputHwrfscnBasePanel::AddEventObserver() +// . +// ----------------------------------------------------------------------------- +// +void CPeninputHwrfscnBasePanel::AddEventObserver( MEventObserver* aObserver ) + { + if( !aObserver ) + return; + //add only when it's not an observer + if( KErrNotFound == iEventObserverList.Find( aObserver ) ) + { + iEventObserverList.Append( aObserver ); + } + } + +// ----------------------------------------------------------------------------- +// CPeninputHwrfscnBasePanel::RemoveEventObserver() +// . +// ----------------------------------------------------------------------------- +// +void CPeninputHwrfscnBasePanel::RemoveEventObserver( MEventObserver* aObserver ) + { + TInt index = iEventObserverList.Find( aObserver ); + if( KErrNotFound != index ) + { + iEventObserverList.Remove( index ); + } + } + +// ----------------------------------------------------------------------------- +// CPeninputHwrfscnBasePanel::SetPostion() +// . +// ----------------------------------------------------------------------------- +// +void CPeninputHwrfscnBasePanel::SetPostion( TPoint aPos ) + { + iPos = aPos; + SizeChanged(); + } + +// ----------------------------------------------------------------------------- +// CPeninputHwrfscnBasePanel::IsVisible() +// . +// ----------------------------------------------------------------------------- +// +TBool CPeninputHwrfscnBasePanel::IsVisible() + { + return iVisible; + } + +// ----------------------------------------------------------------------------- +// CPeninputHwrfscnBasePanel::AddToRootControl() +// . +// ----------------------------------------------------------------------------- +// +void CPeninputHwrfscnBasePanel::AddToRootControlL( CFepUiBaseCtrl* aCtrl ) + { + iLayout->AddControlL( aCtrl, EFalse ); + } + +// ----------------------------------------------------------------------------- +// CPeninputHwrfscnBasePanel::CPeninputHwrfscnBasePanel() +// . +// ----------------------------------------------------------------------------- +// +CPeninputHwrfscnBasePanel::CPeninputHwrfscnBasePanel( + CPeninputHwrfscnLayout * aLayout ) + : iVisible( EFalse ),iLayout( aLayout ) + { + } + +// ----------------------------------------------------------------------------- +// CPeninputHwrfscnBasePanel::ReportEvent() +// . +// ----------------------------------------------------------------------------- +// +void CPeninputHwrfscnBasePanel::ReportEvent( TInt aEventType, + CFepUiBaseCtrl* aCtrl, + const TDesC& aEventData ) + { + for( TInt i = 0; i < iEventObserverList.Count(); i++ ) + { + iEventObserverList[i]->HandleControlEvent( + aEventType, aCtrl, aEventData ); + } + } + +//end of file