diff -r ebc84c812384 -r 46218c8b8afa Symbian3/PDK/Source/GUID-BC3207BF-9E9F-4BA0-8F01-B72228110A61.dita --- a/Symbian3/PDK/Source/GUID-BC3207BF-9E9F-4BA0-8F01-B72228110A61.dita Thu Mar 11 15:24:26 2010 +0000 +++ b/Symbian3/PDK/Source/GUID-BC3207BF-9E9F-4BA0-8F01-B72228110A61.dita Thu Mar 11 18:02:22 2010 +0000 @@ -1,48 +1,48 @@ - - - - - -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