mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-10 20:04:46 +00:00
6c300f72a2
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15422 a592a061-630c-0410-9148-cb99ea01b6c8
46 lines
676 B
C++
46 lines
676 B
C++
// -*- C++ -*-
|
|
/**
|
|
* \file lyxmanip.h
|
|
* This file is part of LyX, the document processor.
|
|
* Licence details can be found in the file COPYING.
|
|
*
|
|
* \author Lars Gullik Bjønnes
|
|
*
|
|
* Full author contact details are available in file CREDITS.
|
|
*/
|
|
|
|
#ifndef LYX_MANIP_H
|
|
#define LYX_MANIP_H
|
|
|
|
#include "support/std_ostream.h"
|
|
|
|
|
|
namespace lyx {
|
|
|
|
///
|
|
struct NewLineAndDepth_ {
|
|
int depth_;
|
|
};
|
|
|
|
///
|
|
inline
|
|
NewLineAndDepth_ newlineAndDepth(int n)
|
|
{
|
|
NewLineAndDepth_ nlad_;
|
|
nlad_.depth_ = n;
|
|
return nlad_;
|
|
}
|
|
|
|
///
|
|
inline
|
|
std::ostream & operator<<(std::ostream & os, NewLineAndDepth_ const & nlad_)
|
|
{
|
|
os << std::string(nlad_.depth_, ' ');
|
|
return os;
|
|
}
|
|
|
|
|
|
} // namespace lyx
|
|
|
|
#endif
|