|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
ResultReturns one of the ControlStyleType constants. CompatibilityImplemented only in the PalmOSGlue library.
|
-> fldP | A pointer to a FieldType structure. |
-> lineNum | The number of the visible line in the field about which you want to retrieve information. Lines are numbered starting at 0. |
<- startP | The byte offset into the FieldType's text field of the first character displayed by this line. If the line is blank, start is equal to the length of the field's text string. |
<- lengthP | The length in bytes of the portion of the string displayed on this line. If the line is blank, the length is 0. |
Returns true if startP and endP contain valid values, or false if the field is a single-line field or does not contain a line numbered lineNum.
Implemented only in the PalmOSGlue library.
Return the font ID of a default font.
FontID FntGlueGetDefaultFontID ( FontDefaultType inFontType)
-> inFontType | A FontDefaultType constant specifying one of the system default fonts. This value can be one of the following: |
defaultSystemFont | The default font for the system. |
defaultLargeFont | The default large font. |
defaultSmallFont | The default small font. |
defaultBoldFont | The default bold font. |
Use this function whenever you need to obtain a font ID for one of the system default fonts. The default fonts (and thus, the IDs for the default fonts) vary depending on the system's locale. For example, Japanese systems have a different set of default fonts than systems using the Latin character encoding.
Use this function in place of the constants that specify the IDs of default fonts, as shown in the following table.
Note that defaultSystemFont and defaultSmallFont might return the same font ID or different font IDs, depending on the system locale.
Implemented only in the PalmOSGlue library.
FontSelect, FntGetFont, FntSetFont
Returns whether an object in a form has been hidden.
FrmGlueGetObjectUsable (const FormType *formP, UInt16 objIndex)
-> formP | A pointer to a FormType structure. |
-> objIndex | The index of the object on the form. |
Returns true if the object is usable, meaning that it is considered part of the user interface. Returns false if the object is not usable. Objects that are not usable never appear on the screen. The function FrmHideObject clears an object's usable bit to hide that the object.
Implemented only in the PalmOSGlue library.
Return the address of a Text Manager function or of its PalmOSGlue equivalent.
void *IntlGlueGetRoutineAddress (IntlSelector selector, const void *latinSymbol)
-> selector | One of the routine selectors defined in IntlMgr.h. |
-> latinSymbol | The corresponding TxtLatinfunc symbol defined in IntlGlue.h. |
Returns the address of the native Palm OS function if it is defined. If the function is not defined, it returns the address of the corresponding PalmOSGlue function.
Use IntlGlueGetRoutineAddress for performance reasons. You can use the address that it returns to call the function at that address without having to go through the International Manager's trap dispatch table. IntlGlueGetRoutineAddress is mostly useful for optimizing the performance of Text Manager functions that are called in a tight loop.
To call IntlGlueGetRoutineAddress, you must pass both the international trap for the function and the corresponding symbol. For example, to obtain the address of the TxtGetNextChar function or of its PalmOSGlue equivalent, you would make this call:
myTxtGetNextChar = IntlGlueGetRoutineAddress(intlTxtGetNextChar, TxtLatinGetNextChar);
The returned address is only valid while your application stays locked in memory. For this reason, you should only use the returned address up to the point where your application terminates. When the application starts up again, you should call IntlGlueGetRoutineAddress again.
Implemented only in the PalmOSGlue library.
Macro that indicates if a given trap exists on the current system.
-> trapNum | One of the system trap constants. |
Returns true if the current operating system defines the system trap trapNum, or false if the trap does not exist on that version of the operating system.
Implemented only in the PalmOSGlue library.
Return whether a character is a virtual character or not.
Boolean TxtGlueCharIsVirtual(UInt16 inModifiers, WChar inChar)
-> inModifiers | The value passed in the modifiers field of the keyDownEvent. |
-> inChar | A character. |
Returns true if the character inChar is a virtual character, false otherwise.
Virtual characters are nondisplayable characters that trigger special events in the operating system, such as displaying low battery warnings or displaying the keyboard dialog. Virtual characters should never occur in any data and should never appear on the screen.
Starting in Palm OS 3.1, the command modifier bit is always set in the keyDownEvent for a virtual character because the range for virtual characters overlaps the range for "real" characters that should appear on the screen. Earlier releases of the operating system did not always set the command modifier for virtual characters.
You can use this function to test whether a character is virtual or not. Pass the chr and modifiers fields exactly as you received them in the keyDownEvent, and this function performs the appropriate check based on the operating system version.
Implemented only in the PalmOSGlue library.
Return the horizontal ellipsis character.
WChar TxtGlueGetHorizEllipsisChar (void)
None. |
Returns the character code for horizontal ellipsis.
Versions 3.1 and higher of the Palm OS use different character codes for the horizontal ellipsis character and the numeric space character than earlier versions did. Use TxtGlueGetHorizEllipsisChar to return the appropriate code for horizontal ellipsis regardless of which version of Palm OS your application is run on.
Implemented only in the PalmOSGlue library.
ChrHorizEllipsis, TxtGlueGetNumericSpaceChar
Return the numeric space character.
WChar TxtGlueGetNumericSpaceChar (void)
None. |
Returns the character code for numeric space.
Versions 3.1 and higher of the Palm OS use different character codes for the horizontal ellipsis character and the numeric space character than earlier versions did. Use TxtGlueGetNumericSpaceChar to return the appropriate code for numeric space regardless of which version of Palm OS your application is run on.
Implemented only in the PalmOSGlue library.
ChrNumericSpace, TxtGlueGetHorizEllipsisChar
Convert a character to lowercase.
WChar TxtGlueLowerChar (WChar inChar)
-> inChar | A character. |
Returns the character as a lowercase letter.
This function does not handle the case in which the lowercase version of a character is represented by two or more characters. If you need to handle this situation, call the TxtGlueLowerStr function instead of this one.
Implemented only in the PalmOSGlue library.
TxtGlueUpperChar, TxtGlueLowerStr, TxtGlueUpperStr, TxtGlueTransliterate, TxtTransliterate, StrToLower
Convert a string to all lowercase letters.
void TxtGlueLowerStr (Char* ioString, UInt16 inMaxLength)
<-> ioString | The string to be converted. |
-> inMaxLength | The size of the buffer that contains the string, excluding the terminating NULL character. |
Returns in ioString the input string with its letters converted to lowercase.
Converting a string from uppercase to lowercase letters or vice versa may change the size of the string. For this reason, you should always check the size of the ioString after this call returns.
You must make sure that the parameter ioString points to the start of a a valid character. That is, it must point to the first byte of a multi-byte character or it must point to a single-byte character. If it doesn't, results are unpredictable.
This function can only handle characters in the ISO Latin 1 character encoding unless the International Feature Set is present.
Implemented only in the PalmOSGlue library.
TxtGlueUpperStr, TxtGlueLowerChar, TxtGlueUpperChar, StrToLower TxtGlueTransliterate, TxtTransliterate
Set up for TxtFindString or FindStrInStr.
void TxtGluePrepFindString (const Char* inSource, CharPtr outDest, UInt16 inDstSize)
-> inSource | Pointer to the text to be searched for. Must not be NULL. |
<- outDest | The same text as in inSource but converted to a suitable format for searching. outDest must not be the same address as inSource. |
-> inDstSize | The length in bytes of the area pointed to by outDest. |
Returns in outDest an appropriately converted string.
Use this function to normalize the string to search for before using TxtGlueFindString, TxtFindString, or FindStrInStr to perform a search that is internal to your application. If you use any of these three search routines in response to the sysAppLaunchCmdFind launch code, the string that the launch code passes in is already properly normalized for the search.
This function normalizes the string to be searched for. The method by which a search string is normalized varies depending on the version of Palm OS and the character encoding supported by the device.
Only inDstSize bytes of inSource are written to outDest. If necessary to prevent overflow of the destination buffer, not all of inSource is converted.
You must make sure that the parameter inSource points to the start of a valid character. That is, it must point to the first byte of a multi-byte character or it must point to a single-byte character. If it doesn't, results are unpredictable.
Implemented only in the PalmOSGlue library.
Strip trailing and/or leading spaces from a string.
Char* TxtGlueStripSpaces (Char* ioStr, Boolean leading, Boolean trailing)
<-> ioStr | Any string. |
-> leading | If true, strip the leading spaces from the string. |
-> trailing | If true, strip the trailing spaces from the string. |
Returns ioStr with the specified spaces stripped from it. Note that this function both changes the ioStr buffer parameter and returns a pointer to it.
You must make sure that the parameter ioStr points to the start of a a valid character. That is, it must point to the first byte of a multi-byte character or it must point to a single-byte character. If it doesn't, results are unpredictable.
Implemented only in the PalmOSGlue library.
Determine if a string can be displayed in a given number of pixels. If not, truncate the string.
Boolean TxtGlueTruncateString (Char *ioStringP, UInt16 inMaxWidth)
<-> ioStringP | A null-terminated string. Upon return, the string is truncated if necessary so that it can be displayed in inMaxWidth pixels. |
-> inMaxWidth | The maximum width in pixels. |
Returns true if the string was truncated, or false if the string can fit without truncation.
This function determines whether ioStringP can be displayed in the specified width without being truncated. If it can, TxtGlueTruncateString returns false. If the string must be truncated, this function truncates the string to one less than the number of characters that can fit in inMaxWidth and then appends an ellipsis (...) character. (If the boundary characters are narrower than the ellipsis, more than one character may be dropped to make room). If inMaxWidth is narrower than the width of an ellipsis, the string is set to the empty string.
Implemented only in the PalmOSGlue library.
FntWidthToOffset, WinDrawTruncChars, TxtGetTruncationOffset
Convert a character to uppercase.
WChar TxtGlueUpperChar (WChar inChar)
-> inChar | Any character. |
Returns the character as an uppercase letter.
This function does not handle the case in which the uppercase version of a character is represented by two or more characters. If you need to handle this situation, call the TxtGlueUpperStr function instead of this one.
Implemented only in the PalmOSGlue library.
TxtGlueLowerChar, TxtGlueUpperStr TxtGlueLowerStr, TxtGlueTransliterate, TxtTransliterate StrToLower
Convert a string to all uppercase letters.
void TxtGlueUpperStr (Char* ioString, UInt16 inMaxLength)
<-> ioString | The string to be converted. |
-> inMaxLength | The size of the buffer that contains the string, excluding the terminating NULL character. |
Returns in ioString the input string with its letters converted to uppercase.
Converting a string from uppercase to lowercase letters or vice versa may change the size of the string. For this reason, you should always check the size of the ioString after this call returns.
You must make sure that the parameter ioString points to the start of a valid character. That is, it must point to the first byte of a multi-byte character or it must point to a single-byte character. If it doesn't, results are unpredictable.
This function can only handle characters in the ISO Latin 1 character encoding unless the International Feature Set is present.
Implemented only in the PalmOSGlue library.
TxtGlueLowerStr, TxtGlueUpperChar, TxtGlueLowerChar, TxtGlueTransliterate, TxtTransliterate StrToLower
|