Logo Search packages:      
Sourcecode: qcad version File versions  Download package

RS_Text Class Reference

#include <rs_text.h>

Inheritance diagram for RS_Text:

RS_EntityContainer RS_Entity RS_Undoable RS_Flags

List of all members.


Detailed Description

Class for a text entity. Please note that text strings can contain special characters such as %c for a diameter sign as well as unicode characters. Line feeds are stored as real line feeds in the string.

Author:
Andrew Mustun

Definition at line 134 of file rs_text.h.


Public Member Functions

virtual void addEntity (RS_Entity *entity)
void addGraphicVariable (const RS_String &key, const RS_String &val, int code)
void addGraphicVariable (const RS_String &key, int val, int code)
void addGraphicVariable (const RS_String &key, double val, int code)
virtual void adjustBorders (RS_Entity *entity)
virtual void calculateBorders ()
virtual void changeUndoState ()
virtual void clear ()
virtual RS_Entityclone ()
virtual unsigned long int count ()
virtual unsigned long int countDeep ()
virtual unsigned long int countSelected ()
RS_PtrListIterator< RS_EntitycreateIterator ()
virtual RS_EntitycurrentEntity ()
void delFlag (unsigned int f)
void delUserDefVar (RS_String key)
virtual void detach ()
virtual void draw (RS_Painter *painter, RS_GraphicView *view, double patternOffset=0.0)
virtual int entityAt ()
virtual RS_EntityentityAt (uint index)
virtual int findEntity (RS_Entity *entity)
virtual RS_EntityfirstEntity (RS2::ResolveLevel level=RS2::ResolveNone)
virtual void forcedCalculateBorders ()
int getAlignment ()
RS_StringList getAllKeys ()
double getAngle ()
RS_BlockgetBlock ()
RS_EntitygetBlockOrInsert ()
RS_TextData getData () const
virtual double getDistanceToPoint (const RS_Vector &coord, RS_Entity **entity, RS2::ResolveLevel level=RS2::ResolveNone, double solidDist=RS_MAXDOUBLE)
RS_DocumentgetDocument ()
RS2::TextDrawingDirection getDrawingDirection ()
bool getFlag (unsigned int f) const
unsigned int getFlags () const
RS_GraphicgetGraphic ()
RS2::Unit getGraphicUnit ()
double getGraphicVariableDouble (const RS_String &key, double def)
int getGraphicVariableInt (const RS_String &key, int def)
RS_String getGraphicVariableString (const RS_String &key, const RS_String &def)
RS2::HAlign getHAlign ()
double getHeight ()
unsigned long int getId () const
RS_InsertgetInsert ()
RS_Vector getInsertionPoint ()
RS_LayergetLayer (bool resolve=true) const
virtual double getLength ()
double getLineSpacingFactor ()
RS2::TextLineSpacingStyle getLineSpacingStyle ()
RS_Vector getMax () const
RS_Vector getMin () const
virtual RS_Vector getNearestCenter (const RS_Vector &coord, double *dist=NULL)
virtual RS_Vector getNearestDist (double, bool)
virtual RS_Vector getNearestDist (double distance, const RS_Vector &coord, double *dist=NULL)
virtual RS_Vector getNearestEndpoint (const RS_Vector &coord, double *dist=NULL)
RS_EntitygetNearestEntity (const RS_Vector &point, double *dist=NULL, RS2::ResolveLevel level=RS2::ResolveAll)
virtual RS_Vector getNearestIntersection (const RS_Vector &coord, double *dist=NULL)
virtual RS_Vector getNearestMiddle (const RS_Vector &coord, double *dist=NULL)
virtual RS_Vector getNearestPointOnEntity (const RS_Vector &coord, bool onEntity=true, double *dist=NULL, RS_Entity **entity=NULL)
virtual RS_Vector getNearestRef (const RS_Vector &coord, double *dist=NULL)
virtual RS_Vector getNearestSelectedRef (const RS_Vector &coord, double *dist=NULL)
int getNumberOfLines ()
RS_EntityContainergetParent () const
RS_Pen getPen (bool resolve=true) const
virtual RS_VectorSolutions getRefPoints ()
RS_Vector getSize () const
RS_String getStyle ()
double getStyleFactor (RS_GraphicView *view)
RS_String getText ()
double getUsedTextHeight ()
double getUsedTextWidth ()
RS_String * getUserDefVar (RS_String key)
RS2::VAlign getVAlign ()
double getWidth ()
virtual bool hasEndpointsWithinWindow (RS_Vector v1, RS_Vector v2)
void init ()
virtual void initId ()
virtual void insertEntity (int index, RS_Entity *entity)
virtual bool isAtomic () const
virtual bool isContainer () const
virtual bool isDocument () const
virtual bool isEdge () const
virtual bool isEmpty ()
virtual bool isHighlighted ()
virtual bool isInWindow (RS_Vector v1, RS_Vector v2)
virtual bool isLocked ()
virtual bool isParentSelected ()
virtual bool isPointOnEntity (const RS_Vector &coord, double tolerance=RS_TOLERANCE)
virtual bool isProcessed () const
virtual bool isSelected () const
virtual bool isUndone () const
virtual bool isVisible ()
virtual RS_EntitylastEntity (RS2::ResolveLevel level=RS2::ResolveNone)
virtual void mirror (RS_Vector axisPoint1, RS_Vector axisPoint2)
virtual void move (RS_Vector offset)
virtual void moveRef (const RS_Vector &ref, const RS_Vector &offset)
virtual void moveSelectedRef (const RS_Vector &ref, const RS_Vector &offset)
virtual RS_EntitynextEntity (RS2::ResolveLevel level=RS2::ResolveNone)
virtual bool optimizeContours ()
virtual RS_EntityprevEntity (RS2::ResolveLevel level=RS2::ResolveNone)
virtual bool removeEntity (RS_Entity *entity)
virtual void renameInserts (const RS_String &oldName, const RS_String &newName)
void reparent (RS_EntityContainer *parent)
virtual void replaceEntity (int index, RS_Entity *entity)
void resetBorders ()
void resetFlags ()
virtual void rotate (RS_Vector center, double angle)
 RS_Text (RS_EntityContainer *parent, const RS_TextData &d)
