From 97a33536ab8650ad3b83d5633997fcc429320105 Mon Sep 17 00:00:00 2001 From: Graeme Geldenhuys Date: Tue, 14 Sep 2010 23:12:15 +0200 Subject: Catch the OS independent DROP[Enter|Exit] messages Under X11 the XDND OS messages on only go to the top-level window, so we send the FPGM_ messages ourselves. Later each component will hook into this to change it's appearance to show the end-user that a drop is allowed or not. eg: Some components will get a dark/black border or something. --- src/corelib/fpg_widget.pas | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/corelib/fpg_widget.pas b/src/corelib/fpg_widget.pas index a7c062ee..3799f950 100644 --- a/src/corelib/fpg_widget.pas +++ b/src/corelib/fpg_widget.pas @@ -73,6 +73,8 @@ type procedure MsgMouseEnter(var msg: TfpgMessageRec); message FPGM_MOUSEENTER; procedure MsgMouseExit(var msg: TfpgMessageRec); message FPGM_MOUSEEXIT; procedure MsgMouseScroll(var msg: TfpgMessageRec); message FPGM_SCROLL; + procedure MsgDropEnter(var msg: TfpgMessageRec); message FPGM_DROPENTER; + procedure MsgDropExit(var msg: TfpgMessageRec); message FPGM_DROPEXIT; protected FFormDesigner: TObject; FVisible: boolean; @@ -729,6 +731,16 @@ begin msg.Params.mouse.shiftstate, msg.Params.mouse.delta); end; +procedure TfpgWidget.MsgDropEnter(var msg: TfpgMessageRec); +begin + // do nothing +end; + +procedure TfpgWidget.MsgDropExit(var msg: TfpgMessageRec); +begin + // do nothing +end; + function TfpgWidget.GetOnShowHint: THintEvent; begin Result := FOnShowHint; -- cgit v1.2.3-70-g09d2