**** Merged from MCS ****
[mono-project.git] / mcs / class / System.Windows.Forms / Gtk / TabControl.cs
blob4be046727031917dee571c42db20da43a9c5709f
1 //
2 // System.Windows.Forms.TabControl
3 //
4 // Author:
5 // Alberto Fernandez (infjaf00@yahoo.es)
6 //
9 using System;
10 using System.Drawing;
11 using System.Collections;
12 using System.ComponentModel;
14 namespace System.Windows.Forms{
16 public class TabControl : Control {
17 [MonoTODO]
18 public TabControl(){
21 //InvalidEnumArgumentException
22 // Pred = top
23 [MonoTODO]
24 public TabAlignment Alignment {
25 get { throw new NotImplementedException(); }
26 set { throw new NotImplementedException(); }
28 [MonoTODO]
29 public TabAppearance Appearance {
30 get { throw new NotImplementedException(); }
31 set { throw new NotImplementedException(); }
33 [MonoTODO]
34 public override Color BackColor {
35 get { throw new NotImplementedException(); }
36 set { throw new NotImplementedException(); }
38 [MonoTODO]
39 public override Image BackgroundImage {
40 get { throw new NotImplementedException(); }
41 set { throw new NotImplementedException(); }
43 [MonoTODO]
44 protected override CreateParams CreateParams {
45 get { throw new NotImplementedException(); }
47 [MonoTODO]
48 protected override Size DefaultSize {
49 get { return new Size (200,100); }
51 [MonoTODO]
52 public override Rectangle DisplayRectangle {
53 get { throw new NotImplementedException(); }
55 [MonoTODO]
56 public TabDrawMode DrawMode {
57 get { throw new NotImplementedException(); }
58 set { throw new NotImplementedException(); }
60 [MonoTODO]
61 public override Color ForeColor {
62 get { throw new NotImplementedException(); }
63 set { throw new NotImplementedException(); }
65 [MonoTODO]
66 public bool HotTrack {
67 get { throw new NotImplementedException(); }
68 set { throw new NotImplementedException(); }
70 [MonoTODO]
71 public ImageList ImageList {
72 get { throw new NotImplementedException(); }
73 set { throw new NotImplementedException(); }
75 [MonoTODO]
76 public Size ItemSize {
77 get { throw new NotImplementedException(); }
78 set { throw new NotImplementedException(); }
80 [MonoTODO]
81 public bool Multiline {
82 get { throw new NotImplementedException(); }
83 set { throw new NotImplementedException(); }
85 [MonoTODO]
86 public Point Padding {
87 get { throw new NotImplementedException(); }
88 set { throw new NotImplementedException(); }
90 [MonoTODO]
91 public int RowCount {
92 get { throw new NotImplementedException(); }
94 [MonoTODO]
95 public int SelectedIndex {
96 get { throw new NotImplementedException(); }
97 set { throw new NotImplementedException(); }
99 [MonoTODO]
100 public TabPage SelectedTab {
101 get { throw new NotImplementedException(); }
102 set { throw new NotImplementedException(); }
104 [MonoTODO]
105 public bool ShowToolTips {
106 get { throw new NotImplementedException(); }
107 set { throw new NotImplementedException(); }
109 [MonoTODO]
110 public TabSizeMode SizeMode {
111 get { throw new NotImplementedException(); }
112 set { throw new NotImplementedException(); }
114 [MonoTODO]
115 public int TabCount {
116 get { throw new NotImplementedException(); }
118 [MonoTODO]
119 public TabControl.TabPageCollection TabPages {
120 get { throw new NotImplementedException(); }
122 [MonoTODO]
123 public override string Text {
124 get { throw new NotImplementedException(); }
125 set { throw new NotImplementedException(); }
127 [MonoTODO]
128 protected override Control.ControlCollection CreateControlsInstance(){
129 return new TabControl.ControlCollection(this);
131 [MonoTODO]
132 protected override void CreateHandle(){
133 throw new NotImplementedException();
135 [MonoTODO]
136 protected override void Dispose(bool disposing){
137 throw new NotImplementedException();
140 // No usar
141 public Control GetControl(int index){
142 throw new NotImplementedException();
144 protected virtual object[] GetItems(){
145 throw new NotImplementedException();
147 protected virtual object[] GetItems(Type baseType){
148 throw new NotImplementedException();
151 [MonoTODO]
152 public Rectangle GetTabRect(int index){
153 throw new NotImplementedException();
156 // No usar
157 protected string GetToolTipText(object item){
158 throw new NotImplementedException();
161 [MonoTODO]
162 protected override bool IsInputKey(Keys keyData){
163 throw new NotImplementedException();
165 [MonoTODO]
166 protected virtual void OnDrawItem(DrawItemEventArgs e){
167 throw new NotImplementedException();
169 [MonoTODO]
170 protected override void OnFontChanged(EventArgs e){
171 throw new NotImplementedException();
173 [MonoTODO]
174 protected override void OnHandleCreated(EventArgs e){
175 throw new NotImplementedException();
177 [MonoTODO]
178 protected override void OnHandleDestroyed(EventArgs e){
179 throw new NotImplementedException();
181 [MonoTODO]
182 protected override void OnKeyDown(KeyEventArgs ke){
183 throw new NotImplementedException();
185 [MonoTODO]
186 protected override void OnResize(EventArgs e){
187 throw new NotImplementedException();
189 [MonoTODO]
190 protected virtual void OnSelectedIndexChanged(EventArgs e){
191 throw new NotImplementedException();
193 [MonoTODO]
194 protected override void OnStyleChanged(EventArgs e){
195 throw new NotImplementedException();
197 [MonoTODO]
198 protected override bool ProcessKeyPreview(ref Message m){
199 throw new NotImplementedException();
201 [MonoTODO]
202 protected void RemoveAll(){
203 throw new NotImplementedException();
206 public override string ToString(){
207 return "System.Windows.Forms.TabContro, TabPages.Count: " +
208 this.TabPages.Count;
209 //System.Windows.Forms.TabControl, TabPages.Count: 0
212 // No usar
213 protected void UpdateTabSelection( bool uiselected){
214 throw new NotImplementedException();
217 [MonoTODO]
218 protected override void WndProc(ref Message m){
219 throw new NotImplementedException();
223 public new event EventHandler BackColorChanged;
224 public new event EventHandler BackgroundImageChanged;
225 public event DrawItemEventHandler DrawItem;
226 public new event EventHandler ForeColorChanged;
227 public new event PaintEventHandler Paint;
228 public event EventHandler SelectedIndexChanged;
229 public new event EventHandler TextChanged;
232 public new class ControlCollection : Control.ControlCollection {
234 public ControlCollection ( TabControl owner ): base( owner ){ }
236 public override void Add( Control c ) {
237 //if ( !( c is TabPage ) ) {
238 // throw new ArgumentException();
240 //base.Add(c);
241 //if ( owner.IsHandleCreated )
242 // ((TabControl) owner).addPage ( c, Count - 1);
245 public override void Clear () {
246 //base.Clear ( );
247 //if ( owner.IsHandleCreated )
248 // ((TabControl) owner).removeAllTabs ( );
251 public override void Remove ( Control value ) {
252 //int index = IndexOf ( value );
253 //base.Remove ( value );
254 //if ( index != -1 && owner.IsHandleCreated )
255 // ((TabControl) owner).removeTab ( value, index );
260 public class TabPageCollection : IList, ICollection, IEnumerable {
261 TabControl owner;
262 Control.ControlCollection collection;
264 public TabPageCollection( TabControl owner ) {
265 this.owner = owner;
266 collection = owner.Controls;
269 public int Count {
270 get { return collection.Count; }
273 public bool IsReadOnly {
274 get { return collection.IsReadOnly; }
277 [MonoTODO]
278 public virtual TabPage this[int index] {
279 get { return collection[ index ] as TabPage; }
280 set {
281 //( (IList)collection )[ index ] = value;
282 //owner.update ( );
286 public void Add(TabPage value) {
287 collection.Add ( value );
290 public void AddRange( TabPage[] pages ) {
291 collection.AddRange ( pages );
294 public virtual void Clear() {
295 collection.Clear ( );
298 public bool Contains( TabPage page ) {
299 return collection.Contains ( page );
302 public IEnumerator GetEnumerator() {
303 return collection.GetEnumerator ( );
306 public int IndexOf( TabPage page ) {
307 return collection.IndexOf ( page );
310 public void Remove( TabPage value ) {
311 collection.Remove ( value );
314 public void RemoveAt(int index) {
315 collection.RemoveAt ( index );
318 /// <summary>
319 /// IList Interface implmentation.
320 /// </summary>
321 bool IList.IsReadOnly{
322 get{ return this.IsReadOnly; }
325 bool IList.IsFixedSize{
326 get{ return (( IList )collection).IsFixedSize; }
329 object IList.this[int index]{
330 get{ return collection [ index ]; }
331 set{
332 //if ( ! (value is TabPage) )
333 // throw new ArgumentException ( );
334 //this[ index ] = (TabPage) value;
335 //owner.update ( );
339 void IList.Clear(){
340 this.Clear ( );
343 [MonoTODO]
344 int IList.Add( object value ) {
345 TabPage page = value as TabPage;
346 if ( page == null )
347 throw new ArgumentException ( );
348 this.Add ( page );
349 return this.IndexOf ( page );
352 [MonoTODO]
353 bool IList.Contains( object value ){
354 return this.Contains ( value as TabPage );
357 [MonoTODO]
358 int IList.IndexOf( object value ){
359 return this.IndexOf ( value as TabPage );
362 [MonoTODO]
363 void IList.Insert(int index, object value){
364 //if ( ! (value is TabPage) )
365 // throw new ArgumentException ( );
367 //(( IList )collection).Insert ( index, value );
368 //owner.update ( );
371 void IList.Remove( object value ){
372 this.Remove ( value as TabPage );
375 void IList.RemoveAt( int index){
376 this.RemoveAt ( index );
378 // End of IList interface
380 /// <summary>
381 /// ICollection Interface implmentation.
382 /// </summary>
383 int ICollection.Count{
384 get{ return this.Count; }
387 bool ICollection.IsSynchronized{
388 get{ return ( (ICollection) collection).IsSynchronized; }
391 object ICollection.SyncRoot{
392 get{ return ( (ICollection) collection).SyncRoot; }
395 void ICollection.CopyTo(Array array, int index){
396 ( (ICollection) collection ).CopyTo ( array, index );
398 // End Of ICollection
402 [MonoTODO]
403 public class TabControl.ControlCollection : Control.ControlCollection {
404 public TabControl.ControlCollection(TabControl owner);
406 public override void Add(Control value);
407 public override void Remove(Control value);
411 [MonoTODO]
412 public class TabControl.TabPageCollection : IList, ICollection, IEnumerable{
414 public TabControl.TabPageCollection(TabControl owner);
415 public virtual int Count {get;}
416 public virtual bool IsReadOnly {get;}
417 public virtual TabPage this[int index] {get; set;}
418 int ICollection.Count {get;}
419 bool ICollection.IsSynchronized {get;}
420 object ICollection.SyncRoot {get;}
421 bool IList.IsFixedSize {get;}
422 bool IList.IsReadOnly {get;}
423 object IList.this[ int index] {get; set;}
425 public void Add( TabPage value);
426 public void AddRange( TabPage[] pages);
427 public virtual void Clear();
428 public bool Contains( TabPage page);
429 public virtual IEnumerator GetEnumerator();
430 void ICollection.CopyTo(Array dest, int index);
431 int IList.Add( object value);
432 bool IList.Contains(object page);
433 int IList.IndexOf( object page);
434 void IList.Insert(int index, object value);
435 void IList.Remove( object value);
436 public int IndexOf( TabPage page);
437 public void Remove( TabPage value);
438 public virtual void RemoveAt(int index);