diff --git a/GNOConsole.h b/GNOConsole.h index 6baa06c..83f298d 100644 --- a/GNOConsole.h +++ b/GNOConsole.h @@ -21,8 +21,8 @@ int _vp[4]; #ifdef __cplusplus - class ViewPort; - ViewPort *_viewPort; + class TextPort; + TextPort *_textPort; #endif diff --git a/GNOConsole.mm b/GNOConsole.mm index 1941655..2b894f3 100644 --- a/GNOConsole.mm +++ b/GNOConsole.mm @@ -156,10 +156,10 @@ enum { { _state = StateText; - if (_viewPort) + if (_textPort) { - delete _viewPort; - _viewPort = NULL; + delete _textPort; + _textPort = NULL; } // set flags to plain text. @@ -179,7 +179,7 @@ enum { -(void)dealloc { - delete _viewPort; + delete _textPort; [super dealloc]; } @@ -391,16 +391,18 @@ enum { if (_vp[0] == 0 && _vp[1] == 80 && _vp[2] == 0 && _vp[3] == 24) { - delete _viewPort; - _viewPort = NULL; + delete _textPort; + _textPort = NULL; } else { - if (!_viewPort) _viewPort = new ViewPort; - _viewPort->frame = iRect(_vp[0], _vp[2], _vp[1] - _vp[0], _vp[3] - _vp[2]); + if (!_textPort) _textPort = new TextPort; + _textPort->frame = iRect(_vp[0], _vp[2], _vp[1] - _vp[0], _vp[3] - _vp[2]); + + _textPort->rightMargin = TextPort::RMTruncate; + _textPort->advanceCursor = true; + _textPort->scroll = true; - _viewPort->flags.wrap = 1; - _viewPort->flags.scroll = 1; }