S60 3rd Edition SDK FP2 for Symbian OS
CommonDialogsEx

CCommonDialogsExContainer Class Reference

#include <CommonDialogsExContainer.h>

Inherits CCoeControl, and MCoeControlObserver.

List of all members.


Detailed Description

CCommonDialogsExContainer container control class.

Definition at line 30 of file CommonDialogsExContainer.h.

Public Member Functions

void ConstructL (const TRect &aRect)
 ~CCommonDialogsExContainer ()
void ShowTextL (const TDesC &aTextMain, const TDesC &aTextSub)

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)
void HandleResourceChange (TInt aType)

Private Attributes

CEikLabel * iLabel
CEikLabel * iToDoLabel


Constructor & Destructor Documentation

CCommonDialogsExContainer::~CCommonDialogsExContainer (  ) 

Destructor.

Definition at line 48 of file CommonDialogsExContainer.cpp.

References iLabel, and iToDoLabel.

00049     {
00050     delete iLabel;
00051     delete iToDoLabel;
00052     }


Member Function Documentation

void CCommonDialogsExContainer::ConstructL ( const TRect &  aRect  ) 

EPOC default constructor.

Parameters:
aRect Frame rectangle for container.

Definition at line 30 of file CommonDialogsExContainer.cpp.

References iLabel, and iToDoLabel.

Referenced by CCommonDialogsExAppUi::ConstructL().

00031     {
00032     CreateWindowL();
00033     
00034     iLabel = new (ELeave) CEikLabel;
00035     iLabel->SetContainerWindowL( *this );
00036     iLabel->SetTextL( KCommonDialogsExTitle );
00037 
00038     iToDoLabel = new (ELeave) CEikLabel;
00039     iToDoLabel->SetContainerWindowL( *this );
00040     iToDoLabel->SetTextL( KCommonDialogsExGuide );
00041 
00042 
00043     SetRect(aRect);
00044     ActivateL();
00045     }

void CCommonDialogsExContainer::ShowTextL ( const TDesC &  aTextMain,
const TDesC &  aTextSub 
)

Show text message on screen by using label

Definition at line 120 of file CommonDialogsExContainer.cpp.

References iLabel, iToDoLabel, and SizeChanged().

Referenced by CCommonDialogsExAppUi::HandleCommandL().

00122     {
00123     iLabel->SetTextL(aText);
00124     iToDoLabel->SetTextL(aTextSub);
00125     SizeChanged();
00126     DrawDeferred();
00127     }

void CCommonDialogsExContainer::SizeChanged (  )  [private]

From CoeControl,SizeChanged.

Definition at line 59 of file CommonDialogsExContainer.cpp.

References iLabel, and iToDoLabel.

Referenced by ShowTextL().

00060     {
00061     iLabel->SetExtent( TPoint(10,10), iLabel->MinimumSize() );
00062     iToDoLabel->SetExtent( TPoint(10,90), iToDoLabel->MinimumSize() );
00063     }

TInt CCommonDialogsExContainer::CountComponentControls (  )  const [private]

From CoeControl,CountComponentControls.

Definition at line 69 of file CommonDialogsExContainer.cpp.

00070     {
00071     return 2; // return nbr of controls inside this container
00072     }

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

From CCoeControl,ComponentControl.

Definition at line 78 of file CommonDialogsExContainer.cpp.

References iLabel, and iToDoLabel.

00079     {
00080     switch ( aIndex )
00081         {
00082         case 0:
00083             return iLabel;
00084         case 1:
00085             return iToDoLabel;
00086         default:
00087             return NULL;
00088         }
00089     }

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

From CCoeControl,Draw.

Definition at line 95 of file CommonDialogsExContainer.cpp.

00096     {
00097     CWindowGc& gc = SystemGc();
00098     gc.SetPenStyle(CGraphicsContext::ENullPen);
00099     gc.SetBrushColor(KRgbGray);
00100     gc.SetBrushStyle(CGraphicsContext::ESolidBrush);
00101     gc.DrawRect(aRect);
00102     }

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

From MCoeControlObserver

Definition at line 109 of file CommonDialogsExContainer.cpp.

00111     {
00112 
00113     }

void CCommonDialogsExContainer::HandleResourceChange ( TInt  aType  )  [private]

From CCoeControl, HandleResourceChange. Make dynamic resolution change smoother.

Parameters:
aType A message UID value.

Definition at line 134 of file CommonDialogsExContainer.cpp.

00135     {
00136     if (aType == KEikDynamicLayoutVariantSwitch)
00137         {
00138         SetRect( iAvkonAppUi->ClientRect());
00139         }
00140     CCoeControl::HandleResourceChange( aType );
00141     }


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

© Nokia 2007

Back to top