]> git.lyx.org Git - lyx.git/blob - src/support/lyxmanip.h
a03a0c7e0532fcf568c07ca92f75193908df5755
[lyx.git] / src / support / lyxmanip.h
1 // -*- C++ -*-
2 #ifndef LYX_MANIP_H
3 #define LYX_MANIP_H
4
5 #include "support/LOstream.h"
6
7 using std::ostream;
8
9 ///
10 struct NewLineAndDepth_ {
11         int depth_;
12 };
13
14 ///
15 inline
16 NewLineAndDepth_ newlineAndDepth(int n)
17 {
18         NewLineAndDepth_ nlad_;
19         nlad_.depth_ = n;
20         return nlad_;
21 }
22
23 ///
24 inline
25 ostream & operator<<(ostream & os, NewLineAndDepth_ const & nlad_)
26 {
27         os << string(nlad_.depth_, ' ');
28         return os;
29 }
30
31 #endif