S60 3rd Edition SDK for Symbian OS
Example Applications Guide

CFindItemTestAppContainer Class Reference

#include <FindItemTestAppContainer.h>

List of all members.

Public Member Functions

void ConstructL (const TRect &aRect)
 ~CFindItemTestAppContainer ()
void AddMessageL (const TDesC &aMsg)
void ResetMessage ()
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
void HandleControlEventL (CCoeControl *aControl, TCoeEvent aEventType)
virtual void HandleResourceChange (TInt aType)

Private Attributes

CEikTextListBox * iListBox
CEikLabel * iLabel


Detailed Description

CFindItemTestAppContainer container control class.

FindItemTestApp.exe

Since:
Series S60 3.0

Definition at line 34 of file FindItemTestAppContainer.h.


Constructor & Destructor Documentation

CFindItemTestAppContainer::~CFindItemTestAppContainer (   ) 
 

Destructor.

Definition at line 61 of file FindItemTestAppContainer.cpp.

References iLabel, and iListBox.

00062     {
00063     delete iListBox;
00064     delete iLabel;    
00065     }


Member Function Documentation

void CFindItemTestAppContainer::ConstructL (  const TRect &  aRect  ) 
 

EPOC default constructor.

Parameters:
aRect Frame rectangle for container.

Definition at line 34 of file FindItemTestAppContainer.cpp.

References iLabel, and iListBox.

00035     {
00036     CreateWindowL();
00037 
00038     iListBox = new(ELeave) CEikTextListBox();
00039     iListBox->SetContainerWindowL( *this );
00040     TResourceReader reader;
00041     iEikonEnv->CreateResourceReaderLC(reader, R_FINDITEMTESTAPP_LIST);
00042     iListBox->ConstructFromResourceL(reader);
00043     CleanupStack::PopAndDestroy();
00044     iListBox->CreateScrollBarFrameL(ETrue);
00045     iListBox->ScrollBarFrame()->SetScrollBarVisibilityL(CEikScrollBarFrame::EOn, CEikScrollBarFrame::EOn); 
00046     
00047     iLabel = new (ELeave) CEikLabel;
00048     iLabel->SetContainerWindowL( *this );
00049     _LIT(KFindItemTest, "Find Item Test");
00050     iLabel->SetTextL( KFindItemTest );
00051     
00052     SetRect(aRect);
00053     ActivateL();
00054     }

void CFindItemTestAppContainer::SizeChanged (   )  [private]
 

From CoeControl,SizeChanged.

Definition at line 72 of file FindItemTestAppContainer.cpp.

References iListBox.

00073     {
00074     TRect parentRect(Rect());
00075         TSize listBoxSize(parentRect.Width(), parentRect.Height());
00076         iListBox->SetExtent( TPoint(0,0), listBoxSize );
00077     }

TInt CFindItemTestAppContainer::CountComponentControls (   )  const [private]
 

From CoeControl,CountComponentControls.

Definition at line 84 of file FindItemTestAppContainer.cpp.

00085     {
00086     return 2; // return nbr of controls inside this container
00087     }

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

From CCoeControl,ComponentControl.

Definition at line 94 of file FindItemTestAppContainer.cpp.

References iLabel, and iListBox.

00095     {
00096     switch ( aIndex )
00097         {
00098         case 0:
00099             return iListBox;
00100         case 1:
00101             return iLabel;
00102         default:
00103             return NULL;
00104         }
00105     }

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

From CCoeControl,Draw.

Definition at line 111 of file FindItemTestAppContainer.cpp.

00112     {
00113     CWindowGc& gc = SystemGc();
00114     gc.SetPenStyle(CGraphicsContext::ENullPen);
00115     gc.SetBrushColor(KRgbWhite);
00116     gc.SetBrushStyle(CGraphicsContext::ESolidBrush);
00117     gc.DrawRect(aRect);
00118     }

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

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

Definition at line 124 of file FindItemTestAppContainer.cpp.

00126     {
00127     }

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

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

Definition at line 184 of file FindItemTestAppContainer.cpp.

References iListBox.

00185     {
00186     CCoeControl::HandleResourceChange(aType);
00187     
00188     if ( aType==KEikDynamicLayoutVariantSwitch )
00189         {
00190         TRect rect;
00191         AknLayoutUtils::LayoutMetricsRect(AknLayoutUtils::EMainPane, rect);
00192         SetRect(rect);
00193         }
00194     // Redraw the listbox
00195     iListBox->DrawNow();
00196     }


© Nokia 2006

Back to top