epoc32/include/mw/eikcolib.h
author William Roberts <williamr@symbian.org>
Wed, 31 Mar 2010 12:33:34 +0100
branchSymbian3
changeset 4 837f303aceeb
permissions -rw-r--r--
Current Symbian^3 public API header files (from PDK 3.0.h)
This is the epoc32/include tree with the "platform" subtrees removed, and
all but a selected few mbg and rsg files removed.
     1 /*
     2 * Copyright (c) 1997-1999 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 *
    16 */
    17 
    18 
    19 #if !defined(__EIKCOLIB_H__)
    20 #define __EIKCOLIB_H__
    21 
    22 #include <eikaufty.h>
    23 #include <f32file.h>
    24 #include <e32base.h>
    25 #include <eiklibry.h>
    26 #include <eikbtgpc.h>
    27 #include <eikspane.h>
    28 #include <eikbgfty.h>
    29 #include <lafmain.h>
    30 
    31 
    32 
    33 class CEikAppUiFactory;
    34 class CEikAppUi;
    35 
    36 /**
    37  * @internal
    38  * Do not use
    39  */
    40 class CEikCoCtlLibrary : public CBase
    41 	{
    42 public:
    43 	/**
    44 	 * ResourceFile eikcoctl.rsc file name
    45 	 */
    46 	IMPORT_C static TFileName				ResourceFile();
    47 	/**
    48 	 * ControlFactory provides ability to create controls by id number.
    49 	 */
    50 	IMPORT_C static TCreateByTypeFunction	ControlFactory();
    51 	/**
    52      * Factory to create buttongroups
    53      */
    54 	IMPORT_C static TCreateButtonGroupByTypeFunction ButtonGroupFactory();
    55 public:
    56 	static SEikControlInfo CreateByTypeL(TInt aControlType);
    57 	static MEikButtonGroup* CreateButtonGroupByTypeL(TInt aButtonGroupType,EikButtonGroupFactory::TCreationData& aCreationData,TBool& aAddToButtonGroupStack);
    58 private:
    59 	CEikCoCtlLibrary();
    60 	};
    61 
    62 class CEikToolBar;
    63 class CEikMenuBar;
    64 class CEikMenuPane;
    65 class CEikCommandButton;
    66 class CAknTouchPane;
    67 class CEikAppUiFactoryExtension;
    68 class CAknToolbar;
    69 /**
    70  * @internal
    71  * Do not use
    72  */
    73 class CEikAppUiFactory : public CBase, public MEikAppUiFactory, public MLafClientRectResolver
    74 	{
    75 public:
    76 	IMPORT_C CEikAppUiFactory();
    77 	~CEikAppUiFactory();
    78 public: // from MEikAppUiFactory
    79 	void CreateResourceIndependentFurnitureL(CEikAppUi* aAppUi);
    80 	TRect ClientRect();
    81 	void ReadAppInfoResourceL(TInt aResourceFileOffset, CEikAppUi* aAppUi);
    82 	void LaunchPopupMenuL(
    83 							TInt aResourceId,
    84 							const TPoint& aTargetPos,
    85 							TPopupTargetPosType aTargetType,
    86 							const CEikHotKeyTable* aHotKeyTable,
    87 							CEikAppUi* aAppUi);
    88 	void DoLaunchPopupL(
    89 							TInt aResourceId,
    90 							const TPoint& aTargetPos, 
    91 							const CEikHotKeyTable* aHotKeyTable, 
    92 							TPopupTargetPosType aTargetType,
    93 							CEikAppUi* aAppUi);
    94 	void ClosePopup(CEikAppUi* aAppUi);
    95 	void StopDisplayingMenuBar();
    96 	void HandleSideBarMenuL(
    97 							TInt aResourceId,
    98 							const TPoint& aPos,
    99 							const CEikHotKeyTable* aHotKeyTable,
   100 							CEikAppUi* aAppUi);
   101 
   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;
   113 
   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;
   120     	
   121     /**
   122      * Returns the pointer to the application avkon toolbar object if
   123      * there is one or NULL.
   124      * 
   125      * @return Pointer to the AVKON toolbar object
   126      * @since Series 60 3.1
   127      */
   128     IMPORT_C CAknToolbar* PopupToolbar() const;
   129     
   130     /** 
   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.
   134      *
   135      * @return Pointer to the AVKON toolbar object
   136      * @since Series 60 3.1
   137      */
   138     IMPORT_C CAknToolbar* CurrentPopupToolbar() const;
   139     
   140     /**
   141      * Sets the avkon toolbar for the current view. Called by CAknView when view is
   142      * activated.
   143      *
   144      * @param aViewPopupToolbar Pointer to the view specific toolbar.
   145      * @since Series 60 3.1
   146      */
   147     IMPORT_C void SetViewPopupToolbar(CAknToolbar* aViewPopupToolbar); 
   148 
   149     /** 
   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.
   153      *
   154      * @return Pointer to the AVKON toolbar object
   155      * @since S60 5.0
   156      */
   157     IMPORT_C CAknToolbar* CurrentFixedToolbar() const;
   158 
   159 
   160     /**
   161      * Sets the avkon fixed toolbar for the current view. Called by CAknView 
   162      * when view is activated.
   163      *
   164      * @param aViewFixedToolbar Pointer to the view specific fixed toolbar.
   165      * @since S60 5.0
   166      */
   167     IMPORT_C void SetViewFixedToolbar( CAknToolbar* aViewFixedToolbar ); 
   168 
   169 
   170 
   171 private: // from MLafClientRectResolver
   172 	void ReduceRect(TScreenFurniture aScreenFurniture,TRect& aRect) const;
   173 private:
   174 	void AddTitleBandL(CEikAppUi* aAppUi);
   175 private: // from MObjectProvider
   176 	TTypeUid::Ptr MopSupplyObject(TTypeUid aId);
   177 private:
   178 	struct SEikAppInfo
   179 		{
   180 		TInt iHotKeysId;
   181 		TInt iMenuBarId;
   182 		TInt iToolBarId;
   183 		TInt iToolBandId;
   184 		TInt iCbaId;
   185 		TInt iStatusPaneId;
   186         TInt iExtensionId; // link to extension resource struct.
   187 		};
   188 	struct SRssSignature
   189 		{
   190 		TInt iSignature;
   191 		TInt iSelf;
   192 		};
   193 private:
   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;
   205 	};
   206 
   207 #endif