libSBML C API  5.18.0
TextGlyph_t Class Reference

Detailed Description

layout A glyph for a text label.

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_tTextGlyph_clone (const TextGlyph_t *tg)
 
TextGlyph_tTextGlyph_create (void)
 Creates a new TextGlyph_t and returns the pointer to it. More...
 
TextGlyph_tTextGlyph_createFrom (const TextGlyph_t *temp)
 Creates a new TextGlyph_t from a template. More...
 
TextGlyph_tTextGlyph_createWith (const char *sid)
 Creates a new TextGlyph_t with the given id. More...
 
TextGlyph_tTextGlyph_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...
 

Member Function Documentation

TextGlyph_t * TextGlyph_clone ( const TextGlyph_t tg)
Returns
a (deep) copy of this TextGlyph_t.
Parameters
tgthe 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.

Parameters
tempthe TextGlyph_t structure to copy.
TextGlyph_t * TextGlyph_createWith ( const char *  sid)

Creates a new TextGlyph_t with the given id.

Parameters
sidthe 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.

Parameters
sidthe intended ID of the TextGlyph_t.
textthe intended text of the TextGlyph_t.
void TextGlyph_free ( TextGlyph_t tg)

Frees the memory taken by the given text glyph.

Parameters
tgthe TextGlyph_t structure.
const char * TextGlyph_getGraphicalObjectId ( const TextGlyph_t tg)

Returns the id of the graphical object associated with this text glyph.

Parameters
tgthe 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.

Parameters
tgthe TextGlyph_t structure.
const char * TextGlyph_getText ( const TextGlyph_t tg)

Returns the text associated with this text glyph.

Parameters
tgthe TextGlyph_t structure.
void TextGlyph_initDefaults ( TextGlyph_t tg)

Calls initDefaults from GraphicalObject_t.

Parameters
tgthe 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.

Parameters
tgthe TextGlyph_t structure.
int TextGlyph_isSetOriginOfTextId ( const TextGlyph_t tg)

Returns 1 (true) if the originOfText attribute is not the empty string.

Parameters
tgthe TextGlyph_t structure.
int TextGlyph_isSetText ( const TextGlyph_t tg)

Returns 1 (true) if the text attribute is not the empty string.

Parameters
tgthe 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.

Parameters
tgthe TextGlyph_t structure.
sidthe 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.

Parameters
tgthe TextGlyph_t structure.
sidthe 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.

Parameters
tgthe TextGlyph_t structure.
textthe intended text of the TextGlyph_t.