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.
|
|
|
|
|
*
|
2003-07-28 22:37:28 +00:00
|
|
|
|
* \author Lars Gullik Bj<EFBFBD>nnes
|
2003-06-18 09:56:10 +00:00
|
|
|
|
*
|
2003-08-23 00:17:00 +00:00
|
|
|
|
* Full author contact details are available in file CREDITS.
|
2003-06-18 09:56:10 +00:00
|
|
|
|
*/
|
|
|
|
|
|
2000-03-06 02:42:40 +00:00
|
|
|
|
#ifndef LYX_MANIP_H
|
|
|
|
|
#define LYX_MANIP_H
|
|
|
|
|
|
2003-09-05 17:23:11 +00:00
|
|
|
|
#include "support/std_string.h"
|
|
|
|
|
#include "support/std_ostream.h"
|
2000-03-28 02:18:55 +00:00
|
|
|
|
|
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
|