Code

Fix variable name legibility.
[inkscape.git] / src / libnrtype / text-boundary.h
1 /** @file
2  * @brief Definition of the structure text_boundary
3  */
4 /* This program is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU General Public License
6  * as published by the Free Software Foundation; either version 2
7  * of the License, or (at your option) any later version.
8  *
9  * See the file COPYING for details.
10  */
12 #ifndef TEXT_BOUNDARY_H_INKSCAPE
13 #define TEXT_BOUNDARY_H_INKSCAPE
15 #include "libnrtype/boundary-type.h"
18 /**
19  * A character/word/paragraph boundary in the text, used by TextWrapper.
20  *
21  * (Boundaries are paired.)
22  */
23 struct text_boundary {
24     /** Index of the boundary in the text: first char of the text chunk if 'start' boundary, char
25      *  right after the boundary otherwise.
26      */
27     int uni_pos;
28     BoundaryType type;    ///< Kind of boundary.
29     bool start;   ///< Indicates whether this marks the beginning or end of a chunk.
30     unsigned other;   ///< Index in bounds[] of the corresponding end/beginning boundary.
31     unsigned old_ix;  ///< Temporary storage used solely SortBoundaries.
32     /// Data for this boundary; usually, one int is enough.
33     union {
34         int i;
35         double f;
36         void *p;
37     } data;
38 };
41 #endif /* !TEXT_BOUNDARY_H_INKSCAPE */
43 /*
44   Local Variables:
45   mode:c++
46   c-file-style:"stroustrup"
47   c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
48   indent-tabs-mode:nil
49   fill-column:99
50   End:
51 */
52 // vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 :