File: DrawingArea.xml

package info (click to toggle)
gtk-sharp3 2.99.3-4
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 25,484 kB
  • sloc: xml: 308,885; cs: 38,796; sh: 11,336; perl: 1,295; makefile: 1,097; ansic: 903
file content (118 lines) | stat: -rw-r--r-- 5,464 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
<Type Name="DrawingArea" FullName="Gtk.DrawingArea">
  <TypeSignature Language="C#" Maintainer="Hector Gomez M" Value="public class DrawingArea : Gtk.Widget" />
  <TypeSignature Language="ILAsm" Value=".class public auto ansi beforefieldinit DrawingArea extends Gtk.Widget" />
  <AssemblyInfo>
    <AssemblyName>gtk-sharp</AssemblyName>
    <AssemblyPublicKey>
    </AssemblyPublicKey>
  </AssemblyInfo>
  <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>
  <Base>
    <BaseTypeName>Gtk.Widget</BaseTypeName>
  </Base>
  <Interfaces>
  </Interfaces>
  <Docs>
    <summary>The <see cref="T:Gtk.DrawingArea" /> widget is used for creating custom user interface elements.</summary>
    <remarks>
      <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" />-&gt;window. After creating a drawing area, the application may want to connect to:
          <list type="bullet"><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>
      <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" />.
     </para>
    </remarks>
    <example>
      <code lang="C#">
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>
    </example>
  </Docs>
  <Members>
    <Member MemberName=".ctor">
      <MemberSignature Language="C#" Value="public DrawingArea ();" />
      <MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor() cil managed" />
      <MemberType>Constructor</MemberType>
      <ReturnValue />
      <Parameters />
      <Docs>
        <summary>Default Constructor.</summary>
        <remarks />
      </Docs>
    </Member>
    <Member MemberName=".ctor">
      <MemberSignature Language="C#" Value="public DrawingArea (IntPtr raw);" />
      <MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(native int raw) cil managed" />
      <MemberType>Constructor</MemberType>
      <ReturnValue />
      <Parameters>
        <Parameter Name="raw" Type="System.IntPtr" />
      </Parameters>
      <Docs>
        <param name="raw">Pointer to the C object.</param>
        <summary>Internal constructor</summary>
        <remarks>
          <para>This is an internal constructor, and should not be used by user code.</para>
        </remarks>
      </Docs>
    </Member>
    <Member MemberName="GType">
      <MemberSignature Language="C#" Value="public static GLib.GType GType { get; }" />
      <MemberSignature Language="ILAsm" Value=".property valuetype GLib.GType GType" />
      <MemberType>Property</MemberType>
      <ReturnValue>
        <ReturnType>GLib.GType</ReturnType>
      </ReturnValue>
      <Parameters />
      <Docs>
        <summary>GType Property.</summary>
        <value>a <see cref="T:GLib.GType" /></value>
        <remarks>Returns the native <see cref="T:GLib.GType" /> value for <see cref="T:Gtk.DrawingArea" />.</remarks>
      </Docs>
    </Member>
  </Members>
</Type>