Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
TGTextViewStream.h
Go to the documentation of this file.
1// @(#)root/gui:$Id$
2
3/*************************************************************************
4 * Copyright (C) 1995-2021, Rene Brun and Fons Rademakers. *
5 * All rights reserved. *
6 * *
7 * For the licensing terms see $ROOTSYS/LICENSE. *
8 * For the list of contributors see $ROOTSYS/README/CREDITS. *
9 *************************************************************************/
10
11#ifndef ROOT_TGTextViewStream
12#define ROOT_TGTextViewStream
13
14
15#include "TGTextView.h"
16#include <vector>
17#include <streambuf>
18#include <iostream>
19
20#if defined (R__WIN32) && defined (__MAKECINT__)
21typedef basic_streambuf<char, char_traits<char> > streambuf;
22#endif
23
24class TGTextViewStreamBuf : public std::streambuf
25{
26private:
28 std::vector<char> fLinebuffer;
29
30protected:
31 std::vector<char> fInputbuffer;
32 typedef std::char_traits<char> traits;
33 int overflow(int = traits::eof()) override;
34
35public:
38
39 ClassDef(TGTextViewStreamBuf, 0) // Specialization of std::streambuf
40};
41
42
43class TGTextViewostream : public TGTextView, public std::ostream
44{
45protected:
47
48public:
49 TGTextViewostream(const TGWindow* parent = nullptr, UInt_t w = 1, UInt_t h = 1,
50 Int_t id = -1, UInt_t sboptions = 0,
52 TGTextViewostream(const TGWindow *parent, UInt_t w, UInt_t h,
53 TGText *text, Int_t id, UInt_t sboptions, ULong_t back);
54 TGTextViewostream(const TGWindow *parent, UInt_t w, UInt_t h,
55 const char *string, Int_t id, UInt_t sboptions,
56 ULong_t back);
57 virtual ~TGTextViewostream() {}
58
59 ClassDefOverride(TGTextViewostream, 0) // Specialization of TGTextView and std::ostream
60};
61
62#endif
ULong_t Pixel_t
Pixel value.
Definition GuiTypes.h:40
#define h(i)
Definition RSha256.hxx:106
unsigned long ULong_t
Definition RtypesCore.h:55
#define ClassDef(name, id)
Definition Rtypes.h:337
#define ClassDefOverride(name, id)
Definition Rtypes.h:341
Option_t Option_t TPoint TPoint const char text
static Pixel_t GetWhitePixel()
Get white pixel value.
Definition TGFrame.cxx:709
std::vector< char > fLinebuffer
std::char_traits< char > traits
std::vector< char > fInputbuffer
int overflow(int=traits::eof()) override
Method called to put a character into the controlled output sequence without changing the current pos...
A TGTextView is a text viewer widget.
Definition TGTextView.h:22
virtual ~TGTextViewostream()
TGTextViewStreamBuf fStreambuffer
A TGText is a multi line text buffer.
Definition TGText.h:57
ROOT GUI Window base class.
Definition TGWindow.h:23