williamr@2: // Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies). williamr@2: // All rights reserved. williamr@2: // This component and the accompanying materials are made available williamr@4: // under the terms of "Eclipse Public License v1.0" williamr@2: // which accompanies this distribution, and is available williamr@4: // at the URL "http://www.eclipse.org/legal/epl-v10.html". williamr@2: // williamr@2: // Initial Contributors: williamr@2: // Nokia Corporation - initial contribution. williamr@2: // williamr@2: // Contributors: williamr@2: // williamr@2: // Description: williamr@2: // williamr@2: williamr@2: #ifndef BIDIVISUAL_H_ williamr@2: #define BIDIVISUAL_H_ williamr@2: williamr@2: #include williamr@2: williamr@2: class TBidiLogicalToVisual williamr@2: /** williamr@2: This class is a low-level class for bi-directionally reordering text. It williamr@2: allows the re-ordering of text using no leaving functions at all, and provides williamr@2: a finer degree of control than TBidiText. However, it should not be used williamr@2: without understanding the basics of the Unicode Bi-directional Reordering williamr@2: Algorithm. williamr@2: @publishedAll williamr@2: @released williamr@2: */ williamr@2: { williamr@2: public: williamr@2: enum {KMinCharAvailable = 4}; williamr@2: williamr@2: IMPORT_C TBidiLogicalToVisual(const TDesC& aText, TBool aRightToLeft, williamr@2: TBidirectionalState::TRunInfo* aRunInfoArray, TInt aRunInfoLength); williamr@2: IMPORT_C TBidiLogicalToVisual(const TDesC& aText, williamr@2: TBidirectionalState::TRunInfo* aRunInfoArray, TInt aRunInfoLength); williamr@2: IMPORT_C TInt Reorder(); williamr@2: IMPORT_C void GetVisualLine(TDes& aLine, TInt aStart, TInt aEnd, williamr@2: TChar aTruncationChar); williamr@2: private: williamr@2: const TDesC& iText; williamr@2: TBool iRightToLeft; williamr@2: TBidirectionalState::TRunInfo* iRunInfoArray; williamr@2: TInt iRunInfoArrayLength; williamr@2: TInt iRuns; williamr@2: TUint32 iSpare2; williamr@2: }; williamr@2: williamr@2: #endif