1 /* |
|
2 * Copyright (c) 2002 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: Declares container control for application. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef ABOUTCONTAINER_H |
|
20 #define ABOUTCONTAINER_H |
|
21 |
|
22 // INCLUDES |
|
23 #include <coecntrl.h> |
|
24 #include <gdi.h> |
|
25 #include <eiksbobs.h> |
|
26 // FORWARD DECLARATIONS |
|
27 class CEikScrollBarFrame; |
|
28 class CAboutImage; |
|
29 class CFont; |
|
30 class TRect; |
|
31 class TBidiText; |
|
32 class CAknsBasicBackgroundControlContext; |
|
33 #include <gulicon.h> |
|
34 |
|
35 // CLASS DECLARATION |
|
36 |
|
37 /** |
|
38 * CAboutContainer container control class. |
|
39 * |
|
40 */ |
|
41 //About container derived from scrollbarobserver to get events on scrollbar movements |
|
42 class CAboutContainer : public CCoeControl, public MEikScrollBarObserver |
|
43 { |
|
44 public: // Constructors and destructor |
|
45 CAboutContainer(); |
|
46 void ConstructL( const TRect& aRect ); |
|
47 |
|
48 void CalculateL(const TRect& aRect); |
|
49 void HandleResourceChange(TInt aType); |
|
50 /** |
|
51 * From MEikScrollBarObserver |
|
52 */ |
|
53 void HandleScrollEventL(CEikScrollBar* aScrollBar,TEikScrollEvent aEventType); |
|
54 |
|
55 ~CAboutContainer(); |
|
56 |
|
57 private: // from CCoeControl |
|
58 |
|
59 /** |
|
60 * From CCoeControl : Control size is set. |
|
61 */ |
|
62 void SizeChanged(); |
|
63 |
|
64 void Draw( const TRect& aRect ) const; |
|
65 void ActivateL(); |
|
66 TKeyResponse OfferKeyEventL( const TKeyEvent& aKeyEvent, |
|
67 TEventCode aModifiers ); |
|
68 |
|
69 TTypeUid::Ptr MopSupplyObject(TTypeUid aId); |
|
70 private: // new functions |
|
71 |
|
72 void SetTextL( const TDesC& aText , const TInt aItem ); |
|
73 void SetImageL( const TDesC& aFileName, TInt aBitmapId ); |
|
74 void UpdateScrollIndicatorL(); |
|
75 |
|
76 // text wrapping |
|
77 |
|
78 private: // Data |
|
79 |
|
80 CArrayPtr<HBufC>* iText; |
|
81 CArrayPtr<CAboutImage>* iImages; |
|
82 CArrayFixFlat<TInt>* iScreenStarts; |
|
83 TInt iCurrentScreen; |
|
84 TBool iDoNotShowLastLineAgain; |
|
85 CGraphicsContext::TTextAlign iTextAlign; |
|
86 CEikScrollBarFrame* iSBFrame; |
|
87 const CFont* iFont; // not owned |
|
88 TInt iLineWidth; |
|
89 TInt iBaseLineDelta; |
|
90 TInt iTopBaseLineX; |
|
91 TInt iTopBaseLineY; |
|
92 TInt iLinesPerScreen; |
|
93 CAknsBasicBackgroundControlContext* iSkinContext; // skin data |
|
94 CGulIcon* iIcon; |
|
95 |
|
96 // Judge whether scroll bar is dragged. |
|
97 TBool iScrollBarDragged; |
|
98 TInt iNumItem; |
|
99 // Judge the break between "real" about box language and the full OSS texts |
|
100 TBool iBreakFlag; |
|
101 TBool iIsSvg; |
|
102 }; |
|
103 |
|
104 #endif |
|
105 |
|
106 // End of File |
|