|
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: Helper class for TextViewer visualizer |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef C_FSTEXTVIEWERCOORDINATOR |
|
20 #define C_FSTEXTVIEWERCOORDINATOR |
|
21 |
|
22 #include <e32base.h> |
|
23 #include <biditext.h> |
|
24 |
|
25 class CFsTextViewerCoordinator : public CBase |
|
26 { |
|
27 public: |
|
28 static CFsTextViewerCoordinator* NewL (); |
|
29 ~CFsTextViewerCoordinator(); |
|
30 |
|
31 public: |
|
32 void RegisterObstacleL( const TRect& aRect ); |
|
33 TBool Contains( const TRect aRect ); |
|
34 void SetSize( const TSize& aSize ); |
|
35 TInt NextFreeCol() const; |
|
36 TBool NextFreeCol( TRect& aRect, TBidiText::TDirectionality aDirection ) const; |
|
37 TBool IsNewLine() const; |
|
38 void SetNewLine(); |
|
39 void RemoveRect( TRect aRect ); |
|
40 void RemoveFromOffset( TInt aOffset ); |
|
41 void Reset(); |
|
42 void SetLeftMargin( TInt aMargin ); |
|
43 void SetRightMargin( TInt aMargin ); |
|
44 |
|
45 private: |
|
46 CFsTextViewerCoordinator(); |
|
47 void ConstructL(); |
|
48 |
|
49 private: |
|
50 CArrayPtrSeg<TRect>* iObstacles; |
|
51 TSize iSize; |
|
52 TInt iLastObstacle; |
|
53 TInt iLeftMargin; |
|
54 TInt iRightMargin; |
|
55 }; |
|
56 |
|
57 #endif // C_FSTEXTVIEWERCOORDINATOR |
|
58 |