From 35d6da8fd2ecbd015634c7bf56659f1415fb9f10 Mon Sep 17 00:00:00 2001 From: graemeg Date: Tue, 21 Aug 2007 09:06:52 +0000 Subject: * GDI: Added missing units to GFX package. * GDI: Finally fixed the implementation of modal window support. --- src/corelib/gdi/fpgfx_package.lpk | 10 +++++++++- src/corelib/gdi/fpgfx_package.pas | 2 +- src/corelib/gdi/gfx_gdi.pas | 23 +++++++++++++++-------- src/gui/gui_menu.pas | 1 - 4 files changed, 25 insertions(+), 11 deletions(-) (limited to 'src') diff --git a/src/corelib/gdi/fpgfx_package.lpk b/src/corelib/gdi/fpgfx_package.lpk index 2e5190a7..66963c07 100644 --- a/src/corelib/gdi/fpgfx_package.lpk +++ b/src/corelib/gdi/fpgfx_package.lpk @@ -26,7 +26,7 @@ - + @@ -71,6 +71,14 @@ + + + + + + + + diff --git a/src/corelib/gdi/fpgfx_package.pas b/src/corelib/gdi/fpgfx_package.pas index e24f85b9..b171c972 100644 --- a/src/corelib/gdi/fpgfx_package.pas +++ b/src/corelib/gdi/fpgfx_package.pas @@ -9,7 +9,7 @@ interface uses gfxbase, fpgfx, gfx_gdi, gfx_stdimages, gfx_imgfmt_bmp, gfx_widget, gfx_UTF8utils, gfx_extinterpolation, gfx_cmdlineparams, gfx_clipboard, - gfx_utils; + gfx_utils, gfx_impl, gfx_popupwindow; implementation diff --git a/src/corelib/gdi/gfx_gdi.pas b/src/corelib/gdi/gfx_gdi.pas index ed1f9e15..f14c26ac 100644 --- a/src/corelib/gdi/gfx_gdi.pas +++ b/src/corelib/gdi/gfx_gdi.pas @@ -524,7 +524,7 @@ begin // {$IFDEF DEBUG} writeln('Mouse Move or Button Click'); {$ENDIF} msgp.mouse.x := smallint(lParam and $FFFF); msgp.mouse.y := smallint((lParam and $FFFF0000) shr 16); -(* + if (wapplication.TopModalForm <> nil) then begin mw := nil; @@ -532,24 +532,31 @@ begin if (mw <> nil) and (wapplication.TopModalForm <> mw) then blockmsg := True; end; -*) -// Writeln('blockmsg ', blockmsg); + if not blockmsg then begin // writeln(' we are continueing the event processing...'); case uMsg of WM_MOUSEMOVE: - mcode := FPGM_MOUSEMOVE; + mcode := FPGM_MOUSEMOVE; WM_LBUTTONDOWN, WM_RBUTTONDOWN: - mcode := FPGM_MOUSEDOWN; + begin + mcode := FPGM_MOUSEDOWN; + // if PopupListFirst = nil then + SetCapture(w.WinHandle); + end; WM_LBUTTONUP, WM_RBUTTONUP: - mcode := FPGM_MOUSEUP; + begin + mcode := FPGM_MOUSEUP; + // if PopupListFirst = nil then + ReleaseCapture(); + end; WM_LBUTTONDBLCLK: - mcode := FPGM_DOUBLECLICK; + mcode := FPGM_DOUBLECLICK; else - mcode := 0; + mcode := 0; end; case uMsg of diff --git a/src/gui/gui_menu.pas b/src/gui/gui_menu.pas index e625f81c..e64230aa 100644 --- a/src/gui/gui_menu.pas +++ b/src/gui/gui_menu.pas @@ -17,7 +17,6 @@ uses gfxbase, fpgfx, gfx_widget, - gui_form, gfx_popupwindow, gfx_UTF8utils; -- cgit v1.2.3-70-g09d2