os/kernelhwsrv/kerneltest/f32test/bench/t_select.h
changeset 0 bde4ae8d615e
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/os/kernelhwsrv/kerneltest/f32test/bench/t_select.h	Fri Jun 15 03:10:57 2012 +0200
     1.3 @@ -0,0 +1,67 @@
     1.4 +// Copyright (c) 1996-2009 Nokia Corporation and/or its subsidiary(-ies).
     1.5 +// All rights reserved.
     1.6 +// This component and the accompanying materials are made available
     1.7 +// under the terms of the License "Eclipse Public License v1.0"
     1.8 +// which accompanies this distribution, and is available
     1.9 +// at the URL "http://www.eclipse.org/legal/epl-v10.html".
    1.10 +//
    1.11 +// Initial Contributors:
    1.12 +// Nokia Corporation - initial contribution.
    1.13 +//
    1.14 +// Contributors:
    1.15 +//
    1.16 +// Description:
    1.17 +// f32test\bench\t_select.h
    1.18 +// 
    1.19 +//
    1.20 +
    1.21 +#if !defined(__T_SELECT_H__)
    1.22 +#define __T_SELECT_H__
    1.23 +#if !defined(__E32BASE_H__)
    1.24 +#include <e32base.h>
    1.25 +#endif
    1.26 +#if !defined(__E32SVR_H__)
    1.27 +#include <e32svr.h>
    1.28 +#endif
    1.29 +//
    1.30 +
    1.31 +class TSelBoxEntry
    1.32 +	{
    1.33 +public:
    1.34 +	HBufC* iText;
    1.35 +	TCallBack iCallBack;
    1.36 +	};
    1.37 +
    1.38 +class CSelectionBox : public CBase
    1.39 +	{
    1.40 +public:
    1.41 +	static CSelectionBox* NewL(CConsoleBase* aConsole);
    1.42 +	~CSelectionBox();
    1.43 +	void AddDriveSelectorL(RFs aFs);
    1.44 +	void AddLineL(const TDesC& aText,const TCallBack& aCallBack);
    1.45 +	void ReplaceTextL(TInt aLine,const TDesC& aText);
    1.46 +	void Run();
    1.47 +	TChar CurrentKeyPress();
    1.48 +	TInt CurrentDrive();
    1.49 +private:
    1.50 +	void Display();
    1.51 +	void DisplayHighLight(TBool aOn);
    1.52 +	TInt PreviousDrive(TInt aDrive);
    1.53 +	TInt NextDrive(TInt aDrive);
    1.54 +	void SetDriveName();
    1.55 +	void DisplayDrive();
    1.56 +	TBool MediaPresent(TInt aDrive);
    1.57 +private:
    1.58 +	CConsoleBase* iConsole;
    1.59 +	CArrayFixFlat<TSelBoxEntry>* iText;
    1.60 +	TInt iHighLight;
    1.61 +	TPoint iTopLeft;
    1.62 +	TChar iChar;
    1.63 +	TDriveList iDriveList;
    1.64 +	TInt iCurrentDrive;
    1.65 +	RFs iFs;
    1.66 +	TBool iDriveSelectorPresent;
    1.67 +friend TInt ChangeDrives(TAny*);
    1.68 +	};
    1.69 +
    1.70 +#endif