|
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 |
|
20 #ifndef SCREENGRABBERMAINCONTAINER_H |
|
21 #define SCREENGRABBERMAINCONTAINER_H |
|
22 |
|
23 // INCLUDES |
|
24 #include <coecntrl.h> |
|
25 #include <eiksbobs.h> |
|
26 |
|
27 // FORWARD DECLARATIONS |
|
28 class CEikScrollBarFrame; |
|
29 class CAknsBasicBackgroundControlContext; |
|
30 |
|
31 |
|
32 // CLASS DECLARATION |
|
33 |
|
34 /** |
|
35 * CScreenGrabberMainContainer container control class. |
|
36 * |
|
37 */ |
|
38 class CScreenGrabberMainContainer : public CCoeControl, MCoeControlObserver, MEikScrollBarObserver |
|
39 { |
|
40 public: // Constructors and destructor |
|
41 |
|
42 /** |
|
43 * EPOC default constructor. |
|
44 * @param aRect Frame rectangle for container. |
|
45 */ |
|
46 void ConstructL(const TRect& aRect); |
|
47 |
|
48 /** |
|
49 * Destructor. |
|
50 */ |
|
51 ~CScreenGrabberMainContainer(); |
|
52 |
|
53 public: // New functions |
|
54 |
|
55 void PrintText(const TDesC& aDes); |
|
56 void ClearOutputWindow(); |
|
57 |
|
58 |
|
59 public: // Functions from base classes |
|
60 |
|
61 private: // Functions from base classes |
|
62 |
|
63 void Draw(const TRect& aRect) const; |
|
64 void HandleControlEventL(CCoeControl* aControl,TCoeEvent aEventType); |
|
65 TTypeUid::Ptr MopSupplyObject(TTypeUid aId); |
|
66 |
|
67 public: |
|
68 void HandleResourceChange(TInt aType); |
|
69 void HandleScrollEventL(CEikScrollBar* aScrollBar,TEikScrollEvent aEventType); // From MEikScrollBarObserver |
|
70 |
|
71 private: |
|
72 TKeyResponse OfferKeyEventL(const TKeyEvent& aKeyEvent, TEventCode /*aType*/); |
|
73 |
|
74 private: |
|
75 void UpdateVisualContentL(TBool aScrollToBottom); |
|
76 |
|
77 private: //data |
|
78 CEikScrollBarFrame* iScrollBarFrame; |
|
79 HBufC* iText; |
|
80 const CFont* iFont; |
|
81 HBufC* iWrapperString; |
|
82 CArrayFix<TPtrC>* iWrappedArray; |
|
83 TInt iCurrentLine; |
|
84 TInt iLineCount; |
|
85 TInt iNumberOfLinesFitsScreen; |
|
86 TInt iLeftDrawingPosition; |
|
87 TReal iX_factor; |
|
88 TReal iY_factor; |
|
89 |
|
90 CAknsBasicBackgroundControlContext* iSkinContext; |
|
91 |
|
92 |
|
93 }; |
|
94 |
|
95 #endif |
|
96 |
|
97 // End of File |