Mercurial > hg > ucis.core
diff FBGUI/FBGUI.cs @ 83:4ca44dd25a6a
Merge
author | Ivo Smits <Ivo@UCIS.nl> |
---|---|
date | Sun, 23 Feb 2014 16:59:47 +0100 |
parents | 0d389692be32 3352f89cf6f5 |
children | c9da306e06c9 |
line wrap: on
line diff
--- a/FBGUI/FBGUI.cs Mon Feb 17 22:35:52 2014 +0100 +++ b/FBGUI/FBGUI.cs Sun Feb 23 16:59:47 2014 +0100 @@ -216,7 +216,7 @@ protected List<IFBGControl> controls = new List<IFBGControl>(); protected IFBGControl mouseCaptureControl = null; protected IFBGControl keyboardCaptureControl = null; - public virtual Rectangle ClientRectangle { get { return Bounds; } } + public virtual Rectangle ClientRectangle { get { return new Rectangle(Point.Empty, Bounds.Size); } } public virtual Size ClientSize { get { return ClientRectangle.Size; } set { Bounds = new Rectangle(Bounds.Location, Bounds.Size - ClientRectangle.Size + value); } } public FBGContainerControl(IFBGContainerControl parent) : base(parent) { } void IFBGContainerControl.AddControl(IFBGControl control) { AddControl(control); } @@ -232,6 +232,7 @@ control.Orphaned(); } } + public IList<IFBGControl> Controls { get { return controls.AsReadOnly(); } } public virtual Point PointToChild(IFBGControl child, Point point) { return point - (Size)child.Bounds.Location - (Size)ClientRectangle.Location; } @@ -314,7 +315,7 @@ else keyboardCaptureControl.HandleEvent(e); } protected virtual void HandleKeyboardCaptureMessage(IFBGControl sender, FBGKeyboardCaptureMessage e) { - if (!e.Capture && !(ReferenceEquals(mouseCaptureControl, null) || ReferenceEquals(mouseCaptureControl, sender))) e.Capture = false; + if (!e.Capture && !(ReferenceEquals(keyboardCaptureControl, null) || ReferenceEquals(keyboardCaptureControl, sender))) e.Capture = false; else { Parent.HandleMessage(this, e); IFBGControl prev = keyboardCaptureControl;