From b1810f1f58d44a3d4779bf4f0c5858a52444ec29 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jean-Philippe=20Bruy=C3=A8re?= Date: Thu, 15 Mar 2018 17:56:20 +0100 Subject: [PATCH] testing with requestedLayouting field --- CrowIDE/src/Editors/Editor.cs | 2 +- CrowIDE/src/Editors/ImlVisualEditor.cs | 2 +- CrowIDE/src/Editors/SvgEditor.cs | 2 +- Templates/ScrollingListBox.template | 5 +- Templates/TreeView.template | 4 +- Tests/BasicTests.cs | 14 +- Tests/GraphicObjects/TechBorder.cs | 2 +- Tests/Interfaces/Divers/welcome.crow | 2 +- Tests/Interfaces/TemplatedContainer/0.crow | 2 +- Tests/Interfaces/TemplatedContainer/6.crow | 21 --- Tests/Interfaces/TemplatedContainer/7.crow | 25 ---- .../TemplatedControl/testItemTemplateTag.crow | 68 +++++---- Tests/Showcase.cs | 2 +- Tests/Tests.csproj | 6 - Tests/ui/showcase.crow | 10 +- src/GraphicObjects/Border.cs | 2 +- src/GraphicObjects/GenericStack.cs | 10 +- src/GraphicObjects/GraphicObject.cs | 136 ++++++++++-------- src/GraphicObjects/Grid.cs | 4 +- src/GraphicObjects/Group.cs | 8 +- src/GraphicObjects/PrivateContainer.cs | 8 +- src/GraphicObjects/Shape.cs | 2 +- src/GraphicObjects/TabView.cs | 4 +- src/GraphicObjects/TemplatedGroup.cs | 17 ++- src/GraphicObjects/TextRun.cs | 2 +- src/GraphicObjects/Wrapper.cs | 7 +- src/Interface.cs | 5 + src/LayoutingQueueItem.cs | 12 +- 28 files changed, 178 insertions(+), 206 deletions(-) delete mode 100755 Tests/Interfaces/TemplatedContainer/6.crow delete mode 100755 Tests/Interfaces/TemplatedContainer/7.crow diff --git a/CrowIDE/src/Editors/Editor.cs b/CrowIDE/src/Editors/Editor.cs index 2cd34412..7b95bb55 100644 --- a/CrowIDE/src/Editors/Editor.cs +++ b/CrowIDE/src/Editors/Editor.cs @@ -79,7 +79,7 @@ namespace Crow.Coding protected abstract void updateEditorFromProjFile (); protected abstract void updateProjFileFromEditor (); protected abstract bool EditorIsDirty { get; set; } - protected virtual bool IsReady { get { return true; }} + protected virtual bool IsReady { get { return projFile != null; }} protected virtual void updateCheckPostProcess () {} protected void backgroundThreadFunc () { diff --git a/CrowIDE/src/Editors/ImlVisualEditor.cs b/CrowIDE/src/Editors/ImlVisualEditor.cs index b1759fbc..11f94c17 100644 --- a/CrowIDE/src/Editors/ImlVisualEditor.cs +++ b/CrowIDE/src/Editors/ImlVisualEditor.cs @@ -434,7 +434,7 @@ namespace Crow.Coding gr.Rectangle (cb, 2.0 / z); string[] lerrs = Error.ToString ().Split ('\n'); Point p = cb.Center; - p.Y -= lerrs.Length * 20; + p.Y = 20; foreach (string le in lerrs) { drawCenteredTextLine(gr, p, le); p.Y += 20; diff --git a/CrowIDE/src/Editors/SvgEditor.cs b/CrowIDE/src/Editors/SvgEditor.cs index 219eea67..fce3d1aa 100644 --- a/CrowIDE/src/Editors/SvgEditor.cs +++ b/CrowIDE/src/Editors/SvgEditor.cs @@ -91,7 +91,7 @@ namespace Crow.Coding #endregion #region GraphicObject overrides - protected override int measureRawSize (LayoutingType lt) + protected override int measureRawSize(LayoutingType lt) { if (_pic == null) return 2 * Margin; diff --git a/Templates/ScrollingListBox.template b/Templates/ScrollingListBox.template index 3b098df2..67300ae9 100644 --- a/Templates/ScrollingListBox.template +++ b/Templates/ScrollingListBox.template @@ -1,14 +1,13 @@ - + diff --git a/Templates/TreeView.template b/Templates/TreeView.template index 9c18120e..0ac770b1 100644 --- a/Templates/TreeView.template +++ b/Templates/TreeView.template @@ -1,8 +1,6 @@ - + diff --git a/Tests/BasicTests.cs b/Tests/BasicTests.cs index 149ff4a9..9691f9ec 100644 --- a/Tests/BasicTests.cs +++ b/Tests/BasicTests.cs @@ -177,9 +177,13 @@ namespace Tests this.KeyDown += KeyboardKeyDown1; - testFiles = new string [] { @"Interfaces/Experimental/testDock.crow" }; + //testFiles = new string [] { @"Interfaces/Experimental/testDock.crow" }; //testFiles = new string [] { @"Interfaces/Divers/welcome.crow" }; + //testFiles = new string [] { @"Interfaces/Divers/0.crow" }; + testFiles = new string [] { @"Interfaces/TemplatedContainer/testTreeView.crow" }; //testFiles = new string [] { @"Interfaces/Divers/colorPicker.crow" }; +// testFiles = new string[] { @"Interfaces/TemplatedControl/testItemTemplateTag.crow" }; + testFiles = testFiles.Concat (Directory.GetFiles (@"Interfaces/GraphicObject", "*.crow")).ToArray (); testFiles = testFiles.Concat (Directory.GetFiles (@"Interfaces/Container", "*.crow")).ToArray (); testFiles = testFiles.Concat (Directory.GetFiles (@"Interfaces/Group", "*.crow")).ToArray (); @@ -195,10 +199,10 @@ namespace Tests Load(testFiles[idx]).DataSource = this; - LoadIMLFragment (@"", 0); - LoadIMLFragment (@"", 0); - LoadIMLFragment (@"", 0); - LoadIMLFragment (@"", 0); +// LoadIMLFragment (@"", 0); +// LoadIMLFragment (@"", 0); +// LoadIMLFragment (@"", 0); +// LoadIMLFragment (@"", 0); } diff --git a/Tests/GraphicObjects/TechBorder.cs b/Tests/GraphicObjects/TechBorder.cs index 4f818e51..d1f73324 100644 --- a/Tests/GraphicObjects/TechBorder.cs +++ b/Tests/GraphicObjects/TechBorder.cs @@ -33,7 +33,7 @@ namespace Tests public TechBorder () : base() {} public TechBorder (Interface iface): base (iface){} - protected override int measureRawSize (LayoutingType lt) + protected override int measureRawSize(LayoutingType lt) { return base.measureRawSize (lt) + 6; } diff --git a/Tests/Interfaces/Divers/welcome.crow b/Tests/Interfaces/Divers/welcome.crow index 3445ef1c..74018ebe 100644 --- a/Tests/Interfaces/Divers/welcome.crow +++ b/Tests/Interfaces/Divers/welcome.crow @@ -1,2 +1,2 @@  - \ No newline at end of file + \ No newline at end of file diff --git a/Tests/Interfaces/TemplatedContainer/0.crow b/Tests/Interfaces/TemplatedContainer/0.crow index 195b981b..b53fa4ec 100755 --- a/Tests/Interfaces/TemplatedContainer/0.crow +++ b/Tests/Interfaces/TemplatedContainer/0.crow @@ -7,7 +7,7 @@ diff --git a/Tests/Interfaces/TemplatedContainer/6.crow b/Tests/Interfaces/TemplatedContainer/6.crow deleted file mode 100755 index 041bdf52..00000000 --- a/Tests/Interfaces/TemplatedContainer/6.crow +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Tests/Interfaces/TemplatedContainer/7.crow b/Tests/Interfaces/TemplatedContainer/7.crow deleted file mode 100755 index 0c94b6c4..00000000 --- a/Tests/Interfaces/TemplatedContainer/7.crow +++ /dev/null @@ -1,25 +0,0 @@ - - - diff --git a/Tests/Interfaces/TemplatedControl/testItemTemplateTag.crow b/Tests/Interfaces/TemplatedControl/testItemTemplateTag.crow index 90c475a5..7ddaf863 100755 --- a/Tests/Interfaces/TemplatedControl/testItemTemplateTag.crow +++ b/Tests/Interfaces/TemplatedControl/testItemTemplateTag.crow @@ -1,37 +1,33 @@ - - - - - - - - - - - -