Namespaces

Variants
Actions

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 over the next few weeks. Thanks for all your past and future contributions.

Revision as of 02:25, 30 September 2009 by deepikagohil (Talk | contribs)

Title Pane Touch Observer API

From Wiki
Jump to: navigation, search
{{{width}}}


ID   Creation date  October 25, 2008
Platform  S60 5th Edition Tested on devices  
Category  Symbian C++ Subcategory  


Keywords (APIs, classes, methods, functions): CAknTitlePane, MAknTitlePaneObserver, HandleTitlePaneEventL(), TAknTitlePaneEvents, EAknTitlePaneTapped


Overview

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

CAPABILITY none
LIBRARY avkon.lib

Header file

#include <akntitlepaneobserver.h>
 
class CSampleAppUi : public CAknAppUi, public MAknTitlePaneObserver
{
...
private:
/**
* 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
titlePane->SetTitlePaneObserver(this);
}
...
}
 
// 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
}
else
{
// No implementation's required at the moment
}
}


Postconditions

Actions on title pane are observed.

49 page views in the last 30 days.

Was this page helpful?

Your feedback about this content is important. Let us know what you think.

 

Thank you!

We appreciate your feedback.

×