Modifica a TViswin::paint_column(). Corretto lo scrolling singolo
verso dx e sx. git-svn-id: svn://10.65.10.50/trunk@2430 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
af6dbaa384
commit
0db54ac328
@ -808,7 +808,7 @@ void TViswin::paint_background (
|
||||
RCT src; xvt_rect_set(&src, p.h, p.v, width, min(p.v+taby(1)+scroll , i->height()));
|
||||
if (src.top < i->height())
|
||||
{
|
||||
p.h = tabx(x1+X_OFFSET); p.v = taby(row);
|
||||
p.h = tabx(short(x1-origin().x+X_OFFSET)); p.v = taby(row);
|
||||
RCT dst = src; xvt_rect_set_pos(&dst, p);
|
||||
i->draw(win(), dst, src);
|
||||
}
|
||||
@ -947,12 +947,29 @@ void TViswin::paint_column (
|
||||
const int col = end ? (int) (_textcolumns + X_OFFSET -1) : X_OFFSET;
|
||||
set_brush(COLOR_WHITE);
|
||||
bar(col, Y_OFFSET, col+1, int(_textrows + Y_OFFSET));
|
||||
|
||||
for (long l = 0L; l < _textrows && l < (_txt.lines () - origin ().y); l++)
|
||||
const long orig_y = origin().y;
|
||||
const long last = min(_txt.lines() - orig_y, _textrows);
|
||||
for (long l = 0L; l < last; l++)
|
||||
{
|
||||
paint_background (l, (int) l + 1);
|
||||
const long riga_txt = orig_y + l;
|
||||
const int riga_scr = (int)l+Y_OFFSET;
|
||||
paint_background (riga_txt,riga_scr);
|
||||
#if XVT_OS == XVT_OS_WIN // paint page limits
|
||||
if ((riga_txt% _formlen) == (_formlen - 1) && _toplevel)
|
||||
{
|
||||
PNT b, e;
|
||||
|
||||
b.h = tabx(short(col));
|
||||
b.v = taby(riga_scr+1) -1 ;
|
||||
e.h = tabx(short(col+1));
|
||||
e.v = taby(riga_scr+1) -1;
|
||||
set_pen (COLOR_LTGRAY, 2, PAT_SOLID, P_DASH);
|
||||
xvt_dwin_draw_set_pos (win(), b);
|
||||
xvt_dwin_draw_line (win(), e);
|
||||
}
|
||||
#endif
|
||||
|
||||
const char *c = (const char *) _txt.line (origin ().y + l);
|
||||
const char *c = (const char *) _txt.line (riga_txt);
|
||||
#if XVT_OS != XVT_OS_SCOUNIX
|
||||
int st = _txt.get_style ((int) j);
|
||||
set_font (PRINT_FONT, st, PRINT_HEIGHT);
|
||||
@ -960,7 +977,7 @@ void TViswin::paint_column (
|
||||
COLOR fg = trans_color (_txt.get_foreground ((int) j));
|
||||
set_color (fg, bg);
|
||||
#endif
|
||||
printat (col, (int) l + Y_OFFSET, "%c",
|
||||
printat (col, riga_scr, "%c",
|
||||
(unsigned int) j < strlen (c) ? c[(int) j] : ' ');
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user