void CRecognizerContainer::ConstructL(const TRect& aRect, CAknView* View, TBool navi)
{
	CALLSTACKITEM_N(_CL("CRecognizerContainer"), _CL("ConstructL"));

	iView=View;
	iNavi=navi;
	iCurrentCodeArray=new RPointerArray<CCodeInfo>;
	iScreenMsgBuf = CEikonEnv::Static()->AllocReadResourceL(R_CODE_SCREEN_MSG);

	if (iNavi) {
		CEikStatusPane* sp=iEikonEnv->AppUiFactory()->StatusPane();
		CAknNavigationControlContainer *np = (CAknNavigationControlContainer *)sp->ControlL(TUid::Uid(EEikStatusPaneUidNavi)); 
		CLocalNotifyWindow* tp=CLocalNotifyWindow::Global();
		np->PushDefaultL(ETrue);	
		HBufC * t = iEikonEnv->AllocReadResourceL(R_CHOOSE_CODE);
		tp->SetTitleText(t);
	} else {
//		CEikStatusPane* sp=iEikonEnv->AppUiFactory()->StatusPane();
		CLocalNotifyWindow* tp=CLocalNotifyWindow::Global();
		tp->SetTitleTextToDefaultL();
	}

	CreateWindowL();

	iStandByLabel = new (ELeave) CEikLabel;
	iStandByLabel->SetContainerWindowL(*this);
	iStandByLabel->SetTextL(_L("Camera Standby\nClick to resume"));
	iStandByLabel->SetAlignment(TGulAlignment(EHCenterVCenter));
	iStandByLabel->SetExtent(TPoint(0,0), TSize(176,144));
	
	SetRect(aRect);
	ActivateL();
}
// ---------------------------------------------------------
// CSecModUIViewBase::DoAddNaviPaneL()
// Creates navi pane text
// ---------------------------------------------------------
//
void CSecModUIViewBase::DoAddNaviPaneL(TInt aResource)
    {
    TUid naviPaneUid;
    naviPaneUid.iUid = EEikStatusPaneUidNavi;
    CEikStatusPane* statusPane = StatusPane();
    CAknNavigationControlContainer* naviPane =
        (CAknNavigationControlContainer*) statusPane->ControlL(naviPaneUid);
    if(!iNaviDecorator)
        {
        // Let's try to create navipane
        CEikStatusPaneBase::TPaneCapabilities subPane =
        statusPane->PaneCapabilities(naviPaneUid);
    
        if (subPane.IsPresent() && subPane.IsAppOwned())
            {
            if (0 != aResource)
                {
                TResourceReader reader;
                iCoeEnv->CreateResourceReaderLC(reader, aResource);

                 // set the navigation pane label
                iNaviDecorator = naviPane->CreateNavigationLabelL(reader);
                CleanupStack::PopAndDestroy();
                }
             else
                {
                iNaviDecorator = naviPane->CreateNavigationLabelL();
                }
            }
        }
    if (iNaviDecorator)
        {
        naviPane->PushL(*iNaviDecorator);
        }
    }
	void DoActivateL(
					 const TVwsViewId& aPrevViewId,TUid /*aCustomMessageId*/,
				const TDesC8& /*aCustomMessage*/)
	{
		CALLSTACKITEM_N(_CL("CDynamicSettingsViewImpl"), _CL("DoActivateL"));
		iIsActivated=ETrue;
		MActiveErrorReporter* rep=AppContext().GetActiveErrorReporter();
		if (rep) rep->SetInHandlableEvent(ETrue);
#ifdef __WINS__
		TInt dummy;
		TBreakItem b(GetContext(), dummy);
#endif
		iPreviousViewId = aPrevViewId;

		{
			CEikStatusPane *sp = StatusPane();
			// Fetch pointer to the default navi pane control
			CAknNavigationControlContainer* naviPane = ( CAknNavigationControlContainer * )
				sp->ControlL( TUid::Uid( EEikStatusPaneUidNavi ) );
			naviPane->PushDefaultL(ETrue);
		}

		if (!iContainer)
			{
				iContainer = CBgContainer::NewL( this, ClientRect() );
				
				if (!iListbox) {
					iListbox = new (ELeave) CAknSettingStyleListBox();
					iListbox->ConstructL( iContainer, EAknListBoxSelectionList );
						//iListbox->SetMopParent( iContainer );
					iListbox->SetContainerWindowL( *iContainer );
					iListbox->CreateScrollBarFrameL( ETrue );
					iListbox->ScrollBarFrame()->SetScrollBarVisibilityL(CEikScrollBarFrame::EOff, 
																		CEikScrollBarFrame::EAuto );
					iListbox->SetListBoxObserver( this );
					iSettingItemArray = new (ELeave) CAknSettingItemArray( 10, EFalse, 0);
					CTextListBoxModel* model = iListbox->Model();
					model->SetItemTextArray( iSettingItemArray );
					model->SetOwnershipType( ELbmDoesNotOwnItemArray );
				} 
			}
		
		UpdateListBoxL();
		
		iContainer->SetContentL( iListbox );

		AppUi()->AddToStackL( *this, iContainer );
		iContainer->SetRect(ClientRect());
		
		// 	CEikStatusPane* sp=iEikonEnv->AppUiFactory()->StatusPane();
		// 	CAknNavigationControlContainer *np = (CAknNavigationControlContainer *)sp->ControlL(TUid::Uid(EEikStatusPaneUidNavi)); 
		// 	np->PushDefaultL();
	
		iContainer->ActivateL();
	}
