Show_Text

Functions

void DShow_Text (HC_KEY key, double *x, double *y, double *z, void *text)
 Similar to Show_Text(), but returns double-precision values. More...
 
void DShow_Text_With_Encoding (HC_KEY key, double *x, double *y, double *z, char *encoding, void *text)
 Similar to Show_Text_With_Encoding(), but returns double-precision values. More...
 
void Show_Text (HC_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. More...
 
void Show_Text_Count (HC_KEY key, int *count)
 Finds the number of characters in a given text string, as reference by a key. More...
 
void Show_Text_Encoding (HC_KEY key, char *encoding)
 Finds the type of encoding with which a particular string was inserted, as referenced by a key. More...
 
void Show_Text_Length (HC_KEY key, int *length)
 Finds the number of bytes in a given text string, as referenced by a key. More...
 
void Show_Text_With_Encoding (HC_KEY key, float *x, float *y, float *z, char *encoding, void *text)
 Similar to Show_Text, but operates on encoded text rather than Latin1 text. More...
 

Detailed Description

Function Documentation

◆ DShow_Text()

void DShow_Text ( HC_KEY  key,
double *  x,
double *  y,
double *  z,
void *  text 
)

Similar to Show_Text(), but returns double-precision values.

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.

DETAILS

No additional details. See Show_Text().

◆ DShow_Text_With_Encoding()

void DShow_Text_With_Encoding ( HC_KEY  key,
double *  x,
double *  y,
double *  z,
char *  encoding,
void *  text 
)

Similar to Show_Text_With_Encoding(), but returns double-precision values.

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-
encoding- The encoding originally passed to DInsert_Text_With_Encoding() , or the constant "iso latin one" if DInsert_Text() was used. Returned to user. Passed by reference always.
text- The text string referenced by key. Returned to user. Passed by reference always.

DETAILS

No additional details. See Show_Text_With_Encoding()

◆ Show_Text()

void Show_Text ( HC_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.

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.

DETAILS

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".

NOTES

RESTRICTIONS

See also
Insert_Text, Get_Selection, Begin_Contents_Search, Compute_Coordinates, Compute_Text_Extent, Define_System_Options, Compute_Text16_From_Text.

◆ Show_Text_Count()

void Show_Text_Count ( HC_KEY  key,
int *  count 
)

Finds the number of characters in a given text string, as reference by a key.

Parameters
key- Unique numeric identifier pointing to a text primitive in the database.
count- Number of characters represented by text. 16-bit character values countas 1 character. In C this value does not include the terminating null character. Returned to user. Passed by reference always.

DETAILS

No additional details. See Show_Text()

◆ Show_Text_Encoding()

void Show_Text_Encoding ( HC_KEY  key,
char *  encoding 
)

Finds the type of encoding with which a particular string was inserted, as referenced by a key.

Parameters
key- Unique numeric identifier pointing to a text primitive in the database.
encoding- The encoding originally passed to Insert_Text_With_Encoding() , or the constant "iso latin one" if Insert_Text() was used. Returned to user. Passed by reference always.

DETAILS

No additional details. See Show_Text()

◆ Show_Text_Length()

void Show_Text_Length ( HC_KEY  key,
int *  length 
)

Finds the number of bytes in a given text string, as referenced by a key.

Parameters
key- Unique numeric identifier pointing to a text primitive in the database.
length- Number of bytes occupied by text. 16-bit character values count as 2 bytes. In C this value does not include the termi nating null character. Returned to user. Passed by reference always.

DETAILS

No additional details. See Show_Text()

◆ Show_Text_With_Encoding()

void Show_Text_With_Encoding ( HC_KEY  key,
float *  x,
float *  y,
float *  z,
char *  encoding,
void *  text 
)

Similar to Show_Text, but operates on encoded text rather than Latin1 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-
encoding- The encoding originally passed to Insert_Text_With_Encoding() , or the constant "iso latin one" if Insert_Text() was used. Returned to user. Passed by reference always.
text- The text string referenced by key. Returned to user. Passed by reference always.

DETAILS

No additional details. See Show_Text()