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