sl@0: // Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). sl@0: // All rights reserved. sl@0: // This component and the accompanying materials are made available sl@0: // under the terms of "Eclipse Public License v1.0" sl@0: // which accompanies this distribution, and is available sl@0: // at the URL "http://www.eclipse.org/legal/epl-v10.html". sl@0: // sl@0: // Initial Contributors: sl@0: // Nokia Corporation - initial contribution. sl@0: // sl@0: // Contributors: sl@0: // sl@0: // Description: sl@0: // Part of the MVS Application for TechView sl@0: // sl@0: sl@0: #include "MVSMultipleScreenDialog.h" sl@0: #include "MVSApp.hrh" sl@0: sl@0: sl@0: void CMVSMultipleScreenDialog::SetupDialogLD(TInt aScreenNumber,CMVSAppUi* aAppUi) sl@0: { sl@0: CMVSMultipleScreenDialog* dialog = new (ELeave) CMVSMultipleScreenDialog(aScreenNumber, sl@0: aAppUi); sl@0: dialog->ExecuteLD(R_MVS_DIALOG_MULTIPLESCREEN); sl@0: } sl@0: sl@0: sl@0: void CMVSMultipleScreenDialog::PreLayoutDynInitL() sl@0: { sl@0: // Get a downcasted pointer to the controls sl@0: CEikNumberEditor* myScreenControl = static_cast(Control(EMVSCmdMultiScreen)); sl@0: sl@0: //Now seed the controls with appropriate values sl@0: if(myScreenControl) sl@0: { sl@0: myScreenControl->SetNumber(iScreenNumber); sl@0: myScreenControl->SetMinimumAndMaximum(0, ControlEnv()->WsSession().NumberOfScreens() - 1); sl@0: } sl@0: } sl@0: sl@0: sl@0: CMVSMultipleScreenDialog::CMVSMultipleScreenDialog(TInt aScreenNumber, sl@0: CMVSAppUi* aAppUi) sl@0: : iScreenNumber(aScreenNumber),iAppUi(aAppUi) sl@0: { sl@0: } sl@0: sl@0: sl@0: TBool CMVSMultipleScreenDialog::OkToExitL(TInt aButtonId) sl@0: { sl@0: if(aButtonId == EMVSButtonCancel) sl@0: { sl@0: return ETrue; sl@0: } sl@0: sl@0: //set the desired screen for output sl@0: iScreenNumber = static_cast(Control(EMVSCmdMultiScreen))->Number(); sl@0: sl@0: iAppUi->SetOutputScreen(iScreenNumber); sl@0: return ETrue; sl@0: }