|
1 // Copyright (c) 1996-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
2 // All rights reserved. |
|
3 // This component and the accompanying materials are made available |
|
4 // under the terms of the License "Eclipse Public License v1.0" |
|
5 // which accompanies this distribution, and is available |
|
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // f32test\bench\t_select.h |
|
15 // |
|
16 // |
|
17 |
|
18 #if !defined(__T_SELECT_H__) |
|
19 #define __T_SELECT_H__ |
|
20 #if !defined(__E32BASE_H__) |
|
21 #include <e32base.h> |
|
22 #endif |
|
23 #if !defined(__E32SVR_H__) |
|
24 #include <e32svr.h> |
|
25 #endif |
|
26 // |
|
27 |
|
28 class TSelBoxEntry |
|
29 { |
|
30 public: |
|
31 HBufC* iText; |
|
32 TCallBack iCallBack; |
|
33 }; |
|
34 |
|
35 class CSelectionBox : public CBase |
|
36 { |
|
37 public: |
|
38 static CSelectionBox* NewL(CConsoleBase* aConsole); |
|
39 ~CSelectionBox(); |
|
40 void AddDriveSelectorL(RFs aFs); |
|
41 void AddLineL(const TDesC& aText,const TCallBack& aCallBack); |
|
42 void ReplaceTextL(TInt aLine,const TDesC& aText); |
|
43 void Run(); |
|
44 TChar CurrentKeyPress(); |
|
45 TInt CurrentDrive(); |
|
46 private: |
|
47 void Display(); |
|
48 void DisplayHighLight(TBool aOn); |
|
49 TInt PreviousDrive(TInt aDrive); |
|
50 TInt NextDrive(TInt aDrive); |
|
51 void SetDriveName(); |
|
52 void DisplayDrive(); |
|
53 TBool MediaPresent(TInt aDrive); |
|
54 private: |
|
55 CConsoleBase* iConsole; |
|
56 CArrayFixFlat<TSelBoxEntry>* iText; |
|
57 TInt iHighLight; |
|
58 TPoint iTopLeft; |
|
59 TChar iChar; |
|
60 TDriveList iDriveList; |
|
61 TInt iCurrentDrive; |
|
62 RFs iFs; |
|
63 TBool iDriveSelectorPresent; |
|
64 friend TInt ChangeDrives(TAny*); |
|
65 }; |
|
66 |
|
67 #endif |