From e03eb3f68de15a3314f63f2e45ed369652284a69 Mon Sep 17 00:00:00 2001 From: John Luke Date: Wed, 1 Dec 2004 00:11:21 +0000 Subject: [PATCH] some docs svn path=/trunk/gtk-sharp/; revision=36872 --- doc/ChangeLog | 6 ++ doc/en/Gtk/ComboBox.xml | 179 ++++++++++++++++++++++--------- doc/en/Gtk/FileChooserAction.xml | 12 +-- doc/en/Gtk/FileChooserError.xml | 8 +- 4 files changed, 147 insertions(+), 58 deletions(-) diff --git a/doc/ChangeLog b/doc/ChangeLog index 1a6089009..542c33b1d 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -1,3 +1,9 @@ +2004-11-30 John Luke + + * en/Gtk/FileChooserAction.xml: + * en/Gtk/FileChooserError.xml: + * en/Gtk/ComboBox.xml: doc some stuff + 2004-11-30 Shane Landrum * en/Gtk/ColorSelection.xml: Documented deprecated UpdatePolicy prop. diff --git a/doc/en/Gtk/ComboBox.xml b/doc/en/Gtk/ComboBox.xml index 7a25af8b9..d18b58638 100644 --- a/doc/en/Gtk/ComboBox.xml +++ b/doc/en/Gtk/ComboBox.xml @@ -9,8 +9,58 @@ 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 choose from a list of items + + + +using System; +using Gtk; + +class ComboBoxSample +{ + static void Main () + { + new ComboBoxSample (); + } + + ComboBoxSample () + { + Application.Init (); + + Window win = new Window ("ComboBoxSample"); + win.DeleteEvent += new DeleteEventHandler (OnWinDelete); + + ComboBox combo = ComboBox.NewText (); + for (int i = 0; i < 5; i ++) + combo.AppendText ("item " + i); + combo.Changed += new EventHandler (OnComboBoxChanged); + + win.Add (combo); + + win.ShowAll (); + Application.Run (); + } + + void OnComboBoxChanged (object o, EventArgs args) + { + ComboBox combo = o as ComboBox; + if (o == null) + return; + + TreeIter iter; + + if (combo.GetActiveIter (out iter)) + Console.WriteLine ((string) combo.Model.GetValue (iter, 0)); + } + + void OnWinDelete (object obj, DeleteEventArgs args) + { + Application.Quit (); + } +} + + + Gtk.Bin @@ -39,9 +89,9 @@ - To be added + Convenience function which constructs a new text combo box, which is a just displaying strings. a - To be added + If you use this function to create a text combo box, you should only manipulate its data source with the following convenience functions: , , and . @@ -52,8 +102,8 @@ - To be added - To be added + Disposes the resources associated with the object. + @@ -64,8 +114,8 @@ - To be added - To be added + Default handler for the event. + Override this method in a subclass to provide a default handler for the event. @@ -79,10 +129,15 @@ - To be added - a - a - To be added + Inserts at in the list of strings stored in . + An index to insert . + a to insert + + + You can only use this function with combo boxes constructed with . + + + @@ -95,9 +150,14 @@ - To be added + Prepends to the list of strings stored in the . a - To be added + + + You can only use this function with combo boxes constructed with . + + + @@ -108,8 +168,8 @@ - To be added - To be added + Pops up the menu or dropdown list of . + This function is mostly intended for use by accessibility technologies; applications should have little use for it. @@ -122,9 +182,14 @@ - To be added + Removes text at in the list of strings stored in . a - To be added + + + You can only use this function with combo boxes constructed with . + + + @@ -137,10 +202,10 @@ - To be added + Gets the iter that points to the current active item, if it exists. a - a - To be added + a , if it exists. + @@ -153,7 +218,7 @@ - To be added + Sets the current active item to be the one referenced by iter. a To be added @@ -166,8 +231,8 @@ - To be added - To be added + Hides the menu or dropdown list of this . + This function is mostly intended for use by accessibility technologies; applications should have little use for it. @@ -180,9 +245,14 @@ - To be added + Appends to the list of strings stored in . a - To be added + + + You can only use this function with combo boxes constructed with . + + + @@ -307,10 +377,10 @@ - To be added + Internal constructor a a - To be added + @@ -321,10 +391,10 @@ - To be added + Internal constructor a a - To be added + @@ -333,9 +403,9 @@ - To be added + Default constructor a - To be added + @@ -346,10 +416,10 @@ - To be added + Creates a new that uses a a - To be added + @@ -360,9 +430,9 @@ - To be added + GType Property a - To be added + Returns the native GLib.GType value for Combo. @@ -373,9 +443,16 @@ - To be added + Wrap width for laying out the items in a grid. a - To be added + + +Allowed values: >= 0 + + +Default value: 0 + + @@ -386,9 +463,9 @@ - To be added + The column with column span information. a - To be added + The column span column contains integers which indicate how many columns an item should span. @@ -399,9 +476,9 @@ - To be added + The index of the currently active item. a - To be added + -1 if there is no active item. @@ -412,9 +489,9 @@ - To be added + The column with row span information a - To be added + The row span column contains integers which indicate how many rows an item should span. @@ -425,9 +502,15 @@ - To be added + The which is acting as data source for the . a - To be added + Will unset a previously set model (if applicable). If model is , then it will unset the model. + + + + setting the model does not clear the cell renderers, you have to call yourself if you need to set up different cell renderers for the new model. + + @@ -438,8 +521,8 @@ - To be added - To be added + Emitted when the selected item is changed. + diff --git a/doc/en/Gtk/FileChooserAction.xml b/doc/en/Gtk/FileChooserAction.xml index 08af68eba..4cf727bd4 100644 --- a/doc/en/Gtk/FileChooserAction.xml +++ b/doc/en/Gtk/FileChooserAction.xml @@ -9,8 +9,8 @@ Gtk# is thread aware, but not thread safe; See the Gtk# Thread Programming for details. - To be added - To be added + Describes whether a is being used to open existing files or to save to a possibly new file. + System.Enum @@ -37,7 +37,7 @@ - To be added + Indicates open mode. The file chooser will only let the user pick an existing file. To be added @@ -50,7 +50,7 @@ - To be added + Indicates save mode. The file chooser will let the user pick an existing file, or type in a new filename. To be added @@ -63,7 +63,7 @@ - To be added + Indicates an Open mode for selecting folders. The file chooser will let the user pick an existing folder. To be added @@ -76,7 +76,7 @@ - To be added + Indicates a mode for creating a new folder. The file chooser will let the user name an existing or new folder. To be added diff --git a/doc/en/Gtk/FileChooserError.xml b/doc/en/Gtk/FileChooserError.xml index 7ff1e7f09..56b204e2f 100644 --- a/doc/en/Gtk/FileChooserError.xml +++ b/doc/en/Gtk/FileChooserError.xml @@ -9,8 +9,8 @@ Gtk# is thread aware, but not thread safe; See the Gtk# Thread Programming for details. - To be added - To be added + These identify the various errors that can occur while calling functions. + System.Enum @@ -37,7 +37,7 @@ - To be added + Indicates that a file does not exist. To be added @@ -50,7 +50,7 @@ - To be added + Indicates a malformed filename. To be added