GtkSharp/doc/en/Gtk/Action.xml
John Luke 8855f7a5a7 add some automatic docs for the new stuff
svn path=/trunk/gtk-sharp/; revision=43452
2005-04-22 17:20:16 +00:00

577 lines
No EOL
24 KiB
XML

<Type Name="Action" FullName="Gtk.Action">
<TypeSignature Language="C#" Value="public class Action : GLib.Object, IWrapper, 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>An action which can be triggered by a menu or toolbar item.</summary>
<remarks>
<para>
Actions represent operations that the user can be perform, along with some information how it should be presented in the interface. Each action provides methods to create icons, menu items and toolbar items representing itself.
<para>
As well as the callback that is called when the action gets activated, the following also gets associated with the action:
<list type="bullet">
<item>
<term>a name (not translated, for path lookup)</term>
</item>
<item>
<term>a label (translated, for display)</term>
</item>
<item>
<term>an accelerator</term>
</item>
<item>
<term>whether label indicates a stock id</term>
</item>
<item>
<term>a tooltip (optional, translated)</term>
</item>
<item>
<term>a toolbar label (optional, shorter than label)</term>
</item>
</list></para><para>
The action will also have some state information:
<list type="bullet">
<item>
<term>visible (shown/hidden)</term>
</item>
<item>
<term>sensitive (enabled/disabled)</term>
</item>
</list></para><para>
Apart from regular actions, there are toggle actions, which can be toggled between two states and radio actions, of which only one in a group can be in the "active" state. Other actions can be implemented as <see cref="T:Gtk.Action" /> subclasses.
</para><para>
Each action can have one or more proxy menu item, toolbar button or other proxy widgets. Proxies mirror the state of the action (text label, tooltip, icon, visible, sensitive, etc), and should change when the action's state changes. When the proxy is activated, it should activate its action.
</para></para>
</remarks>
</Docs>
<Base>
<BaseTypeName>GLib.Object</BaseTypeName>
</Base>
<Interfaces>
<Interface>
<InterfaceName>GLib.IWrapper</InterfaceName>
</Interface>
<Interface>
<InterfaceName>System.IDisposable</InterfaceName>
</Interface>
</Interfaces>
<Attributes />
<Members>
<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 this <see cref="T:Gtk.Action" /> object.</summary>
<remarks>
</remarks>
</Docs>
</Member>
<Member MemberName="OnActivated">
<MemberSignature Language="C#" Value="protected virtual void OnActivated ();" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Default handler for the <see cref="M:Gtk.Action.Activated" /> event.</summary>
<remarks>Override this method in a subclass to provide a default handler for the <see cref="M:Gtk.Action.Activated" /> event.</remarks>
</Docs>
</Member>
<Member MemberName="BlockActivateFrom">
<MemberSignature Language="C#" Value="public void BlockActivateFrom (Gtk.Widget proxy);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="proxy" Type="Gtk.Widget" />
</Parameters>
<Docs>
<summary>Disables calls to the <see cref="M:Gtk.Action.Activate()" /> function by signals on the given proxy widget.</summary>
<param name="proxy">a <see cref="T:Gtk.Widget" /></param>
<remarks>This is used to break notification loops for things like check or radio actions.
This function is intended for use by action implementations.</remarks>
</Docs>
</Member>
<Member MemberName="CreateMenuItem">
<MemberSignature Language="C#" Value="public Gtk.Widget CreateMenuItem ();" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>Gtk.Widget</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Creates a menu item widget that proxies for the given action.</summary>
<returns>a <see cref="T:Gtk.Widget" /> that is a menu item connected to the action.</returns>
<remarks />
</Docs>
</Member>
<Member MemberName="Activate">
<MemberSignature Language="C#" Value="public void Activate ();" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Emits <see cref="E:Gtk.Action.Activated" /> on the specified action, if it is not insensitive.</summary>
<remarks>This gets called by the proxy widgets when they get activated.
It can also be used to manually activate an action.</remarks>
</Docs>
</Member>
<Member MemberName="DisconnectAccelerator">
<MemberSignature Language="C#" Value="public void DisconnectAccelerator ();" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Undoes the effect of one call to <see cref="M:Gtk.Action.ConnectAccelerator()" />.</summary>
<remarks />
</Docs>
</Member>
<Member MemberName="UnblockActivateFrom">
<MemberSignature Language="C#" Value="public void UnblockActivateFrom (Gtk.Widget proxy);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="proxy" Type="Gtk.Widget" />
</Parameters>
<Docs>
<summary>Re-enables calls to the <see cref="M:Gtk.ActionActivate()" /> function by signals on the given proxy widget.</summary>
<param name="proxy">a <see cref="T:Gtk.Widget" /></param>
<remarks>This undoes the blocking done by <see cref="M:Gtk.Action.BlockActivateFrom()" />.
This function is intended for use by action implementations.</remarks>
</Docs>
</Member>
<Member MemberName="CreateIcon">
<MemberSignature Language="C#" Value="public Gtk.Widget CreateIcon (Gtk.IconSize icon_size);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>Gtk.Widget</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="icon_size" Type="Gtk.IconSize" />
</Parameters>
<Docs>
<summary>This function is intended for use by action implementations to create icons displayed in the proxy widgets.</summary>
<param name="icon_size">a <see cref="T:System.Int32" />, the size of the icon that should be created.</param>
<returns>a <see cref="T:Gtk.Widget" /> that displays the icon for this action.</returns>
<remarks />
</Docs>
</Member>
<Member MemberName="ConnectAccelerator">
<MemberSignature Language="C#" Value="public void ConnectAccelerator ();" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Installs the accelerator for action if action has an AccelPath and AccelGroup.</summary>
<remarks>See <see cref="P:Gtk.Action.AccelPath" /> and <see cref="P:Gtk.Action.AccelGroup" /><para>
Since multiple proxies may independently trigger the installation of the accelerator, the action counts the number of times this function has been called and does not remove the accelerator until <see cref="M:Gtk.Action.DisconnectAccelerator()" /> has been called as many times.
</para></remarks>
</Docs>
</Member>
<Member MemberName="CreateToolItem">
<MemberSignature Language="C#" Value="public Gtk.Widget CreateToolItem ();" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>Gtk.Widget</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Creates a toolbar item widget that proxies for the given action.</summary>
<returns>a <see cref="T:Gtk.Widget" /> that is a toolbar item connected to the action.</returns>
<remarks />
</Docs>
</Member>
<Member MemberName="ConnectProxy">
<MemberSignature Language="C#" Value="public void ConnectProxy (Gtk.Widget proxy);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="proxy" Type="Gtk.Widget" />
</Parameters>
<Docs>
<summary>Connects a widget to an action object as a proxy.</summary>
<param name="proxy">a <see cref="T:Gtk.Widget" /></param>
<remarks>Synchronises various properties of the action with the widget (such as label text, icon, tooltip, etc), and attaches a callback so that the action gets activated when the proxy widget does.
If the widget is already connected to an action, it is disconnected first.</remarks>
</Docs>
</Member>
<Member MemberName="DisconnectProxy">
<MemberSignature Language="C#" Value="public void DisconnectProxy (Gtk.Widget proxy);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="proxy" Type="Gtk.Widget" />
</Parameters>
<Docs>
<summary>Disconnects a proxy widget from an action.</summary>
<param name="proxy">a <see cref="T:Gtk.Widget" /></param>
<remarks>Does not destroy the widget, however.</remarks>
</Docs>
</Member>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="protected Action (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.Action" /></returns>
<remarks />
</Docs>
</Member>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public Action (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.Action" /></returns>
<remarks />
</Docs>
</Member>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public Action (string name, string label, string tooltip, string stock_id);" />
<MemberType>Constructor</MemberType>
<ReturnValue />
<Parameters>
<Parameter Name="name" Type="System.String" />
<Parameter Name="label" Type="System.String" />
<Parameter Name="tooltip" Type="System.String" />
<Parameter Name="stock_id" Type="System.String" />
</Parameters>
<Docs>
<summary>Creates a new action from the <paramref name="name" />, <paramref name="label" />, <paramref name="tooltip" />, and <paramref name="stock_id" />.</summary>
<param name="name">A unique name for the action</param>
<param name="label"> the label displayed in menu items and on buttons</param>
<param name="tooltip">a tooltip for the action, or <see langword="null" /> for no tooltip</param>
<param name="stock_id">the stock icon to display in widgets representing the action, or <see langword="null" /></param>
<returns>a <see cref="T:Gtk.Action" /></returns>
<remarks />
</Docs>
</Member>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public Action (string name, string label);" />
<MemberType>Constructor</MemberType>
<ReturnValue />
<Parameters>
<Parameter Name="name" Type="System.String" />
<Parameter Name="label" Type="System.String" />
</Parameters>
<Docs>
<summary>Creates a new action from the <paramref name="name" /> and <paramref name="label" />.</summary>
<param name="name">A unique name for the action</param>
<param name="label"> the label displayed in menu items and on buttons</param>
<returns>a <see cref="T:Gtk.Action" /></returns>
<remarks>Convenience constructor for <see cref="C:Gtk.Action(System.String,System.String.System.String,System.String)" /> passing in <see langword="null" /> for the last two parameters.</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 <see cref="T:GLib.GType" /> value for <see cref="T:Gtk.Action" />.</remarks>
</Docs>
</Member>
<Member MemberName="IsImportant">
<MemberSignature Language="C#" Value="public bool IsImportant { set; get; };" />
<MemberType>Property</MemberType>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Whether the action is considered important.</summary>
<returns>a <see cref="T:System.Boolean" /></returns>
<remarks>When <see langword="true" />, toolitem proxies for this action show text in <see cref="F:Gtk.ToolbarStyle.BothHoriz" /> mode.
Default value: <see langword="false" /></remarks>
</Docs>
</Member>
<Member MemberName="VisibleVertical">
<MemberSignature Language="C#" Value="public bool VisibleVertical { set; get; };" />
<MemberType>Property</MemberType>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>When <see langword="true" />, toolitem proxies for this action are represented in the toolbar overflow menu.</summary>
<returns>a <see cref="T:System.Boolean" /></returns>
<remarks>Default value is <see langword="true" /></remarks>
</Docs>
</Member>
<Member MemberName="StockId">
<MemberSignature Language="C#" Value="public string StockId { set; get; };" />
<MemberType>Property</MemberType>
<ReturnValue>
<ReturnType>System.String</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>The stock icon displayed in widgets representing this action.</summary>
<returns>a <see cref="T:System.String" /></returns>
<remarks>Default value is <see langword="null" /></remarks>
</Docs>
</Member>
<Member MemberName="HideIfEmpty">
<MemberSignature Language="C#" Value="public bool HideIfEmpty { set; get; };" />
<MemberType>Property</MemberType>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>When <see langword="true" />, empty menu proxies for this action are hidden.</summary>
<returns>a <see cref="T:System.Boolean" /></returns>
<remarks>Default value: <see langword="true" /></remarks>
</Docs>
</Member>
<Member MemberName="Name">
<MemberSignature Language="C#" Value="public string Name { get; };" />
<MemberType>Property</MemberType>
<ReturnValue>
<ReturnType>System.String</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>A unique name for the action.</summary>
<returns>a <see cref="T:System.String" /></returns>
<remarks />
</Docs>
</Member>
<Member MemberName="ShortLabel">
<MemberSignature Language="C#" Value="public string ShortLabel { set; get; };" />
<MemberType>Property</MemberType>
<ReturnValue>
<ReturnType>System.String</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>A shorter label that may be used on toolbar buttons.</summary>
<returns>a <see cref="T:System.String" /></returns>
<remarks>Default value is <see langword="null" /></remarks>
</Docs>
</Member>
<Member MemberName="VisibleHorizontal">
<MemberSignature Language="C#" Value="public bool VisibleHorizontal { set; get; };" />
<MemberType>Property</MemberType>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Whether the toolbar item is visible when the toolbar is in a horizontal orientation.</summary>
<returns>a <see cref="T:System.Boolean" /></returns>
<remarks>Default value is <see langword="true" /></remarks>
</Docs>
</Member>
<Member MemberName="ActionGroup">
<MemberSignature Language="C#" Value="public Gtk.ActionGroup ActionGroup { set; get; };" />
<MemberType>Property</MemberType>
<ReturnValue>
<ReturnType>Gtk.ActionGroup</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>The GtkActionGroup this GtkAction is associated with.</summary>
<returns>a <see cref="T:Gtk.ActionGroup" /></returns>
<remarks>Can be set to <see langword="null" /> for internal use.</remarks>
</Docs>
</Member>
<Member MemberName="Label">
<MemberSignature Language="C#" Value="public string Label { set; get; };" />
<MemberType>Property</MemberType>
<ReturnValue>
<ReturnType>System.String</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>The label used for menu items and buttons that activate this action.</summary>
<returns>a <see cref="T:System.String" /></returns>
<remarks>Default value is <see langword="null" /></remarks>
</Docs>
</Member>
<Member MemberName="Tooltip">
<MemberSignature Language="C#" Value="public string Tooltip { set; get; };" />
<MemberType>Property</MemberType>
<ReturnValue>
<ReturnType>System.String</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>A tooltip for this action.</summary>
<returns>a <see cref="T:System.String" /></returns>
<remarks>Default value is <see langword="null" /></remarks>
</Docs>
</Member>
<Member MemberName="Sensitive">
<MemberSignature Language="C#" Value="public bool Sensitive { set; get; };" />
<MemberType>Property</MemberType>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Whether the action itself is sensitive.</summary>
<returns>a <see cref="T:System.Boolean" /></returns>
<remarks>
<block subset="none" type="note">
<para>
This does not necessarily mean effective sensitivity. See <see cref="P:Gtk.Action.IsSensitive" /> for that.
</para>
</block>
</remarks>
</Docs>
</Member>
<Member MemberName="Visible">
<MemberSignature Language="C#" Value="public bool Visible { set; get; };" />
<MemberType>Property</MemberType>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Whether the action itself is visible.</summary>
<returns>a <see cref="T:System.Boolean" /></returns>
<remarks>
<block subset="none" type="note">
<para>
This does not necessarily mean effective visibility. See <see cref="P:Gtk.Action.IsVisible" /> for that.
</para>
</block>
</remarks>
</Docs>
</Member>
<Member MemberName="AccelGroup">
<MemberSignature Language="C#" Value="public Gtk.AccelGroup AccelGroup { set; };" />
<MemberType>Property</MemberType>
<ReturnValue>
<ReturnType>Gtk.AccelGroup</ReturnType>
</ReturnValue>
<Docs>
<summary>The <see cref="T:Gtk.AccelGroup" /> in which the accelerator for this action will be installed.</summary>
<returns>a <see cref="T:Gtk.AccelGroup" /> or <see langword="null" /></returns>
<remarks />
</Docs>
</Member>
<Member MemberName="IsSensitive">
<MemberSignature Language="C#" Value="public bool IsSensitive { get; };" />
<MemberType>Property</MemberType>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>whether the action is effectively sensitive.</summary>
<returns>a <see cref="T:System.Boolean" /></returns>
<remarks>
<see langword="true" /> if the action and its associated action group are both sensitive. </remarks>
</Docs>
</Member>
<Member MemberName="IsVisible">
<MemberSignature Language="C#" Value="public bool IsVisible { get; };" />
<MemberType>Property</MemberType>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Whether the action is effectively visible.</summary>
<returns>a <see cref="T:System.Boolean" /></returns>
<remarks>
<see langword="true" /> if the action and its associated action group are both visible.</remarks>
</Docs>
</Member>
<Member MemberName="AccelPath">
<MemberSignature Language="C#" Value="public string AccelPath { set; get; };" />
<MemberType>Property</MemberType>
<ReturnValue>
<ReturnType>System.String</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>The accel path for this action.</summary>
<returns>a <see cref="T:System.String" /></returns>
<remarks>All proxy widgets associated with the action will have this accel path, so that their accelerators are consistent.</remarks>
</Docs>
</Member>
<Member MemberName="Activated">
<MemberSignature Language="C#" Value="public event EventHandler Activated;" />
<MemberType>Event</MemberType>
<ReturnValue>
<ReturnType>System.EventHandler</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Event fired when this action is activated.</summary>
<remarks>
</remarks>
</Docs>
</Member>
<Member MemberName="Proxies">
<MemberSignature Language="C#" Value="public Gtk.Widget [] Proxies { get; };" />
<MemberType>Property</MemberType>
<ReturnValue>
<ReturnType>Gtk.Widget[]</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Returns the proxy widgets for an action.</summary>
<returns>a <see cref="T:Gtk.Widget[]" /> of proxy widgets.</returns>
<remarks>
</remarks>
</Docs>
</Member>
<Member MemberName="VisibleOverflown">
<MemberSignature Language="C#" Value="public bool VisibleOverflown { set; get; };" />
<MemberType>Property</MemberType>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>To be added</summary>
<returns>a <see cref="T:System.Boolean" /></returns>
<remarks>To be added</remarks>
</Docs>
</Member>
</Members>
</Type>