~centralelyon2010/inkscape/imagelinks2

« back to all changes in this revision

Viewing changes to src/libnrtype/text-boundary.h

  • Committer: mental
  • Date: 2006-01-16 02:36:01 UTC
  • Revision ID: mental@users.sourceforge.net-20060116023601-wkr0h7edl5veyudq
moving trunk for module inkscape

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#ifndef TEXT_BOUNDARY_H_INKSCAPE
 
2
#define TEXT_BOUNDARY_H_INKSCAPE
 
3
 
 
4
/** \file Definition of text_boundary. */
 
5
 
 
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
 */
 
11
 
 
12
#include "libnrtype/boundary-type.h"
 
13
 
 
14
 
 
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
};
 
36
 
 
37
 
 
38
#endif /* !TEXT_BOUNDARY_H_INKSCAPE */
 
39
 
 
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 :