HC_Show_Text
-
void
HC_Show_Text(Key key, float *x, float *y, float *z, char *text) - void HC_Show_Text(Key key, float x, float y, float z, char text)
Returns the position, size, and contents of a previously defined text string, as referenced by a key.
This routine finds the coordinates and contents of the inserted text that corresponds to key. This could be used, to give an odd example, to spy on the current status of text that is in the middle of being used for “string” input.
The key for the text might come from Show_Selection_Element() or Find_Contents() , or it might have been saved by your program when the text was created (via Insert_Text() ).
To aid in the allocation of a buffer large enough to receive any arbitrary text, you can call Show_Text_Length() first to find out how much room you’re going to need. In C remember to allow room for the terminating null. If you are using the “C return string length” System Option, Show_Text_Length() will return the full size, but the string returned by Show_Text() will be truncated to the return-string length (or one less, if truncating would interrupt a 16-bit character.)
NOTE: Keyword values are normally treated as all lowercase within HOOPS: this will cause an original *encoding of “JIS”, for example, to come back as “jis”, not “JIS”.
HC_Insert_Text, HC_Get_Selection, HC_Begin_Contents_Search, HC_Compute_Coordinates, HC_Compute_Text_Extent, HC_Define_System_Options, HC_Compute_Text16_From_Text.Parameters
key: Unique numeric identifier pointing to a text primitive in the database.
x: Position, in user coordinates, of the “reference point” of the text. Returned to user. Passed by reference always.
y:
z:
text: The text string referenced by key. Returned to user. Passed by reference always.