sl@0: // Copyright (c) 1996-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 the License "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: // f32test\bench\t_select.h sl@0: // sl@0: // sl@0: sl@0: #if !defined(__T_SELECT_H__) sl@0: #define __T_SELECT_H__ sl@0: #if !defined(__E32BASE_H__) sl@0: #include sl@0: #endif sl@0: #if !defined(__E32SVR_H__) sl@0: #include sl@0: #endif sl@0: // sl@0: sl@0: class TSelBoxEntry sl@0: { sl@0: public: sl@0: HBufC* iText; sl@0: TCallBack iCallBack; sl@0: }; sl@0: sl@0: class CSelectionBox : public CBase sl@0: { sl@0: public: sl@0: static CSelectionBox* NewL(CConsoleBase* aConsole); sl@0: ~CSelectionBox(); sl@0: void AddDriveSelectorL(RFs aFs); sl@0: void AddLineL(const TDesC& aText,const TCallBack& aCallBack); sl@0: void ReplaceTextL(TInt aLine,const TDesC& aText); sl@0: void Run(); sl@0: TChar CurrentKeyPress(); sl@0: TInt CurrentDrive(); sl@0: private: sl@0: void Display(); sl@0: void DisplayHighLight(TBool aOn); sl@0: TInt PreviousDrive(TInt aDrive); sl@0: TInt NextDrive(TInt aDrive); sl@0: void SetDriveName(); sl@0: void DisplayDrive(); sl@0: TBool MediaPresent(TInt aDrive); sl@0: private: sl@0: CConsoleBase* iConsole; sl@0: CArrayFixFlat* iText; sl@0: TInt iHighLight; sl@0: TPoint iTopLeft; sl@0: TChar iChar; sl@0: TDriveList iDriveList; sl@0: TInt iCurrentDrive; sl@0: RFs iFs; sl@0: TBool iDriveSelectorPresent; sl@0: friend TInt ChangeDrives(TAny*); sl@0: }; sl@0: sl@0: #endif