GtkSharp/doc/en/Gtk/ComboBox.xml
Shane Landrum 8b2b88122b 2005-01-03 Shane Landrum <epicene@pobox.com>
* en/Gtk/DrawingArea.xml
	* en/Gtk/Expander.xml
	* en/Gtk/ComboBox.xml
	* en/Gtk/Style.xml
	* en/Gtk/EntryCompletion.xml
	* en/Gtk/EventBox.xml: Added docs; turned
	some @param to <paramref name="param"/>.


svn path=/trunk/gtk-sharp/; revision=38281
2005-01-03 17:38:13 +00:00

583 lines
23 KiB
XML

<Type Name="ComboBox" FullName="Gtk.ComboBox">
<TypeSignature Language="C#" Value="public class ComboBox : Gtk.Bin, CellLayout, IWrapper, Implementor, IDisposable" Maintainer="auto" />
<AssemblyInfo>
<AssemblyName>gtk-sharp</AssemblyName>
<AssemblyPublicKey>[00 24 00 00 04 80 00 00 94 00 00 00 06 02 00 00 00 24 00 00 52 53 41 31 00 04 00 00 01 00 01 00 71 EB 6C 55 75 52 9C BF 72 44 F7 A6 EA 05 62 84 F9 EA E0 3B CF F2 CC 13 2C 9C 49 0A B3 09 EA B0 B5 6B CE 44 9D F5 03 D9 C0 A8 1E 52 05 85 CD BE 70 E2 FB 90 43 4B AC 04 FA 62 22 A8 00 98 B7 A1 A7 B3 AF 99 1A 41 23 24 BB 43 25 F6 B8 65 BB 64 EB F6 D1 C2 06 D5 73 2D DF BC 70 A7 38 9E E5 3E 0C 24 6E 32 79 74 1A D0 05 03 E4 98 42 E1 9B F3 7B 19 8B 40 21 26 CB 36 89 C2 EA 64 96 A4 7C B4]</AssemblyPublicKey>
<AssemblyVersion>2.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>A widget used to choose from a list of items.</summary>
<remarks>
<example>
<code lang="C#">
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 &lt; 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 ();
}
}
</code>
</example>
</remarks>
</Docs>
<Base>
<BaseTypeName>Gtk.Bin</BaseTypeName>
</Base>
<Interfaces>
<Interface>
<InterfaceName>Gtk.CellLayout</InterfaceName>
</Interface>
<Interface>
<InterfaceName>GLib.IWrapper</InterfaceName>
</Interface>
<Interface>
<InterfaceName>Atk.Implementor</InterfaceName>
</Interface>
<Interface>
<InterfaceName>System.IDisposable</InterfaceName>
</Interface>
</Interfaces>
<Attributes />
<Members>
<Member MemberName="NewText">
<MemberSignature Language="C#" Value="public static Gtk.ComboBox NewText ();" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>Gtk.ComboBox</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Convenience function which constructs a new text combo box, which is a <see cref="T:Gtk.ComboBox" /> just displaying strings.</summary>
<returns>a <see cref="T:Gtk.ComboBox" /></returns>
<remarks>If you use this function to create a text combo box, you should only manipulate its data source with the following convenience functions: <see cref="M:Gtk.ComboBox.AppendText()" />, <see cref="M:Gtk.ComboBox.InsertText()" />, <see cref="M:Gtk.ComboBox.PrependText()" /> and <see cref="M:Gtk.ComboBox.RemoveText()" />.</remarks>
</Docs>
</Member>
<Member MemberName="Finalize">
<MemberSignature Language="C#" Value="protected override void Finalize ();" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Disposes the resources associated with the object.</summary>
<remarks />
</Docs>
</Member>
<Member MemberName="OnChanged">
<MemberSignature Language="C#" Value="protected virtual void OnChanged ();" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Default handler for the <see cref="E:Gtk.ComboBox.Changed" /> event.</summary>
<remarks>Override this method in a subclass to provide a default handler for the <see cref="E:Gtk.ComboBox.Changed" /> event.</remarks>
</Docs>
</Member>
<Member MemberName="InsertText">
<MemberSignature Language="C#" Value="public void InsertText (int position, string text);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="position" Type="System.Int32" />
<Parameter Name="text" Type="System.String" />
</Parameters>
<Docs>
<summary>Inserts <paramref name="text" /> at <paramref name="position" /> in the list of strings stored in <see cref="T:Gtk.ComboBox" />.</summary>
<param name="position">An index to insert <paramref name="text" />.</param>
<param name="text">a <see cref="T:System.String" /> to insert</param>
<remarks>
<block subset="none" type="note">
<para>You can only use this function with combo boxes constructed with <see cref="M:Gtk.ComboBox.NewText()" />.
</para>
</block>
</remarks>
</Docs>
</Member>
<Member MemberName="PrependText">
<MemberSignature Language="C#" Value="public void PrependText (string text);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="text" Type="System.String" />
</Parameters>
<Docs>
<summary>Prepends <paramref name="string" /> to the list of strings stored in the <see cref="T:Gtk.ComboBox" />.</summary>
<param name="text">a <see cref="T:System.String" /></param>
<remarks>
<block subset="none" type="note">
<para>You can only use this function with combo boxes constructed with <see cref="M:Gtk.ComboBox.NewText()" />.
</para>
</block>
</remarks>
</Docs>
</Member>
<Member MemberName="Popup">
<MemberSignature Language="C#" Value="public void Popup ();" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Pops up the menu or dropdown list of <see cref="T:Gtk.ComboBox" />.</summary>
<remarks>This function is mostly intended for use by accessibility technologies; applications should have little use for it.</remarks>
</Docs>
</Member>
<Member MemberName="RemoveText">
<MemberSignature Language="C#" Value="public void RemoveText (int position);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="position" Type="System.Int32" />
</Parameters>
<Docs>
<summary>Removes text at <paramref name="position" /> in the list of strings stored in <see cref="T:Gtk.ComboBox" />.</summary>
<param name="position">a <see cref="T:System.Int32" /></param>
<remarks>
<block subset="none" type="note">
<para>You can only use this function with combo boxes constructed with <see cref="M:Gtk.ComboBox.NewText()" />.
</para>
</block>
</remarks>
</Docs>
</Member>
<Member MemberName="GetActiveIter">
<MemberSignature Language="C#" Value="public bool GetActiveIter (out Gtk.TreeIter iter);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="iter" Type="Gtk.TreeIter&amp;" RefType="out" />
</Parameters>
<Docs>
<summary>Gets the iter that points to the current active item, if it exists.</summary>
<param name="iter">a <see cref="T:Gtk.TreeIter" /></param>
<returns>a <see cref="T:System.Boolean" />, <see langword="true" /> if it exists.</returns>
<remarks />
</Docs>
</Member>
<Member MemberName="SetActiveIter">
<MemberSignature Language="C#" Value="public void SetActiveIter (Gtk.TreeIter iter);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="iter" Type="Gtk.TreeIter" />
</Parameters>
<Docs>
<summary>Sets the current active item to be the one referenced by iter.</summary>
<param name="iter">a <see cref="T:Gtk.TreeIter" /></param>
<remarks></remarks>
</Docs>
</Member>
<Member MemberName="Popdown">
<MemberSignature Language="C#" Value="public void Popdown ();" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Hides the menu or dropdown list of this <see cref="T:Gtk.ComboBox" />.</summary>
<remarks>This function is mostly intended for use by accessibility technologies; applications should have little use for it.</remarks>
</Docs>
</Member>
<Member MemberName="AppendText">
<MemberSignature Language="C#" Value="public void AppendText (string text);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="text" Type="System.String" />
</Parameters>
<Docs>
<summary>Appends <paramref name="text" /> to the list of strings stored in <see cref="T:Gtk.ComboBox" />.</summary>
<param name="text">a <see cref="T:System.String" /></param>
<remarks>
<block subset="none" type="note">
<para>You can only use this function with combo boxes constructed with <see cref="M:Gtk.ComboBox.NewText()" />.
</para>
</block>
</remarks>
</Docs>
</Member>
<Member MemberName="Reorder">
<MemberSignature Language="C#" Value="public virtual void Reorder (Gtk.CellRenderer cell, int position);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="cell" Type="Gtk.CellRenderer" />
<Parameter Name="position" Type="System.Int32" />
</Parameters>
<Docs>
<summary>Re-inserts <paramref name="cell"/> at <paramref name="position"/>.</summary>
<param name="cell">a <see cref="T:Gtk.CellRenderer" /></param>
<param name="position">a <see cref="T:System.Int32" /></param>
<remarks>
Note that <paramref name="cell"/> has already to be packed
into the combo box for this to function properly.
</remarks>
</Docs>i
</Member>
<Member MemberName="PackEnd">
<MemberSignature Language="C#" Value="public virtual void PackEnd (Gtk.CellRenderer cell, bool expand);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="cell" Type="Gtk.CellRenderer" />
<Parameter Name="expand" Type="System.Boolean" />
</Parameters>
<Docs>
<summary>Adds the <paramref name="cell"/> to the end of the combo box.</summary>
<param name="cell">a <see cref="T:Gtk.CellRenderer" /></param>
<param name="expand">a <see cref="T:System.Boolean" /></param>
<remarks>
If <paramref name="expand"/> is <see langword="false"/>, then the
<paramref name="cell"/> is allocated no more space than it needs. Any unused space is
divided evenly between cells for which <paramref name="expand"/> is <see langword="true"/>.
</remarks>
</Docs>
</Member>
<Member MemberName="PackStart">
<MemberSignature Language="C#" Value="public virtual void PackStart (Gtk.CellRenderer cell, bool expand);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="cell" Type="Gtk.CellRenderer" />
<Parameter Name="expand" Type="System.Boolean" />
</Parameters>
<Docs>
<summary>Packs the <paramref name="cell"/> into the beginning of the combo box.</summary>
<param name="cell">a <see cref="T:Gtk.CellRenderer" /></param>
<param name="expand">a <see cref="T:System.Boolean" /></param>
<remarks>
If <paramref name="expand"/> is <see langword="false"/>, then the
<paramref name="cell"/> is allocated no more space than it needs. Any unused space is
divided evenly between cells for which <paramref name="expand"/> is <see langword="true"/>.
</remarks>
</Docs>
</Member>
<Member MemberName="AddAttribute">
<MemberSignature Language="C#" Value="public virtual void AddAttribute (Gtk.CellRenderer cell, string attribute, int column);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="cell" Type="Gtk.CellRenderer" />
<Parameter Name="attribute" Type="System.String" />
<Parameter Name="column" Type="System.Int32" />
</Parameters>
<Docs>
<summary>
Adds an attribute mapping to the list in this combo box.
</summary>
<param name="cell">a <see cref="T:Gtk.CellRenderer" /></param>
<param name="attribute">a <see cref="T:System.String" />, parameter on <paramref name="cell"/> to be set from the value</param>
<param name="column">a <see cref="T:System.Int32" />, column of the model to get a value from.</param>
<remarks>
The <paramref name="column"/> is the column of the model to get a value from, and the <paramref name="attribute"/> is the
parameter on <paramref name="cell"/> to be set from the value. So for example if column 2
of the model contains strings, you could have the "text" attribute of a
<see cref="T:Gtk.ComboBox"/> get its values from column 2.
</remarks>
</Docs>
</Member>
<Member MemberName="ClearAttributes">
<MemberSignature Language="C#" Value="public virtual void ClearAttributes (Gtk.CellRenderer cell);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="cell" Type="Gtk.CellRenderer" />
</Parameters>
<Docs>
<summary>
Clears all existing attributes previously set with
<see cref="M:Gtk.ComboBox.SetAttributes"/>.
</summary>
<param name="cell">a <see cref="T:Gtk.CellRenderer" /></param>
<remarks></remarks>
</Docs>
</Member>
<Member MemberName="Clear">
<MemberSignature Language="C#" Value="public virtual void Clear ();" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Unsets all the mappings on all renderers for this combo box.</summary>
<remarks></remarks>
</Docs>
</Member>
<Member MemberName="SetCellDataFunc">
<MemberSignature Language="C#" Value="public void SetCellDataFunc (Gtk.CellRenderer renderer, Gtk.CellLayoutDataFunc func);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="renderer" Type="Gtk.CellRenderer" />
<Parameter Name="func" Type="Gtk.CellLayoutDataFunc" />
</Parameters>
<Docs>
<summary>Sets a data function to use for the combo box.</summary>
<param name="renderer">a <see cref="T:Gtk.CellRenderer" /></param>
<param name="func">a <see cref="T:Gtk.CellLayoutDataFunc" /></param>
<remarks>
The data function
is used instead of the standard attributes mapping for setting the
column value, and should set the value of the cell renderer
as appropriate. <paramref name="func"/> may be <see langword="null"/> to remove an older one.
</remarks>
</Docs>
</Member>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="protected ComboBox (GLib.GType gtype);" />
<MemberType>Constructor</MemberType>
<ReturnValue />
<Parameters>
<Parameter Name="gtype" Type="GLib.GType" />
</Parameters>
<Docs>
<summary>Internal constructor</summary>
<param name="gtype">a <see cref="T:GLib.GType" /></param>
<returns>a <see cref="T:Gtk.ComboBox" /></returns>
<remarks />
</Docs>
</Member>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public ComboBox (IntPtr raw);" />
<MemberType>Constructor</MemberType>
<ReturnValue />
<Parameters>
<Parameter Name="raw" Type="System.IntPtr" />
</Parameters>
<Docs>
<summary>Internal constructor</summary>
<param name="raw">a <see cref="T:System.IntPtr" /></param>
<returns>a <see cref="T:Gtk.ComboBox" /></returns>
<remarks />
</Docs>
</Member>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public ComboBox ();" />
<MemberType>Constructor</MemberType>
<ReturnValue />
<Parameters />
<Docs>
<summary>Default constructor</summary>
<returns>a <see cref="T:Gtk.ComboBox" /></returns>
<remarks />
</Docs>
</Member>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public ComboBox (Gtk.TreeModel model);" />
<MemberType>Constructor</MemberType>
<ReturnValue />
<Parameters>
<Parameter Name="model" Type="Gtk.TreeModel" />
</Parameters>
<Docs>
<summary>Creates a new <see cref="T:Gtk.ComboBox" /> that uses <paramref name="model" /></summary>
<param name="model">a <see cref="T:Gtk.TreeModel" /></param>
<returns>a <see cref="T:Gtk.ComboBox" /></returns>
<remarks />
</Docs>
</Member>
<Member MemberName="GType">
<MemberSignature Language="C#" Value="public static GLib.GType GType { get; };" />
<MemberType>Property</MemberType>
<ReturnValue>
<ReturnType>GLib.GType</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>GType Property</summary>
<returns>a <see cref="T:GLib.GType" /></returns>
<remarks>Returns the native GLib.GType value for Combo.</remarks>
</Docs>
</Member>
<Member MemberName="WrapWidth">
<MemberSignature Language="C#" Value="public int WrapWidth { set; get; };" />
<MemberType>Property</MemberType>
<ReturnValue>
<ReturnType>System.Int32</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Wrap width for laying out the items in a grid.</summary>
<returns>a <see cref="T:System.Int32" /></returns>
<remarks>
<para>
Allowed values: &gt;= 0
</para>
<para>
Default value: 0
</para>
</remarks>
</Docs>
</Member>
<Member MemberName="ColumnSpanColumn">
<MemberSignature Language="C#" Value="public int ColumnSpanColumn { set; get; };" />
<MemberType>Property</MemberType>
<ReturnValue>
<ReturnType>System.Int32</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>The column with column span information.</summary>
<returns>a <see cref="T:System.Int32" /></returns>
<remarks>The column span column contains integers which indicate how many columns an item should span.</remarks>
</Docs>
</Member>
<Member MemberName="Active">
<MemberSignature Language="C#" Value="public int Active { set; get; };" />
<MemberType>Property</MemberType>
<ReturnValue>
<ReturnType>System.Int32</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>The index of the currently active item.</summary>
<returns>a <see cref="T:System.Int32" /></returns>
<remarks>-1 if there is no active item.</remarks>
</Docs>
</Member>
<Member MemberName="RowSpanColumn">
<MemberSignature Language="C#" Value="public int RowSpanColumn { set; get; };" />
<MemberType>Property</MemberType>
<ReturnValue>
<ReturnType>System.Int32</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>The column with row span information</summary>
<returns>a <see cref="T:System.Int32" /></returns>
<remarks>The row span column contains integers which indicate how many rows an item should span.</remarks>
</Docs>
</Member>
<Member MemberName="Model">
<MemberSignature Language="C#" Value="public Gtk.TreeModel Model { set; get; };" />
<MemberType>Property</MemberType>
<ReturnValue>
<ReturnType>Gtk.TreeModel</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>The <see cref="T:Gtk.TreeModel" /> which is acting as data source for the <see cref="T:Gtk.ComboBox" />.</summary>
<returns>a <see cref="T:Gtk.TreeModel" /></returns>
<remarks>Will unset a previously set model (if applicable). If model is <see langword="null" />, then it will unset the model.
<block subset="none" type="note">
<para>setting the model does not clear the cell renderers, you have to call <see cref="M:Gtk.ComboBox.Clear()" /> yourself if you need to set up different cell renderers for the new model.
</para>
</block></remarks>
</Docs>
</Member>
<Member MemberName="Changed">
<MemberSignature Language="C#" Value="public event EventHandler Changed;" />
<MemberType>Event</MemberType>
<ReturnValue>
<ReturnType>System.EventHandler</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Emitted when the selected item is changed.</summary>
<remarks />
</Docs>
</Member>
<Member MemberName="SetCellDataFunc">
<MemberSignature Language="C#" Value="public virtual void SetCellDataFunc (Gtk.CellRenderer cell, Gtk.CellLayoutDataFunc func, IntPtr func_data, IntPtr destroy);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="cell" Type="Gtk.CellRenderer" />
<Parameter Name="func" Type="Gtk.CellLayoutDataFunc" />
<Parameter Name="func_data" Type="System.IntPtr" />
<Parameter Name="destroy" Type="System.IntPtr" />
</Parameters>
<Docs>
<summary>Sets a data function to use for the combo box.</summary>
<param name="cell">a <see cref="T:Gtk.CellRenderer" /></param>
<param name="func">a <see cref="T:Gtk.CellLayoutDataFunc" /></param>
<param name="func_data">a <see cref="T:System.IntPtr" /></param>
<param name="destroy">a <see cref="T:System.IntPtr" /></param>
<remarks>
The data function
is used instead of the standard attributes mapping for setting the
column value, and should set the value of the cell renderer
as appropriate. <paramref name="func"/> may be <see langword="null"/> to remove an older one.
</remarks>
</Docs>
</Member>
</Members>
</Type>