From 8c60c6b6e1a8c5c9cd4b4b12bf9796c889a2eadd Mon Sep 17 00:00:00 2001 From: jpbruyere Date: Mon, 25 Jan 2016 14:26:47 +0100 Subject: [PATCH] resolve in scroller mouse handling bug, check if parent is scroller if mouse is in unscrolled bounds, saved and restrored when bubbling mouse mouve --- Tests/GOLIBTest_Listbox.cs | 16 +++++++++-- Tests/Interfaces/test_Listbox.goml | 41 ++++++++++++++++------------- Tests/Tests.csproj | 4 +-- src/GraphicObjects/GraphicObject.cs | 10 ++++++- src/GraphicObjects/Scroller.cs | 8 ++++++ 5 files changed, 56 insertions(+), 23 deletions(-) diff --git a/Tests/GOLIBTest_Listbox.cs b/Tests/GOLIBTest_Listbox.cs index b3cda6c5..1d6b2f38 100644 --- a/Tests/GOLIBTest_Listbox.cs +++ b/Tests/GOLIBTest_Listbox.cs @@ -71,6 +71,13 @@ namespace test "string 3" }); */ + public String Hover { + get { return hoverWidget == null ? "None" : hoverWidget.ToString(); } + } + Point mPos; + public string MousePos { + get { return mPos.ToString(); } + } protected override void OnLoad (EventArgs e) { base.OnLoad (e); @@ -81,8 +88,12 @@ namespace test // TestList [1].Field = "test string"; // ValueChanged.Raise(this, new ValueChangeEventArgs ("TestList", TestList)); - - + } + protected override void OnMouseMove (MouseMoveEventArgs e) + { + base.OnMouseMove (e); + ValueChanged.Raise (this, new ValueChangeEventArgs ("Hover", Hover)); + ValueChanged.Raise (this, new ValueChangeEventArgs ("MousePos", e.Position.ToString())); } protected override void OnUpdateFrame (FrameEventArgs e) @@ -94,6 +105,7 @@ namespace test TestList.Add ("newly added list item"); ValueChanged.Raise(this, new ValueChangeEventArgs ("TestList", TestList)); } + [STAThread] static void Main () { diff --git a/Tests/Interfaces/test_Listbox.goml b/Tests/Interfaces/test_Listbox.goml index b77ffcec..342f2909 100755 --- a/Tests/Interfaces/test_Listbox.goml +++ b/Tests/Interfaces/test_Listbox.goml @@ -1,20 +1,25 @@  - - - - + +