williamr@2
|
1 |
// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies).
|
williamr@2
|
2 |
// All rights reserved.
|
williamr@2
|
3 |
// This component and the accompanying materials are made available
|
williamr@4
|
4 |
// under the terms of "Eclipse Public License v1.0"
|
williamr@2
|
5 |
// which accompanies this distribution, and is available
|
williamr@4
|
6 |
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
williamr@2
|
7 |
//
|
williamr@2
|
8 |
// Initial Contributors:
|
williamr@2
|
9 |
// Nokia Corporation - initial contribution.
|
williamr@2
|
10 |
//
|
williamr@2
|
11 |
// Contributors:
|
williamr@2
|
12 |
//
|
williamr@2
|
13 |
// Description:
|
williamr@2
|
14 |
// Defines mix-in interace to break dependencey of Eikon Application UI
|
williamr@2
|
15 |
// on controls
|
williamr@2
|
16 |
//
|
williamr@2
|
17 |
//
|
williamr@2
|
18 |
|
williamr@2
|
19 |
#ifndef __EIKAUFTY_H__
|
williamr@2
|
20 |
#define __EIKAUFTY_H__
|
williamr@2
|
21 |
|
williamr@2
|
22 |
#include <f32file.h>
|
williamr@2
|
23 |
#include <e32base.h>
|
williamr@2
|
24 |
#include <eikdef.h>
|
williamr@2
|
25 |
|
williamr@2
|
26 |
#include <coemop.h>
|
williamr@2
|
27 |
|
williamr@2
|
28 |
class CEikHotKeyTable;
|
williamr@2
|
29 |
class CEikMenuBar;
|
williamr@2
|
30 |
class CEikMenuPane;
|
williamr@2
|
31 |
class CEikCommandButton;
|
williamr@2
|
32 |
class CEikToolBar;
|
williamr@2
|
33 |
class CEikButtonGroupContainer;
|
williamr@2
|
34 |
class CEikAppUi;
|
williamr@2
|
35 |
class CEikonEnv;
|
williamr@2
|
36 |
class CEikStatusPane;
|
williamr@2
|
37 |
|
williamr@2
|
38 |
|
williamr@2
|
39 |
/** This class defines a mixin interface to break the dependency of the Uikon Application
|
williamr@2
|
40 |
User Interface on controls.
|
williamr@2
|
41 |
|
williamr@2
|
42 |
@publishedAll
|
williamr@2
|
43 |
@released */
|
williamr@2
|
44 |
class MEikAppUiFactory : public MObjectProvider
|
williamr@2
|
45 |
{
|
williamr@2
|
46 |
public:
|
williamr@2
|
47 |
virtual void CreateResourceIndependentFurnitureL(CEikAppUi* aAppUi) =0;
|
williamr@2
|
48 |
virtual TRect ClientRect() = 0;
|
williamr@2
|
49 |
virtual void ReadAppInfoResourceL(TInt aResourceFileOffset,CEikAppUi* aAppUi) = 0;
|
williamr@2
|
50 |
virtual void LaunchPopupMenuL( TInt aResourceId,
|
williamr@2
|
51 |
const TPoint& aTargetPos,
|
williamr@2
|
52 |
TPopupTargetPosType aTargetType,
|
williamr@2
|
53 |
const CEikHotKeyTable* aHotKeyTable,
|
williamr@2
|
54 |
CEikAppUi* aAppUi) = 0;
|
williamr@2
|
55 |
|
williamr@2
|
56 |
virtual void DoLaunchPopupL(TInt aResourceId,const TPoint& aTargetPos, const CEikHotKeyTable* aHotKeyTable,
|
williamr@2
|
57 |
TPopupTargetPosType aTargetType,CEikAppUi* aAppUi) = 0;
|
williamr@2
|
58 |
|
williamr@2
|
59 |
virtual void ClosePopup(CEikAppUi* aAppUi) = 0;
|
williamr@2
|
60 |
virtual void StopDisplayingMenuBar() = 0;
|
williamr@2
|
61 |
virtual void HandleSideBarMenuL(TInt aResourceId,const TPoint& aPos,
|
williamr@2
|
62 |
const CEikHotKeyTable* aHotKeyTable,CEikAppUi* aAppUi) = 0;
|
williamr@2
|
63 |
virtual void CreateHotKeyControlL(TInt aResourceId, CEikAppUi* aAppUi) = 0;
|
williamr@2
|
64 |
/** Gets a pointer to the menu bar.
|
williamr@2
|
65 |
|
williamr@2
|
66 |
@return Pointer to the menu bar. */
|
williamr@2
|
67 |
virtual CEikMenuBar* MenuBar() const = 0;
|
williamr@2
|
68 |
/** Replaces or clears a menu bar, returning a pointer to the replaced menu bar.
|
williamr@2
|
69 |
|
williamr@2
|
70 |
@param aMenu The new menu bar. This can be NULL to clear an existing menu bar.
|
williamr@2
|
71 |
@return Pointer to the replaced menu bar. */
|
williamr@2
|
72 |
virtual CEikMenuBar* SwapMenuBar(CEikMenuBar* aMenu) = 0;
|
williamr@2
|
73 |
virtual CEikMenuPane* Popup() const = 0;
|
williamr@2
|
74 |
/** Gets a pointer to the tool bar.
|
williamr@2
|
75 |
|
williamr@2
|
76 |
@return Pointer to the tool bar. */
|
williamr@2
|
77 |
virtual CEikButtonGroupContainer* ToolBar() const = 0;
|
williamr@2
|
78 |
/** Replaces or clears a button group, returning a pointer to the replaced button
|
williamr@2
|
79 |
group.
|
williamr@2
|
80 |
|
williamr@2
|
81 |
@param aNewGroup The new button group. This can be NULL to clear an existing
|
williamr@2
|
82 |
button group.
|
williamr@2
|
83 |
@return Pointer to the replaced button group. */
|
williamr@2
|
84 |
virtual CEikButtonGroupContainer* SwapButtonGroup(CEikButtonGroupContainer* aNewGroup) = 0;
|
williamr@2
|
85 |
/** Gets a pointer to the tool band.
|
williamr@2
|
86 |
|
williamr@2
|
87 |
@return Pointer to the tool band. */
|
williamr@2
|
88 |
virtual CEikToolBar* ToolBand() const = 0;
|
williamr@2
|
89 |
/** Gets a pointer to the title band.
|
williamr@2
|
90 |
|
williamr@2
|
91 |
@return Pointer to the title band. */
|
williamr@2
|
92 |
virtual CEikToolBar* TitleBand() const = 0;
|
williamr@2
|
93 |
/** Gets a pointer to the status pane.
|
williamr@2
|
94 |
|
williamr@2
|
95 |
@return Pointer to the status pane */
|
williamr@2
|
96 |
virtual CEikStatusPane* StatusPane() const = 0;
|
williamr@2
|
97 |
/** Gets a pointer to the CBA.
|
williamr@2
|
98 |
|
williamr@2
|
99 |
@return Pointer to the CBA */
|
williamr@2
|
100 |
virtual CEikButtonGroupContainer* Cba() const = 0;
|
williamr@2
|
101 |
inline CEikToolBar* SwapToolBand(CEikToolBar* aToolBand);
|
williamr@2
|
102 |
inline CEikToolBar* SwapTitleBand(CEikToolBar* aTitleBand);
|
williamr@2
|
103 |
/** Creates a standard tab button.
|
williamr@2
|
104 |
|
williamr@2
|
105 |
@return Pointer to the created tab button. */
|
williamr@2
|
106 |
virtual CEikCommandButton* CreateStandardTabButtonL() const = 0;
|
williamr@2
|
107 |
virtual void CreateEmbeddedL(CEikonEnv& aEikonEnv) = 0;
|
williamr@2
|
108 |
virtual void DestroyEmbedded(CEikonEnv& aEikonEnv) = 0;
|
williamr@2
|
109 |
virtual void HandleResourceChangeL(TInt aType) = 0;
|
williamr@2
|
110 |
protected:
|
williamr@2
|
111 |
/** Defines the type of tool bar. */
|
williamr@2
|
112 |
enum TToolBarType
|
williamr@2
|
113 |
{
|
williamr@2
|
114 |
/** Defines a band tool bar. */
|
williamr@2
|
115 |
EBand,
|
williamr@2
|
116 |
/** Defines a title tool bar. */
|
williamr@2
|
117 |
ETitle
|
williamr@2
|
118 |
};
|
williamr@2
|
119 |
private:
|
williamr@2
|
120 |
virtual CEikToolBar* SwapToolBar(CEikToolBar* aToolBar,TToolBarType aType) = 0;
|
williamr@2
|
121 |
};
|
williamr@2
|
122 |
|
williamr@2
|
123 |
|
williamr@2
|
124 |
|
williamr@2
|
125 |
/** Replaces or clears a tool band, returning a pointer to the replaced tool band.
|
williamr@2
|
126 |
|
williamr@2
|
127 |
@param aToolBand The new tool band. This can be NULL to clear an existing
|
williamr@2
|
128 |
tool band.
|
williamr@2
|
129 |
@return Pointer to the replaced tool band. */
|
williamr@2
|
130 |
inline CEikToolBar* MEikAppUiFactory::SwapToolBand(CEikToolBar* aToolBand)
|
williamr@2
|
131 |
{return SwapToolBar(aToolBand,EBand);}
|
williamr@2
|
132 |
|
williamr@2
|
133 |
|
williamr@2
|
134 |
/** Replaces or clears a title band, returning a pointer to the replaced title
|
williamr@2
|
135 |
band.
|
williamr@2
|
136 |
|
williamr@2
|
137 |
@param aTitleBand The new title band. This can be NULL to clear an existing
|
williamr@2
|
138 |
title band.
|
williamr@2
|
139 |
@return Pointer to the replaced title band. */
|
williamr@2
|
140 |
inline CEikToolBar* MEikAppUiFactory::SwapTitleBand(CEikToolBar* aTitleBand)
|
williamr@2
|
141 |
{return SwapToolBar(aTitleBand,ETitle);}
|
williamr@2
|
142 |
|
williamr@2
|
143 |
#endif // __EIKAUFTY_H__
|