(DISTFILES): Comment out a few missing files.
[mono-project.git] / mcs / class / System.Windows.Forms / Gtk / Label.cs
blob0610493254f193079fb5187a78e034e5fed81d3e
1 //
2 // System.Windows.Forms.Label.cs
3 //
4 // Author:
5 // stubbed out by Daniel Carrera (dcarrera@math.toronto.edu)
6 // implemented for Gtk+ by Rachel Hestilow (hestilow@ximian.com)
7 //
8 // (C) 2002 Ximian, Inc
9 //
11 using System.Drawing;
12 using System.ComponentModel;
14 namespace System.Windows.Forms {
17 // <summary>
19 // </summary>
21 public class Label : Control {
23 private bool autoSize;
24 private ContentAlignment textAlign = ContentAlignment.TopLeft;
26 public Label () : base (){
27 this.Text = " ";
28 AutoSize = false;
30 protected override void OnTextChanged (EventArgs e){
31 ((Gtk.Label) Widget).Text = Text;
34 internal override Gtk.Widget CreateWidget () {
35 return new Gtk.Label (Text);
38 [MonoTODO]
39 public virtual bool AutoSize{
40 get { return autoSize;}
41 set { autoSize = value;}
43 [MonoTODO]
44 public virtual BorderStyle BorderStyle{
45 get{ return BorderStyle.None; }
46 set{
47 if (!Enum.IsDefined (typeof(BorderStyle), value)){
48 throw new InvalidEnumArgumentException();
50 //InvalidEnumArgumentException
53 protected override Size DefaultSize{
54 get{ return new Size (100,23); }
57 [MonoTODO]
58 public FlatStyle FlatStyle {
59 get { return FlatStyle.Standard;}
60 set {}
62 [MonoTODO]
63 public Image Image {
64 get {
65 throw new NotImplementedException ();
67 set {
68 throw new NotImplementedException ();
71 [MonoTODO]
72 public ContentAlignment ImageAlign {
73 get {
74 throw new NotImplementedException ();
76 set {
77 //InvalidEnumArgumentException
78 throw new NotImplementedException ();
81 [MonoTODO]
82 public int ImageIndex {
83 get {
84 throw new NotImplementedException ();
86 set {
87 //ArgumentException
88 throw new NotImplementedException ();
91 [MonoTODO]
92 public ImageList ImageList {
93 get {
94 throw new NotImplementedException ();
96 set {
97 throw new NotImplementedException ();
101 [MonoTODO]
102 public virtual int PreferredHeight {
103 get {throw new NotImplementedException ();}
105 [MonoTODO]
106 public virtual int PreferredWidth {
107 get {throw new NotImplementedException ();}
109 [MonoTODO]
110 public virtual bool RenderTransparent {
111 get { return false; }
112 set { }
115 [MonoTODO]
116 public virtual ContentAlignment TextAlign {
117 get {return textAlign;}
118 set {
120 if (!Enum.IsDefined(typeof(ContentAlignment), value)){
121 throw new InvalidEnumArgumentException();
123 textAlign = value;
127 [MonoTODO]
128 // default = true
129 public bool UseMnemonic {
130 get {throw new NotImplementedException ();}
131 set {throw new NotImplementedException ();}
135 // --- Public Methods
137 //[MonoTODO]
138 //public virtual bool Equals(object o);
140 // throw new NotImplementedException ();
142 //[MonoTODO]
143 //public static bool Equals(object o1, object o2);
145 // throw new NotImplementedException ();
147 //[MonoTODO]
148 //public void Select()
150 // throw new NotImplementedException ();
152 //[MonoTODO]
153 public override string ToString(){
154 return "System.Windows.Forms.Label, Text:" + this.Text;
158 // --- Public Events
160 public event EventHandler AutoSizeChanged;
161 public event EventHandler TextAlignChanged;
165 // --- Protected Methods
167 [MonoTODO]
168 protected Rectangle CalcImageRenderBounds( Image image, Rectangle rect, ContentAlignment align)
170 throw new NotImplementedException ();
173 //[MonoTODO]
174 //protected override void Dispose(bool val)
176 // throw new NotImplementedException ();
178 [MonoTODO]
179 protected void DrawImage( Graphics g, Image img, Rectangle r, ContentAlignment align) {
180 throw new NotImplementedException ();
183 protected virtual void OnAutoSizeChanged (EventArgs e){
184 if (AutoSizeChanged != null)
185 AutoSizeChanged (this, e);
188 protected virtual void OnTextAlignChanged (EventArgs e){
189 if (TextAlignChanged != null)
190 TextAlignChanged (this, e);
193 //[MonoTODO]
194 //protected override void OnEnabledChanged (EventArgs e)
196 // throw new NotImplementedException ();
198 //[MonoTODO]
199 //protected override void OnFontChanged (EventArgs e)
201 // throw new NotImplementedException ();
203 //[MonoTODO]
204 //protected override void OnPaint (PaintEventArgs e)
206 // throw new NotImplementedException ();
208 //[MonoTODO]
209 //protected override void OnParentChanged (EventArgs e)
211 // throw new NotImplementedException ();
213 //[MonoTODO]
216 //[MonoTODO]
217 //protected override void OnVisibleChanged (EventArgs e)
219 // throw new NotImplementedException ();
221 //[MonoTODO]
222 //protected override bool ProcessMnemonic(char charCode)
224 // throw new NotImplementedException ();
226 //[MonoTODO]
227 //protected ContentAlignment RtlTranslateAlignment( ContentAlignment alignment)
229 // throw new NotImplementedException ();
231 //[MonoTODO]
232 //protected HorizontalAlignment RtlTranslateAlignment( HorizontalAlignment alignment)
234 // throw new NotImplementedException ();
236 //[MonoTODO]
237 //protected virtual void Select(bool val1, bool val2)
239 // throw new NotImplementedException ();
241 //[MonoTODO]
242 //protected override void SetBoundsCore( int x, int y, int width, int height BoundsSpecified specified)
244 // throw new NotImplementedException ();
246 //[MonoTODO]
247 //protected void UpdateBounds()
249 // throw new NotImplementedException ();
251 //[MonoTODO]
252 //protected void UpdateBounds(int b1, int b2, int b3, int b4)
254 // throw new NotImplementedException ();
256 //[MonoTODO]
257 //protected override void WndProc(ref Message m)
259 // throw new NotImplementedException ();