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
19 // this probably could be improved by using <cstddef>...
24 /// a type for positions used in paragraphs
25 // needs to be signed for a while to hold the special value -1 that is
27 typedef std::vector<char>::difference_type pos_type;
30 // set this to '0' if you want to have really safe types
34 typedef std::vector<char>::size_type size_type;
36 /// a type used for numbering text classes
37 // used to be LyXTextClassList::size_type
38 typedef std::vector<char>::size_type textclass_type;
42 // These structs wrap simple things to make them distinguishible
44 // It's a shame that different typedefs are not "really" different
48 typedef std::vector<char>::size_type base_type;
50 size_type(base_type t) { data_ = t; }
52 operator base_type() const { return data_; }
58 struct textclass_type {
60 typedef std::vector<char>::size_type base_type;
62 textclass_type(base_type t) { data_ = t; }
64 operator base_type() const { return data_; }
75 // the word around the cursor, only if the cursor is
78 // the word around the cursor
80 /// the word begining from the cursor position
82 /// the word around the cursor or before the cursor
84 /// the next word (not yet used)