Wt: Wt::WTextItem Class Reference

Wt 3.3.0

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes

- Class List
- Class Hierarchy
- Class Members

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

All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator