00001
00002
00003
00004
00005
00006
00007
00008 #if !defined(__EIKCOLIB_H__)
00009 #define __EIKCOLIB_H__
00010
00011 #include <eikaufty.h>
00012 #include <f32file.h>
00013 #include <e32base.h>
00014 #include <eiklibry.h>
00015 #include <eikbtgpc.h>
00016 #include <Eikspane.h>
00017 #include <eikbgfty.h>
00018 #include <lafmain.h>
00019
00020
00021
00022 class CEikAppUiFactory;
00023 class CEikAppUi;
00024
00029 class CEikCoCtlLibrary : public CBase
00030 {
00031 public:
00035 IMPORT_C static TFileName ResourceFile();
00039 IMPORT_C static TCreateByTypeFunction ControlFactory();
00043 IMPORT_C static TCreateButtonGroupByTypeFunction ButtonGroupFactory();
00044 public:
00045 static SEikControlInfo CreateByTypeL(TInt aControlType);
00046 static MEikButtonGroup* CreateButtonGroupByTypeL(TInt aButtonGroupType,EikButtonGroupFactory::TCreationData& aCreationData,TBool& aAddToButtonGroupStack);
00047 private:
00048 CEikCoCtlLibrary();
00049 };
00050
00051 class CEikToolBar;
00052 class CEikMenuBar;
00053 class CEikMenuPane;
00054 class CEikCommandButton;
00055 class CAknTouchPane;
00056 class CEikAppUiFactoryExtension;
00057 class CAknToolbar;
00062 class CEikAppUiFactory : public CBase, public MEikAppUiFactory, public MLafClientRectResolver
00063 {
00064 public:
00065 IMPORT_C CEikAppUiFactory();
00066 ~CEikAppUiFactory();
00067 public:
00068 void CreateResourceIndependentFurnitureL(CEikAppUi* aAppUi);
00069 TRect ClientRect();
00070 void ReadAppInfoResourceL(TInt aResourceFileOffset, CEikAppUi* aAppUi);
00071 void LaunchPopupMenuL(
00072 TInt aResourceId,
00073 const TPoint& aTargetPos,
00074 TPopupTargetPosType aTargetType,
00075 const CEikHotKeyTable* aHotKeyTable,
00076 CEikAppUi* aAppUi);
00077 void DoLaunchPopupL(
00078 TInt aResourceId,
00079 const TPoint& aTargetPos,
00080 const CEikHotKeyTable* aHotKeyTable,
00081 TPopupTargetPosType aTargetType,
00082 CEikAppUi* aAppUi);
00083 void ClosePopup(CEikAppUi* aAppUi);
00084 void StopDisplayingMenuBar();
00085 void HandleSideBarMenuL(
00086 TInt aResourceId,
00087 const TPoint& aPos,
00088 const CEikHotKeyTable* aHotKeyTable,
00089 CEikAppUi* aAppUi);
00090
00091 void CreateHotKeyControlL(TInt aResourceId, CEikAppUi* aAppUi);
00092 CEikMenuBar* MenuBar() const;
00093 CEikMenuBar* SwapMenuBar(CEikMenuBar* aMenu);
00094 CEikMenuPane* Popup() const;
00095 CEikButtonGroupContainer* SwapButtonGroup(CEikButtonGroupContainer* aNewGroup);
00096 CEikButtonGroupContainer* ToolBar() const;
00097 CEikToolBar* ToolBand() const;
00098 CEikToolBar* TitleBand() const;
00099 CEikToolBar* SwapToolBar(CEikToolBar* aToolBar,TToolBarType aType);
00100 CEikStatusPane* StatusPane() const;
00101 CEikButtonGroupContainer* Cba() const;
00102
00103 CEikCommandButton* CreateStandardTabButtonL() const;
00104 void CreateEmbeddedL(CEikonEnv& aEikonEnv);
00105 void DestroyEmbedded(CEikonEnv& aEikonEnv);
00106 void HandleResourceChangeL(TInt aType);
00107 public:
00108 IMPORT_C CAknTouchPane* TouchPane() const;
00109
00117 IMPORT_C CAknToolbar* PopupToolbar() const;
00118
00127 IMPORT_C CAknToolbar* CurrentPopupToolbar() const;
00128
00136 IMPORT_C void SetViewPopupToolbar(CAknToolbar* aViewPopupToolbar);
00137
00138 private:
00139 void ReduceRect(TScreenFurniture aScreenFurniture,TRect& aRect) const;
00140 private:
00141 void AddTitleBandL(CEikAppUi* aAppUi);
00142 private:
00143 TTypeUid::Ptr MopSupplyObject(TTypeUid aId);
00144 private:
00145 struct SEikAppInfo
00146 {
00147 TInt iHotKeysId;
00148 TInt iMenuBarId;
00149 TInt iToolBarId;
00150 TInt iToolBandId;
00151 TInt iCbaId;
00152 TInt iStatusPaneId;
00153 TInt iExtensionId;
00154 };
00155 struct SRssSignature
00156 {
00157 TInt iSignature;
00158 TInt iSelf;
00159 };
00160 private:
00161 CEikButtonGroupContainer* iToolBar;
00162 CEikToolBar* iToolBand;
00163 CEikToolBar* iTitleBand;
00164 CEikMenuBar* iMenuBar;
00165 CEikMenuPane* iPopup;
00166 TInt iSidebarPopupId;
00167 CEikStatusPane* iStatusPane;
00168
00169
00170
00171 CEikAppUiFactoryExtension* iExtension;
00172 };
00173
00174 #endif