libSBML C API
5.18.0
|
The TextGlyph class describes the position and dimension of text labels in the “layout” package. It inherits from GraphicalObject_t and adds the attributes graphicalObject, text and originOfText.
Public Member Functions | |
TextGlyph_t * | TextGlyph_clone (const TextGlyph_t *tg) |
TextGlyph_t * | TextGlyph_create (void) |
Creates a new TextGlyph_t and returns the pointer to it. More... | |
TextGlyph_t * | TextGlyph_createFrom (const TextGlyph_t *temp) |
Creates a new TextGlyph_t from a template. More... | |
TextGlyph_t * | TextGlyph_createWith (const char *sid) |
Creates a new TextGlyph_t with the given id . More... | |
TextGlyph_t * | TextGlyph_createWithText (const char *sid, const char *text) |
Creates a new TextGlyph_t referencing the given text. More... | |
void | TextGlyph_free (TextGlyph_t *tg) |
Frees the memory taken by the given text glyph. More... | |
const char * | TextGlyph_getGraphicalObjectId (const TextGlyph_t *tg) |
Returns the id of the graphical object associated with this text glyph. More... | |
const char * | TextGlyph_getOriginOfTextId (const TextGlyph_t *tg) |
Returns the id of the origin of the text associated with this text glyph. More... | |
const char * | TextGlyph_getText (const TextGlyph_t *tg) |
Returns the text associated with this text glyph. More... | |
void | TextGlyph_initDefaults (TextGlyph_t *tg) |
Calls initDefaults from GraphicalObject_t. More... | |
int | TextGlyph_isSetGraphicalObjectId (const TextGlyph_t *tg) |
Returns 1 (true) if the id of the associated graphical object is not the empty string. More... | |
int | TextGlyph_isSetOriginOfTextId (const TextGlyph_t *tg) |
Returns 1 (true) if the originOfText attribute is not the empty string. More... | |
int | TextGlyph_isSetText (const TextGlyph_t *tg) |
Returns 1 (true) if the text attribute is not the empty string. More... | |
void | TextGlyph_setGraphicalObjectId (TextGlyph_t *tg, const char *sid) |
Sets the associated GraphicalObject_t id for the text glyph. More... | |
void | TextGlyph_setOriginOfTextId (TextGlyph_t *tg, const char *sid) |
Sets the id of the origin of the text for the text glyph. More... | |
void | TextGlyph_setText (TextGlyph_t *tg, const char *text) |
Sets the text for the text glyph. More... | |
TextGlyph_t * TextGlyph_clone | ( | const TextGlyph_t * | tg | ) |
tg | the TextGlyph_t structure. |
TextGlyph_t * TextGlyph_create | ( | void | ) |
Creates a new TextGlyph_t and returns the pointer to it.
TextGlyph_t * TextGlyph_createFrom | ( | const TextGlyph_t * | temp | ) |
Creates a new TextGlyph_t from a template.
temp | the TextGlyph_t structure to copy. |
TextGlyph_t * TextGlyph_createWith | ( | const char * | sid | ) |
Creates a new TextGlyph_t with the given id
.
sid | the intended ID of the TextGlyph_t. |
TextGlyph_t * TextGlyph_createWithText | ( | const char * | sid, |
const char * | text | ||
) |
Creates a new TextGlyph_t referencing the given text.
sid | the intended ID of the TextGlyph_t. |
text | the intended text of the TextGlyph_t. |
void TextGlyph_free | ( | TextGlyph_t * | tg | ) |
Frees the memory taken by the given text glyph.
tg | the TextGlyph_t structure. |
const char * TextGlyph_getGraphicalObjectId | ( | const TextGlyph_t * | tg | ) |
Returns the id of the graphical object associated with this text glyph.
tg | the TextGlyph_t structure. |
const char * TextGlyph_getOriginOfTextId | ( | const TextGlyph_t * | tg | ) |
Returns the id of the origin of the text associated with this text glyph.
tg | the TextGlyph_t structure. |
const char * TextGlyph_getText | ( | const TextGlyph_t * | tg | ) |
Returns the text associated with this text glyph.
tg | the TextGlyph_t structure. |
void TextGlyph_initDefaults | ( | TextGlyph_t * | tg | ) |
Calls initDefaults from GraphicalObject_t.
tg | the TextGlyph_t structure. |
int TextGlyph_isSetGraphicalObjectId | ( | const TextGlyph_t * | tg | ) |
Returns 1
(true) if the id of the associated graphical object is not the empty string.
tg | the TextGlyph_t structure. |
int TextGlyph_isSetOriginOfTextId | ( | const TextGlyph_t * | tg | ) |
Returns 1
(true) if the originOfText attribute is not the empty string.
tg | the TextGlyph_t structure. |
int TextGlyph_isSetText | ( | const TextGlyph_t * | tg | ) |
Returns 1
(true) if the text attribute is not the empty string.
tg | the TextGlyph_t structure. |
void TextGlyph_setGraphicalObjectId | ( | TextGlyph_t * | tg, |
const char * | sid | ||
) |
Sets the associated GraphicalObject_t id for the text glyph.
A TextGlyph_t which is associated with a GraphicalObject_t can be considered as a label to that object and they might for example be moved together in an editor.
tg | the TextGlyph_t structure. |
sid | the string to use as the ID of the GraphicalObject_t. |
void TextGlyph_setOriginOfTextId | ( | TextGlyph_t * | tg, |
const char * | sid | ||
) |
Sets the id of the origin of the text for the text glyph.
This can be the id of any valid sbml model object. The name of the object is then taken as the text for the TextGlyph_t.
tg | the TextGlyph_t structure. |
sid | the string to use as the ID of the origin of the text. |
void TextGlyph_setText | ( | TextGlyph_t * | tg, |
const char * | text | ||
) |
Sets the text for the text glyph.
tg | the TextGlyph_t structure. |
text | the intended text of the TextGlyph_t. |