/* $Id: dumb.cpp 1.1 1995/07/10 12:47:36 leon Exp $
 */
// This is outdated source


class TOutputWindow : public TWindow
{

TTerminal *term;

public:
  TOutputWindow( TRect bounds, const char *title,
                 ostream_withassign& ostr, ushort bufsize );
  void attach( ostream_withassign& ostr );
};

TOutputWindow::TOutputWindow( TRect bounds, const char *title,
                              ostream_withassign& ostr, ushort bufsize ) :
              TWindowInit( TOutputWindow::initFrame ),
              TWindow( bounds, title, wnNoNumber )
{
  bounds = getExtent();
  term = new TTerminal( bounds,
                        standardScrollBar( sbHorizontal | sbHandleKeyboard ),
                        standardScrollBar( sbVertical | sbHandleKeyboard ),
                        bufsize );
  insert( term );
  otstream ot( term );
  ot << "Terminal window \"" << title << "\" created. " << endl;
  ostr = ot;
}

//------------------------------------------------------------------------

void TOutputWindow::attach( ostream_withassign& ostr )
{
  ostr = term;
}


syntax highlighted by Code2HTML, v. 0.9.1