public GraphicObject hoverWidget
{
get { return _hoverWidget; }
- set { _hoverWidget = value; }
+ set {
+ if (_hoverWidget == value)
+ return;
+ _hoverWidget = value;
+ }
}
public GraphicObject FocusedWidget {
get { return _focusedWidget; }
}
}
- if (_hoverWidget != null) {
+ if (hoverWidget != null) {
//first, ensure object is still in the graphic tree
- if (_hoverWidget.HostContainer == null) {
+ if (hoverWidget.HostContainer == null) {
hoverWidget = null;
} else {
//check topmost graphicobject first
- GraphicObject tmp = _hoverWidget;
+ GraphicObject tmp = hoverWidget;
GraphicObject topc = null;
while (tmp is GraphicObject) {
topc = tmp;
int i = 0;
while (i < idxhw) {
if (GraphicObjects [i].MouseIsIn (e.Position)) {
- _hoverWidget.onMouseLeave (this, e);
+ hoverWidget.onMouseLeave (this, e);
GraphicObjects [i].checkHoverWidget (e);
return;
}
}
- if (_hoverWidget.MouseIsIn (e.Position)) {
- _hoverWidget.checkHoverWidget (e);
+ if (hoverWidget.MouseIsIn (e.Position)) {
+ hoverWidget.checkHoverWidget (e);
return;
} else {
- _hoverWidget.onMouseLeave (this, e);
+ hoverWidget.onMouseLeave (this, e);
//seek upward from last focused graph obj's
- while (_hoverWidget.Parent as GraphicObject != null) {
- _hoverWidget = _hoverWidget.Parent as GraphicObject;
- if (_hoverWidget.MouseIsIn (e.Position)) {
- _hoverWidget.checkHoverWidget (e);
+ while (hoverWidget.Parent as GraphicObject != null) {
+ hoverWidget = hoverWidget.Parent as GraphicObject;
+ if (hoverWidget.MouseIsIn (e.Position)) {
+ hoverWidget.checkHoverWidget (e);
return;
} else
- _hoverWidget.onMouseLeave (this, e);
+ hoverWidget.onMouseLeave (this, e);
}
}
}
return;
}
}
- _hoverWidget = null;
+ hoverWidget = null;
MouseMove.Raise (this, e);
}
void Mouse_ButtonUp(object sender, MouseButtonEventArgs e)
}
void Mouse_ButtonDown(object sender, MouseButtonEventArgs e)
{
- if (_hoverWidget == null) {
+ if (hoverWidget == null) {
MouseButtonDown.Raise (this, e);
return;
}
- _hoverWidget.onMouseDown(_hoverWidget,new BubblingMouseButtonEventArg(e));
+ hoverWidget.onMouseDown(hoverWidget,new BubblingMouseButtonEventArg(e));
if (FocusedWidget == null)
return;
}
void Mouse_WheelChanged(object sender, MouseWheelEventArgs e)
{
- if (_hoverWidget == null) {
+ if (hoverWidget == null) {
MouseWheelChanged.Raise (this, e);
return;
}
- _hoverWidget.onMouseWheel (this, e);
+ hoverWidget.onMouseWheel (this, e);
}
volatile bool mouseRepeatOn;