1 // Permission is hereby granted, free of charge, to any person obtaining
2 // a copy of this software and associated documentation files (the
3 // "Software"), to deal in the Software without restriction, including
4 // without limitation the rights to use, copy, modify, merge, publish,
5 // distribute, sublicense, and/or sell copies of the Software, and to
6 // permit persons to whom the Software is furnished to do so, subject to
7 // the following conditions:
9 // The above copyright notice and this permission notice shall be
10 // included in all copies or substantial portions of the Software.
12 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
13 // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
14 // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
15 // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
16 // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
17 // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
18 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20 // Copyright (c) 2005 Novell, Inc. (http://www.novell.com)
23 // Peter Bartok pbartok@novell.com
29 using System.Collections;
30 using System.ComponentModel;
33 namespace System.Windows.Forms {
34 [DesignTimeVisible(false)]
36 public sealed class MdiClient : Control {
37 #region Local Variables
38 #endregion // Local Variables
40 #region Public Classes
41 public new class ControlCollection : Control.ControlCollection {
44 public ControlCollection(MdiClient owner) : base(owner) {
48 public override void Add(Control value) {
49 if ((value is Form) == false || (((Form)value).IsMdiChild)) {
50 throw new ArgumentException("Form must be MdiChild");
53 for (int i=0; i<list.Count; i++) {
55 // Do we need to do anything here?
60 //((Form)value).owner=(Form)owner;
63 public override void Remove(Control value) {
64 //((Form)value).owner = null;
68 #endregion // Public Classes
70 #region Public Constructors
73 #endregion // Public Constructors
75 #region Public Instance Properties
76 public override System.Drawing.Image BackgroundImage {
78 return base.BackgroundImage;
81 base.BackgroundImage = value;
85 public Form[] MdiChildren {
89 children = new Form[Controls.Count];
90 Controls.CopyTo(children, 0);
95 #endregion // Public Instance Properties
97 #region Protected Instance Properties
98 protected override CreateParams CreateParams {
100 XplatUIWin32.CLIENTCREATESTRUCT ccs;
103 cp = base.CreateParams;
105 if (parent != null) {
108 cp.Width = parent.Width;
109 cp.Height = parent.Height;
113 ccs = new System.Windows.Forms.XplatUIWin32.CLIENTCREATESTRUCT();
114 ccs.hWindowMenu = IntPtr.Zero;
115 ccs.idFirstChild = 27577;
118 cp.ClassName = "MDICLIENT";
119 cp.Style |= (int)(WindowStyles.WS_CHILD | WindowStyles.WS_VISIBLE);
120 cp.ExStyle |= (int)WindowStyles.WS_EX_MDICHILD;
125 #endregion // Protected Instance Properties
127 #region Public Instance Methods
128 public void LayoutMdi(MdiLayout value) {
129 throw new NotImplementedException();
131 #endregion // Public Instance Methods
133 #region Protected Instance Methods
134 #endregion // Protected Instance Methods