2003-07-18 John Luke <jluke@cfl.rr.com>
* en/Gtk/OptionMenu.xml: documented svn path=/trunk/gtk-sharp/; revision=16436
This commit is contained in:
parent
0fed7fdad3
commit
9127f33329
2 changed files with 96 additions and 23 deletions
|
@ -1,3 +1,7 @@
|
||||||
|
2003-07-18 John Luke <jluke@cfl.rr.com>
|
||||||
|
|
||||||
|
* en/Gtk/OptionMenu.xml: documented
|
||||||
|
|
||||||
2003-07-18 John Luke <jluke@cfl.rr.com>
|
2003-07-18 John Luke <jluke@cfl.rr.com>
|
||||||
|
|
||||||
* en/Gtk/TreeView.xml: add TreeViewDemo example
|
* en/Gtk/TreeView.xml: add TreeViewDemo example
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<Type Name="OptionMenu" FullName="Gtk.OptionMenu">
|
<Type Name="OptionMenu" FullName="Gtk.OptionMenu">
|
||||||
<TypeSignature Language="C#" Value="public class OptionMenu : Gtk.Button, Implementor, IWrapper, IWrapper, IDisposable" Maintainer="auto" />
|
<TypeSignature Language="C#" Value="public class OptionMenu : Gtk.Button, 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>
|
||||||
|
@ -7,8 +7,77 @@
|
||||||
</AssemblyInfo>
|
</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>
|
<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>
|
<Docs>
|
||||||
<summary>To be added</summary>
|
<summary>A widget used to choose from a list of valid choices.</summary>
|
||||||
<remarks>To be added</remarks>
|
<remarks>
|
||||||
|
<para>
|
||||||
|
A <see cref="T:Gtk.OptionMenu"/> is a widget that allows the user to choose from a list of valid choices.
|
||||||
|
The <see cref="T:Gtk.OptionMenu"/> displays the selected choice.
|
||||||
|
When activated the <see cref="T:Gtk.OptionMenu"/> displays a popup <see cref="T:Gtk.Menu"/> which allows the user to make a new choice.
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
Using a <see cref="T:Gtk.OptionMenu"/> is simple; build a <see cref="T:Gtk.Menu"/>, by calling <see cref="C:Gtk.Menu()"/>, then appending <see cref="T:Gtk.MenuItem"/>s to it with <see cref="M:Gtk.MenuShell.Append()"/>.
|
||||||
|
Set that menu on the <see cref="T:Gtk.OptionMenu"/> with <see cref="P:Gtk.OptionMenu.Menu"/>.
|
||||||
|
Set the selected <see cref="T:Gtk.MenuItem"/> with <see cref="M:Gtk.OptionMenu.SetHistory(System.UInt32)"/>; connect to the event <see cref="E:Gtk.OptionMenu.Changed"/>; when the <see cref="E:Gtk.OptionMenu.Changed"/> event occurs, check the new selected <see cref="T:Gtk.MenuItem"/> with <see cref="P:Gtk.OptionMenu.History"/>.
|
||||||
|
</para>
|
||||||
|
</remarks>
|
||||||
|
<example>
|
||||||
|
<code language="C#">
|
||||||
|
using System;
|
||||||
|
using Gtk;
|
||||||
|
using GtkSharp;
|
||||||
|
|
||||||
|
class OptionMenuSample
|
||||||
|
{
|
||||||
|
OptionMenu opt;
|
||||||
|
|
||||||
|
static void Main ()
|
||||||
|
{
|
||||||
|
new OptionMenuSample ();
|
||||||
|
}
|
||||||
|
|
||||||
|
OptionMenuSample ()
|
||||||
|
{
|
||||||
|
Application.Init ();
|
||||||
|
|
||||||
|
Window win = new Window ("OptionMenuSample");
|
||||||
|
win.DeleteEvent += new DeleteEventHandler (OnWinDelete);
|
||||||
|
|
||||||
|
// set up the OptionMenu
|
||||||
|
opt = new OptionMenu ();
|
||||||
|
opt.Changed += new EventHandler (OnOptionChanged);
|
||||||
|
Menu m = new Menu ();
|
||||||
|
MenuItem miOne = new MenuItem ("One");
|
||||||
|
m.Append (miOne);
|
||||||
|
MenuItem miTwo = new MenuItem ("Two");
|
||||||
|
m.Append (miTwo);
|
||||||
|
MenuItem miThree = new MenuItem ("Three");
|
||||||
|
m.Append (miThree);
|
||||||
|
|
||||||
|
// add children widgets to their parents
|
||||||
|
opt.Menu = m;
|
||||||
|
win.Add (opt);
|
||||||
|
|
||||||
|
|
||||||
|
// set the OptionMenu to a value
|
||||||
|
opt.SetHistory (2);
|
||||||
|
|
||||||
|
win.ShowAll ();
|
||||||
|
|
||||||
|
Application.Run ();
|
||||||
|
}
|
||||||
|
|
||||||
|
void OnOptionChanged (object o, EventArgs args)
|
||||||
|
{
|
||||||
|
Console.WriteLine (opt.History);
|
||||||
|
}
|
||||||
|
|
||||||
|
void OnWinDelete (object o, DeleteEventArgs args)
|
||||||
|
{
|
||||||
|
Application.Quit ();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</code>
|
||||||
|
</example>
|
||||||
</Docs>
|
</Docs>
|
||||||
<Base>
|
<Base>
|
||||||
<BaseTypeName>Gtk.Button</BaseTypeName>
|
<BaseTypeName>Gtk.Button</BaseTypeName>
|
||||||
|
@ -37,8 +106,8 @@
|
||||||
</ReturnValue>
|
</ReturnValue>
|
||||||
<Parameters />
|
<Parameters />
|
||||||
<Docs>
|
<Docs>
|
||||||
<summary>To be added</summary>
|
<summary>Removes the menu from the <see cref="T:Gtk.OptionMenu"/>.</summary>
|
||||||
<remarks>To be added</remarks>
|
<remarks />
|
||||||
</Docs>
|
</Docs>
|
||||||
</Member>
|
</Member>
|
||||||
<Member MemberName="Finalize">
|
<Member MemberName="Finalize">
|
||||||
|
@ -63,7 +132,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 OptionMenu, wrapping the C object.</returns>
|
<returns>An instance of <see cref="T:Gtk.OptionMenu"/>, 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>
|
||||||
|
@ -75,9 +144,9 @@
|
||||||
<ReturnValue />
|
<ReturnValue />
|
||||||
<Parameters />
|
<Parameters />
|
||||||
<Docs>
|
<Docs>
|
||||||
<summary>To be added</summary>
|
<summary>Creates a new <see cref="T:Gtk.OptionMenu"/></summary>
|
||||||
<returns>To be added: an object of type 'Gtk.OptionMenu'</returns>
|
<returns>an object of type <see cref="T:Gtk.OptionMenu"/></returns>
|
||||||
<remarks>To be added</remarks>
|
<remarks>This is the default constructor for <see cref="T:Gtk.OptionMenu"/></remarks>
|
||||||
</Docs>
|
</Docs>
|
||||||
</Member>
|
</Member>
|
||||||
<Member MemberName="GType">
|
<Member MemberName="GType">
|
||||||
|
@ -87,8 +156,8 @@
|
||||||
<ReturnType>System.UInt32</ReturnType>
|
<ReturnType>System.UInt32</ReturnType>
|
||||||
</ReturnValue>
|
</ReturnValue>
|
||||||
<Docs>
|
<Docs>
|
||||||
<summary>The GLib Type for Gtk.OptionMenu</summary>
|
<summary>The <see cref="T:GLib.Type"/> for <see cref="T:Gtk.OptionMenu"/></summary>
|
||||||
<returns>The GLib Type for the Gtk.OptionMenu class.</returns>
|
<returns>The <see cref="T:GLib.Type"/> for the <see cref="T:Gtk.OptionMenu"/> class.</returns>
|
||||||
<remarks />
|
<remarks />
|
||||||
</Docs>
|
</Docs>
|
||||||
</Member>
|
</Member>
|
||||||
|
@ -99,9 +168,9 @@
|
||||||
<ReturnType>System.Int32</ReturnType>
|
<ReturnType>System.Int32</ReturnType>
|
||||||
</ReturnValue>
|
</ReturnValue>
|
||||||
<Docs>
|
<Docs>
|
||||||
<summary>To be added</summary>
|
<summary>Retrieves the index of the currently selected <see cref="T:Gtk.MenuItem"/>.</summary>
|
||||||
<returns>To be added: an object of type 'int'</returns>
|
<returns>an object of type <see cref="T:System.Int32"/></returns>
|
||||||
<remarks>To be added</remarks>
|
<remarks>The <see cref="T:Gtk.MenuItem"/>s are numbered from top to bottom, starting with 0.</remarks>
|
||||||
</Docs>
|
</Docs>
|
||||||
</Member>
|
</Member>
|
||||||
<Member MemberName="Menu">
|
<Member MemberName="Menu">
|
||||||
|
@ -114,10 +183,10 @@
|
||||||
<Parameter Name="value" Type="Gtk.Widget" />
|
<Parameter Name="value" Type="Gtk.Widget" />
|
||||||
</Parameters>
|
</Parameters>
|
||||||
<Docs>
|
<Docs>
|
||||||
<summary>To be added</summary>
|
<summary>The menu of options.</summary>
|
||||||
<param name="value">To be added: an object of type 'Gtk.Widget'</param>
|
<param name="value">an object of type <see cref="T:Gtk.Widget"/></param>
|
||||||
<returns>To be added: an object of type 'Gtk.Widget'</returns>
|
<returns>an object of type <see cref="T:Gtk.Widget"/></returns>
|
||||||
<remarks>To be added</remarks>
|
<remarks />
|
||||||
</Docs>
|
</Docs>
|
||||||
</Member>
|
</Member>
|
||||||
<Member MemberName="Changed">
|
<Member MemberName="Changed">
|
||||||
|
@ -126,8 +195,8 @@
|
||||||
<ReturnValue />
|
<ReturnValue />
|
||||||
<Parameters />
|
<Parameters />
|
||||||
<Docs>
|
<Docs>
|
||||||
<summary>To be added</summary>
|
<summary>Emitted when the <see cref="T:Gtk.OptionMenu"/> selection is changed.</summary>
|
||||||
<remarks>To be added</remarks>
|
<remarks />
|
||||||
</Docs>
|
</Docs>
|
||||||
</Member>
|
</Member>
|
||||||
<Member MemberName=".ctor">
|
<Member MemberName=".ctor">
|
||||||
|
@ -156,10 +225,10 @@
|
||||||
<Parameter Name="index_" Type="System.UInt32" />
|
<Parameter Name="index_" Type="System.UInt32" />
|
||||||
</Parameters>
|
</Parameters>
|
||||||
<Docs>
|
<Docs>
|
||||||
<summary>To be added</summary>
|
<summary>Selects the menu item specified by <paramref name="index_"/> making it the newly selected value for the <see cref="T:Gtk.OptionMenu" />.</summary>
|
||||||
<param name="index_">a <see cref="T:System.UInt32" /></param>
|
<param name="index_">a <see cref="T:System.UInt32" /></param>
|
||||||
<remarks>To be added</remarks>
|
<remarks />
|
||||||
</Docs>
|
</Docs>
|
||||||
</Member>
|
</Member>
|
||||||
</Members>
|
</Members>
|
||||||
</Type>
|
</Type>
|
||||||
|
|
Loading…
Reference in a new issue