]> git.lyx.org Git - lyx.git/blob - src/RowFlags.h
Avoid full metrics computation with Update:FitCursor
[lyx.git] / src / RowFlags.h
1 // -*- C++ -*-
2 /**
3  * \file RowFlags.h
4  * This file is part of LyX, the document processor.
5  * Licence details can be found in the file COPYING.
6  *
7  * \author Jean-Marc Lasgouttes
8  *
9  * Full author contact details are available in file CREDITS.
10  */
11
12 #ifndef ROWFLAGS_H
13 #define ROWFLAGS_H
14
15 // Do not include anything here
16
17 namespace lyx {
18
19 /* The list of possible flags, that can be combined. Some flags that
20  * should logically be here (e.g., AlwaysBreakBefore), do not exist.
21  * This is because the need has not been identitfied yet.
22  *
23  * Priorities when before/after disagree:
24  *      AlwaysBreak* > NoBreak* > Break* or CanBreak*.
25  */
26 enum RowFlags {
27         // Do not break before or after this element, except if really
28         // needed (between NoBreak* and CanBreak*).
29         Inline = 0,
30         // break row before this element if the row is not empty
31         BreakBefore = 1 << 0,
32         // break row whenever needed before this element
33         CanBreakBefore = 1 << 1,
34         // Avoid breaking row before this element
35         NoBreakBefore = 1 << 2,
36         // flush the row before this element (useful with BreakBefore)
37         FlushBefore = 1 << 3,
38         // force new (maybe empty) row after this element
39         AlwaysBreakAfter = 1 << 4,
40         // break row after this element if there are more elements
41         BreakAfter = 1 << 5,
42         // break row whenever needed after this element
43         CanBreakAfter = 1 << 6,
44         // Avoid breaking row after this element
45         NoBreakAfter = 1 << 7,
46         // The contents of the row may be broken in two (e.g. string)
47         CanBreakInside = 1 << 8,
48         // Flush the row that ends with this element
49         Flush = 1 << 9,
50         // specify an alignment (left, right) for a display element
51         // (default is center)
52         AlignLeft = 1 << 10,
53         AlignRight = 1 << 11,
54         // A display element breaks row at both ends
55         Display = FlushBefore | BreakBefore | BreakAfter,
56         // Flags that concern breaking after element
57         AfterFlags = AlwaysBreakAfter | BreakAfter | CanBreakAfter | NoBreakAfter
58 };
59
60 } // namespace lyx
61
62 #endif