diff --git a/doc/ChangeLog b/doc/ChangeLog index 061c08d0a..0dd8894a0 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -1,6 +1,11 @@ +2003-05-02 Duncan Mak + + * en/Gtk/EventBox.xml: + * en/Gtk/Fixed.xml: Add more updates from John Luke . + 2003-05-01 Duncan Mak - * en/Gtk/ToggleButton.xml: Add updated from John Luke . + * en/Gtk/ToggleButton.xml: Add updates from John Luke . 2003-04-24 Pedro Martínez Juliá diff --git a/doc/en/Gtk/EventBox.xml b/doc/en/Gtk/EventBox.xml index 4851f388f..f96fbf01f 100644 --- a/doc/en/Gtk/EventBox.xml +++ b/doc/en/Gtk/EventBox.xml @@ -7,8 +7,64 @@ Gtk# is thread aware, but not thread safe; See the Gtk# Thread Programming for details. - To be added - To be added + A widget used to catch events for widgets which do not have their own window. + The widget is a subclass of which also has its own window. It is useful since it allows you to catch events for widgets which do not have their own window. + + +using Gtk; +using GtkSharp; +using Gdk; +using System; + + +public class eventbox +{ + + static void delete_event (object obj, DeleteEventArgs args) + { + Application.Quit(); + } + + static void exitbutton_event (object obj, ButtonPressEventArgs args) + { + Application.Quit(); + } + + public static void Main (string[] args) + { + Gtk.Window window; + EventBox eventbox; + Label label; + + Application.Init(); + + window = new Gtk.Window ("Eventbox"); + window.DeleteEvent += new DeleteEventHandler (delete_event); + + window.BorderWidth = 10; + + eventbox = new EventBox (); + window.Add (eventbox); + eventbox.Show(); + + label = new Label ("Click here to quit"); + eventbox.Add(label); + label.Show(); + + label.SetSizeRequest(110, 20); + + eventbox.ButtonPressEvent += new ButtonPressEventHandler (exitbutton_event); + + eventbox.Realize(); + + window.Show(); + + Application.Run(); + } +} + + + Gtk.Bin @@ -63,9 +119,13 @@ - To be added - To be added: an object of type 'Gtk.EventBox' - To be added + Creates a new . + an object of type + Creates a new . + + EventBox eb = new EventBox(); + + @@ -75,8 +135,8 @@ System.UInt32 - The GLib Type for Gtk.EventBox - The GLib Type for the Gtk.EventBox class. + The for + The for the class. @@ -90,11 +150,11 @@ Internal constructor GLib type for the type - Creates a new instance of EventBox, using the GLib-provided type + Creates a new instance of , using the GLib-provided type This is a constructor used by derivative types of that would have their own GLib type assigned to it. This is not typically used by C# code. - \ No newline at end of file + diff --git a/doc/en/Gtk/Fixed.xml b/doc/en/Gtk/Fixed.xml index 007daa23d..2f71c635f 100644 --- a/doc/en/Gtk/Fixed.xml +++ b/doc/en/Gtk/Fixed.xml @@ -7,8 +7,20 @@ Gtk# is thread aware, but not thread safe; See the Gtk# Thread Programming for details. - To be added - To be added + A container which allows you to position widgets at fixed coordinates + + The widget is a container which can place child widgets at fixed positions and with fixed sizes, given in pixels. performs no automatic layout management. + For most applications, you should not use this container! It keeps you from having to learn about the other Gtk# containers, but it results in broken applications. With , the following things will result in truncated text, overlapping widgets, and other display bugs: + + Themes, which may change widget sizes. + Fonts other than the one you used to write the app will of course change the size of widgets containing text; keep in mind that users may use a larger font because of difficulty reading the default, or they may be using Windows or the framebuffer port of GTK+, where different fonts are available. + Translation of text into other languages changes its size. Also, display of non-English text will use a different font in many cases. + + + In addition, the fixed widget can't properly be mirrored in right-to-left languages such as Hebrew and Arabic. i.e. normally GTK+ will flip the interface to put labels to the right of the thing they label, but it can't do that with . So your application will not be usable in right-to-left languages. + Finally, fixed positioning makes it kind of annoying to add/remove GUI elements, since you have to reposition all the other elements. This is a long-term maintenance problem for your application. + If you know none of these things are an issue for your application, and prefer the simplicity of , by all means use the widget. But you should be aware of the tradeoffs. + Gtk.Container @@ -41,11 +53,11 @@ - To be added - To be added: an object of type 'Gtk.Widget' - To be added: an object of type 'int' - To be added: an object of type 'int' - To be added + Moves a child of a container to the given position. + an object of type + an object of type + an object of type + Moves a child of a container to the given position. @@ -60,11 +72,11 @@ - To be added - To be added: an object of type 'Gtk.Widget' - To be added: an object of type 'int' - To be added: an object of type 'int' - To be added + Adds a widget to a container at the given position. + an object of type + an object of type + an object of type + Adds a widget to a container at the given position. @@ -101,9 +113,9 @@ - To be added - To be added: an object of type 'Gtk.Fixed' - To be added + Creates a new object. + an object of type + Creates a new object. @@ -113,8 +125,8 @@ System.UInt32 - The GLib Type for Gtk.Fixed - The GLib Type for the Gtk.Fixed class. + The for + The for the class. @@ -128,10 +140,13 @@ - To be added - To be added: an object of type 'bool' - To be added: an object of type 'bool' - To be added + Determines if has a seperate + an object of type + an object of type + + Gets whether the has it's own . + Sets whether a widget is created with a separate or not. (By default, it will be created without a seperate ). This function must be called while the is not realized, for instance, immediately after the window is created. + @@ -151,4 +166,4 @@ - \ No newline at end of file +