This sections contains functions and macros used by part handlers for manipulating international text (IText) structures.
The following lists the IText functions and macros in alphabetic order.
This function creates a copy of the specified IText structure.
Signature
#include <IText.h> ODIText *CopyIText (ODIText *original) |
Parameters
Returns
This function creates a copy of the specified IText structure.
Signature
#include <IText.h> ODIText *CopyITextStruct (ODIText *original) |
Parameters
Returns
This function creates an IText structure from the specified buffer of characters.
Signature
#include <IText.h> ODIText *CreateIText (ODScriptCode theScriptCode, ODLangCode theLangCode, ODUByte *text, ODSize *textLength) |
Parameters
Returns
Remarks
This function is used for text that is neither a C string or a Pascal string.
This function creates an IText structure of a specified length.
Signature
#include <IText.h> ODIText *CreateITextClear (ODScriptCode theScriptCode, ODLangCode theLangCode, ODSize stringLength) |
Parameters
Returns
Remarks
There is an overloaded C++ function call, CreateIText that performs the same function.
This function creates an IText structure from the specified null-terminated string.
Signature
#include <IText.h> ODIText *CreateITextCString (ODScriptCode theScriptCode, ODLangCode theLangCode, char *text) |
Parameters
Returns
Remarks
There is an overloaded C++ function call, CreateIText that performs the same function.
This function creates an IText structure from a C char pointer. The current code page becomes the script code.
Signature
#include <IText.h> ODIText *CreateITextFromCharPtr (char *text&) |
Parameters
Returns
This function creates an IText structure from a specified array of 255 characters.
Signature
#include <IText.h> ODIText *CreateITextPString (ODScriptCode theScriptCode, ODLangCode theLangCode, StringPtr text) |
Parameters
Returns
Remarks
These is an overloaded C++ function call, CreateIText that performs the same function.
This function frees memory of an IText structure.
Signature
#include <IText.h> void DisposeIText (ODIText *iText) |
Parameters
Returns
This macro frees the memory of an IText structure.
Signature
#include <IText.h> void DisposeITextStruct (ODIText *iText) |
Parameters
Returns
This function returns a pointer to a null-terminated character string in an IText structure.
Signature
#include <IText.h> char *GetCStringFromIText (ODIText *iText) |
Parameters
Returns
This function returns the script code (the code page) for the specified IText structure.
Signature
#include <IText.h> GetITextScriptCode (ODIText *iText) |
Parameters
Returns
This function returns an array of characters from the specified IText structure.
Signature
#include <IText.h> StringPtr GetPStringFromIText (ODIText *iText) |
Parameters
Returns
This function returns a pointer to the null-terminated character string of the specified IText structure.
Signature
#include <IText.h> char *GetITextCString (ODIText *iText, char *cstring) |
Parameters
Returns
Remarks
There are overloaded C++ function calls, GetITextString and GetCStringFromIText, that perform the same function.
This function returns the language code for the specified IText structure.
Signature
#include <IText.h> ODLangCode GetITextLangCode (ODIText *iText) |
Parameters
Returns
This function returns the array of characters from the specified IText structure.
Signature
#include <IText.h> char *GetITextPString (ODIText *iText, Str255 pstring) |
Parameters
Returns
Remarks
There are overloaded C++ function calls, GetITextString and GetCStringFromIText, that perform the same function.
This function returns an array of characters from the specified IText structure.
Signature
#include <IText.h> StringPtr GetITextPStringFromIText (ODIText *iText) |
Parameters
Returns
This function returns a pointer to a byte array in the IText structure.
Signature
#include <IText.h> char *GetITextPtr (ODIText *iText) |
Parameters
Returns
This function returns the length of the character string in the specified IText structure.
Signature
#include <IText.h> ODULong GetITextStringLength (ODIText *iText) |
Parameters
Returns
This function sets the size of the byte-array buffer in the specified IText structure. If the input values are null, this function creates and returns a new ODIText structure.
Signature
#include <IText.h> ODIText *SetITextBufferSize (ODIText *iText, ODSize bufferSize, ODBoolean preserveContents) |
Parameters
kODTrue | The content of the byte array should be preserved. |
kODFalse | The content of the byte array should not be preserved. |
Returns
This function sets the value of the IText structure from the specified null-terminated character string. The byte array in the IText structure is automatically extended to fit the string.
Signature
#include <IText.h> void SetITextCString (ODIText *iText, char *text) |
Parameters
Returns
None
Remarks
There is an overloaded C++ function call, SetITextString, that performs the same function.
This function sets the script code for the specified IText structure.
Signature
#include <IText.h> void SetITextScriptCode (ODIText *iText, ODScriptCode scriptCode) |
Parameters
Returns
This function sets the language code for the specified IText structure.
Signature
#include <IText.h> void SetITextLangCode (ODIText *iText, ODLangCode theLangCode) |
Parameters
Returns
This function sets the value of the IText structure to the specified array of 255 characters.
Signature
#include <IText.h> void SetITextPString (ODIText *iText, StringPtr text) |
Parameters
Returns
None.
Remarks
There is an overloaded C++ function call, SetITextString, that performs the same function.
This function sets the length of the specified IText structure.
Signature
#include <IText.h> ODIText *SetITextStringLength (ODIText *iText, ODSize length, ODBoolean preserveText) |
Parameters
kODTrue | The content of the byte array should be preserved. |
kODFalse | The content of the byte array should not be preserved. |
Returns
Remarks
There is an overloaded C++ function call, CreateItext, that performs the same function.
This function sets the value of the IText structure to the specified buffer. The byte array of the IText structure is automatically extended to fit the buffer.
Signature
#include <IText.h> void SetITextText (ODIText *iText, ODUByte *text, ODSize textLength) |
Parameters
Returns
None.