2000-03-06 02:42:40 +00:00
|
|
|
// -*- C++ -*-
|
|
|
|
#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
|