diff options
| author | jpbruyere <jp.bruyere@hotmail.com> | 2017-01-24 11:21:37 +0100 |
|---|---|---|
| committer | jpbruyere <jp.bruyere@hotmail.com> | 2017-01-24 11:21:37 +0100 |
| commit | 0004f96d68df2cc66717f469cc9151284ed7cea6 (patch) | |
| tree | f8175ec949c8088705fdc5b46d3aeeebb17bae18 /src/Interface.cs | |
| parent | af3dc048f37ef4340feebbfb0a9b612ae99b559b (diff) | |
always on top windows
Diffstat (limited to 'src/Interface.cs')
| -rw-r--r-- | src/Interface.cs | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/src/Interface.cs b/src/Interface.cs index efa687ee..6b859dbe 100644 --- a/src/Interface.cs +++ b/src/Interface.cs @@ -140,6 +140,8 @@ namespace Crow /// on the first instance creation of a IML item. /// </summary> public static Dictionary<String, Instantiator> Instantiators = new Dictionary<string, Instantiator>(); + public bool DesignMode = false; + public int TopWindows = 0;//window always on top count #endregion #region Private Fields @@ -536,7 +538,12 @@ namespace Crow public void AddWidget(GraphicObject g) { g.Parent = this; - GraphicTree.Insert (0, g); + int ptr = TopWindows; + if (g is Window) { + if ((g as Window).AlwaysOnTop) + ptr = 0; + } + GraphicTree.Insert (ptr, g); g.RegisteredLayoutings = LayoutingType.None; g.RegisterForLayouting (LayoutingType.Sizing | LayoutingType.ArrangeChildren); } @@ -549,10 +556,10 @@ namespace Crow /// <summary> Put widget on top of other root widgets</summary> public void PutOnTop(GraphicObject g) { - if (GraphicTree.IndexOf(g) > 0) + if (GraphicTree.IndexOf(g) > TopWindows) { GraphicTree.Remove(g); - GraphicTree.Insert(0, g); + GraphicTree.Insert(TopWindows, g); EnqueueForRepaint (g); } } |