From 56e4f16beb4a2b11dabc8488f68b5030e5d86831 Mon Sep 17 00:00:00 2001 From: Miguel de Icaza Date: Fri, 12 Sep 2008 21:41:55 +0000 Subject: [PATCH] Multiple updates to the documentation svn path=/trunk/gtk-sharp/; revision=112910 --- doc/en/Gdk/Pixbuf.xml | 4 ++-- doc/en/Gdk/Pixmap.xml | 14 ++++++++---- doc/en/Gtk/Dialog.xml | 51 +++++++++++++++++++++++++++++++++---------- 3 files changed, 51 insertions(+), 18 deletions(-) diff --git a/doc/en/Gdk/Pixbuf.xml b/doc/en/Gdk/Pixbuf.xml index a920f83b0..ce53d5eb3 100644 --- a/doc/en/Gdk/Pixbuf.xml +++ b/doc/en/Gdk/Pixbuf.xml @@ -12,7 +12,7 @@ The class is used to represent an image in - memory. The in-memory representation uses either a three + memory, typically on the client side (this is different from that represents a server-side image). The in-memory representation uses either a three byte RGB representation or a four byte RGBA representation. @@ -1945,4 +1945,4 @@ Gdk.Pixbuf pb = new Gdk.Pixbuf(buffer, 10, 10); - + \ No newline at end of file diff --git a/doc/en/Gdk/Pixmap.xml b/doc/en/Gdk/Pixmap.xml index f5a17e230..726bcb644 100644 --- a/doc/en/Gdk/Pixmap.xml +++ b/doc/en/Gdk/Pixmap.xml @@ -9,10 +9,16 @@ Gtk# is thread aware, but not thread safe; See the Gtk# Thread Programming for details. Offscreen drawable. - Pixmaps are offscreen drawables. They can be drawn upon with the standard drawing primitives, then copied to another drawable (such as a ) with . - + + Pixmaps are offscreen drawables that reside on the server on the X11 platform. They can be drawn upon with the standard drawing primitives, then copied to another drawable (such as a ) with . + + The depth of a pixmap is the number of bits per pixels. Bitmaps are simply pixmaps with a depth of 1. (That is, they are monochrome bitmaps - each pixel can be either on or off). - + + +For client-side images, see the class. + + Gdk.Drawable @@ -425,4 +431,4 @@ For example in the X backend, a native pixmap handle is an Xlib XID. - + \ No newline at end of file diff --git a/doc/en/Gtk/Dialog.xml b/doc/en/Gtk/Dialog.xml index 1b8bae841..ddc04082f 100644 --- a/doc/en/Gtk/Dialog.xml +++ b/doc/en/Gtk/Dialog.xml @@ -38,10 +38,12 @@ namespace GtkDialogSample Application.Init (); win = new Window ("Test"); win.SetDefaultSize (250, 250); - win.DeleteEvent += new DeleteEventHandler (on_win_delete); + win.DeleteEvent += delegate { + Application.Quit (); + } Button btn = new Button ("Show About"); - btn.Clicked += new EventHandler (on_btn_clicked); + btn.Clicked += on_btn_clicked; win.Add (btn); win.ShowAll (); @@ -54,7 +56,7 @@ namespace GtkDialogSample ("Sample", win, Gtk.DialogFlags.DestroyWithParent); dialog.Modal = true; dialog.AddButton ("Close", ResponseType.Close); - dialog.Response += new ResponseHandler (on_dialog_response); + dialog.Response += on_dialog_response; dialog.Run (); dialog.Destroy (); } @@ -63,11 +65,6 @@ namespace GtkDialogSample { Console.WriteLine (args.ResponseId); } - - void on_win_delete (object obj, DeleteEventArgs args) - { - Application.Quit (); - } } } @@ -297,9 +294,39 @@ namespace GtkDialogSample dialog characteristic such as modality and destruction policy. a list of button text/response pairs if desired. - Creates a new with the specified title and parent widget. - The argument can be used to make the dialog modal () - and/or to have it destroyed along with its parent (). + Creates a new with the specified title and parent widget. + +The argument can be used to make the dialog modal () +and/or to have it destroyed along with its parent (). + + + +using System; +using Gtk; + +class MainClass +{ + public static void Main (string[] args) + { + Application.Init (); + + // Shows two buttons that use stock icons, and a custom button + // Add button will return 1000 + // Delete button will return 2000 + // "My Own Butotn" will return 3000 + Dialog d = new Gtk.Dialog ("What to do?", null, DialogFlags.Modal, + Stock.Add, 1000, + Stock.Delete, 2000, + "My Own Button", 3000); + int response = d.Run (); + if (response == (int) ResponseType.DeleteEvent) + Console.WriteLine ("The user closed the dialog box"); + + Console.WriteLine (response); + } +} + + @@ -577,4 +604,4 @@ namespace GtkDialogSample - + \ No newline at end of file