2003-02-12 02:00:12 +00:00
<Type Name= "DrawingArea" FullName= "Gtk.DrawingArea" >
2005-05-23 20:41:51 +00:00
<TypeSignature Language= "C#" Maintainer= "Hector Gomez M" Value= "public class DrawingArea : Gtk.Widget" />
2003-02-12 02:00:12 +00:00
<AssemblyInfo >
<AssemblyName > gtk-sharp</AssemblyName>
2003-12-24 01:35:30 +00:00
<AssemblyPublicKey >
</AssemblyPublicKey>
2005-09-03 04:11:38 +00:00
<AssemblyVersion > 2.6.0.0</AssemblyVersion>
2003-02-12 02:00:12 +00:00
</AssemblyInfo>
2003-02-23 07:26:30 +00:00
<ThreadSafetyStatement > Gtk# is thread aware, but not thread safe; See the <link location= "node:gtk-sharp/programming/threads" > Gtk# Thread Programming</link> for details.</ThreadSafetyStatement>
2003-02-12 02:00:12 +00:00
<Docs >
2004-04-28 02:10:05 +00:00
<summary > The <see cref= "T:Gtk.DrawingArea" /> widget is used for creating custom user interface elements.</summary>
2003-03-05 07:39:20 +00:00
<remarks >
2003-03-07 01:30:00 +00:00
<para >
2004-08-24 17:01:00 +00:00
The <see cref= "T:Gtk.DrawingArea" /> widget is used for creating custom user interface elements. It's essentially a blank widget; you can draw on <paramref name= "widget" /> -> window. After creating a drawing area, the application may want to connect to:
2003-03-07 01:30:00 +00:00
<list type= "bullet" >
2004-11-05 21:25:40 +00:00
<item >
<term > 1) Mouse and button press signals to respond to input from the user. (Use <see cref= "M:Gtk.Widget.AddEvents" /> to enable events you wish to receive).</term>
</item>
<item >
<term > 2) The <paramref name= "realize" /> signal to take any necessary actions when the widget is instantiated on a particular display. (Create GDK resources in response to this signal.)</term>
</item>
<item >
<term > 3) The <paramref name= "configure_event" /> signal to take any necessary actions when the widget changes size.</term>
</item>
<item >
<term > 4) The <paramref name= "expose_event" /> signal to handle redrawing the contents of the widget.</term>
</item>
</list> </para>
2003-03-07 01:30:00 +00:00
<para >
Expose events are normally delivered when a drawing area first comes onscreen, or when it's covered by another window and then uncovered (exposed). You can also force an expose event by adding to the "damage region" of the drawing area's window; <see cref= "M:Gtk.Widget.QueueDrawArea" /> and <see cref= "M:Gdk.Window.InvalidateRect" /> are equally good ways to do this. You'll then get an expose event for the invalid region. See also <see cref= "M:Gdk.Pixbuf.RenderToDrawable" /> for drawing a <see cref= "T:Gdk.Pixbuf" /> .
2003-03-05 07:39:20 +00:00
</para>
</remarks>
2004-05-27 19:02:19 +00:00
<example >
<code lang= "C#" >
2004-04-28 02:10:05 +00:00
using System;
using Gtk;
using Pango;
class LayoutSample : DrawingArea
{
Pango.Layout layout;
static void Main ()
{
Application.Init ();
new LayoutSample ();
Application.Run ();
}
LayoutSample ()
{
Window win = new Window ("Layout sample");
win.SetDefaultSize (400, 300);
win.DeleteEvent += OnWinDelete;
this.Realized += OnRealized;
this.ExposeEvent += OnExposed;
win.Add (this);
win.ShowAll ();
}
void OnExposed (object o, ExposeEventArgs args)
{
this.GdkWindow.DrawLayout (this.Style.TextGC (StateType.Normal), 100, 150, layout);
}
void OnRealized (object o, EventArgs args)
{
layout = new Pango.Layout (this.PangoContext);
layout.Wrap = Pango.WrapMode.Word;
layout.FontDescription = FontDescription.FromString ("Tahoma 16");
layout.SetMarkup ("Hello Pango.Layout");
}
void OnWinDelete (object o, DeleteEventArgs args)
{
Application.Quit ();
}
}
</code>
2004-05-27 19:02:19 +00:00
</example>
2003-02-12 02:00:12 +00:00
</Docs>
<Base >
<BaseTypeName > Gtk.Widget</BaseTypeName>
</Base>
<Interfaces >
</Interfaces>
<Members >
<Member MemberName= ".ctor" >
<MemberSignature Language= "C#" Value= "public DrawingArea (IntPtr raw);" />
<MemberType > Constructor</MemberType>
<ReturnValue />
<Parameters >
2003-09-17 21:56:59 +00:00
<Parameter Name= "raw" Type= "System.IntPtr" />
</Parameters>
2003-02-12 02:00:12 +00:00
<Docs >
2003-02-23 07:26:30 +00:00
<summary > Internal constructor</summary>
<param name= "raw" > Pointer to the C object.</param>
<remarks >
<para > This is an internal constructor, and should not be used by user code.</para>
</remarks>
2003-02-12 02:00:12 +00:00
</Docs>
</Member>
<Member MemberName= ".ctor" >
<MemberSignature Language= "C#" Value= "public DrawingArea ();" />
<MemberType > Constructor</MemberType>
<ReturnValue />
<Parameters />
<Docs >
2004-04-21 20:46:56 +00:00
<summary > Default Constructor.</summary>
2003-03-05 07:39:20 +00:00
<remarks />
2003-02-12 02:00:12 +00:00
</Docs>
</Member>
<Member MemberName= "GType" >
2003-12-24 01:35:30 +00:00
<MemberSignature Language= "C#" Value= "public static GLib.GType GType { get; };" />
2003-02-12 02:00:12 +00:00
<MemberType > Property</MemberType>
<ReturnValue >
2003-12-24 01:35:30 +00:00
<ReturnType > GLib.GType</ReturnType>
2003-02-12 02:00:12 +00:00
</ReturnValue>
2003-12-24 01:35:30 +00:00
<Parameters />
2003-02-12 02:00:12 +00:00
<Docs >
2004-06-21 20:14:42 +00:00
<summary > GType Property.</summary>
2005-05-23 20:41:51 +00:00
<value > a <see cref= "T:GLib.GType" /> </value>
2004-06-21 20:14:42 +00:00
<remarks > Returns the native <see cref= "T:GLib.GType" /> value for <see cref= "T:Gtk.DrawingArea" /> .</remarks>
2003-02-12 02:00:12 +00:00
</Docs>
</Member>
2003-03-07 01:30:00 +00:00
<Member MemberName= ".ctor" >
2003-12-24 01:35:30 +00:00
<MemberSignature Language= "C#" Value= "protected DrawingArea (GLib.GType gtype);" />
2003-03-07 01:30:00 +00:00
<MemberType > Constructor</MemberType>
<ReturnValue />
<Parameters >
2003-12-24 01:35:30 +00:00
<Parameter Name= "gtype" Type= "GLib.GType" />
2003-09-17 21:56:59 +00:00
</Parameters>
2003-03-07 01:30:00 +00:00
<Docs >
2004-06-21 20:33:11 +00:00
<summary > Protected Constructor.</summary>
2003-12-24 01:35:30 +00:00
<param name= "gtype" > a <see cref= "T:GLib.GType" /> </param>
2004-06-21 20:33:11 +00:00
<remarks > Chain to this constructor if you have manually registered a native <see cref= "T:GLib.GType" /> value for your subclass.</remarks>
2003-03-07 01:30:00 +00:00
</Docs>
2005-06-16 18:56:42 +00:00
<Attributes >
2005-05-23 20:41:51 +00:00
<Attribute >
<AttributeName > System.Obsolete(Message=null, IsError=False)</AttributeName>
</Attribute>
2005-06-16 18:56:42 +00:00
</Attributes>
</Member>
2004-11-05 21:25:40 +00:00
<Member MemberName= "Size" >
<MemberSignature Language= "C#" Value= "public void Size (int width, int height);" />
<MemberType > Method</MemberType>
<ReturnValue >
<ReturnType > System.Void</ReturnType>
</ReturnValue>
<Parameters >
<Parameter Name= "width" Type= "System.Int32" />
<Parameter Name= "height" Type= "System.Int32" />
</Parameters>
<Docs >
2005-01-03 17:38:13 +00:00
<summary > Sets the size of the drawing area.</summary>
2004-11-05 21:25:40 +00:00
<param name= "width" > a <see cref= "T:System.Int32" /> </param>
<param name= "height" > a <see cref= "T:System.Int32" /> </param>
2005-05-23 20:41:51 +00:00
<remarks >
</remarks>
2005-06-16 18:56:42 +00:00
<since version= "Gtk# 2.4" />
2004-11-05 21:25:40 +00:00
</Docs>
</Member>
2003-02-12 02:00:12 +00:00
</Members>
2005-06-17 18:43:30 +00:00
</Type>