mirror of
https://github.com/ksherlock/TwoTerm.git
synced 2024-12-22 22:29:51 +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];
|
int _vp[4];
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
class ViewPort;
|
class TextPort;
|
||||||
ViewPort *_viewPort;
|
TextPort *_textPort;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
@ -156,10 +156,10 @@ enum {
|
|||||||
{
|
{
|
||||||
_state = StateText;
|
_state = StateText;
|
||||||
|
|
||||||
if (_viewPort)
|
if (_textPort)
|
||||||
{
|
{
|
||||||
delete _viewPort;
|
delete _textPort;
|
||||||
_viewPort = NULL;
|
_textPort = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
// set flags to plain text.
|
// set flags to plain text.
|
||||||
@ -179,7 +179,7 @@ enum {
|
|||||||
|
|
||||||
-(void)dealloc
|
-(void)dealloc
|
||||||
{
|
{
|
||||||
delete _viewPort;
|
delete _textPort;
|
||||||
[super dealloc];
|
[super dealloc];
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -391,16 +391,18 @@ enum {
|
|||||||
|
|
||||||
if (_vp[0] == 0 && _vp[1] == 80 && _vp[2] == 0 && _vp[3] == 24)
|
if (_vp[0] == 0 && _vp[1] == 80 && _vp[2] == 0 && _vp[3] == 24)
|
||||||
{
|
{
|
||||||
delete _viewPort;
|
delete _textPort;
|
||||||
_viewPort = NULL;
|
_textPort = NULL;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (!_viewPort) _viewPort = new ViewPort;
|
if (!_textPort) _textPort = new TextPort;
|
||||||
_viewPort->frame = iRect(_vp[0], _vp[2], _vp[1] - _vp[0], _vp[3] - _vp[2]);
|
_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