4 * This file is part of LyX, the document processor.
5 * Licence details can be found in the file COPYING.
7 * Provide a set of typedefs for commonly used things like sizes and
8 * indices wile trying to stay compatible with types used
9 * by the standard containers.
11 * \author André Pönitz
13 * Full author contact details are available in file CREDITS.
23 /// a type for positions used in paragraphs
24 // needs to be signed for a while to hold the special value -1 that is
26 typedef ptrdiff_t pos_type;
28 /// a type for paragraph offsets
29 typedef ptrdiff_t paroffset_type;
31 /// a type for the nesting depth of a paragraph
32 typedef size_t depth_type;
34 // set this to '0' if you want to have really safe types
38 typedef size_t size_type;
40 /// a type used for numbering text classes
41 typedef size_t textclass_type;
45 // These structs wrap simple things to make them distinguishible
47 // It's a shame that different typedefs are not "really" different
51 typedef size_t base_type;
53 size_type(base_type t) { data_ = t; }
55 operator base_type() const { return data_; }
61 struct textclass_type {
63 typedef size_t base_type;
65 textclass_type(base_type t) { data_ = t; }
67 operator base_type() const { return data_; }
78 // the word around the cursor, only if the cursor is
81 // the word around the cursor
83 /// the word begining from the cursor position
85 /// the word around the cursor or before the cursor
87 /// the next word (not yet used)