Nokia N97 SDK
Example Applications Guide

CBrCtlSampleAppContainer Class Reference

#include <BrCtlSampleAppContainer.h>

Inheritance diagram for CBrCtlSampleAppContainer:

List of all members.

Detailed Description

CBrCtlSampleAppContainer class. This is the container control class.

Definition at line 38 of file BrCtlSampleAppContainer.h.


Public Member Functions

void  ConstructL (const TRect &aRect)
  ~CBrCtlSampleAppContainer ()
void  HandleCommandL (TInt aCommand)
void  DynInitMenuPaneL (TInt aResourceId, CEikMenuPane *aMenuPane)
TKeyResponse  HandleKeyEventL (const TKeyEvent &aKeyEvent, TEventCode aType)
const TDesC &  Text () const
void  SetText (const TDesC &aText)
void  SetPoint (const TPoint &aPoint)
CBrCtlInterface *  BrCtlInterface () const

Private Member Functions

void  SizeChanged ()
TInt  CountComponentControls () const
CCoeControl *  ComponentControl (TInt aIndex) const
void  Draw (const TRect &aRect) const
TKeyResponse  OfferKeyEventL (const TKeyEvent &aKeyEvent, TEventCode aType)
void  CancelLoad ()
void  CreateBasicBrowserControlL ()
void  CreateBrowserControlWithObserversL (TUint aCapabilities)
HBufC8 *  ReadFileLC (const TDesC &aFileName)
void  HandleControlEventL (CCoeControl *aControl, TCoeEvent aEventType)
void  BasicBrowserControlL ()
void  BrowserControlWithObserversL ()
void  LoadingContentWithFileHandleL ()
void  LoadingContentWithBufferL ()
void  IncrementalLoadingL ()
void  SpecialLoadRequestsL ()
void  CustomizedDialogsL ()
void  CustomizedSoftKeysL ()
void  ResolvingEmbeddedLinksL ()
void  CustomizedScrollBarsL ()
void  HandleStateChangedL ()
void  ChangeSizeExtentsL ()
void  PageInfoL ()
void  ContentSizeImageCountL ()

Private Attributes

CBrCtlInterface *  iBrCtlInterface
TUint  iBrCtlCapabilities
TInt  iCommandBase
CBrCtlSampleAppSpecialLoadObserver *  iBrCtlSampleAppSpecialLoadObserver
CBrCtlSampleAppLayoutObserver *  iBrCtlSampleAppLayoutObserver
CBrCtlSampleAppSoftkeysObserver *  iBrCtlSampleAppSoftkeysObserver
CBrCtlSampleAppLoadEventObserver *  iBrCtlSampleAppLoadEventObserver
CBrCtlSampleAppLinkResolver *  iBrCtlSampleAppLinkResolver
CBrCtlSampleAppStateChangeObserver *  iBrCtlSampleAppStateChangeObserver
CBrCtlSampleAppDialogsProvider *  iBrCtlSampleAppDialogsProvider
TBool  iCancelInitDataLoad
CFbsScreenDevice *  iFbsScrDev
CFont *  iFont
TPtrC  iText
TPoint  iPoint


Constructor & Destructor Documentation

CBrCtlSampleAppContainer::~CBrCtlSampleAppContainer (   ) 
 

Destructor.

Definition at line 94 of file BrCtlSampleAppContainer.cpp.

References iBrCtlInterface, iBrCtlSampleAppDialogsProvider, iBrCtlSampleAppLayoutObserver, iBrCtlSampleAppLinkResolver, iBrCtlSampleAppLoadEventObserver, iBrCtlSampleAppSoftkeysObserver, iBrCtlSampleAppSpecialLoadObserver, iBrCtlSampleAppStateChangeObserver, iFbsScrDev, and iFont.

