Tentata modifica della gestione delle scrollbar nella finestra di anteprima

git-svn-id: svn://10.65.10.50/trunk@355 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
guy 1994-10-12 13:01:07 +00:00
parent 33d18d8089
commit c78072e5c4
2 changed files with 30 additions and 5 deletions

View File

@ -1,4 +1,4 @@
// $Id: relation.cpp,v 1.16 1994-10-11 17:36:31 guy Exp $
// $Id: relation.cpp,v 1.17 1994-10-12 13:01:03 guy Exp $
// relation.cpp
// fv 12/8/93
// relation class for isam files
@ -661,7 +661,8 @@ FILE* TCursor::open_index(bool create) const
FILE* f = fopen(_indexname, create ? w : r);
if (f == NULL)
fatal_box("Can't use cursor index for file %d: '%s'\n", file().filehnd()->ln, _indexname);
fatal_box("Can't use cursor index for file %d: '%s'\n",
file().filehnd()->ln, (const char*)_indexname);
return f;
}

View File

@ -1180,7 +1180,7 @@ void TViswin::handler (WINDOW win, EVENT * ep)
case SC_PAGE_UP:
if (ep->type == E_VSCROLL)
{
if (origin ().y > 0)
if (origin().y > 0)
{
kdiff = (int) (_point.y - origin ().y);
new_origin = origin ().y > _textrows ?
@ -1195,7 +1195,10 @@ void TViswin::handler (WINDOW win, EVENT * ep)
_need_update = FALSE;
}
else
{
beep ();
update_thumb(-1, 0);
}
}
else
{
@ -1214,7 +1217,10 @@ void TViswin::handler (WINDOW win, EVENT * ep)
_need_update = FALSE;
}
else
{
beep ();
update_thumb(0, -1);
}
}
break;
case SC_LINE_UP:
@ -1231,7 +1237,10 @@ void TViswin::handler (WINDOW win, EVENT * ep)
_need_scroll = down;
}
else
{
beep ();
update_thumb(-1, 0);
}
}
else
{
@ -1246,7 +1255,10 @@ void TViswin::handler (WINDOW win, EVENT * ep)
_need_scroll = right;
}
else
{
beep ();
update_thumb(0, -1);
}
}
break;
case SC_PAGE_DOWN:
@ -1268,7 +1280,10 @@ void TViswin::handler (WINDOW win, EVENT * ep)
_need_update = FALSE;
}
else
{
beep ();
update_thumb(-1, _txt.lines()-_textrows-1);
}
}
else
{
@ -1287,7 +1302,10 @@ void TViswin::handler (WINDOW win, EVENT * ep)
_need_update = FALSE;
}
else
{
beep ();
update_thumb(255-_textcolumns, -1);
}
}
break;
case SC_LINE_DOWN:
@ -1304,12 +1322,15 @@ void TViswin::handler (WINDOW win, EVENT * ep)
_need_scroll = up;
}
else
{
beep ();
update_thumb(-1, _txt.lines()-_textrows-1);
}
}
else
{
_need_update = FALSE;
if ((origin ().x + _textcolumns) < 255)
if ((origin ().x + _textcolumns) < 256)
{
if (need_paint_sel (FALSE))
erase_selection ();
@ -1319,7 +1340,10 @@ void TViswin::handler (WINDOW win, EVENT * ep)
_point.x++;
}
else
{
beep ();
update_thumb(255-_textcolumns, -1);
}
}
break;
case SC_THUMB:
@ -1332,7 +1356,7 @@ void TViswin::handler (WINDOW win, EVENT * ep)
p.y = ep->type == E_HSCROLL ? origin ().y : ep->v.scroll.pos;
if ((p.y + _textrows) >= _txt.lines ())
p.y = _txt.lines () - _textrows;
p.y = _txt.lines () - _textrows -1;
if ((p.x + _textcolumns) >= 255)
p.x = 255 - _textcolumns;