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());
|
SpoolRow((char *)(const char *) str_pos, str_pos.len());
|
||||||
#else
|
#else
|
||||||
lpt = fopen(device,"w");
|
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",(const char*) bspc);
|
||||||
fprintf(lpt,"%s\r",(const char*) str_pos);
|
fprintf(lpt,"%s\r",(const char*) str_pos);
|
||||||
fflush(lpt);
|
fflush(lpt);
|
||||||
|
@ -1267,6 +1267,7 @@ void TViswin::handler (WINDOW win, EVENT * ep)
|
|||||||
bool tlnk = FALSE;
|
bool tlnk = FALSE;
|
||||||
int kdiff;
|
int kdiff;
|
||||||
long new_origin;
|
long new_origin;
|
||||||
|
bool scrollated = FALSE;
|
||||||
switch (ep->type)
|
switch (ep->type)
|
||||||
{
|
{
|
||||||
case E_USER:
|
case E_USER:
|
||||||
@ -1288,7 +1289,7 @@ void TViswin::handler (WINDOW win, EVENT * ep)
|
|||||||
if (_txt.lines () > 1l)
|
if (_txt.lines () > 1l)
|
||||||
_need_update = FALSE;
|
_need_update = FALSE;
|
||||||
else
|
else
|
||||||
force_update ();
|
/*force_*/update ();
|
||||||
}
|
}
|
||||||
autoscroll (FALSE);
|
autoscroll (FALSE);
|
||||||
_textrows = TEXTROWS;
|
_textrows = TEXTROWS;
|
||||||
@ -1514,18 +1515,6 @@ void TViswin::handler (WINDOW win, EVENT * ep)
|
|||||||
break;
|
break;
|
||||||
case E_MOUSE_MOVE:
|
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)
|
if (_selecting || _iscross)
|
||||||
{
|
{
|
||||||
p = ep->v.mouse.where;
|
p = ep->v.mouse.where;
|
||||||
@ -1818,6 +1807,7 @@ void TViswin::handler (WINDOW win, EVENT * ep)
|
|||||||
if (_need_scroll != none)
|
if (_need_scroll != none)
|
||||||
{
|
{
|
||||||
_need_update = FALSE;
|
_need_update = FALSE;
|
||||||
|
scrollated = TRUE;
|
||||||
scroll tmp = _need_scroll;
|
scroll tmp = _need_scroll;
|
||||||
_need_scroll = none;
|
_need_scroll = none;
|
||||||
shift_screen (tmp);
|
shift_screen (tmp);
|
||||||
@ -1832,12 +1822,18 @@ void TViswin::handler (WINDOW win, EVENT * ep)
|
|||||||
if (ep->type != E_UPDATE || _need_update)
|
if (ep->type != E_UPDATE || _need_update)
|
||||||
TWindow::handler(win, ep);
|
TWindow::handler(win, ep);
|
||||||
else if (ep->type == E_UPDATE)
|
else if (ep->type == E_UPDATE)
|
||||||
|
{
|
||||||
|
if (!scrollated)
|
||||||
|
_need_update = TRUE;
|
||||||
update();
|
update();
|
||||||
|
if (scrollated) display_point();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool TViswin::on_key (KEY key)
|
bool TViswin::on_key (KEY key)
|
||||||
{
|
{
|
||||||
EVENT_TYPE type = E_USER;
|
EVENT_TYPE type = E_USER;
|
||||||
|
bool disp = FALSE;
|
||||||
|
|
||||||
if (_istimer)
|
if (_istimer)
|
||||||
return TRUE;
|
return TRUE;
|
||||||
@ -2009,17 +2005,16 @@ bool TViswin::on_key (KEY key)
|
|||||||
dispatch_e_scroll (win(), K_TAB);
|
dispatch_e_scroll (win(), K_TAB);
|
||||||
break;
|
break;
|
||||||
case K_CTRL_UP:
|
case K_CTRL_UP:
|
||||||
dispatch_e_scroll (win(), K_UP);
|
disp = TRUE; dispatch_e_scroll (win(), K_UP);
|
||||||
break;
|
break;
|
||||||
case K_CTRL_DOWN:
|
case K_CTRL_DOWN:
|
||||||
// TBI condizioniamo qui ??
|
disp = TRUE; dispatch_e_scroll (win(), K_DOWN);
|
||||||
dispatch_e_scroll (win(), K_DOWN);
|
|
||||||
break;
|
break;
|
||||||
case K_ALT_LEFT:
|
case K_ALT_LEFT:
|
||||||
dispatch_e_scroll (win(), K_LEFT);
|
disp = TRUE; dispatch_e_scroll (win(), K_LEFT);
|
||||||
break;
|
break;
|
||||||
case K_ALT_RIGHT:
|
case K_ALT_RIGHT:
|
||||||
dispatch_e_scroll (win(), K_RIGHT);
|
disp = TRUE; dispatch_e_scroll (win(), K_RIGHT);
|
||||||
break;
|
break;
|
||||||
case K_UP:
|
case K_UP:
|
||||||
case K_SHIFT_UP:
|
case K_SHIFT_UP:
|
||||||
@ -2161,6 +2156,7 @@ bool TViswin::on_key (KEY key)
|
|||||||
}
|
}
|
||||||
if (_need_scroll != none)
|
if (_need_scroll != none)
|
||||||
{
|
{
|
||||||
|
disp = TRUE;
|
||||||
_need_update = FALSE;
|
_need_update = FALSE;
|
||||||
scroll tmp = _need_scroll;
|
scroll tmp = _need_scroll;
|
||||||
_need_scroll = none;
|
_need_scroll = none;
|
||||||
@ -2169,7 +2165,9 @@ bool TViswin::on_key (KEY key)
|
|||||||
if (_isselection)
|
if (_isselection)
|
||||||
display_selection ();
|
display_selection ();
|
||||||
check_link (&_point);
|
check_link (&_point);
|
||||||
force_update ();
|
if (!disp)
|
||||||
|
update();
|
||||||
|
else display_point();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user