Example #1
0
void COsmo4AppUi::TogglePlaylist()
{
	CEikButtonGroupContainer* cba= CEikButtonGroupContainer::Current();

#ifndef GPAC_GUI_ONLY
	switch (view_mode) {
	case 0:
		RemoveFromStack(iAppView);
		iAppView->ShowHide(0);
		AddToStackL(iPlaylist);
		if (cba) {
			cba->SetCommandSetL(R_AVKON_SOFTKEYS_OPTIONS_BACK);
       		cba->DrawDeferred();	
		}
		view_was_max = StatusPane()->IsVisible() ? 0 : 1;
		if (view_was_max) StatusPane()->MakeVisible(ETrue);
		iPlaylist->ShowHide(1);
		view_mode = 1;
		break;
	case 1:
		RemoveFromStack(iPlaylist);
		iPlaylist->ShowHide(0);
		AddToStackL(iAppView);
		if (cba) {
			cba->SetCommandSetL(R_AVKON_SOFTKEYS_OPTIONS_EXIT);
       		cba->DrawDeferred();	
		}
		iAppView->ShowHide(1);
		if (view_was_max) StatusPane()->MakeVisible(EFalse);
		view_was_max = 0;
		view_mode = 0;
		break;
	}
#endif
}
Example #2
0
void CWordAppUi::CreateEdwinL()
	{
	CGraphicsDevice* device=iCoeEnv->ScreenDevice();
	iAppZoom.SetGraphicsDeviceMap(device);
	iAppZoom.SetZoomFactor(KDefaultZoomState);
	iRichEd=new(ELeave) CWordTextEditor(TGulBorder::ESingleBlack);
	const TInt flags=EEikEdwinOwnsWindow|EEikEdwinKeepDocument|EEikEdwinInclusiveSizeFixed|EEikEdwinUserSuppliedText|
						EEikEdwinNoAutoSelection|EEikEdwinAlwaysShowSelection;
	iRichEd->ConstructL(NULL,0,0,flags);
	iRichEd->SetObserver(this);
	iRichEd->SetEdwinObserver(this);
	iRichEd->CreateScrollBarFrameL();
	iRichEd->ScrollBarFrame()->SetScrollBarVisibilityL(CEikScrollBarFrame::EOff, CEikScrollBarFrame::EAuto);
	iRichEd->SetAdjacent(EGulAdjTop|EGulAdjRight);
	iRichEd->SetZoomFactorL(&iAppZoom);
	//
	SetEdwinL();
	// 
	iTest = CWordTest::NewL(iRichEd->TextView());	
	iTest->TurnOnCustomDrawing(iRichEd->TextLayout());
	iRichEd->ActivateL();
//	iRichEd->SetFocus(ETrue);
	AddToStackL(iRichEd);
	iRichEd->TextView()->SetParagraphFillTextOnly(ETrue);  // call when text view has been initalised
	SetReadOnly(iEmbeddedAndReadOnly);
	}
Example #3
0
void CSmsEgAppUi::CreateConsoleL()
	{
	iConsoleControl=CConsoleControl::NewL();
	AddToStackL(iConsoleControl);
	iConsoleControl->ActivateL();
	iConsoleControl->StartL();
	}
Example #4
0
void CCustomWrapAppUi::ConstructL()
	{
	BaseConstructL();
	iCustomWrapAppControl=new(ELeave) CCustomWrapAppControl;
	iCustomWrapAppControl->ConstructL();
	AddToStackL(iCustomWrapAppControl);
	}
Example #5
0
void CTestView::ConstructL() 
	{
	iControl=new(ELeave) CTestViewControl;
    iControl->ConstructL(ViewId());
	iControl->SetRect(ClientRect());
	AddToStackL(iControl);
	}
void CFileBrowseAppUi::ConstructL()
  {
  CAknAppUi::BaseConstructL(EAknEnableSkin);
  iBaseView = CFileBrowseBaseView::NewL(ClientRect());
  iBaseView->SetMopParent(this);
  AddToStackL(iBaseView);
  }
