2003-02-12 02:00:12 +00:00
<Type Name= "Menu" FullName= "Gtk.Menu" >
2003-05-20 08:10:59 +00:00
<TypeSignature Language= "C#" Value= "public class Menu : Gtk.MenuShell, Implementor, IWrapper, IWrapper, IDisposable" Maintainer= "Hector Gomez M" />
2003-02-12 02:00:12 +00:00
<AssemblyInfo >
<AssemblyName > gtk-sharp</AssemblyName>
<AssemblyVersion > 0.0.0.0</AssemblyVersion>
<Attributes />
</AssemblyInfo>
2003-02-23 07:26:30 +00:00
<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>
2003-02-12 02:00:12 +00:00
<Docs >
2003-05-20 08:10:59 +00:00
<summary > A GtkMenu is a GtkMenuShell that implements a drop down menu.</summary>
<remarks >
2003-07-17 06:38:40 +00:00
<para >
2003-05-20 08:10:59 +00:00
A <see cref= "T:Gtk.Menu" /> is a <see cref= "T:Gtk.MenuShell" /> that implements a drop down menu consisting of a list of <see cref= "T:Gtk.MenuItem" /> objects which can be navigated and activated by the user to perform application functions.
</para>
2003-07-17 06:38:40 +00:00
<para >
2003-05-20 08:10:59 +00:00
It is commonly dropped down by activating a <see cref= "T:Gtk.MenuItem" /> in a <see cref= "T:Gtk.MenuBar" /> or in another <see cref= "T:Gtk.Menu" /> , it can also be popped up by activating a <see cref= "T:Gtk.OptionMenu" /> . Other composite widgets such as the <see cref= "T:Gtk.Notebook" /> can pop up a <see cref= "T:Gtk.Menu" /> as well.
</para>
</remarks>
2003-02-12 02:00:12 +00:00
</Docs>
<Base >
<BaseTypeName > Gtk.MenuShell</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= "Detach" >
<MemberSignature Language= "C#" Value= "public void Detach ();" />
<MemberType > Method</MemberType>
<ReturnValue >
<ReturnType > System.Void</ReturnType>
</ReturnValue>
<Parameters />
<Docs >
2003-05-20 08:10:59 +00:00
<summary > Detaches the menu from the widget to which it had been attached.</summary>
<remarks >
2003-07-17 06:38:40 +00:00
<para >
2003-05-20 08:10:59 +00:00
This function will call the detacher, provided when the <see cref= "M:Gtk.Menu.AttachToWidget" /> function was called.
</para>
</remarks>
2003-02-12 02:00:12 +00:00
</Docs>
</Member>
<Member MemberName= "Popdown" >
<MemberSignature Language= "C#" Value= "public void Popdown ();" />
<MemberType > Method</MemberType>
<ReturnValue >
<ReturnType > System.Void</ReturnType>
</ReturnValue>
<Parameters />
<Docs >
2003-05-20 08:10:59 +00:00
<summary > Removes the menu from the screen.</summary>
<remarks />
2003-02-12 02:00:12 +00:00
</Docs>
</Member>
<Member MemberName= "AttachToWidget" >
<MemberSignature Language= "C#" Value= "public void AttachToWidget (Gtk.Widget attach_widget, Gtk.MenuDetachFunc detacher);" />
<MemberType > Method</MemberType>
<ReturnValue >
<ReturnType > System.Void</ReturnType>
</ReturnValue>
<Parameters >
<Parameter Name= "attach_widget" Type= "Gtk.Widget" />
<Parameter Name= "detacher" Type= "Gtk.MenuDetachFunc" />
</Parameters>
<Docs >
2003-05-20 08:10:59 +00:00
<summary > Attaches the menu to the widget and provides a detacher.</summary>
<param name= "attach_widget" > The <see cref= "T:Gtk.Widget" /> that the menu will be attached to.</param>
<param name= "detacher" > The user supplied callback function that will be called when the menu calls <see cref= "M:Gtk.Menu.Detach" /> .</param>
<remarks >
2003-07-17 06:38:40 +00:00
<para >
2003-05-20 08:10:59 +00:00
Attaches the menu to the widget and provides a callback function that will be invoked when the menu calls <see cref= "M:Gtk.Menu.Detach" /> during its destruction.
</para>
</remarks>
2003-02-12 02:00:12 +00:00
</Docs>
</Member>
<Member MemberName= "Popup" >
<MemberSignature Language= "C#" Value= "public void Popup (Gtk.Widget parent_menu_shell, Gtk.Widget parent_menu_item, Gtk.MenuPositionFunc func, IntPtr data, uint button, uint activate_time);" />
<MemberType > Method</MemberType>
<ReturnValue >
<ReturnType > System.Void</ReturnType>
</ReturnValue>
<Parameters >
<Parameter Name= "parent_menu_shell" Type= "Gtk.Widget" />
<Parameter Name= "parent_menu_item" Type= "Gtk.Widget" />
<Parameter Name= "func" Type= "Gtk.MenuPositionFunc" />
<Parameter Name= "data" Type= "System.IntPtr" />
<Parameter Name= "button" Type= "System.UInt32" />
<Parameter Name= "activate_time" Type= "System.UInt32" />
</Parameters>
<Docs >
2003-05-20 08:10:59 +00:00
<summary > Displays a menu and makes it available for selection.</summary>
<param name= "parent_menu_shell" > The menu shell containing the triggering menu item, or <see langword= "null" /> .</param>
<param name= "parent_menu_item" > The menu item whose activation triggered the popup, or <see langword= "null" /> .</param>
<param name= "func" > A user supplied function used to position the menu, or <see langword= "null" /> .</param>
<param name= "data" > A user supplied data to be passed to func.</param>
<param name= "button" > The mouse button which was pressed to initiate the event.</param>
<param name= "activate_time" > The time at which the activation event occurred.</param>
<remarks >
2003-07-17 06:38:40 +00:00
<para >
2003-05-20 08:10:59 +00:00
Applications can use this function to display context-sensitive menus, and will typically supply <see langword= "null" /> for the <paramref name= "parent_menu_shell" /> , <paramref name= "parent_menu_item" /> , <paramref name= "func" /> and <paramref name= "data" /> parameters. The default menu positioning function will position the menu at the current mouse cursor position.
</para>
2003-07-17 06:38:40 +00:00
<para >
2003-05-20 08:10:59 +00:00
The <paramref name= "button" /> parameter should be the mouse button pressed to initiate the menu popup. If the menu popup was initiated by something other than a mouse button press, such as a mouse button release or a keypress, button should be zero(0).
</para>
2003-07-17 06:38:40 +00:00
<para >
2003-05-20 08:10:59 +00:00
The <paramref name= "activate_time" /> parameter should be the time stamp of the event that initiated the popup. If such an event is not available, use <see cref= "P:Gtk.Application.CurrentEvent" /> instead.
</para>
</remarks>
2003-02-12 02:00:12 +00:00
</Docs>
</Member>
<Member MemberName= "Reposition" >
<MemberSignature Language= "C#" Value= "public void Reposition ();" />
<MemberType > Method</MemberType>
<ReturnValue >
<ReturnType > System.Void</ReturnType>
</ReturnValue>
<Parameters />
<Docs >
2003-05-20 08:10:59 +00:00
<summary > Repositions the menu according to its position function.</summary>
<remarks />
2003-02-12 02:00:12 +00:00
</Docs>
</Member>
<Member MemberName= "ReorderChild" >
<MemberSignature Language= "C#" Value= "public void ReorderChild (Gtk.Widget child, int position);" />
<MemberType > Method</MemberType>
<ReturnValue >
<ReturnType > System.Void</ReturnType>
</ReturnValue>
<Parameters >
<Parameter Name= "child" Type= "Gtk.Widget" />
<Parameter Name= "position" Type= "System.Int32" />
</Parameters>
<Docs >
2003-05-20 08:10:59 +00:00
<summary > Moves a <see cref= "T:Gtk.MenuItem" /> to a new position within the <see cref= "T:Gtk.Menu" /> .</summary>
<param name= "child" > The <see cref= "T:Gtk.MenuItem" /> to move.</param>
<param name= "position" > The new position to place <paramref name= "child" /> . Positions are numbered from 0 to n-1.</param>
<remarks />
2003-02-12 02:00:12 +00:00
</Docs>
</Member>
<Member MemberName= "Finalize" >
<MemberSignature Language= "C#" Value= "protected virtual void Finalize ();" />
<MemberType > Method</MemberType>
<ReturnValue >
<ReturnType > System.Void</ReturnType>
</ReturnValue>
<Parameters />
<Docs >
2003-02-23 07:26:30 +00:00
<summary > Disposes the resources associated with the object.</summary>
<remarks />
2003-02-12 02:00:12 +00:00
</Docs>
</Member>
<Member MemberName= ".ctor" >
<MemberSignature Language= "C#" Value= "public Menu (IntPtr raw);" />
<MemberType > Constructor</MemberType>
<ReturnValue />
<Parameters >
<Parameter Name= "raw" Type= "System.IntPtr" />
</Parameters>
<Docs >
2003-02-23 07:26:30 +00:00
<summary > Internal constructor</summary>
<param name= "raw" > Pointer to the C object.</param>
<returns > An instance of Menu, wrapping the C object.</returns>
<remarks >
<para > This is an internal constructor, and should not be used by user code.</para>
</remarks>
2003-02-12 02:00:12 +00:00
</Docs>
</Member>
<Member MemberName= ".ctor" >
<MemberSignature Language= "C#" Value= "public Menu ();" />
<MemberType > Constructor</MemberType>
<ReturnValue />
<Parameters />
<Docs >
2003-05-20 08:10:59 +00:00
<summary > A constructor.</summary>
<returns > An instance of <see cref= "T:Gtk.Menu" /> .</returns>
<remarks />
2003-02-12 02:00:12 +00:00
</Docs>
</Member>
<Member MemberName= "GType" >
<MemberSignature Language= "C#" Value= "public static uint GType { get; };" />
<MemberType > Property</MemberType>
<ReturnValue >
<ReturnType > System.UInt32</ReturnType>
</ReturnValue>
<Docs >
2003-02-23 07:26:30 +00:00
<summary > The GLib Type for Gtk.Menu</summary>
2003-03-07 01:30:00 +00:00
<returns > The GLib Type for the Gtk.Menu class.</returns>
2003-02-23 07:26:30 +00:00
<remarks />
2003-02-12 02:00:12 +00:00
</Docs>
</Member>
<Member MemberName= "Active" >
<MemberSignature Language= "C#" Value= "public Gtk.Widget Active { get; };" />
<MemberType > Property</MemberType>
<ReturnValue >
<ReturnType > Gtk.Widget</ReturnType>
</ReturnValue>
<Docs >
2003-05-20 08:10:59 +00:00
<summary > Returns the selected menu item from the menu.</summary>
<returns > The <see cref= "T:Gtk.MenuItem" /> that was last selected in the menu. If a selection has not yet been made, the first menu item is selected.</returns>
<remarks >
2003-07-17 06:38:40 +00:00
<para >
2003-05-20 08:10:59 +00:00
This is used by the <see cref= "T:Gtk.OptionMenu" /> .
</para>
</remarks>
2003-02-12 02:00:12 +00:00
</Docs>
</Member>
<Member MemberName= "AccelPath" >
<MemberSignature Language= "C#" Value= "public string AccelPath { set; };" />
<MemberType > Property</MemberType>
<ReturnValue >
<ReturnType > System.String</ReturnType>
</ReturnValue>
<Parameters >
<Parameter Name= "value" Type= "System.String" />
</Parameters>
<Docs >
2003-05-20 08:10:59 +00:00
<summary > Sets an accelerator path for this menu from which accelerator paths for its immediate children, its menu items, can be constructed.</summary>
<param name= "value" > A valid accelerator path.</param>
2003-02-12 02:00:12 +00:00
<returns > To be added: an object of type 'string'</returns>
2003-05-20 08:10:59 +00:00
<remarks >
2003-07-17 06:38:40 +00:00
<para >
2003-05-20 08:10:59 +00:00
The main purpose of this function is to spare the programmer the inconvenience of having to call <see cref= "P:Gtk.MenuItem.AccelPath" /> on each menu item that should support runtime user changable accelerators. Instead, by just calling <see cref= "P:Gtk.MenuItem.AccelPath" /> on their parent, each menu item of this menu, that contains a label describing its purpose, automatically gets an accel path assigned.
</para>
</remarks>
2003-02-12 02:00:12 +00:00
</Docs>
</Member>
<Member MemberName= "AttachWidget" >
<MemberSignature Language= "C#" Value= "public Gtk.Widget AttachWidget { get; };" />
<MemberType > Property</MemberType>
<ReturnValue >
<ReturnType > Gtk.Widget</ReturnType>
</ReturnValue>
<Docs >
2003-05-20 08:10:59 +00:00
<summary > Returns the <see cref= "T:Gtk.Widget" /> that the menu is attached to.</summary>
<returns > The <see cref= "T:Gtk.Widget" /> that the menu is attached to.</returns>
<remarks />
2003-02-12 02:00:12 +00:00
</Docs>
</Member>
<Member MemberName= "TearoffState" >
<MemberSignature Language= "C#" Value= "public bool TearoffState { set; get; };" />
<MemberType > Property</MemberType>
<ReturnValue >
<ReturnType > System.Boolean</ReturnType>
</ReturnValue>
<Parameters >
<Parameter Name= "value" Type= "System.Boolean" />
</Parameters>
<Docs >
2003-05-20 08:10:59 +00:00
<summary > Sets or obtains the tearoff state of the menu.</summary>
<param name= "value" > If <see langword= "true" /> , menu is displayed as a tearoff menu.</param>
<returns > Returns <see langword= "true" /> if the menu is currently torn off.</returns>
<remarks >
2003-07-17 06:38:40 +00:00
<para >
2003-05-20 08:10:59 +00:00
A menu is normally displayed as drop down menu which persists as long as the menu is active. It can also be displayed as a tearoff menu which persists until it is closed or reattached.
</para>
</remarks>
2003-02-12 02:00:12 +00:00
</Docs>
</Member>
<Member MemberName= "AccelGroup" >
<MemberSignature Language= "C#" Value= "public Gtk.AccelGroup AccelGroup { set; get; };" />
<MemberType > Property</MemberType>
<ReturnValue >
<ReturnType > Gtk.AccelGroup</ReturnType>
</ReturnValue>
<Parameters >
<Parameter Name= "value" Type= "Gtk.AccelGroup" />
</Parameters>
<Docs >
2003-05-20 08:10:59 +00:00
<summary > Sets or obtains the <see cref= "T:Gtk.AccelGroup" /> which holds global accelerators for the menu.</summary>
<param name= "value" > The <see cref= "T:Gtk.AccelGroup" /> to be associated with the menu.</param>
<returns > The <see cref= "T:Gtk.AccelGroup" /> associated with the menu.</returns>
<remarks >
2003-07-17 06:38:40 +00:00
<para >
2003-05-20 08:10:59 +00:00
This accelerator group needs to also be added to all windows that this menu is being used in with <see cref= "M:Gtk.Window.AddAccelGroup" /> , in order for those windows to support all the accelerators contained in this group.
</para>
</remarks>
2003-02-12 02:00:12 +00:00
</Docs>
</Member>
<Member MemberName= "Title" >
<MemberSignature Language= "C#" Value= "public string Title { set; get; };" />
<MemberType > Property</MemberType>
<ReturnValue >
<ReturnType > System.String</ReturnType>
</ReturnValue>
<Parameters >
<Parameter Name= "value" Type= "System.String" />
</Parameters>
<Docs >
2003-05-20 08:10:59 +00:00
<summary > Sets or obtains the title for the menu.</summary>
<param name= "value" > A string containing the title for the menu.</param>
<returns > The title of the menu, or <see langword= "null" /> if the menu has no title set on it. This string is owned by the widget and should not be modified or freed.</returns>
<remarks >
2003-07-17 06:38:40 +00:00
<para >
2003-05-20 08:10:59 +00:00
The title is displayed when the menu is shown as a tearoff menu.
</para>
</remarks>
2003-02-12 02:00:12 +00:00
</Docs>
</Member>
<Member MemberName= "TearoffTitle" >
<MemberSignature Language= "C#" Value= "public string TearoffTitle { set; get; };" />
<MemberType > Property</MemberType>
<ReturnValue >
<ReturnType > System.String</ReturnType>
</ReturnValue>
<Parameters >
<Parameter Name= "value" Type= "System.String" />
</Parameters>
<Docs >
<summary > To be added</summary>
<param name= "value" > To be added: an object of type 'string'</param>
<returns > To be added: an object of type 'string'</returns>
<remarks > To be added</remarks>
</Docs>
</Member>
2003-03-07 01:30:00 +00:00
<Member MemberName= ".ctor" >
<MemberSignature Language= "C#" Value= "protected Menu (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 Menu, using the GLib-provided type</returns>
<remarks >
<para > This is a constructor used by derivative types of <see cref= "T:Gtk.Menu" /> that would have their own GLib type assigned to it. This is not typically used by C# code.</para>
</remarks>
</Docs>
</Member>
2003-07-17 06:38:40 +00:00
<Member MemberName= "Screen" >
<MemberSignature Language= "C#" Value= "public Gdk.Screen Screen { set; };" />
<MemberType > Property</MemberType>
<ReturnValue >
<ReturnType > Gdk.Screen</ReturnType>
</ReturnValue>
<Parameters >
<Parameter Name= "value" Type= "Gdk.Screen" />
</Parameters>
<Docs >
<summary > To be added</summary>
<param name= "value" > a <see cref= "T:Gdk.Screen" /> </param>
<returns > a <see cref= "T:Gdk.Screen" /> </returns>
<remarks > To be added</remarks>
</Docs>
</Member>
<Member MemberName= "SetActive" >
<MemberSignature Language= "C#" Value= "public void SetActive (uint index_);" />
<MemberType > Method</MemberType>
<ReturnValue >
<ReturnType > System.Void</ReturnType>
</ReturnValue>
<Parameters >
<Parameter Name= "index_" Type= "System.UInt32" />
</Parameters>
<Docs >
<summary > Selects the specified menu item within the menu.</summary>
<param name= "index_" > a <see cref= "T:System.UInt32" /> </param>
<remarks >
2003-07-18 02:50:06 +00:00
<para >
2003-07-17 06:38:40 +00:00
This is used by the <see cref= "T:Gtk.OptionMenu" /> and should not be used by anyone else.
</para>
</remarks>
</Docs>
</Member>
2003-02-12 02:00:12 +00:00
</Members>
2003-07-17 06:38:40 +00:00
</Type>