1 /* |
|
2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef FILEBROWSERMAINCONTAINER_H |
|
20 #define FILEBROWSERMAINCONTAINER_H |
|
21 |
|
22 // INCLUDES |
|
23 #include <coecntrl.h> |
|
24 #include <aknlists.h> |
|
25 #include <eiklbo.h> |
|
26 |
|
27 // FORWARD DECLARATIONS |
|
28 class CFileBrowserModel; |
|
29 class CEikTextListBox; |
|
30 class CAknSearchField; |
|
31 class CAknNavigationControlContainer; |
|
32 class CAknNavigationDecorator; |
|
33 class CAknIconArray; |
|
34 class CAknInfoPopupNoteController; |
|
35 class CFont; |
|
36 #if(!defined __SERIES60_30__ && !defined __SERIES60_31__ && !defined __S60_32__) |
|
37 class CFileBrowserToolbar; |
|
38 #endif |
|
39 |
|
40 // CLASS DECLARATIONS |
|
41 |
|
42 class CFileBrowserFileListContainer : public CCoeControl, MCoeControlObserver, MEikListBoxObserver |
|
43 { |
|
44 public: |
|
45 void ConstructL(const TRect& aRect); |
|
46 ~CFileBrowserFileListContainer(); |
|
47 |
|
48 private: |
|
49 void SizeChanged(); |
|
50 TInt CountComponentControls() const; |
|
51 CCoeControl* ComponentControl(TInt aIndex) const; |
|
52 void Draw(const TRect& aRect) const; |
|
53 void HandleControlEventL(CCoeControl* aControl,TCoeEvent aEventType); |
|
54 void HandleResourceChange(TInt aType); |
|
55 void HandleListBoxEventL(CEikListBox* aListBox, TListBoxEvent aEventType); // From MEikListBoxObserver |
|
56 void HandlePointerEventL(const TPointerEvent &aPointerEvent); |
|
57 |
|
58 public: |
|
59 TKeyResponse OfferKeyEventL(const TKeyEvent& aKeyEvent, TEventCode /*aType*/); |
|
60 void CreateEmptyNaviPaneLabelL(); |
|
61 void DeleteNaviPane(); |
|
62 void CreateListBoxL(TInt aFileViewMode); |
|
63 TInt CurrentListBoxItemIndex(); |
|
64 const CArrayFix<TInt>* ListBoxSelectionIndexes(); |
|
65 TInt ListBoxSelectionIndexesCount(); |
|
66 TInt ListBoxNumberOfVisibleItems(); |
|
67 CAknIconArray* ListBoxIconArrayL(); |
|
68 void SetListBoxIconArrayL(CAknIconArray* aIconArray); |
|
69 void SetListBoxTextArrayL(CDesCArray* aTextArray); |
|
70 void EnableSearchFieldL(); |
|
71 TBool IsSearchFieldEnabled(); |
|
72 void DisableSearchFieldL(); |
|
73 void SetScreenLayoutL(TInt aLayoutMode); |
|
74 void SetNaviPaneTextL(const TDesC& aText); |
|
75 inline CEikTextListBox* ListBox() { return iListBox; } |
|
76 inline CAknSearchField* SearchField() { return iSearchField; } |
|
77 void HandleSettingsChangeL(); |
|
78 void HideToolbar(); |
|
79 void UpdateToolbar(); |
|
80 |
|
81 private: |
|
82 CFileBrowserModel* iModel; |
|
83 CEikTextListBox* iListBox; |
|
84 CAknSearchField* iSearchField; |
|
85 CAknNavigationControlContainer* iNaviContainer; |
|
86 CAknNavigationDecorator* iNaviDecorator; |
|
87 CAknInfoPopupNoteController* iInfoPopup; |
|
88 TInt iFileViewMode; |
|
89 TPoint iDragStartPoint; |
|
90 TBool iIsDragging; |
|
91 #if(!defined __SERIES60_30__ && !defined __SERIES60_31__ && !defined __S60_32__) |
|
92 CFileBrowserToolbar* iToolbar; |
|
93 #endif |
|
94 }; |
|
95 |
|
96 |
|
97 class CSimpleFileViewListBox : public CAknSingleGraphicStyleListBox |
|
98 { |
|
99 private: |
|
100 ~CSimpleFileViewListBox(); |
|
101 void ReleaseFonts(); |
|
102 void SizeChanged(); |
|
103 void SizeChangedL(); |
|
104 private: |
|
105 CFont* iFont; |
|
106 }; |
|
107 |
|
108 |
|
109 class CExtendedFileViewListBox : public CAknDoubleGraphicStyleListBox |
|
110 { |
|
111 private: |
|
112 ~CExtendedFileViewListBox(); |
|
113 void ReleaseFonts(); |
|
114 void SizeChanged(); |
|
115 void SizeChangedL(); |
|
116 private: |
|
117 CFont* iFont1; |
|
118 CFont* iFont2; |
|
119 }; |
|
120 |
|
121 #endif |
|
122 |
|
123 // End of File |
|