Nokia N97 SDK
Example Applications Guide

CAknExPopFieldContainer Class Reference

#include <aknexpopfieldcontainer.h>

Inheritance diagram for CAknExPopFieldContainer:

List of all members.

Detailed Description

CAknExPopFieldContainer container control class.

Definition at line 36 of file aknexpopfieldcontainer.h.


Public Member Functions

  CAknExPopFieldContainer (CAknExPopFieldView *aView)
void  ConstructL (const TRect &aRect)
virtual  ~CAknExPopFieldContainer ()
void  SetTextToLabelL (TInt aResourceId)
void  DisplayTextPopFieldL (TInt aResourceId)
void  DisplayOptionalTextPopFieldL (TInt aResourceId)
void  DisplayManyLineTextPopFieldL (TInt aResourceId)
void  DisplayMultiPagePopFieldL (TInt aResourceId)
void  DisplaySetAttribsPopFieldL (TInt aResourceId)

Private Types

enum   TAknExPopFieldComponentControls { EAknExPopFieldComponentLabel }

Private Member Functions

void  CreateLabelL ()
TKeyResponse  OfferKeyEventL (const TKeyEvent &aKeyEvent, TEventCode aType)
void  SizeChanged ()
TInt  CountComponentControls () const
CCoeControl *  ComponentControl (TInt aIndex) const
void  Draw (const TRect &aRect) const

Private Attributes

CAknExPopFieldView *  iView
CEikLabel *  iLabel


Member Enumeration Documentation

enum CAknExPopFieldContainer::TAknExPopFieldComponentControls [private]
 

TAknExPopFieldComponentControls Enumeration

Definition at line 158 of file aknexpopfieldcontainer.h.

00159             {
00160             EAknExPopFieldComponentLabel
00161             };


Constructor & Destructor Documentation

CAknExPopFieldContainer::CAknExPopFieldContainer (  CAknExPopFieldView *  aView  ) 
 

CAknExPopFieldContainer C++ default constructor.

Parameters:
aView  Pointer to view class object.

Definition at line 54 of file aknexpopfieldcontainer.cpp.

00055                             : iView( aView ), iLabel( NULL )
00056     {
00057     // No implementation required
00058     }

CAknExPopFieldContainer::~CAknExPopFieldContainer (   )  [virtual]
 

CAknExPopFieldContainer Virtual Destructor.

Definition at line 82 of file aknexpopfieldcontainer.cpp.

References iLabel.

00083     {
00084     delete iLabel;
00085     }


Member Function Documentation

void CAknExPopFieldContainer::ConstructL (  const TRect &  aRect  ) 
 

ConstructL 2nd phase constructor.

Parameters:
aRect  Frame rectangle for container.

Definition at line 65 of file aknexpopfieldcontainer.cpp.

References CreateLabelL().

Referenced by CAknExPopFieldView::DoActivateL().

00066     {
00067     // Creates window.
00068     CreateWindowL();
00069 
00070     // Creates label object.
00071     CreateLabelL();
00072 
00073     SetRect( aRect ); // Sets rectangle of frame.
00074     ActivateL(); // Activates the window. (Ready to draw)
00075     }

void CAknExPopFieldContainer::SetTextToLabelL (  TInt  aResourceId  ) 
 

SetTextToLabelL Sets text to label

Parameters:
aResourceId  Resource's Id

Definition at line 92 of file aknexpopfieldcontainer.cpp.

References iLabel.

Referenced by CreateLabelL(), and CAknExPopFieldView::HandleCommandL().

00093     {
00094     TBuf<KAknExPopFieldMessageBufLength> messageString;
00095     iCoeEnv->ReadResource( messageString , aResourceId );
00096     iLabel->SetTextL( messageString );
00097     }

void CAknExPopFieldContainer::DisplayTextPopFieldL (  TInt  aResourceId  ) 
 

DisplayTextPopFieldL Display Text with PopField

Parameters:
aResourceId 

Definition at line 104 of file aknexpopfieldcontainer.cpp.

References CAknExPopFieldTextValueDialog::NewLC().

Referenced by CAknExPopFieldView::HandleCommandL().

00105     {
00106     CAknExPopFieldTextValueDialog* dlg =
00107         CAknExPopFieldTextValueDialog::NewLC();
00108     CleanupStack::Pop();
00109     dlg->ExecuteLD( aResourceId );
00110     }

void CAknExPopFieldContainer::DisplayOptionalTextPopFieldL (  TInt  aResourceId  ) 
 

DisplayOptionalTextPopFieldL

Parameters:
aResourceId 

Definition at line 117 of file aknexpopfieldcontainer.cpp.

References CAknExPopFieldOptionalListDialog::NewLC().

Referenced by CAknExPopFieldView::HandleCommandL().

00118     {
00119     CAknExPopFieldOptionalListDialog* dlg =
00120         CAknExPopFieldOptionalListDialog::NewLC();
00121     CleanupStack::Pop();
00122     dlg->ExecuteLD( aResourceId );
00123     }

void CAknExPopFieldContainer::DisplayManyLineTextPopFieldL (  TInt  aResourceId  ) 
 

DisplayManyLineTextPopFieldL

Parameters:
aResourceId 

Definition at line 130 of file aknexpopfieldcontainer.cpp.

References CAknExPopFieldManyLineDialog::NewLC().

Referenced by CAknExPopFieldView::HandleCommandL().

00131     {
00132     CAknExPopFieldManyLineDialog* dlg =
00133         CAknExPopFieldManyLineDialog::NewLC();
00134     CleanupStack::Pop();
00135     dlg->ExecuteLD( aResourceId );
00136     }

void CAknExPopFieldContainer::DisplayMultiPagePopFieldL (  TInt  aResourceId  ) 
 

DisplayMultiPagePopFieldL

Parameters:
aResourceId 

Definition at line 143 of file aknexpopfieldcontainer.cpp.

References CAknExPopFieldMultiPageDialog::NewLC().

Referenced by CAknExPopFieldView::HandleCommandL().

00144     {
00145     CAknExPopFieldMultiPageDialog* dlg =
00146         CAknExPopFieldMultiPageDialog::NewLC();
00147     CleanupStack::Pop();
00148     dlg->ExecuteLD( aResourceId );
00149     }

void CAknExPopFieldContainer::DisplaySetAttribsPopFieldL (  TInt  aResourceId  ) 
 

DisplaySetAttribsPopFieldL

Parameters:
aResourceId 

Definition at line 156 of file aknexpopfieldcontainer.cpp.

References CAknExPopFieldAttribSetDialog::NewLC().

Referenced by CAknExPopFieldView::HandleCommandL().

00157     {
00158     CAknExPopFieldAttribSetDialog* dlg =
00159         CAknExPopFieldAttribSetDialog::NewLC();
00160     CleanupStack::Pop();
00161     dlg->ExecuteLD( aResourceId );
00162     }

void CAknExPopFieldContainer::CreateLabelL (   )  [private]
 

CreateLabelL Creates the label object.

Definition at line 169 of file aknexpopfieldcontainer.cpp.

References iLabel, and SetTextToLabelL().

Referenced by ConstructL().

00170     {
00171     if ( !iLabel )
00172         {
00173         iLabel = new ( ELeave ) CEikLabel;
00174         iLabel->SetContainerWindowL( *this );
00175         iLabel->SetAlignment( EHCenterVCenter );
00176         iLabel->SetFont( LatinBold19() );
00177         }
00178     SetTextToLabelL( R_AKNEXPOPFIELD_TEXT_LABEL_TITLE );
00179     }

TKeyResponse CAknExPopFieldContainer::OfferKeyEventL (  const TKeyEvent &  aKeyEvent,
TEventCode  aType
)  [private]
 

From CCoeControl, OfferKeyEventL. Handles the key events.

Parameters:
aKeyEvent  Key event
aType  Type of event(EEventKey, EEventKeyUp or EEventKeyDown)
Returns:
if key-event consumed, EKeyWasConsumed Else EKeyWasNotConsumed

Definition at line 186 of file aknexpopfieldcontainer.cpp.

References CAknExPopFieldView::DisplayNextOutlineL(), and iView.

00188     {
00189     if ( aType != EEventKey ) // Is not key event?
00190         {
00191         return EKeyWasNotConsumed;
00192         }
00193     switch ( aKeyEvent.iCode ) // The code of key event is...
00194         {
00195         case EKeySpace: // Space key.
00196             // Requires to display next outline screen.
00197             iView->DisplayNextOutlineL();
00198             DrawNow();
00199             break;
00200         default:
00201             return EKeyWasNotConsumed;
00202         }
00203     return EKeyWasConsumed;
00204     }

void CAknExPopFieldContainer::SizeChanged (   )  [private]
 

From CCoeControl, SizeChanged. Object's Size Changed

Definition at line 211 of file aknexpopfieldcontainer.cpp.

References iLabel.

00212     {
00213     iLabel->SetRect( Rect() );
00214     }

TInt CAknExPopFieldContainer::CountComponentControls (   )  const [private]
 

From CCoeControl, CountComponentControls. Returns number of component.

Returns:
Number of controls

Definition at line 221 of file aknexpopfieldcontainer.cpp.

00222     {
00223     // returns nbr of controls inside this container
00224     return KAknExPopFieldCountComponent;
00225     }

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

From CCoeControl, ComponentControl. Returns pointer to particular component.

Returns:
Pointer to Control's component control, identified by index
Parameters:
aIndex  Index of the control

Definition at line 232 of file aknexpopfieldcontainer.cpp.

References iLabel.

00233     {
00234     switch ( aIndex ) // Component is...
00235         {
00236         case EAknExPopFieldComponentLabel: // Label object.
00237             return iLabel;
00238         default: // Exception : returns NULL value.
00239             return NULL;
00240         }
00241     }

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

From CCoeControl, Draw.

Parameters:
aRect  Region of the control to be (re)drawn.

Definition at line 248 of file aknexpopfieldcontainer.cpp.

00249     {
00250     CWindowGc& gc = SystemGc();
00251     gc.SetPenStyle( CGraphicsContext::ENullPen );
00252     gc.SetBrushColor( AKNEXPOPFIELD_BACKGROUND_COLOR);
00253     gc.SetBrushStyle( CGraphicsContext::ESolidBrush );
00254     gc.DrawRect( aRect );
00255     }


Member Data Documentation

CAknExPopFieldView* CAknExPopFieldContainer::iView [private]
 

iView Not Owned by CAknExPopFieldContainer object.

Definition at line 170 of file aknexpopfieldcontainer.h.

Referenced by OfferKeyEventL().

CEikLabel* CAknExPopFieldContainer::iLabel [private]
 

iLabel Owned by CAknExPopFieldContainer object.

Definition at line 176 of file aknexpopfieldcontainer.h.

Referenced by ComponentControl(), CreateLabelL(), SetTextToLabelL(), SizeChanged(), and ~CAknExPopFieldContainer().


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

© Nokia 2009

Back to top