equal
deleted
inserted
replaced
31 |
31 |
32 |
32 |
33 class CScrollWindow: public CBase |
33 class CScrollWindow: public CBase |
34 { |
34 { |
35 public: |
35 public: |
36 static CScrollWindow* NewL(CConsoleBase& aConsole); |
36 static CScrollWindow* NewL(CConsoleBase& aConsole, TInt aStartRow, TInt aEndRow); |
37 ~CScrollWindow(); |
37 ~CScrollWindow(); |
38 |
38 |
39 private: |
39 private: |
40 CScrollWindow(CConsoleBase& aConsole); |
40 CScrollWindow(CConsoleBase& aConsole, TInt aStartRow, TInt aEndRow); |
41 void ConstructL(); |
41 void ConstructL(); |
42 |
42 |
43 public: |
43 public: |
44 void Reset(); |
44 void Reset(); |
45 void Update(); |
45 void Update(); |
54 CConsoleBase& iConsole; |
54 CConsoleBase& iConsole; |
55 TLine iTmpLine; |
55 TLine iTmpLine; |
56 |
56 |
57 RArray<TLine> iLineArray; |
57 RArray<TLine> iLineArray; |
58 TInt iPage; |
58 TInt iPage; |
59 static const TInt KPageLength = 8; |
59 const TInt iStartRow; |
|
60 const TInt iEndRow; |
|
61 const TInt iPageLength; |
60 }; |
62 }; |
61 |
63 |
62 |
64 |
63 |
65 |
64 class CDisplay: public MDriveDisplay, public CBase |
66 class CDisplay: public MDriveDisplay, public CBase |
98 void FormatDriveInfoL(const TDriveInfo& aDriveInfo); |
100 void FormatDriveInfoL(const TDriveInfo& aDriveInfo); |
99 void FormatVolumeInfoL(const TVolumeInfo& aVolumeInfo); |
101 void FormatVolumeInfoL(const TVolumeInfo& aVolumeInfo); |
100 |
102 |
101 void CursorHome() const; |
103 void CursorHome() const; |
102 |
104 |
103 private: |
105 void SetFooterPos(TPoint iPos) const; |
|
106 |
|
107 private: |
|
108 static const TInt iFooterX = 0; |
|
109 static const TInt iFooterY = 4; |
|
110 |
104 RFs& iFs; |
111 RFs& iFs; |
105 CConsoleBase& iConsole; |
112 CConsoleBase& iConsole; |
106 |
113 |
|
114 TSize iScreenSize; |
107 TPoint iCursorPos; |
115 TPoint iCursorPos; |
|
116 |
|
117 TPoint iPointFooter; |
108 |
118 |
109 CScrollWindow* iScrollWindow; |
119 CScrollWindow* iScrollWindow; |
110 }; |
120 }; |
111 |
121 |
112 |
122 |
113 inline void CDisplay::CursorHome() const |
123 inline void CDisplay::CursorHome() const |
114 { |
124 { |
115 iConsole.SetPos(iCursorPos.iX, iCursorPos.iY); |
125 iConsole.SetPos(iCursorPos.iX, iCursorPos.iY); |
116 } |
126 } |
117 |
127 |
118 |
128 inline void CDisplay::SetFooterPos(TPoint iPos) const |
|
129 { |
|
130 TPoint pos = iPos + iPointFooter; |
|
131 iConsole.SetPos(pos.iX, pos.iY); |
|
132 } |
119 |
133 |
120 class CMessageKeyProcessor : public CActive |
134 class CMessageKeyProcessor : public CActive |
121 { |
135 { |
122 public: |
136 public: |
123 static CMessageKeyProcessor* NewLC(CDisplay& aDisplay, RUsbOtgSession& aUsbOtgSession); |
137 static CMessageKeyProcessor* NewLC(CDisplay& aDisplay, RUsbOtgSession& aUsbOtgSession); |