Nokia N97 SDK
Example Applications Guide

CAudioStreamView Class Reference

#include <AudioStreamView.h>

Inheritance diagram for CAudioStreamView:

List of all members.

Detailed Description

CAudioStreamView container control class.

Definition at line 33 of file AudioStreamView.h.


Public Member Functions

  ~CAudioStreamView ()
void  ShowMessageL (const TDesC &)

Static Public Member Functions

static CAudioStreamView *  NewL (const TRect &aRect, CAudioStreamEngine *aEngine)
static CAudioStreamView *  NewLC (const TRect &aRect, CAudioStreamEngine *aEngine)

Private Member Functions

void  ConstructL (const TRect &aRect, CAudioStreamEngine *aEngine)
  CAudioStreamView ()
void  SizeChanged ()
void  HandleResourceChange (TInt aType)
TInt  CountComponentControls () const
CCoeControl *  ComponentControl (TInt aIndex) const
void  Draw (const TRect &aRect) const
void  HandleControlEventL (CCoeControl *aControl, TCoeEvent aEventType)

Private Attributes

CAudioStreamEngine *  iEngine
CEikLabel *  iLabel


Constructor & Destructor Documentation

CAudioStreamView::~CAudioStreamView (   ) 
 

~CAudioStreamView()

discussion Destroy the object and release all memory objects

Definition at line 84 of file AudioStreamView.cpp.

References iLabel.

00085         {
00086     delete iLabel;
00087     iLabel=NULL;
00088         }

CAudioStreamView::CAudioStreamView (   )  [private]
 

CAudioStreamView()

discussion Perform the first phase of two phase construction

Definition at line 74 of file AudioStreamView.cpp.

Referenced by NewLC().

00074                                   :
00075     iLabel(NULL)
00076         {
00077         }


Member Function Documentation

CAudioStreamView * CAudioStreamView::NewL (  const TRect &  aRect,
CAudioStreamEngine *  aEngine
)  [static]
 

NewL()

discussion Create new CAudioStreamView object, being able to draw itself into aRect

param aRect the rectangle this view will be drawn to param aEngine the engine which core logic is used by this simple view return a pointer to the created instance of CAudioStreamView

Definition at line 23 of file AudioStreamView.cpp.

References NewLC().

Referenced by CAudioStreamAppUi::ConstructL().

00025         {
00026         CAudioStreamView* self = NewLC(aRect, aEngine);
00027         CleanupStack::Pop(self);
00028         return self;
00029         }

CAudioStreamView * CAudioStreamView::NewLC (  const TRect &  aRect,
CAudioStreamEngine *  aEngine
)  [static]
 

NewLC()

discussion Create new CAudioStreamView object, being able to draw itself into aRect

param aRect the rectangle this view will be drawn to return a pointer to the created instance of CAudioStreamView which has also been pushed to cleanup stack

Definition at line 31 of file AudioStreamView.cpp.

References CAudioStreamView().

Referenced by NewL().

00033         {
00034         CAudioStreamView* self = new (ELeave) CAudioStreamView();
00035         CleanupStack::PushL(self);
00036         self->ConstructL(aRect, aEngine);
00037         return self;
00038         }

void CAudioStreamView::ShowMessageL (  const TDesC &   ) 
 

ShowMessageL()

discussion Displays application messages for user

param aMsg text to be displayed

Definition at line 171 of file AudioStreamView.cpp.

References iLabel.

Referenced by CAudioStreamEngine::ShowMessage().

00172         {
00173         iLabel->SetTextL(aMsg);
00174         DrawNow();
00175         }

void CAudioStreamView::ConstructL (  const TRect &  aRect,
CAudioStreamEngine *  aEngine
)  [private]
 

ConstructL()

discussion Perform the second phase construction of a CAudioStreamView object

param aRect Frame rectangle for container.

Definition at line 46 of file AudioStreamView.cpp.

References iEngine, and iLabel.

00048         {
00049         iEngine = aEngine;
00050         // create new window,
00051     CreateWindowL();
00052         // create label to display status to user
00053     iLabel = new (ELeave) CEikLabel;
00054     iLabel->SetContainerWindowL( *this );
00055         #ifndef __SERIES60_3X__
00056                 // The default font is too big in 2nd Edition devices
00057             iLabel->SetFont( LatinBold12() );      
00058         #endif
00059     // set window size
00060     SetRect(aRect);
00061 
00062         _LIT(KInfo, "Audio streaming example\n");
00063     iLabel->SetTextL( KInfo );
00064 
00065     // activate window
00066     ActivateL();    
00067         }

void CAudioStreamView::SizeChanged (   )  [private]
 

From CoeControl,SizeChanged.

Definition at line 95 of file AudioStreamView.cpp.

References iLabel.

00096         {
00097     iLabel->SetRect( Rect() );
00098         }

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

From CoeControl,HandleResourceChange.

Definition at line 105 of file AudioStreamView.cpp.

00106     {
00107     CCoeControl::HandleResourceChange(aType);
00108 
00109     // ADDED FOR SCALABLE UI SUPPORT
00110     // *****************************
00111     if ( aType==KEikDynamicLayoutVariantSwitch )
00112         {
00113         TRect rect;
00114         AknLayoutUtils::LayoutMetricsRect(AknLayoutUtils::EMainPane, rect);
00115         SetRect(rect);
00116         }
00117     }

TInt CAudioStreamView::CountComponentControls (   )  const [private]
 

From CoeControl,CountComponentControls.

Definition at line 123 of file AudioStreamView.cpp.

00124         {
00125     return 1;   // return number of controls inside this container
00126         }

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

From CCoeControl,ComponentControl.

Definition at line 131 of file AudioStreamView.cpp.

References iLabel.

00132         {
00133     switch ( aIndex )
00134                 {
00135         case 0:
00136             return iLabel;
00137         default:
00138             return NULL;
00139             }
00140         }

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

From CCoeControl,Draw.

Definition at line 146 of file AudioStreamView.cpp.

00147         {
00148     CWindowGc& gc = SystemGc();   
00149     gc.SetPenStyle( CGraphicsContext::ENullPen );
00150     gc.SetBrushColor( KRgbWhite );
00151     gc.SetBrushStyle( CGraphicsContext::ESolidBrush );
00152     gc.DrawRect( aRect );
00153         }

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

From MCoeControlObserver Acts upon changes in the hosted control's state.

param aControl the control changing its state param aEventType the type of control event

Definition at line 160 of file AudioStreamView.cpp.

00162         {
00163         }


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

© Nokia 2009

Back to top