virtual RS2::EntityType rtti () const
virtual void scale (RS_Vector center, double factor)
virtual void scale (RS_Vector center, RS_Vector factor)
virtual void selectWindow (RS_Vector v1, RS_Vector v2, bool select=true, bool cross=false)
void setAlignment (int a)
void setAngle (double a)
virtual void setAutoUpdateBorders (bool enable)
void setFlag (unsigned int f)
void setFlags (unsigned int f)
void setHAlign (RS2::HAlign ha)
void setHeight (double h)
virtual void setHighlighted (bool on)
void setLayer (RS_Layer *l)
void setLayer (const RS_String &name)
void setLayerToActive ()
void setLineSpacingFactor (double f)
void setParent (RS_EntityContainer *p)
void setPen (const RS_Pen &pen)
void setPenToActive ()
virtual void setProcessed (bool on)
virtual bool setSelected (bool select=true)
void setStyle (const RS_String &s)
void setText (const RS_String &t)
virtual void setUndoCycle (RS_UndoCycle *cycle)
virtual void setUndoState (bool undone)
virtual void setUpdateEnabled (bool on)
void setUserDefVar (RS_String key, RS_String val)
void setVAlign (RS2::VAlign va)
virtual void setVisible (bool v)
virtual void stretch (RS_Vector firstCorner, RS_Vector secondCorner, RS_Vector offset)
void toggleFlag (unsigned int f)
virtual bool toggleSelected ()
virtual RS2::UndoableType undoRtti ()
virtual void undoStateChanged (bool undone)
void update ()
void updateAddLine (RS_EntityContainer *textLine, int lineCounter)
virtual void updateDimensions ()
virtual void updateInserts ()
virtual void updateSplines ()

Protected Attributes

RS_TextData data
RS_PtrList< RS_Entityentities
unsigned long int id
 Entity id.
RS_Layerlayer
 Pointer to layer.
RS_Vector maxV
 maximum coordinates
RS_Vector minV
 minimum coordinates
RS_EntityContainerparent
 Entity's parent entity or NULL is this entity has no parent.
RS_Pen pen
 pen (attributes) for this entity
RS_EntityContainersubContainer
bool updateEnabled
 auto updating enabled?
double usedTextHeight
double usedTextWidth

Static Protected Attributes

static bool autoUpdateBorders = true

Friends

std::ostream & operator<< (std::ostream &os, RS_Entity &e)
std::ostream & operator<< (std::ostream &os, RS_EntityContainer &ec)
std::ostream & operator<< (std::ostream &os, const RS_Text &p)

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

Generated by  Doxygen 1.6.0   Back to index