Where a caret goes, in the coordinate space the widget paints text in. More...
#include <caret.hpp>
Public Attributes | |
| float | x = 0.0f |
| Left edge of the caret, for every style. | |
| float | cell_top = 0.0f |
| Top of the glyph cell. | |
| float | cell_height = 0.0f |
| Height of the glyph cell. | |
| float | baseline = 0.0f |
| Text baseline, for the underline shape. | |
| float | advance = 0.0f |
| Width of the glyph at the caret; 0 at end of text. | |
| float | nominal_advance = 0.0f |
| Fallback width when advance is 0. | |
| float | stroke = 1.5f |
| I-beam width and underline thickness. | |
Where a caret goes, in the coordinate space the widget paints text in.
advance is the width of the glyph the caret sits on, which sizes the underline and block shapes. At the end of the text there is no such glyph, so advance is 0 and nominal_advance is used instead — measure a representative glyph (a digit, for a numeric field) rather than leaving it 0, or the caret collapses to nothing in those two styles.
| float pulp::view::CaretMetrics::advance = 0.0f |
Width of the glyph at the caret; 0 at end of text.
| float pulp::view::CaretMetrics::baseline = 0.0f |
Text baseline, for the underline shape.
| float pulp::view::CaretMetrics::cell_height = 0.0f |
Height of the glyph cell.
| float pulp::view::CaretMetrics::cell_top = 0.0f |
Top of the glyph cell.
| float pulp::view::CaretMetrics::nominal_advance = 0.0f |
Fallback width when advance is 0.
| float pulp::view::CaretMetrics::stroke = 1.5f |
I-beam width and underline thickness.
| float pulp::view::CaretMetrics::x = 0.0f |
Left edge of the caret, for every style.