|
1 /* |
|
2 * Copyright (c) 2007 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: Responsible for marking capabilities |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef C_FSTEXTVIEWERMARKFACILITY_H |
|
20 #define C_FSTEXTVIEWERMARKFACILITY_H |
|
21 |
|
22 //<cmail> removed __FS_ALFRED_SUPPORT flag |
|
23 //#include <fsconfig.h> |
|
24 //</cmail> removed __FS_ALFRED_SUPPORT flag |
|
25 |
|
26 #include "fstextviewervisualizerdata.h" |
|
27 |
|
28 class CFsTextViewerVisualizer; |
|
29 class CAlfVisual; |
|
30 class CAlfControl; |
|
31 class CAlfBorderBrush; |
|
32 class CFsTextViewerSkinData; |
|
33 |
|
34 class CFsTextViewerMarkFacility : public CBase |
|
35 { |
|
36 public: |
|
37 static CFsTextViewerMarkFacility* NewL( |
|
38 CAlfLayout* aLayout, |
|
39 CAlfControl* aControl, |
|
40 CFsTextViewerVisualizerData* aNavigator, |
|
41 CFsTextViewerSkinData* aSkinData ); |
|
42 ~CFsTextViewerMarkFacility(); |
|
43 void SetHeadOffsetL( TInt aHead ); |
|
44 void SetTailOffsetL( TInt aTail ); |
|
45 void FollowCursorL(); |
|
46 void SetLayout( CAlfLayout* aLayout ); |
|
47 void GetRange( TInt& aBegin, TInt& aEnd ) const; |
|
48 |
|
49 protected: |
|
50 CAlfVisual* CreateMarkVisualL( |
|
51 CAlfVisual* aVisual, |
|
52 TInt aBegin, TInt aEnd ); |
|
53 void UpdateImageVisualL( |
|
54 CAlfVisual* aVisual, |
|
55 CAlfVisual* aBaseVisual ); |
|
56 void UpdateTextVisualL( CAlfVisual* aVisual, |
|
57 CAlfVisual* aBaseVisual, |
|
58 TInt aBegin, TInt aEnd ); |
|
59 |
|
60 private: |
|
61 void ConstructL(); |
|
62 CFsTextViewerMarkFacility( |
|
63 CAlfLayout* aLayout, |
|
64 CAlfControl* aControl, |
|
65 CFsTextViewerVisualizerData* aNavigator, |
|
66 CFsTextViewerSkinData* aSkinData ); |
|
67 |
|
68 private: |
|
69 TInt VisualLength( CAlfVisual* aVisual ); |
|
70 TInt Find( CAlfVisual* aVisual ); |
|
71 CAlfVisual* Find( TInt aOffset ); |
|
72 TInt FindIndex( TInt aOffset ); |
|
73 TInt LocalVisOffset( TInt aGlobalOffset ); |
|
74 void DeleteUnused(); |
|
75 TBool IsHeadVisual( TInt aGlobalOffset ); |
|
76 |
|
77 private: |
|
78 CFsTextViewerVisualizerData* iNavigator; |
|
79 TInt iHead; |
|
80 TInt iTail; |
|
81 CAlfLayout* iLayout; |
|
82 CAlfControl* iControl; |
|
83 RArray<TFsRangedVisual> iVisuals; |
|
84 CAlfBorderBrush* iBorder; |
|
85 CFsTextViewerSkinData* iSkinData; |
|
86 |
|
87 }; |
|
88 |
|
89 #endif //C_FSTEXTVIEWERMARKFACILITY_H |