2 // System.Windows.Forms.Label.cs
5 // stubbed out by Daniel Carrera (dcarrera@math.toronto.edu)
6 // implemented for Gtk+ by Rachel Hestilow (hestilow@ximian.com)
8 // (C) 2002 Ximian, Inc
12 using System
.ComponentModel
;
14 namespace System
.Windows
.Forms
{
21 public class Label
: Control
{
23 private bool autoSize
;
24 private ContentAlignment textAlign
= ContentAlignment
.TopLeft
;
26 public Label () : base (){
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
);
39 public virtual bool AutoSize
{
40 get { return autoSize;}
41 set { autoSize = value;}
44 public virtual BorderStyle BorderStyle
{
45 get{ return BorderStyle.None; }
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); }
58 public FlatStyle FlatStyle
{
59 get { return FlatStyle.Standard;}
65 throw new NotImplementedException ();
68 throw new NotImplementedException ();
72 public ContentAlignment ImageAlign
{
74 throw new NotImplementedException ();
77 //InvalidEnumArgumentException
78 throw new NotImplementedException ();
82 public int ImageIndex
{
84 throw new NotImplementedException ();
88 throw new NotImplementedException ();
92 public ImageList ImageList
{
94 throw new NotImplementedException ();
97 throw new NotImplementedException ();
102 public virtual int PreferredHeight
{
103 get {throw new NotImplementedException ();}
106 public virtual int PreferredWidth
{
107 get {throw new NotImplementedException ();}
110 public virtual bool RenderTransparent
{
111 get { return false; }
116 public virtual ContentAlignment TextAlign
{
117 get {return textAlign;}
120 if (!Enum
.IsDefined(typeof(ContentAlignment
), value)){
121 throw new InvalidEnumArgumentException();
129 public bool UseMnemonic
{
130 get {throw new NotImplementedException ();}
131 set {throw new NotImplementedException ();}
135 // --- Public Methods
138 //public virtual bool Equals(object o);
140 // throw new NotImplementedException ();
143 //public static bool Equals(object o1, object o2);
145 // throw new NotImplementedException ();
148 //public void Select()
150 // throw new NotImplementedException ();
153 public override string ToString(){
154 return "System.Windows.Forms.Label, Text:" + this.Text
;
160 public event EventHandler AutoSizeChanged
;
161 public event EventHandler TextAlignChanged
;
165 // --- Protected Methods
168 protected Rectangle
CalcImageRenderBounds( Image image
, Rectangle rect
, ContentAlignment align
)
170 throw new NotImplementedException ();
174 //protected override void Dispose(bool val)
176 // throw new NotImplementedException ();
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
);
194 //protected override void OnEnabledChanged (EventArgs e)
196 // throw new NotImplementedException ();
199 //protected override void OnFontChanged (EventArgs e)
201 // throw new NotImplementedException ();
204 //protected override void OnPaint (PaintEventArgs e)
206 // throw new NotImplementedException ();
209 //protected override void OnParentChanged (EventArgs e)
211 // throw new NotImplementedException ();
217 //protected override void OnVisibleChanged (EventArgs e)
219 // throw new NotImplementedException ();
222 //protected override bool ProcessMnemonic(char charCode)
224 // throw new NotImplementedException ();
227 //protected ContentAlignment RtlTranslateAlignment( ContentAlignment alignment)
229 // throw new NotImplementedException ();
232 //protected HorizontalAlignment RtlTranslateAlignment( HorizontalAlignment alignment)
234 // throw new NotImplementedException ();
237 //protected virtual void Select(bool val1, bool val2)
239 // throw new NotImplementedException ();
242 //protected override void SetBoundsCore( int x, int y, int width, int height BoundsSpecified specified)
244 // throw new NotImplementedException ();
247 //protected void UpdateBounds()
249 // throw new NotImplementedException ();
252 //protected void UpdateBounds(int b1, int b2, int b3, int b4)
254 // throw new NotImplementedException ();
257 //protected override void WndProc(ref Message m)
259 // throw new NotImplementedException ();