GtkSharp/doc/en/Gnome/Print.xml

197 lines
6.2 KiB
XML
Raw Normal View History

<Type Name="Print" FullName="Gnome.Print">
<TypeSignature Language="C#" Value="public class Print" Maintainer="auto" />
<AssemblyInfo>
<AssemblyName>gnome-sharp</AssemblyName>
<AssemblyPublicKey>
</AssemblyPublicKey>
<AssemblyVersion>0.0.0.0</AssemblyVersion>
<AssemblyCulture>neutral</AssemblyCulture>
<Attributes />
</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>
<Docs>
<summary>To be added</summary>
<remarks>To be added</remarks>
<example>
<code language="C#">
using System;
using Gtk;
using GtkSharp;
using Gnome;
class PrintSample
{
TextView tv;
static void Main ()
{
new PrintSample ();
}
PrintSample ()
{
Application.Init ();
Gtk.Window win = new Gtk.Window ("Print sample");
win.SetDefaultSize (400, 300);
win.DeleteEvent += new DeleteEventHandler (OnWinDelete);
VBox vbox = new VBox (false, 0);
win.Add (vbox);
tv = new TextView ();
tv.Buffer.Text = "Hello World";
vbox.PackStart (tv, true, true, 0);
Button print = new Button (Gtk.Stock.Print);
print.Clicked += new EventHandler (OnPrintClicked);
vbox.PackStart (print, false, true, 0);
win.ShowAll ();
Application.Run ();
}
void MyPrint (PrintContext gpc)
{
Print.Beginpage (gpc, "demo");
Print.Moveto (gpc, 1, 700);
Print.Show (gpc, tv.Buffer.Text);
Print.Showpage (gpc);
}
void OnPrintClicked (object o, EventArgs args)
{
PrintJob pj = new PrintJob (PrintConfig.Default ());
PrintDialog dialog = new PrintDialog (pj, "Print Test", 0);
int response = dialog.Run ();
Console.WriteLine ("response: " + response);
if (response == (int) PrintButtons.Cancel) {
Console.WriteLine ("Canceled");
dialog.Hide ();
dialog.Dispose ();
return;
}
PrintContext ctx = pj.Context;
MyPrint (ctx);
pj.Close ();
switch (response) {
case (int) PrintButtons.Print:
pj.Print ();
break;
case (int) PrintButtons.Preview:
new PrintJobPreview (pj, "Print Test").Show ();
break;
}
dialog.Hide ();
dialog.Dispose ();
}
void OnWinDelete (object o, DeleteEventArgs args)
{
Application.Quit ();
}
}
</code>
</example>
</Docs>
<Base>
<BaseTypeName>System.Object</BaseTypeName>
</Base>
<Interfaces />
<Attributes />
<Members>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public Print ();" />
<MemberType>Constructor</MemberType>
<ReturnValue />
<Parameters />
<Docs>
<summary>To be added</summary>
<returns>a <see cref="T:Gnome.Print" /></returns>
<remarks>To be added</remarks>
</Docs>
</Member>
<Member MemberName="Pixbuf">
<MemberSignature Language="C#" Value="public static int Pixbuf (Gnome.PrintContext pc, Gdk.Pixbuf image);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Int32</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="pc" Type="Gnome.PrintContext" />
<Parameter Name="image" Type="Gdk.Pixbuf" />
</Parameters>
<Docs>
<summary>To be added</summary>
<param name="pc">a <see cref="T:Gnome.PrintContext" /></param>
<param name="image">a <see cref="T:Gdk.Pixbuf" /></param>
<returns>a <see cref="T:System.Int32" /></returns>
<remarks>To be added</remarks>
</Docs>
</Member>
<Member MemberName="CheckbuttonNew">
<MemberSignature Language="C#" Value="public static Gtk.Widget CheckbuttonNew (Gnome.PrintConfig config, out byte path, out byte label);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>Gtk.Widget</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="config" Type="Gnome.PrintConfig" />
<Parameter Name="path" Type="System.Byte&amp;" RefType="out" />
<Parameter Name="label" Type="System.Byte&amp;" RefType="out" />
</Parameters>
<Docs>
<summary>To be added</summary>
<param name="config">a <see cref="T:Gnome.PrintConfig" /></param>
<param name="path">a <see cref="T:System.Byte" /></param>
<param name="label">a <see cref="T:System.Byte" /></param>
<returns>a <see cref="T:Gtk.Widget" /></returns>
<remarks>To be added</remarks>
</Docs>
</Member>
<Member MemberName="RadiobuttonNew">
<MemberSignature Language="C#" Value="public static Gtk.Widget RadiobuttonNew (Gnome.PrintConfig config, out byte path, Gnome.PrintConfigOption options);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>Gtk.Widget</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="config" Type="Gnome.PrintConfig" />
<Parameter Name="path" Type="System.Byte&amp;" RefType="out" />
<Parameter Name="options" Type="Gnome.PrintConfigOption" />
</Parameters>
<Docs>
<summary>To be added</summary>
<param name="config">a <see cref="T:Gnome.PrintConfig" /></param>
<param name="path">a <see cref="T:System.Byte" /></param>
<param name="options">a <see cref="T:Gnome.PrintConfigOption" /></param>
<returns>a <see cref="T:Gtk.Widget" /></returns>
<remarks>To be added</remarks>
</Docs>
</Member>
<Member MemberName="WidgetNew">
<MemberSignature Language="C#" Value="public static Gtk.Widget WidgetNew (Gnome.PrintConfig config, out byte path, Gnome.PrintWidgetType type);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>Gtk.Widget</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="config" Type="Gnome.PrintConfig" />
<Parameter Name="path" Type="System.Byte&amp;" RefType="out" />
<Parameter Name="type" Type="Gnome.PrintWidgetType" />
</Parameters>
<Docs>
<summary>To be added</summary>
<param name="config">a <see cref="T:Gnome.PrintConfig" /></param>
<param name="path">a <see cref="T:System.Byte" /></param>
<param name="type">a <see cref="T:System.Int32" /></param>
<returns>a <see cref="T:Gtk.Widget" /></returns>
<remarks>To be added</remarks>
</Docs>
</Member>
</Members>
</Type>