Button.cs 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. //
  2. // System.Windows.Forms.Button.cs
  3. //
  4. // Author:
  5. // stubbed out by Jaak Simm ([email protected])
  6. // implemented for Gtk+ by Rachel Hestilow ([email protected])
  7. //
  8. // (C) Ximian, Inc., 2002
  9. //
  10. namespace System.Windows.Forms
  11. {
  12. /// <summary>
  13. /// Represents a Windows button control.
  14. /// </summary>
  15. public class Button : ButtonBase, IButtonControl
  16. {
  17. // private fields
  18. DialogResult dialogResult;
  19. //
  20. // // --- Constructor ---
  21. // protected Button() : base() {
  22. // dialogResult = DialogResult.None;
  23. // }
  24. //
  25. //
  26. //
  27. //
  28. // // --- Properties ---
  29. // [MonoTODO]
  30. // protected override CreateParams CreateParams {
  31. // get { throw new NotImplementedException (); }
  32. // }
  33. //
  34. // --- IButtonControl property ---
  35. public virtual DialogResult DialogResult {
  36. get { return dialogResult; }
  37. set { dialogResult=value; }
  38. }
  39. //
  40. //
  41. //
  42. //
  43. // --- IButtonControl method ---
  44. [MonoTODO]
  45. public virtual void NotifyDefault(bool value) {
  46. throw new NotImplementedException ();
  47. }
  48. [MonoTODO]
  49. public void PerformClick() {
  50. throw new NotImplementedException ();
  51. }
  52. //
  53. // // --- Button methods for events ---
  54. // [MonoTODO]
  55. // protected override void OnClick(EventArgs e) {
  56. // throw new NotImplementedException ();
  57. // }
  58. //
  59. // [MonoTODO]
  60. // protected override void OnMouseUp(MouseEventArgs mevent) {
  61. // throw new NotImplementedException ();
  62. // }
  63. //
  64. // // --- Button methods ---
  65. // [MonoTODO]
  66. // protected override bool ProcessMnemonic(char charCode) {
  67. // throw new NotImplementedException ();
  68. // }
  69. //
  70. // [MonoTODO]
  71. // public override string ToString() {
  72. // throw new NotImplementedException ();
  73. // }
  74. //
  75. // [MonoTODO]
  76. // protected override void WndProc(ref Message m) {
  77. // throw new NotImplementedException ();
  78. // }
  79. //
  80. //
  81. //
  82. //
  83. // /// --- Button events ---
  84. // /// commented out, cause it only supports the .NET Framework infrastructure
  85. // /*
  86. // [MonoTODO]
  87. // public new event EventHandler DoubleClick {
  88. // add {
  89. // throw new NotImplementedException ();
  90. // }
  91. // remove {
  92. // throw new NotImplementedException ();
  93. // }
  94. // }
  95. // */
  96. internal override Gtk.Widget CreateWidget () {
  97. Gtk.Button button = new Gtk.Button ();
  98. button.Add (label.Widget);
  99. return button;
  100. }
  101. }
  102. //
  103. }