1.1 --- a/epoc32/include/eikaufty.h Tue Nov 24 13:55:44 2009 +0000
1.2 +++ b/epoc32/include/eikaufty.h Tue Mar 16 16:12:26 2010 +0000
1.3 @@ -1,1 +1,143 @@
1.4 -eikaufty.h
1.5 +// Copyright (c) 1997-2009 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 the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
1.9 +// which accompanies this distribution, and is available
1.10 +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.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 +// Defines mix-in interace to break dependencey of Eikon Application UI
1.19 +// on controls
1.20 +//
1.21 +//
1.22 +
1.23 +#ifndef __EIKAUFTY_H__
1.24 +#define __EIKAUFTY_H__
1.25 +
1.26 +#include <f32file.h>
1.27 +#include <e32base.h>
1.28 +#include <eikdef.h>
1.29 +
1.30 +#include <coemop.h>
1.31 +
1.32 +class CEikHotKeyTable;
1.33 +class CEikMenuBar;
1.34 +class CEikMenuPane;
1.35 +class CEikCommandButton;
1.36 +class CEikToolBar;
1.37 +class CEikButtonGroupContainer;
1.38 +class CEikAppUi;
1.39 +class CEikonEnv;
1.40 +class CEikStatusPane;
1.41 +
1.42 +
1.43 +/** This class defines a mixin interface to break the dependency of the Uikon Application
1.44 +User Interface on controls.
1.45 +
1.46 +@publishedAll
1.47 +@released */
1.48 +class MEikAppUiFactory : public MObjectProvider
1.49 + {
1.50 +public:
1.51 + virtual void CreateResourceIndependentFurnitureL(CEikAppUi* aAppUi) =0;
1.52 + virtual TRect ClientRect() = 0;
1.53 + virtual void ReadAppInfoResourceL(TInt aResourceFileOffset,CEikAppUi* aAppUi) = 0;
1.54 + virtual void LaunchPopupMenuL( TInt aResourceId,
1.55 + const TPoint& aTargetPos,
1.56 + TPopupTargetPosType aTargetType,
1.57 + const CEikHotKeyTable* aHotKeyTable,
1.58 + CEikAppUi* aAppUi) = 0;
1.59 +
1.60 + virtual void DoLaunchPopupL(TInt aResourceId,const TPoint& aTargetPos, const CEikHotKeyTable* aHotKeyTable,
1.61 + TPopupTargetPosType aTargetType,CEikAppUi* aAppUi) = 0;
1.62 +
1.63 + virtual void ClosePopup(CEikAppUi* aAppUi) = 0;
1.64 + virtual void StopDisplayingMenuBar() = 0;
1.65 + virtual void HandleSideBarMenuL(TInt aResourceId,const TPoint& aPos,
1.66 + const CEikHotKeyTable* aHotKeyTable,CEikAppUi* aAppUi) = 0;
1.67 + virtual void CreateHotKeyControlL(TInt aResourceId, CEikAppUi* aAppUi) = 0;
1.68 + /** Gets a pointer to the menu bar.
1.69 +
1.70 + @return Pointer to the menu bar. */
1.71 + virtual CEikMenuBar* MenuBar() const = 0;
1.72 + /** Replaces or clears a menu bar, returning a pointer to the replaced menu bar.
1.73 +
1.74 + @param aMenu The new menu bar. This can be NULL to clear an existing menu bar.
1.75 + @return Pointer to the replaced menu bar. */
1.76 + virtual CEikMenuBar* SwapMenuBar(CEikMenuBar* aMenu) = 0;
1.77 + virtual CEikMenuPane* Popup() const = 0;
1.78 + /** Gets a pointer to the tool bar.
1.79 +
1.80 + @return Pointer to the tool bar. */
1.81 + virtual CEikButtonGroupContainer* ToolBar() const = 0;
1.82 + /** Replaces or clears a button group, returning a pointer to the replaced button
1.83 + group.
1.84 +
1.85 + @param aNewGroup The new button group. This can be NULL to clear an existing
1.86 + button group.
1.87 + @return Pointer to the replaced button group. */
1.88 + virtual CEikButtonGroupContainer* SwapButtonGroup(CEikButtonGroupContainer* aNewGroup) = 0;
1.89 + /** Gets a pointer to the tool band.
1.90 +
1.91 + @return Pointer to the tool band. */
1.92 + virtual CEikToolBar* ToolBand() const = 0;
1.93 + /** Gets a pointer to the title band.
1.94 +
1.95 + @return Pointer to the title band. */
1.96 + virtual CEikToolBar* TitleBand() const = 0;
1.97 + /** Gets a pointer to the status pane.
1.98 +
1.99 + @return Pointer to the status pane */
1.100 + virtual CEikStatusPane* StatusPane() const = 0;
1.101 + /** Gets a pointer to the CBA.
1.102 +
1.103 + @return Pointer to the CBA */
1.104 + virtual CEikButtonGroupContainer* Cba() const = 0;
1.105 + inline CEikToolBar* SwapToolBand(CEikToolBar* aToolBand);
1.106 + inline CEikToolBar* SwapTitleBand(CEikToolBar* aTitleBand);
1.107 + /** Creates a standard tab button.
1.108 +
1.109 + @return Pointer to the created tab button. */
1.110 + virtual CEikCommandButton* CreateStandardTabButtonL() const = 0;
1.111 + virtual void CreateEmbeddedL(CEikonEnv& aEikonEnv) = 0;
1.112 + virtual void DestroyEmbedded(CEikonEnv& aEikonEnv) = 0;
1.113 + virtual void HandleResourceChangeL(TInt aType) = 0;
1.114 +protected:
1.115 + /** Defines the type of tool bar. */
1.116 + enum TToolBarType
1.117 + {
1.118 + /** Defines a band tool bar. */
1.119 + EBand,
1.120 + /** Defines a title tool bar. */
1.121 + ETitle
1.122 + };
1.123 +private:
1.124 + virtual CEikToolBar* SwapToolBar(CEikToolBar* aToolBar,TToolBarType aType) = 0;
1.125 + };
1.126 +
1.127 +
1.128 +
1.129 +/** Replaces or clears a tool band, returning a pointer to the replaced tool band.
1.130 +
1.131 +@param aToolBand The new tool band. This can be NULL to clear an existing
1.132 +tool band.
1.133 +@return Pointer to the replaced tool band. */
1.134 +inline CEikToolBar* MEikAppUiFactory::SwapToolBand(CEikToolBar* aToolBand)
1.135 + {return SwapToolBar(aToolBand,EBand);}
1.136 +
1.137 +
1.138 +/** Replaces or clears a title band, returning a pointer to the replaced title
1.139 +band.
1.140 +
1.141 +@param aTitleBand The new title band. This can be NULL to clear an existing
1.142 +title band.
1.143 +@return Pointer to the replaced title band. */
1.144 +inline CEikToolBar* MEikAppUiFactory::SwapTitleBand(CEikToolBar* aTitleBand)
1.145 + {return SwapToolBar(aTitleBand,ETitle);}
1.146 +
1.147 +#endif // __EIKAUFTY_H__