From ce44fa4e859d24bee45120ab271fd6d5ec3b9837 Mon Sep 17 00:00:00 2001 From: guy Date: Thu, 11 Mar 2004 16:39:25 +0000 Subject: [PATCH] Patch level : 2.1 Files correlati : xvaga.dll Ricompilazione Demo : [ ] Commento : Aggiunto supporto per flaf shift_down durante il trascinamento del puntatore del mouse git-svn-id: svn://10.65.10.50/trunk@11832 c028cbd2-c16b-5b4b-a496-9718f37d4682 --- xvaga/xvaga.cpp | 8 ++++++-- xvaga/xvtextra.cpp | 3 +-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/xvaga/xvaga.cpp b/xvaga/xvaga.cpp index 115cf1746..4504f4c1b 100755 --- a/xvaga/xvaga.cpp +++ b/xvaga/xvaga.cpp @@ -252,7 +252,7 @@ void TwxCaret::Toggle() xvt_dwin_draw_set_pos(_owner, _pos); PNT p = _pos; p.v -= _size.y-1; - xvt_dwin_set_clip(_owner, NULL); // Non si mai! + xvt_dwin_set_clip(_owner, NULL); // Non si sa mai! xvt_dwin_draw_line(_owner, p); xvt_dwin_set_draw_ctools(_owner, &dct); } @@ -837,6 +837,8 @@ void TwxWindow::OnMouseMove(wxMouseEvent& event) EVENT e; memset(&e, 0, sizeof(EVENT)); e.type = E_MOUSE_MOVE; int x, y; event.GetPosition(&x, &y); + e.v.mouse.control = event.ControlDown(); + e.v.mouse.shift = event.m_shiftDown; e.v.mouse.where.h = x; e.v.mouse.where.v = y; DoXvtEvent(e); @@ -2175,7 +2177,9 @@ void xvt_dwin_draw_text(WINDOW win, int x, int y, const char *s, int len) wxString str(s); if (len >= 0) str.Truncate(len); - tdc.GetDC().DrawText(str, x, y-tdc.GetFontDelta()); + wxDC& dc = tdc.GetDC(); // Prima getto il DC ... + const int delta = tdc.GetFontDelta(); // ... poi faccio la GetFontDelta! + dc.DrawText(str, x, y-delta); } } } diff --git a/xvaga/xvtextra.cpp b/xvaga/xvtextra.cpp index f27be79b6..dca284e4c 100755 --- a/xvaga/xvtextra.cpp +++ b/xvaga/xvtextra.cpp @@ -136,7 +136,6 @@ TwxPrintOut::~TwxPrintOut() ResetDC(); } - /////////////////////////////////////////////////////////// // TwxPrintOutCache /////////////////////////////////////////////////////////// @@ -444,7 +443,7 @@ int xvt_print_get_name(PRINT_RCD* precp, char* name, int sz_s) { #ifdef WIN32 wxString n = ((const char*)precp) + 4; - if (n.Length() > 30) + if (n.Length() >= 30) { SLIST plist = xvt_print_list_devices(); for (SLIST_ELT pitem = xvt_slist_get_first(plist);