// ================= MEMBER FUNCTIONS =======================
//
// ----------------------------------------------------------
// CDbtestAppUi::ConstructL()
// ?implementation_description
// ----------------------------------------------------------
//
void CDbtestAppUi::ConstructL()
{
	BaseConstructL();
	iAppContainer = new (ELeave) CDbtestContainer;
	iAppContainer->SetMopParent(this);
	iAppContainer->ConstructL( ClientRect() );

	/*
	transferer=new (ELeave) transfer(CEikonEnv::Static()->FsSession());
	transferer->ConstructL(this);

	bt=new (ELeave) Ctransfer;
	bt->ConstructL(this);

	discoverer=new (ELeave) discover(CEikonEnv::Static()->FsSession());
	discoverer->ConstructL(this);
	*/

	/*
	ftp=CFtp::NewL(*this);
	wap=CWap::NewL(AppContext(), *this);
	*/

	/*
	factory=CMapFactory::NewL(CEikonEnv::Static()->FsSession());
	routes=CRoutes::NewL(factory, 4);

	t=routes_test::NewL(routes, factory, iAppContainer);
	t->run_test();
	*/

	AddToStackL( iAppContainer );
}
Example #8
0
// -----------------------------------------------------------------------------
// CHelloS60AppUi::ConstructL()
// Symbian 2nd phase constructor can leave.
// -----------------------------------------------------------------------------
//
void CHelloS60AppUi::ConstructL()
{
    // Initialise app UI with standard value.
    BaseConstructL(CAknAppUi::EAknEnableSkin);

    // Create view object
    iAppView = CHelloS60AppView::NewL(ClientRect());
    AddToStackL(iAppView);

    // Create a file to write the text to
    TInt err = CCoeEnv::Static()->FsSession().MkDirAll(KFileName);
    if ((KErrNone != err) && (KErrAlreadyExists != err))
    {
        return;
    }

    RFile file;
    err = file.Replace(CCoeEnv::Static()->FsSession(), KFileName, EFileWrite);
    CleanupClosePushL(file);
    if (KErrNone != err)
    {
        CleanupStack::PopAndDestroy(1); // file
        return;
    }

    RFileWriteStream outputFileStream(file);
    CleanupClosePushL(outputFileStream);
    outputFileStream << KText;

    CleanupStack::PopAndDestroy(2); // outputFileStream, file

}
void CTextListScrollAppUi::ConstructL()
    {
    BaseConstructL(ENoAppResourceFile);
    CWsScreenDevice* aScreenDevice = CCoeEnv::Static()->ScreenDevice();
    iTextList = CTextList::NewL(TRect(TPoint(), TSize(aScreenDevice->SizeInPixels())));
    AddToStackL(iTextList);
    }
void CSpaceInvadersAppUi::ConstructL()
{
	// Initialise app UI with standard value.
	BaseConstructL(CAknAppUi::EAknEnableSkin);

	// Create the highscore holder to use highscores
	CSpaceInvadersDocument* ptr = (CSpaceInvadersDocument*)Document();
	iHighscoreHolder            = ptr->Holder();

	TInt error;
	
	// Create the audioplayer
	TRAP(error, iAudioPlayer = CSpaceInvadersAudioPlayer::NewL());
	if( error )
	{
		Exit();
	}
	
	// Create the ship
	TRAP(error, iShip = CShipEngine::NewL(0, 0 ));
	if ( error )
	{
		Exit();
	}

	// Create view objects
	TRAP(error, iAppView = CSpaceInvadersAppView::NewL( ClientRect(),this,iShip,
			                                iHighscoreHolder));
	if ( error )
	{
		Exit();
	}
	
	iAppView->MakeVisible(EFalse);
	
	TRAP(error, iStartMenuView = CSpaceInvadersStartMenuAppView::
								 NewL(ClientRect(), this, iHighscoreHolder) );
	if ( error )
	{
		Exit();
	}
	iStartMenuView->MakeVisible(ETrue);
	
	TRAP(error, iHighscoreView = CSpaceInvadersHighscoreView::
								 NewL(ClientRect(), this, iHighscoreHolder) );
	if ( error )
	{
		Exit();
	}
	iHighscoreView->MakeVisible(EFalse);
	iCurrentView = iStartMenuView;
	
	AddToStackL( iCurrentView );

	// Hiding the status pane
	CEikStatusPane* sp = iEikonEnv->AppUiFactory()->StatusPane();
	sp->MakeVisible(EFalse);

}
Example #11
0
void CPingAppUi::AppViewToStackL()
{
    if (!iAppViewOnStack)
    {
        AddToStackL(iAppView);
        iAppViewOnStack = ETrue;
    }
}
// ================= MEMBER FUNCTIONS =======================
//
// ----------------------------------------------------------
// CFloatingDuckAppUi::ConstructL()
// ----------------------------------------------------------
//
void CFloatingDuckAppUi::ConstructL()
    {
    BaseConstructL();
    iAppContainer = new (ELeave) CFloatingDuckContainer;
    iAppContainer->SetMopParent(this);
    iAppContainer->ConstructL( ClientRect(), this );
    AddToStackL( iAppContainer );
    }
