Title Pane Touch Observer API Specification

Contents

1 Overview

Title Pane Touch Observer is an observer base class which can be inherited from to let the inheriting class observe the Title pane's event.


API categorypublic
API typec++
Existed sinceLegacy S60 5.0
API librariesavkon.lib
Location/sf/mw/classicui/classicui_pub/title_pane_touch_observer_api
Buildfiles/sf/mw/classicui/classicui_pub/title_pane_touch_observer_api/group/bld.inf


1.1 Description

MAknTitlePaneObserver is the interface which should be inherited from to observe the CAknTitlePane behaviour. It is a Framework API. The user implements the HandleTitlePaneEventL() function and adds the observer to the Title pane. Then the user can handle the Title pane's event in HandleTitlePaneEventL() he implements.

1.1.1 Emulator support

This API is fully supported in the WINS/WINSCW emulator environment.

1.2 Changes

This API is an SDK API and was first published in S60 release 5.0. This document is valid from S60 release 5.0 onwards.

This API is valid for all platforms running S60 5.0 and later.

1.3 Use Cases

Add an observer to the Title pane.

1.4 Class Structure

Summary of API classes and header files
ClassesFiles
MAknTitlePaneObserver /epoc32/include/mw/AknTitlePaneObserver.h
Title Pane Touch Observer UML diagram
Title Pane Touch Observer UML diagram

2 Using The API

2.1 Adding an observer to the Title pane

The following code snippet shows how to add an observer to the Title pane.

class CFooObserver : public MAknTitlePaneTouchObserver
{
public:
    static CFooObserver* NewL();
    void ConstructL();
    void HandleTitlePaneEventL( TInt aEventId );
private:
    CFooObserver();
};
CFooObserver* CFooObserver::NewL()
{
    CFooObserver* me = new (ELeave) CFooObserver;
    CleanupStack::PushL(me);
    me->ConstructL();
    CleanupStack::Pop(me);
    return me;
}
CFooObserver::CFooObserver()
{
}
void CFooObserver::ConstructL()
{
    CAknTitlePane* titlePane = STATIC_CAST( CAknTitlePane*,
        StatusPane()->ControlL( TUid::Uid( EEikStatusPaneUidTitle ) ) );
    titlePane->SetTitlePaneObserver( this );
}
void CFooObserver::HandleTitlePaneEventL( TInt aEventId )
{
    /*
     * Add your code here.
     */
}

2.2 Limitations of the API

The only supported Title pane event is EAknTitlePaneTapped , which is generated when the Title pane is tapped.