epoc32/include/mw/eikcolib.h
branchSymbian3
changeset 4 837f303aceeb
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/epoc32/include/mw/eikcolib.h	Wed Mar 31 12:33:34 2010 +0100
     1.3 @@ -0,0 +1,207 @@
     1.4 +/*
     1.5 +* Copyright (c) 1997-1999 Nokia Corporation and/or its subsidiary(-ies).
     1.6 +* All rights reserved.
     1.7 +* This component and the accompanying materials are made available
     1.8 +* under the terms of "Eclipse Public License v1.0"
     1.9 +* which accompanies this distribution, and is available
    1.10 +* at the URL "http://www.eclipse.org/legal/epl-v10.html".
    1.11 +*
    1.12 +* Initial Contributors:
    1.13 +* Nokia Corporation - initial contribution.
    1.14 +*
    1.15 +* Contributors:
    1.16 +*
    1.17 +* Description:
    1.18 +*
    1.19 +*/
    1.20 +
    1.21 +
    1.22 +#if !defined(__EIKCOLIB_H__)
    1.23 +#define __EIKCOLIB_H__
    1.24 +
    1.25 +#include <eikaufty.h>
    1.26 +#include <f32file.h>
    1.27 +#include <e32base.h>
    1.28 +#include <eiklibry.h>
    1.29 +#include <eikbtgpc.h>
    1.30 +#include <eikspane.h>
    1.31 +#include <eikbgfty.h>
    1.32 +#include <lafmain.h>
    1.33 +
    1.34 +
    1.35 +
    1.36 +class CEikAppUiFactory;
    1.37 +class CEikAppUi;
    1.38 +
    1.39 +/**
    1.40 + * @internal
    1.41 + * Do not use
    1.42 + */
    1.43 +class CEikCoCtlLibrary : public CBase
    1.44 +	{
    1.45 +public:
    1.46 +	/**
    1.47 +	 * ResourceFile eikcoctl.rsc file name
    1.48 +	 */
    1.49 +	IMPORT_C static TFileName				ResourceFile();
    1.50 +	/**
    1.51 +	 * ControlFactory provides ability to create controls by id number.
    1.52 +	 */
    1.53 +	IMPORT_C static TCreateByTypeFunction	ControlFactory();
    1.54 +	/**
    1.55 +     * Factory to create buttongroups
    1.56 +     */
    1.57 +	IMPORT_C static TCreateButtonGroupByTypeFunction ButtonGroupFactory();
    1.58 +public:
    1.59 +	static SEikControlInfo CreateByTypeL(TInt aControlType);
    1.60 +	static MEikButtonGroup* CreateButtonGroupByTypeL(TInt aButtonGroupType,EikButtonGroupFactory::TCreationData& aCreationData,TBool& aAddToButtonGroupStack);
    1.61 +private:
    1.62 +	CEikCoCtlLibrary();
    1.63 +	};
    1.64 +
    1.65 +class CEikToolBar;
    1.66 +class CEikMenuBar;
    1.67 +class CEikMenuPane;
    1.68 +class CEikCommandButton;
    1.69 +class CAknTouchPane;
    1.70 +class CEikAppUiFactoryExtension;
    1.71 +class CAknToolbar;
    1.72 +/**
    1.73 + * @internal
    1.74 + * Do not use
    1.75 + */
    1.76 +class CEikAppUiFactory : public CBase, public MEikAppUiFactory, public MLafClientRectResolver
    1.77 +	{
    1.78 +public:
    1.79 +	IMPORT_C CEikAppUiFactory();
    1.80 +	~CEikAppUiFactory();
    1.81 +public: // from MEikAppUiFactory
    1.82 +	void CreateResourceIndependentFurnitureL(CEikAppUi* aAppUi);
    1.83 +	TRect ClientRect();
    1.84 +	void ReadAppInfoResourceL(TInt aResourceFileOffset, CEikAppUi* aAppUi);
    1.85 +	void LaunchPopupMenuL(
    1.86 +							TInt aResourceId,
    1.87 +							const TPoint& aTargetPos,
    1.88 +							TPopupTargetPosType aTargetType,
    1.89 +							const CEikHotKeyTable* aHotKeyTable,
    1.90 +							CEikAppUi* aAppUi);
    1.91 +	void DoLaunchPopupL(
    1.92 +							TInt aResourceId,
    1.93 +							const TPoint& aTargetPos, 
    1.94 +							const CEikHotKeyTable* aHotKeyTable, 
    1.95 +							TPopupTargetPosType aTargetType,
    1.96 +							CEikAppUi* aAppUi);
    1.97 +	void ClosePopup(CEikAppUi* aAppUi);
    1.98 +	void StopDisplayingMenuBar();
    1.99 +	void HandleSideBarMenuL(
   1.100 +							TInt aResourceId,
   1.101 +							const TPoint& aPos,
   1.102 +							const CEikHotKeyTable* aHotKeyTable,
   1.103 +							CEikAppUi* aAppUi);
   1.104 +
   1.105 +	void CreateHotKeyControlL(TInt aResourceId, CEikAppUi* aAppUi);
   1.106 +	CEikMenuBar* MenuBar() const;
   1.107 +	CEikMenuBar* SwapMenuBar(CEikMenuBar* aMenu);
   1.108 +	CEikMenuPane* Popup() const;
   1.109 +	CEikButtonGroupContainer* SwapButtonGroup(CEikButtonGroupContainer* aNewGroup);
   1.110 +	CEikButtonGroupContainer* ToolBar() const;
   1.111 +	CEikToolBar* ToolBand() const;
   1.112 +	CEikToolBar* TitleBand() const;
   1.113 +	CEikToolBar* SwapToolBar(CEikToolBar* aToolBar,TToolBarType aType);
   1.114 +	CEikStatusPane* StatusPane() const;
   1.115 +	CEikButtonGroupContainer* Cba() const;
   1.116 +
   1.117 +	CEikCommandButton* CreateStandardTabButtonL() const;
   1.118 +	void CreateEmbeddedL(CEikonEnv& aEikonEnv);
   1.119 +	void DestroyEmbedded(CEikonEnv& aEikonEnv);
   1.120 +	void HandleResourceChangeL(TInt aType);
   1.121 +public: // New functions
   1.122 +    IMPORT_C CAknTouchPane* TouchPane() const;
   1.123 +    	
   1.124 +    /**
   1.125 +     * Returns the pointer to the application avkon toolbar object if
   1.126 +     * there is one or NULL.
   1.127 +     * 
   1.128 +     * @return Pointer to the AVKON toolbar object
   1.129 +     * @since Series 60 3.1
   1.130 +     */
   1.131 +    IMPORT_C CAknToolbar* PopupToolbar() const;
   1.132 +    
   1.133 +    /** 
   1.134 +     * Returns the pointer to the current view avkon toolbar object if
   1.135 +     * there is one, if no it will return the pointer to the application 
   1.136 +     * avkon toolbar or NULL.
   1.137 +     *
   1.138 +     * @return Pointer to the AVKON toolbar object
   1.139 +     * @since Series 60 3.1
   1.140 +     */
   1.141 +    IMPORT_C CAknToolbar* CurrentPopupToolbar() const;
   1.142 +    
   1.143 +    /**
   1.144 +     * Sets the avkon toolbar for the current view. Called by CAknView when view is
   1.145 +     * activated.
   1.146 +     *
   1.147 +     * @param aViewPopupToolbar Pointer to the view specific toolbar.
   1.148 +     * @since Series 60 3.1
   1.149 +     */
   1.150 +    IMPORT_C void SetViewPopupToolbar(CAknToolbar* aViewPopupToolbar); 
   1.151 +
   1.152 +    /** 
   1.153 +     * Returns the pointer to the current view avkon fixed toolbar object if
   1.154 +     * there is one, if no it will return the pointer to the application 
   1.155 +     * avkon fixed toolbar or NULL.
   1.156 +     *
   1.157 +     * @return Pointer to the AVKON toolbar object
   1.158 +     * @since S60 5.0
   1.159 +     */
   1.160 +    IMPORT_C CAknToolbar* CurrentFixedToolbar() const;
   1.161 +
   1.162 +
   1.163 +    /**
   1.164 +     * Sets the avkon fixed toolbar for the current view. Called by CAknView 
   1.165 +     * when view is activated.
   1.166 +     *
   1.167 +     * @param aViewFixedToolbar Pointer to the view specific fixed toolbar.
   1.168 +     * @since S60 5.0
   1.169 +     */
   1.170 +    IMPORT_C void SetViewFixedToolbar( CAknToolbar* aViewFixedToolbar ); 
   1.171 +
   1.172 +
   1.173 +
   1.174 +private: // from MLafClientRectResolver
   1.175 +	void ReduceRect(TScreenFurniture aScreenFurniture,TRect& aRect) const;
   1.176 +private:
   1.177 +	void AddTitleBandL(CEikAppUi* aAppUi);
   1.178 +private: // from MObjectProvider
   1.179 +	TTypeUid::Ptr MopSupplyObject(TTypeUid aId);
   1.180 +private:
   1.181 +	struct SEikAppInfo
   1.182 +		{
   1.183 +		TInt iHotKeysId;
   1.184 +		TInt iMenuBarId;
   1.185 +		TInt iToolBarId;
   1.186 +		TInt iToolBandId;
   1.187 +		TInt iCbaId;
   1.188 +		TInt iStatusPaneId;
   1.189 +        TInt iExtensionId; // link to extension resource struct.
   1.190 +		};
   1.191 +	struct SRssSignature
   1.192 +		{
   1.193 +		TInt iSignature;
   1.194 +		TInt iSelf;
   1.195 +		};
   1.196 +private:
   1.197 +	CEikButtonGroupContainer* iToolBar;
   1.198 +	CEikToolBar* iToolBand;
   1.199 +	CEikToolBar* iTitleBand;
   1.200 +	CEikMenuBar* iMenuBar;
   1.201 +	CEikMenuPane* iPopup;
   1.202 +	TInt iSidebarPopupId;
   1.203 +	CEikStatusPane* iStatusPane;
   1.204 +	// To avoid BC break, iCba is replaced with an extension containing iCba
   1.205 +	// and some additional items.
   1.206 +	//CEikButtonGroupContainer* iCba;
   1.207 +	CEikAppUiFactoryExtension* iExtension;
   1.208 +	};
   1.209 +
   1.210 +#endif