COPASI API  4.40.278
CLText Class Reference

#include <CLText.h>

Inheritance diagram for CLText:
[legend]

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
 
CLRelAbsVectorgetFontSize ()
 
const CLRelAbsVectorgetFontSize () 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
 
CLRelAbsVectorgetX ()
 
const CLRelAbsVectorgetX () const
 
CLRelAbsVectorgetY ()
 
const CLRelAbsVectorgetY () const
 
CLRelAbsVectorgetZ ()
 
const CLRelAbsVectorgetZ () 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 CDataObjectgetDataObject () const override
 
virtual const CObjectInterfacegetObject (const CCommonName &cn) const override
 
CDataContainergetObjectAncestor (const std::string &type) const
 
CDataModelgetObjectDataModel () const
 
virtual std::string getObjectDisplayName () const override
 
const CObjectInterfacegetObjectFromCN (const CCommonName &cn) const
 
const std::string & getObjectName () const
 
CDataContainergetObjectParent () const
 
const std::string & getObjectType () const
 
virtual const CObjectInterface::ObjectSetgetPrerequisites () const override
 
virtual const std::string getUnits () const
 
virtual const CValiditygetValidity () const override
 
virtual const CDataObjectgetValueObject () 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 CUndoObjectInterfaceinsert (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

CLTextoperator= (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 CDataObjectfromData (const CData &data, CUndoObjectInterface *pParent)
 
static void sanitizeObjectName (std::string &name)
 
- Static Public Member Functions inherited from CObjectInterface
static const CDataObjectDataObject (const CObjectInterface *pInterface)
 
static CObjectInterfaceGetObjectFromCN (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)
 

Member Enumeration Documentation

◆ FONT_STYLE

Enumerator
STYLE_UNSET 
STYLE_NORMAL 
STYLE_ITALIC 

◆ FONT_WEIGHT

Enumerator
WEIGHT_UNSET 
WEIGHT_NORMAL 
WEIGHT_BOLD 

◆ TEXT_ANCHOR

Enumerator
ANCHOR_UNSET 
ANCHOR_START 
ANCHOR_MIDDLE 
ANCHOR_END 
ANCHOR_TOP 
ANCHOR_BOTTOM 

Constructor & Destructor Documentation

◆ CLText() [1/4]

CLText::CLText ( CDataContainer pParent)

◆ CLText() [2/4]

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() [3/4]

CLText::CLText ( const CLText source,
CDataContainer pParent = NULL 
)

Copy constructor.

References CKeyFactory::add(), CRootContainer::getKeyFactory(), and mKey.

◆ CLText() [4/4]

CLText::CLText ( const Text &  source,
CDataContainer pParent = NULL 
)

◆ ~CLText()

CLText::~CLText ( )

Destructor.

Destructor

References CRootContainer::getKeyFactory(), mKey, and CKeyFactory::remove().

Member Function Documentation

◆ getFontFamily()

const std::string & CLText::getFontFamily ( ) const

Returns the font family.

References mFontFamily.

Referenced by CLLayoutRenderer::getFontSpec(), and toSBML().

◆ getFontSize() [1/2]

CLRelAbsVector & CLText::getFontSize ( )

Returns the font size.

References mFontSize.

◆ getFontSize() [2/2]

const CLRelAbsVector & CLText::getFontSize ( ) const

Returns the font size.

References mFontSize.

Referenced by CLLayoutRenderer::getFontSpec().

◆ getFontStyle()

CLText::FONT_STYLE CLText::getFontStyle ( ) const

Returns the font style.

References mFontStyle.

Referenced by CLLayoutRenderer::getFontSpec(), and toSBML().

◆ getFontWeight()

CLText::FONT_WEIGHT CLText::getFontWeight ( ) const

Returns the font weight.

References mFontWeight.

Referenced by CLLayoutRenderer::getFontSpec(), and toSBML().

◆ getKey()

const std::string & CLText::getKey ( ) const
virtual

Returns the key string of the object.

Returns the key of the text element

Reimplemented from CDataObject.

References mKey.

◆ getText()

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().

◆ getTextAnchor()

CLText::TEXT_ANCHOR CLText::getTextAnchor ( ) const

Returns the text anchor.

References mTextAnchor.

Referenced by toSBML().

◆ getVTextAnchor()

CLText::TEXT_ANCHOR CLText::getVTextAnchor ( ) const

Returns the vertical text anchor.

References mVTextAnchor.

Referenced by toSBML().

◆ getX() [1/2]

CLRelAbsVector & CLText::getX ( )

Returns the x coordinate.

References mX.

◆ getX() [2/2]

const CLRelAbsVector & CLText::getX ( ) const

Returns the x coordinate.

References mX.

Referenced by CLLayoutRenderer::draw_text(), and CCopasiXML::saveRenderTextElement().

◆ getY() [1/2]

CLRelAbsVector & CLText::getY ( )

Returns the y coordinate.

References mY.

◆ getY() [2/2]

const CLRelAbsVector & CLText::getY ( ) const

Returns the y coordinate.

References mY.

Referenced by CLLayoutRenderer::draw_text(), and CCopasiXML::saveRenderTextElement().

◆ getZ() [1/2]

CLRelAbsVector & CLText::getZ ( )

Returns the z coordinate.

References mZ.

◆ getZ() [2/2]

const CLRelAbsVector & CLText::getZ ( ) const

Returns the z coordinate.

References mZ.

Referenced by CLLayoutRenderer::draw_text(), and CCopasiXML::saveRenderTextElement().

◆ isSetFontFamily()

bool CLText::isSetFontFamily ( ) const

Returns true if the font family has been set or false otherwise.

References mFontFamily.

Referenced by CLLayoutRenderer::getFontSpec().

◆ isSetFontSize()

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().

◆ isSetFontStyle()

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().

◆ isSetFontWeight()

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().

◆ isSetText()

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().

◆ isSetTextAnchor()

bool CLText::isSetTextAnchor ( ) const

Returns true if the horizonal alignment attribute has been set.

References ANCHOR_UNSET, and mTextAnchor.

◆ isSetVTextAnchor()

bool CLText::isSetVTextAnchor ( ) const

Returns true if the vertical alignment attribute has been set.

References ANCHOR_UNSET, and mVTextAnchor.

◆ operator=()

CLText& CLText::operator= ( const CLText source)
private

◆ setCoordinates()

void CLText::setCoordinates ( const CLRelAbsVector x,
const CLRelAbsVector y,
const CLRelAbsVector z = CLRelAbsVector(0.0, 0.0) 
)

Sets the coordinates.

References mX, mY, and mZ.

Referenced by RenderTextHandler::processStart().

◆ setFontFamily()

void CLText::setFontFamily ( const std::string &  family)

Sets the font family.

References mFontFamily.

Referenced by RenderTextHandler::processStart().

◆ setFontSize()

void CLText::setFontSize ( const CLRelAbsVector size)

Sets the font size.

References mFontSize.

Referenced by RenderTextHandler::processStart().

◆ setFontStyle()

void CLText::setFontStyle ( CLText::FONT_STYLE  style)

Sets the font style.

References mFontStyle.

Referenced by CLText(), and RenderTextHandler::processStart().

◆ setFontWeight()

void CLText::setFontWeight ( CLText::FONT_WEIGHT  weight)

Sets the font weight.

References mFontWeight.

Referenced by CLText(), and RenderTextHandler::processStart().

◆ setText()

void CLText::setText ( const std::string &  text)

Sets the text for the text element.

References mText.

Referenced by RenderTextHandler::processEnd().

◆ setTextAnchor()

void CLText::setTextAnchor ( CLText::TEXT_ANCHOR  anchor)

Sets the font anchor.

Sets the text anchor.

References mTextAnchor.

Referenced by CLText(), and RenderTextHandler::processStart().

◆ setVTextAnchor()

void CLText::setVTextAnchor ( CLText::TEXT_ANCHOR  anchor)

Sets the font anchor.

Sets the vertical text anchor.

References mVTextAnchor.

Referenced by CLText(), and RenderTextHandler::processStart().

◆ setX()

void CLText::setX ( const CLRelAbsVector coord)

Sets the x coordinate.

References mX.

◆ setY()

void CLText::setY ( const CLRelAbsVector coord)

Sets the y coordinate.

References mY.

◆ setZ()

void CLText::setZ ( const CLRelAbsVector coord)

Sets the z coordinate.

References mZ.

◆ toSBML()

Text * CLText::toSBML ( unsigned int  level,
unsigned int  version 
) const

Member Data Documentation

◆ mFontFamily

std::string CLText::mFontFamily
protected

◆ mFontSize

CLRelAbsVector CLText::mFontSize
protected

◆ mFontStyle

FONT_STYLE CLText::mFontStyle
protected

◆ mFontWeight

FONT_WEIGHT CLText::mFontWeight
protected

◆ mKey

std::string CLText::mKey
protected

key for the object.

Referenced by CLText(), getKey(), and ~CLText().

◆ mText

std::string CLText::mText
protected

Referenced by getText(), isSetText(), and setText().

◆ mTextAnchor

TEXT_ANCHOR CLText::mTextAnchor
protected

◆ mVTextAnchor

TEXT_ANCHOR CLText::mVTextAnchor
protected

◆ mX

CLRelAbsVector CLText::mX
protected

Referenced by getX(), setCoordinates(), setX(), and toSBML().

◆ mY

CLRelAbsVector CLText::mY
protected

Referenced by getY(), setCoordinates(), setY(), and toSBML().

◆ mZ

CLRelAbsVector CLText::mZ
protected

Referenced by getZ(), setCoordinates(), setZ(), and toSBML().


The documentation for this class was generated from the following files: