1 // Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies).
2 // All rights reserved.
3 // This component and the accompanying materials are made available
4 // 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
5 // which accompanies this distribution, and is available
6 // at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
14 // Defines mix-in interace to break dependencey of Eikon Application UI
19 #ifndef __EIKAUFTY_H__
20 #define __EIKAUFTY_H__
28 class CEikHotKeyTable;
31 class CEikCommandButton;
33 class CEikButtonGroupContainer;
39 /** This class defines a mixin interface to break the dependency of the Uikon Application
40 User Interface on controls.
44 class MEikAppUiFactory : public MObjectProvider
47 virtual void CreateResourceIndependentFurnitureL(CEikAppUi* aAppUi) =0;
48 virtual TRect ClientRect() = 0;
49 virtual void ReadAppInfoResourceL(TInt aResourceFileOffset,CEikAppUi* aAppUi) = 0;
50 virtual void LaunchPopupMenuL( TInt aResourceId,
51 const TPoint& aTargetPos,
52 TPopupTargetPosType aTargetType,
53 const CEikHotKeyTable* aHotKeyTable,
54 CEikAppUi* aAppUi) = 0;
56 virtual void DoLaunchPopupL(TInt aResourceId,const TPoint& aTargetPos, const CEikHotKeyTable* aHotKeyTable,
57 TPopupTargetPosType aTargetType,CEikAppUi* aAppUi) = 0;
59 virtual void ClosePopup(CEikAppUi* aAppUi) = 0;
60 virtual void StopDisplayingMenuBar() = 0;
61 virtual void HandleSideBarMenuL(TInt aResourceId,const TPoint& aPos,
62 const CEikHotKeyTable* aHotKeyTable,CEikAppUi* aAppUi) = 0;
63 virtual void CreateHotKeyControlL(TInt aResourceId, CEikAppUi* aAppUi) = 0;
64 /** Gets a pointer to the menu bar.
66 @return Pointer to the menu bar. */
67 virtual CEikMenuBar* MenuBar() const = 0;
68 /** Replaces or clears a menu bar, returning a pointer to the replaced menu bar.
70 @param aMenu The new menu bar. This can be NULL to clear an existing menu bar.
71 @return Pointer to the replaced menu bar. */
72 virtual CEikMenuBar* SwapMenuBar(CEikMenuBar* aMenu) = 0;
73 virtual CEikMenuPane* Popup() const = 0;
74 /** Gets a pointer to the tool bar.
76 @return Pointer to the tool bar. */
77 virtual CEikButtonGroupContainer* ToolBar() const = 0;
78 /** Replaces or clears a button group, returning a pointer to the replaced button
81 @param aNewGroup The new button group. This can be NULL to clear an existing
83 @return Pointer to the replaced button group. */
84 virtual CEikButtonGroupContainer* SwapButtonGroup(CEikButtonGroupContainer* aNewGroup) = 0;
85 /** Gets a pointer to the tool band.
87 @return Pointer to the tool band. */
88 virtual CEikToolBar* ToolBand() const = 0;
89 /** Gets a pointer to the title band.
91 @return Pointer to the title band. */
92 virtual CEikToolBar* TitleBand() const = 0;
93 /** Gets a pointer to the status pane.
95 @return Pointer to the status pane */
96 virtual CEikStatusPane* StatusPane() const = 0;
97 /** Gets a pointer to the CBA.
99 @return Pointer to the CBA */
100 virtual CEikButtonGroupContainer* Cba() const = 0;
101 inline CEikToolBar* SwapToolBand(CEikToolBar* aToolBand);
102 inline CEikToolBar* SwapTitleBand(CEikToolBar* aTitleBand);
103 /** Creates a standard tab button.
105 @return Pointer to the created tab button. */
106 virtual CEikCommandButton* CreateStandardTabButtonL() const = 0;
107 virtual void CreateEmbeddedL(CEikonEnv& aEikonEnv) = 0;
108 virtual void DestroyEmbedded(CEikonEnv& aEikonEnv) = 0;
109 virtual void HandleResourceChangeL(TInt aType) = 0;
111 /** Defines the type of tool bar. */
114 /** Defines a band tool bar. */
116 /** Defines a title tool bar. */
120 virtual CEikToolBar* SwapToolBar(CEikToolBar* aToolBar,TToolBarType aType) = 0;
125 /** Replaces or clears a tool band, returning a pointer to the replaced tool band.
127 @param aToolBand The new tool band. This can be NULL to clear an existing
129 @return Pointer to the replaced tool band. */
130 inline CEikToolBar* MEikAppUiFactory::SwapToolBand(CEikToolBar* aToolBand)
131 {return SwapToolBar(aToolBand,EBand);}
134 /** Replaces or clears a title band, returning a pointer to the replaced title
137 @param aTitleBand The new title band. This can be NULL to clear an existing
139 @return Pointer to the replaced title band. */
140 inline CEikToolBar* MEikAppUiFactory::SwapTitleBand(CEikToolBar* aTitleBand)
141 {return SwapToolBar(aTitleBand,ETitle);}
143 #endif // __EIKAUFTY_H__