COPASI API
4.16.103
|
#include <CLText.h>
Public Types | |
enum | FONT_STYLE { STYLE_UNSET, STYLE_NORMAL, STYLE_ITALIC } |
enum | FONT_WEIGHT { WEIGHT_UNSET, WEIGHT_NORMAL, WEIGHT_BOLD } |
enum | TEXT_ANCHOR { ANCHOR_UNSET = 0, ANCHOR_START = 1, ANCHOR_MIDDLE = 2, ANCHOR_END = 3, ANCHOR_TOP = 1, ANCHOR_BOTTOM = 3 } |
![]() | |
typedef std::set< const CCopasiObject * > | DataObjectSet |
typedef std::vector< Refresh * > | DataUpdateSequence |
![]() | |
typedef std::set< const CObjectInterface * > | ObjectSet |
typedef std::vector < CObjectInterface * > | UpdateSequence |
Public Member Functions | |
CLText (CCopasiContainer *pParent) | |
CLText (const CLRelAbsVector &x=CLRelAbsVector(0.0, 0.0), const CLRelAbsVector &y=CLRelAbsVector(0.0, 0.0), const CLRelAbsVector &z=CLRelAbsVector(0.0, 0.0), CCopasiContainer *pParent=NULL) | |
CLText (const CLText &source, CCopasiContainer *pParent=NULL) | |
CLText (const Text &source, CCopasiContainer *pParent=NULL) | |
const std::string & | getFontFamily () const |
const CLRelAbsVector & | getFontSize () const |
CLRelAbsVector & | getFontSize () |
FONT_STYLE | getFontStyle () const |
FONT_WEIGHT | getFontWeight () const |
const std::string & | getKey () const |
const std::string & | getText () const |
TEXT_ANCHOR | getTextAnchor () const |
TEXT_ANCHOR | getVTextAnchor () const |
const CLRelAbsVector & | getX () const |
CLRelAbsVector & | getX () |
const CLRelAbsVector & | getY () const |
CLRelAbsVector & | getY () |
const CLRelAbsVector & | getZ () const |
CLRelAbsVector & | getZ () |
bool | isSetFontFamily () const |
bool | isSetFontSize () const |
bool | isSetFontStyle () const |
bool | isSetFontWeight () const |
bool | isSetText () const |
bool | isSetTextAnchor () const |
bool | isSetVTextAnchor () const |
void | setCoordinates (const CLRelAbsVector &x, const CLRelAbsVector &y, const CLRelAbsVector &z=CLRelAbsVector(0.0, 0.0)) |
void | setFontFamily (const std::string &family) |
void | setFontSize (const CLRelAbsVector &size) |
void | setFontStyle (CLText::FONT_STYLE style) |
void | setFontWeight (CLText::FONT_WEIGHT weight) |
void | setText (const std::string &text) |
void | setTextAnchor (CLText::TEXT_ANCHOR anchor) |
void | setVTextAnchor (CLText::TEXT_ANCHOR anchor) |
void | setX (const CLRelAbsVector &coord) |
void | setY (const CLRelAbsVector &coord) |
void | setZ (const CLRelAbsVector &coord) |
Text * | toSBML (unsigned int level, unsigned int version) const |
~CLText () | |
![]() | |
virtual void | addSBMLAttributes (GraphicalPrimitive1D *pPrimitive) const |
CLGraphicalPrimitive1D () | |
CLGraphicalPrimitive1D (const GraphicalPrimitive1D &source) | |
const std::vector< unsigned int > & | getDashArray () const |
const std::string & | getStroke () const |
double | getStrokeWidth () const |
bool | isSetDashArray () const |
bool | isSetStroke () const |
bool | isSetStrokeWidth () const |
void | parseDashArray (const std::string &s) |
void | setDashArray (const std::vector< unsigned int > &array) |
void | setStroke (const std::string &key) |
void | setStrokeWidth (double width) |
![]() | |
CLTransformation2D () | |
CLTransformation2D (const double m[6]) | |
CLTransformation2D (const Transformation2D &source) | |
std::string | get2DTransformationString () const |
const double * | getMatrix2D () const |
virtual void | parseTransformation (const std::string &transformationString) |
void | setMatrix (const double m[12]) |
void | setMatrix2D (const double m[6]) |
![]() | |
CLTransformation () | |
CLTransformation (const double matrix[12]) | |
std::string | get3DTransformationString () const |
virtual const double * | getMatrix () const |
bool | is2DTransformation () const |
bool | isIdentityMatrix () const |
bool | isSetMatrix () const |
void | setMatrix (const double m[12]) |
![]() | |
CLBase () | |
CLBase (const CLBase &b) | |
CLBase (const SBase &) | |
const std::string & | getTag () const |
bool | hasTag () const |
virtual void | moveBy (const CLPoint &) |
void | setTag (const std::string &tag) |
virtual | ~CLBase () |
![]() | |
void | addDirectDependency (const CCopasiObject *pObject) |
CCopasiObject (const CCopasiObject &src, const CCopasiContainer *pParent=NULL) | |
void | clearDirectDependencies () |
void | clearRefresh () |
bool | dependsOn (DataObjectSet candidates, const DataObjectSet &context=DataObjectSet()) const |
void | getAllDependencies (DataObjectSet &dependencies, const DataObjectSet &context) const |
virtual CCopasiObjectName | getCN () const |
virtual const DataObjectSet & | getDirectDependencies (const DataObjectSet &context=DataObjectSet()) const |
virtual const CObjectInterface * | getObject (const CCopasiObjectName &cn) const |
CCopasiContainer * | getObjectAncestor (const std::string &type) const |
CCopasiDataModel * | getObjectDataModel () |
const CCopasiDataModel * | getObjectDataModel () const |
virtual std::string | getObjectDisplayName (bool regular=true, bool richtext=false) const |
const std::string & | getObjectName () const |
CCopasiContainer * | getObjectParent () const |
const std::string & | getObjectType () const |
virtual const CObjectInterface::ObjectSet & | getPrerequisites () const |
virtual Refresh * | getRefresh () const |
virtual std::string | getUnits () const |
UpdateMethod * | getUpdateMethod () const |
virtual const CCopasiObject * | getValueObject () const |
virtual void * | getValuePointer () const |
bool | hasCircularDependencies (DataObjectSet &candidates, DataObjectSet &verified, const DataObjectSet &context) const |
bool | hasUpdateMethod () const |
bool | isArray () const |
bool | isContainer () const |
bool | isDataModel () const |
bool | isMatrix () const |
bool | isNameVector () const |
bool | isNonUniqueName () const |
virtual bool | isPrerequisiteForContext (const CObjectInterface *pObject, const CMath::SimulationContextFlag &context, const CObjectInterface::ObjectSet &changedObjects) const |
bool | isReference () const |
bool | isRoot () const |
bool | isSeparator () const |
bool | isStaticString () const |
bool | isValueBool () const |
bool | isValueDbl () const |
bool | isValueInt () const |
bool | isValueInt64 () const |
bool | isValueString () const |
bool | isVector () const |
virtual bool | mustBeDeleted (const DataObjectSet &deletedObjects) const |
virtual void | print (std::ostream *ostream) const |
void | removeDirectDependency (const CCopasiObject *pObject) |
void | setDirectDependencies (const DataObjectSet &directDependencies) |
bool | setObjectName (const std::string &name) |
virtual bool | setObjectParent (const CCopasiContainer *pParent) |
void | setObjectValue (const C_FLOAT64 &value) |
void | setObjectValue (const C_INT32 &value) |
void | setObjectValue (const bool &value) |
template<class CType > | |
void | setRefresh (CType *pType, void(CType::*method)(void)) |
template<class CType > | |
void | setUpdateMethod (CType *pType, void(CType::*method)(const C_FLOAT64 &)) |
template<class CType > | |
void | setUpdateMethod (CType *pType, void(CType::*method)(const C_INT32 &)) |
template<class CType > | |
void | setUpdateMethod (CType *pType, void(CType::*method)(const bool &)) |
virtual | ~CCopasiObject () |
![]() | |
CObjectInterface () | |
virtual | ~CObjectInterface () |
Protected Attributes | |
std::string | mFontFamily |
CLRelAbsVector | mFontSize |
FONT_STYLE | mFontStyle |
FONT_WEIGHT | mFontWeight |
std::string | mKey |
std::string | mText |
TEXT_ANCHOR | mTextAnchor |
TEXT_ANCHOR | mVTextAnchor |
CLRelAbsVector | mX |
CLRelAbsVector | mY |
CLRelAbsVector | mZ |
![]() | |
std::string | mStroke |
std::vector< unsigned int > | mStrokeDashArray |
double | mStrokeWidth |
![]() | |
double | mMatrix2D [6] |
![]() | |
double | mMatrix [12] |
![]() | |
std::string | mTag |
Private Member Functions | |
CLText & | operator= (const CLText &source) |
Additional Inherited Members | |
![]() | |
static const double * | getIdentityMatrix2D () |
![]() | |
static const double * | getIdentityMatrix () |
![]() | |
static std::vector< Refresh * > | buildUpdateSequence (const DataObjectSet &objects, const DataObjectSet &uptoDateObjects, const DataObjectSet &context=DataObjectSet()) |
static void | setRenameHandler (CRenameHandler *rh) |
![]() | |
static const double | IDENTITY2D [6] = {1.0, 0.0, 0.0, 1.0, 0.0, 0.0} |
![]() | |
static const double | IDENTITY3D [12] = {1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0} |
![]() | |
enum | Flag { Container = 0x1, Vector = 0x2, Matrix = 0x4, NameVector = 0x8, Reference = 0x10, ValueBool = 0x20, ValueInt = 0x40, ValueInt64 = 0x80, ValueDbl = 0x100, NonUniqueName = 0x200, StaticString = 0x400, ValueString = 0x800, Separator = 0x1000, ModelEntity = 0x2000, Array = 0x4000, DataModel = 0x8000, Root = 0x10000, Gui = 0x20000 } |
![]() | |
virtual void | addSBMLAttributes (Transformation2D *pTransformation) const |
void | updateMatrix2D () |
void | updateMatrix3D () |
![]() | |
CCopasiObject () | |
CCopasiObject (const std::string &name, const CCopasiContainer *pParent=NULL, const std::string &type="CN", const unsigned C_INT32 &flag=0) | |
![]() | |
static CRenameHandler * | smpRenameHandler = NULL |
enum CLText::FONT_STYLE |
Enumerator | |
---|---|
STYLE_UNSET | |
STYLE_NORMAL | |
STYLE_ITALIC |
enum CLText::FONT_WEIGHT |
Enumerator | |
---|---|
WEIGHT_UNSET | |
WEIGHT_NORMAL | |
WEIGHT_BOLD |
enum CLText::TEXT_ANCHOR |
Enumerator | |
---|---|
ANCHOR_UNSET | |
ANCHOR_START | |
ANCHOR_MIDDLE | |
ANCHOR_END | |
ANCHOR_TOP | |
ANCHOR_BOTTOM |
Definition at line 48 of file CLText.h.
CLText::CLText | ( | CCopasiContainer * | pParent | ) |
Definition at line 16 of file CLText.cpp.
References CKeyFactory::add(), CCopasiRootContainer::getKeyFactory(), and mKey.
CLText::CLText | ( | const CLRelAbsVector & | x = CLRelAbsVector(0.0, 0.0) , |
const CLRelAbsVector & | y = CLRelAbsVector(0.0, 0.0) , |
||
const CLRelAbsVector & | z = CLRelAbsVector(0.0, 0.0) , |
||
CCopasiContainer * | pParent = NULL |
||
) |
Constructor with optional coordinates.
Definition at line 37 of file CLText.cpp.
References CKeyFactory::add(), CCopasiRootContainer::getKeyFactory(), and mKey.
CLText::CLText | ( | const CLText & | source, |
CCopasiContainer * | pParent = NULL |
||
) |
Copy constructor.
Definition at line 58 of file CLText.cpp.
References CKeyFactory::add(), CCopasiRootContainer::getKeyFactory(), and mKey.
CLText::CLText | ( | const Text & | source, |
CCopasiContainer * | pParent = NULL |
||
) |
Constructor to generate object from the corresponding SBML object.
Definition at line 79 of file CLText.cpp.
References CKeyFactory::add(), ANCHOR_BOTTOM, ANCHOR_END, ANCHOR_MIDDLE, ANCHOR_START, ANCHOR_TOP, ANCHOR_UNSET, CCopasiRootContainer::getKeyFactory(), mKey, setFontStyle(), setFontWeight(), setTextAnchor(), setVTextAnchor(), STYLE_ITALIC, STYLE_NORMAL, STYLE_UNSET, WEIGHT_BOLD, WEIGHT_NORMAL, and WEIGHT_UNSET.
CLText::~CLText | ( | ) |
Destructor.
Destructor
Definition at line 164 of file CLText.cpp.
References CCopasiRootContainer::getKeyFactory(), mKey, and CKeyFactory::remove().
const std::string & CLText::getFontFamily | ( | ) | const |
Returns the font family.
Definition at line 302 of file CLText.cpp.
References mFontFamily.
Referenced by getFont(), CLLayoutRenderer::getFontSpec(), and toSBML().
const CLRelAbsVector & CLText::getFontSize | ( | ) | const |
Returns the font size.
Definition at line 318 of file CLText.cpp.
References mFontSize.
Referenced by getFont(), and CLLayoutRenderer::getFontSpec().
CLRelAbsVector & CLText::getFontSize | ( | ) |
CLText::FONT_STYLE CLText::getFontStyle | ( | ) | const |
Returns the font style.
Definition at line 334 of file CLText.cpp.
References mFontStyle.
Referenced by getFont(), CLLayoutRenderer::getFontSpec(), and toSBML().
CLText::FONT_WEIGHT CLText::getFontWeight | ( | ) | const |
Returns the font weight.
Definition at line 326 of file CLText.cpp.
References mFontWeight.
Referenced by getFont(), CLLayoutRenderer::getFontSpec(), and toSBML().
|
virtual |
Returns the key string of the object.
Returns the key of the text element
Reimplemented from CCopasiObject.
Definition at line 430 of file CLText.cpp.
References mKey.
const std::string & CLText::getText | ( | ) | const |
Returns the text for the text element.
Definition at line 358 of file CLText.cpp.
References mText.
Referenced by fillItemFromText(), toSBML(), and CLLayoutRenderer::update_textures_and_colors().
CLText::TEXT_ANCHOR CLText::getTextAnchor | ( | ) | const |
Returns the text anchor.
Definition at line 342 of file CLText.cpp.
References mTextAnchor.
Referenced by adjustPosition(), and toSBML().
CLText::TEXT_ANCHOR CLText::getVTextAnchor | ( | ) | const |
Returns the vertical text anchor.
Definition at line 350 of file CLText.cpp.
References mVTextAnchor.
Referenced by adjustPosition(), and toSBML().
const CLRelAbsVector & CLText::getX | ( | ) | const |
Returns the x coordinate.
Definition at line 206 of file CLText.cpp.
References mX.
Referenced by CLLayoutRenderer::draw_text(), fillItemFromText(), and CCopasiXML::saveRenderTextElement().
CLRelAbsVector & CLText::getX | ( | ) |
const CLRelAbsVector & CLText::getY | ( | ) | const |
Returns the y coordinate.
Definition at line 214 of file CLText.cpp.
References mY.
Referenced by CLLayoutRenderer::draw_text(), fillItemFromText(), and CCopasiXML::saveRenderTextElement().
CLRelAbsVector & CLText::getY | ( | ) |
const CLRelAbsVector & CLText::getZ | ( | ) | const |
Returns the z coordinate.
Definition at line 222 of file CLText.cpp.
References mZ.
Referenced by CLLayoutRenderer::draw_text(), and CCopasiXML::saveRenderTextElement().
CLRelAbsVector & CLText::getZ | ( | ) |
bool CLText::isSetFontFamily | ( | ) | const |
Returns true if the font family has been set or false otherwise.
Definition at line 382 of file CLText.cpp.
References mFontFamily.
Referenced by getFont(), and CLLayoutRenderer::getFontSpec().
bool CLText::isSetFontSize | ( | ) | const |
Returns true if the font size has been set or false otherwise.
Definition at line 390 of file CLText.cpp.
References CLRelAbsVector::getAbsoluteValue(), CLRelAbsVector::getRelativeValue(), and mFontSize.
Referenced by getFont(), and CLLayoutRenderer::getFontSpec().
bool CLText::isSetFontStyle | ( | ) | const |
Returns true if the font style has been set or false otherwise.
Definition at line 406 of file CLText.cpp.
References mFontStyle, and STYLE_UNSET.
Referenced by getFont(), and CLLayoutRenderer::getFontSpec().
bool CLText::isSetFontWeight | ( | ) | const |
Returns true if the font weight has been set or false otherwise.
Definition at line 398 of file CLText.cpp.
References mFontWeight, and WEIGHT_UNSET.
Referenced by getFont(), and CLLayoutRenderer::getFontSpec().
bool CLText::isSetText | ( | ) | const |
Returns true if the text is set to something else than the empty string.
Definition at line 374 of file CLText.cpp.
References mText.
Referenced by CLLayoutRenderer::draw_text().
bool CLText::isSetTextAnchor | ( | ) | const |
Returns true if the horizonal alignment attribute has been set.
Definition at line 414 of file CLText.cpp.
References ANCHOR_UNSET, and mTextAnchor.
Referenced by adjustPosition().
bool CLText::isSetVTextAnchor | ( | ) | const |
Returns true if the vertical alignment attribute has been set.
Definition at line 422 of file CLText.cpp.
References ANCHOR_UNSET, and mVTextAnchor.
Referenced by adjustPosition().
void CLText::setCoordinates | ( | const CLRelAbsVector & | x, |
const CLRelAbsVector & | y, | ||
const CLRelAbsVector & | z = CLRelAbsVector(0.0, 0.0) |
||
) |
Sets the coordinates.
Definition at line 172 of file CLText.cpp.
Referenced by CCopasiXMLParser::TextElement::start().
void CLText::setFontFamily | ( | const std::string & | family | ) |
Sets the font family.
Definition at line 254 of file CLText.cpp.
References mFontFamily.
Referenced by CCopasiXMLParser::TextElement::start().
void CLText::setFontSize | ( | const CLRelAbsVector & | size | ) |
Sets the font size.
Definition at line 262 of file CLText.cpp.
References mFontSize.
Referenced by CCopasiXMLParser::TextElement::start().
void CLText::setFontStyle | ( | CLText::FONT_STYLE | style | ) |
Sets the font style.
Definition at line 278 of file CLText.cpp.
References mFontStyle.
Referenced by CLText(), and CCopasiXMLParser::TextElement::start().
void CLText::setFontWeight | ( | CLText::FONT_WEIGHT | weight | ) |
Sets the font weight.
Definition at line 270 of file CLText.cpp.
References mFontWeight.
Referenced by CLText(), and CCopasiXMLParser::TextElement::start().
void CLText::setText | ( | const std::string & | text | ) |
Sets the text for the text element.
Definition at line 366 of file CLText.cpp.
References mText.
Referenced by CCopasiXMLParser::TextElement::end().
void CLText::setTextAnchor | ( | CLText::TEXT_ANCHOR | anchor | ) |
Sets the font anchor.
Sets the text anchor.
Definition at line 286 of file CLText.cpp.
References mTextAnchor.
Referenced by CLText(), and CCopasiXMLParser::TextElement::start().
void CLText::setVTextAnchor | ( | CLText::TEXT_ANCHOR | anchor | ) |
Sets the font anchor.
Sets the vertical text anchor.
Definition at line 294 of file CLText.cpp.
References mVTextAnchor.
Referenced by CLText(), and CCopasiXMLParser::TextElement::start().
void CLText::setX | ( | const CLRelAbsVector & | coord | ) |
void CLText::setY | ( | const CLRelAbsVector & | coord | ) |
void CLText::setZ | ( | const CLRelAbsVector & | coord | ) |
Text * CLText::toSBML | ( | unsigned int | level, |
unsigned int | version | ||
) | const |
Converts this object to the corresponding SBML object.
Definition at line 438 of file CLText.cpp.
References CLGraphicalPrimitive1D::addSBMLAttributes(), ANCHOR_BOTTOM, ANCHOR_END, ANCHOR_MIDDLE, ANCHOR_UNSET, getFontFamily(), getFontStyle(), getFontWeight(), getText(), getTextAnchor(), getVTextAnchor(), mFontSize, mX, mY, mZ, STYLE_ITALIC, STYLE_UNSET, CLRelAbsVector::toSBML(), WEIGHT_BOLD, and WEIGHT_UNSET.
|
protected |
Definition at line 62 of file CLText.h.
Referenced by getFontFamily(), isSetFontFamily(), and setFontFamily().
|
protected |
Definition at line 63 of file CLText.h.
Referenced by getFontSize(), isSetFontSize(), setFontSize(), and toSBML().
|
protected |
Definition at line 65 of file CLText.h.
Referenced by getFontStyle(), isSetFontStyle(), and setFontStyle().
|
protected |
Definition at line 64 of file CLText.h.
Referenced by getFontWeight(), isSetFontWeight(), and setFontWeight().
|
protected |
|
protected |
Definition at line 68 of file CLText.h.
Referenced by getText(), isSetText(), and setText().
|
protected |
Definition at line 66 of file CLText.h.
Referenced by getTextAnchor(), isSetTextAnchor(), and setTextAnchor().
|
protected |
Definition at line 67 of file CLText.h.
Referenced by getVTextAnchor(), isSetVTextAnchor(), and setVTextAnchor().
|
protected |
|
protected |
|
protected |