25 ClassImp(TGTextViewStreamBuf);
30 TGTextViewStreamBuf::TGTextViewStreamBuf(TGTextView *textview) :
33 fInputbuffer.reserve(32);
34 setg(&fInputbuffer[0], &fInputbuffer[0], &fInputbuffer[0]);
35 setp(&fInputbuffer[0], &fInputbuffer[0]);
42 Int_t TGTextViewStreamBuf::overflow(Int_t c)
44 typedef std::char_traits<char> Tr;
46 return Tr::not_eof(c);
48 fLinebuffer.push_back(
'\0');
49 fTextView->AddLineFast(&fLinebuffer[0]);
51 fTextView->ShowBottom();
53 gSystem->ProcessEvents();
55 fLinebuffer.push_back(c);
63 TGTextViewostream::TGTextViewostream(
const TGWindow* parent, UInt_t w,
64 UInt_t h,Int_t
id, UInt_t sboptions,
66 TGTextView(parent, w, h, id, sboptions, back), std::ostream(&fStreambuffer),
74 TGTextViewostream::TGTextViewostream(
const TGWindow *parent, UInt_t w,
75 UInt_t h, TGText *text, Int_t
id,
76 UInt_t sboptions, ULong_t back):
77 TGTextView(parent, w, h, text, id, sboptions, back),
78 std::ostream(&fStreambuffer), fStreambuffer(this)
85 TGTextViewostream::TGTextViewostream(
const TGWindow *parent, UInt_t w,
86 UInt_t h,
const char *
string, Int_t
id,
87 UInt_t sboptions, ULong_t back):
88 TGTextView(parent, w, h, string, id, sboptions, back),
89 std::ostream(&fStreambuffer), fStreambuffer(this)