#include <mi32/bidi.h>
Inheritance diagram for BIDISTRING:

Public Types | |
| enum | DIRECTION { DIRECTION_LTR, DIRECTION_RTL } |
| enum | ORDER { ORDER_VISUAL, ORDER_LOGICAL } |
Public Member Functions | |
| BIDISTRING (const UNICODE *source, DIRECTION DefaultDirection=DIRECTION_LTR, ORDER StringOrder=ORDER_LOGICAL) | |
| BIDISTRING () | |
| void | Clear () |
| DIRECTION | GetStringDirection () const |
| UNICODE * | GetStringLogical () const |
| UNICODE * | GetStringVisual () const |
| void | SetStringLogical (const UNICODE *source, DIRECTION DefaultDirection=DIRECTION_LTR, bool bForceDirection=false) |
| void | SetStringVisual (const UNICODE *source, DIRECTION DefaultDirection=DIRECTION_LTR) |
| virtual | ~BIDISTRING () |
Besides flipping the string as necessary, it can also keep track or a cursor position within the string and resolve the logical position of the cursor withing the string while moving in visual order.
Definition at line 68 of file bidi.h.
|
|
|
|
|
|
|
|
|
|
||||||||||||||||
|
Construct with initial values.
|
|
|
|
|
|
Clear the string.
|
|
|
Get the primary direction of the string.
|
|
|
Return a copy of the string in logical order. Caller should free the returned string. |
|
|
Return a copy of the string in visual order. Caller should free the returned string. |
|
||||||||||||||||
|
Set the string from a logical order string. Note: Normally, the directionality of a string is determined by the first strongly directional character in the string. In this case, the DefaultDirection is only used as a fallback, unless bForceDirection is true. |
|
||||||||||||
|
Set the string from a visual order string. Nore: The DefaultDirection is VERY important with a visual order string. This is because it is impossible to tell by looking at a visual order string if it was supposed to be right-to-left or left-to-right. Take the following examples: (assume lowercase letters are left-to-right and capital letters are right to left)
Strings 1 and 2 are right-to-left, 3 and 4 are left to right (based on the first character in the logical order string). Without prior knowledge of the source strings, you can't tell what direction they were by looking at the visual order strings. |
1.3.8-20040913