1.1 --- a/epoc32/include/eikmobs.h Tue Nov 24 13:55:44 2009 +0000
1.2 +++ b/epoc32/include/eikmobs.h Tue Mar 16 16:12:26 2010 +0000
1.3 @@ -1,1 +1,125 @@
1.4 -eikmobs.h
1.5 +// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies).
1.6 +// All rights reserved.
1.7 +// This component and the accompanying materials are made available
1.8 +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
1.9 +// which accompanies this distribution, and is available
1.10 +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
1.11 +//
1.12 +// Initial Contributors:
1.13 +// Nokia Corporation - initial contribution.
1.14 +//
1.15 +// Contributors:
1.16 +//
1.17 +// Description:
1.18 +//
1.19 +
1.20 +#ifndef __EIKMOBS_H__
1.21 +#define __EIKMOBS_H__
1.22 +
1.23 +#include <eikcmobs.h>
1.24 +#include <w32std.h>
1.25 +#include <coedef.h>
1.26 +
1.27 +class CCoeControl;
1.28 +class CEikMenuPane;
1.29 +class CEikMenuBar;
1.30 +class CEikHotKeyTable;
1.31 +class TPoint;
1.32 +
1.33 +/** Menu observer interface.
1.34 +
1.35 +Menu observers cooperate with menu bars and menu panes, initialising them
1.36 +before display and responding to menu events appropriately. CEikAppUi implements
1.37 +MEikMenuObserver, so these functions may be implemented on an application's
1.38 +App UI.
1.39 +
1.40 +@publishedAll
1.41 +@released */
1.42 +class MEikMenuObserver : public MEikCommandObserver
1.43 + {
1.44 +public:
1.45 + /** Menu types */
1.46 + enum TMenuType
1.47 + {
1.48 + /** Menu pane. */
1.49 + EMenuPane,
1.50 + /** Menu bar. */
1.51 + EMenuBar
1.52 + };
1.53 +public:
1.54 + IMPORT_C virtual void HandleAttemptDimmedSelectionL(TInt aCommandId);
1.55 + IMPORT_C virtual TBool CheckHotKeyNotDimmedL(TInt aCommandId);
1.56 + IMPORT_C virtual void RestoreMenuL(CCoeControl* aMenuControl,TInt aResourceId,TMenuType aType);
1.57 + IMPORT_C virtual void DynInitMenuPaneL(TInt aResourceId,CEikMenuPane* aMenuPane);
1.58 + IMPORT_C virtual void DynInitMenuBarL(TInt aResourceId,CEikMenuBar* aMenuBar);
1.59 + IMPORT_C virtual void HandleSideBarMenuL(TInt aResourceId,const TPoint& aPos,TInt aModifiers,const CEikHotKeyTable* aTable);
1.60 + IMPORT_C virtual void OfferKeyToAppL(const TKeyEvent& aKeyEvent,TEventCode aType);
1.61 + /** Called by the Uikon framework to handle the emphasising or de-emphasising of
1.62 + a menu window.
1.63 +
1.64 + CEikMenuBar objects call this on their observer to emphasise
1.65 + themselves when they are displayed, and de-emphasise themselves when they
1.66 + stop displaying.
1.67 +
1.68 + @param aMenuControl The menu control.
1.69 + @param aEmphasis ETrue to emphasize the menu, EFalse otherwise. */
1.70 + virtual void SetEmphasis(CCoeControl* aMenuControl,TBool aEmphasis)=0;
1.71 +public:
1.72 + IMPORT_C virtual CCoeControl* CreateCustomCommandControlL(TInt aControlType);
1.73 +protected:
1.74 + IMPORT_C MEikMenuObserver();
1.75 +private:
1.76 + IMPORT_C virtual void Reserved_1_MenuObserver();
1.77 + IMPORT_C virtual void Reserved_2_MenuObserver();
1.78 +private: // from MEikCommandObserver. do not override!
1.79 + IMPORT_C void MEikCommandObserver_Reserved1();
1.80 + IMPORT_C void MEikCommandObserver_Reserved2();
1.81 +private:
1.82 + TInt iMEikMenuObserver_Spare1;
1.83 + };
1.84 +
1.85 +
1.86 +/** Provides additional functionality to an auto menu title, in the form of an
1.87 +OfferHotKeyL() method, which is not required in the normal MEikMenuObserver.
1.88 +
1.89 +Auto menu titles are used to ensure that some menu panes appear in every menu
1.90 +constructed for an application.
1.91 +
1.92 +@publishedAll
1.93 +@released */
1.94 +class MEikAutoMenuObserver : public MEikMenuObserver
1.95 + {
1.96 +public:
1.97 + /** Offers the specified hot key to the auto menu title.
1.98 +
1.99 + Implement this function if you expect to handle any events from an auto menu.
1.100 +
1.101 + @param aKeyEvent The key event.
1.102 + @param aType The type of key event.
1.103 + @return The auto menu title's response. */
1.104 + virtual TKeyResponse OfferHotKeyL(const TKeyEvent& aKeyEvent,TEventCode aType)=0;
1.105 +public: // from MEikMenuObserver
1.106 + IMPORT_C void SetEmphasis(CCoeControl* aMenuControl,TBool aEmphasis);
1.107 +public:
1.108 + IMPORT_C virtual void HandleAttemptDimmedSelectionL(TInt aCommandId);
1.109 + IMPORT_C virtual TBool CheckHotKeyNotDimmedL(TInt aCommandId);
1.110 + IMPORT_C virtual void RestoreMenuL(CCoeControl* aMenuControl,TInt aResourceId,TMenuType aType);
1.111 + IMPORT_C virtual void DynInitMenuPaneL(TInt aResourceId,CEikMenuPane* aMenuPane);
1.112 + IMPORT_C virtual void DynInitMenuBarL(TInt aResourceId,CEikMenuBar* aMenuBar);
1.113 + IMPORT_C virtual void HandleSideBarMenuL(TInt aResourceId,const TPoint& aPos,TInt aModifiers,const CEikHotKeyTable* aTable);
1.114 + IMPORT_C virtual void OfferKeyToAppL(const TKeyEvent& aKeyEvent,TEventCode aType);
1.115 + IMPORT_C virtual CCoeControl* CreateCustomCommandControlL(TInt aControlType);
1.116 +protected:
1.117 + IMPORT_C MEikAutoMenuObserver();
1.118 +private:
1.119 + IMPORT_C virtual void Reserved_1_MenuObserver();
1.120 + IMPORT_C virtual void Reserved_2_MenuObserver();
1.121 +private: // from MEikCommandObserver. do not override!
1.122 + IMPORT_C void MEikCommandObserver_Reserved1();
1.123 + IMPORT_C void MEikCommandObserver_Reserved2();
1.124 +private:
1.125 + TInt iMEikAutoMenuObserver_Spare1;
1.126 + };
1.127 +
1.128 +
1.129 +#endif // __EIKMOBS_H__