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;
29 /// a type for the nesting depth of a paragraph
30 typedef unsigned int depth_type;
32 // set this to '0' if you want to have really safe types
36 typedef std::vector<char>::size_type size_type;
38 /// a type used for numbering text classes
39 // used to be LyXTextClassList::size_type
40 typedef std::vector<char>::size_type textclass_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 std::vector<char>::size_type base_type;
52 size_type(base_type t) { data_ = t; }
54 operator base_type() const { return data_; }
60 struct textclass_type {
62 typedef std::vector<char>::size_type base_type;
64 textclass_type(base_type t) { data_ = t; }
66 operator base_type() const { return data_; }
77 // the word around the cursor, only if the cursor is
80 // the word around the cursor
82 /// the word begining from the cursor position
84 /// the word around the cursor or before the cursor
86 /// the next word (not yet used)