COPASI API
4.40.278
|
#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 } |
Public Types inherited from CDataObject | |
typedef std::set< const CDataObject * > | DataObjectSet |
enum | Flag { Container , Vector , Matrix , NameVector , Reference , ValueBool , ValueInt , ValueInt64 , ValueDbl , NonUniqueName , StaticString , ValueString , Separator , DisplayName , ModelEntity , Array , DataModel , Root , Gui , __SIZE } |
Public Types inherited from CObjectInterface | |
typedef std::vector< const CDataContainer * > | ContainerList |
typedef std::set< const CObjectInterface * > | ObjectSet |
Public Member Functions | |
CLText (CDataContainer *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), CDataContainer *pParent=NULL) | |
CLText (const CLText &source, CDataContainer *pParent=NULL) | |
CLText (const Text &source, CDataContainer *pParent=NULL) | |
const std::string & | getFontFamily () const |
CLRelAbsVector & | getFontSize () |
const CLRelAbsVector & | getFontSize () const |
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 |
CLRelAbsVector & | getX () |
const CLRelAbsVector & | getX () const |
CLRelAbsVector & | getY () |
const CLRelAbsVector & | getY () const |
CLRelAbsVector & | getZ () |
const CLRelAbsVector & | getZ () const |
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 () | |
Public Member Functions inherited from CLGraphicalPrimitive1D | |
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) |
Public Member Functions inherited from CLTransformation2D | |
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]) |
Public Member Functions inherited from CLTransformation | |
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]) |
Public Member Functions inherited from CLBase | |
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 () |
Public Member Functions inherited from CDataObject | |
void | addIssue (const CIssue &issue) |
void | addReference (const CDataContainer *pReference) |
virtual bool | applyData (const CData &data, CUndoData::CChangeSet &changes) override |
virtual void | calculateValue () override |
CDataObject (const CDataObject &src, const CDataContainer *pParent=NULL) | |
virtual void | createUndoData (CUndoData &undoData, const CUndoData::Type &type, const CData &oldData=CData(), const CCore::Framework &framework=CCore::Framework::ParticleNumbers) const override |
virtual void | destruct () override |
virtual CCommonName | getCN () const override |
virtual const CDataObject * | getDataObject () const override |
virtual const CObjectInterface * | getObject (const CCommonName &cn) const override |
CDataContainer * | getObjectAncestor (const std::string &type) const |
CDataModel * | getObjectDataModel () const |
virtual std::string | getObjectDisplayName () const override |
const CObjectInterface * | getObjectFromCN (const CCommonName &cn) const |
const std::string & | getObjectName () const |
CDataContainer * | getObjectParent () const |
const std::string & | getObjectType () const |
virtual const CObjectInterface::ObjectSet & | getPrerequisites () const override |
virtual const std::string | getUnits () const |
virtual const CValidity & | getValidity () const override |
virtual const CDataObject * | getValueObject () const |
virtual void * | getValuePointer () const override |
bool | hasFlag (const Flag &flag) const |
virtual bool | isPrerequisiteForContext (const CObjectInterface *pObject, const CCore::SimulationContextFlag &context, const CObjectInterface::ObjectSet &changedObjects) const override |
bool | prerequisitsContains (const DataObjectSet &objects) const |
virtual void | print (std::ostream *ostream) const override |
void | removeIssue (const CIssue &issue) |
void | removeReference (const CDataContainer *pReference) |
bool | setObjectName (const std::string &name) |
virtual bool | setObjectParent (const CDataContainer *pParent) |
virtual CData | toData () const override |
void | validityChanged (const CValidity &changedValidity) override |
void | validityRemoved (const CValidity &changedValidity) |
virtual | ~CDataObject () |
Public Member Functions inherited from CObjectInterface | |
CObjectInterface () | |
CObjectInterface (const CObjectInterface &src) | |
virtual | ~CObjectInterface () |
Public Member Functions inherited from CUndoObjectInterface | |
CUndoObjectInterface () | |
CUndoObjectInterface (const CUndoObjectInterface &src) | |
bool | generateUuid () |
const xg::Guid & | getUuid () const |
virtual CUndoObjectInterface * | insert (const CData &data) |
bool | setUuid (const std::string &uuid) |
bool | setUuid (const xg::Guid &uuid) |
virtual void | updateIndex (const size_t &index, const CUndoObjectInterface *pUndoObject) |
virtual | ~CUndoObjectInterface () |
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 |
Protected Attributes inherited from CLGraphicalPrimitive1D | |
std::string | mStroke |
std::vector< unsigned int > | mStrokeDashArray |
double | mStrokeWidth |
Protected Attributes inherited from CLTransformation2D | |
double | mMatrix2D [6] |
Protected Attributes inherited from CLTransformation | |
double | mMatrix [12] |
Protected Attributes inherited from CLBase | |
std::string | mTag |
Protected Attributes inherited from CDataObject | |
ObjectSet | mPrerequisits |
std::set< CDataContainer * > | mReferences |
Protected Attributes inherited from CObjectInterface | |
CValidity | mValidity |
Private Member Functions | |
CLText & | operator= (const CLText &source) |
Additional Inherited Members | |
Static Public Member Functions inherited from CLTransformation2D | |
static const double * | getIdentityMatrix2D () |
Static Public Member Functions inherited from CLTransformation | |
static const double * | getIdentityMatrix () |
Static Public Member Functions inherited from CDataObject | |
static CDataObject * | fromData (const CData &data, CUndoObjectInterface *pParent) |
static void | sanitizeObjectName (std::string &name) |
Static Public Member Functions inherited from CObjectInterface | |
static const CDataObject * | DataObject (const CObjectInterface *pInterface) |
static CObjectInterface * | GetObjectFromCN (const ContainerList &listOfContainer, const CCommonName &objName) |
Static Public Member Functions inherited from CUndoObjectInterface | |
template<class CType > | |
static CType * | fromData (const CData &, CUndoObjectInterface *) |
Static Public Attributes inherited from CLTransformation2D | |
static const double | IDENTITY2D [6] = {1.0, 0.0, 0.0, 1.0, 0.0, 0.0} |
Static Public Attributes inherited from CLTransformation | |
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} |
Protected Member Functions inherited from CLTransformation2D | |
virtual void | addSBMLAttributes (Transformation2D *pTransformation) const |
void | updateMatrix2D () |
void | updateMatrix3D () |
Protected Member Functions inherited from CDataObject | |
CDataObject () | |
CDataObject (const std::string &name, const CDataContainer *pParent=static_cast< CDataContainer * >((void *) 0), const std::string &type="CN", const CFlags< Flag > &flag=CFlags< Flag >::None) | |
enum CLText::FONT_STYLE |
enum CLText::FONT_WEIGHT |
enum CLText::TEXT_ANCHOR |
CLText::CLText | ( | CDataContainer * | pParent | ) |
References CKeyFactory::add(), CRootContainer::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) , |
||
CDataContainer * | pParent = NULL |
||
) |
Constructor with optional coordinates.
References CKeyFactory::add(), CRootContainer::getKeyFactory(), and mKey.
CLText::CLText | ( | const CLText & | source, |
CDataContainer * | pParent = NULL |
||
) |
Copy constructor.
References CKeyFactory::add(), CRootContainer::getKeyFactory(), and mKey.
CLText::CLText | ( | const Text & | source, |
CDataContainer * | pParent = NULL |
||
) |
Constructor to generate object from the corresponding SBML object.
References CKeyFactory::add(), ANCHOR_BOTTOM, ANCHOR_END, ANCHOR_MIDDLE, ANCHOR_START, ANCHOR_TOP, ANCHOR_UNSET, CRootContainer::getKeyFactory(), mKey, setFontStyle(), setFontWeight(), setTextAnchor(), setVTextAnchor(), STYLE_ITALIC, STYLE_NORMAL, STYLE_UNSET, WEIGHT_BOLD, WEIGHT_NORMAL, and WEIGHT_UNSET.
CLText::~CLText | ( | ) |
const std::string & CLText::getFontFamily | ( | ) | const |
Returns the font family.
References mFontFamily.
Referenced by CLLayoutRenderer::getFontSpec(), and toSBML().
CLRelAbsVector & CLText::getFontSize | ( | ) |
Returns the font size.
References mFontSize.
const CLRelAbsVector & CLText::getFontSize | ( | ) | const |
CLText::FONT_STYLE CLText::getFontStyle | ( | ) | const |
Returns the font style.
References mFontStyle.
Referenced by CLLayoutRenderer::getFontSpec(), and toSBML().
CLText::FONT_WEIGHT CLText::getFontWeight | ( | ) | const |
Returns the font weight.
References mFontWeight.
Referenced by CLLayoutRenderer::getFontSpec(), and toSBML().
|
virtual |
Returns the key string of the object.
Returns the key of the text element
Reimplemented from CDataObject.
References mKey.
const std::string & CLText::getText | ( | ) | const |
Returns the text for the text element.
References mText.
Referenced by CCopasiXML::saveRenderTextElement(), CLGroup::toSBML(), toSBML(), and CLLayoutRenderer::update_textures_and_colors().
CLText::TEXT_ANCHOR CLText::getTextAnchor | ( | ) | const |
CLText::TEXT_ANCHOR CLText::getVTextAnchor | ( | ) | const |
CLRelAbsVector & CLText::getX | ( | ) |
Returns the x coordinate.
References mX.
const CLRelAbsVector & CLText::getX | ( | ) | const |
Returns the x coordinate.
References mX.
Referenced by CLLayoutRenderer::draw_text(), and CCopasiXML::saveRenderTextElement().
CLRelAbsVector & CLText::getY | ( | ) |
Returns the y coordinate.
References mY.
const CLRelAbsVector & CLText::getY | ( | ) | const |
Returns the y coordinate.
References mY.
Referenced by CLLayoutRenderer::draw_text(), and CCopasiXML::saveRenderTextElement().
CLRelAbsVector & CLText::getZ | ( | ) |
Returns the z coordinate.
References mZ.
const CLRelAbsVector & CLText::getZ | ( | ) | const |
Returns the z coordinate.
References mZ.
Referenced by CLLayoutRenderer::draw_text(), and CCopasiXML::saveRenderTextElement().
bool CLText::isSetFontFamily | ( | ) | const |
Returns true if the font family has been set or false otherwise.
References mFontFamily.
Referenced by CLLayoutRenderer::getFontSpec().
bool CLText::isSetFontSize | ( | ) | const |
Returns true if the font size has been set or false otherwise.
References CLRelAbsVector::getAbsoluteValue(), and mFontSize.
Referenced by CLLayoutRenderer::getFontSpec().
bool CLText::isSetFontStyle | ( | ) | const |
Returns true if the font style has been set or false otherwise.
References mFontStyle, and STYLE_UNSET.
Referenced by CLLayoutRenderer::getFontSpec().
bool CLText::isSetFontWeight | ( | ) | const |
Returns true if the font weight has been set or false otherwise.
References mFontWeight, and WEIGHT_UNSET.
Referenced by CLLayoutRenderer::getFontSpec().
bool CLText::isSetText | ( | ) | const |
Returns true if the text is set to something else than the empty string.
References mText.
Referenced by CLLayoutRenderer::draw_text().
bool CLText::isSetTextAnchor | ( | ) | const |
Returns true if the horizonal alignment attribute has been set.
References ANCHOR_UNSET, and mTextAnchor.
bool CLText::isSetVTextAnchor | ( | ) | const |
Returns true if the vertical alignment attribute has been set.
References ANCHOR_UNSET, and mVTextAnchor.
void CLText::setCoordinates | ( | const CLRelAbsVector & | x, |
const CLRelAbsVector & | y, | ||
const CLRelAbsVector & | z = CLRelAbsVector(0.0, 0.0) |
||
) |
void CLText::setFontFamily | ( | const std::string & | family | ) |
void CLText::setFontSize | ( | const CLRelAbsVector & | size | ) |
void CLText::setFontStyle | ( | CLText::FONT_STYLE | style | ) |
Sets the font style.
References mFontStyle.
Referenced by CLText(), and RenderTextHandler::processStart().
void CLText::setFontWeight | ( | CLText::FONT_WEIGHT | weight | ) |
Sets the font weight.
References mFontWeight.
Referenced by CLText(), and RenderTextHandler::processStart().
void CLText::setText | ( | const std::string & | text | ) |
Sets the text for the text element.
References mText.
Referenced by RenderTextHandler::processEnd().
void CLText::setTextAnchor | ( | CLText::TEXT_ANCHOR | anchor | ) |
Sets the font anchor.
Sets the text anchor.
References mTextAnchor.
Referenced by CLText(), and RenderTextHandler::processStart().
void CLText::setVTextAnchor | ( | CLText::TEXT_ANCHOR | anchor | ) |
Sets the font anchor.
Sets the vertical text anchor.
References mVTextAnchor.
Referenced by CLText(), and RenderTextHandler::processStart().
void CLText::setX | ( | const CLRelAbsVector & | coord | ) |
Sets the x coordinate.
References mX.
void CLText::setY | ( | const CLRelAbsVector & | coord | ) |
Sets the y coordinate.
References mY.
void CLText::setZ | ( | const CLRelAbsVector & | coord | ) |
Sets the z coordinate.
References mZ.
Text * CLText::toSBML | ( | unsigned int | level, |
unsigned int | version | ||
) | const |
Converts this object to the corresponding SBML object.
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 |
Referenced by getFontFamily(), isSetFontFamily(), and setFontFamily().
|
protected |
Referenced by getFontSize(), isSetFontSize(), setFontSize(), and toSBML().
|
protected |
Referenced by getFontStyle(), isSetFontStyle(), and setFontStyle().
|
protected |
Referenced by getFontWeight(), isSetFontWeight(), and setFontWeight().
|
protected |
|
protected |
Referenced by getText(), isSetText(), and setText().
|
protected |
Referenced by getTextAnchor(), isSetTextAnchor(), and setTextAnchor().
|
protected |
Referenced by getVTextAnchor(), isSetVTextAnchor(), and setVTextAnchor().
|
protected |
Referenced by getX(), setCoordinates(), setX(), and toSBML().
|
protected |
Referenced by getY(), setCoordinates(), setY(), and toSBML().
|
protected |
Referenced by getZ(), setCoordinates(), setZ(), and toSBML().