The Toolbar API consists of following classes: CAknToolbar
, CAknToolbarExtension, and MAknToolbarObserver
. The Toolbar API class structure and its simplified environment
is described in the figure below.
Figure: Toolbar API class structure
CAknToolbar
is the API main class that provides
the most of the API functionality. The UI framework classes CEikAppUiFactory
, CAknView
, and CAknAppUi
take care of creating and destructing the CAknToolbar
object. Moreover, you can access the toolbar
in your application through these UI framework classes.
CAknToolbar
is a compound (window-owning) control
that contains simple (non-window-owning) controls that are the toolbar
items. Toolbar items can be for example CAknButton
type controls. Each toolbar can also have one extension that expands
the toolbar. The extension contains also for example CAknButton
type controls.
MAknToolbarObserver
is an interface that can be
used to observe toolbar events. The application class can implement
this interface and register itself as the toolbar observer. CAknToolbar
then informs the observer when toolbar events
occur (when toolbar is about to be shown and when some toolbar item
state has changed e.g. a button is pressed).