00095     {
00096     if (iBrCtlInterface)
00097         {
00098         iBrCtlInterface->RemoveLoadEventObserver(iBrCtlSampleAppLoadEventObserver);
00099         iBrCtlInterface->RemoveStateChangeObserver(iBrCtlSampleAppStateChangeObserver);
00100         delete iBrCtlInterface;
00101         }
00102 
00103     // we are required to release the font
00104     iFbsScrDev->ReleaseFont(iFont);
00105 
00106     // delete the screen device
00107     delete iFbsScrDev;
00108 
00109     // delete the observers
00110     delete iBrCtlSampleAppSpecialLoadObserver;
00111     delete iBrCtlSampleAppLayoutObserver;
00112     delete iBrCtlSampleAppSoftkeysObserver;
00113     delete iBrCtlSampleAppLoadEventObserver;
00114     delete iBrCtlSampleAppLinkResolver;
00115     delete iBrCtlSampleAppStateChangeObserver;
00116     delete iBrCtlSampleAppDialogsProvider;
00117     }


Member Function Documentation

void CBrCtlSampleAppContainer::ConstructL (  const TRect &  aRect  ) 
 

EPOC default constructor.

Parameters:
aRect  Frame rectangle for container.

Definition at line 42 of file BrCtlSampleAppContainer.cpp.

References iBrCtlCapabilities, iBrCtlInterface, iBrCtlSampleAppDialogsProvider, iBrCtlSampleAppLayoutObserver, iBrCtlSampleAppLinkResolver, iBrCtlSampleAppLoadEventObserver, iBrCtlSampleAppSoftkeysObserver, iBrCtlSampleAppSpecialLoadObserver, iBrCtlSampleAppStateChangeObserver, iCommandBase, iFbsScrDev, iFont, iPoint, iText, CBrCtlSampleAppDialogsProvider::NewL(), CBrCtlSampleAppStateChangeObserver::NewL(), CBrCtlSampleAppLinkResolver::NewL(), CBrCtlSampleAppLoadEventObserver::NewL(), CBrCtlSampleAppSoftkeysObserver::NewL(), CBrCtlSampleAppLayoutObserver::NewL(), and CBrCtlSampleAppSpecialLoadObserver::NewL().

Referenced by CBrCtlSampleAppUi::ConstructL().

00043     {
00044     CreateWindowL();
00045     SetRect(aRect);
00046     ActivateL();
00047 
00048     iCommandBase = TBrCtlDefs::ECommandIdBase;
00049 
00050     // Create the Observers
00051     iBrCtlSampleAppSpecialLoadObserver = CBrCtlSampleAppSpecialLoadObserver::NewL();
00052     iBrCtlSampleAppLayoutObserver = CBrCtlSampleAppLayoutObserver::NewL(this);
00053     iBrCtlSampleAppSoftkeysObserver = CBrCtlSampleAppSoftkeysObserver::NewL(this);
00054     iBrCtlSampleAppLoadEventObserver = CBrCtlSampleAppLoadEventObserver::NewL(this);
00055     iBrCtlSampleAppLinkResolver = CBrCtlSampleAppLinkResolver::NewL();
00056     iBrCtlSampleAppStateChangeObserver = CBrCtlSampleAppStateChangeObserver::NewL(this);
00057     iBrCtlSampleAppDialogsProvider = CBrCtlSampleAppDialogsProvider::NewL(this);
00058 
00059     // Initialize memeber variables
00060     _LIT(KEmpty, "");
00061     iText.Set(KEmpty);
00062     iPoint = TPoint(0,130);
00063     iBrCtlCapabilities = TBrCtlDefs::ECapabilityDisplayScrollBar | TBrCtlDefs::ECapabilityLoadHttpFw |
00064                          TBrCtlDefs::ECapabilityGraphicalHistory | TBrCtlDefs::ECapabilityGraphicalPage;
00065 
00066     // Create a Screen device for use with fonts for writing text to the screen
00067     CEikonEnv* eikEnv = CEikonEnv::Static();
00068     CWsScreenDevice& screenDev = *eikEnv->ScreenDevice();
00069     _LIT( KDummy, "Dummy");
00070     iFbsScrDev = CFbsScreenDevice::NewL( KDummy, screenDev.DisplayMode());
00071     
00072     // Create a font spec in order to retrieve a valid font
00073     _LIT(KFontFamily, "S60 Sans");
00074     TFontSpec fs(KFontFamily, 100);
00075     iFbsScrDev->GetNearestFontInTwips((CFont*&)iFont, fs);
00076 
00077     TRect rect(Position(), Size());
00078     iBrCtlInterface = CreateBrowserControlL( this, 
00079         rect, 
00080         iBrCtlCapabilities,
00081         iCommandBase, 
00082         iBrCtlSampleAppSoftkeysObserver, 
00083         iBrCtlSampleAppLinkResolver, 
00084         iBrCtlSampleAppSpecialLoadObserver,
00085         iBrCtlSampleAppLayoutObserver,
00086         iBrCtlSampleAppDialogsProvider);
00087 
00088     // These observers can be added and removed dynamically
00089     iBrCtlInterface->AddLoadEventObserverL(iBrCtlSampleAppLoadEventObserver);
00090     iBrCtlInterface->AddStateChangeObserverL(iBrCtlSampleAppStateChangeObserver);
00091     }

