]> git.lyx.org Git - lyx.git/blob - src/support/lyxmanip.h
remove lyxrc dependence from support/*
[lyx.git] / src / support / lyxmanip.h
1 // -*- C++ -*-
2 /**
3  * \file lyxmanip.h
4  * This file is part of LyX, the document processor.
5  * Licence details can be found in the file COPYING.
6  *
7  * \author Lars Gullik Bjønnes
8  *
9  * Full author contact details are available in file CREDITS.
10  */
11
12 #ifndef LYX_MANIP_H
13 #define LYX_MANIP_H
14
15 #include "support/std_ostream.h"
16
17
18 namespace lyx {
19
20 ///
21 struct NewLineAndDepth_ {
22         int depth_;
23 };
24
25 ///
26 inline
27 NewLineAndDepth_ newlineAndDepth(int n)
28 {
29         NewLineAndDepth_ nlad_;
30         nlad_.depth_ = n;
31         return nlad_;
32 }
33
34 ///
35 inline
36 std::ostream & operator<<(std::ostream & os, NewLineAndDepth_ const & nlad_)
37 {
38         os << std::string(nlad_.depth_, ' ');
39         return os;
40 }
41
42
43 } // namespace lyx
44
45 #endif