diff -r 000000000000 -r 2f259fa3e83a uifw/EikStd/coctlsrc/EIKHKEYC.CPP --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/uifw/EikStd/coctlsrc/EIKHKEYC.CPP Tue Feb 02 01:00:49 2010 +0200 @@ -0,0 +1,84 @@ +/* +* Copyright (c) 1997-1999 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: +* +*/ + + +#include +#include +#include + +/** + * Writes the internal state of the control and its components to aStream. + * Does nothing in release mode. + * Designed to be overidden and base called by subclasses. + * + * @internal + * @since App-Framework_6.1 + */ +#ifndef _DEBUG +EXPORT_C void CEikHotKeyControl::WriteInternalStateL(RWriteStream&) const + {} +#else +EXPORT_C void CEikHotKeyControl::WriteInternalStateL(RWriteStream& aWriteStream) const + { + _LIT(KEikLitBtpanCtlSt,""); + _LIT(KEikLitBtpanCtlEnd,"<\\CEikHotKeyControl>"); + _LIT(KEikLitBtpanCtlHkeyObs, ""); + _LIT(KEikLitBtpanCtlHkeyObsEnd, "<\\iObserver>"); + _LIT(KEikLitBtpanCtlHkeyTab, ""); + _LIT(KEikLitBtpanCtlHkeyTabEnd, "<\\iTable>"); + + aWriteStream << KEikLitBtpanCtlSt; + aWriteStream << KEikLitBtpanCtlHkeyTab; + + const TInt count=iTable->Count(); + for(TInt i=0;iCommandIdFromHotKey(aKeyEvent.iCode,aKeyEvent.iModifiers&(EModifierCtrl|EModifierShift|EModifierPureKeycode)); + if (!command) + return(EKeyWasNotConsumed); + iObserver->ProcessCommandL(command); + return(EKeyWasConsumed); + } + +CEikHotKeyControl::CEikHotKeyControl(CEikHotKeyTable* aTable,MEikCommandObserver* aObserver) + : iTable(aTable), + iObserver(aObserver) + { + MakeVisible(EFalse); + } + +CEikHotKeyControl::~CEikHotKeyControl() + { + delete(iTable); + }