Changes

None.

Purpose

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.

Constraints

This API is valid for all platforms running S60 5th Edition and later.

Classification and release information

This API is an SDK API and was first published in S60 5th Edition. This document is valid from S60 5th Edition onwards.

Emulator support

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

API 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.

Use cases

Add an observer to the Title pane.

API class structure

Title Pane Touch Observer UML diagram


Title Pane Touch Observer UML diagram

Related APIs
  • CAknTitlePane
  • HandleTitlePaneEventL()
  • MAknTitlePaneObserver

Using the Title Pane Touch Observer

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.
     */
}

Error handling

None.

Memory overhead

None.

Extensions to the API

None.

Limitations of the API

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

Related APIs
  • EAknTitlePaneTapped