Form non l'occambiato

Invecie viswin l'ocambiata
ecciomesso l'uppdate cuando glie si da il focus


git-svn-id: svn://10.65.10.50/trunk@2647 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
villa 1996-02-28 09:43:52 +00:00
parent 5d08350c49
commit 677751be4d
2 changed files with 35 additions and 37 deletions

View File

@ -3434,7 +3434,7 @@ void TForm::arrange_form()
// _ipy viene assunto uguale per entrambi i posizionamneti
str_pos = "\017"; // Questo e' 15 in ottale...
for (i=1; i < _ipy; i++) str_pos << "\n";
#if XVT_OS == XVT_OS_WIN || XVT_OS == XVT_OS_NT
#if XVT_OS == XVT_OS_WIN || XVT_OS == XVT_OS_NT
SpoolRow((char *) (const char *) str_pos, str_pos.len());
#else
@ -3454,11 +3454,11 @@ void TForm::arrange_form()
// TString bspc; bspc.fill('\b',str_pos.len()); // Questi servono per tornare indietro...
do
{
#if XVT_OS == XVT_OS_WIN || XVT_OS == XVT_OS_NT
#if XVT_OS == XVT_OS_WIN || XVT_OS == XVT_OS_NT
SpoolRow((char *)(const char *) str_pos, str_pos.len());
#else
lpt = fopen(device,"w");
if (lpt == NULL) fatal_box("Non rieso ad aprire il device %s.",device);
if (lpt == NULL) fatal_box("Non riesco ad aprire il device %s.",device);
// fprintf(lpt,"%s",(const char*) bspc);
fprintf(lpt,"%s\r",(const char*) str_pos);
fflush(lpt);

View File

@ -1266,7 +1266,8 @@ void TViswin::handler (WINDOW win, EVENT * ep)
static bool ignore = FALSE;
bool tlnk = FALSE;
int kdiff;
long new_origin;
long new_origin;
bool scrollated = FALSE;
switch (ep->type)
{
case E_USER:
@ -1288,7 +1289,7 @@ void TViswin::handler (WINDOW win, EVENT * ep)
if (_txt.lines () > 1l)
_need_update = FALSE;
else
force_update ();
/*force_*/update ();
}
autoscroll (FALSE);
_textrows = TEXTROWS;
@ -1514,18 +1515,6 @@ void TViswin::handler (WINDOW win, EVENT * ep)
break;
case E_MOUSE_MOVE:
{
/*
if (!_selecting && !_iscross) // no buttons pressed
{
p = ep->v.mouse.where;
if (in_text (p))
{
p.x += (origin ().x - 6);
p.y += (origin ().y - 1);
check_link (&p);
}
}
*/
if (_selecting || _iscross)
{
p = ep->v.mouse.where;
@ -1807,8 +1796,8 @@ void TViswin::handler (WINDOW win, EVENT * ep)
// for failed scrollings
if (!_selecting && _need_scroll == none)
{
check_link (&_point);
display_point ();
check_link(&_point);
display_point();
}
}
break;
@ -1818,27 +1807,34 @@ void TViswin::handler (WINDOW win, EVENT * ep)
if (_need_scroll != none)
{
_need_update = FALSE;
scrollated = TRUE;
scroll tmp = _need_scroll;
_need_scroll = none;
shift_screen (tmp);
if (!_selecting)
{
check_link (&_point);
display_point ();
check_link(&_point);
display_point();
}
if (_isselection)
display_selection ();
display_selection();
}
if (ep->type != E_UPDATE || _need_update)
TWindow ::handler (win, ep);
TWindow::handler(win, ep);
else if (ep->type == E_UPDATE)
update ();
{
if (!scrollated)
_need_update = TRUE;
update();
if (scrollated) display_point();
}
}
bool TViswin::on_key (KEY key)
{
EVENT_TYPE type = E_USER;
bool disp = FALSE;
if (_istimer)
return TRUE;
_timer = xvt_timer_create (win (), 50l);
@ -1880,14 +1876,14 @@ bool TViswin::on_key (KEY key)
break;
case CTRL_R:
_need_update = TRUE;
check_link ();
force_update ();
do_events ();
check_link (&_point);
check_link();
force_update();
do_events();
check_link(&_point);
break;
case K_ESC:
if (_isopen)
abort_print ();
abort_print();
else
{
@ -2009,17 +2005,16 @@ bool TViswin::on_key (KEY key)
dispatch_e_scroll (win(), K_TAB);
break;
case K_CTRL_UP:
dispatch_e_scroll (win(), K_UP);
disp = TRUE; dispatch_e_scroll (win(), K_UP);
break;
case K_CTRL_DOWN:
// TBI condizioniamo qui ??
dispatch_e_scroll (win(), K_DOWN);
disp = TRUE; dispatch_e_scroll (win(), K_DOWN);
break;
case K_ALT_LEFT:
dispatch_e_scroll (win(), K_LEFT);
disp = TRUE; dispatch_e_scroll (win(), K_LEFT);
break;
case K_ALT_RIGHT:
dispatch_e_scroll (win(), K_RIGHT);
disp = TRUE; dispatch_e_scroll (win(), K_RIGHT);
break;
case K_UP:
case K_SHIFT_UP:
@ -2161,15 +2156,18 @@ bool TViswin::on_key (KEY key)
}
if (_need_scroll != none)
{
disp = TRUE;
_need_update = FALSE;
scroll tmp = _need_scroll;
_need_scroll = none;
shift_screen (tmp);
shift_screen (tmp);
}
if (_isselection)
display_selection ();
check_link (&_point);
force_update ();
if (!disp)
update();
else display_point();
}
break;
default: