2 // System.Windows.Forms.LinkLabel.cs
5 // stubbed out by Daniel Carrera (dcarrera@math.toronto.edu)
6 // stub ammended by Jaak Simm (jaaksimm@firm.ee)
7 // Dennis Hayes (dennish@raytek.com)
8 // (C) 2002/3 Ximian, Inc
12 // Permission is hereby granted, free of charge, to any person obtaining
13 // a copy of this software and associated documentation files (the
14 // "Software"), to deal in the Software without restriction, including
15 // without limitation the rights to use, copy, modify, merge, publish,
16 // distribute, sublicense, and/or sell copies of the Software, and to
17 // permit persons to whom the Software is furnished to do so, subject to
18 // the following conditions:
20 // The above copyright notice and this permission notice shall be
21 // included in all copies or substantial portions of the Software.
23 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
24 // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
25 // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
26 // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
27 // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
28 // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
29 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
31 using System
.Collections
;
33 using System
.ComponentModel
;
35 namespace System
.Windows
.Forms
{
40 public class LinkLabel
: Label
, IButtonControl
{
52 // --- Public Properties
55 public Color ActiveLinkcolor
{
57 throw new NotImplementedException ();
64 public Color DisabledLinkColor
{
66 throw new NotImplementedException ();
73 public LinkArea LinkArea
{
75 throw new NotImplementedException ();
82 public LinkBehavior LinkBehavior
{
84 throw new NotImplementedException ();
91 public Color LinkColor
{
93 throw new NotImplementedException ();
100 public LinkLabel
.LinkCollection Links
{
102 throw new NotImplementedException ();
106 public bool LinkVisited
{
108 throw new NotImplementedException ();
115 public override ISite Site
{
117 throw new NotImplementedException ();
124 public override string Text
{
125 //FIXME: This is to get it to run
134 public Color VisitedLinkColor
{
136 throw new NotImplementedException ();
144 // --- IButtonControl members:
145 DialogResult IButtonControl
.DialogResult
{
147 throw new NotImplementedException ();
155 void IButtonControl
.NotifyDefault(bool value)
161 void IButtonControl
.PerformClick()
165 // --- end of IButtonControl members
171 public event LinkLabelLinkClickedEventHandler LinkClicked
;
174 // --- Protected Properties
177 protected override ImeMode DefaultImeMode
{
180 return base.DefaultImeMode
;
185 // --- Protected Methods
188 protected override AccessibleObject
CreateAccessibilityInstance()
191 return base.CreateAccessibilityInstance();
194 protected override void CreateHandle()
196 //FIXME: this is just to get it running
201 protected override void OnEnabledChanged(EventArgs e
)
204 base.OnEnabledChanged(e
);
207 protected override void OnFontChanged( EventArgs e
)
210 base.OnFontChanged(e
);
213 protected override void OnGotFocus( EventArgs e
)
219 protected override void OnKeyDown (KeyEventArgs e
)
225 protected override void OnLostFocus (EventArgs e
)
231 protected override void OnMouseDown (MouseEventArgs e
)
236 // I think that this should be 'MouseEventArgs'
237 // but the documentation says EventArgs.
239 protected override void OnMouseLeave(EventArgs e
)
242 base.OnMouseLeave(e
);
245 protected override void OnMouseMove (MouseEventArgs e
)
251 protected override void OnMouseUp (MouseEventArgs e
)
257 protected override void OnPaint (PaintEventArgs e
)
263 protected override void OnPaintBackground(PaintEventArgs e
)
269 protected override void OnTextAlignChanged( EventArgs e
)
272 base.OnTabIndexChanged(e
);
275 protected override void OnTextChanged( EventArgs e
)
278 base.OnTabIndexChanged(e
);
282 protected override bool ProcessDialogKey(Keys keyData
)
285 return base.ProcessDialogKey(keyData
);
289 protected override void Select(bool directed
, bool forward
)
292 base.Select(directed
, forward
);
295 protected override void SetBoundsCore(
300 BoundsSpecified specified
) {
303 base.SetBoundsCore(x
, y
, width
, height
, specified
);
306 protected override void WndProc(ref Message msg
)
309 base.WndProc(ref msg
);
312 /// System.Windows.Forms.LinkLabel.Link
313 /// <summary>Represents a link within a LinkLabel control.</summary>
315 /// stubbed out by Jaak Simm (jaaksimm@firm.ee)
324 public bool Enabled
{
325 get { return enabled; }
326 set { enabled=value; }
330 get { return length; }
331 set { length=value; }
334 public object LinkData
{
335 get { return linkData; }
336 set { linkData=value; }
340 get { return start; }
344 public bool Visited
{
345 get { return visited; }
346 set { visited=value; }
351 // System.Windows.Forms.LinkLabel.LinkCollection.cs
354 // stubbed out by Daniel Carrera (dcarrera@math.toronto.edu)
356 // (C) 2002 Ximian, Inc
362 public class LinkCollection
: IList
, ICollection
, IEnumerable
{
368 public LinkCollection(LinkLabel owner
)
374 // --- Public Properties
379 throw new NotImplementedException ();
383 public bool IsReadOnly
{
385 throw new NotImplementedException ();
389 public virtual LinkLabel
.Link
this[ int index
] {
391 throw new NotImplementedException ();
399 // --- Public Methods
402 public Link
Add(int val1
, int val2
)
404 throw new NotImplementedException ();
407 public Link
Add(int val1
, int val2
, object o
)
409 throw new NotImplementedException ();
412 public virtual void Clear()
418 public IEnumerator
GetEnumerator()
420 throw new NotImplementedException ();
423 public int IndexOf(LinkLabel
.Link link
)
425 throw new NotImplementedException ();
428 public void Remove(LinkLabel
.Link
value)
433 public void RemoveAt(int index
)
438 /// --- LinkLabel.IList properties ---
439 bool IList
.IsFixedSize
{
440 [MonoTODO
] get { throw new NotImplementedException (); }
443 object IList
.this[int index
] {
444 [MonoTODO
] get { throw new NotImplementedException (); }
445 [MonoTODO
] set { throw new NotImplementedException (); }
449 object ICollection
.SyncRoot
{
451 throw new NotImplementedException ();
455 bool ICollection
.IsSynchronized
{
457 throw new NotImplementedException ();
462 void ICollection
.CopyTo(Array dest
,int index
)
464 throw new NotImplementedException ();
467 /// --- LinkLabel.IList methods ---
469 int IList
.Add(object control
)
471 throw new NotImplementedException ();
475 bool IList
.Contains(object control
)
477 throw new NotImplementedException ();
481 int IList
.IndexOf(object control
)
483 throw new NotImplementedException ();
487 void IList
.Insert(int index
,object value)
493 void IList
.Remove(object control
)