Nokia N97 SDK
Example Applications Guide

CMyViewContainer2 Class Reference

#include <MyViewContainer2.h>

Inheritance diagram for CMyViewContainer2:

List of all members.

Detailed Description

CMyViewContainer2 container control class.

Definition at line 32 of file MyViewContainer2.h.


Public Member Functions

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

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

CMyViewContainer2::~CMyViewContainer2 (   ) 
 

Destructor.

Definition at line 44 of file MyViewContainer2.cpp.

References iLabel.

00045     {
00046     delete iLabel;
00047     }


Member Function Documentation

void CMyViewContainer2::ConstructL (  const TRect &  aRect  ) 
 

EPOC default constructor.

Parameters:
aRect  Frame rectangle for container.

Definition at line 31 of file MyViewContainer2.cpp.

References iLabel.

Referenced by CMyViewView2::DoActivateL().

00032     {
00033     CreateWindowL();
00034 
00035     iLabel = new (ELeave) CEikLabel;
00036     iLabel->SetContainerWindowL( *this );
00037     iLabel->SetTextL( _L("MyView 2\n\nSelect external view\nactivation from menu") );
00038 
00039     SetRect(aRect);
00040     ActivateL();
00041     }

void CMyViewContainer2::SizeChanged (   )  [private]
 

From CoeControl,SizeChanged.

Definition at line 54 of file MyViewContainer2.cpp.

References iLabel.

00055     {
00056     // TODO: Add here control resize code etc.
00057     iLabel->SetExtent( TPoint(10,10), iLabel->MinimumSize() );
00058     }

TInt CMyViewContainer2::CountComponentControls (   )  const [private]
 

From CoeControl,CountComponentControls.

Definition at line 64 of file MyViewContainer2.cpp.

00065     {
00066     return 1; // return nbr of controls inside this container
00067     }

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

From CCoeControl,ComponentControl.

Definition at line 73 of file MyViewContainer2.cpp.

References iLabel.

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

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

From CCoeControl,Draw.

Definition at line 88 of file MyViewContainer2.cpp.

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

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

From CCoeControl, HandleControlEventL.

Definition at line 103 of file MyViewContainer2.cpp.

00105     {
00106     // Add your control event handler code here
00107     }


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

© Nokia 2009

Back to top