2003-07-27 John Luke <jluke@cfl.rr.com>
* en/Gtk/Combo.xml: add example, update svn path=/trunk/gtk-sharp/; revision=16755
This commit is contained in:
parent
4fe4e95204
commit
a97a5d52fa
2 changed files with 123 additions and 79 deletions
|
@ -1,6 +1,7 @@
|
||||||
2003-07-27 John Luke <jluke@cfl.rr.com>
|
2003-07-27 John Luke <jluke@cfl.rr.com>
|
||||||
|
|
||||||
* en/Gtk/CheckButton.xml: add small example, update
|
* en/Gtk/CheckButton.xml: add small example, update
|
||||||
|
* en/Gtk/Combo.xml: add example, update
|
||||||
|
|
||||||
* en/Gtk/TreeModelFlags.xml:
|
* en/Gtk/TreeModelFlags.xml:
|
||||||
* en/Gtk/RcFlags.xml: more documentation from
|
* en/Gtk/RcFlags.xml: more documentation from
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<Type Name="Combo" FullName="Gtk.Combo">
|
<Type Name="Combo" FullName="Gtk.Combo">
|
||||||
<TypeSignature Language="C#" Value="public class Combo : Gtk.HBox, Implementor, IWrapper, IWrapper, IDisposable" Maintainer="auto" />
|
<TypeSignature Language="C#" Value="public class Combo : Gtk.HBox, Implementor, IWrapper, IWrapper, IDisposable" Maintainer="John Luke" />
|
||||||
<AssemblyInfo>
|
<AssemblyInfo>
|
||||||
<AssemblyName>gtk-sharp</AssemblyName>
|
<AssemblyName>gtk-sharp</AssemblyName>
|
||||||
<AssemblyVersion>0.0.0.0</AssemblyVersion>
|
<AssemblyVersion>0.0.0.0</AssemblyVersion>
|
||||||
|
@ -10,35 +10,76 @@
|
||||||
<summary>A text entry field with a dropdown list</summary>
|
<summary>A text entry field with a dropdown list</summary>
|
||||||
<remarks>
|
<remarks>
|
||||||
<para>
|
<para>
|
||||||
The GtkCombo widget consists of a single-line text entry field and a
|
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
|
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.
|
on a small arrow button to the right of the entry field.
|
||||||
</para>
|
</para>
|
||||||
<para>
|
<para>
|
||||||
The drop-down list is a GtkList widget and can be accessed using the
|
The drop-down list is a <see cref="T:Glib.List" /> widget and can be accessed using the
|
||||||
list member of the GtkCombo. List elements can contain arbitrary
|
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
|
widgets, but if an element is not a plain label, then you must use
|
||||||
the gtk_list_set_item_string() function. This sets the string which
|
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.
|
will be placed in the text entry field when the item is selected.
|
||||||
</para>
|
</para>
|
||||||
<para>
|
<para>
|
||||||
By default, the user can step through the items in the list using the
|
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
|
arrow (cursor) keys, though this behaviour can be turned off with
|
||||||
gtk_combo_set_use_arrows().
|
<see cref="P:Gtk.Combo.UseArrows" /> = <see langword="false" />.
|
||||||
</para>
|
</para>
|
||||||
<example>
|
<example>
|
||||||
<para>
|
<para>
|
||||||
Creating a GtkCombo widget with simple text items:
|
Creating a <see cref="T:Gtk.Combo" /> widget with simple text items:
|
||||||
</para>
|
</para>
|
||||||
<code lang="c#">
|
<code lang="c#">
|
||||||
Gtk.Combo MakeCombo () {
|
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));
|
GLib.List l = new GLib.List (IntPtr.Zero, typeof (string));
|
||||||
l.Append(Marshal.StringToHGlobalAnsi("String 1"));
|
|
||||||
l.Append(Marshal.StringToHGlobalAnsi("String 2"));
|
for (int i =0; i < 5; i++)
|
||||||
Gtk.Combo combo = new Gtk.Combo
|
{
|
||||||
(new GLib.Type((uint)TypeFundamentals.TypeString));
|
l.Append (Marshal.StringToHGlobalAnsi("String " + i));
|
||||||
|
}
|
||||||
|
|
||||||
|
combo = new Combo ();
|
||||||
combo.PopdownStrings = l;
|
combo.PopdownStrings = l;
|
||||||
return combo;
|
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>
|
</code>
|
||||||
<para>
|
<para>
|
||||||
|
@ -77,7 +118,7 @@
|
||||||
</Parameters>
|
</Parameters>
|
||||||
<Docs>
|
<Docs>
|
||||||
<summary>Convenience function to set all of the items in the popup list.</summary>
|
<summary>Convenience function to set all of the items in the popup list.</summary>
|
||||||
<param name="args">To be added: an object of type 'string []'</param>
|
<param name="args">an object of type <see cref="T:System.String" /> []</param>
|
||||||
<remarks>To be added</remarks>
|
<remarks>To be added</remarks>
|
||||||
</Docs>
|
</Docs>
|
||||||
</Member>
|
</Member>
|
||||||
|
@ -92,10 +133,10 @@
|
||||||
<Parameter Name="item_value" Type="System.String" />
|
<Parameter Name="item_value" Type="System.String" />
|
||||||
</Parameters>
|
</Parameters>
|
||||||
<Docs>
|
<Docs>
|
||||||
<summary>Sets the string to place in the Gtk.Entry field when a particular list item is selected. This is needed if the list item is not a simple label.</summary>
|
<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">To be added: an object of type 'Gtk.Item'</param>
|
<param name="item">an object of type <see cref="T:Gtk.Item" /></param>
|
||||||
<param name="item_value">To be added: an object of type 'string'</param>
|
<param name="item_value">an object of type <see cref="T:System.String" /></param>
|
||||||
<remarks>To be added</remarks>
|
<remarks>This is not needed if the list item is a simple <see cref="T:Gtk.Label" />.</remarks>
|
||||||
</Docs>
|
</Docs>
|
||||||
</Member>
|
</Member>
|
||||||
<Member MemberName="DisableActivate">
|
<Member MemberName="DisableActivate">
|
||||||
|
@ -106,8 +147,9 @@
|
||||||
</ReturnValue>
|
</ReturnValue>
|
||||||
<Parameters />
|
<Parameters />
|
||||||
<Docs>
|
<Docs>
|
||||||
<summary>Stops the Gtk.Combo widget from showing the popup list when the Gtk.Entry emits the "activate" signal, 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.</summary>
|
<summary>Disables showing the popup list on the activate event.</summary>
|
||||||
<remarks>To be added</remarks>
|
<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>
|
</Docs>
|
||||||
</Member>
|
</Member>
|
||||||
<Member MemberName="Finalize">
|
<Member MemberName="Finalize">
|
||||||
|
@ -132,7 +174,7 @@
|
||||||
<Docs>
|
<Docs>
|
||||||
<summary>Internal constructor</summary>
|
<summary>Internal constructor</summary>
|
||||||
<param name="raw">Pointer to the C object.</param>
|
<param name="raw">Pointer to the C object.</param>
|
||||||
<returns>An instance of Combo, wrapping the C object.</returns>
|
<returns>An instance of <see cref="T:Gtk.Combo" />, wrapping the C object.</returns>
|
||||||
<remarks>
|
<remarks>
|
||||||
<para>This is an internal constructor, and should not be used by user code.</para>
|
<para>This is an internal constructor, and should not be used by user code.</para>
|
||||||
</remarks>
|
</remarks>
|
||||||
|
@ -144,9 +186,9 @@
|
||||||
<ReturnValue />
|
<ReturnValue />
|
||||||
<Parameters />
|
<Parameters />
|
||||||
<Docs>
|
<Docs>
|
||||||
<summary>Creates a new Combo.</summary>
|
<summary>Creates a new <see cref="T:Gtk.Combo" />.</summary>
|
||||||
<returns>To be added: an object of type 'Gtk.Combo'</returns>
|
<returns>an object of type <see cref="T:Gtk.Combo" /></returns>
|
||||||
<remarks>To be added</remarks>
|
<remarks>This is the default contructor for <see cref="T:Gtk.Combo" /></remarks>
|
||||||
</Docs>
|
</Docs>
|
||||||
</Member>
|
</Member>
|
||||||
<Member MemberName="GType">
|
<Member MemberName="GType">
|
||||||
|
@ -156,8 +198,8 @@
|
||||||
<ReturnType>System.UInt32</ReturnType>
|
<ReturnType>System.UInt32</ReturnType>
|
||||||
</ReturnValue>
|
</ReturnValue>
|
||||||
<Docs>
|
<Docs>
|
||||||
<summary>The GLib Type for Gtk.Combo</summary>
|
<summary>The <see cref="T:GLib.Type" /> for <see cref="T:Gtk.Combo" /></summary>
|
||||||
<returns>The GLib Type for the Gtk.Combo class.</returns>
|
<returns>The <see cref="T:GLib.Type" /> for the <see cref="T:Gtk.Combo" /> class.</returns>
|
||||||
<remarks />
|
<remarks />
|
||||||
</Docs>
|
</Docs>
|
||||||
</Member>
|
</Member>
|
||||||
|
@ -168,9 +210,9 @@
|
||||||
<ReturnType>Gtk.Button</ReturnType>
|
<ReturnType>Gtk.Button</ReturnType>
|
||||||
</ReturnValue>
|
</ReturnValue>
|
||||||
<Docs>
|
<Docs>
|
||||||
<summary>The Button asociated with the Combo.</summary>
|
<summary>The <see cref="T:Gtk.Button" /> asociated with the <see cref="T:Gtk.Combo" />.</summary>
|
||||||
<returns>To be added: an object of type 'Gtk.Button'</returns>
|
<returns>an object of type <see cref="T:Gtk.Button" /></returns>
|
||||||
<remarks>To be added</remarks>
|
<remarks></remarks>
|
||||||
</Docs>
|
</Docs>
|
||||||
</Member>
|
</Member>
|
||||||
<Member MemberName="Entry">
|
<Member MemberName="Entry">
|
||||||
|
@ -180,9 +222,9 @@
|
||||||
<ReturnType>Gtk.Entry</ReturnType>
|
<ReturnType>Gtk.Entry</ReturnType>
|
||||||
</ReturnValue>
|
</ReturnValue>
|
||||||
<Docs>
|
<Docs>
|
||||||
<summary>The Entry asociated with the Combo.</summary>
|
<summary>The <see cref="T:Gtk.Entry" /> asociated with the <see cref="T:Gtk.Combo" />.</summary>
|
||||||
<returns>To be added: an object of type 'Gtk.Entry'</returns>
|
<returns>an object of type <see cref="T:Gtk.Entry" /></returns>
|
||||||
<remarks>To be added</remarks>
|
<remarks></remarks>
|
||||||
</Docs>
|
</Docs>
|
||||||
</Member>
|
</Member>
|
||||||
<Member MemberName="PopdownStrings">
|
<Member MemberName="PopdownStrings">
|
||||||
|
@ -191,13 +233,12 @@
|
||||||
<ReturnValue>
|
<ReturnValue>
|
||||||
<ReturnType>GLib.List</ReturnType>
|
<ReturnType>GLib.List</ReturnType>
|
||||||
</ReturnValue>
|
</ReturnValue>
|
||||||
<Parameters>
|
<Parameters></Parameters>
|
||||||
</Parameters>
|
|
||||||
<Docs>
|
<Docs>
|
||||||
<summary>Property to set all of the items in the popup list.</summary>
|
<summary>Property to set all of the items in the popup list.</summary>
|
||||||
<param name="value">To be added: an object of type 'GLib.List'</param>
|
<param name="value">an object of type <see cref="T:GLib.List" /></param>
|
||||||
<returns>To be added: an object of type 'GLib.List'</returns>
|
<returns>an object of type <see cref="T:GLib.List" /></returns>
|
||||||
<remarks>To be added</remarks>
|
<remarks></remarks>
|
||||||
</Docs>
|
</Docs>
|
||||||
</Member>
|
</Member>
|
||||||
<Member MemberName="UseArrowsAlways">
|
<Member MemberName="UseArrowsAlways">
|
||||||
|
@ -206,8 +247,7 @@
|
||||||
<ReturnValue>
|
<ReturnValue>
|
||||||
<ReturnType>System.Boolean</ReturnType>
|
<ReturnType>System.Boolean</ReturnType>
|
||||||
</ReturnValue>
|
</ReturnValue>
|
||||||
<Parameters>
|
<Parameters></Parameters>
|
||||||
</Parameters>
|
|
||||||
<Docs>
|
<Docs>
|
||||||
<summary>Does nothing. ---- To get out ----</summary>
|
<summary>Does nothing. ---- To get out ----</summary>
|
||||||
<param name="value">To be added: an object of type 'bool'</param>
|
<param name="value">To be added: an object of type 'bool'</param>
|
||||||
|
@ -221,12 +261,12 @@
|
||||||
<ReturnValue>
|
<ReturnValue>
|
||||||
<ReturnType>System.Boolean</ReturnType>
|
<ReturnType>System.Boolean</ReturnType>
|
||||||
</ReturnValue>
|
</ReturnValue>
|
||||||
<Parameters>
|
<Parameters></Parameters>
|
||||||
</Parameters>
|
|
||||||
<Docs>
|
<Docs>
|
||||||
<summary>Specifies if the arrow (cursor) keys can be used to step through the items in the list.</summary>
|
<summary>Specifies if the arrow (cursor) keys can be used to step through the items in the list.</summary>
|
||||||
<param name="value">To be added: an object of type 'bool'</param>
|
<param name="value">an object of type <see cref="T:Gtk.Boolean" /></param>
|
||||||
<returns>TRUE if the arrow keys can be used to step through the items in the list.</returns>
|
<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>
|
<remarks>This is on by default.</remarks>
|
||||||
</Docs>
|
</Docs>
|
||||||
</Member>
|
</Member>
|
||||||
|
@ -236,8 +276,7 @@
|
||||||
<ReturnValue>
|
<ReturnValue>
|
||||||
<ReturnType>System.Boolean</ReturnType>
|
<ReturnType>System.Boolean</ReturnType>
|
||||||
</ReturnValue>
|
</ReturnValue>
|
||||||
<Parameters>
|
<Parameters></Parameters>
|
||||||
</Parameters>
|
|
||||||
<Docs>
|
<Docs>
|
||||||
<summary>To be added</summary>
|
<summary>To be added</summary>
|
||||||
<param name="value">To be added: an object of type 'bool'</param>
|
<param name="value">To be added: an object of type 'bool'</param>
|
||||||
|
@ -251,13 +290,14 @@
|
||||||
<ReturnValue>
|
<ReturnValue>
|
||||||
<ReturnType>System.Boolean</ReturnType>
|
<ReturnType>System.Boolean</ReturnType>
|
||||||
</ReturnValue>
|
</ReturnValue>
|
||||||
<Parameters>
|
<Parameters></Parameters>
|
||||||
</Parameters>
|
|
||||||
<Docs>
|
<Docs>
|
||||||
<summary>Specifies whether the value entered in the text entry field must match one of the values in the list. If this is set then the user will not be able to perform any other action until a valid value has been entered.</summary>
|
<summary>Specifies whether the value entered in the text entry field must match one of the values in the list.</summary>
|
||||||
<param name="value">TRUE if the value entered must match one of the values in the list.</param>
|
<param name="value">
|
||||||
<returns>TRUE if the value entered must match one of the values in the list.</returns>
|
<see langword="true" /> if the value entered must match one of the values in the list.</param>
|
||||||
<remarks>To be added</remarks>
|
<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>
|
</Docs>
|
||||||
</Member>
|
</Member>
|
||||||
<Member MemberName="AllowEmpty">
|
<Member MemberName="AllowEmpty">
|
||||||
|
@ -266,12 +306,13 @@
|
||||||
<ReturnValue>
|
<ReturnValue>
|
||||||
<ReturnType>System.Boolean</ReturnType>
|
<ReturnType>System.Boolean</ReturnType>
|
||||||
</ReturnValue>
|
</ReturnValue>
|
||||||
<Parameters>
|
<Parameters></Parameters>
|
||||||
</Parameters>
|
|
||||||
<Docs>
|
<Docs>
|
||||||
<summary>Specifies if an empty field is acceptable.</summary>
|
<summary>Specifies if an empty field is acceptable.</summary>
|
||||||
<param name="value">TRUE if an empty value is considered valid.</param>
|
<param name="value">
|
||||||
<returns>TRUE if an empty value is considered valid.</returns>
|
<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>
|
<remarks>To be added</remarks>
|
||||||
</Docs>
|
</Docs>
|
||||||
</Member>
|
</Member>
|
||||||
|
@ -281,13 +322,14 @@
|
||||||
<ReturnValue>
|
<ReturnValue>
|
||||||
<ReturnType>System.Boolean</ReturnType>
|
<ReturnType>System.Boolean</ReturnType>
|
||||||
</ReturnValue>
|
</ReturnValue>
|
||||||
<Parameters>
|
<Parameters></Parameters>
|
||||||
</Parameters>
|
|
||||||
<Docs>
|
<Docs>
|
||||||
<summary>Specifies if the arrow (cursor) keys can be used to step through the items in the list. This is true by default.</summary>
|
<summary>Specifies if the arrow (cursor) keys can be used to step through the items in the list.</summary>
|
||||||
<param name="value">TRUE if the arrow keys can be used to step through the items in the list.</param>
|
<param name="value">
|
||||||
<returns>TRUE if the arrow keys can be used to step through the items in the list.</returns>
|
<see langword="true" /> if the arrow keys can be used to step through the items in the list.</param>
|
||||||
<remarks>To be added</remarks>
|
<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>
|
</Docs>
|
||||||
</Member>
|
</Member>
|
||||||
<Member MemberName="CaseSensitive">
|
<Member MemberName="CaseSensitive">
|
||||||
|
@ -296,12 +338,13 @@
|
||||||
<ReturnValue>
|
<ReturnValue>
|
||||||
<ReturnType>System.Boolean</ReturnType>
|
<ReturnType>System.Boolean</ReturnType>
|
||||||
</ReturnValue>
|
</ReturnValue>
|
||||||
<Parameters>
|
<Parameters></Parameters>
|
||||||
</Parameters>
|
|
||||||
<Docs>
|
<Docs>
|
||||||
<summary>Specifies whether the text entered into the Entry field and the text in the list items is case sensitive.</summary>
|
<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">TRUE if the text in the list items is case sensitive.</param>
|
<param name="value">
|
||||||
<returns>TRUE if the text in the list items is case sensitive.</returns>
|
<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>
|
<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>
|
</Docs>
|
||||||
</Member>
|
</Member>
|
||||||
|
|
Loading…
Add table
Reference in a new issue