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 );
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.