int _margin = 0;
bool _focusable = false;
bool _hasFocus = false;
+ bool _isActive = false;
bool _mouseRepeat;
protected bool _isVisible = true;
VerticalAlignment _verticalAlignment = VerticalAlignment.Center;
/// <summary>
/// Parent in the graphic tree, used for rendering and layouting
/// </summary>
- [XmlIgnore]public ILayoutable Parent {
+ [XmlIgnore]public virtual ILayoutable Parent {
get { return _parent; }
- set {
- _parent = value;
- }
+ set { _parent = value; }
}
public ILayoutable LogicalParent {
NotifyValueChanged ("HasFocus", _hasFocus);
}
}
+ [XmlIgnore]public virtual bool IsActive {
+ get { return _isActive; }
+ set {
+ if (value == _isActive)
+ return;
+
+ _isActive = value;
+ NotifyValueChanged ("IsActive", _isActive);
+ }
+ }
[XmlAttributeAttribute()][DefaultValue(false)]
public virtual bool MouseRepeat {
get { return _mouseRepeat; }
GraphicObject activeWidget { get; set; }
GraphicObject hoverWidget { get; set; }
GraphicObject FocusedWidget { get; set; }
+ XCursor MouseCursor { set; }
void AddWidget (GraphicObject g);
void DeleteWidget(GraphicObject g);
void PutOnTop (GraphicObject g);
}
}
+ public XCursor MouseCursor {
+ set { Cursor = value; }
+ }
public List<GraphicObject> gobjsToRedraw {
get {
return _gobjsToRedraw;
{
get { return _activeWidget; }
set
- {
+ {
if (_activeWidget == value)
- return;
+ return;
+
+ if (_activeWidget != null)
+ _activeWidget.IsActive = false;
+
_activeWidget = value;
+
+ if (_activeWidget != null)
+ _activeWidget.IsActive = true;
}
}
public GraphicObject hoverWidget
} else {
//send move evt even if mouse move outside bounds
- _activeWidget.onMouseMove (_activeWidget, e);
+ _activeWidget.onMouseMove (this, e);
return;
}
}