Example #13
0
void CPingAppUi::SettingViewToStackL()
{
    if (!iSettingViewOnStack)
    {
        AddToStackL(iSettingView);
        iSettingViewOnStack = ETrue;
    }
}
Example #14
0
// ================= MEMBER FUNCTIONS =======================
//
// ----------------------------------------------------------
// CLensFlareAppUi::ConstructL()
// ----------------------------------------------------------
//
void CLensFlareAppUi::ConstructL()
    {
    BaseConstructL();
    iAppContainer = new (ELeave) CLensFlareContainer;
    iAppContainer->SetMopParent(this);
    iAppContainer->ConstructL( ClientRect(), this );
    AddToStackL( iAppContainer );
    }
void CMultipleSurfacesAppUi::ConstructL()
    {
	// Create app framework
	CEikAppUi::BaseConstructL(ENoAppResourceFile);
	iAppView = new(ELeave) CMultipleSurfacesAppView(*this);
	iAppView->ConstructL(ClientRect());
	AddToStackL(iAppView);
	iAppView->ActivateL();
    }
// ---------------------------------------------------------------------------
// ConstructL is called by the application framework.
// ---------------------------------------------------------------------------
//
void CHierarchicalColumnListAppUi::ConstructL()
    {
    BaseConstructL( EAknEnableSkin | EAknEnableMSK );

    iAppView = CHierarchicalColumnListAppView::NewL( ClientRect() ); 
    iAppView->SetMopParent( this );

    AddToStackL( iAppView );
    }
// ================= MEMBER FUNCTIONS =======================
//
// ----------------------------------------------------------
// CCertSaverAppUi::ConstructL()
// Epoc second phase constructor.
// ----------------------------------------------------------
//
void CCertSaverAppUi::ConstructL()
    {
    BaseConstructL( EAknEnableSkin | EAknEnableMSK );

    iContainer = new( ELeave ) CCertSaverContainer();
    iContainer->ConstructL( ClientRect() );
    iContainer->SetMopParent( this );
    AddToStackL( iContainer );
    }
//Standard Implementation	
void CTConeInvalidateAppUi::ConstructL()
	{
	CTestCoeAppUi::ConstructL();
	
    iViewControl=new(ELeave) CTestRectBackground;
    iViewControl->ConstructL();
    AddToStackL(iViewControl);
	AutoTestManager().StartAutoTest();	
	}
// ================= MEMBER FUNCTIONS =======================
//
// ----------------------------------------------------------
// CRTEAppUi::ConstructL()
//
// ----------------------------------------------------------
//
void CRTEAppUi::ConstructL()
    {

   	BaseConstructL(EAknEnableSkin);

    iAppContainer = new (ELeave) CRTEContainer;
    iAppContainer->SetMopParent(this);
    iAppContainer->ConstructL( ClientRect() );
    AddToStackL( iAppContainer );
    }
void CHlpAppUi::ConstructL()
	{
    BaseConstructL();

	iView = new(ELeave) CHlpMainView(*this, Document().Model());
	iView->ConstructL();
	iView->SetRect(ClientRect());

	AddToStackL(iView);
	}
Example #21
0
/*
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
*/
void CMgAppUi::ConstructL()
{
	BaseConstructL(CAknAppUi::EAknEnableSkin);
	
	iMainContainer = new(ELeave)CMainContainer(Cba());

	AddToStackL(iMainContainer);
	iMainContainer->SetMopParent(this);
	iMainContainer->ConstructL();
}
Example #22
0
void CExampleShellAppUi::ConstructL()
	{
	BaseConstructL();
	iModel = ((CExampleShellDocument*) iDocument)->Model();
	iContainer = new (ELeave) CExampleShellContainer;
	iContainer->ConstructL(ClientRect(), iModel);
	iContainer->NotifyStatus(KTxtInitialized);
	// add container to stack; enables key event handling.
	AddToStackL(iContainer);
	}
// ---------------------------------------------------------------------------
// From class CAknAppUi.
// Handles foreground event.
// ---------------------------------------------------------------------------
//
void CHierarchicalColumnListAppUi::HandleForegroundEventL( TBool aForeground )
    {
    if ( aForeground )
        {
        AddToStackL( iAppView );
        }
    else
        {
        RemoveFromStack( iAppView );
        }
    }
// ================= MEMBER FUNCTIONS ========================================
//
// ---------------------------------------------------------------------------
// CFriendlyNameAppUi::ConstructL()
// Default EPOC constructor.
// ---------------------------------------------------------------------------
//
void CFriendlyNameAppUi::ConstructL()
    {
    BaseConstructL(EAknEnableSkin);

    iAppContainer = new (ELeave) CFriendlyNameContainer;
    iAppContainer->SetMopParent(this);
    iAppContainer->ConstructL(ClientRect());
    AddToStackL(iAppContainer);

    TRAPD(err, GetNameL());
    }
