Nokia N97 SDK
Example Applications Guide

CMyViewContainer Class Reference

#include <MyViewContainer.h>

Inheritance diagram for CMyViewContainer:

List of all members.

Detailed Description

CMyViewContainer container control class.

Definition at line 33 of file MyViewContainer.h.


Public Member Functions

void  ConstructL (const TRect &aRect)
  ~CMyViewContainer ()

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)

Private Attributes

CEikLabel *  iLabel


Constructor & Destructor Documentation

CMyViewContainer::~CMyViewContainer (   ) 
 

Destructor.

Definition at line 42 of file MyViewContainer.cpp.

References iLabel.

00043     {
00044     delete iLabel;
00045     }


Member Function Documentation

void CMyViewContainer::ConstructL (  const TRect &  aRect  ) 
 

EPOC default constructor.

Parameters:
aRect  Frame rectangle for container.

Definition at line 29 of file MyViewContainer.cpp.

References iLabel.

Referenced by CMyViewView::DoActivateL().

00030     {
00031     CreateWindowL();
00032 
00033     iLabel = new (ELeave) CEikLabel;
00034     iLabel->SetContainerWindowL( *this );
00035     iLabel->SetTextL( _L("MyView 1\n\nSelect local view\nswitching from menu") );
00036 
00037     SetRect(aRect);
00038     ActivateL();
00039     }

void CMyViewContainer::SizeChanged (   )  [private]
 

From CoeControl,SizeChanged.

Definition at line 52 of file MyViewContainer.cpp.

References iLabel.

00053     {
00054     // Control resize code
00055     iLabel->SetExtent( TPoint(10,10), iLabel->MinimumSize() );
00056     }

TInt CMyViewContainer::CountComponentControls (   )  const [private]
 

From CoeControl,CountComponentControls.

Definition at line 62 of file MyViewContainer.cpp.

00063     {
00064     return 1; // return nbr of controls inside this container
00065     }

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

From CCoeControl,ComponentControl.

Definition at line 71 of file MyViewContainer.cpp.

References iLabel.

00072     {
00073     switch ( aIndex )
00074         {
00075         case 0:
00076             return iLabel;
00077         default:
00078             return NULL;
00079         }
00080     }

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

From CCoeControl,Draw.

Definition at line 86 of file MyViewContainer.cpp.

00087     {
00088     CWindowGc& gc = SystemGc();
00089     gc.SetPenStyle(CGraphicsContext::ENullPen);
00090     gc.SetBrushColor(KRgbBlue);
00091     gc.SetBrushStyle(CGraphicsContext::ESolidBrush);
00092     gc.DrawRect(aRect);
00093     }

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

From CCoeControl, HandleControlEventL.

Definition at line 100 of file MyViewContainer.cpp.

00102     {
00103     // TODO: Add your control event handler code here
00104     }


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

© Nokia 2009

Back to top