From 478959aad0df1b870304e1d64f6b284994c2feeb Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jean-Philippe=20Bruy=C3=A8re?= Date: Fri, 21 Dec 2018 05:24:46 +0100 Subject: [PATCH] rename GraphicObject to Widget --- Crow/Templates/ColorPicker.template | 4 +- Crow/Templates/DirectoryView.template | 2 +- Crow/Templates/DockWindow.template | 8 +- Crow/Templates/FileDialog.template | 6 +- Crow/Templates/FileItems.template | 2 +- Crow/Templates/GroupBox.template | 4 +- Crow/Templates/MenuItem.template | 2 +- Crow/Templates/MessageBox.template | 6 +- Crow/Templates/ToolWindow.template | 6 +- Crow/Templates/Window.template | 6 +- Crow/src/BubblingMouseButtonEventArgs.cs | 2 +- Crow/src/CompilerServices/CompilerServices.cs | 20 ++--- Crow/src/CrowThread.cs | 4 +- Crow/src/DragDropEventArgs.cs | 6 +- Crow/src/DynAttribute.cs | 2 +- Crow/src/Font.cs | 15 ++-- Crow/src/GraphicObjects/ColorSelector.cs | 2 +- Crow/src/GraphicObjects/Container.cs | 4 +- Crow/src/GraphicObjects/DockStack.cs | 14 +-- Crow/src/GraphicObjects/GenericStack.cs | 10 +-- Crow/src/GraphicObjects/Grid.cs | 2 +- Crow/src/GraphicObjects/Group.cs | 52 +++++------ Crow/src/GraphicObjects/Image.cs | 2 +- Crow/src/GraphicObjects/Label.cs | 2 +- Crow/src/GraphicObjects/Menu.cs | 2 +- Crow/src/GraphicObjects/MenuItem.cs | 2 +- Crow/src/GraphicObjects/MessageBox.cs | 2 +- Crow/src/GraphicObjects/Popper.cs | 4 +- Crow/src/GraphicObjects/PrivateContainer.cs | 18 ++-- Crow/src/GraphicObjects/ProgressBar.cs | 2 +- Crow/src/GraphicObjects/Scroller.cs | 2 +- Crow/src/GraphicObjects/ScrollingObject.cs | 2 +- Crow/src/GraphicObjects/Shape.cs | 2 +- Crow/src/GraphicObjects/Slider.cs | 2 +- Crow/src/GraphicObjects/Splitter.cs | 6 +- Crow/src/GraphicObjects/TabItem.cs | 8 +- Crow/src/GraphicObjects/TabView.cs | 6 +- Crow/src/GraphicObjects/TemplatedContainer.cs | 8 +- Crow/src/GraphicObjects/TemplatedControl.cs | 4 +- Crow/src/GraphicObjects/TemplatedGroup.cs | 28 +++--- Crow/src/GraphicObjects/TestCairoPatch.cs | 2 +- Crow/src/GraphicObjects/TextRun.cs | 2 +- Crow/src/GraphicObjects/TreeView.cs | 6 +- Crow/src/GraphicObjects/Trend.cs | 2 +- .../{GraphicObject.cs => Widget.cs} | 58 ++++++------- Crow/src/GraphicObjects/Window.cs | 4 +- Crow/src/GraphicObjects/Wrapper.cs | 14 +-- Crow/src/IML/IMLContext.cs | 2 +- Crow/src/Instantiator.cs | 14 +-- Crow/src/Interface.cs | 87 +++++++++---------- Crow/src/ItemTemplate.cs | 4 +- Crow/src/LayoutingQueueItem.cs | 10 +-- CrowIDE/CrowIDE.csproj | 2 +- CrowIDE/src/CrowIDE.cs | 6 +- CrowIDE/src/DesignInterface.cs | 58 +++++++------ CrowIDE/src/Editors/ImlSchematicEditor.cs | 4 +- CrowIDE/src/Editors/ImlVisualEditor.cs | 56 ++++++------ CrowIDE/src/Extensions.cs | 10 +-- CrowIDE/src/GraphicObjectDesignContainer.cs | 6 +- CrowIDE/src/MemberView/MembersView.cs | 6 +- CrowIDE/src/MemberView/PropertyContainer.cs | 10 +-- CrowIDE/src/ProjectTree/ImlProjectItem.cs | 8 +- CrowIDE/src/Solution.cs | 2 +- CrowIDE/src/VerticalLine.cs | 2 +- CrowIDE/ui/DockWindows/GTreeExpITemp.crow | 2 +- CrowIDE/ui/DockWindows/WinSchemaItem.template | 4 +- CrowIDE/ui/DockWindows/winGTExplorer.crow | 2 +- CrowIDE/ui/DockWindows/winSchema.crow | 2 +- CrowIDE/ui/LQIsExplorer.crow | 6 +- CrowIDE/ui/ProjectTree.template | 12 +-- CrowIDE/ui/editors/EditTabItem.template | 2 +- CrowIDE/ui/editors/SourceEditor.crow | 8 +- CrowIDE/ui/editors/TextEditor.crow | 8 +- Tests/GraphicObjects/ColorCircleSelector.cs | 2 +- Tests/GraphicObjects/LaggingGraphicObject.cs | 2 +- Tests/GraphicObjects/SimpleGauge.cs | 2 +- Tests/Interfaces/Container/0.crow | 4 +- Tests/Interfaces/Container/1.crow | 4 +- Tests/Interfaces/Container/2.crow | 4 +- Tests/Interfaces/Divers/0.crow | 2 +- Tests/Interfaces/Divers/5.crow | 8 +- Tests/Interfaces/Divers/colorPicker.crow | 4 +- Tests/Interfaces/Divers/testCtxMenu.crow | 4 +- Tests/Interfaces/Divers/testFocus.crow | 2 +- Tests/Interfaces/Divers/testVisibility.crow | 2 +- Tests/Interfaces/Divers/welcome.crow | 4 +- .../Experimental/DockWindow.template | 8 +- Tests/Interfaces/Experimental/testDock.crow | 14 +-- Tests/Interfaces/Experimental/testDock2.crow | 14 +-- Tests/Interfaces/Experimental/testStack.crow | 22 ++--- Tests/Interfaces/GraphicObject/1.crow | 4 +- Tests/Interfaces/GraphicObject/2.crow | 4 +- Tests/Interfaces/Group/0.crow | 8 +- Tests/Interfaces/Group/1.crow | 20 ++--- Tests/Interfaces/Group/2.crow | 20 ++--- Tests/Interfaces/Group/3.crow | 20 ++--- Tests/Interfaces/Group/4.crow | 4 +- Tests/Interfaces/Stack/0.crow | 8 +- Tests/Interfaces/Stack/0h.crow | 8 +- Tests/Interfaces/Stack/1.crow | 8 +- Tests/Interfaces/Stack/1h.crow | 8 +- Tests/Interfaces/Stack/2.crow | 8 +- Tests/Interfaces/Stack/2h.crow | 8 +- Tests/Interfaces/Stack/3.crow | 42 ++++----- Tests/Interfaces/Stack/3h.crow | 42 ++++----- .../TemplatedContainer/testPopper.crow | 2 +- .../TemplatedContainer/testWindow.goml | 10 +-- .../TemplatedContainer/testWindow3.goml | 4 +- .../TemplatedControl/testItemTemplateTag.crow | 4 +- Tests/Interfaces/Wrapper/1.1.crow | 18 ++-- Tests/Interfaces/Wrapper/1.crow | 18 ++-- Tests/Interfaces/Wrapper/2.1.crow | 18 ++-- Tests/Interfaces/Wrapper/2.2.crow | 54 ++++++------ Tests/Interfaces/Wrapper/2.crow | 18 ++-- Tests/Interfaces/colorItem.crow | 2 +- Tests/Interfaces/colorItem2.crow | 2 +- Tests/Showcase.cs | 6 +- Tests/ui/dbgLogColors.crow | 8 +- 118 files changed, 587 insertions(+), 593 deletions(-) rename Crow/src/GraphicObjects/{GraphicObject.cs => Widget.cs} (97%) diff --git a/Crow/Templates/ColorPicker.template b/Crow/Templates/ColorPicker.template index 71965850..cf9dd760 100755 --- a/Crow/Templates/ColorPicker.template +++ b/Crow/Templates/ColorPicker.template @@ -1,4 +1,4 @@ - + @@ -9,7 +9,7 @@ - + - + diff --git a/Crow/Templates/DockWindow.template b/Crow/Templates/DockWindow.template index 1763b08f..e62672bc 100755 --- a/Crow/Templates/DockWindow.template +++ b/Crow/Templates/DockWindow.template @@ -1,5 +1,5 @@ - - + + - + diff --git a/Crow/Templates/FileDialog.template b/Crow/Templates/FileDialog.template index 50be2198..419e093a 100644 --- a/Crow/Templates/FileDialog.template +++ b/Crow/Templates/FileDialog.template @@ -1,4 +1,4 @@ - + - + diff --git a/Crow/Templates/FileItems.template b/Crow/Templates/FileItems.template index 452a402a..fb95e29b 100644 --- a/Crow/Templates/FileItems.template +++ b/Crow/Templates/FileItems.template @@ -1,5 +1,5 @@  - + diff --git a/Crow/Templates/GroupBox.template b/Crow/Templates/GroupBox.template index 199cfe9b..0540b552 100755 --- a/Crow/Templates/GroupBox.template +++ b/Crow/Templates/GroupBox.template @@ -1,8 +1,8 @@ - + - + diff --git a/Crow/Templates/MenuItem.template b/Crow/Templates/MenuItem.template index 4f77fb46..d3321661 100644 --- a/Crow/Templates/MenuItem.template +++ b/Crow/Templates/MenuItem.template @@ -22,5 +22,5 @@ - + diff --git a/Crow/Templates/MessageBox.template b/Crow/Templates/MessageBox.template index c68bdd71..385bf824 100644 --- a/Crow/Templates/MessageBox.template +++ b/Crow/Templates/MessageBox.template @@ -1,4 +1,4 @@ - + @@ -6,7 +6,7 @@ - + diff --git a/Crow/Templates/ToolWindow.template b/Crow/Templates/ToolWindow.template index 16f0c71a..e5c9fe74 100755 --- a/Crow/Templates/ToolWindow.template +++ b/Crow/Templates/ToolWindow.template @@ -1,4 +1,4 @@ - + --> - + diff --git a/Crow/Templates/Window.template b/Crow/Templates/Window.template index 1e66a6da..ce3cfaea 100755 --- a/Crow/Templates/Window.template +++ b/Crow/Templates/Window.template @@ -1,4 +1,4 @@ - + --> - + diff --git a/Crow/src/BubblingMouseButtonEventArgs.cs b/Crow/src/BubblingMouseButtonEventArgs.cs index e81a6f74..21f0ded6 100644 --- a/Crow/src/BubblingMouseButtonEventArgs.cs +++ b/Crow/src/BubblingMouseButtonEventArgs.cs @@ -33,7 +33,7 @@ namespace Crow /// public class BubblingMouseButtonEventArg: MouseButtonEventArgs { - public GraphicObject Focused; + public Widget Focused; public BubblingMouseButtonEventArg(MouseButtonEventArgs mbe) : base(mbe){} public BubblingMouseButtonEventArg(int x, int y, MouseButton button, bool pressed) : base (x,y,button,pressed){} diff --git a/Crow/src/CompilerServices/CompilerServices.cs b/Crow/src/CompilerServices/CompilerServices.cs index 7b95c9d7..d57cb7b5 100644 --- a/Crow/src/CompilerServices/CompilerServices.cs +++ b/Crow/src/CompilerServices/CompilerServices.cs @@ -87,14 +87,14 @@ namespace Crow.IML internal static MethodInfo miDSChangeEmitHelper = typeof(Instantiator).GetMethod("dataSourceChangedEmitHelper", BindingFlags.Instance | BindingFlags.NonPublic); internal static MethodInfo miDSReverseBinding = typeof(Instantiator).GetMethod("dataSourceReverseBinding", BindingFlags.Static | BindingFlags.NonPublic); - internal static FieldInfo miSetCurIface = typeof(GraphicObject).GetField ("IFace", BindingFlags.Public | BindingFlags.Instance); - internal static MethodInfo miFindByName = typeof (GraphicObject).GetMethod ("FindByName"); - internal static MethodInfo miGetGObjItem = typeof(List).GetMethod("get_Item", new Type[] { typeof(Int32) }); - internal static MethodInfo miLoadDefaultVals = typeof (GraphicObject).GetMethod ("loadDefaultValues"); - internal static PropertyInfo piStyle = typeof (GraphicObject).GetProperty ("Style"); - internal static MethodInfo miGetLogicalParent = typeof(GraphicObject).GetProperty("LogicalParent").GetGetMethod(); - internal static MethodInfo miGetDataSource = typeof(GraphicObject).GetProperty("DataSource").GetGetMethod (); - internal static EventInfo eiLogicalParentChanged = typeof(GraphicObject).GetEvent("LogicalParentChanged"); + internal static FieldInfo miSetCurIface = typeof(Widget).GetField ("IFace", BindingFlags.Public | BindingFlags.Instance); + internal static MethodInfo miFindByName = typeof (Widget).GetMethod ("FindByName"); + internal static MethodInfo miGetGObjItem = typeof(List).GetMethod("get_Item", new Type[] { typeof(Int32) }); + internal static MethodInfo miLoadDefaultVals = typeof (Widget).GetMethod ("loadDefaultValues"); + internal static PropertyInfo piStyle = typeof (Widget).GetProperty ("Style"); + internal static MethodInfo miGetLogicalParent = typeof(Widget).GetProperty("LogicalParent").GetGetMethod(); + internal static MethodInfo miGetDataSource = typeof(Widget).GetProperty("DataSource").GetGetMethod (); + internal static EventInfo eiLogicalParentChanged = typeof(Widget).GetEvent("LogicalParentChanged"); internal static MethodInfo miIFaceLoad = typeof(Interface).GetMethod ("CreateInstance", BindingFlags.Instance | BindingFlags.Public); internal static MethodInfo miIFaceCreateTemplateInst = typeof (Interface).GetMethod ("CreateTemplateInstance", BindingFlags.Instance | BindingFlags.Public); @@ -133,7 +133,7 @@ namespace Crow.IML internal static FieldInfo fiVCMbName = typeof (ValueChangeEventArgs).GetField ("MemberName"); internal static MethodInfo miValueChangeAdd = eiValueChange.GetAddMethod (); - internal static EventInfo eiDSChange = typeof (GraphicObject).GetEvent ("DataSourceChanged"); + internal static EventInfo eiDSChange = typeof (Widget).GetEvent ("DataSourceChanged"); internal static MethodInfo miInvokeDSChange = eiDSChange.EventHandlerType.GetMethod ("Invoke"); internal static Type [] argsBoundDSChange = {typeof (object), typeof (object), miInvokeDSChange.GetParameters () [1].ParameterType }; internal static FieldInfo fiDSCNewDS = typeof (DataSourceChangeEventArgs).GetField ("NewDataSource"); @@ -806,7 +806,7 @@ namespace Crow.IML //if left operand is member of current node, it's easy to fetch type, else we should use reflexion in msil if (lopPI == null){//accept GraphicObj members, but it's restricive //TODO: we should get the parse method by reflexion, or something else - lopPI = typeof(GraphicObject).GetProperty (lop.Tokens [lop.Tokens.Length-1]); + lopPI = typeof(Widget).GetProperty (lop.Tokens [lop.Tokens.Length-1]); if (lopPI == null) throw new NotSupportedException (); } diff --git a/Crow/src/CrowThread.cs b/Crow/src/CrowThread.cs index a1b4c38e..5c5ceef0 100644 --- a/Crow/src/CrowThread.cs +++ b/Crow/src/CrowThread.cs @@ -36,8 +36,8 @@ namespace Crow public bool cancelRequested = false; Thread thread; public event EventHandler Finished; - public GraphicObject Host; - public CrowThread (GraphicObject host, ThreadStart start){ + public Widget Host; + public CrowThread (Widget host, ThreadStart start){ thread = new Thread (start); thread.IsBackground = true; Host = host; diff --git a/Crow/src/DragDropEventArgs.cs b/Crow/src/DragDropEventArgs.cs index 428a7363..b79c3669 100644 --- a/Crow/src/DragDropEventArgs.cs +++ b/Crow/src/DragDropEventArgs.cs @@ -33,14 +33,14 @@ namespace Crow /// /// Source of the drag and drop operation /// - public GraphicObject DragSource; + public Widget DragSource; /// /// Target of the drag and drop operation /// - public GraphicObject DropTarget; + public Widget DropTarget; //public DragDropEventArgs (GraphicObject source, GraphicObject target = null) : base() - public DragDropEventArgs (GraphicObject source = null, GraphicObject target = null) : base() + public DragDropEventArgs (Widget source = null, Widget target = null) : base() { DragSource = source; DropTarget = target; diff --git a/Crow/src/DynAttribute.cs b/Crow/src/DynAttribute.cs index 174eec2e..aa9b5ce2 100644 --- a/Crow/src/DynAttribute.cs +++ b/Crow/src/DynAttribute.cs @@ -33,7 +33,7 @@ namespace Crow { public class DynAttribute { - public GraphicObject Source; + public Widget Source; public string MemberName; public String Value; } diff --git a/Crow/src/Font.cs b/Crow/src/Font.cs index 4314222b..16353d70 100644 --- a/Crow/src/Font.cs +++ b/Crow/src/Font.cs @@ -64,12 +64,11 @@ namespace Crow public FontSlant Slant { get{ switch (Style) { - case FontStyle.Normal: - default: - return FontSlant.Normal; case FontStyle.Italic: return FontSlant.Italic; - } + default: + return FontSlant.Normal; + } } } public FontWeight Wheight { @@ -77,8 +76,6 @@ namespace Crow switch (Style) { case FontStyle.Bold: return FontWeight.Bold; - case FontStyle.Italic: - case FontStyle.Normal: default: return FontWeight.Normal; } @@ -114,10 +111,8 @@ namespace Crow public override string ToString() { - if (_style == FontStyle.Normal) - return string.Format("{0},{1}", _name, _size); - else - return string.Format("{0} {1},{2}", _name, _style, _size); + + return (_style == FontStyle.Normal) ? $"{_name},{_size}" : $"{_name} {_style},{_size}"; } diff --git a/Crow/src/GraphicObjects/ColorSelector.cs b/Crow/src/GraphicObjects/ColorSelector.cs index ee57a262..7ef037e9 100644 --- a/Crow/src/GraphicObjects/ColorSelector.cs +++ b/Crow/src/GraphicObjects/ColorSelector.cs @@ -34,7 +34,7 @@ namespace Crow /// simple squarred rgb color selector /// [DesignIgnore] - public class ColorSelector : GraphicObject + public class ColorSelector : Widget { #region CTOR protected ColorSelector() : base(){} diff --git a/Crow/src/GraphicObjects/Container.cs b/Crow/src/GraphicObjects/Container.cs index 364bad83..8bff8100 100644 --- a/Crow/src/GraphicObjects/Container.cs +++ b/Crow/src/GraphicObjects/Container.cs @@ -55,7 +55,7 @@ namespace Crow public Container (Interface iface) : base(iface){} #endregion - [XmlIgnore]public GraphicObject Child { + [XmlIgnore]public Widget Child { get { return child; } set { base.SetChild(value); } } @@ -63,7 +63,7 @@ namespace Crow /// override this to handle specific steps in child addition in derived class, /// and don't forget to call the base.SetChild /// - public virtual void SetChild(GraphicObject _child) + public virtual void SetChild(Widget _child) { base.SetChild (_child); } diff --git a/Crow/src/GraphicObjects/DockStack.cs b/Crow/src/GraphicObjects/DockStack.cs index c91b9901..a52c7f6e 100644 --- a/Crow/src/GraphicObjects/DockStack.cs +++ b/Crow/src/GraphicObjects/DockStack.cs @@ -46,7 +46,7 @@ namespace Crow base.onInitialized (sender, e); Background = Color.ColorDic.Values.ToList()[color++]; }*/ - public override void AddChild (GraphicObject g) + public override void AddChild (Widget g) { base.AddChild (g); if (localLogicalParentIsNull) @@ -54,7 +54,7 @@ namespace Crow else g.LogicalParent = this.LogicalParent; } - public override void InsertChild (int idx, GraphicObject g) + public override void InsertChild (int idx, Widget g) { base.InsertChild (idx, g); g.LogicalParent = this.LogicalParent; @@ -94,14 +94,14 @@ namespace Crow Rectangle rIn = default(Rectangle); double dockThresh = 0.2; - GraphicObject focusedChild; - internal GraphicObject stretchedChild; + Widget focusedChild; + internal Widget stretchedChild; void getFocusedChild (Point lm) { Rectangle cb = ClientRectangle; childrenRWLock.EnterReadLock (); - foreach (GraphicObject c in Children) { + foreach (Widget c in Children) { Rectangle bounds = c.Slot + cb.Position; if (!bounds.ContainsOrIsEqual (lm)) continue; @@ -207,7 +207,7 @@ namespace Crow childrenRWLock.EnterReadLock (); - foreach (GraphicObject g in Children) + foreach (Widget g in Children) g.Paint (ref gr); childrenRWLock.ExitReadLock (); @@ -349,7 +349,7 @@ namespace Crow return; } //remove level and move remaining obj to level above - GraphicObject g = Children [0]; + Widget g = Children [0]; RemoveChild (g); idx = dsp.Children.IndexOf (this); dsp.RemoveChild (this); diff --git a/Crow/src/GraphicObjects/GenericStack.cs b/Crow/src/GraphicObjects/GenericStack.cs index 50c66c3e..51897487 100644 --- a/Crow/src/GraphicObjects/GenericStack.cs +++ b/Crow/src/GraphicObjects/GenericStack.cs @@ -93,14 +93,14 @@ namespace Crow { int d = 0; if (Orientation == Orientation.Horizontal) { - foreach (GraphicObject c in Children) { + foreach (Widget c in Children) { if (!c.Visible) continue; c.Slot.X = d; d += c.Slot.Width + Spacing; } } else { - foreach (GraphicObject c in Children) { + foreach (Widget c in Children) { if (!c.Visible) continue; c.Slot.Y = d; @@ -109,7 +109,7 @@ namespace Crow } IsDirty = true; } - GraphicObject stretchedGO = null; + Widget stretchedGO = null; public override bool UpdateLayout (LayoutingType layoutType) { RegisteredLayoutings &= (~layoutType); @@ -173,7 +173,7 @@ namespace Crow public override void OnChildLayoutChanges (object sender, LayoutingEventArgs arg) { - GraphicObject go = sender as GraphicObject; + Widget go = sender as Widget; //Debug.WriteLine ("child layout change: " + go.LastSlots.ToString() + " => " + go.Slot.ToString()); switch (arg.LayoutType) { case LayoutingType.Width: @@ -225,7 +225,7 @@ namespace Crow } #endregion - public override void RemoveChild (GraphicObject child) + public override void RemoveChild (Widget child) { if (child != stretchedGO) { if (Orientation == Orientation.Horizontal) diff --git a/Crow/src/GraphicObjects/Grid.cs b/Crow/src/GraphicObjects/Grid.cs index 71e89bde..ad776bd3 100644 --- a/Crow/src/GraphicObjects/Grid.cs +++ b/Crow/src/GraphicObjects/Grid.cs @@ -131,7 +131,7 @@ namespace Crow int idx = curY * ColumnCount + curX; if (idx >= Children.Count) return; - GraphicObject c = Children [idx]; + Widget c = Children [idx]; if (!c.Visible) continue; c.Slot.X = curX * (slotWidth + Spacing); diff --git a/Crow/src/GraphicObjects/Group.cs b/Crow/src/GraphicObjects/Group.cs index 435d6e54..26a5084d 100644 --- a/Crow/src/GraphicObjects/Group.cs +++ b/Crow/src/GraphicObjects/Group.cs @@ -36,15 +36,15 @@ using System.Threading; namespace Crow { - public class Group : GraphicObject + public class Group : Widget { #if DESIGN_MODE - public override bool FindByDesignID(string designID, out GraphicObject go){ + public override bool FindByDesignID(string designID, out Widget go){ go = null; if (base.FindByDesignID (designID, out go)) return true; childrenRWLock.EnterReadLock (); - foreach (GraphicObject w in Children) { + foreach (Widget w in Children) { if (!w.FindByDesignID (designID, out go)) continue; childrenRWLock.ExitReadLock (); @@ -58,7 +58,7 @@ namespace Crow if (this.design_isTGItem) return; base.getIML (doc, parentElem); - foreach (GraphicObject g in Children) { + foreach (Widget g in Children) { g.getIML (doc, parentElem.LastChild); } } @@ -75,13 +75,13 @@ namespace Crow public event EventHandler ChildrenCleared; #endregion - internal GraphicObject largestChild = null; - internal GraphicObject tallestChild = null; + internal Widget largestChild = null; + internal Widget tallestChild = null; bool _multiSelect = false; - List children = new List(); + List children = new List(); - public virtual List Children { + public virtual List Children { get { return children; } } [DefaultValue(false)] @@ -90,7 +90,7 @@ namespace Crow get { return _multiSelect; } set { _multiSelect = value; } } - public virtual void AddChild(GraphicObject g){ + public virtual void AddChild(Widget g){ childrenRWLock.EnterWriteLock(); g.Parent = this; @@ -102,7 +102,7 @@ namespace Crow g.LayoutChanged += OnChildLayoutChanges; g.RegisterForLayouting (LayoutingType.Sizing | LayoutingType.ArrangeChildren); } - public virtual void RemoveChild(GraphicObject child) + public virtual void RemoveChild(Widget child) { child.LayoutChanged -= OnChildLayoutChanges; //check if HoverWidget is removed from Tree @@ -126,12 +126,12 @@ namespace Crow this.RegisterForLayouting (LayoutingType.Sizing | LayoutingType.ArrangeChildren); } - public virtual void DeleteChild(GraphicObject child) + public virtual void DeleteChild(Widget child) { RemoveChild (child); child.Dispose (); } - public virtual void InsertChild (int idx, GraphicObject g) { + public virtual void InsertChild (int idx, Widget g) { childrenRWLock.EnterWriteLock (); g.Parent = this; @@ -154,7 +154,7 @@ namespace Crow childrenRWLock.EnterWriteLock (); while (Children.Count > 0) { - GraphicObject g = Children [Children.Count - 1]; + Widget g = Children [Children.Count - 1]; g.LayoutChanged -= OnChildLayoutChanges; Children.RemoveAt (Children.Count - 1); g.Dispose (); @@ -172,14 +172,14 @@ namespace Crow base.OnDataSourceChanged (this, e); childrenRWLock.EnterReadLock (); - foreach (GraphicObject g in Children) { + foreach (Widget g in Children) { if (g.localDataSourceIsNull & g.localLogicalParentIsNull) g.OnDataSourceChanged (g, e); } childrenRWLock.ExitReadLock (); } - public void putWidgetOnTop(GraphicObject w) + public void putWidgetOnTop(Widget w) { if (Children.Contains(w)) { @@ -191,7 +191,7 @@ namespace Crow childrenRWLock.ExitWriteLock (); } } - public void putWidgetOnBottom(GraphicObject w) + public void putWidgetOnBottom(Widget w) { if (Children.Contains(w)) { @@ -206,15 +206,15 @@ namespace Crow #region GraphicObject overrides - public override GraphicObject FindByName (string nameToFind) + public override Widget FindByName (string nameToFind) { if (Name == nameToFind) return this; - GraphicObject tmp = null; + Widget tmp = null; childrenRWLock.EnterReadLock (); - foreach (GraphicObject w in Children) { + foreach (Widget w in Children) { tmp = w.FindByName (nameToFind); if (tmp != null) break; @@ -224,9 +224,9 @@ namespace Crow return tmp; } - public override bool Contains (GraphicObject goToFind) + public override bool Contains (Widget goToFind) { - foreach (GraphicObject w in Children) { + foreach (Widget w in Children) { if (w == goToFind) return true; if (w.Contains (goToFind)) @@ -266,7 +266,7 @@ namespace Crow //position smaller objects in group when group size is fit switch (layoutType) { case LayoutingType.Width: - foreach (GraphicObject c in Children) { + foreach (Widget c in Children) { if (c.Width.IsRelativeToParent) c.RegisterForLayouting (LayoutingType.Width); else @@ -274,7 +274,7 @@ namespace Crow } break; case LayoutingType.Height: - foreach (GraphicObject c in Children) { + foreach (Widget c in Children) { if (c.Height.IsRelativeToParent) c.RegisterForLayouting (LayoutingType.Height); else @@ -328,7 +328,7 @@ namespace Crow childrenRWLock.EnterReadLock (); - foreach (GraphicObject c in Children) { + foreach (Widget c in Children) { if (!c.Visible) continue; if (Clipping.Contains (c.Slot + ClientRectangle.Position) == RegionOverlap.Out) @@ -358,7 +358,7 @@ namespace Crow public virtual void OnChildLayoutChanges (object sender, LayoutingEventArgs arg) { - GraphicObject g = sender as GraphicObject; + Widget g = sender as Widget; switch (arg.LayoutType) { case LayoutingType.Width: @@ -463,7 +463,7 @@ namespace Crow protected override void Dispose (bool disposing) { if (disposing) { - foreach (GraphicObject c in children) + foreach (Widget c in children) c.Dispose (); } base.Dispose (disposing); diff --git a/Crow/src/GraphicObjects/Image.cs b/Crow/src/GraphicObjects/Image.cs index 21a83f90..388abb1b 100644 --- a/Crow/src/GraphicObjects/Image.cs +++ b/Crow/src/GraphicObjects/Image.cs @@ -38,7 +38,7 @@ namespace Crow /// /// /// - public class Image : GraphicObject + public class Image : Widget { Picture _pic; string _svgSub; diff --git a/Crow/src/GraphicObjects/Label.cs b/Crow/src/GraphicObjects/Label.cs index 1a7a0010..b4b813c6 100644 --- a/Crow/src/GraphicObjects/Label.cs +++ b/Crow/src/GraphicObjects/Label.cs @@ -35,7 +35,7 @@ using System.ComponentModel; namespace Crow { - public class Label : GraphicObject + public class Label : Widget { #region CTOR protected Label () : base(){} diff --git a/Crow/src/GraphicObjects/Menu.cs b/Crow/src/GraphicObjects/Menu.cs index 73396238..85f5485c 100644 --- a/Crow/src/GraphicObjects/Menu.cs +++ b/Crow/src/GraphicObjects/Menu.cs @@ -63,7 +63,7 @@ namespace Crow } #endregion - public override void AddItem (GraphicObject g) + public override void AddItem (Widget g) { base.AddItem (g); diff --git a/Crow/src/GraphicObjects/MenuItem.cs b/Crow/src/GraphicObjects/MenuItem.cs index a9e164d5..7ad9f758 100644 --- a/Crow/src/GraphicObjects/MenuItem.cs +++ b/Crow/src/GraphicObjects/MenuItem.cs @@ -128,7 +128,7 @@ namespace Crow } #endregion - public override void AddItem (GraphicObject g) + public override void AddItem (Widget g) { base.AddItem (g); g.NotifyValueChanged ("PopDirection", Alignment.Right); diff --git a/Crow/src/GraphicObjects/MessageBox.cs b/Crow/src/GraphicObjects/MessageBox.cs index ed9da2b4..c5af95ff 100644 --- a/Crow/src/GraphicObjects/MessageBox.cs +++ b/Crow/src/GraphicObjects/MessageBox.cs @@ -47,7 +47,7 @@ namespace Crow } - protected override void loadTemplate (GraphicObject template) + protected override void loadTemplate (Widget template) { base.loadTemplate (template); NotifyValueChanged ("MsgIcon", "#Crow.Icons.iconInfo.svg"); diff --git a/Crow/src/GraphicObjects/Popper.cs b/Crow/src/GraphicObjects/Popper.cs index 89c0fa5a..285c6e35 100644 --- a/Crow/src/GraphicObjects/Popper.cs +++ b/Crow/src/GraphicObjects/Popper.cs @@ -39,7 +39,7 @@ namespace Crow bool _isPopped, _canPop; Alignment popDirection; - GraphicObject _content; + Widget _content; Measure popWidth, popHeight; public event EventHandler Popped; @@ -114,7 +114,7 @@ namespace Crow } #endregion - public override GraphicObject Content { + public override Widget Content { get { return _content; } set { if (_content != null) { diff --git a/Crow/src/GraphicObjects/PrivateContainer.cs b/Crow/src/GraphicObjects/PrivateContainer.cs index 0f9b0c59..8b1650e5 100644 --- a/Crow/src/GraphicObjects/PrivateContainer.cs +++ b/Crow/src/GraphicObjects/PrivateContainer.cs @@ -39,7 +39,7 @@ namespace Crow /// behave exactely as a container for layouting and drawing /// [DesignIgnore] - public class PrivateContainer : GraphicObject + public class PrivateContainer : Widget { #region CTOR protected PrivateContainer () : base(){} @@ -47,7 +47,7 @@ namespace Crow #endregion #if DESIGN_MODE - public override bool FindByDesignID(string designID, out GraphicObject go){ + public override bool FindByDesignID(string designID, out Widget go){ go = null; if (base.FindByDesignID (designID, out go)) return true; @@ -56,14 +56,14 @@ namespace Crow return child.FindByDesignID (designID, out go); } #endif - protected GraphicObject child; + protected Widget child; #if DEBUG_LOG internal GraphicObject getTemplateRoot { get { return child; } } #endif - protected virtual void SetChild(GraphicObject _child) + protected virtual void SetChild(Widget _child) { if (child != null) { @@ -77,7 +77,7 @@ namespace Crow this.RegisterForGraphicUpdate (); } - child = _child as GraphicObject; + child = _child as Widget; if (child != null) { child.Parent = this; @@ -89,7 +89,7 @@ namespace Crow } //dispose child if not null protected virtual void deleteChild () { - GraphicObject g = child; + Widget g = child; SetChild (null); if (g != null) g.Dispose (); @@ -97,14 +97,14 @@ namespace Crow #region GraphicObject Overrides - public override GraphicObject FindByName (string nameToFind) + public override Widget FindByName (string nameToFind) { if (Name == nameToFind) return this; return child == null ? null : child.FindByName (nameToFind); } - public override bool Contains (GraphicObject goToFind) + public override bool Contains (Widget goToFind) { return child == goToFind ? true : child == null ? false : child.Contains(goToFind); @@ -163,7 +163,7 @@ namespace Crow } public virtual void OnChildLayoutChanges (object sender, LayoutingEventArgs arg) { - GraphicObject g = sender as GraphicObject; + Widget g = sender as Widget; if (arg.LayoutType == LayoutingType.Width) { if (Width != Measure.Fit) diff --git a/Crow/src/GraphicObjects/ProgressBar.cs b/Crow/src/GraphicObjects/ProgressBar.cs index e8165fd2..afaead9b 100644 --- a/Crow/src/GraphicObjects/ProgressBar.cs +++ b/Crow/src/GraphicObjects/ProgressBar.cs @@ -43,7 +43,7 @@ namespace Crow public ProgressBar(Interface iface) : base(iface){} #endregion - protected override void loadTemplate (GraphicObject template) + protected override void loadTemplate (Widget template) { } diff --git a/Crow/src/GraphicObjects/Scroller.cs b/Crow/src/GraphicObjects/Scroller.cs index 16f6556d..99500d89 100644 --- a/Crow/src/GraphicObjects/Scroller.cs +++ b/Crow/src/GraphicObjects/Scroller.cs @@ -147,7 +147,7 @@ namespace Crow } #endregion - public override void SetChild (GraphicObject _child) + public override void SetChild (Widget _child) { Group g = child as Group; if (g != null) diff --git a/Crow/src/GraphicObjects/ScrollingObject.cs b/Crow/src/GraphicObjects/ScrollingObject.cs index 65d79d90..0f694236 100644 --- a/Crow/src/GraphicObjects/ScrollingObject.cs +++ b/Crow/src/GraphicObjects/ScrollingObject.cs @@ -37,7 +37,7 @@ namespace Crow /// generic class to build scrolling control in both directions /// [DesignIgnore] - public class ScrollingObject : GraphicObject + public class ScrollingObject : Widget { #region CTOR protected ScrollingObject ():base(){} diff --git a/Crow/src/GraphicObjects/Shape.cs b/Crow/src/GraphicObjects/Shape.cs index aa397316..ea0409b1 100644 --- a/Crow/src/GraphicObjects/Shape.cs +++ b/Crow/src/GraphicObjects/Shape.cs @@ -54,7 +54,7 @@ namespace Crow } } - public class Shape : GraphicObject + public class Shape : Widget { #region CTOR protected Shape () : base() {} diff --git a/Crow/src/GraphicObjects/Slider.cs b/Crow/src/GraphicObjects/Slider.cs index d76d6379..2db34f92 100644 --- a/Crow/src/GraphicObjects/Slider.cs +++ b/Crow/src/GraphicObjects/Slider.cs @@ -50,7 +50,7 @@ namespace Crow #region implemented abstract members of TemplatedControl - protected override void loadTemplate (GraphicObject template = null) + protected override void loadTemplate (Widget template = null) { } diff --git a/Crow/src/GraphicObjects/Splitter.cs b/Crow/src/GraphicObjects/Splitter.cs index 8fb7bb77..e1f8e637 100644 --- a/Crow/src/GraphicObjects/Splitter.cs +++ b/Crow/src/GraphicObjects/Splitter.cs @@ -34,7 +34,7 @@ namespace Crow /// control to add between children of a Stack to allow them to be resized /// with the pointer /// - public class Splitter : GraphicObject + public class Splitter : Widget { #region CTOR protected Splitter() : base(){} @@ -58,7 +58,7 @@ namespace Crow Unit u1, u2; int init1 = -1, init2 = -1, delta = 0, min1, min2, max1 , max2; - GraphicObject go1 = null, go2 = null; + Widget go1 = null, go2 = null; void initSplit(Measure m1, int size1, Measure m2, int size2){ if (m1 != Measure.Stretched) { @@ -70,7 +70,7 @@ namespace Crow u2 = m2.Units; } } - void convertSizeInPix(GraphicObject g1){ + void convertSizeInPix(Widget g1){ } diff --git a/Crow/src/GraphicObjects/TabItem.cs b/Crow/src/GraphicObjects/TabItem.cs index f92c1d75..4d9847c7 100644 --- a/Crow/src/GraphicObjects/TabItem.cs +++ b/Crow/src/GraphicObjects/TabItem.cs @@ -45,7 +45,7 @@ namespace Crow internal TabView tview = null; #region Private fields - GraphicObject titleWidget; + Widget titleWidget; int tabOffset; bool isSelected; Measure tabThickness; @@ -53,7 +53,7 @@ namespace Crow #endregion #region TemplatedControl overrides - public override GraphicObject Content { + public override Widget Content { get { return _contentContainer == null ? null : _contentContainer.Child; } @@ -67,13 +67,13 @@ namespace Crow value.LogicalParent = this; } } - protected override void loadTemplate(GraphicObject template = null) + protected override void loadTemplate(Widget template = null) { base.loadTemplate (template); titleWidget = this.child.FindByName ("TabTitle"); } - internal GraphicObject TabTitle { get { return titleWidget; }} + internal Widget TabTitle { get { return titleWidget; }} #endregion /// diff --git a/Crow/src/GraphicObjects/TabView.cs b/Crow/src/GraphicObjects/TabView.cs index 304e820d..655732f1 100644 --- a/Crow/src/GraphicObjects/TabView.cs +++ b/Crow/src/GraphicObjects/TabView.cs @@ -147,7 +147,7 @@ namespace Crow } #endregion - public override void AddChild (GraphicObject child) + public override void AddChild (Widget child) { TabItem ti = child as TabItem; if (ti == null) @@ -162,7 +162,7 @@ namespace Crow SelectedTab = ti.ViewIndex = Children.Count - 1; this.RegisterForLayouting (LayoutingType.ArrangeChildren); } - public override void RemoveChild (GraphicObject child) + public override void RemoveChild (Widget child) { TabItem ti = child as TabItem; if (ti == null) @@ -330,7 +330,7 @@ namespace Crow } void Ti_MouseDown (object sender, MouseButtonEventArgs e) { - SelectedTab = Children.IndexOf (sender as GraphicObject); + SelectedTab = Children.IndexOf (sender as Widget); } } } diff --git a/Crow/src/GraphicObjects/TemplatedContainer.cs b/Crow/src/GraphicObjects/TemplatedContainer.cs index a779595d..61078eb3 100644 --- a/Crow/src/GraphicObjects/TemplatedContainer.cs +++ b/Crow/src/GraphicObjects/TemplatedContainer.cs @@ -60,7 +60,7 @@ namespace Crow /// /// Single child of this templated container. /// - public virtual GraphicObject Content { + public virtual Widget Content { get { return _contentContainer == null ? null : _contentContainer.Child; } @@ -73,21 +73,21 @@ namespace Crow get { return _contentContainer?.Child != null; } } //TODO: move loadTemplate and ResolveBinding in TemplatedContainer - protected override void loadTemplate(GraphicObject template = null) + protected override void loadTemplate(Widget template = null) { base.loadTemplate (template); _contentContainer = this.child.FindByName ("Content") as Container; } #region GraphicObject overrides - public override GraphicObject FindByName (string nameToFind) + public override Widget FindByName (string nameToFind) { if (Name == nameToFind) return this; return Content == null ? null : Content.FindByName (nameToFind); } - public override bool Contains (GraphicObject goToFind) + public override bool Contains (Widget goToFind) { if (Content == goToFind) return true; diff --git a/Crow/src/GraphicObjects/TemplatedControl.cs b/Crow/src/GraphicObjects/TemplatedControl.cs index 1f490f11..2e36eac6 100644 --- a/Crow/src/GraphicObjects/TemplatedControl.cs +++ b/Crow/src/GraphicObjects/TemplatedControl.cs @@ -106,7 +106,7 @@ namespace Crow /// /// widget identified by name, or null if not found /// widget's name to find - public override GraphicObject FindByName (string nameToFind) => nameToFind == this.Name ? this : null; + public override Widget FindByName (string nameToFind) => nameToFind == this.Name ? this : null; /// ///onDraw is overrided to prevent default drawing of background, template top container @@ -136,7 +136,7 @@ namespace Crow /// Entry assembly is search first, then the one where the type is defined /// /// Optional template instance - protected virtual void loadTemplate(GraphicObject template = null) + protected virtual void loadTemplate(Widget template = null) { if (this.child != null)//template change, bindings has to be reset this.ClearTemplateBinding(); diff --git a/Crow/src/GraphicObjects/TemplatedGroup.cs b/Crow/src/GraphicObjects/TemplatedGroup.cs index 3fcfd3c7..daaedeb4 100644 --- a/Crow/src/GraphicObjects/TemplatedGroup.cs +++ b/Crow/src/GraphicObjects/TemplatedGroup.cs @@ -53,7 +53,7 @@ namespace Crow it.getIML (doc, parentElem.LastChild); } - foreach (GraphicObject g in Items) { + foreach (Widget g in Items) { g.getIML (doc, parentElem.LastChild); } } @@ -90,7 +90,7 @@ namespace Crow /// Keep track of expanded subnodes and closed time to unload /// //Dictionary nodes = new Dictionary(); - internal List nodes = new List(); + internal List nodes = new List(); /// /// Item templates file path, on disk or embedded. /// @@ -110,7 +110,7 @@ namespace Crow NotifyValueChanged("ItemTemplate", _itemTemplate); } } - protected override void loadTemplate(GraphicObject template = null) + protected override void loadTemplate(Widget template = null) { base.loadTemplate (template); @@ -142,7 +142,7 @@ namespace Crow } #endregion - public virtual List Items{ + public virtual List Items{ get { return isPaged ? items.Children.SelectMany(x => (x as Group).Children).ToList() : items.Children; @@ -278,12 +278,12 @@ namespace Crow } - public virtual void AddItem(GraphicObject g){ + public virtual void AddItem(Widget g){ items.AddChild (g); g.LogicalParent = this; NotifyValueChanged ("HasChildren", true); } - public virtual void RemoveItem(GraphicObject g) + public virtual void RemoveItem(Widget g) { g.LogicalParent = null; items.DeleteChild (g); @@ -303,21 +303,21 @@ namespace Crow #region GraphicObject overrides - public override GraphicObject FindByName (string nameToFind) + public override Widget FindByName (string nameToFind) { if (Name == nameToFind) return this; - foreach (GraphicObject w in Items) { - GraphicObject r = w.FindByName (nameToFind); + foreach (Widget w in Items) { + Widget r = w.FindByName (nameToFind); if (r != null) return r; } return null; } - public override bool Contains (GraphicObject goToFind) + public override bool Contains (Widget goToFind) { - foreach (GraphicObject w in Items) { + foreach (Widget w in Items) { if (w == goToFind) return true; if (w.Contains (goToFind)) @@ -414,7 +414,7 @@ namespace Crow protected void loadItem(object o, Group page, string _dataTest){ if (o == null)//TODO:surely a threading sync problem return; - GraphicObject g = null; + Widget g = null; ItemTemplate iTemp = null; Type dataType = o.GetType (); string itempKey = dataType.FullName; @@ -496,10 +496,10 @@ namespace Crow } } internal virtual void itemClick(object sender, MouseButtonEventArgs e){ - SelectedIndex = data.IndexOf((sender as GraphicObject).DataSource); + SelectedIndex = data.IndexOf((sender as Widget).DataSource); } - bool emitHelperIsAlreadyExpanded (GraphicObject go){ + bool emitHelperIsAlreadyExpanded (Widget go){ if (nodes.Contains (go)) return true; nodes.Add (go); diff --git a/Crow/src/GraphicObjects/TestCairoPatch.cs b/Crow/src/GraphicObjects/TestCairoPatch.cs index f155d3c0..cd15adc5 100644 --- a/Crow/src/GraphicObjects/TestCairoPatch.cs +++ b/Crow/src/GraphicObjects/TestCairoPatch.cs @@ -28,7 +28,7 @@ using Cairo; namespace Crow { - public class TestCairoPatch : GraphicObject + public class TestCairoPatch : Widget { void computeControlPoints ( double xc, double yc, diff --git a/Crow/src/GraphicObjects/TextRun.cs b/Crow/src/GraphicObjects/TextRun.cs index 297ffe95..2be1d628 100644 --- a/Crow/src/GraphicObjects/TextRun.cs +++ b/Crow/src/GraphicObjects/TextRun.cs @@ -37,7 +37,7 @@ using System.ComponentModel; namespace Crow { [DesignIgnore] - public class TextRun : GraphicObject + public class TextRun : Widget { #region CTOR protected TextRun () : base(){} diff --git a/Crow/src/GraphicObjects/TreeView.cs b/Crow/src/GraphicObjects/TreeView.cs index 5a5e7144..9ee8d2c5 100644 --- a/Crow/src/GraphicObjects/TreeView.cs +++ b/Crow/src/GraphicObjects/TreeView.cs @@ -35,7 +35,7 @@ namespace Crow //if their are expandable, some functions and events are added public class TreeView : TemplatedGroup { - GraphicObject selectedItemContainer = null; + Widget selectedItemContainer = null; bool isRoot; #region CTOR @@ -64,7 +64,7 @@ namespace Crow internal override void itemClick (object sender, MouseButtonEventArgs e) { - GraphicObject tmp = sender as GraphicObject; + Widget tmp = sender as Widget; if (!tmp.HasFocus) return; /*if (selectedItemContainer != null) { @@ -85,7 +85,7 @@ namespace Crow public void ExpandAll(){ foreach (Group grp in items.Children) { - foreach (GraphicObject go in grp.Children) { + foreach (Widget go in grp.Children) { Expandable exp = go as Expandable; if (exp == null) continue; diff --git a/Crow/src/GraphicObjects/Trend.cs b/Crow/src/GraphicObjects/Trend.cs index a2e0c838..8fcd8830 100644 --- a/Crow/src/GraphicObjects/Trend.cs +++ b/Crow/src/GraphicObjects/Trend.cs @@ -32,7 +32,7 @@ using Cairo; namespace Crow { - public class Trend : GraphicObject + public class Trend : Widget { #region private fields double minValue, maxValue, lowThreshold, highThreshold; diff --git a/Crow/src/GraphicObjects/GraphicObject.cs b/Crow/src/GraphicObjects/Widget.cs similarity index 97% rename from Crow/src/GraphicObjects/GraphicObject.cs rename to Crow/src/GraphicObjects/Widget.cs index aa200802..ea076f82 100644 --- a/Crow/src/GraphicObjects/GraphicObject.cs +++ b/Crow/src/GraphicObjects/Widget.cs @@ -47,7 +47,7 @@ namespace Crow /// /// The base class for all the graphic tree elements. /// - public class GraphicObject : ILayoutable, IValueChange, IDisposable + public class Widget : ILayoutable, IValueChange, IDisposable { internal ReaderWriterLockSlim parentRWLock = new ReaderWriterLockSlim(); #if DEBUG_LOG @@ -58,9 +58,9 @@ namespace Crow public int xLevel;//x increment for debug draw #endif #if DESIGN_MODE - static MethodInfo miDesignAddDefLoc = typeof(GraphicObject).GetMethod("design_add_style_location", + static MethodInfo miDesignAddDefLoc = typeof(Widget).GetMethod("design_add_style_location", BindingFlags.Instance | BindingFlags.NonPublic); - static MethodInfo miDesignAddValLoc = typeof(GraphicObject).GetMethod("design_add_iml_location", + static MethodInfo miDesignAddValLoc = typeof(Widget).GetMethod("design_add_iml_location", BindingFlags.Instance | BindingFlags.NonPublic); public volatile bool design_HasChanged = false; @@ -89,7 +89,7 @@ namespace Crow // design_iml_locations.Add(memberName, new FileLocation(path,line,col)); // } - public virtual bool FindByDesignID(string designID, out GraphicObject go){ + public virtual bool FindByDesignID(string designID, out Widget go){ go = null; if (this.design_id == designID){ go = this; @@ -162,7 +162,7 @@ namespace Crow Dispose(true); GC.SuppressFinalize(this); } - ~GraphicObject(){ + ~Widget(){ Debug.WriteLine(this.ToString() + " not disposed by user"); Dispose(false); } @@ -202,8 +202,8 @@ namespace Crow #endif internal bool isPopup = false; - public GraphicObject focusParent { - get { return (isPopup ? LogicalParent : parent) as GraphicObject; } + public Widget focusParent { + get { return (isPopup ? LogicalParent : parent) as Widget; } } /// @@ -242,7 +242,7 @@ namespace Crow /// when creating widget from code because widgets has to be bound to an interface before any other /// action. /// - protected GraphicObject () { + protected Widget () { Clipping = new Region (); #if DEBUG_LOG GraphicObjects.Add (this); @@ -259,7 +259,7 @@ namespace Crow /// compiler will not create it automatically because of the presence of the other one. /// /// Iface. - public GraphicObject (Interface iface) : this() + public Widget (Interface iface) : this() { IFace = iface; Initialize (); @@ -368,12 +368,12 @@ namespace Crow if (logicalParent == value) return; if (logicalParent != null) - (logicalParent as GraphicObject).DataSourceChanged -= onLogicalParentDataSourceChanged; + (logicalParent as Widget).DataSourceChanged -= onLogicalParentDataSourceChanged; DataSourceChangeEventArgs dsce = new DataSourceChangeEventArgs (LogicalParent, null); logicalParent = value; dsce.NewDataSource = LogicalParent; if (logicalParent != null) - (logicalParent as GraphicObject).DataSourceChanged += onLogicalParentDataSourceChanged; + (logicalParent as Widget).DataSourceChanged += onLogicalParentDataSourceChanged; onLogicalParentChanged (this, dsce); } } @@ -385,7 +385,7 @@ namespace Crow } } public virtual Rectangle ContextCoordinates(Rectangle r){ - GraphicObject go = Parent as GraphicObject; + Widget go = Parent as Widget; if (go == null) return r + Parent.ClientRectangle.Position; return go.CacheEnabled ? @@ -618,7 +618,7 @@ namespace Crow public virtual Measure Width { get { return width.Units == Unit.Inherit ? - Parent is GraphicObject ? (Parent as GraphicObject).WidthPolicy : + Parent is Widget ? (Parent as Widget).WidthPolicy : Measure.Stretched : width; } set { @@ -659,7 +659,7 @@ namespace Crow public virtual Measure Height { get { return height.Units == Unit.Inherit ? - Parent is GraphicObject ? (Parent as GraphicObject).HeightPolicy : + Parent is Widget ? (Parent as Widget).HeightPolicy : Measure.Stretched : height; } set { @@ -979,7 +979,7 @@ namespace Crow get { return rootDataLevel ? dataSource : dataSource == null ? LogicalParent == null ? null : - LogicalParent is GraphicObject ? (LogicalParent as GraphicObject).DataSource : null : + LogicalParent is Widget ? (LogicalParent as Widget).DataSource : null : dataSource; } } @@ -1184,7 +1184,7 @@ namespace Crow il.Emit (OpCodes.Call, miDesignAddDefLoc); il.Emit (OpCodes.Ldloc_0); - il.Emit (OpCodes.Ldfld, typeof(GraphicObject).GetField("design_style_values")); + il.Emit (OpCodes.Ldfld, typeof(Widget).GetField("design_style_values")); il.Emit (OpCodes.Ldstr, pi.Name); il.Emit (OpCodes.Ldstr, defaultValue.ToString()); il.Emit (OpCodes.Call, CompilerServices.miDicStrStrAdd); @@ -1234,16 +1234,16 @@ namespace Crow } #endregion - public virtual GraphicObject FindByName(string nameToFind){ + public virtual Widget FindByName(string nameToFind){ return string.Equals(nameToFind, name, StringComparison.Ordinal) ? this : null; } - public virtual bool Contains(GraphicObject goToFind){ + public virtual bool Contains(Widget goToFind){ return false; } /// /// return true if this is contained inside go /// - public bool IsOrIsInside(GraphicObject go){ + public bool IsOrIsInside(Widget go){ if (this == go) return true; ILayoutable p = this.Parent; @@ -1382,7 +1382,7 @@ namespace Crow Clipping.UnionRectangle (r); if (Parent == null) return; - GraphicObject p = Parent as GraphicObject; + Widget p = Parent as Widget; if (p?.IsDirty == true && p?.CacheEnabled == true) return; Parent.RegisterClip (r + Slot.Position); @@ -1440,8 +1440,8 @@ namespace Crow layoutType &= (~LayoutingType.ArrangeChildren); //apply constraints depending on parent type - if (Parent is GraphicObject) - (Parent as GraphicObject).ChildrenLayoutingConstraints (ref layoutType); + if (Parent is Widget) + (Parent as Widget).ChildrenLayoutingConstraints (ref layoutType); // //prevent queueing same LayoutingType for this layoutType &= (~RegisteredLayoutings); @@ -1805,7 +1805,7 @@ namespace Crow return; //bubble event to the top - GraphicObject p = focusParent; + Widget p = focusParent; if (p != null) p.onMouseMove(sender,e); @@ -1826,7 +1826,7 @@ namespace Crow } } //bubble event to the top - GraphicObject p = focusParent; + Widget p = focusParent; if (p != null) p.onMouseDown(sender,e); @@ -1848,7 +1848,7 @@ namespace Crow } //bubble event to the top - GraphicObject p = focusParent; + Widget p = focusParent; if (p != null) p.onMouseUp(sender,e); @@ -1863,7 +1863,7 @@ namespace Crow MouseClick.Raise(this, e); return; } - GraphicObject p = focusParent; + Widget p = focusParent; if (p != null) p.onMouseClick(sender,e); } @@ -1876,7 +1876,7 @@ namespace Crow MouseDoubleClick.Raise(this, e); return; } - GraphicObject p = focusParent; + Widget p = focusParent; if (p != null) p.onMouseDoubleClick(sender,e); } @@ -1886,7 +1886,7 @@ namespace Crow MouseWheelChanged.Raise(this, e); return; } - GraphicObject p = focusParent; + Widget p = focusParent; if (p != null) p.onMouseWheel(sender,e); } @@ -1897,7 +1897,7 @@ namespace Crow #endif if (IFace.DragAndDropOperation != null) { - GraphicObject g = this; + Widget g = this; while (g != null) { if (g.AllowDrop) { if (IFace.DragAndDropOperation.DragSource != this && IFace.DragAndDropOperation.DropTarget != this) { diff --git a/Crow/src/GraphicObjects/Window.cs b/Crow/src/GraphicObjects/Window.cs index a6155447..6c8f005e 100644 --- a/Crow/src/GraphicObjects/Window.cs +++ b/Crow/src/GraphicObjects/Window.cs @@ -73,7 +73,7 @@ namespace Crow #endregion #region TemplatedContainer overrides - protected override void loadTemplate(GraphicObject template = null) + protected override void loadTemplate(Widget template = null) { base.loadTemplate (template); @@ -442,7 +442,7 @@ namespace Crow if (Parent is Interface) (Parent as Interface).DeleteWidget (this); else { - GraphicObject p = Parent as GraphicObject; + Widget p = Parent as Widget; if (p is Group) { lock (IFace.UpdateMutex) { RegisterClip (p.ScreenCoordinates (p.LastPaintedSlot)); diff --git a/Crow/src/GraphicObjects/Wrapper.cs b/Crow/src/GraphicObjects/Wrapper.cs index a7f5f73b..cc319856 100644 --- a/Crow/src/GraphicObjects/Wrapper.cs +++ b/Crow/src/GraphicObjects/Wrapper.cs @@ -51,7 +51,7 @@ namespace Crow if (Orientation == Orientation.Vertical) { int tallestChild = 0; - foreach (GraphicObject c in Children) { + foreach (Widget c in Children) { if (!c.Visible) continue; if (dx + c.Slot.Width > ClientRectangle.Width) { @@ -70,7 +70,7 @@ namespace Crow } } else { int largestChild = 0; - foreach (GraphicObject c in Children) { + foreach (Widget c in Children) { if (!c.Visible) continue; if (dy + c.Slot.Height > ClientRectangle.Height) { @@ -93,7 +93,7 @@ namespace Crow public override void OnChildLayoutChanges (object sender, LayoutingEventArgs arg) { //children can't stretch in a wrapper - GraphicObject go = sender as GraphicObject; + Widget go = sender as Widget; //System.Diagnostics.Debug.WriteLine ("wrapper child layout change: " + go.LastSlots.ToString() + " => " + go.Slot.ToString()); switch (arg.LayoutType) { case LayoutingType.Width: @@ -134,7 +134,7 @@ namespace Crow childrenRWLock.EnterReadLock(); - foreach (GraphicObject c in Children) { + foreach (Widget c in Children) { if (!c.Visible) continue; if (c.Height.IsRelativeToParent && @@ -169,7 +169,7 @@ namespace Crow childrenRWLock.EnterReadLock(); - foreach (GraphicObject c in Children) { + foreach (Widget c in Children) { if (!c.Visible) continue; if (c.Width.IsRelativeToParent && @@ -222,7 +222,7 @@ namespace Crow #endif switch (layoutType) { case LayoutingType.Width: - foreach (GraphicObject c in Children) { + foreach (Widget c in Children) { if (c.Width.IsRelativeToParent) c.RegisterForLayouting (LayoutingType.Width); } @@ -231,7 +231,7 @@ namespace Crow RegisterForLayouting (LayoutingType.X); break; case LayoutingType.Height: - foreach (GraphicObject c in Children) { + foreach (Widget c in Children) { if (c.Height.IsRelativeToParent) c.RegisterForLayouting (LayoutingType.Height); } diff --git a/Crow/src/IML/IMLContext.cs b/Crow/src/IML/IMLContext.cs index a0e95bef..1d5b5509 100644 --- a/Crow/src/IML/IMLContext.cs +++ b/Crow/src/IML/IMLContext.cs @@ -67,7 +67,7 @@ namespace Crow.IML typeof (object), new Type [] { typeof (Instantiator), typeof (Interface) }, true); il = dm.GetILGenerator (256); - il.DeclareLocal (typeof (GraphicObject)); + il.DeclareLocal (typeof (Widget)); il.Emit (OpCodes.Nop); //set local GraphicObject to root object ConstructorInfo ci = rootType.GetConstructor ( diff --git a/Crow/src/Instantiator.cs b/Crow/src/Instantiator.cs index 98852001..d86c0133 100644 --- a/Crow/src/Instantiator.cs +++ b/Crow/src/Instantiator.cs @@ -155,7 +155,7 @@ namespace Crow.IML /// Creates a new instance of the GraphicObject compiled in the instantiator /// /// The new graphic object instance - public GraphicObject CreateInstance(){ + public Widget CreateInstance(){ #if DEBUG_LOAD Stopwatch loadingTime = Stopwatch.StartNew (); GraphicObject o = loader (iface) as GraphicObject; @@ -165,7 +165,7 @@ namespace Crow.IML } return o; #else - return loader (iface) as GraphicObject; + return loader (iface) as Widget; #endif } /// @@ -412,7 +412,7 @@ namespace Crow.IML void emitSetDesignAttribute (IMLContext ctx, string name, string value){ //store member value in iml ctx.il.Emit (OpCodes.Ldloc_0); - ctx.il.Emit (OpCodes.Ldfld, typeof(GraphicObject).GetField("design_iml_values")); + ctx.il.Emit (OpCodes.Ldfld, typeof(Widget).GetField("design_iml_values")); ctx.il.Emit (OpCodes.Ldstr, name); if (string.IsNullOrEmpty (value)) ctx.il.Emit (OpCodes.Ldnull); @@ -435,17 +435,17 @@ namespace Crow.IML IXmlLineInfo li = (IXmlLineInfo)reader; ctx.il.Emit (OpCodes.Ldloc_0); ctx.il.Emit (OpCodes.Ldstr, this.NextDesignID); - ctx.il.Emit (OpCodes.Stfld, typeof(GraphicObject).GetField("design_id")); + ctx.il.Emit (OpCodes.Stfld, typeof(Widget).GetField("design_id")); ctx.il.Emit (OpCodes.Ldloc_0); ctx.il.Emit (OpCodes.Ldc_I4, ctx.curLine + li.LineNumber); - ctx.il.Emit (OpCodes.Stfld, typeof(GraphicObject).GetField("design_line")); + ctx.il.Emit (OpCodes.Stfld, typeof(Widget).GetField("design_line")); ctx.il.Emit (OpCodes.Ldloc_0); ctx.il.Emit (OpCodes.Ldc_I4, li.LinePosition); - ctx.il.Emit (OpCodes.Stfld, typeof(GraphicObject).GetField("design_column")); + ctx.il.Emit (OpCodes.Stfld, typeof(Widget).GetField("design_column")); if (!string.IsNullOrEmpty (sourcePath)) { ctx.il.Emit (OpCodes.Ldloc_0); ctx.il.Emit (OpCodes.Ldstr, sourcePath); - ctx.il.Emit (OpCodes.Stfld, typeof(GraphicObject).GetField("design_imlPath")); + ctx.il.Emit (OpCodes.Stfld, typeof(Widget).GetField("design_imlPath")); } #endif #region Styling and default values loading diff --git a/Crow/src/Interface.cs b/Crow/src/Interface.cs index 0c461613..9ba6462a 100644 --- a/Crow/src/Interface.cs +++ b/Crow/src/Interface.cs @@ -24,19 +24,16 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.Globalization; +using System.IO; using System.Linq; using System.Reflection; using System.Threading; -using System.Xml; -using System.Xml.Serialization; using Cairo; -using System.Globalization; using Crow.IML; -using System.Runtime.InteropServices; -using System; -using System.IO; -using System.Diagnostics; -using System.Collections.Generic; namespace Crow @@ -285,7 +282,7 @@ namespace Crow /// protected static Interface CurrentInterface; internal Stopwatch clickTimer = new Stopwatch(); - GraphicObject armedClickSender = null; + Widget armedClickSender = null; MouseButtonEventArgs armedClickEvtArgs = null; // internal GraphicObject EligibleForDoubleClick { // get { return eligibleForDoubleClick; } @@ -294,7 +291,7 @@ namespace Crow // clickTimer.Restart (); // } // } - internal void armeClick (GraphicObject sender, MouseButtonEventArgs e){ + internal void armeClick (Widget sender, MouseButtonEventArgs e){ armedClickSender = sender; armedClickEvtArgs = e; clickTimer.Restart (); @@ -322,7 +319,7 @@ namespace Crow #region Public Fields /// Graphic Tree of this interface - public List GraphicTree = new List(); + public List GraphicTree = new List(); /// Interface's resulting bitmap public byte[] bmp; /// resulting bitmap limited to last redrawn part @@ -349,7 +346,7 @@ namespace Crow /// Store discarded lqi between two updates public Queue DiscardQueue; /// Main drawing queue, holding layouted controls - public Queue ClippingQueue = new Queue(); + public Queue ClippingQueue = new Queue(); public string Clipboard;//TODO:use object instead for complex copy paste /// each IML and fragments (such as inline Templates) are compiled as a Dynamic Method stored here /// on the first instance creation of a IML item. @@ -499,9 +496,9 @@ namespace Crow /// /// return the new instance for convenience, may be ignored /// a valid IML string - public GraphicObject LoadIMLFragment (string imlFragment) { + public Widget LoadIMLFragment (string imlFragment) { lock (UpdateMutex) { - GraphicObject tmp = CreateITorFromIMLFragment (imlFragment).CreateInstance(); + Widget tmp = CreateITorFromIMLFragment (imlFragment).CreateInstance(); AddWidget (tmp); return tmp; } @@ -519,10 +516,10 @@ namespace Crow /// /// new instance of graphic object created /// path of the iml file to load - public GraphicObject Load (string path) + public Widget Load (string path) { lock (UpdateMutex) { - GraphicObject tmp = CreateInstance (path); + Widget tmp = CreateInstance (path); AddWidget (tmp); return tmp; } @@ -532,7 +529,7 @@ namespace Crow /// /// new instance of graphic object created /// path of the iml file to load - public virtual GraphicObject CreateInstance (string path) + public virtual Widget CreateInstance (string path) { try { return GetInstantiator (path).CreateInstance (); @@ -545,7 +542,7 @@ namespace Crow /// /// new instance of graphic object created /// path of the iml file to load - public virtual GraphicObject CreateTemplateInstance (string path, Type declaringType) + public virtual Widget CreateTemplateInstance (string path, Type declaringType) { try { if (!Templates.ContainsKey (path)) @@ -577,13 +574,13 @@ namespace Crow #endregion #region focus - GraphicObject _activeWidget; //button is pressed on widget - GraphicObject _hoverWidget; //mouse is over - GraphicObject _focusedWidget; //has keyboard (or other perif) focus + Widget _activeWidget; //button is pressed on widget + Widget _hoverWidget; //mouse is over + Widget _focusedWidget; //has keyboard (or other perif) focus /// Widget is focused and button is down or another perif action is occuring /// , it can not lose focus while Active - public GraphicObject ActiveWidget + public Widget ActiveWidget { get { return _activeWidget; } set @@ -614,7 +611,7 @@ namespace Crow } } /// Pointer is over the widget - public virtual GraphicObject HoverWidget + public virtual Widget HoverWidget { get { return _hoverWidget; } set { @@ -644,7 +641,7 @@ namespace Crow } } /// Widget has the keyboard or mouse focus - public GraphicObject FocusedWidget { + public Widget FocusedWidget { get { return _focusedWidget; } set { if (_focusedWidget == value) @@ -666,7 +663,7 @@ namespace Crow /// GraphObj's property Set methods could trigger an update from another thread /// Once in that queue, that means that the layouting of obj and childs have succeed, /// the next step when dequeued will be clipping registration - public void EnqueueForRepaint(GraphicObject g) + public void EnqueueForRepaint(Widget g) { lock (ClippingMutex) { if (g.IsQueueForClipping) @@ -775,7 +772,7 @@ namespace Crow if (ClippingQueue.Count > 0) DebugLog.AddEvent (DbgEvtType.IFaceStartClipping); #endif - GraphicObject g = null; + Widget g = null; while (ClippingQueue.Count > 0) { lock (ClippingMutex) { g = ClippingQueue.Dequeue (); @@ -816,7 +813,7 @@ namespace Crow ctx.Operator = Operator.Over; for (int i = GraphicTree.Count -1; i >= 0 ; i--){ - GraphicObject p = GraphicTree[i]; + Widget p = GraphicTree[i]; if (!p.Visible) continue; if (clipping.Contains (p.Slot) == RegionOverlap.Out) @@ -870,7 +867,7 @@ namespace Crow #region GraphicTree handling /// Add widget to the Graphic tree of this interface and register it for layouting - public GraphicObject AddWidget(GraphicObject g) + public Widget AddWidget(Widget g) { g.Parent = this; int ptr = 0; @@ -896,7 +893,7 @@ namespace Crow return g; } /// Set visible state of widget to false and delete if from the graphic tree - public void DeleteWidget(GraphicObject g) + public void DeleteWidget(Widget g) { lock (UpdateMutex) { RegisterClip (g.ScreenCoordinates (g.LastPaintedSlot)); @@ -906,7 +903,7 @@ namespace Crow } } /// Set visible state of widget to false and remove if from the graphic tree - public void RemoveWidget(GraphicObject g) + public void RemoveWidget(Widget g) { // if (g.Contains(HoverWidget)) { // while (HoverWidget != g.focusParent) { @@ -927,7 +924,7 @@ namespace Crow while (GraphicTree.Count > 0) { //TODO:parent is not reset to null because object will be added //to ObjectToRedraw list, and without parent, it fails - GraphicObject g = GraphicTree [0]; + Widget g = GraphicTree [0]; RegisterClip (g.ScreenCoordinates (g.LastPaintedSlot)); GraphicTree.RemoveAt (0); g.Dispose (); @@ -941,7 +938,7 @@ namespace Crow #endif } /// Put widget on top of other root widgets - public void PutOnTop(GraphicObject g, bool isOverlay = false) + public void PutOnTop(Widget g, bool isOverlay = false) { int ptr = 0; Window newW = g as Window; @@ -966,10 +963,10 @@ namespace Crow } /// Search a Graphic object in the tree named 'nameToFind' - public GraphicObject FindByName (string nameToFind) + public Widget FindByName (string nameToFind) { - foreach (GraphicObject w in GraphicTree) { - GraphicObject r = w.FindByName (nameToFind); + foreach (Widget w in GraphicTree) { + Widget r = w.FindByName (nameToFind); if (r != null) return r; } @@ -994,7 +991,7 @@ namespace Crow (surf as XcbSurface).SetSize (clientRectangle.Width, clientRectangle.Height); - foreach (GraphicObject g in GraphicTree) + foreach (Widget g in GraphicTree) g.RegisterForLayouting (LayoutingType.All); RegisterClip (clientRectangle); @@ -1043,9 +1040,9 @@ namespace Crow if (HoverWidget != null) { resetTooltip (); //check topmost graphicobject first - GraphicObject tmp = HoverWidget; - GraphicObject topc = null; - while (tmp is GraphicObject) { + Widget tmp = HoverWidget; + Widget topc = null; + while (tmp is Widget) { topc = tmp; tmp = tmp.focusParent; } @@ -1091,7 +1088,7 @@ namespace Crow //top level graphic obj's parsing lock (GraphicTree) { for (int i = 0; i < GraphicTree.Count; i++) { - GraphicObject g = GraphicTree [i]; + Widget g = GraphicTree [i]; if (g.MouseIsIn (e.Position)) { g.checkHoverWidget (e); if (g is Window) @@ -1147,7 +1144,7 @@ namespace Crow if (HoverWidget == null) return false; - GraphicObject hoverFocused = HoverWidget; + Widget hoverFocused = HoverWidget; while (!hoverFocused.Focusable) { hoverFocused = hoverFocused.focusParent; if (hoverFocused == null) { @@ -1203,7 +1200,7 @@ namespace Crow #region Tooltip handling Stopwatch tooltipTimer = new Stopwatch(); - GraphicObject ToolTipContainer = null; + Widget ToolTipContainer = null; volatile bool tooltipVisible = false; protected void initTooltip () { @@ -1217,7 +1214,7 @@ namespace Crow while(true) { if (tooltipTimer.ElapsedMilliseconds > ToolTipDelay) { if (!tooltipVisible) { - GraphicObject g = _hoverWidget; + Widget g = _hoverWidget; while (g != null) { if (!string.IsNullOrEmpty (g.Tooltip)) { AddWidget (ToolTipContainer); @@ -1227,7 +1224,7 @@ namespace Crow tooltipVisible = true; break; } - g = g.LogicalParent as GraphicObject; + g = g.LogicalParent as Widget; } } } @@ -1265,7 +1262,7 @@ namespace Crow } - public void ShowContextMenu (GraphicObject go) { + public void ShowContextMenu (Widget go) { lock (UpdateMutex) { if (ctxMenuContainer.Parent == null) diff --git a/Crow/src/ItemTemplate.cs b/Crow/src/ItemTemplate.cs index 1f41e552..e4615b7a 100644 --- a/Crow/src/ItemTemplate.cs +++ b/Crow/src/ItemTemplate.cs @@ -58,7 +58,7 @@ namespace Crow if (string.IsNullOrEmpty (sourcePath)) { //inline item template - using (GraphicObject go = this.CreateInstance()) + using (Widget go = this.CreateInstance()) go.getIML (doc, xe); } else { xa = doc.CreateAttribute ("Path"); @@ -165,7 +165,7 @@ namespace Crow System.Reflection.Emit.Label gotoItemsContainerNotFound; ILGenerator il = dm.GetILGenerator (256); - il.DeclareLocal(typeof(GraphicObject)); + il.DeclareLocal(typeof(Widget)); gotoEnd = il.DefineLabel (); ifDataIsNull = il.DefineLabel (); diff --git a/Crow/src/LayoutingQueueItem.cs b/Crow/src/LayoutingQueueItem.cs index a905f25d..98c04ecc 100644 --- a/Crow/src/LayoutingQueueItem.cs +++ b/Crow/src/LayoutingQueueItem.cs @@ -105,7 +105,7 @@ namespace Crow public void ProcessLayouting() { - GraphicObject go = Layoutable as GraphicObject; + Widget go = Layoutable as Widget; // if (go == null) { // Debug.WriteLine ("ERROR: processLayouting on something else than a graphic object: " + this.ToString ()); // return; @@ -132,7 +132,7 @@ namespace Crow #endif if (LayoutingTries < Interface.MaxLayoutingTries) { Layoutable.RegisteredLayoutings |= LayoutType; - (Layoutable as GraphicObject).IFace.LayoutingQueue.Enqueue (this); + (Layoutable as Widget).IFace.LayoutingQueue.Enqueue (this); #if DEBUG_LOG result = Result.Requeued; #endif @@ -143,7 +143,7 @@ namespace Crow LayoutingTries = 0; DiscardCount++; Layoutable.RegisteredLayoutings |= LayoutType; - (Layoutable as GraphicObject).IFace.DiscardQueue.Enqueue (this); + (Layoutable as Widget).IFace.DiscardQueue.Enqueue (this); } #if DEBUG_LOG else { @@ -160,9 +160,9 @@ namespace Crow go.parentRWLock.ExitReadLock (); } - public static implicit operator GraphicObject(LayoutingQueueItem queueItem) + public static implicit operator Widget(LayoutingQueueItem queueItem) { - return queueItem.Layoutable as GraphicObject; + return queueItem.Layoutable as Widget; } public static implicit operator LayoutingType(LayoutingQueueItem lqi) { diff --git a/CrowIDE/CrowIDE.csproj b/CrowIDE/CrowIDE.csproj index fd909ee7..c0c44ed6 100644 --- a/CrowIDE/CrowIDE.csproj +++ b/CrowIDE/CrowIDE.csproj @@ -69,7 +69,7 @@ - + diff --git a/CrowIDE/src/CrowIDE.cs b/CrowIDE/src/CrowIDE.cs index ca5a0440..d0b640ff 100644 --- a/CrowIDE/src/CrowIDE.cs +++ b/CrowIDE/src/CrowIDE.cs @@ -159,7 +159,7 @@ namespace Crow.Coding initCommands (); - GraphicObject go = Load (@"#CrowIDE.ui.CrowIDE.crow"); + Widget go = Load (@"#CrowIDE.ui.CrowIDE.crow"); go.DataSource = this; mainDock = go.FindByName ("mainDock") as DockStack; @@ -275,7 +275,7 @@ namespace Crow.Coding Window loadWindow(string path, object dataSource = null){ try { - GraphicObject g = MainIFace.FindByName (path); + Widget g = MainIFace.FindByName (path); if (g != null) return g as Window; g = MainIFace.Load (path); @@ -288,7 +288,7 @@ namespace Crow.Coding return null; } void closeWindow (string path){ - GraphicObject g = MainIFace.FindByName (path); + Widget g = MainIFace.FindByName (path); if (g != null) MainIFace.DeleteWidget (g); } diff --git a/CrowIDE/src/DesignInterface.cs b/CrowIDE/src/DesignInterface.cs index 4d65e8d2..ae9af80c 100644 --- a/CrowIDE/src/DesignInterface.cs +++ b/CrowIDE/src/DesignInterface.cs @@ -61,9 +61,28 @@ namespace Crow.Coding public ProjectFile ProjFile; + + public override Widget CreateInstance (string path) + { + ProjectFile pi; + + if (ProjFile.Project.solution.GetProjectFileFromPath (path, out pi)) + return CreateITorFromIMLFragment (pi.Source).CreateInstance(); + + return null; + } + public override Stream GetStreamFromPath (string path) + { + ProjectFile pi; + if (ProjFile.Project.solution.GetProjectFileFromPath (path, out pi)) { + return new FileStream (pi.AbsolutePath, FileMode.Open); + } + throw new Exception ($"In Design File not found: {path}"); + } + protected override void InitBackend () { - surf = new ImageSurface(Format.Argb32, 100, 100); + surf = new ImageSurface (Format.Argb32, 100, 100); } public override void ProcessResize (Rectangle bounds) { @@ -72,32 +91,15 @@ namespace Crow.Coding lock (UpdateMutex) { clientRectangle = bounds; surf.Dispose (); - surf = new ImageSurface(Format.Argb32, clientRectangle.Width, clientRectangle.Height); + surf = new ImageSurface (Format.Argb32, clientRectangle.Width, clientRectangle.Height); - foreach (GraphicObject g in GraphicTree) + foreach (Widget g in GraphicTree) g.RegisterForLayouting (LayoutingType.All); RegisterClip (clientRectangle); } } - public override GraphicObject CreateInstance (string path) - { - ProjectFile pi; - - if (ProjFile.Project.solution.GetProjectFileFromPath (path, out pi)) - return CreateITorFromIMLFragment (pi.Source).CreateInstance(); - - return null; - } - public override System.IO.Stream GetStreamFromPath (string path) - { - ProjectFile pi; - if (ProjFile.Project.solution.GetProjectFileFromPath (path, out pi)) { - return new FileStream (pi.AbsolutePath, FileMode.Open); - } - throw new Exception ($"In Design File not found: {path}"); - } public override bool ProcessMouseMove (int x, int y) { int deltaX = x - Mouse.X; @@ -118,11 +120,11 @@ namespace Crow.Coding if (HoverWidget != null) { //check topmost graphicobject first - GraphicObject tmp = HoverWidget; - GraphicObject topc = null; - while (tmp is GraphicObject) { + Widget tmp = HoverWidget; + Widget topc = null; + while (tmp is Widget) { topc = tmp; - tmp = tmp.LogicalParent as GraphicObject; + tmp = tmp.LogicalParent as Widget; } int idxhw = GraphicTree.IndexOf (topc); if (idxhw != 0) { @@ -132,7 +134,7 @@ namespace Crow.Coding if (GraphicTree [i].MouseIsIn (e.Position)) { while (HoverWidget != null) { HoverWidget.onMouseLeave (HoverWidget, e); - HoverWidget = HoverWidget.LogicalParent as GraphicObject; + HoverWidget = HoverWidget.LogicalParent as Widget; } GraphicTree [i].checkHoverWidget (e); @@ -150,8 +152,8 @@ namespace Crow.Coding } else { HoverWidget.onMouseLeave (HoverWidget, e); //seek upward from last focused graph obj's - while (HoverWidget.LogicalParent as GraphicObject != null) { - HoverWidget = HoverWidget.LogicalParent as GraphicObject; + while (HoverWidget.LogicalParent as Widget != null) { + HoverWidget = HoverWidget.LogicalParent as Widget; if (HoverWidget.MouseIsIn (e.Position)) { HoverWidget.checkHoverWidget (e); return true; @@ -164,7 +166,7 @@ namespace Crow.Coding //top level graphic obj's parsing lock (GraphicTree) { for (int i = 0; i < GraphicTree.Count; i++) { - GraphicObject g = GraphicTree [i]; + Widget g = GraphicTree [i]; if (g.MouseIsIn (e.Position)) { if (!(HoverWidget is TemplatedControl)) g.checkHoverWidget (e); diff --git a/CrowIDE/src/Editors/ImlSchematicEditor.cs b/CrowIDE/src/Editors/ImlSchematicEditor.cs index e31d1f54..64541c90 100644 --- a/CrowIDE/src/Editors/ImlSchematicEditor.cs +++ b/CrowIDE/src/Editors/ImlSchematicEditor.cs @@ -40,7 +40,7 @@ namespace Crow.Coding #endregion ProjectFile projNode; - GraphicObject selectedItem; + Widget selectedItem; ImlProjectItem imlProjFile; Exception imlError = null; @@ -79,7 +79,7 @@ namespace Crow.Coding RegisterForRedraw (); } } - public GraphicObject SelectedItem { + public Widget SelectedItem { get { return selectedItem; } set { if (selectedItem == value) diff --git a/CrowIDE/src/Editors/ImlVisualEditor.cs b/CrowIDE/src/Editors/ImlVisualEditor.cs index a7ba8c67..616d9a6b 100644 --- a/CrowIDE/src/Editors/ImlVisualEditor.cs +++ b/CrowIDE/src/Editors/ImlVisualEditor.cs @@ -49,7 +49,7 @@ namespace Crow.Coding base.onInitialized (sender, e); } DesignInterface imlVE; - GraphicObject selectedItem; + Widget selectedItem; ImlProjectItem imlProjFile; bool editorIsDirty = false;//needed when tree is empty @@ -146,7 +146,7 @@ namespace Crow.Coding } } - public GraphicObject SelectedItem { + public Widget SelectedItem { get { return selectedItem; } set { if (selectedItem == value) @@ -163,7 +163,7 @@ namespace Crow.Coding } } /// PoinprojFilever the widget - public virtual GraphicObject HoverWidget + public virtual Widget HoverWidget { get { return imlVE.HoverWidget; } set { @@ -188,7 +188,7 @@ namespace Crow.Coding } } - public List GraphicTree { + public List GraphicTree { get { return imlVE.GraphicTree; } } @@ -264,7 +264,7 @@ namespace Crow.Coding } } } - GraphicObject go = null; + Widget go = null; Error = null; if (emptyFile){ @@ -320,11 +320,11 @@ namespace Crow.Coding { base.onMouseMove (sender, e); - GraphicObject oldHW = HoverWidget; + Widget oldHW = HoverWidget; Rectangle scr = this.ScreenCoordinates (this.getSlot ()); ProcessMouseMove (e.X - scr.X, e.Y - scr.Y); - GraphicObject newHW = HoverWidget; + Widget newHW = HoverWidget; if (newHW == null) return; @@ -453,7 +453,7 @@ namespace Crow.Coding gr.FontOptions = Interface.FontRenderingOptions; gr.Antialias = Interface.Antialias; - GraphicObject g = SelectedItem; + Widget g = SelectedItem; hr = g.ScreenCoordinates (g.getSlot ()); // Rectangle rIcons = new Rectangle (iconSize); @@ -511,7 +511,7 @@ namespace Crow.Coding pic.Paint (gr, r); gr.Operator = Operator.Over; } - void drawDesignOverlay (Context gr, GraphicObject g, Rectangle cb, Rectangle hr, double coteStroke, double space = 6.5){ + void drawDesignOverlay (Context gr, Widget g, Rectangle cb, Rectangle hr, double coteStroke, double space = 6.5){ double z = zoom / 100.0; double coteW = 3, coteL = 5; bool fill = true; @@ -612,7 +612,7 @@ namespace Crow.Coding if (SelectedItem == null) return; - GraphicObject dumy = new GraphicObject (IFace); + Widget dumy = new Widget (IFace); dumy.EndDrag += dumyOnEndDrag; dumy.Drop += dumyOnDrop; dumy.IsDragged = true; @@ -644,7 +644,7 @@ namespace Crow.Coding #region draggedObj handling - public GraphicObject draggedObj = null; + public Widget draggedObj = null; void createDraggedObj (Type crowType) { lock (imlVE.UpdateMutex) { @@ -659,7 +659,7 @@ namespace Crow.Coding } #endregion - void removeObject (GraphicObject go) { + void removeObject (Widget go) { if (go == null) return; if (go.Parent == null) @@ -687,7 +687,7 @@ namespace Crow.Coding EditorIsDirty = true; //} } - void deleteObject (GraphicObject go) { + void deleteObject (Widget go) { if (go == null) return; //lock (imlVE.UpdateMutex) { @@ -696,7 +696,7 @@ namespace Crow.Coding //} } - ILayoutable getPossibleParent (ILayoutable parent, GraphicObject go) { + ILayoutable getPossibleParent (ILayoutable parent, Widget go) { if (go == null) return null; // lock (imlVE.UpdateMutex) { @@ -720,7 +720,7 @@ namespace Crow.Coding return parent as Group; // } } - bool tryAddObjectTo (ILayoutable parent, GraphicObject go) { + bool tryAddObjectTo (ILayoutable parent, Widget go) { if (go == null) return false; // lock (imlVE.UpdateMutex) { @@ -767,7 +767,7 @@ namespace Crow.Coding - void WidgetCheckOver (GraphicObject go, MouseMoveEventArgs e){ + void WidgetCheckOver (Widget go, MouseMoveEventArgs e){ Type tGo = go.GetType(); if (typeof(TemplatedGroup).IsAssignableFrom (tGo)) { @@ -796,13 +796,13 @@ namespace Crow.Coding HoverWidget = go; WidgetMouseEnter (go, e); } - void WidgetMouseLeave (GraphicObject go, MouseMoveEventArgs e){ + void WidgetMouseLeave (Widget go, MouseMoveEventArgs e){ } - void WidgetMouseEnter (GraphicObject go, MouseMoveEventArgs e){ + void WidgetMouseEnter (Widget go, MouseMoveEventArgs e){ } - void WidgetMouseMove (GraphicObject go, MouseMoveEventArgs e){} + void WidgetMouseMove (Widget go, MouseMoveEventArgs e){} public bool ProcessMouseMove(int x, int y) { @@ -823,11 +823,11 @@ namespace Crow.Coding if (HoverWidget != null) { //TODO, ensure object is still in the graphic tree //check topmost graphicobject first - GraphicObject tmp = HoverWidget; - GraphicObject topc = null; - while (tmp is GraphicObject) { + Widget tmp = HoverWidget; + Widget topc = null; + while (tmp is Widget) { topc = tmp; - tmp = tmp.LogicalParent as GraphicObject; + tmp = tmp.LogicalParent as Widget; } int idxhw = imlVE.GraphicTree.IndexOf (topc); if (idxhw != 0) { @@ -837,7 +837,7 @@ namespace Crow.Coding if (imlVE.GraphicTree [i].MouseIsIn (e.Position)) { while (imlVE.HoverWidget != null) { WidgetMouseLeave (imlVE.HoverWidget, e); - imlVE.HoverWidget = imlVE.HoverWidget.LogicalParent as GraphicObject; + imlVE.HoverWidget = imlVE.HoverWidget.LogicalParent as Widget; } WidgetCheckOver (GraphicTree [i], e); @@ -855,8 +855,8 @@ namespace Crow.Coding } else { WidgetMouseLeave (imlVE.HoverWidget, e); //seek upward from last focused graph obj's - while (imlVE.HoverWidget.LogicalParent as GraphicObject != null) { - imlVE.HoverWidget = imlVE.HoverWidget.LogicalParent as GraphicObject; + while (imlVE.HoverWidget.LogicalParent as Widget != null) { + imlVE.HoverWidget = imlVE.HoverWidget.LogicalParent as Widget; if (imlVE.HoverWidget.MouseIsIn (e.Position)) { WidgetCheckOver (imlVE.HoverWidget, e); return true; @@ -869,7 +869,7 @@ namespace Crow.Coding //top level graphic obj's parsing lock (imlVE.GraphicTree) { for (int i = 0; i < imlVE.GraphicTree.Count; i++) { - GraphicObject g = imlVE.GraphicTree [i]; + Widget g = imlVE.GraphicTree [i]; if (g.MouseIsIn (e.Position)) { WidgetCheckOver (g, e); return true; @@ -883,7 +883,7 @@ namespace Crow.Coding void GTView_SelectedItemChanged (object sender, SelectionChangeEventArgs e) { - SelectedItem = e.NewValue as GraphicObject; + SelectedItem = e.NewValue as Widget; } diff --git a/CrowIDE/src/Extensions.cs b/CrowIDE/src/Extensions.cs index 91084bc0..86c5834f 100644 --- a/CrowIDE/src/Extensions.cs +++ b/CrowIDE/src/Extensions.cs @@ -25,21 +25,21 @@ namespace Crow { public static partial class Extensions { - public static string GetIcon(this GraphicObject go){ + public static string GetIcon(this Widget go){ return "#CrowIDE.icons.toolbox." + go.GetType().FullName + ".svg"; } - public static List GetChildren(this GraphicObject go){ + public static List GetChildren(this Widget go){ Type goType = go.GetType(); if (typeof (Group).IsAssignableFrom (goType)) return (go as Group).Children; if (typeof(Container).IsAssignableFrom (goType)) - return new List( new GraphicObject[] { (go as Container).Child }); + return new List( new Widget[] { (go as Container).Child }); if (typeof(TemplatedContainer).IsAssignableFrom (goType)) - return new List( new GraphicObject[] { (go as TemplatedContainer).Content }); + return new List( new Widget[] { (go as TemplatedContainer).Content }); if (typeof(TemplatedGroup).IsAssignableFrom (goType)) return (go as TemplatedGroup).Items; - return new List(); + return new List(); } } } diff --git a/CrowIDE/src/GraphicObjectDesignContainer.cs b/CrowIDE/src/GraphicObjectDesignContainer.cs index a8aea097..e5d620a6 100644 --- a/CrowIDE/src/GraphicObjectDesignContainer.cs +++ b/CrowIDE/src/GraphicObjectDesignContainer.cs @@ -48,7 +48,7 @@ namespace Crow.Coding } void onStartDrag (object sender, EventArgs e) { - GraphicObject go = sender as GraphicObject; + Widget go = sender as Widget; lock (go.IFace.UpdateMutex) { go.IFace.DragImageHeight = dragIconSize; @@ -70,7 +70,7 @@ namespace Crow.Coding } void onEndDrag (object sender, DragDropEventArgs e) { - (sender as GraphicObject).IFace.ClearDragImage (); + (sender as Widget).IFace.ClearDragImage (); } void onDrop (object sender, DragDropEventArgs e) @@ -78,7 +78,7 @@ namespace Crow.Coding ImlVisualEditor imlVE = e.DropTarget as ImlVisualEditor; if (imlVE != null) imlVE.ClearDraggedObj (false); - (sender as GraphicObject).IFace.ClearDragImage (); + (sender as Widget).IFace.ClearDragImage (); } } } diff --git a/CrowIDE/src/MemberView/MembersView.cs b/CrowIDE/src/MemberView/MembersView.cs index 359973b0..bd6ad144 100644 --- a/CrowIDE/src/MemberView/MembersView.cs +++ b/CrowIDE/src/MemberView/MembersView.cs @@ -51,9 +51,9 @@ namespace Crow.Coding instance = value; NotifyValueChanged ("Instance", instance); - if (Instance is GraphicObject) { - NotifyValueChanged ("SelectedItemName", Instance.GetType().Name + (Instance as GraphicObject).design_id - + ":" + (Instance as GraphicObject).design_imlPath ); + if (Instance is Widget) { + NotifyValueChanged ("SelectedItemName", Instance.GetType().Name + (Instance as Widget).design_id + + ":" + (Instance as Widget).design_imlPath ); }else NotifyValueChanged ("SelectedItemName", ""); diff --git a/CrowIDE/src/MemberView/PropertyContainer.cs b/CrowIDE/src/MemberView/PropertyContainer.cs index af3eea6e..4d043ab4 100644 --- a/CrowIDE/src/MemberView/PropertyContainer.cs +++ b/CrowIDE/src/MemberView/PropertyContainer.cs @@ -75,7 +75,7 @@ namespace Crow.Coding try { if (value == Value) return; - GraphicObject g = Instance; + Widget g = Instance; string valstr = null, oldval = null; if (value != null) @@ -147,8 +147,8 @@ namespace Crow.Coding /// /// Current graphicobject instance /// - public GraphicObject Instance { - get { return mview.ProjectNode.SelectedItem as GraphicObject; } + public Widget Instance { + get { return mview.ProjectNode.SelectedItem as Widget; } } public object DefaultValue { get { return ((DefaultValueAttribute)(pi.GetCustomAttribute (typeof (DefaultValueAttribute)))).Value; } @@ -184,7 +184,7 @@ namespace Crow.Coding /// reset to default value /// public void Reset () { - GraphicObject inst = mview.ProjectNode.SelectedItem as GraphicObject; + Widget inst = mview.ProjectNode.SelectedItem as Widget; if (!inst.design_iml_values.ContainsKey (Name)) return; inst.design_iml_values.Remove (Name); @@ -195,7 +195,7 @@ namespace Crow.Coding //should reinstantiate to get default } public void GotoStyle(){ - GraphicObject g = Instance; + Widget g = Instance; if (!g.design_style_locations.ContainsKey (Name)) return; FileLocation fl = g.design_style_locations [Name]; diff --git a/CrowIDE/src/ProjectTree/ImlProjectItem.cs b/CrowIDE/src/ProjectTree/ImlProjectItem.cs index 0575d177..8487f838 100644 --- a/CrowIDE/src/ProjectTree/ImlProjectItem.cs +++ b/CrowIDE/src/ProjectTree/ImlProjectItem.cs @@ -40,14 +40,14 @@ namespace Crow.Coding } #endregion - GraphicObject instance; + Widget instance; Measure designWidth, designHeight; /// /// instance created with an instantiator from the source by a DesignInterface, /// for now, the one in ImlVisualEditor /// - public GraphicObject Instance { + public Widget Instance { get { return instance; } set { if (instance == value) @@ -77,8 +77,8 @@ namespace Crow.Coding } - public List GraphicTree { - get { return new List (new GraphicObject[] {instance}); } + public List GraphicTree { + get { return new List (new Widget[] {instance}); } } void GTView_SelectedItemChanged (object sender, SelectionChangeEventArgs e){ diff --git a/CrowIDE/src/Solution.cs b/CrowIDE/src/Solution.cs index 2295c330..c6b1fbc1 100644 --- a/CrowIDE/src/Solution.cs +++ b/CrowIDE/src/Solution.cs @@ -122,7 +122,7 @@ namespace Crow.Coding{ Type[] crowItems = AppDomain.CurrentDomain.GetAssemblies () .SelectMany (t => t.GetTypes ()) .Where (t => t.IsClass && !t.IsAbstract && t.IsPublic && - t.Namespace == "Crow" && t.IsSubclassOf(typeof(GraphicObject)) && + t.Namespace == "Crow" && t.IsSubclassOf(typeof(Widget)) && t.GetCustomAttribute(false) == null).ToArray (); ToolboxItems = new ObservableList (); foreach (Type ci in crowItems) { diff --git a/CrowIDE/src/VerticalLine.cs b/CrowIDE/src/VerticalLine.cs index 03afeea8..8644f81c 100644 --- a/CrowIDE/src/VerticalLine.cs +++ b/CrowIDE/src/VerticalLine.cs @@ -28,7 +28,7 @@ using Crow; namespace Crow.Coding { - public class VerticalLine : GraphicObject + public class VerticalLine : Widget { public VerticalLine () : base() { diff --git a/CrowIDE/ui/DockWindows/GTreeExpITemp.crow b/CrowIDE/ui/DockWindows/GTreeExpITemp.crow index ed9e7d98..fb044b36 100644 --- a/CrowIDE/ui/DockWindows/GTreeExpITemp.crow +++ b/CrowIDE/ui/DockWindows/GTreeExpITemp.crow @@ -23,7 +23,7 @@ - + diff --git a/CrowIDE/ui/DockWindows/WinSchemaItem.template b/CrowIDE/ui/DockWindows/WinSchemaItem.template index caf46cbc..2832a327 100755 --- a/CrowIDE/ui/DockWindows/WinSchemaItem.template +++ b/CrowIDE/ui/DockWindows/WinSchemaItem.template @@ -1,4 +1,4 @@ - + - + diff --git a/CrowIDE/ui/DockWindows/winGTExplorer.crow b/CrowIDE/ui/DockWindows/winGTExplorer.crow index e7988568..62c7b9bb 100644 --- a/CrowIDE/ui/DockWindows/winGTExplorer.crow +++ b/CrowIDE/ui/DockWindows/winGTExplorer.crow @@ -7,7 +7,7 @@ - + diff --git a/CrowIDE/ui/DockWindows/winSchema.crow b/CrowIDE/ui/DockWindows/winSchema.crow index 463c97a3..cd842490 100644 --- a/CrowIDE/ui/DockWindows/winSchema.crow +++ b/CrowIDE/ui/DockWindows/winSchema.crow @@ -4,7 +4,7 @@ - + diff --git a/CrowIDE/ui/LQIsExplorer.crow b/CrowIDE/ui/LQIsExplorer.crow index b78cfc04..2994db6a 100644 --- a/CrowIDE/ui/LQIsExplorer.crow +++ b/CrowIDE/ui/LQIsExplorer.crow @@ -24,14 +24,14 @@ - + - + @@ -55,7 +55,7 @@ - + diff --git a/CrowIDE/ui/ProjectTree.template b/CrowIDE/ui/ProjectTree.template index 06167f5f..8ffb17ba 100644 --- a/CrowIDE/ui/ProjectTree.template +++ b/CrowIDE/ui/ProjectTree.template @@ -2,9 +2,9 @@ - + - + @@ -25,7 +25,7 @@ MouseLeave="{Background=Transparent}"/> - + @@ -33,7 +33,7 @@ - + @@ -41,7 +41,7 @@ - + @@ -49,7 +49,7 @@ - + diff --git a/CrowIDE/ui/editors/EditTabItem.template b/CrowIDE/ui/editors/EditTabItem.template index 6280d83f..b082c06e 100644 --- a/CrowIDE/ui/editors/EditTabItem.template +++ b/CrowIDE/ui/editors/EditTabItem.template @@ -7,7 +7,7 @@ HorizontalAlignment="Left" Height="{./TabHeight}" Width="{./TabWidth}"> - + diff --git a/Tests/Interfaces/Divers/testVisibility.crow b/Tests/Interfaces/Divers/testVisibility.crow index 70abcbdb..9f9464c9 100755 --- a/Tests/Interfaces/Divers/testVisibility.crow +++ b/Tests/Interfaces/Divers/testVisibility.crow @@ -1,7 +1,7 @@  - diff --git a/Tests/Interfaces/Divers/welcome.crow b/Tests/Interfaces/Divers/welcome.crow index fb251487..fa6da1e6 100644 --- a/Tests/Interfaces/Divers/welcome.crow +++ b/Tests/Interfaces/Divers/welcome.crow @@ -11,10 +11,10 @@ - + - + \ No newline at end of file diff --git a/Tests/Interfaces/TemplatedContainer/testWindow3.goml b/Tests/Interfaces/TemplatedContainer/testWindow3.goml index b6daec92..869615bf 100755 --- a/Tests/Interfaces/TemplatedContainer/testWindow3.goml +++ b/Tests/Interfaces/TemplatedContainer/testWindow3.goml @@ -1,11 +1,11 @@ - + - + diff --git a/Tests/Interfaces/TemplatedControl/testItemTemplateTag.crow b/Tests/Interfaces/TemplatedControl/testItemTemplateTag.crow index 1dcef800..b29be381 100755 --- a/Tests/Interfaces/TemplatedControl/testItemTemplateTag.crow +++ b/Tests/Interfaces/TemplatedControl/testItemTemplateTag.crow @@ -1,4 +1,4 @@ - + - + diff --git a/Tests/Interfaces/Wrapper/1.1.crow b/Tests/Interfaces/Wrapper/1.1.crow index 0fcdcc78..548aab39 100755 --- a/Tests/Interfaces/Wrapper/1.1.crow +++ b/Tests/Interfaces/Wrapper/1.1.crow @@ -1,14 +1,14 @@  - - - - - - - - - + + + + + + + + + \ No newline at end of file diff --git a/Tests/Interfaces/Wrapper/1.crow b/Tests/Interfaces/Wrapper/1.crow index 15446890..58c79eea 100755 --- a/Tests/Interfaces/Wrapper/1.crow +++ b/Tests/Interfaces/Wrapper/1.crow @@ -1,14 +1,14 @@  - - - - - - - - - + + + + + + + + + \ No newline at end of file diff --git a/Tests/Interfaces/Wrapper/2.1.crow b/Tests/Interfaces/Wrapper/2.1.crow index 4ec1de32..2a352892 100755 --- a/Tests/Interfaces/Wrapper/2.1.crow +++ b/Tests/Interfaces/Wrapper/2.1.crow @@ -1,14 +1,14 @@  - - - - - - - - - + + + + + + + + + \ No newline at end of file diff --git a/Tests/Interfaces/Wrapper/2.2.crow b/Tests/Interfaces/Wrapper/2.2.crow index c6dfbf8d..4621c14e 100755 --- a/Tests/Interfaces/Wrapper/2.2.crow +++ b/Tests/Interfaces/Wrapper/2.2.crow @@ -1,32 +1,32 @@  - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Tests/Interfaces/Wrapper/2.crow b/Tests/Interfaces/Wrapper/2.crow index 9f505ba3..c1f234eb 100755 --- a/Tests/Interfaces/Wrapper/2.crow +++ b/Tests/Interfaces/Wrapper/2.crow @@ -1,14 +1,14 @@  - - - - - - - - - + + + + + + + + + \ No newline at end of file diff --git a/Tests/Interfaces/colorItem.crow b/Tests/Interfaces/colorItem.crow index e3e54827..30bfe3d3 100755 --- a/Tests/Interfaces/colorItem.crow +++ b/Tests/Interfaces/colorItem.crow @@ -3,7 +3,7 @@ - + diff --git a/Tests/Interfaces/colorItem2.crow b/Tests/Interfaces/colorItem2.crow index 4e29d380..83239b32 100755 --- a/Tests/Interfaces/colorItem2.crow +++ b/Tests/Interfaces/colorItem2.crow @@ -3,7 +3,7 @@ - + diff --git a/Tests/Showcase.cs b/Tests/Showcase.cs index 81f563de..237c65d2 100644 --- a/Tests/Showcase.cs +++ b/Tests/Showcase.cs @@ -45,7 +45,7 @@ namespace tests using (Showcase app = new Showcase ()) { //app.Keyboard.KeyDown += App_KeyboardKeyDown; - GraphicObject g = app.Load ("#Tests.ui.showcase.crow"); + Widget g = app.Load ("#Tests.ui.showcase.crow"); g.DataSource = app; app.crowContainer = g.FindByName ("CrowContainer") as Container; //I set an empty object as datasource at this level to force update when new @@ -85,7 +85,7 @@ namespace tests lock (UpdateMutex) { try { - GraphicObject g = CreateInstance(fi.FullName); + Widget g = CreateInstance(fi.FullName); crowContainer.SetChild(g); g.DataSource = this; } @@ -117,7 +117,7 @@ namespace tests void Tb_TextChanged (object sender, TextChangeEventArgs e) { hideError(); - GraphicObject g = null; + Widget g = null; try { lock (UpdateMutex) { Instantiator inst = null; diff --git a/Tests/ui/dbgLogColors.crow b/Tests/ui/dbgLogColors.crow index cc9fdb24..e1915e65 100755 --- a/Tests/ui/dbgLogColors.crow +++ b/Tests/ui/dbgLogColors.crow @@ -1,4 +1,4 @@ - + @@ -14,7 +14,7 @@ - + - + -- 2.47.3