void CBrCtlSampleAppContainer::HandleCommandL (  TInt  aCommand  ) 
 

Pass a command to the Browser Control

Since:
2.8
Parameters:
aCommand  The command that the Browser Control should process
Returns:
void

Definition at line 233 of file BrCtlSampleAppContainer.cpp.

References BasicBrowserControlL(), BrowserControlWithObserversL(), ChangeSizeExtentsL(), ContentSizeImageCountL(), CustomizedDialogsL(), CustomizedScrollBarsL(), CustomizedSoftKeysL(), HandleStateChangedL(), iBrCtlInterface, iCommandBase, IncrementalLoadingL(), LoadingContentWithBufferL(), LoadingContentWithFileHandleL(), PageInfoL(), ResolvingEmbeddedLinksL(), and SpecialLoadRequestsL().

Referenced by CBrCtlSampleAppUi::HandleCommandL().

00234     {
00235     switch ( aCommand )
00236         {
00237         case EBrCtlSampleAppCmdAppRestoreSetting:
00238             {
00239             if (iBrCtlInterface)
00240                 {
00241                 TRect rect( Position(), Size() );
00242                 iBrCtlInterface->SetRect( rect );
00243                 iBrCtlInterface->SetBrowserSettingL(TBrCtlDefs::ESettingsSmallScreen, 1);
00244                 iBrCtlInterface->SetBrowserSettingL(TBrCtlDefs::ESettingsSecurityWarnings, 1);
00245                 iBrCtlInterface->SetBrowserSettingL(TBrCtlDefs::ESettingsAutoLoadImages, 1);
00246                 iBrCtlInterface->SetBrowserSettingL(TBrCtlDefs::ESettingsECMAScriptEnabled, 1);
00247                 }
00248             break;
00249             }
00250         case EBrCtlSampleAppCmdAppReload:
00251             {
00252             if (iBrCtlInterface)
00253                 {
00254                 iBrCtlInterface->HandleCommandL(iCommandBase + TBrCtlDefs::ECommandReload);
00255                 }
00256             break;
00257             }
00258         case EBrCtlSampleAppCmdAppBack:
00259             {
00260             if (iBrCtlInterface)
00261                 {
00262                 iBrCtlInterface->HandleCommandL(iCommandBase + TBrCtlDefs::ECommandBack);
00263                 }
00264             break;
00265             }
00266         case EBrCtlSampleAppCmdAppForward:
00267             {
00268             if (iBrCtlInterface)
00269                 {
00270                 iBrCtlInterface->HandleCommandL(iCommandBase + TBrCtlDefs::ECommandForward);
00271                 }
00272             break;
00273             }
00274         case EBrCtlSampleAppCmdApp1:
00275             {
00276             BasicBrowserControlL();
00277             break;
00278             }
00279         case EBrCtlSampleAppCmdApp2:
00280             {
00281             BrowserControlWithObserversL();
00282             break;
00283             }
00284         case EBrCtlSampleAppCmdApp3:
00285             {
00286             LoadingContentWithFileHandleL();
00287             break;
00288             }
00289         case EBrCtlSampleAppCmdApp4:
00290             {
00291             LoadingContentWithBufferL();
00292             break;
00293             }
00294         case EBrCtlSampleAppCmdApp5:
00295             {
00296             IncrementalLoadingL();
00297             break;
00298             }
00299         case EBrCtlSampleAppCmdApp6:
00300             {
00301             SpecialLoadRequestsL();
00302             break;
00303             }
00304         case EBrCtlSampleAppCmdApp7:
00305             {
00306             CustomizedDialogsL();
00307             break;
00308             }
00309         case EBrCtlSampleAppCmdApp8:
00310             {
00311             CustomizedSoftKeysL();
00312             break;
00313             }
00314         case EBrCtlSampleAppCmdApp9:
00315             {
00316             ResolvingEmbeddedLinksL();
00317             break;
00318             }
00319         case EBrCtlSampleAppCmdApp10:
00320             {
00321             CustomizedScrollBarsL();
00322             break;
00323             }
00324         case EBrCtlSampleAppCmdApp11:
00325             {
00326             HandleStateChangedL();
00327             break;
00328             }
00329         case EBrCtlSampleAppCmdApp12:
00330             {
00331             ChangeSizeExtentsL();
00332             break;
00333             }
00334         case EBrCtlSampleAppCmdApp13:
00335             {
00336             PageInfoL();
00337             break;
00338             }
00339         case EBrCtlSampleAppCmdApp14:
00340             {
00341             ContentSizeImageCountL();
00342             break;
00343             }
00344 
00345         default:
00346             if (aCommand >= iCommandBase &&
00347                 aCommand < iCommandBase + TBrCtlDefs::ECommandIdWMLBase &&
00348                 iBrCtlInterface)
00349                 {
00350                 iBrCtlInterface->HandleCommandL(aCommand);
00351                 }
00352 
00353             if (aCommand >= iCommandBase + TBrCtlDefs::ECommandIdWMLBase &&
00354                 aCommand < iCommandBase + TBrCtlDefs::ECommandIdRange &&
00355                 iBrCtlInterface)
00356                 {
00357                 iBrCtlInterface->HandleCommandL(aCommand);
00358                 }              
00359             break;      
00360         }
00361     }

