#include <TUnicodeTextStorage.h>
Public Member Functions | |
| TUnicodeTextStorage () | |
| Default constructor;. | |
| virtual | ~TUnicodeTextStorage () |
| Disposes of the text storage buffer. | |
| bool | ReserveSpace (uint32_t totalCount) |
If this routine returns true, then you can be assured that there is room in the buffer for totalCount number of characters. | |
| unsigned | Count () const |
| Returns the number of characters actually in the buffer. | |
Setters | |
| void | SetString (CFStringRef text) |
| Sets the characters in the buffer. | |
| void | SetText (const UniChar *text, uint32_t count) |
| Sets. | |
Getters | |
| CFStringRef | GetString () |
| const UniChar * | GetText () |
Operators | |
| TUnicodeTextStorage & | operator= (CFStringRef text) |
| operator CFStringRef () | |
| operator UniChar * () | |
| operator const UniChar * () | |
| UniChar & | operator[] (int index) |
Edit operations | |
| void | Delete (uint32_t start, uint32_t count=1) |
| Delets. | |
| void | InsertString (uint32_t position, CFStringRef text) |
| Inserts the given CFStringRef. | |
| void | InsertText (uint32_t position, const UniChar *text, uint32_t count) |
Inserts the given text before the character at position. | |
| void | AppendString (CFStringRef text) |
| void | AppendText (const UniChar *text, uint32_t count) |
Protected Member Functions | |
| void | Allocate (uint32_t characters) |
| Internal method to allocat or reallocate the buffer. | |
Protected Attributes | |
| UniChar * | mStorage |
| The buffer where characters are stored. | |
| uint32_t | mCount |
| Actual number of characters in storage buffer. | |
| uint32_t | mSize |
| Total number of characters that have been allocated. | |
|
|
Default constructor;.
|
|
|
Disposes of the text storage buffer.
|
|
|
Internal method to allocat or reallocate the buffer. The number of characters can be less than the current number of characters in the buffer, in which case they are truncated. |
|
|
|
|
||||||||||||
|
|
|
|
Returns the number of characters actually in the buffer.
|
|
||||||||||||
|
Delets.
|
|
|
|
|
|
|
|
||||||||||||
|
Inserts the given CFStringRef.
|
|
||||||||||||||||
|
Inserts the given text before the character at
So to append text, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
If this routine returns true, then you can be assured that there is room in the buffer for
The previous contents of the buffer will be preserved. If |
|
|
Sets the characters in the buffer. Writes over any previous buffer contents; no data is preserved. |
|
||||||||||||
|
Sets.
|
|
|
Actual number of characters in storage buffer.
|
|
|
Total number of characters that have been allocated.
|
|
|
The buffer where characters are stored.
|
1.4.6