equal
deleted
inserted
replaced
|
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 concept |
|
11 PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd"> |
|
12 <concept id="GUID-A168E5EB-4CF7-4B74-B67C-EDFD5378C5BF" xml:lang="en"><title>Accessing |
|
13 toolbar extension items</title><prolog><metadata><keywords/></metadata></prolog><conbody> |
|
14 <p>Like with the actual toolbar, each control in the toolbar extension should |
|
15 have a unique ID. You can access the toolbar extension controls from your |
|
16 application using these IDs.</p> |
|
17 <p>The example below shows how to access toolbar extension items using the |
|
18 contol ID.</p> |
|
19 <codeblock xml:space="preserve">void CMyAppView::DoSomethingToExtensionButton() |
|
20 { |
|
21 CAknToolbar* toolbar = Toolbar(); |
|
22 if ( toolbar ) |
|
23 { |
|
24 CAknToolbarExtension* toolbarExtension = toolbar->ToolbarExtension(); |
|
25 if ( toolbarExtension ) |
|
26 { |
|
27 CAknButton* button = |
|
28 static_cast<CAknButton*>( toolbarExtension->ControlOrNull( KExtensionButtonId ) ); |
|
29 if ( button ) |
|
30 { |
|
31 ... |
|
32 } |
|
33 } |
|
34 } |
|
35 } |
|
36 </codeblock> |
|
37 </conbody></concept> |