void CBrCtlSampleAppContainer::DynInitMenuPaneL (  TInt  aResourceId,
CEikMenuPane *  aMenuPane
) 
 

Dynamically initialises a menu pane. The Uikon framework calls this function, if it is implemented in a menu’s observer, immediately before the menu pane is activated.

Since:
2.8
Parameters:
aResourceId  Resource ID identifying the menu pane to initialise
aMenuPane  The in-memory representation of the menu pane.
Returns:
void

Definition at line 384 of file BrCtlSampleAppContainer.cpp.

References iBrCtlInterface.

Referenced by CBrCtlSampleAppUi::DynInitMenuPaneL().

00385     {
00386     if (iBrCtlInterface && aResourceId == R_BRCTLSAMPLEAPP_MENU )
00387         {
00388         iBrCtlInterface->AddOptionMenuItemsL(*aMenuPane, aResourceId);
00389         RPointerArray<TBrCtlWmlServiceOption>* options;
00390         options = iBrCtlInterface->WMLOptionMenuItemsL();
00391         TInt i;
00392         TInt count = options->Count();
00393         for (i = 0; i < count; i++)
00394             {
00395             TBrCtlWmlServiceOption* option = (*options)[i];
00396             if (option != NULL)
00397                 {
00398                 CEikMenuPaneItem::SData item;
00399                 item.iText.Copy(option->Text());
00400                 item.iCommandId = option->ElemID();
00401                 item.iFlags = 0;
00402                 item.iCascadeId = 0;
00403                 aMenuPane->InsertMenuItemL(item, 0);
00404                 }
00405             }
00406         }
00407     }

TKeyResponse CBrCtlSampleAppContainer::HandleKeyEventL (  const TKeyEvent &  aKeyEvent,
TEventCode  aType
) 
 

Handles key events

Since:
2.8
Parameters:
aKeyEvent  The key event that occurred.
aType  The window server event type that is being handled
Returns:
TKeyResponse Value indicates whether or not the key event was consumed by the control. The default implementation simply returns EKeyWasNotConsumed.

Definition at line 194 of file BrCtlSampleAppContainer.cpp.

Referenced by CBrCtlSampleAppUi::HandleKeyEventL().

00196     {
00197     return EKeyWasNotConsumed;
00198     }

const TDesC& CBrCtlSampleAppContainer::Text (   )  const [inline]
 

Accessor method for iText

Since:
2.8
Parameters:
void 
Returns:
TDesc& The descriptor of the text

Definition at line 89 of file BrCtlSampleAppContainer.h.

References iText.

00089 {return iText;}

void CBrCtlSampleAppContainer::SetText (  const TDesC &  aText  ) 
 

Setter method for iText

Since:
2.8
Parameters:
aText  The descriptor for the text you wish to display
Returns:
void

Definition at line 205 of file BrCtlSampleAppContainer.cpp.

References iText.

Referenced by CBrCtlSampleAppLoadEventObserver::HandleBrowserLoadEventL(), CBrCtlSampleAppLayoutObserver::NotifyLayoutChange(), CBrCtlSampleAppStateChangeObserver::StateChanged(), CBrCtlSampleAppLayoutObserver::UpdateBrowserHScrollBarL(), and CBrCtlSampleAppLayoutObserver::UpdateBrowserVScrollBarL().

00206     {
00207     iText.Set(aText);
00208     }

void CBrCtlSampleAppContainer::SetPoint (  const TPoint &  aPoint  ) 
 

Setter method for iPoint

Since:
2.8
Parameters:
aPoint  The point at which you want to display the text
Returns:
void

Definition at line 215 of file BrCtlSampleAppContainer.cpp.

References iPoint.

Referenced by CBrCtlSampleAppLayoutObserver::NotifyLayoutChange(), CBrCtlSampleAppStateChangeObserver::StateChanged(), CBrCtlSampleAppLayoutObserver::UpdateBrowserHScrollBarL(), and CBrCtlSampleAppLayoutObserver::UpdateBrowserVScrollBarL().

00216     {
00217     iPoint = aPoint;
00218     }

CBrCtlInterface* CBrCtlSampleAppContainer::BrCtlInterface (   )  const [inline]
 

Accessor method iBrCtlInterface

Since:
2.8
Parameters:
void 
Returns:
CBrCtlInterface* A pointer to the browser control interface as a convenience to the observers

Definition at line 113 of file BrCtlSampleAppContainer.h.

References iBrCtlInterface.

Referenced by CBrCtlSampleAppSoftkeysObserver::UpdateSoftkeyL().

00113 {return iBrCtlInterface;}

void CBrCtlSampleAppContainer::SizeChanged (   )  [private]
 

From CoeControl,SizeChanged.

Definition at line 124 of file BrCtlSampleAppContainer.cpp.

References iBrCtlInterface.

00125     {
00126     if (iBrCtlInterface)
00127         {
00128         iBrCtlInterface->SetRect(Rect());
00129         }
00130     }

TInt CBrCtlSampleAppContainer::CountComponentControls (   )  const [private]
 

From CoeControl,CountComponentControls.

Definition at line 136 of file BrCtlSampleAppContainer.cpp.

