williamr@2
|
1 |
// Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
|
williamr@2
|
2 |
// All rights reserved.
|
williamr@2
|
3 |
// This component and the accompanying materials are made available
|
williamr@2
|
4 |
// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
|
williamr@2
|
5 |
// which accompanies this distribution, and is available
|
williamr@2
|
6 |
// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
|
williamr@2
|
7 |
//
|
williamr@2
|
8 |
// Initial Contributors:
|
williamr@2
|
9 |
// Nokia Corporation - initial contribution.
|
williamr@2
|
10 |
//
|
williamr@2
|
11 |
// Contributors:
|
williamr@2
|
12 |
//
|
williamr@2
|
13 |
// Description:
|
williamr@2
|
14 |
//
|
williamr@2
|
15 |
|
williamr@2
|
16 |
#ifndef BIDIVISUAL_H_
|
williamr@2
|
17 |
#define BIDIVISUAL_H_
|
williamr@2
|
18 |
|
williamr@2
|
19 |
#include <bidi.h>
|
williamr@2
|
20 |
|
williamr@2
|
21 |
class TBidiLogicalToVisual
|
williamr@2
|
22 |
/**
|
williamr@2
|
23 |
This class is a low-level class for bi-directionally reordering text. It
|
williamr@2
|
24 |
allows the re-ordering of text using no leaving functions at all, and provides
|
williamr@2
|
25 |
a finer degree of control than TBidiText. However, it should not be used
|
williamr@2
|
26 |
without understanding the basics of the Unicode Bi-directional Reordering
|
williamr@2
|
27 |
Algorithm.
|
williamr@2
|
28 |
@publishedAll
|
williamr@2
|
29 |
@released
|
williamr@2
|
30 |
*/
|
williamr@2
|
31 |
{
|
williamr@2
|
32 |
public:
|
williamr@2
|
33 |
enum {KMinCharAvailable = 4};
|
williamr@2
|
34 |
|
williamr@2
|
35 |
IMPORT_C TBidiLogicalToVisual(const TDesC& aText, TBool aRightToLeft,
|
williamr@2
|
36 |
TBidirectionalState::TRunInfo* aRunInfoArray, TInt aRunInfoLength);
|
williamr@2
|
37 |
IMPORT_C TBidiLogicalToVisual(const TDesC& aText,
|
williamr@2
|
38 |
TBidirectionalState::TRunInfo* aRunInfoArray, TInt aRunInfoLength);
|
williamr@2
|
39 |
IMPORT_C TInt Reorder();
|
williamr@2
|
40 |
IMPORT_C void GetVisualLine(TDes& aLine, TInt aStart, TInt aEnd,
|
williamr@2
|
41 |
TChar aTruncationChar);
|
williamr@2
|
42 |
private:
|
williamr@2
|
43 |
const TDesC& iText;
|
williamr@2
|
44 |
TBool iRightToLeft;
|
williamr@2
|
45 |
TBidirectionalState::TRunInfo* iRunInfoArray;
|
williamr@2
|
46 |
TInt iRunInfoArrayLength;
|
williamr@2
|
47 |
TInt iRuns;
|
williamr@2
|
48 |
TUint32 iSpare2;
|
williamr@2
|
49 |
};
|
williamr@2
|
50 |
|
williamr@2
|
51 |
#endif
|