diff -r 000000000000 -r 4e91876724a2 photosgallery/viewframework/views/viewbase/inc/mglxsoftkeyhandler.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/photosgallery/viewframework/views/viewbase/inc/mglxsoftkeyhandler.h Thu Dec 17 08:45:44 2009 +0200 @@ -0,0 +1,67 @@ +/* +* Copyright (c) 2008-2009 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: Interface for softkey handling +* +*/ + + + + +#ifndef M_GLXSOFTKEYHANDLER_H +#define M_GLXSOFTKEYHANDLER_H + +/** + * Available softkeys + */ +enum TGlxSoftkey + { + EGlxLeftSoftkey, + EGlxMiddleSoftkey, + EGlxRightSoftkey + }; + +/** + * Allow components other than views to update softkeys if necessary + */ +class MGlxSoftkeyHandler + { +public: + /** + * Store copy of current softkeys to allow original config + * to be restored + */ + virtual void StoreCurrentSoftKeysL() = 0; + + /** + * Set specified softkey with command and text + * @param aSoftkey softkey to set (EGlxLeftSoftkey/EGlxRighttSoftkey) + * @param aCommand id of command to associate with softkey + * @param aSoftkeyText text for softkey (softkey takes ownership) + */ + virtual void ChangeSoftkeyL(TGlxSoftkey aSoftkey, TInt aCommand, + const TDesC& aSoftkeyText) = 0; + /** + * Restore original softkeys and title + */ + virtual void RestoreSoftKeysAndTitleL() = 0; + + /** + * Enables / disables a softkey + * @param aEnable Whether to enable or disable the softkey + * @param aSoftkey The affected softkey + */ + virtual void EnableSoftkey( TBool aEnable, TGlxSoftkey aSoftkey ) = 0; + }; + +#endif // M_GLXSOFTKEYHANDLER_H