mirror of
https://github.com/Ryujinx/GtkSharp.git
synced 2024-12-26 22:35:33 +00:00
a97a5d52fa
* en/Gtk/Combo.xml: add example, update svn path=/trunk/gtk-sharp/; revision=16755
368 lines
14 KiB
XML
368 lines
14 KiB
XML
<Type Name="Combo" FullName="Gtk.Combo">
|
|
<TypeSignature Language="C#" Value="public class Combo : Gtk.HBox, Implementor, IWrapper, IWrapper, IDisposable" Maintainer="John Luke" />
|
|
<AssemblyInfo>
|
|
<AssemblyName>gtk-sharp</AssemblyName>
|
|
<AssemblyVersion>0.0.0.0</AssemblyVersion>
|
|
<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 text entry field with a dropdown list</summary>
|
|
<remarks>
|
|
<para>
|
|
The <see cref="T:Gtk.Combo" /> widget consists of a single-line text entry field and a
|
|
drop-down list. The drop-down list is displayed when the user clicks
|
|
on a small arrow button to the right of the entry field.
|
|
</para>
|
|
<para>
|
|
The drop-down list is a <see cref="T:Glib.List" /> widget and can be accessed using the
|
|
list member of the <see cref="T:Gtk.Combo" />. List elements can contain arbitrary
|
|
widgets, but if an element is not a plain label, then you must use
|
|
the <see cref="M:Glib.List.SetItemString()" /> function. This sets the string which
|
|
will be placed in the text entry field when the item is selected.
|
|
</para>
|
|
<para>
|
|
By default, the user can step through the items in the list using the
|
|
arrow (cursor) keys, though this behaviour can be turned off with
|
|
<see cref="P:Gtk.Combo.UseArrows" /> = <see langword="false" />.
|
|
</para>
|
|
<example>
|
|
<para>
|
|
Creating a <see cref="T:Gtk.Combo" /> widget with simple text items:
|
|
</para>
|
|
<code lang="c#">
|
|
using System;
|
|
using System.Runtime.InteropServices;
|
|
using Gtk;
|
|
using GtkSharp;
|
|
using GLib;
|
|
|
|
class ComboSample
|
|
{
|
|
Combo combo;
|
|
|
|
static void Main ()
|
|
{
|
|
new ComboSample ();
|
|
}
|
|
|
|
ComboSample ()
|
|
{
|
|
Application.Init ();
|
|
|
|
Window win = new Window ("ComboSample");
|
|
win.DeleteEvent += new DeleteEventHandler (OnWinDelete);
|
|
|
|
GLib.List l = new GLib.List (IntPtr.Zero, typeof (string));
|
|
|
|
for (int i =0; i < 5; i++)
|
|
{
|
|
l.Append (Marshal.StringToHGlobalAnsi("String " + i));
|
|
}
|
|
|
|
combo = new Combo ();
|
|
combo.PopdownStrings = l;
|
|
combo.DisableActivate ();
|
|
combo.Entry.Activated += new EventHandler (OnEntryActivated);
|
|
|
|
win.Add (combo);
|
|
|
|
win.ShowAll ();
|
|
Application.Run ();
|
|
}
|
|
|
|
void OnEntryActivated (object o, EventArgs args)
|
|
{
|
|
Console.WriteLine (combo.Entry.Text);
|
|
}
|
|
|
|
void OnWinDelete (object obj, DeleteEventArgs args)
|
|
{
|
|
Application.Quit ();
|
|
}
|
|
}
|
|
</code>
|
|
<para>
|
|
See <see cref="T:GLib.List" /> for more about GLib.List.
|
|
</para>
|
|
</example>
|
|
</remarks>
|
|
</Docs>
|
|
<Base>
|
|
<BaseTypeName>Gtk.HBox</BaseTypeName>
|
|
</Base>
|
|
<Interfaces>
|
|
<Interface>
|
|
<InterfaceName>Atk.Implementor</InterfaceName>
|
|
</Interface>
|
|
<Interface>
|
|
<InterfaceName>GLib.IWrapper</InterfaceName>
|
|
</Interface>
|
|
<Interface>
|
|
<InterfaceName>GLib.IWrapper</InterfaceName>
|
|
</Interface>
|
|
<Interface>
|
|
<InterfaceName>System.IDisposable</InterfaceName>
|
|
</Interface>
|
|
</Interfaces>
|
|
<Attributes />
|
|
<Members>
|
|
<Member MemberName="SetPopdownStrings">
|
|
<MemberSignature Language="C#" Value="public void SetPopdownStrings (string [] args);" />
|
|
<MemberType>Method</MemberType>
|
|
<ReturnValue>
|
|
<ReturnType>System.Void</ReturnType>
|
|
</ReturnValue>
|
|
<Parameters>
|
|
<Parameter Name="args" Type="System.String []" />
|
|
</Parameters>
|
|
<Docs>
|
|
<summary>Convenience function to set all of the items in the popup list.</summary>
|
|
<param name="args">an object of type <see cref="T:System.String" /> []</param>
|
|
<remarks>To be added</remarks>
|
|
</Docs>
|
|
</Member>
|
|
<Member MemberName="SetItemString">
|
|
<MemberSignature Language="C#" Value="public void SetItemString (Gtk.Item item, string item_value);" />
|
|
<MemberType>Method</MemberType>
|
|
<ReturnValue>
|
|
<ReturnType>System.Void</ReturnType>
|
|
</ReturnValue>
|
|
<Parameters>
|
|
<Parameter Name="item" Type="Gtk.Item" />
|
|
<Parameter Name="item_value" Type="System.String" />
|
|
</Parameters>
|
|
<Docs>
|
|
<summary>Sets the string to place in the <see cref="T:Gtk.Entry" /> field when a particular list item is selected.</summary>
|
|
<param name="item">an object of type <see cref="T:Gtk.Item" /></param>
|
|
<param name="item_value">an object of type <see cref="T:System.String" /></param>
|
|
<remarks>This is not needed if the list item is a simple <see cref="T:Gtk.Label" />.</remarks>
|
|
</Docs>
|
|
</Member>
|
|
<Member MemberName="DisableActivate">
|
|
<MemberSignature Language="C#" Value="public void DisableActivate ();" />
|
|
<MemberType>Method</MemberType>
|
|
<ReturnValue>
|
|
<ReturnType>System.Void</ReturnType>
|
|
</ReturnValue>
|
|
<Parameters />
|
|
<Docs>
|
|
<summary>Disables showing the popup list on the activate event.</summary>
|
|
<remarks>Stops the <see cref="T:Gtk.Combo" /> widget from showing the popup list when the <see cref="T:Gtk.Entry" /> emits the <see cref="E:Gtk.Entry.Activate" /> event, i.e. when the Return key is pressed.
|
|
This may be useful if, for example, you want the Return key to close a dialog instead.</remarks>
|
|
</Docs>
|
|
</Member>
|
|
<Member MemberName="Finalize">
|
|
<MemberSignature Language="C#" Value="protected virtual 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=".ctor">
|
|
<MemberSignature Language="C#" Value="public Combo (IntPtr raw);" />
|
|
<MemberType>Constructor</MemberType>
|
|
<ReturnValue />
|
|
<Parameters>
|
|
<Parameter Name="raw" Type="System.IntPtr" />
|
|
</Parameters>
|
|
<Docs>
|
|
<summary>Internal constructor</summary>
|
|
<param name="raw">Pointer to the C object.</param>
|
|
<returns>An instance of <see cref="T:Gtk.Combo" />, wrapping the C object.</returns>
|
|
<remarks>
|
|
<para>This is an internal constructor, and should not be used by user code.</para>
|
|
</remarks>
|
|
</Docs>
|
|
</Member>
|
|
<Member MemberName=".ctor">
|
|
<MemberSignature Language="C#" Value="public Combo ();" />
|
|
<MemberType>Constructor</MemberType>
|
|
<ReturnValue />
|
|
<Parameters />
|
|
<Docs>
|
|
<summary>Creates a new <see cref="T:Gtk.Combo" />.</summary>
|
|
<returns>an object of type <see cref="T:Gtk.Combo" /></returns>
|
|
<remarks>This is the default contructor for <see cref="T:Gtk.Combo" /></remarks>
|
|
</Docs>
|
|
</Member>
|
|
<Member MemberName="GType">
|
|
<MemberSignature Language="C#" Value="public static uint GType { get; };" />
|
|
<MemberType>Property</MemberType>
|
|
<ReturnValue>
|
|
<ReturnType>System.UInt32</ReturnType>
|
|
</ReturnValue>
|
|
<Docs>
|
|
<summary>The <see cref="T:GLib.Type" /> for <see cref="T:Gtk.Combo" /></summary>
|
|
<returns>The <see cref="T:GLib.Type" /> for the <see cref="T:Gtk.Combo" /> class.</returns>
|
|
<remarks />
|
|
</Docs>
|
|
</Member>
|
|
<Member MemberName="Button">
|
|
<MemberSignature Language="C#" Value="public Gtk.Button Button { get; };" />
|
|
<MemberType>Property</MemberType>
|
|
<ReturnValue>
|
|
<ReturnType>Gtk.Button</ReturnType>
|
|
</ReturnValue>
|
|
<Docs>
|
|
<summary>The <see cref="T:Gtk.Button" /> asociated with the <see cref="T:Gtk.Combo" />.</summary>
|
|
<returns>an object of type <see cref="T:Gtk.Button" /></returns>
|
|
<remarks></remarks>
|
|
</Docs>
|
|
</Member>
|
|
<Member MemberName="Entry">
|
|
<MemberSignature Language="C#" Value="public Gtk.Entry Entry { get; };" />
|
|
<MemberType>Property</MemberType>
|
|
<ReturnValue>
|
|
<ReturnType>Gtk.Entry</ReturnType>
|
|
</ReturnValue>
|
|
<Docs>
|
|
<summary>The <see cref="T:Gtk.Entry" /> asociated with the <see cref="T:Gtk.Combo" />.</summary>
|
|
<returns>an object of type <see cref="T:Gtk.Entry" /></returns>
|
|
<remarks></remarks>
|
|
</Docs>
|
|
</Member>
|
|
<Member MemberName="PopdownStrings">
|
|
<MemberSignature Language="C#" Value="public GLib.List PopdownStrings { set; };" />
|
|
<MemberType>Property</MemberType>
|
|
<ReturnValue>
|
|
<ReturnType>GLib.List</ReturnType>
|
|
</ReturnValue>
|
|
<Parameters></Parameters>
|
|
<Docs>
|
|
<summary>Property to set all of the items in the popup list.</summary>
|
|
<param name="value">an object of type <see cref="T:GLib.List" /></param>
|
|
<returns>an object of type <see cref="T:GLib.List" /></returns>
|
|
<remarks></remarks>
|
|
</Docs>
|
|
</Member>
|
|
<Member MemberName="UseArrowsAlways">
|
|
<MemberSignature Language="C#" Value="public bool UseArrowsAlways { set; };" />
|
|
<MemberType>Property</MemberType>
|
|
<ReturnValue>
|
|
<ReturnType>System.Boolean</ReturnType>
|
|
</ReturnValue>
|
|
<Parameters></Parameters>
|
|
<Docs>
|
|
<summary>Does nothing. ---- To get out ----</summary>
|
|
<param name="value">To be added: an object of type 'bool'</param>
|
|
<returns>To be added: an object of type 'bool'</returns>
|
|
<remarks>To be added</remarks>
|
|
</Docs>
|
|
</Member>
|
|
<Member MemberName="UseArrows">
|
|
<MemberSignature Language="C#" Value="public bool UseArrows { set; };" />
|
|
<MemberType>Property</MemberType>
|
|
<ReturnValue>
|
|
<ReturnType>System.Boolean</ReturnType>
|
|
</ReturnValue>
|
|
<Parameters></Parameters>
|
|
<Docs>
|
|
<summary>Specifies if the arrow (cursor) keys can be used to step through the items in the list.</summary>
|
|
<param name="value">an object of type <see cref="T:Gtk.Boolean" /></param>
|
|
<returns>
|
|
<see langword="true" /> if the arrow keys can be used to step through the items in the list.</returns>
|
|
<remarks>This is on by default.</remarks>
|
|
</Docs>
|
|
</Member>
|
|
<Member MemberName="EnableArrowsAlways">
|
|
<MemberSignature Language="C#" Value="public bool EnableArrowsAlways { set; get; };" />
|
|
<MemberType>Property</MemberType>
|
|
<ReturnValue>
|
|
<ReturnType>System.Boolean</ReturnType>
|
|
</ReturnValue>
|
|
<Parameters></Parameters>
|
|
<Docs>
|
|
<summary>To be added</summary>
|
|
<param name="value">To be added: an object of type 'bool'</param>
|
|
<returns>To be added: an object of type 'bool'</returns>
|
|
<remarks>To be added</remarks>
|
|
</Docs>
|
|
</Member>
|
|
<Member MemberName="ValueInList">
|
|
<MemberSignature Language="C#" Value="public bool ValueInList { set; get; };" />
|
|
<MemberType>Property</MemberType>
|
|
<ReturnValue>
|
|
<ReturnType>System.Boolean</ReturnType>
|
|
</ReturnValue>
|
|
<Parameters></Parameters>
|
|
<Docs>
|
|
<summary>Specifies whether the value entered in the text entry field must match one of the values in the list.</summary>
|
|
<param name="value">
|
|
<see langword="true" /> if the value entered must match one of the values in the list.</param>
|
|
<returns>
|
|
<see langword="true" /> if the value entered must match one of the values in the list.</returns>
|
|
<remarks>If this is set then the user will not be able to perform any other action until a valid value has been entered.</remarks>
|
|
</Docs>
|
|
</Member>
|
|
<Member MemberName="AllowEmpty">
|
|
<MemberSignature Language="C#" Value="public bool AllowEmpty { set; get; };" />
|
|
<MemberType>Property</MemberType>
|
|
<ReturnValue>
|
|
<ReturnType>System.Boolean</ReturnType>
|
|
</ReturnValue>
|
|
<Parameters></Parameters>
|
|
<Docs>
|
|
<summary>Specifies if an empty field is acceptable.</summary>
|
|
<param name="value">
|
|
<see langword="true" /> if an empty value is considered valid.</param>
|
|
<returns>
|
|
<see langword="true" /> if an empty value is considered valid.</returns>
|
|
<remarks>To be added</remarks>
|
|
</Docs>
|
|
</Member>
|
|
<Member MemberName="EnableArrowKeys">
|
|
<MemberSignature Language="C#" Value="public bool EnableArrowKeys { set; get; };" />
|
|
<MemberType>Property</MemberType>
|
|
<ReturnValue>
|
|
<ReturnType>System.Boolean</ReturnType>
|
|
</ReturnValue>
|
|
<Parameters></Parameters>
|
|
<Docs>
|
|
<summary>Specifies if the arrow (cursor) keys can be used to step through the items in the list.</summary>
|
|
<param name="value">
|
|
<see langword="true" /> if the arrow keys can be used to step through the items in the list.</param>
|
|
<returns>
|
|
<see langword="true" /> if the arrow keys can be used to step through the items in the list.</returns>
|
|
<remarks>This is <see langword="true" /> by default.</remarks>
|
|
</Docs>
|
|
</Member>
|
|
<Member MemberName="CaseSensitive">
|
|
<MemberSignature Language="C#" Value="public bool CaseSensitive { set; get; };" />
|
|
<MemberType>Property</MemberType>
|
|
<ReturnValue>
|
|
<ReturnType>System.Boolean</ReturnType>
|
|
</ReturnValue>
|
|
<Parameters></Parameters>
|
|
<Docs>
|
|
<summary>Specifies whether the text entered into the <see cref="T:Gtk.Entry" /> field and the text in the list items is case sensitive.</summary>
|
|
<param name="value">
|
|
<see langword="true" /> if the text in the list items is case sensitive.</param>
|
|
<returns>
|
|
<see langword="true" /> if the text in the list items is case sensitive.</returns>
|
|
<remarks>This may be useful, for example, when you have set true ValueInList to limit the values entered, but you are not worried about differences in case.</remarks>
|
|
</Docs>
|
|
</Member>
|
|
<Member MemberName=".ctor">
|
|
<MemberSignature Language="C#" Value="protected Combo (GLib.Type gtype);" />
|
|
<MemberType>Constructor</MemberType>
|
|
<ReturnValue />
|
|
<Parameters>
|
|
<Parameter Name="gtype" Type="GLib.Type" />
|
|
</Parameters>
|
|
<Docs>
|
|
<summary>Internal constructor</summary>
|
|
<param name="gtype">GLib type for the type</param>
|
|
<returns>Creates a new instance of Combo, using the GLib-provided type</returns>
|
|
<remarks>
|
|
<para>This is a constructor used by derivative types of <see cref="T:Gtk.Combo" /> that would have their own GLib type assigned to it. This is not typically used by C# code.</para>
|
|
</remarks>
|
|
</Docs>
|
|
</Member>
|
|
</Members>
|
|
</Type> |