diff --git a/Example/demo.cs b/Example/demo.cs
index 267071c71..8c794f305 100644
--- a/Example/demo.cs
+++ b/Example/demo.cs
@@ -185,16 +185,16 @@ static class Demo {
};
var tf = new Button (3, 19, "Ok");
+ var frameView = new FrameView (new Rect (3, 10, 25, 6), "Options");
+ frameView.Add (new CheckBox (1, 0, "Remember me"));
+ frameView.Add (new RadioGroup (1, 2, new ustring [] { "_Personal", "_Company" }));
// Add some content
container.Add (
login,
loginText,
password,
passText,
- new FrameView (new Rect (3, 10, 25, 6), "Options"){
- new CheckBox (1, 0, "Remember me"),
- new RadioGroup (1, 2, new ustring [] { "_Personal", "_Company" }),
- },
+ frameView,
new ListView (new Rect (59, 6, 16, 4), new string [] {
"First row",
"<>",
diff --git a/Terminal.Gui/Core/View.cs b/Terminal.Gui/Core/View.cs
index 4cd2b466f..4ce014f7f 100644
--- a/Terminal.Gui/Core/View.cs
+++ b/Terminal.Gui/Core/View.cs
@@ -111,7 +111,7 @@ namespace Terminal.Gui {
/// frames for the vies that use .
///
///
- public partial class View : Responder, IEnumerable, ISupportInitializeNotification {
+ public partial class View : Responder, ISupportInitializeNotification {
internal enum Direction {
Forward,
@@ -386,15 +386,15 @@ namespace Terminal.Gui {
}
}
- ///
- /// Gets an enumerator that enumerates the subviews in this view.
- ///
- /// The enumerator.
- public IEnumerator GetEnumerator ()
- {
- foreach (var v in InternalSubviews)
- yield return v;
- }
+ /////
+ ///// Gets an enumerator that enumerates the subviews in this view.
+ /////
+ ///// The enumerator.
+ //public IEnumerator GetEnumerator ()
+ //{
+ // foreach (var v in InternalSubviews)
+ // yield return v;
+ //}
LayoutStyle layoutStyle;
diff --git a/Terminal.Gui/Core/Window.cs b/Terminal.Gui/Core/Window.cs
index a2113e8e2..82ac8b804 100644
--- a/Terminal.Gui/Core/Window.cs
+++ b/Terminal.Gui/Core/Window.cs
@@ -20,7 +20,7 @@ namespace Terminal.Gui {
/// The 'client area' of a is a rectangle deflated by one or more rows/columns from . A this time there is no
/// API to determine this rectangle.
///
- public class Window : Toplevel, IEnumerable {
+ public class Window : Toplevel {
View contentView;
ustring title;
@@ -122,14 +122,14 @@ namespace Terminal.Gui {
base.Add (contentView);
}
- ///
- /// Enumerates the various s in the embedded .
- ///
- /// The enumerator.
- public new IEnumerator GetEnumerator ()
- {
- return contentView.GetEnumerator ();
- }
+ /////
+ ///// Enumerates the various s in the embedded .
+ /////
+ ///// The enumerator.
+ //public new IEnumerator GetEnumerator ()
+ //{
+ // return contentView.GetEnumerator ();
+ //}
///
public override void Add (View view)
diff --git a/Terminal.Gui/Directory.Build.props b/Terminal.Gui/Directory.Build.props
index 394cc4a11..c549feaa8 100644
--- a/Terminal.Gui/Directory.Build.props
+++ b/Terminal.Gui/Directory.Build.props
@@ -14,9 +14,9 @@
e.g. If AssemblyVersion is 1.2.3.4, Version could be EITHER 1.2.3.4 or 1.2.3-pre.4 depending on whether it's a pre-release or not.
-->
- 1.0.0-pre.4
- 1.0.0.4
- 1.0.0.4
+ 1.0.0-pre.5
+ 1.0.0.5
+ 1.0.0.5
Miguel de Icaza, Charlie Kindel (@tig), @BDisp
diff --git a/Terminal.Gui/Terminal.Gui.csproj b/Terminal.Gui/Terminal.Gui.csproj
index e6ac2e0b8..cbff7b04e 100644
--- a/Terminal.Gui/Terminal.Gui.csproj
+++ b/Terminal.Gui/Terminal.Gui.csproj
@@ -24,7 +24,8 @@
v1.00 -
* If StatusBar.Visible is set to false, TopLevel resizes correctly enabling hiding/showing of a StatusBar. UICatalog demonstrates.
- * New sample/demo app - ReactiveExample - Shows how to use reactive extensions and ReactiveUI with gui.cs.
+ * New sample/demo app - ReactiveExample - Shows how to use reactive extensions and ReactiveUI with gui.cs. (Thanks @worldbeater)
+ * BREAKING API CHANGE - Removed IEnumerable from View and Window. Use Subviews property instead. See #950.
v0.90 - "Feature Complete" pre-release of Terminal.Gui (aka gui.cs) 1.0. This release is a signficant upgrade from the previous published release (0.81). Most of the major changes and bug fixes are listed below. NOTE: This release includes breaking changes to the API; we will strive to avoid any more breaking changes before 1.0.
diff --git a/Terminal.Gui/Views/ScrollView.cs b/Terminal.Gui/Views/ScrollView.cs
index ab0bde0a6..b5e74fd3e 100644
--- a/Terminal.Gui/Views/ScrollView.cs
+++ b/Terminal.Gui/Views/ScrollView.cs
@@ -643,7 +643,7 @@ namespace Terminal.Gui {
void SetViewsNeedsDisplay ()
{
- foreach (View view in contentView) {
+ foreach (View view in contentView.Subviews) {
view.SetNeedsDisplay ();
}
}
diff --git a/UnitTests/ViewTests.cs b/UnitTests/ViewTests.cs
index 4f20e5505..256e19a06 100644
--- a/UnitTests/ViewTests.cs
+++ b/UnitTests/ViewTests.cs
@@ -35,7 +35,6 @@ namespace Terminal.Gui {
Assert.Empty (r.Subviews);
Assert.False (r.WantContinuousButtonPressed);
Assert.False (r.WantMousePositionReports);
- Assert.Null (r.GetEnumerator ().Current);
Assert.Null (r.SuperView);
Assert.Null (r.MostFocused);
@@ -59,7 +58,6 @@ namespace Terminal.Gui {
Assert.Empty (r.Subviews);
Assert.False (r.WantContinuousButtonPressed);
Assert.False (r.WantMousePositionReports);
- Assert.Null (r.GetEnumerator ().Current);
Assert.Null (r.SuperView);
Assert.Null (r.MostFocused);
@@ -83,7 +81,6 @@ namespace Terminal.Gui {
Assert.Empty (r.Subviews);
Assert.False (r.WantContinuousButtonPressed);
Assert.False (r.WantMousePositionReports);
- Assert.Null (r.GetEnumerator ().Current);
Assert.Null (r.SuperView);
Assert.Null (r.MostFocused);