Commit 008b0365 authored by Davis King's avatar Davis King

Changed some of the events that are about the mouse leaving

a widget so that they still trigger even if the widget has been disabled
or hidden.

--HG--
extra : convert_revision : svn%3Afdd8eb12-d10e-0410-9acb-85c331704f74/trunk%402610
parent 1ef2ae75
......@@ -374,7 +374,7 @@ namespace dlib
on_mouse_leave (
)
{
if (enabled && !hidden && is_mouse_over_)
if (is_mouse_over_)
{
is_mouse_over_ = false;
on_mouse_not_over();
......@@ -390,9 +390,6 @@ namespace dlib
long y
)
{
if (enabled == false || hidden == true)
return;
if (rect.contains(x,y) == false)
{
if (is_mouse_over_)
......@@ -404,7 +401,8 @@ namespace dlib
else if (is_mouse_over_ == false)
{
is_mouse_over_ = true;
on_mouse_over();
if (enabled && !hidden)
on_mouse_over();
}
}
......@@ -415,7 +413,7 @@ namespace dlib
) const
{
// check if the mouse is still really over this button
if (enabled && !hidden && is_mouse_over_ && rect.contains(lastx,lasty) == false)
if (is_mouse_over_ && rect.contains(lastx,lasty) == false)
{
// trigger a user event to call on_mouse_not_over() and repaint this object.
// we must do this in another event because someone might call is_mouse_over()
......
......@@ -228,8 +228,6 @@ namespace dlib
requires
- enable_events() has been called
- mutex drawable::m is locked
- is_enabled() == true
- is_hidden() == false
- is called whenever this object transitions from the state where
is_mouse_over() == true to is_mouse_over() == false
ensures
......@@ -332,8 +330,6 @@ namespace dlib
requires
- enable_events() has been called
- mutex drawable::m is locked
- is_enabled() == true
- is_hidden() == false
- the area in parent_window() defined by get_rect() has been invalidated.
(This means you don't have to call invalidate_rectangle())
- is called whenever this object transitions from the state where
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment