Nokia N97 SDK
Example Applications Guide

CHWRMTestAppContainer Class Reference

#include <HWRMTestAppContainer.h>

Inheritance diagram for CHWRMTestAppContainer:

List of all members.

Detailed Description

CHWRMTestAppContainer container control class.

HWRMTestApp.exe

Since:
Series S60 3.0

Definition at line 33 of file HWRMTestAppContainer.h.


Public Member Functions

void  ConstructL (const TRect &aRect)
  ~CHWRMTestAppContainer ()
void  AddMessageL (const TDesC &aMsg) const
TKeyResponse  OfferKeyEventL (const TKeyEvent &aKeyEvent, TEventCode aType)

Private Member Functions

void  SizeChanged ()
TInt  CountComponentControls () const
CCoeControl *  ComponentControl (TInt aIndex) const
void  Draw (const TRect &aRect) const
virtual void  HandleResourceChange (TInt aType)
void  HandleControlEventL (CCoeControl *aControl, TCoeEvent aEventType)

Private Attributes

CEikEdwin *  iEdwin


Constructor & Destructor Documentation

CHWRMTestAppContainer::~CHWRMTestAppContainer (   ) 
 

Destructor.

Definition at line 55 of file HWRMTestAppContainer.cpp.

References iEdwin.

00056     {
00057     delete iEdwin;
00058     }


Member Function Documentation

void CHWRMTestAppContainer::ConstructL (  const TRect &  aRect  ) 
 

EPOC default constructor.

Parameters:
aRect  Frame rectangle for container.

Definition at line 30 of file HWRMTestAppContainer.cpp.

References iEdwin.

Referenced by CHWRMTestAppAppUi::ConstructL().

00031     {
00032     CreateWindowL();
00033 
00034     // Set up a read-only editor window for displaying messages
00035     iEdwin = new ( ELeave ) CEikEdwin();
00036     iEdwin->SetContainerWindowL( *this );
00037     
00038     TInt edwinFlags = CEikEdwin::ENoAutoSelection;
00039     edwinFlags |= CEikEdwin::EJustAutoCurEnd;
00040     edwinFlags |= CEikEdwin::EReadOnly;
00041     edwinFlags |= CEikEdwin::EInclusiveSizeFixed;
00042     iEdwin->ConstructL( edwinFlags );
00043     iEdwin->CreateScrollBarFrameL();
00044         iEdwin->ScrollBarFrame()->SetScrollBarVisibilityL(CEikScrollBarFrame::EOff, CEikScrollBarFrame::EAuto);
00045 
00046     SetRect(aRect);
00047     ActivateL();
00048     }

void CHWRMTestAppContainer::SizeChanged (   )  [private]
 

From CoeControl,SizeChanged.

Definition at line 65 of file HWRMTestAppContainer.cpp.

References iEdwin.

00066     {
00067     iEdwin->SetRect( Rect() );
00068     }

TInt CHWRMTestAppContainer::CountComponentControls (   )  const [private]
 

From CoeControl,CountComponentControls.

Definition at line 75 of file HWRMTestAppContainer.cpp.

00076     {
00077     return 1; // return nbr of controls inside this container
00078     }

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

From CCoeControl,ComponentControl.

Definition at line 85 of file HWRMTestAppContainer.cpp.

References iEdwin.

00086     {
00087     switch ( aIndex )
00088         {
00089         case 0:
00090             return iEdwin;
00091 
00092         default:
00093             return NULL;
00094         }
00095     }

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

From CCoeControl,Draw.

Definition at line 101 of file HWRMTestAppContainer.cpp.

00102     {
00103     }

void CHWRMTestAppContainer::HandleResourceChange (  TInt  aType  )  [private, virtual]
 

From CoeControl, HandleResourceChange. Called by framework when the view layout is changed.

Definition at line 147 of file HWRMTestAppContainer.cpp.

References iEdwin.

00148     {
00149     CCoeControl::HandleResourceChange(aType);
00150 
00151     // ADDED FOR SCALABLE UI SUPPORT
00152     // *****************************
00153     if ( aType==KEikDynamicLayoutVariantSwitch )
00154         {
00155         TRect rect;
00156         AknLayoutUtils::LayoutMetricsRect(AknLayoutUtils::EMainPane, rect);
00157         SetRect(rect);
00158         }
00159     
00160     // Redraw the editor window
00161     iEdwin->DrawNow();
00162     }

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

From MCoeControlObserver, HandleControlEventL. Handles an event from an observed control.

Definition at line 109 of file HWRMTestAppContainer.cpp.

00111     {
00112     // TODO: Add your control event handler code here
00113     }


Member Data Documentation

CEikEdwin* CHWRMTestAppContainer::iEdwin [private]
 

Editor window for displaying messages. Own.

Definition at line 96 of file HWRMTestAppContainer.h.

Referenced by AddMessageL(), ComponentControl(), ConstructL(), HandleResourceChange(), OfferKeyEventL(), SizeChanged(), and ~CHWRMTestAppContainer().


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

© Nokia 2009

Back to top