* TabControl.cs: Show the tooltip depending on the value
[mono.git] / mcs / class / Managed.Windows.Forms / System.Windows.Forms / SplitterPanel.cs
1 //
2 // SplitterPanel.cs
3 //
4 // Permission is hereby granted, free of charge, to any person obtaining
5 // a copy of this software and associated documentation files (the
6 // "Software"), to deal in the Software without restriction, including
7 // without limitation the rights to use, copy, modify, merge, publish,
8 // distribute, sublicense, and/or sell copies of the Software, and to
9 // permit persons to whom the Software is furnished to do so, subject to
10 // the following conditions:
11 // 
12 // The above copyright notice and this permission notice shall be
13 // included in all copies or substantial portions of the Software.
14 // 
15 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16 // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
17 // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
18 // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
19 // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
20 // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
21 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22 //
23 // Copyright (c) 2006 Jonathan Pobst
24 //
25 // Authors:
26 //      Jonathan Pobst (monkey@jpobst.com)
27 //
28
29 #if NET_2_0
30 using System;
31 using System.Runtime.InteropServices;
32 using System.ComponentModel;
33 using System.Drawing;
34 using System.Drawing.Drawing2D;
35
36 namespace System.Windows.Forms
37 {
38         [ToolboxItem (false)]
39         [ComVisibleAttribute (true)]
40         [ClassInterfaceAttribute (ClassInterfaceType.AutoDispatch)]
41         [Docking (DockingBehavior.Never)]
42         [Designer ("System.Windows.Forms.Design.SplitterPanelDesigner, " + Consts.AssemblySystem_Design)]
43         public sealed class SplitterPanel : Panel
44         {
45                 //private SplitContainer owner;
46
47                 public SplitterPanel (SplitContainer owner)
48                 {
49                         //this.owner = owner;
50                 }
51
52                 #region Public Properties
53                 // All of these are overriden just to hide them from the IDE  :/
54                 [Browsable (false)]
55                 [EditorBrowsable (EditorBrowsableState.Never)]
56                 [DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden)]
57                 new public AnchorStyles Anchor {
58                         get { return base.Anchor; }
59                         set { base.Anchor = value; }
60                 }
61
62                 [Browsable (false)]
63                 [EditorBrowsable (EditorBrowsableState.Never)]
64                 [DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden)]
65                 new public bool AutoSize {
66                         get { return base.AutoSize; }
67                         set { base.AutoSize = value; }
68                 }
69
70                 [Browsable (false)]
71                 [EditorBrowsable (EditorBrowsableState.Never)]
72                 [Localizable(false)]
73                 [DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden)]
74                 public override AutoSizeMode AutoSizeMode {
75                         get { return base.AutoSizeMode; }
76                         set { } // Does not change, always GrowOnly
77                 }
78
79                 [Browsable (false)]
80                 [EditorBrowsable (EditorBrowsableState.Never)]
81                 [DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden)]
82                 new public BorderStyle BorderStyle {
83                         get { return base.BorderStyle; }
84                         set { base.BorderStyle = value; }
85                 }
86
87                 [Browsable (false)]
88                 [EditorBrowsable (EditorBrowsableState.Never)]
89                 [DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden)]
90                 new public DockStyle Dock {
91                         get { return base.Dock; }
92                         set { base.Dock = value; }
93                 }
94
95                 [Browsable (false)]
96                 [EditorBrowsable (EditorBrowsableState.Never)]
97                 [DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden)]
98                 new public DockPaddingEdges DockPadding {
99                         get { return base.DockPadding; }
100                 }
101
102                 [Browsable (false)]
103                 [EditorBrowsable (EditorBrowsableState.Always)]
104                 [DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden)]
105                 new public int Height {
106                         get { return this.Visible ? base.Height : 0; }
107                         set { throw new NotSupportedException ("The height cannot be set"); }
108                 }
109
110                 [Browsable (false)]
111                 [EditorBrowsable (EditorBrowsableState.Never)]
112                 [DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden)]
113                 new public Point Location {
114                         get { return base.Location; }
115                         set { base.Location = value; }
116                 }
117
118                 [Browsable (false)]
119                 [EditorBrowsable (EditorBrowsableState.Never)]
120                 [DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden)]
121                 new public Size MaximumSize {
122                         get { return base.MaximumSize; }
123                         set { base.MaximumSize = value; }
124                 }
125
126                 [Browsable (false)]
127                 [EditorBrowsable (EditorBrowsableState.Never)]
128                 [DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden)]
129                 new public Size MinimumSize {
130                         get { return base.MinimumSize; }
131                         set { base.MinimumSize = value; }
132                 }
133
134                 [Browsable (false)]
135                 [EditorBrowsable (EditorBrowsableState.Never)]
136                 [DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden)]
137                 new public string Name {
138                         get { return base.Name; }
139                         set { base.Name = value; }
140                 }
141
142                 [Browsable (false)]
143                 [EditorBrowsable (EditorBrowsableState.Never)]
144                 [DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden)]
145                 new public Control Parent {
146                         get { return base.Parent; }
147                         set { throw new NotSupportedException ("The parent cannot be set"); }
148                 }
149
150                 [Browsable (false)]
151                 [EditorBrowsable (EditorBrowsableState.Never)]
152                 [DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden)]
153                 new public Size Size {
154                         get { return base.Size; }
155                         set { base.Size = value; }
156                 }
157
158                 [Browsable (false)]
159                 [EditorBrowsable (EditorBrowsableState.Never)]
160                 [DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden)]
161                 new public int TabIndex {
162                         get { return base.TabIndex; }
163                         set { base.TabIndex = value; }
164                 }
165
166                 [Browsable (false)]
167                 [EditorBrowsable (EditorBrowsableState.Never)]
168                 [DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden)]
169                 new public bool TabStop {
170                         get { return base.TabStop; }
171                         set { base.TabStop = value; }
172                 }
173
174                 [Browsable (false)]
175                 [EditorBrowsable (EditorBrowsableState.Never)]
176                 [DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden)]
177                 new public bool Visible {
178                         get { return base.Visible; }
179                         set { base.Visible = value; }
180                 }
181
182                 [Browsable (false)]
183                 [EditorBrowsable (EditorBrowsableState.Always)]
184                 [DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden)]
185                 new public int Width {
186                         get { return this.Visible ? base.Width : 0; }
187                         set { throw new NotSupportedException ("The width cannot be set"); }
188                 }
189                 #endregion
190
191                 #region Public Events
192                 [Browsable (false)]
193                 [EditorBrowsable (EditorBrowsableState.Never)]
194                 public new event EventHandler AutoSizeChanged {
195                         add { base.AutoSizeChanged += value; }
196                         remove { base.AutoSizeChanged -= value; }
197                 }
198
199                 [Browsable (false)]
200                 [EditorBrowsable (EditorBrowsableState.Never)]
201                 [DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden)]
202                 public new event EventHandler DockChanged {
203                         add { base.DockChanged += value; }
204                         remove { base.DockChanged -= value; }
205                 }
206
207                 [Browsable (false)]
208                 [EditorBrowsable (EditorBrowsableState.Never)]
209                 [DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden)]
210                 public new event EventHandler LocationChanged {
211                         add { base.LocationChanged += value; }
212                         remove { base.LocationChanged -= value; }
213                 }
214
215                 [Browsable (false)]
216                 [EditorBrowsable (EditorBrowsableState.Never)]
217                 [DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden)]
218                 public new event EventHandler TabIndexChanged {
219                         add { base.TabIndexChanged += value; }
220                         remove { base.TabIndexChanged -= value; }
221                 }
222
223                 [Browsable (false)]
224                 [EditorBrowsable (EditorBrowsableState.Never)]
225                 [DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden)]
226                 public new event EventHandler TabStopChanged {
227                         add { base.TabStopChanged += value; }
228                         remove { base.TabStopChanged -= value; }
229                 }
230
231                 [Browsable (false)]
232                 [EditorBrowsable (EditorBrowsableState.Never)]
233                 [DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden)]
234                 public new event EventHandler VisibleChanged {
235                         add { base.VisibleChanged += value; }
236                         remove { base.VisibleChanged -= value; }
237                 }
238                 #endregion
239
240                 #region Protected Properties
241                 protected override Padding DefaultMargin { get { return new Padding (0); } }
242                 #endregion
243                 
244                 #region Internal Properties
245                 internal int InternalHeight { set { base.Height = value; } }
246                 internal int InternalWidth { set { base.Width = value; } }
247                 #endregion
248         }
249 }
250 #endif