// ---------------------------------------------------------
// CSettingsView::HandleCommandL(TInt aCommand)
// ?implementation_description
// ---------------------------------------------------------
//
void
CSettingsView::DoDeactivate()
{
   if ( iContainer ){
      AppUi()->RemoveFromViewStack( *this, iContainer );
      LOGDEL(iContainer);
      delete iContainer;
   }
   iContainer = NULL;

   CAknNavigationControlContainer * np = iWayFinderUI->getNavigationControlContainer();
   np->Pop(iTabsDecorator);
   delete iTabsDecorator;
}
// Destructor
CRecognizerContainer::~CRecognizerContainer()
{
	CALLSTACKITEM_N(_CL("CRecognizerContainer"), _CL("~CRecognizerContainer"));

	delete iStandByLabel;
	delete iScreenMsgBuf;

	if (iNavi) {
		CEikStatusPane* sp=iEikonEnv->AppUiFactory()->StatusPane();
		CAknNavigationControlContainer *np = (CAknNavigationControlContainer *)sp->ControlL(TUid::Uid(EEikStatusPaneUidNavi)); 
		np->Pop(NULL);	
	}
	if (owns_bitmap) delete iBitmap;
	delete iVCS;
	delete iCurrentCodeInfo;
	if (iCurrentCodeArray) iCurrentCodeArray->Close();
	delete iCurrentCodeArray;
}
// -----------------------------------------------------------------------------
// CLandmarksInfoContainer::MakeNaviPaneVisibleL
// 
// (other items were commented in a header).
// -----------------------------------------------------------------------------
//
void CLandmarksInfoContainer::MakeNaviPaneVisibleL(TBool aVisible)
    {
    CEikStatusPane* statusPane = iAvkonAppUi->StatusPane();
    CAknNavigationControlContainer* naviPane = 
        (CAknNavigationControlContainer*) statusPane->
            ControlL(TUid::Uid(EEikStatusPaneUidNavi));

    if (!aVisible)
        {
        // Remove tabs from this view's navi pane
        naviPane->Pop(iNaviDecorator);
        }
    else
        {
        // Recreate tabs to this view's navi pane
        naviPane->PushL(*iNaviDecorator);
        }
    }
void CUnRegisterContainer::ConstructL(const TRect& aRect)
    {
    CreateWindowL();

    iLabel = new (ELeave) CEikLabel;
    iLabel->SetContainerWindowL( *this );
	iLabel->SetFont(iEikonEnv->LegendFont());
    iLabel->SetTextL(*(iEikonEnv->AllocReadResourceL(R_PURPLEACE_WEB)));

	CEikStatusPane* statusPane=iEikonEnv->AppUiFactory()->StatusPane();

	TBuf<10> message;
	message.Copy(_L(""));

	CAknNavigationControlContainer* aNaviPane = (CAknNavigationControlContainer *)statusPane->ControlL(TUid::Uid(EEikStatusPaneUidNavi));

	CAknNavigationDecorator* aNaviDecorator = aNaviPane->CreateMessageLabelL(message);

    aNaviPane->PushL(*aNaviDecorator);

	CAknContextPane* cp=(CAknContextPane *)statusPane->ControlL(TUid::Uid(EEikStatusPaneUidContext));

	TBuf<128> path;
	path = CRippleVaultAppUi::ApplicationDriveAndPath();
	path.Append(KRippleImageMbmFileName);

	CFbsBitmap* bitmap = iEikonEnv->CreateBitmapL(path, EMbmRippleimageRippleimage);
	CleanupStack::PushL(bitmap);
	CFbsBitmap* bitmapmask = iEikonEnv->CreateBitmapL(path, EMbmRippleimageRippleimagem);
	CleanupStack::PushL(bitmapmask);
	cp->SetPicture(bitmap, bitmapmask);
	CleanupStack::Pop(); // bitmapmask
	CleanupStack::Pop(); // bitmap
	DrawNow();

	CAknTitlePane* tp=(CAknTitlePane*)statusPane->ControlL(TUid::Uid(EEikStatusPaneUidTitle)); 
    tp->SetTextL(*(iEikonEnv->AllocReadResourceL(R_EXAMPLE_RIPPLE_PUBLISH))); // Set the text string.

	TRect Please(TPoint(0,44),TPoint(176,188));
    SetRect(Please);
    //SetRect(aRect);
    ActivateL();
    }
	void DoDeactivate()
	{
		if (!iIsActivated) {
			iIsActivated=EFalse;
			MActiveErrorReporter* rep=AppContext().GetActiveErrorReporter();
			if (rep) rep->SetInHandlableEvent(ETrue);
		}
		CALLSTACKITEM_N(_CL("CDynamicSettingsViewImpl"), _CL("DoDeactivate"));
		RemoveContainerL();

		{
			CEikStatusPane *sp = StatusPane();
			// Fetch pointer to the default navi pane control
			CAknNavigationControlContainer* naviPane = ( CAknNavigationControlContainer * )
				sp->ControlL( TUid::Uid( EEikStatusPaneUidNavi ) );
			naviPane->Pop();
		}

	}