Qyoto
4.0.5
Qyoto is a C# language binding for Qt
|
The QTextBoundaryFinder class provides a way of finding Unicode text boundaries in a string. More...
Public Types | |
enum | BoundaryReason { EndWord = 2, NotAtBoundary = 0, StartWord = 1 } |
enum | BoundaryType { Grapheme = 0, Line = 2, Sentence = 3, Word = 1 } |
Public Member Functions | |
QTextBoundaryFinder () | |
| |
QTextBoundaryFinder (QTextBoundaryFinder other) | |
| |
QTextBoundaryFinder (QTextBoundaryFinder.BoundaryType type, QChar chars, int length, Pointer< byte > buffer=null, int bufferSize=0) | |
| |
QTextBoundaryFinder (QTextBoundaryFinder.BoundaryType type, string @string) | |
| |
virtual void | CreateProxy () |
new QTextBoundaryFinder.BoundaryReason | BoundaryReasons () |
| |
new bool | IsAtBoundary () |
| |
new bool | IsValid () |
| |
new string | String () |
| |
new void | ToEnd () |
| |
new int | ToNextBoundary () |
| |
new int | ToPreviousBoundary () |
| |
new void | ToStart () |
| |
new QTextBoundaryFinder.BoundaryType | Type () |
| |
new void | Dispose () |
Protected Member Functions | |
QTextBoundaryFinder (System.Type dummy) | |
Protected Attributes | |
SmokeInvocation | interceptor |
Properties | |
new int | Position [get, set] |
| |
virtual System.IntPtr | SmokeObject [get, set] |
The QTextBoundaryFinder class provides a way of finding Unicode text boundaries in a string.
QTextBoundaryFinder allows to find Unicode text boundaries in a string, similar to the Unicode text boundary specification (see http://www.unicode.org/reports/tr29/tr29-11.html).
QTextBoundaryFinder can operate on a QString in four possible modes depending on the value of BoundaryType.
Units of Unicode characters that make up what the user thinks of as a character or basic unit of the language are here called Grapheme clusters. The two unicode characters 'A' + diaeresis do for example form one grapheme cluster as the user thinks of them as one character, yet it is in this case represented by two unicode code points.
Word boundaries are there to locate the start and end of what a language considers to be a word.
Line break boundaries give possible places where a line break might happen and sentence boundaries will show the beginning and end of whole sentences.
The first position in a string is always a valid boundary and refers to the position before the first character. The last position at the length of the string is also valid and refers to the position after the last character.
|
protected |
QtCore.QTextBoundaryFinder.QTextBoundaryFinder | ( | ) |
Constructs an invalid QTextBoundaryFinder object.
QtCore.QTextBoundaryFinder.QTextBoundaryFinder | ( | QTextBoundaryFinder | other | ) |
Copies the QTextBoundaryFinder object, other.
QtCore.QTextBoundaryFinder.QTextBoundaryFinder | ( | QTextBoundaryFinder.BoundaryType | type, |
QChar | chars, | ||
int | length, | ||
Pointer< byte > | buffer = null , |
||
int | bufferSize = 0 |
||
) |
Creates a QTextBoundaryFinder object of type operating on chars with length.
buffer is an optional working buffer of size bufferSize you can pass to the QTextBoundaryFinder. If the buffer is large enough to hold the working data required, it will use this instead of allocating its own buffer.
Warning: QTextBoundaryFinder does not create a copy of chars. It is the application programmer's responsibility to ensure the array is allocated for as long as the QTextBoundaryFinder object stays alive. The same applies to buffer.
QtCore.QTextBoundaryFinder.QTextBoundaryFinder | ( | QTextBoundaryFinder.BoundaryType | type, |
string @ | string | ||
) |
Creates a QTextBoundaryFinder object of type operating on string.
new QTextBoundaryFinder.BoundaryReason QtCore.QTextBoundaryFinder.BoundaryReasons | ( | ) |
Returns the reasons for the boundary finder to have chosen the current position as a boundary.
|
virtual |
new void QtCore.QTextBoundaryFinder.Dispose | ( | ) |
new bool QtCore.QTextBoundaryFinder.IsAtBoundary | ( | ) |
Returns true if the object's position() is currently at a valid text boundary.
new bool QtCore.QTextBoundaryFinder.IsValid | ( | ) |
Returns true if the text boundary finder is valid; otherwise returns false. A default QTextBoundaryFinder is invalid.
new string QtCore.QTextBoundaryFinder.String | ( | ) |
Returns the string the QTextBoundaryFinder object operates on.
new void QtCore.QTextBoundaryFinder.ToEnd | ( | ) |
Moves the finder to the end of the string. This is equivalent to setPosition(string.length()).
See also setPosition() and position().
new int QtCore.QTextBoundaryFinder.ToNextBoundary | ( | ) |
Moves the QTextBoundaryFinder to the next boundary position and returns that position.
Returns -1 if there is no next boundary.
new int QtCore.QTextBoundaryFinder.ToPreviousBoundary | ( | ) |
Moves the QTextBoundaryFinder to the previous boundary position and returns that position.
Returns -1 if there is no previous boundary.
new void QtCore.QTextBoundaryFinder.ToStart | ( | ) |
Moves the finder to the start of the string. This is equivalent to setPosition(0).
See also setPosition() and position().
new QTextBoundaryFinder.BoundaryType QtCore.QTextBoundaryFinder.Type | ( | ) |
Returns the type of the QTextBoundaryFinder.
|
protected |
|
getset |
Returns the current position of the QTextBoundaryFinder.
The range is from 0 (the beginning of the string) to the length of the string inclusive.
Sets the current position of the QTextBoundaryFinder to position.
If position is out of bounds, it will be bound to only valid positions. In this case, valid positions are from 0 to the length of the string inclusive.
|
getset |