2 * Copyright (c) 1997-1999 Nokia Corporation and/or its subsidiary(-ies).
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".
9 * Initial Contributors:
10 * Nokia Corporation - initial contribution.
19 #if !defined(__EIKCOLIB_H__)
20 #define __EIKCOLIB_H__
33 class CEikAppUiFactory;
40 class CEikCoCtlLibrary : public CBase
44 * ResourceFile eikcoctl.rsc file name
46 IMPORT_C static TFileName ResourceFile();
48 * ControlFactory provides ability to create controls by id number.
50 IMPORT_C static TCreateByTypeFunction ControlFactory();
52 * Factory to create buttongroups
54 IMPORT_C static TCreateButtonGroupByTypeFunction ButtonGroupFactory();
56 static SEikControlInfo CreateByTypeL(TInt aControlType);
57 static MEikButtonGroup* CreateButtonGroupByTypeL(TInt aButtonGroupType,EikButtonGroupFactory::TCreationData& aCreationData,TBool& aAddToButtonGroupStack);
65 class CEikCommandButton;
67 class CEikAppUiFactoryExtension;
73 class CEikAppUiFactory : public CBase, public MEikAppUiFactory, public MLafClientRectResolver
76 IMPORT_C CEikAppUiFactory();
78 public: // from MEikAppUiFactory
79 void CreateResourceIndependentFurnitureL(CEikAppUi* aAppUi);
81 void ReadAppInfoResourceL(TInt aResourceFileOffset, CEikAppUi* aAppUi);
82 void LaunchPopupMenuL(
84 const TPoint& aTargetPos,
85 TPopupTargetPosType aTargetType,
86 const CEikHotKeyTable* aHotKeyTable,
90 const TPoint& aTargetPos,
91 const CEikHotKeyTable* aHotKeyTable,
92 TPopupTargetPosType aTargetType,
94 void ClosePopup(CEikAppUi* aAppUi);
95 void StopDisplayingMenuBar();
96 void HandleSideBarMenuL(
99 const CEikHotKeyTable* aHotKeyTable,
102 void CreateHotKeyControlL(TInt aResourceId, CEikAppUi* aAppUi);
103 CEikMenuBar* MenuBar() const;
104 CEikMenuBar* SwapMenuBar(CEikMenuBar* aMenu);
105 CEikMenuPane* Popup() const;
106 CEikButtonGroupContainer* SwapButtonGroup(CEikButtonGroupContainer* aNewGroup);
107 CEikButtonGroupContainer* ToolBar() const;
108 CEikToolBar* ToolBand() const;
109 CEikToolBar* TitleBand() const;
110 CEikToolBar* SwapToolBar(CEikToolBar* aToolBar,TToolBarType aType);
111 CEikStatusPane* StatusPane() const;
112 CEikButtonGroupContainer* Cba() const;
114 CEikCommandButton* CreateStandardTabButtonL() const;
115 void CreateEmbeddedL(CEikonEnv& aEikonEnv);
116 void DestroyEmbedded(CEikonEnv& aEikonEnv);
117 void HandleResourceChangeL(TInt aType);
118 public: // New functions
119 IMPORT_C CAknTouchPane* TouchPane() const;
122 * Returns the pointer to the application avkon toolbar object if
123 * there is one or NULL.
125 * @return Pointer to the AVKON toolbar object
126 * @since Series 60 3.1
128 IMPORT_C CAknToolbar* PopupToolbar() const;
131 * Returns the pointer to the current view avkon toolbar object if
132 * there is one, if no it will return the pointer to the application
133 * avkon toolbar or NULL.
135 * @return Pointer to the AVKON toolbar object
136 * @since Series 60 3.1
138 IMPORT_C CAknToolbar* CurrentPopupToolbar() const;
141 * Sets the avkon toolbar for the current view. Called by CAknView when view is
144 * @param aViewPopupToolbar Pointer to the view specific toolbar.
145 * @since Series 60 3.1
147 IMPORT_C void SetViewPopupToolbar(CAknToolbar* aViewPopupToolbar);
150 * Returns the pointer to the current view avkon fixed toolbar object if
151 * there is one, if no it will return the pointer to the application
152 * avkon fixed toolbar or NULL.
154 * @return Pointer to the AVKON toolbar object
157 IMPORT_C CAknToolbar* CurrentFixedToolbar() const;
161 * Sets the avkon fixed toolbar for the current view. Called by CAknView
162 * when view is activated.
164 * @param aViewFixedToolbar Pointer to the view specific fixed toolbar.
167 IMPORT_C void SetViewFixedToolbar( CAknToolbar* aViewFixedToolbar );
171 private: // from MLafClientRectResolver
172 void ReduceRect(TScreenFurniture aScreenFurniture,TRect& aRect) const;
174 void AddTitleBandL(CEikAppUi* aAppUi);
175 private: // from MObjectProvider
176 TTypeUid::Ptr MopSupplyObject(TTypeUid aId);
186 TInt iExtensionId; // link to extension resource struct.
194 CEikButtonGroupContainer* iToolBar;
195 CEikToolBar* iToolBand;
196 CEikToolBar* iTitleBand;
197 CEikMenuBar* iMenuBar;
198 CEikMenuPane* iPopup;
199 TInt iSidebarPopupId;
200 CEikStatusPane* iStatusPane;
201 // To avoid BC break, iCba is replaced with an extension containing iCba
202 // and some additional items.
203 //CEikButtonGroupContainer* iCba;
204 CEikAppUiFactoryExtension* iExtension;