83a825b554811a3e83b67f20ca29f729274f3f69
1 #ifndef TEXT_BOUNDARY_H_INKSCAPE
2 #define TEXT_BOUNDARY_H_INKSCAPE
4 /** \file Definition of text_boundary. */
6 /*
7 * License: May be redistributed with or without modifications under the terms of the Gnu General
8 * Public License as published by the Free Software Foundation, version 2 or (at your option) any
9 * later version.
10 */
12 #include "libnrtype/boundary-type.h"
15 /**
16 * A character/word/paragraph boundary in the text, used by TextWrapper.
17 *
18 * (Boundaries are paired.)
19 */
20 struct text_boundary {
21 /** Index of the boundary in the text: first char of the text chunk if 'start' boundary, char
22 * right after the boundary otherwise.
23 */
24 int uni_pos;
25 BoundaryType type; ///< Kind of boundary.
26 bool start; ///< Indicates whether this marks the beginning or end of a chunk.
27 unsigned other; ///< Index in bounds[] of the corresponding end/beginning boundary.
28 unsigned old_ix; ///< Temporary storage used solely SortBoundaries.
29 /// Data for this boundary; usually, one int is enough.
30 union {
31 int i;
32 double f;
33 void *p;
34 } data;
35 };
38 #endif /* !TEXT_BOUNDARY_H_INKSCAPE */
40 /*
41 Local Variables:
42 mode:c++
43 c-file-style:"stroustrup"
44 c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
45 indent-tabs-mode:nil
46 fill-column:99
47 End:
48 */
49 // vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 :