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:
parent
799f651064
commit
438f50bfc6
@ -21,13 +21,11 @@ int PRINT_HEIGHT = 10;
|
|||||||
#define TEXTROWS (rows() - Y_OFFSET - BUTTONROW_SIZE)
|
#define TEXTROWS (rows() - Y_OFFSET - BUTTONROW_SIZE)
|
||||||
#define TEXTCOLUMNS (columns() - X_OFFSET)
|
#define TEXTCOLUMNS (columns() - X_OFFSET)
|
||||||
|
|
||||||
//#define DLG_QUIT_TITLE "Fine"
|
// Colore per righelli: perche' distinguere?
|
||||||
//#define DLG_EDIT_TITLE "~Edit"
|
// #define BACKGROUND (_toplevel ? MASK_BACK_COLOR : COLOR_GRAY)
|
||||||
//#define DLG_LINK_TITLE "Colle~ga"
|
// #define FOREGROUND (_toplevel ? NORMAL_COLOR : COLOR_WHITE)
|
||||||
//#define DLG_PRINT_TITLE "~Stampa"
|
#define BACKGROUND MASK_BACK_COLOR
|
||||||
|
#define FOREGROUND NORMAL_COLOR
|
||||||
#define BACKGROUND (_toplevel ? MASK_BACK_COLOR : COLOR_GRAY)
|
|
||||||
#define FOREGROUND (_toplevel ? COLOR_BLACK : COLOR_WHITE)
|
|
||||||
|
|
||||||
#define K_CTRL_DOWN (K_CTRL + K_DOWN)
|
#define K_CTRL_DOWN (K_CTRL + K_DOWN)
|
||||||
#define K_CTRL_UP (K_CTRL + K_UP)
|
#define K_CTRL_UP (K_CTRL + K_UP)
|
||||||
@ -647,8 +645,12 @@ void TViswin::open ()
|
|||||||
// prints the window contents
|
// prints the window contents
|
||||||
void TViswin::paint_screen ()
|
void TViswin::paint_screen ()
|
||||||
{
|
{
|
||||||
|
RCT clip; get_clip_rect(clip);
|
||||||
|
clip.left = clip.top = 0;
|
||||||
|
xvt_dwin_set_clip(win(), &clip);
|
||||||
|
|
||||||
bool first = TRUE;
|
bool first = TRUE;
|
||||||
for (long j = 0; j < _textrows; j++)
|
for (int j = 0; j < _textrows; j++)
|
||||||
{
|
{
|
||||||
const long rw = origin ().y + j;
|
const long rw = origin ().y + j;
|
||||||
if (rw < _txt.lines ())
|
if (rw < _txt.lines ())
|
||||||
@ -885,12 +887,9 @@ void TViswin::paint_background(
|
|||||||
set_pen (COLOR_BLACK);
|
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, ',');
|
xvt_vobj_get_client_rect(win(), &clip);
|
||||||
TImage img(tok.get(0));
|
|
||||||
|
|
||||||
RCT clip; xvt_vobj_get_client_rect(win(), &clip);
|
|
||||||
if (_rulers)
|
if (_rulers)
|
||||||
{
|
{
|
||||||
clip.left += tabx(X_OFFSET);
|
clip.left += tabx(X_OFFSET);
|
||||||
@ -898,6 +897,14 @@ void TViswin::paint_image(int row, const char* cp)
|
|||||||
}
|
}
|
||||||
if (_showbuts)
|
if (_showbuts)
|
||||||
clip.bottom = clip.top + taby(int(_textrows));
|
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);
|
xvt_dwin_set_clip(win(), &clip);
|
||||||
|
|
||||||
const int x = tabx(X_OFFSET+tok.get_int()-int(origin().x)-1);
|
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);
|
dx = int(img.width() / ratio);
|
||||||
dy = int(img.height() / ratio);
|
dy = int(img.height() / ratio);
|
||||||
RCT dst; xvt_rect_set(&dst, x, y, x+dx, y+dy);
|
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);
|
img.draw(win(), dst);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -926,9 +935,11 @@ void TViswin::paint_image(int row, const char* cp)
|
|||||||
|
|
||||||
void TViswin::paint_row (long j)
|
void TViswin::paint_row (long j)
|
||||||
{
|
{
|
||||||
TPoint p1, p2;
|
|
||||||
if (need_paint_sel (FALSE))
|
if (need_paint_sel (FALSE))
|
||||||
|
{
|
||||||
|
TPoint p1, p2;
|
||||||
adjust_selection (p1, p2);
|
adjust_selection (p1, p2);
|
||||||
|
}
|
||||||
|
|
||||||
const long y = origin ().y;
|
const long y = origin ().y;
|
||||||
const int row = (int) (j + (long)Y_OFFSET - y);
|
const int row = (int) (j + (long)Y_OFFSET - y);
|
||||||
|
@ -194,6 +194,8 @@ protected:
|
|||||||
|
|
||||||
virtual void on_button(short dlg);
|
virtual void on_button(short dlg);
|
||||||
|
|
||||||
|
void get_clip_rect(RCT& clip) const;
|
||||||
|
|
||||||
// @cmember Disegna l'header del video (righello)
|
// @cmember Disegna l'header del video (righello)
|
||||||
void paint_header();
|
void paint_header();
|
||||||
// @cmember Disegna il cursore in xor nello stile del momento
|
// @cmember Disegna il cursore in xor nello stile del momento
|
||||||
|
Loading…
x
Reference in New Issue
Block a user