2 // System.Windows.Forms.TabControl
5 // Alberto Fernandez (infjaf00@yahoo.es)
11 using System
.Collections
;
12 using System
.ComponentModel
;
14 namespace System
.Windows
.Forms
{
16 public class TabControl
: Control
{
21 //InvalidEnumArgumentException
24 public TabAlignment Alignment
{
25 get { throw new NotImplementedException(); }
26 set { throw new NotImplementedException(); }
29 public TabAppearance Appearance
{
30 get { throw new NotImplementedException(); }
31 set { throw new NotImplementedException(); }
34 public override Color BackColor
{
35 get { throw new NotImplementedException(); }
36 set { throw new NotImplementedException(); }
39 public override Image BackgroundImage
{
40 get { throw new NotImplementedException(); }
41 set { throw new NotImplementedException(); }
44 protected override CreateParams CreateParams
{
45 get { throw new NotImplementedException(); }
48 protected override Size DefaultSize
{
49 get { return new Size (200,100); }
52 public override Rectangle DisplayRectangle
{
53 get { throw new NotImplementedException(); }
56 public TabDrawMode DrawMode
{
57 get { throw new NotImplementedException(); }
58 set { throw new NotImplementedException(); }
61 public override Color ForeColor
{
62 get { throw new NotImplementedException(); }
63 set { throw new NotImplementedException(); }
66 public bool HotTrack
{
67 get { throw new NotImplementedException(); }
68 set { throw new NotImplementedException(); }
71 public ImageList ImageList
{
72 get { throw new NotImplementedException(); }
73 set { throw new NotImplementedException(); }
76 public Size ItemSize
{
77 get { throw new NotImplementedException(); }
78 set { throw new NotImplementedException(); }
81 public bool Multiline
{
82 get { throw new NotImplementedException(); }
83 set { throw new NotImplementedException(); }
86 public Point Padding
{
87 get { throw new NotImplementedException(); }
88 set { throw new NotImplementedException(); }
92 get { throw new NotImplementedException(); }
95 public int SelectedIndex
{
96 get { throw new NotImplementedException(); }
97 set { throw new NotImplementedException(); }
100 public TabPage SelectedTab
{
101 get { throw new NotImplementedException(); }
102 set { throw new NotImplementedException(); }
105 public bool ShowToolTips
{
106 get { throw new NotImplementedException(); }
107 set { throw new NotImplementedException(); }
110 public TabSizeMode SizeMode
{
111 get { throw new NotImplementedException(); }
112 set { throw new NotImplementedException(); }
115 public int TabCount
{
116 get { throw new NotImplementedException(); }
119 public TabControl
.TabPageCollection TabPages
{
120 get { throw new NotImplementedException(); }
123 public override string Text
{
124 get { throw new NotImplementedException(); }
125 set { throw new NotImplementedException(); }
128 protected override Control
.ControlCollection
CreateControlsInstance(){
129 return new TabControl
.ControlCollection(this);
132 protected override void CreateHandle(){
133 throw new NotImplementedException();
136 protected override void Dispose(bool disposing
){
137 throw new NotImplementedException();
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();
152 public Rectangle
GetTabRect(int index
){
153 throw new NotImplementedException();
157 protected string GetToolTipText(object item
){
158 throw new NotImplementedException();
162 protected override bool IsInputKey(Keys keyData
){
163 throw new NotImplementedException();
166 protected virtual void OnDrawItem(DrawItemEventArgs e
){
167 throw new NotImplementedException();
170 protected override void OnFontChanged(EventArgs e
){
171 throw new NotImplementedException();
174 protected override void OnHandleCreated(EventArgs e
){
175 throw new NotImplementedException();
178 protected override void OnHandleDestroyed(EventArgs e
){
179 throw new NotImplementedException();
182 protected override void OnKeyDown(KeyEventArgs ke
){
183 throw new NotImplementedException();
186 protected override void OnResize(EventArgs e
){
187 throw new NotImplementedException();
190 protected virtual void OnSelectedIndexChanged(EventArgs e
){
191 throw new NotImplementedException();
194 protected override void OnStyleChanged(EventArgs e
){
195 throw new NotImplementedException();
198 protected override bool ProcessKeyPreview(ref Message m
){
199 throw new NotImplementedException();
202 protected void RemoveAll(){
203 throw new NotImplementedException();
206 public override string ToString(){
207 return "System.Windows.Forms.TabContro, TabPages.Count: " +
209 //System.Windows.Forms.TabControl, TabPages.Count: 0
213 protected void UpdateTabSelection( bool uiselected
){
214 throw new NotImplementedException();
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();
241 //if ( owner.IsHandleCreated )
242 // ((TabControl) owner).addPage ( c, Count - 1);
245 public override void 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
{
262 Control
.ControlCollection collection
;
264 public TabPageCollection( TabControl owner
) {
266 collection
= owner
.Controls
;
270 get { return collection.Count; }
273 public bool IsReadOnly
{
274 get { return collection.IsReadOnly; }
278 public virtual TabPage
this[int index
] {
279 get { return collection[ index ] as TabPage; }
281 //( (IList)collection )[ index ] = value;
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
);
319 /// IList Interface implmentation.
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 ]; }
332 //if ( ! (value is TabPage) )
333 // throw new ArgumentException ( );
334 //this[ index ] = (TabPage) value;
344 int IList
.Add( object value ) {
345 TabPage page
= value as TabPage
;
347 throw new ArgumentException ( );
349 return this.IndexOf ( page
);
353 bool IList
.Contains( object value ){
354 return this.Contains ( value as TabPage
);
358 int IList
.IndexOf( object value ){
359 return this.IndexOf ( value as TabPage
);
363 void IList
.Insert(int index
, object value){
364 //if ( ! (value is TabPage) )
365 // throw new ArgumentException ( );
367 //(( IList )collection).Insert ( index, value );
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
381 /// ICollection Interface implmentation.
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
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);
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);