4 * This file is part of LyX, the document processor.
5 * Licence details can be found in the file COPYING.
7 * \author Jean-Marc Lasgouttes
9 * Full author contact details are available in file CREDITS.
15 #include "lyxtextclass.h"
19 Context(bool need_layout_,
20 LyXTextClass const & textclass_,
21 LyXLayout_ptr layout_ = LyXLayout_ptr(),
22 LyXLayout_ptr parent_layout_= LyXLayout_ptr());
24 // Output a \begin_layout is requested
25 void check_layout(std::ostream & os);
27 // Output a \end_layout if needed
28 void check_end_layout(std::ostream & os);
30 // Output a \begin_deeper if needed
31 void check_deeper(std::ostream & os);
33 // Output a \end_deeper if needed
34 void check_end_deeper(std::ostream & os);
36 // dump content on stream (for debugging purpose), with
37 // description \c desc.
38 void dump(std::ostream &, std::string const & desc = "context") const;
40 // Do we need to output some \begin_layout command before the
43 // Do we need to output some \end_layout command
45 // We may need to add something after this \begin_layout command
46 std::string extra_stuff;
47 // If there has been an \begin_deeper, we'll need a matching
50 // If we are in an itemize-like environment, we need an \item
51 // for each paragraph, otherwise this has to be a deeper
54 // we are handling a standard paragraph in an itemize-like
56 bool deeper_paragraph;
58 // The textclass of the document. Could actually be a global variable
59 LyXTextClass const & textclass;
60 // The layout of the current paragraph
62 // The layout of the outer paragraph (for environment layouts)
63 LyXLayout_ptr parent_layout;