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 // FIXME: should be unsigned as well.
30 // however, simply changing it breaks a downward loop somewhere...
31 typedef ptrdiff_t pit_type;
33 /// a type for the nesting depth of a paragraph
34 typedef size_t depth_type;
36 // set this to '0' if you want to have really safe types
40 typedef size_t size_type;
44 // These structs wrap simple things to make them distinguishible
46 // It's a shame that different typedefs are not "really" different
50 typedef size_t base_type;
52 size_type(base_type t) { data_ = t; }
54 operator base_type() const { return data_; }
64 // the word around the cursor, only if the cursor is
67 // the word around the cursor
69 /// the word begining from the cursor position
71 /// the word around the cursor or before the cursor
73 /// the next word (not yet used)