Wt  4.0.2
Public Member Functions | List of all members
Wt::WTextItem Class Reference

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

#include <Wt/WPaintDevice.h>

Public Member Functions

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

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 support 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 Fri Nov 24 2017 for the C++ Web Toolkit (Wt) by doxygen 1.8.11