2003-02-12 02:00:12 +00:00
<Type Name= "DrawingArea" FullName= "Gtk.DrawingArea" >
2003-03-05 07:39:20 +00:00
<TypeSignature Language= "C#" Value= "public class DrawingArea : Gtk.Widget, Implementor, IWrapper, IWrapper, IDisposable" Maintainer= "Hector Gomez M" />
2003-02-12 02:00:12 +00:00
<AssemblyInfo >
<AssemblyName > gtk-sharp</AssemblyName>
2003-12-24 01:35:30 +00:00
<AssemblyPublicKey >
</AssemblyPublicKey>
2003-02-12 02:00:12 +00:00
<AssemblyVersion > 0.0.0.0</AssemblyVersion>
2003-10-28 00:48:23 +00:00
<AssemblyCulture > neutral</AssemblyCulture>
2003-02-12 02:00:12 +00:00
<Attributes />
</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 >
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: <para >
<list type= "bullet" >
<item > 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).</item>
<item > 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.)</item>
<item > 3) The <paramref name= "configure_event" /> signal to take any necessary actions when the widget changes size.</item>
<item > 4) The <paramref name= "expose_event" /> signal to handle redrawing the contents of the widget.</item>
</list>
</para> </para>
<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 >
<Interface >
<InterfaceName > Atk.Implementor</InterfaceName>
</Interface>
<Interface >
<InterfaceName > GLib.IWrapper</InterfaceName>
</Interface>
<Interface >
<InterfaceName > GLib.IWrapper</InterfaceName>
</Interface>
<Interface >
<InterfaceName > System.IDisposable</InterfaceName>
</Interface>
</Interfaces>
<Attributes />
<Members >
<Member MemberName= "Finalize" >
2003-10-13 22:55:58 +00:00
<MemberSignature Language= "C#" Value= "protected override void Finalize ();" />
2003-02-12 02:00:12 +00:00
<MemberType > Method</MemberType>
<ReturnValue >
<ReturnType > System.Void</ReturnType>
</ReturnValue>
<Parameters />
<Docs >
2003-02-23 07:26:30 +00:00
<summary > Disposes the resources associated with the object.</summary>
<remarks />
2003-02-12 02:00:12 +00:00
</Docs>
</Member>
<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>
<returns > An instance of DrawingArea, wrapping the C object.</returns>
<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-07 01:30:00 +00:00
<returns > An instance of <see cref= "T:Gtk.DrawingArea" /> .</returns>
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 >
2003-12-24 01:35:30 +00:00
<summary > To be added</summary>
<returns > a <see cref= "T:GLib.GType" /> </returns>
<remarks > To be added</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 >
2003-12-24 01:35:30 +00:00
<summary > To be added</summary>
<param name= "gtype" > a <see cref= "T:GLib.GType" /> </param>
<returns > a <see cref= "T:Gtk.DrawingArea" /> </returns>
<remarks > To be added</remarks>
2003-03-07 01:30:00 +00:00
</Docs>
</Member>
2003-02-12 02:00:12 +00:00
</Members>
2004-05-27 19:02:19 +00:00
</Type>