References iBrCtlInterface.

00137     {
00138     if (iBrCtlInterface)
00139         return 1;
00140     return 0;
00141     }

CCoeControl * CBrCtlSampleAppContainer::ComponentControl (  TInt  aIndex  )  const [private]
 

From CCoeControl,ComponentControl.

Definition at line 147 of file BrCtlSampleAppContainer.cpp.

References iBrCtlInterface.

00148     {
00149     switch ( aIndex )
00150         {
00151         case 0:
00152             return iBrCtlInterface; // Could be NULL
00153         default:
00154             return NULL;
00155         }
00156     }

void CBrCtlSampleAppContainer::Draw (  const TRect &  aRect  )  const [private]
 

From CCoeControl,Draw.

Definition at line 162 of file BrCtlSampleAppContainer.cpp.

References iFont, iPoint, and iText.

00163     {
00164     
00165     CWindowGc& gc = SystemGc();
00166     gc.SetPenStyle(CGraphicsContext::ESolidPen);
00167     gc.SetBrushColor(KRgbGray);
00168     gc.SetBrushStyle(CGraphicsContext::ESolidBrush);
00169     gc.DrawRect(aRect);
00170     
00171     gc.UseFont(iFont);
00172 
00173     gc.DrawText(iText, iPoint);      
00174 
00175     gc.DiscardFont();
00176     }

TKeyResponse CBrCtlSampleAppContainer::OfferKeyEventL (  const TKeyEvent &  aKeyEvent,
TEventCode  aType
)  [private]
 

Handle key events.

Definition at line 369 of file BrCtlSampleAppContainer.cpp.

References iBrCtlInterface.

00370     {
00371     if (iBrCtlInterface)
00372         {
00373         return iBrCtlInterface->OfferKeyEventL(aKeyEvent, aType);
00374         }
00375     return EKeyWasConsumed;
00376     }

void CBrCtlSampleAppContainer::CancelLoad (   )  [private]
 

From MBrCtlDataLoadSupplier, Cancel an on-going load

Definition at line 224 of file BrCtlSampleAppContainer.cpp.

References iCancelInitDataLoad.

00225     {
00226     iCancelInitDataLoad = ETrue;
00227     }

void CBrCtlSampleAppContainer::CreateBasicBrowserControlL (   )  [private]
 

Create a Basic Browser Control that does not have observers with scrolling and HTTP framework capabilities

Definition at line 414 of file BrCtlSampleAppContainer.cpp.

References iBrCtlInterface.

00415     {
00416     if (iBrCtlInterface != NULL)
00417         {
00418         delete iBrCtlInterface;
00419         iBrCtlInterface = NULL;
00420         }
00421     else
00422         {
00423         TRect rect(Position(), Size());
00424         
00425         iBrCtlInterface = CreateBrowserControlL( this, 
00426             rect, 
00427             TBrCtlDefs::ECapabilityDisplayScrollBar | TBrCtlDefs::ECapabilityLoadHttpFw |
00428             TBrCtlDefs::ECapabilityGraphicalHistory | TBrCtlDefs::ECapabilityGraphicalPage,
00429             TBrCtlDefs::ECommandIdBase, 
00430             NULL, 
00431             NULL,
00432             NULL, 
00433             NULL);
00434         }
00435     }

void CBrCtlSampleAppContainer::CreateBrowserControlWithObserversL (  TUint  aCapabilities  )  [private]
 

Create Browser Control with observers with the given capabilities

Definition at line 442 of file BrCtlSampleAppContainer.cpp.

References iBrCtlCapabilities, iBrCtlInterface, iBrCtlSampleAppLayoutObserver, iBrCtlSampleAppLinkResolver, iBrCtlSampleAppLoadEventObserver, iBrCtlSampleAppSoftkeysObserver, iBrCtlSampleAppSpecialLoadObserver, and iBrCtlSampleAppStateChangeObserver.

