#ifndef ROOT_TGTextViewStream
#define ROOT_TGTextViewStream
#ifndef ROOT_TGTextView
#include "TGTextView.h"
#endif
#include <vector>
#include <streambuf>
#include <iostream>
#if defined (R__WIN32) && defined (__MAKECINT__)
typedef basic_streambuf<char, char_traits<char> > streambuf;
#endif
class TGTextViewStreamBuf : public std::streambuf
{
private:
TGTextView *fTextView;
std::vector<char> fLinebuffer;
protected:
std::vector<char> fInputbuffer;
typedef std::char_traits<char> traits;
virtual int overflow(int = traits::eof());
public:
TGTextViewStreamBuf(TGTextView *textview);
virtual ~TGTextViewStreamBuf() { }
ClassDef(TGTextViewStreamBuf, 0)
};
class TGTextViewostream : public TGTextView, public std::ostream
{
protected:
TGTextViewStreamBuf fStreambuffer;
public:
TGTextViewostream(const TGWindow* parent = 0, UInt_t w = 1, UInt_t h = 1,
Int_t id = -1, UInt_t sboptions = 0,
Pixel_t back = TGTextView::GetWhitePixel());
TGTextViewostream(const TGWindow *parent, UInt_t w, UInt_t h,
TGText *text, Int_t id, UInt_t sboptions, ULong_t back);
TGTextViewostream(const TGWindow *parent, UInt_t w, UInt_t h,
const char *string, Int_t id, UInt_t sboptions,
ULong_t back);
virtual ~TGTextViewostream() { }
ClassDef(TGTextViewostream, 0)
};
#endif