2000-03-06 02:42:40 +00:00
|
|
|
// -*- C++ -*-
|
2003-06-18 09:56:10 +00:00
|
|
|
/**
|
|
|
|
* \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
|
|
|
|
*/
|
|
|
|
|
2000-03-06 02:42:40 +00:00
|
|
|
#ifndef LYX_MANIP_H
|
|
|
|
#define LYX_MANIP_H
|
|
|
|
|
2000-03-28 02:18:55 +00:00
|
|
|
#include "support/LOstream.h"
|
|
|
|
|
2000-03-08 01:45:25 +00:00
|
|
|
///
|
|
|
|
struct NewLineAndDepth_ {
|
|
|
|
int depth_;
|
|
|
|
};
|
2000-03-06 02:42:40 +00:00
|
|
|
|
2000-10-11 21:06:43 +00:00
|
|
|
///
|
2000-03-06 02:42:40 +00:00
|
|
|
inline
|
2000-03-08 01:45:25 +00:00
|
|
|
NewLineAndDepth_ newlineAndDepth(int n)
|
2000-03-06 02:42:40 +00:00
|
|
|
{
|
2000-03-08 01:45:25 +00:00
|
|
|
NewLineAndDepth_ nlad_;
|
|
|
|
nlad_.depth_ = n;
|
|
|
|
return nlad_;
|
2000-03-06 02:42:40 +00:00
|
|
|
}
|
2000-03-28 02:18:55 +00:00
|
|
|
|
2000-10-11 21:06:43 +00:00
|
|
|
///
|
2000-03-06 02:42:40 +00:00
|
|
|
inline
|
2000-04-04 00:19:15 +00:00
|
|
|
std::ostream & operator<<(std::ostream & os, NewLineAndDepth_ const & nlad_)
|
2000-03-06 02:42:40 +00:00
|
|
|
{
|
2000-03-08 01:45:25 +00:00
|
|
|
os << string(nlad_.depth_, ' ');
|
|
|
|
return os;
|
2000-03-06 02:42:40 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|