Patch level : 2.0 nopatch

Files correlati     : tutte le stampe ma in particolare ve1
Ricompilazione Demo : [ ]
Commento            :
Corretto problema di scroll in anteprima di stampa


git-svn-id: svn://10.65.10.50/trunk@10907 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
guy 2003-03-14 08:50:29 +00:00
parent 799f651064
commit 438f50bfc6
2 changed files with 28 additions and 15 deletions

View File

@ -21,13 +21,11 @@ int PRINT_HEIGHT = 10;
#define TEXTROWS (rows() - Y_OFFSET - BUTTONROW_SIZE)
#define TEXTCOLUMNS (columns() - X_OFFSET)
//#define DLG_QUIT_TITLE "Fine"
//#define DLG_EDIT_TITLE "~Edit"
//#define DLG_LINK_TITLE "Colle~ga"
//#define DLG_PRINT_TITLE "~Stampa"
#define BACKGROUND (_toplevel ? MASK_BACK_COLOR : COLOR_GRAY)
#define FOREGROUND (_toplevel ? COLOR_BLACK : COLOR_WHITE)
// Colore per righelli: perche' distinguere?
// #define BACKGROUND (_toplevel ? MASK_BACK_COLOR : COLOR_GRAY)
// #define FOREGROUND (_toplevel ? NORMAL_COLOR : COLOR_WHITE)
#define BACKGROUND MASK_BACK_COLOR
#define FOREGROUND NORMAL_COLOR
#define K_CTRL_DOWN (K_CTRL + K_DOWN)
#define K_CTRL_UP (K_CTRL + K_UP)
@ -647,8 +645,12 @@ void TViswin::open ()
// prints the window contents
void TViswin::paint_screen ()
{
RCT clip; get_clip_rect(clip);
clip.left = clip.top = 0;
xvt_dwin_set_clip(win(), &clip);
bool first = TRUE;
for (long j = 0; j < _textrows; j++)
for (int j = 0; j < _textrows; j++)
{
const long rw = origin ().y + j;
if (rw < _txt.lines ())
@ -706,7 +708,7 @@ void TViswin::paint_background(
if (!fink_mode)
{
const char* line = pr.background_chars(rw);
set_color (COLOR_BLACK, COLOR_WHITE);
set_color(COLOR_BLACK, COLOR_WHITE);
if (line != NULL && (int)strlen(line) > ox)
stringat (X_OFFSET, row, &line[ox]);
// return;
@ -885,12 +887,9 @@ void TViswin::paint_background(
set_pen (COLOR_BLACK);
}
void TViswin::paint_image(int row, const char* cp)
void TViswin::get_clip_rect(RCT& clip) const
{
TToken_string tok(cp+2, ',');
TImage img(tok.get(0));
RCT clip; xvt_vobj_get_client_rect(win(), &clip);
xvt_vobj_get_client_rect(win(), &clip);
if (_rulers)
{
clip.left += tabx(X_OFFSET);
@ -898,6 +897,14 @@ void TViswin::paint_image(int row, const char* cp)
}
if (_showbuts)
clip.bottom = clip.top + taby(int(_textrows));
}
void TViswin::paint_image(int row, const char* cp)
{
TToken_string tok(cp+2, ',');
TImage img(tok.get(0));
RCT clip; get_clip_rect(clip);
xvt_dwin_set_clip(win(), &clip);
const int x = tabx(X_OFFSET+tok.get_int()-int(origin().x)-1);
@ -912,6 +919,8 @@ void TViswin::paint_image(int row, const char* cp)
dx = int(img.width() / ratio);
dy = int(img.height() / ratio);
RCT dst; xvt_rect_set(&dst, x, y, x+dx, y+dy);
if (dst.bottom > clip.bottom)
dst.bottom = clip.bottom;
img.draw(win(), dst);
}
else
@ -926,9 +935,11 @@ void TViswin::paint_image(int row, const char* cp)
void TViswin::paint_row (long j)
{
TPoint p1, p2;
if (need_paint_sel (FALSE))
{
TPoint p1, p2;
adjust_selection (p1, p2);
}
const long y = origin ().y;
const int row = (int) (j + (long)Y_OFFSET - y);

View File

@ -194,6 +194,8 @@ protected:
virtual void on_button(short dlg);
void get_clip_rect(RCT& clip) const;
// @cmember Disegna l'header del video (righello)
void paint_header();
// @cmember Disegna il cursore in xor nello stile del momento