Nokia N97 SDK
Example Applications Guide

CBrCtlSampleAppStateChangeObserver Class Reference

#include <BrCtlSampleAppStateChangeObserver.h>

Inheritance diagram for CBrCtlSampleAppStateChangeObserver:

List of all members.

Detailed Description

CBrCtlSampleAppStateChangeObserver class. This class inherits from the MBrCtlStateChangeObserver interface which is used to receive state-changed events.

Definition at line 33 of file BrCtlSampleAppStateChangeObserver.h.


Public Member Functions

  ~CBrCtlSampleAppStateChangeObserver ()
void  StateChanged (TBrCtlDefs::TBrCtlState aState, TInt aValue)

Static Public Member Functions

static CBrCtlSampleAppStateChangeObserver *  NewL (CBrCtlSampleAppContainer *aContainer)

Private Member Functions

void  ConstructL (CBrCtlSampleAppContainer *aContainer)

Private Attributes

CBrCtlSampleAppContainer *  iContainer


Constructor & Destructor Documentation

CBrCtlSampleAppStateChangeObserver::~CBrCtlSampleAppStateChangeObserver (   ) 
 

Destructor.

Definition at line 60 of file BrCtlSampleAppStateChangeObserver.cpp.

00061     {
00062     }


Member Function Documentation

CBrCtlSampleAppStateChangeObserver * CBrCtlSampleAppStateChangeObserver::NewL (  CBrCtlSampleAppContainer *  aContainer  )  [static]
 

Two-phased constructor.

Definition at line 70 of file BrCtlSampleAppStateChangeObserver.cpp.

References ConstructL().

Referenced by CBrCtlSampleAppContainer::ConstructL().

00071 {
00072   CBrCtlSampleAppStateChangeObserver* self = new(ELeave)CBrCtlSampleAppStateChangeObserver;
00073   CleanupStack::PushL(self);
00074   self->ConstructL(aContainer);
00075   CleanupStack::Pop();
00076   return self;
00077 }

void CBrCtlSampleAppStateChangeObserver::StateChanged (  TBrCtlDefs::TBrCtlState  aState,
TInt  aValue
) 
 

A state change events notification

Since:
2.8
Parameters:
aState  The state, currently the only state is EStateImageMapView
aValue  This value will be true if we going to image map view and it will be false if we are returning from image map view
Returns:
void

Definition at line 27 of file BrCtlSampleAppStateChangeObserver.cpp.

References iContainer, CBrCtlSampleAppContainer::SetPoint(), and CBrCtlSampleAppContainer::SetText().

00029     {
00030     // Here we are creating a string to be displayed on the screen, but you would
00031     // implement this method to have code that would be executed when the observer
00032     // receives state changed events.
00033     TBuf16<256> tgt; 
00034     TPoint point(0, 120);
00035 
00036     _LIT(KHandleBrowserStateChange, "State Change event = %d, value = %d");
00037      
00038     tgt.AppendFormat(KHandleBrowserStateChange, aState, aValue);
00039 
00040     iContainer->SetPoint(point);
00041     iContainer->SetText(tgt);
00042 
00043     iContainer->DrawNow();
00044     }

void CBrCtlSampleAppStateChangeObserver::ConstructL (  CBrCtlSampleAppContainer *  aContainer  )  [private]
 

By default Symbian 2nd phase constructor is private.

Definition at line 51 of file BrCtlSampleAppStateChangeObserver.cpp.

References iContainer.

Referenced by NewL().

00052     {
00053     iContainer = aContainer;
00054     }


The documentation for this class was generated from the following files:

© Nokia 2009

Back to top