Referenced by BrowserControlWithObserversL(), CustomizedDialogsL(), CustomizedScrollBarsL(), CustomizedSoftKeysL(), HandleStateChangedL(), IncrementalLoadingL(), LoadingContentWithBufferL(), LoadingContentWithFileHandleL(), ResolvingEmbeddedLinksL(), and SpecialLoadRequestsL().

00443     {
00444     if (iBrCtlCapabilities != aCapabilities)
00445         {
00446         delete iBrCtlInterface;
00447         iBrCtlInterface = NULL;
00448         }
00449     iBrCtlCapabilities = aCapabilities;
00450     if (iBrCtlInterface == NULL)
00451         {
00452         TRect rect(Position(), Size());
00453         iBrCtlInterface = CreateBrowserControlL( this, 
00454             rect, 
00455             iBrCtlCapabilities,
00456             TBrCtlDefs::ECommandIdBase, 
00457             iBrCtlSampleAppSoftkeysObserver, 
00458             iBrCtlSampleAppLinkResolver, 
00459             iBrCtlSampleAppSpecialLoadObserver,
00460             iBrCtlSampleAppLayoutObserver);
00461     
00462         iBrCtlInterface->AddLoadEventObserverL(iBrCtlSampleAppLoadEventObserver);
00463         iBrCtlInterface->AddStateChangeObserverL(iBrCtlSampleAppStateChangeObserver);
00464         }
00465     }

HBufC8 * CBrCtlSampleAppContainer::ReadFileLC (  const TDesC &  aFileName  )  [private]
 

Read the file.

Definition at line 472 of file BrCtlSampleAppContainer.cpp.

Referenced by IncrementalLoadingL(), and LoadingContentWithBufferL().

00473     {
00474     RFs rfs;
00475     RFile file;
00476     User::LeaveIfError(rfs.Connect());
00477     CleanupClosePushL(rfs);
00478     User::LeaveIfError(file.Open(rfs, aFileName, EFileRead));
00479     CleanupClosePushL(file);
00480     TInt size;
00481     User::LeaveIfError(file.Size(size));
00482     HBufC8* buf = HBufC8::NewLC(size);
00483     TPtr8 bufPtr(buf->Des());
00484     User::LeaveIfError(file.Read(bufPtr));
00485     CleanupStack::Pop(); // buf
00486     CleanupStack::PopAndDestroy(2); // file, rfs
00487     CleanupStack::PushL(buf);
00488     return buf;
00489     }

void CBrCtlSampleAppContainer::HandleControlEventL (  CCoeControl *  aControl,
TCoeEvent  aEventType
)  [private]
 

Handles an event from an observed control.

Definition at line 183 of file BrCtlSampleAppContainer.cpp.

00185     {
00186     // TODO: Add your control event handler code here
00187     }

void CBrCtlSampleAppContainer::BasicBrowserControlL (   )  [private]
 

The following methods are used to demonstrate the functionality of the browser control API

Definition at line 496 of file BrCtlSampleAppContainer.cpp.

References iBrCtlInterface, and iCommandBase.

Referenced by HandleCommandL().

00497     {
00498     if (iBrCtlInterface == NULL)
00499         {
00500         TRect rect(Position(), Size());
00501         iBrCtlInterface = CreateBrowserControlL( this, 
00502             rect, 
00503             TBrCtlDefs::ECapabilityDisplayScrollBar | TBrCtlDefs::ECapabilityLoadHttpFw |
00504             TBrCtlDefs::ECapabilityGraphicalHistory | TBrCtlDefs::ECapabilityGraphicalPage,
00505             iCommandBase, 
00506             NULL, 
00507             NULL,
00508             NULL, 
00509             NULL,
00510             NULL);
00511         }
00512 
00513     _LIT(KUrl, "file:///c:\\BrCtlSampleApp\\sample1.htm");
00514 
00515     iBrCtlInterface->LoadUrlL( KUrl );
00516     }


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

© Nokia 2009

Back to top