Wt  3.2.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
Public Member Functions
Wt::WTextItem Class Reference

The result of a font metrics computation. More...

#include <Wt/WPaintDevice>

List of all members.

Public Member Functions

 WTextItem (const WString &text, double width, double nextWidth=-1)
 Constructor.
WString text () const
 Returns the measured text.
double width () const
 Returns the measured width.
double nextWidth () const
 Returns the width for a next line-break boundary.

Detailed Description

The result of a font metrics computation.

See also:
WPaintDevice::measureText()

Member Function Documentation

double Wt::WTextItem::nextWidth ( ) const

Returns the width for a next line-break boundary.

Returns the width until the next line-break boundary, or -1 if the underlying word boundary analysis does not suppor this.

WString Wt::WTextItem::text ( ) const

Returns the measured text.

If the item was measured with word breaking enabled, then the text may contain trailing whitespace that is not included in the width().

double Wt::WTextItem::width ( ) const

Returns the measured width.

Returns the text width, in device local coordinates (pixels).


Generated on Wed Jun 13 2012 for the C++ Web Toolkit (Wt) by doxygen 1.8.1