inputmethods_plat/aknfep_uiinterface_api/inc/AknFepUiMenus.h
changeset 0 eb1f2e154e89
equal deleted inserted replaced
-1:000000000000 0:eb1f2e154e89
       
     1 /*
       
     2 * Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0""
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:              
       
    15 *       Interface through which the FEP can use menu components
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 
       
    21 
       
    22 
       
    23 
       
    24 
       
    25 
       
    26 
       
    27 
       
    28 
       
    29 
       
    30 
       
    31 
       
    32 
       
    33 #ifndef AKNFEPUIINTERFACEMENUS_H
       
    34 #define AKNFEPUIINTERFACEMENUS_H
       
    35 
       
    36 #include <e32base.h>
       
    37 #include <eikcmobs.h>
       
    38 #include <avkon.hrh>
       
    39 
       
    40 class CEikMenuPane;
       
    41 class MAknFepUiInterfaceMenuObserver;
       
    42 
       
    43 
       
    44 class CAknFepUiInterfaceMenuPane : public CBase
       
    45 	{
       
    46 public:
       
    47     // Struct copied from CEikMenuPaneItem
       
    48     struct SItemData
       
    49         {
       
    50         enum { ENominalTextLength=40 };
       
    51         TInt iCommandId;
       
    52         TInt iCascadeId;
       
    53         TInt iFlags;
       
    54         TBuf<ENominalTextLength> iText; // less than this actually stored
       
    55         TBuf<1> iExtraText;
       
    56         };
       
    57  
       
    58 public:
       
    59     virtual void ConstructMenuSctRowFromDialogL( TInt aCharCase, TDes& aSpecialChars, TInt aResourceId ) = 0;
       
    60     virtual void ConstructMenuSctRowL( TDes& aSpecialChars, TInt aResourceId ) = 0;
       
    61     virtual void DeleteMenuItem(TInt aCommandId) = 0;	
       
    62     virtual void InsertMenuItemL(const SItemData& aMenuItem, TInt aPosition) = 0;
       
    63     virtual TBool MenuItemExists(TInt aCommandId, TInt& aPosition) = 0;
       
    64     virtual TInt NumberOfItemsInPane() const = 0;
       
    65     virtual void SetItemDimmed(TInt aCommandId, TBool aDimmed) = 0;
       
    66     virtual void SetMenuPane(CEikMenuPane* aMenuPane) = 0;
       
    67     virtual CEikMenuPane* GetMenuPane() = 0;
       
    68 	};
       
    69 
       
    70 class CAknFepUiInterfaceMenuBar : public CBase
       
    71 	{
       
    72 public:
       
    73 	// Enum copied from CEikMenuBar
       
    74     enum TMenuType {
       
    75         EMenuOptions = 0,
       
    76         EMenuEdit = 2,
       
    77         EMenuOptionsNoTaskSwapper = 3
       
    78         };
       
    79 public:
       
    80 	virtual CAknFepUiInterfaceMenuPane* MenuPane() = 0;
       
    81 	virtual void SetMenuType(TMenuType aMenuType) = 0;
       
    82 	virtual void StopDisplayingMenuBar() = 0;
       
    83 	virtual void ReplaceAllMenuPanes(TInt aResourceId) = 0; //TitleArray replaced with use-case tailored functions
       
    84 	virtual void TryDisplayMenuBarL() = 0;
       
    85 	virtual void SetFocus(TBool aFocus) = 0;
       
    86 	virtual void RemoveFromStack() = 0;
       
    87 	virtual TInt FirstMenuPaneResourceId() = 0;
       
    88 	virtual TBool IsDisplayed() = 0;
       
    89 	virtual void AddToStackL(TInt aPriority,TInt aStackingFlags) = 0;
       
    90     virtual void TryDisplayMenuBarWithoutFepMenusL() = 0;
       
    91     virtual void SetMenuTitleResourceId(TInt aResourceId) = 0;
       
    92     virtual void SetEditMenuObserver(MAknFepUiInterfaceMenuObserver* aEditMenuObserver) = 0;
       
    93     virtual void RemoveEditMenuObserver(MAknFepUiInterfaceMenuObserver* aEditMenuObserver) = 0;
       
    94 	};
       
    95 
       
    96 class MAknFepUiInterfaceMenuObserver : public MEikCommandObserver
       
    97 	{
       
    98 public:
       
    99 	IMPORT_C virtual void DynInitMenuPaneL(TInt aResourceId,CAknFepUiInterfaceMenuPane* aMenuPane);
       
   100 	IMPORT_C virtual void DynInitMenuBarL(TInt aResourceId,CAknFepUiInterfaceMenuBar* aMenuBar);
       
   101 	virtual void SetEmphasis(CBase* aMenuControl,TBool aEmphasis)=0;
       
   102 	};
       
   103 
       
   104 #endif