Example #25
0
// -----------------------------------------------------------------------------
// CEPongAppUi::ConstructL()
// Symbian 2nd phase constructor can leave.
// -----------------------------------------------------------------------------
//
void CEPongAppUi::ConstructL()
	{
	// Initialise app UI with standard value.
	BaseConstructL(EAppOrientationLandscape | CAknAppUi::EAknEnableSkin);
	// Create view object
	iAppView = EpocGameEngine::NewL(ClientRect());
	// @TODO TVwsViewId viewId;
	//if(!GetActiveViewId(viewId))
	iAppView->SetMopParent(this);
	AddToStackL(iAppView);
	}
Example #26
0
//////////////////////////////////////////////////////////////////////////////
//
// -----> CExampleAppUi (implementation)
//
//////////////////////////////////////////////////////////////////////////////
void CExampleAppUi::ConstructL()
	{
	// Allow base class (CEikAppUi) to perform necessary construction
	BaseConstructL();
	// Construct the CMainWinControl which forms the main view
	// for this application.
	iMainWinControl = new (ELeave) CMainWinControl;
	iMainWinControl->ConstructL(ClientRect());
	// The main window is added to the control stack (for key event
	// handling).	
	AddToStackL(iMainWinControl);
	}
// -----------------------------------------------------------------------------
// CChoiceListExAppUi::ConstructL()
// Symbian 2nd phase constructor can leave.
// -----------------------------------------------------------------------------
//
void CChoiceListExAppUi::ConstructL()
    {
    BaseConstructL( EAknEnableSkin );
    
    iAppContainer = new ( ELeave ) CChoiceListExContainer();
    iAppContainer->SetMopParent( this );
    iAppContainer->ConstructL( ClientRect() );
    
    iMenuFlags.ClearAll();
    
    AddToStackL( iAppContainer );
    }
// ================= MEMBER FUNCTIONS =======================
//
// ----------------------------------------------------------
// CFepSetupAppUi::ConstructL()
// ?implementation_description
// ----------------------------------------------------------
//
void CFepSetupAppUi::ConstructL()
    {
#ifdef __SERIES60_3X__
    BaseConstructL(EAknEnableSkin);
#else
    BaseConstructL(KEnableSkinFlag);
#endif
    iAppContainer = new (ELeave) CFepSetupContainer;
    iAppContainer->SetMopParent(this);
    iAppContainer->ConstructL( ClientRect() );
    AddToStackL( iAppContainer );
    }
Example #29
0
// -----------------------------------------------------------------------------
// Cosmo4AppUi::ConstructL()
// Symbian 2nd phase constructor can leave.
// -----------------------------------------------------------------------------
//
void COsmo4AppUi::ConstructL()
{
    // Initialise app UI with standard value.
    BaseConstructL(CAknAppUi::EAknEnableSkin);

    /*Create display*/
    iAppView = COsmo4AppView::NewL( ClientRect() );
	AddToStackL(iAppView);

	/*create playlist*/
#ifndef GPAC_GUI_ONLY
	iPlaylist = CPlaylist::NewL( ClientRect(), iAppView->GetUser() );

	iPlaylist->MakeVisible(EFalse);
#endif
	
	iAppView->MakeVisible(ETrue);
	view_mode = 0;

	m_title = NULL;

	//StatusPane ()->SwitchLayoutL ( R_AVKON_STATUS_PANE_LAYOUT_SMALL );

	nb_keys = 0;
	CaptureKeys(1);



	CCommandLineArguments *args = CCommandLineArguments::NewL();
#ifndef GPAC_GUI_ONLY
	if (args->Count() > 1) {
		TPtrC url = args->Arg(1);
#if defined(_UNICODE)
		char szURL[1024];
		u16 szURLUTF16[1024];
		size_t len;
		len = url.Size();
		memcpy(szURLUTF16, url.Ptr(), sizeof(u8)*len);
		szURLUTF16[len/2] = 0;
		const u16 *sptr = szURLUTF16;
		len = gf_utf8_wcstombs(szURL, 512, &sptr);
		if (len != (size_t) -1) {
			szURL[len] = 0;
			iAppView->Connect((const char *)szURL);
		}
#else
		iAppView->Connect((const char *)url.Ptr());
#endif
	}
#endif
	delete args;
}
// ================= MEMBER FUNCTIONS =======================
//
// ----------------------------------------------------------
// CLbsReferenceAppUi::ConstructL()
// Symbian OS two phased constructor
// ----------------------------------------------------------
//
void CLbsReferenceAppUi::ConstructL()
    {
    // Perform the base class construction
    BaseConstructL(EAknEnableSkin);

    //Create container
    iAppContainer = new (ELeave) CLbsReferenceContainer;
    iAppContainer->SetMopParent(this);
    iAppContainer->ConstructL( ClientRect() );

    // Allow the appview to receive keyboard input
    AddToStackL( iAppContainer );
    }