diff -r 48780e181b38 -r 578be2adaf3e Symbian3/PDK/Source/GUID-BC3207BF-9E9F-4BA0-8F01-B72228110A61.dita --- a/Symbian3/PDK/Source/GUID-BC3207BF-9E9F-4BA0-8F01-B72228110A61.dita Tue Jul 20 12:00:49 2010 +0100 +++ b/Symbian3/PDK/Source/GUID-BC3207BF-9E9F-4BA0-8F01-B72228110A61.dita Fri Aug 13 16:47:46 2010 +0100 @@ -1,50 +1,50 @@ - - - - - -Accessing -the toolbar from applications or application views -

To access -the current toolbar (CAknToolbar, -defined in akntoolbar.h) in applications, use -the methods CAknAppUi::CurrentPopupToolbar() or CEikAppUiFactory::CurrentPopupToolbar() in the case of a floating toolbar. For a fixed toolbar, use CAknAppUi::CurrentFixedToolbar() or CEikAppUiFactory::CurrentFixedToolbar(). The methods return a pointer to either the application toolbar or -a view-specific toolbar (if defined).

To access the application toolbar -directly from applications, you can also call CAknAppUi::PopupToolbar() and CEikAppUiFactory::PopupToolbar(). To access the view-specific -toolbar as a client, call CAknView::Toolbar(). These calls do not transfer the ownership -of the toolbar, so the framework takes care of the toolbar destruction.

-

The example below -shows how to access the toolbar in the application AppUi class. (You can also -use CEikAppUiFactory methods.)

void CMyAppUi::DoSomethingToToolbar() - { - - // Current fixed toolbar (if view has no fixed toolbar, returns application toolbar) - CAknToolbar* fixedToolbar = CurrentFixedToolbar(); - - // Current popup toolbar (if view has no popup toolbar, returns application toolbar) - CAknToolbar* popupToolbar = CurrentPopupToolbar(); - - // Application toolbar - CAknToolbar* appToolbar = PopupToolbar(); - - … - - }

The example below shows how to access a view specific -toolbar in the application view class.

-void CMyView::DoSomethingToToolbar() - { - - // View toolbar - CAknToolbar* toolbar = Toolbar(); - - … - - } -
+ + + + + +Accessing +the toolbar from applications or application views +

To access +the current toolbar (CAknToolbar, +defined in akntoolbar.h) in applications, use +the methods CAknAppUi::CurrentPopupToolbar() or CEikAppUiFactory::CurrentPopupToolbar() in the case of a floating toolbar. For a fixed toolbar, use CAknAppUi::CurrentFixedToolbar() or CEikAppUiFactory::CurrentFixedToolbar(). The methods return a pointer to either the application toolbar or +a view-specific toolbar (if defined).

To access the application toolbar +directly from applications, you can also call CAknAppUi::PopupToolbar() and CEikAppUiFactory::PopupToolbar(). To access the view-specific +toolbar as a client, call CAknView::Toolbar(). These calls do not transfer the ownership +of the toolbar, so the framework takes care of the toolbar destruction.

+

The example below +shows how to access the toolbar in the application AppUi class. (You can also +use CEikAppUiFactory methods.)

void CMyAppUi::DoSomethingToToolbar() + { + + // Current fixed toolbar (if view has no fixed toolbar, returns application toolbar) + CAknToolbar* fixedToolbar = CurrentFixedToolbar(); + + // Current popup toolbar (if view has no popup toolbar, returns application toolbar) + CAknToolbar* popupToolbar = CurrentPopupToolbar(); + + // Application toolbar + CAknToolbar* appToolbar = PopupToolbar(); + + … + + }

The example below shows how to access a view specific +toolbar in the application view class.

+void CMyView::DoSomethingToToolbar() + { + + // View toolbar + CAknToolbar* toolbar = Toolbar(); + + … + + } +
\ No newline at end of file