Please note that as of October 24, 2014, the Nokia Developer Wiki will no longer be accepting user contributions, including new entries, edits and comments, as we begin transitioning to our new home, in the Windows Phone Development Wiki. We plan to move over the majority of the existing entries. Thanks for all your past and future contributions.

Title Pane Touch Observer API

From Wiki
Jump to: navigation, search
Article Metadata
Platform(s): S60 5th Edition
Keywords: CAknTitlePane, MAknTitlePaneObserver, HandleTitlePaneEventL(), TAknTitlePaneEvents, EAknTitlePaneTapped
Created: Damavik (25 Oct 2008)
Last edited: hamishwillee (13 Sep 2012)



Title Pane Touch Observer API allows an application to observe the user tapping on the title pane. An example use for this API would be to restore a default application view when the user taps on the title pane. The key interface is MAknTitlePaneObserver with only one method HandleTitlePaneEventL(), which should be implemented in order to handle application title pane tapping.

MMP file

LIBRARY avkon.lib

Header file

#include <akntitlepaneobserver.h>
class CSampleAppUi : public CAknAppUi, public MAknTitlePaneObserver
* From MAknTitlePaneObserver

void HandleTitlePaneEventL(TInt aEventID);

Source file

#include <eikspane.h>
#include <akntitle.h>
// AppUi second-phase constructor
void CSampleAppUi::ConstructL()
// Call CAknAppUi::StatusPane() which returns CEikStatusPane*
CEikStatusPane* statusPane = StatusPane();
if (statusPane)
// Title pane UID
TUid titlePaneUid;
titlePaneUid.iUid = EEikStatusPaneUidTitle;
// Get pointer to CAknTitlePane object
CAknTitlePane* titlePane = (CAknTitlePane*) statusPane->ControlL(titlePaneUid);
// Set this AppUi object as the observer of the title pane
// Implementation of the observer interface
void CSampleAppUi::HandleTitlePaneEventL(TInt aEventID)
// Although at the moment EAknTitlePaneTapped
// is the only one value in the TAknTitlePaneEvents enumeration,
// we should consider that later that enumeration could be extended
if (aEventID == EAknTitlePaneTapped)
// Custom action on title pane tapping event
// No implementation's required at the moment


Actions on title pane are observed.

This page was last modified on 13 September 2012, at 06:50.
53 page views in the last 30 days.