diff options
author | drewski207 <drewski207@ae50a9b5-8222-0410-bf8d-8a13f76226bf> | 2008-03-22 00:13:51 +0000 |
---|---|---|
committer | drewski207 <drewski207@ae50a9b5-8222-0410-bf8d-8a13f76226bf> | 2008-03-22 00:13:51 +0000 |
commit | 517e5e85cace58eb47c0092793711ba9bb7cde6d (patch) | |
tree | c6e7a6bff1c26bde17abf26776bda69d1650f6e1 | |
parent | 66b5a5ab7249eff995f9927d8172f62081979437 (diff) | |
download | fpGUI-517e5e85cace58eb47c0092793711ba9bb7cde6d.tar.xz |
* Added Stop to TfpgMessageRec.
* Messages are now stopped only if msg.Stop is true when FormDesigner is assigned to a widget
-rw-r--r-- | src/corelib/gfx_msgqueue.inc | 1 | ||||
-rw-r--r-- | src/corelib/gfx_widget.pas | 21 | ||||
-rw-r--r-- | src/corelib/gfxbase.pas | 1 |
3 files changed, 16 insertions, 7 deletions
diff --git a/src/corelib/gfx_msgqueue.inc b/src/corelib/gfx_msgqueue.inc index 9ddda9b4..92458dde 100644 --- a/src/corelib/gfx_msgqueue.inc +++ b/src/corelib/gfx_msgqueue.inc @@ -139,6 +139,7 @@ begin p^.MsgCode := MsgCode; p^.Sender := Sender; p^.Dest := Dest; + p^.Stop := False; end else Writeln('THE MESSAGE QUEUE IS FULL.'); diff --git a/src/corelib/gfx_widget.pas b/src/corelib/gfx_widget.pas index 990a020f..638d7c33 100644 --- a/src/corelib/gfx_widget.pas +++ b/src/corelib/gfx_widget.pas @@ -313,7 +313,8 @@ begin if FFormDesigner <> nil then begin FFormDesigner.Dispatch(msg); - Exit; + if msg.Stop then + Exit; end; key := msg.params.keyboard.keycode; @@ -342,7 +343,8 @@ begin if FFormDesigner <> nil then begin FFormDesigner.Dispatch(msg); - Exit; + if msg.Stop then + Exit; end; key := msg.params.keyboard.keycode; @@ -369,7 +371,8 @@ begin begin // dispatching message to designer FFormDesigner.Dispatch(msg); - Exit; + if msg.Stop then + Exit; end; if not FEnabled then @@ -406,7 +409,8 @@ begin if FFormDesigner <> nil then begin FFormDesigner.Dispatch(msg); - Exit; + if msg.Stop then + Exit; end; if not FEnabled then @@ -458,7 +462,8 @@ begin if FFormDesigner <> nil then begin FFormDesigner.Dispatch(msg); - Exit; + if msg.Stop then + Exit; end; HandleMouseMove(msg.Params.mouse.x, msg.Params.mouse.y, msg.Params.mouse.Buttons, msg.Params.mouse.shiftstate); @@ -487,7 +492,8 @@ begin if FFormDesigner <> nil then begin FFormDesigner.Dispatch(msg); - Exit; + if msg.Stop then + Exit; end; HandleMouseEnter; @@ -500,7 +506,8 @@ begin if FFormDesigner <> nil then begin FFormDesigner.Dispatch(msg); - Exit; + if msg.Stop then + Exit; end; HandleMouseExit; diff --git a/src/corelib/gfxbase.pas b/src/corelib/gfxbase.pas index 427cd07e..f47f9b04 100644 --- a/src/corelib/gfxbase.pas +++ b/src/corelib/gfxbase.pas @@ -112,6 +112,7 @@ type Sender: TObject; Dest: TObject; Params: TfpgMessageParams; + Stop: Boolean; end; PfpgMessageRec = ^TfpgMessageRec; |