mirror of
https://github.com/ksherlock/TwoTerm.git
synced 2024-12-22 07:30:40 +00:00
ViewPort -> TextPort
git-svn-id: svn://qnap.local/TwoTerm/trunk@1896 5590a31f-7b70-45f8-8c82-aa3a8e5f4507
This commit is contained in:
parent
8ecd1e0174
commit
35918005de
@ -21,8 +21,8 @@
|
||||
|
||||
int _vp[4];
|
||||
#ifdef __cplusplus
|
||||
class ViewPort;
|
||||
ViewPort *_viewPort;
|
||||
class TextPort;
|
||||
TextPort *_textPort;
|
||||
#endif
|
||||
|
||||
|
||||
|
@ -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;
|
||||
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user