To set the title pane touch observer:
Provide an observer
class that implements the MaknTitlePaneObserver
interface.
class MyTitlePaneObserver : public MAknTitlePaneObserver { public: void HandleTitlePaneEventL( TInt aEventID ); }; { switch( TAknTitlePaneEvents ) { case EAknTitlePaneTapped: ... break; default break; }
Get a pointer to the title pane via the status pane pointer.
iStatusPane = static_cast<CAknAppUi*>( CEikonEnv::Static()-> EikAppUi() )->StatusPane(); if( !iStatusPane ) { User::Leave( KErrNotFound ); } iTitlePane = ( CAknTitlePane* )iStatusPane->ControlL( TUid::Uid( EEikStatusPaneUidTitle ) ); if( !iTitlePane ) { User::Leave( KErrNotFound ); }
Set the observer using
the SetTitlePaneObserver
method.
iTitlePane->SetTitlePaneObserver( this );