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:
parent
5d08350c49
commit
677751be4d
@ -3458,7 +3458,7 @@ void TForm::arrange_form()
|
||||
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);
|
||||
|
@ -1267,6 +1267,7 @@ void TViswin::handler (WINDOW win, EVENT * ep)
|
||||
bool tlnk = FALSE;
|
||||
int kdiff;
|
||||
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;
|
||||
@ -1818,6 +1807,7 @@ 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);
|
||||
@ -1832,12 +1822,18 @@ void TViswin::handler (WINDOW win, EVENT * ep)
|
||||
if (ep->type != E_UPDATE || _need_update)
|
||||
TWindow::handler(win, ep);
|
||||
else if (ep->type == E_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;
|
||||
@ -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,6 +2156,7 @@ bool TViswin::on_key (KEY key)
|
||||
}
|
||||
if (_need_scroll != none)
|
||||
{
|
||||
disp = TRUE;
|
||||
_need_update = FALSE;
|
||||
scroll tmp = _need_scroll;
|
||||
_need_scroll = none;
|
||||
@ -2169,7 +2165,9 @@ bool TViswin::on_key (KEY key)
|
||||
if (_isselection)
|
||||
display_selection ();
|
||||
check_link (&_point);
|
||||
force_update ();
|
||||
if (!disp)
|
||||
update();
|
||||
else display_point();
|
||||
}
|
||||
break;
|
||||
default:
|
||||
|
Loading…
x
Reference in New Issue
Block a user