|
1 <?xml version="1.0" encoding="utf-8"?> |
|
2 <!-- Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies) All rights reserved. --> |
|
3 <!-- This component and the accompanying materials are made available under the terms of the License |
|
4 "Eclipse Public License v1.0" which accompanies this distribution, |
|
5 and is available at the URL "http://www.eclipse.org/legal/epl-v10.html". --> |
|
6 <!-- Initial Contributors: |
|
7 Nokia Corporation - initial contribution. |
|
8 Contributors: |
|
9 --> |
|
10 <!DOCTYPE task |
|
11 PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd"> |
|
12 <task id="GUID-6FD4E7A4-D215-4CFB-BC7A-23065DE95C5C" xml:lang="en"><title>Add |
|
13 a view to the control stack</title><prolog><metadata><keywords/></metadata></prolog><taskbody> |
|
14 <context> <p>To enable a view to receive key events, add a view to the control |
|
15 stack using the following method. This method adds a control into the application |
|
16 UI's control stack.</p><note> Ensure that the view is constructed before adding |
|
17 it to the control stack. </note><codeblock xml:space="preserve">IMPORT_C void AddToStackL( const MCoeView& aView, |
|
18 CCoeControl *aControl, |
|
19 TInt aPriority=ECoeStackPriorityDefault, |
|
20 TInt aStackingFlags=ECoeStackFlagStandard );</codeblock><p>The |
|
21 following code snippet shows adding a view to the control stack:</p><codeblock xml:space="preserve">/** |
|
22 Add aControl to Cone's control stack with priority aPriority and behaviour aStackingFlags.\n |
|
23 */ |
|
24 void CNewView::AddToStackL( CCoeControl* aControl, |
|
25 TInt aPriority, |
|
26 TInt aStackingFlags ) |
|
27 { |
|
28 iCCoeAppUi.AddToStackL( *this, aControl, aPriority, aStackingFlags); |
|
29 }</codeblock><p> For more information on writing control stack, see <xref href="GUID-B84FA223-3DFD-58C5-8CEF-C5AA73AA6290.dita">How to write controls</xref>.</p></context> |
|
30 </taskbody></task> |