30#include <koffice_export.h>
33#include "vcomposite.h"
37typedef TQPtrList<VPath> VPathList;
38typedef TQPtrListIterator<VPath> VPathListIterator;
44class KARBONBASE_EXPORT VText :
public VObject
59 VText( VObject* parent, VState state = normal );
60 VText(
const TQFont &font,
const VSubpath& basePath, Position position, Alignment alignment,
const TQString& text );
61 VText(
const VText& text );
65 virtual void setText(
const TQString& text );
66 virtual const TQString& text() {
return m_text; }
67 virtual void setFont(
const TQFont& font ) { m_font = font; }
68 virtual const TQFont& font() {
return m_font; }
69 virtual void setBasePath(
const VSubpath& path ) { m_basePath = path; }
70 virtual VSubpath& basePath() {
return m_basePath; }
71 virtual void setPosition( Position position ) { m_position = position; }
72 virtual Position position() {
return m_position; }
73 virtual void setAlignment( Alignment alignment ) { m_alignment = alignment; }
74 virtual Alignment alignment() {
return m_alignment; }
75 virtual void setUseShadow(
bool state ) { m_shadow = state; }
76 virtual bool useShadow() {
return m_shadow; }
77 virtual void setShadow(
int angle,
int distance,
bool translucent )
78 { m_translucentShadow = translucent; m_shadowAngle = angle; m_shadowDistance = distance; }
79 virtual bool translucentShadow() {
return m_translucentShadow; }
80 virtual int shadowAngle() {
return m_shadowAngle; }
81 virtual int shadowDistance() {
return m_shadowDistance; }
82 virtual void setOffset(
double offset );
83 virtual double offset() {
return m_offset; }
88 const VPathList& glyphs()
const
93 virtual void draw( VPainter *painter,
const KoRect* rect = 0L )
const;
97 virtual void save( TQDomElement& element )
const;
98 virtual void load(
const TQDomElement& element );
100 virtual VText*
clone()
const;
101 virtual VGroup* toVGroup()
const;
103 virtual void setState(
const VState state );
105 virtual void accept( VVisitor& visitor );
107#ifdef HAVE_KARBONTEXT
111 TQString buildRequest( TQString family,
int weight,
int slant,
double size,
int &
id );
122 Alignment m_alignment;
127 bool m_translucentShadow;
128 int m_shadowDistance;
Base class for all sort of VObject conglomerats.
The base class for all karbon objects.
virtual VObject * clone() const =0
Create an exact copy of this object.
virtual void setState(const VState state)
Sets the state to a specified new state.
virtual void accept(VVisitor &)
Accept a VVisitor.
virtual DCOPObject * dcopObject()
Returns pointer to internal DCOP object.
virtual const KoRect & boundingBox() const
Calculates the tightest bounding box around the object.
virtual void load(const TQDomElement &element)
Load this object's state from xml and initialize this object accordingly.
virtual void save(TQDomElement &element) const
Save this object's state to xml.
virtual void draw(VPainter *painter, const KoRect *rect=0L) const
Draw the object to a painting device.