mirror of
https://github.com/Ryujinx/GtkSharp.git
synced 2024-09-08 07:53:17 +02:00
Apply patch from brian.nickel@gmail.com
svn path=/trunk/gtk-sharp/; revision=81525
This commit is contained in:
parent
508961405e
commit
a61895cb0c
@ -7,7 +7,7 @@
|
||||
</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>Display information about an application</summary>
|
||||
<summary>This class extends <see cref="Gtk.Dialog" />, providing a dialog to show information about a program.</summary>
|
||||
<remarks>
|
||||
<para>
|
||||
The <see cref="T:Gtk.AboutDialog" /> offers a simple way to display information about a program like its logo, name, copyright, website and license. It is also possible to give credits to the authors, documenters, translators and artists who have worked on the program. An about dialog is typically opened when the user selects the About option from the Help menu. All parts of the dialog are optional.
|
||||
@ -19,6 +19,73 @@ About dialogs often contain links and email addresses. <see cref="T:Gtk.AboutDia
|
||||
<para>
|
||||
To make constructing a <see cref="T:Gtk.AboutDialog" /> as convenient as possible, you can use the function <see cref="M:Gtk.ShowAboutDialog()" /> which constructs and shows a dialog and keeps it around so that it can be shown again.
|
||||
</para>-->
|
||||
<example>
|
||||
<para>The following example creates and shows a <see cref="T:Gtk.AboutDialog" /> from both assembly attributes and stored values.</para>
|
||||
<code lang="C#">using Gtk;
|
||||
using System.Reflection;
|
||||
|
||||
[assembly:AssemblyTitleAttribute ("About Dialog Example")]
|
||||
[assembly:AssemblyVersionAttribute ("1.0.0.0")]
|
||||
[assembly:AssemblyDescriptionAttribute (
|
||||
"An example of the Gtk# AboutDialog using assembly attributes.")]
|
||||
[assembly:AssemblyCopyrightAttribute("Copyright 2007 Brian Nickel")]
|
||||
|
||||
static public class AboutDialogExample
|
||||
{
|
||||
public static void Main ()
|
||||
{
|
||||
Application.Init ();
|
||||
|
||||
AboutDialog dialog = new AboutDialog ();
|
||||
Assembly asm = Assembly.GetExecutingAssembly ();
|
||||
|
||||
dialog.Name = (asm.GetCustomAttributes (
|
||||
typeof (AssemblyTitleAttribute), false) [0]
|
||||
as AssemblyTitleAttribute).Title;
|
||||
|
||||
dialog.Version = asm.GetName ().Version.ToString ();
|
||||
|
||||
dialog.Comments = (asm.GetCustomAttributes (
|
||||
typeof (AssemblyDescriptionAttribute), false) [0]
|
||||
as AssemblyDescriptionAttribute).Description;
|
||||
|
||||
dialog.Copyright = (asm.GetCustomAttributes (
|
||||
typeof (AssemblyCopyrightAttribute), false) [0]
|
||||
as AssemblyCopyrightAttribute).Copyright;
|
||||
|
||||
dialog.License = license;
|
||||
|
||||
dialog.Authors = authors;
|
||||
|
||||
dialog.Run ();
|
||||
}
|
||||
|
||||
private static string [] authors = new string [] {
|
||||
"Brian Nickel <name@domain.ext>",
|
||||
"Rupert T. Monkey <name@domain.ext>"
|
||||
};
|
||||
|
||||
private static string license =
|
||||
@"Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
""Software""), to deal in the Software without restriction, including
|
||||
without limitation the rights to use, copy, modify, merge, publish,
|
||||
distribute, sublicense, and/or sell copies of the Software, and to
|
||||
permit persons to whom the Software is furnished to do so, subject to
|
||||
the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be
|
||||
included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED ""AS IS"", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.";
|
||||
}</code>
|
||||
</example>
|
||||
</remarks>
|
||||
<since version="Gtk# 2.6" />
|
||||
</Docs>
|
||||
@ -36,8 +103,8 @@ To make constructing a <see cref="T:Gtk.AboutDialog" /> as convenient as possibl
|
||||
<Parameter Name="gtype" Type="GLib.GType" />
|
||||
</Parameters>
|
||||
<Docs>
|
||||
<summary>Protected Constructor.</summary>
|
||||
<param name="gtype">a <see cref="T:GLib.GType" /></param>
|
||||
<summary>Constructs and initializes a new instance of <see cref="T:Gtk.AboutDialog" /> for a specified native GLib type.</summary>
|
||||
<param name="gtype">A <see cref="T:GLib.GType" /> object containing the native GLib type for the new instance.</param>
|
||||
<remarks>Chain to this constructor if you have manually registered a native <see cref="T:GLib.GType" /> value for your subclass.</remarks>
|
||||
</Docs>
|
||||
<Attributes>
|
||||
@ -54,9 +121,9 @@ To make constructing a <see cref="T:Gtk.AboutDialog" /> as convenient as possibl
|
||||
<Parameter Name="raw" Type="System.IntPtr" />
|
||||
</Parameters>
|
||||
<Docs>
|
||||
<summary>Internal constructor</summary>
|
||||
<param name="raw">a <see cref="T:System.IntPtr" /></param>
|
||||
<remarks>This is not typically used by C# code.</remarks>
|
||||
<summary>Constructs and initializes a new instance of <see cref="T:Gtk.AboutDialog" /> using an existing unmanaged object as its base.</summary>
|
||||
<param name="raw">A <see cref="T:System.IntPtr" /> pointing to the raw object to be managed by the new instance.</param>
|
||||
<remarks>This is not typically used by managed code. It is primarily used for enclosing an existing object, created by unmanaged code, in a managed wrapper.</remarks>
|
||||
</Docs>
|
||||
</Member>
|
||||
<Member MemberName=".ctor">
|
||||
@ -65,8 +132,8 @@ To make constructing a <see cref="T:Gtk.AboutDialog" /> as convenient as possibl
|
||||
<ReturnValue />
|
||||
<Parameters />
|
||||
<Docs>
|
||||
<summary>Default constructor</summary>
|
||||
<remarks />
|
||||
<summary>Constructs and initializes a new instance of <see cref="T:Gtk.AboutDialog" /> for the executing assembly.</summary>
|
||||
<remarks>With no properties set, the <see cref="T:Gtk.AboutDialog" /> window will display only the name of the executing assembly.</remarks>
|
||||
</Docs>
|
||||
</Member>
|
||||
<Member MemberName="GType">
|
||||
@ -77,9 +144,9 @@ To make constructing a <see cref="T:Gtk.AboutDialog" /> as convenient as possibl
|
||||
</ReturnValue>
|
||||
<Parameters />
|
||||
<Docs>
|
||||
<summary>GType Property.</summary>
|
||||
<value>a <see cref="T:GLib.GType" /></value>
|
||||
<remarks>Returns the native <see cref="T:GLib.GType" /> value for <see cref="T:Gtk.AboutDialog" />.</remarks>
|
||||
<summary>Gets the GLib type of the current instance.</summary>
|
||||
<value>A <see cref="T:GLib.GType" /> value representing the native GLib type of <see cref="T:Gtk.AboutDialog" />.</value>
|
||||
<remarks>The value is used internally by the GLib type management system.</remarks>
|
||||
</Docs>
|
||||
</Member>
|
||||
<Member MemberName="License">
|
||||
@ -90,9 +157,9 @@ To make constructing a <see cref="T:Gtk.AboutDialog" /> as convenient as possibl
|
||||
</ReturnValue>
|
||||
<Parameters />
|
||||
<Docs>
|
||||
<summary>The license of the program.</summary>
|
||||
<value>a <see cref="T:System.String" /></value>
|
||||
<remarks>This string is displayed in a text view in a secondary dialog, therefore it is fine to use a long multi-paragraph text. Note that the text is not wrapped in the text view, thus it must contain the intended linebreaks.</remarks>
|
||||
<summary>Gets and sets the license text of the program.</summary>
|
||||
<value>A <see cref="T:System.String" /> object containing the license text to display with the current instance.</value>
|
||||
<remarks>This string is displayed in a text view in a secondary dialog, therefore it is fine to use a long multi-paragraph text. Note that by default the text is not wrapped in the text view, thus it must contain the intended linebreaks.</remarks>
|
||||
</Docs>
|
||||
<Attributes>
|
||||
<Attribute>
|
||||
@ -108,11 +175,9 @@ To make constructing a <see cref="T:Gtk.AboutDialog" /> as convenient as possibl
|
||||
</ReturnValue>
|
||||
<Parameters />
|
||||
<Docs>
|
||||
<summary>The name of the program.</summary>
|
||||
<value>a <see cref="T:System.String" /></value>
|
||||
<remarks>
|
||||
<!--If this is not set, it defaults to g_get_application_name().-->
|
||||
</remarks>
|
||||
<summary>Gets and sets the name of the program.</summary>
|
||||
<value>A <see cref="T:System.String" /> object containing the name of the program.</value>
|
||||
<remarks>The default value is the name of the executing assembly. This may be in the format "MyApplication.exe", "/path/to/MyApplication.exe", or "C:\Path\To\MyApplication.exe" depending on how the assembly was executed and on what platform.</remarks>
|
||||
</Docs>
|
||||
<Attributes>
|
||||
<Attribute>
|
||||
@ -128,9 +193,11 @@ To make constructing a <see cref="T:Gtk.AboutDialog" /> as convenient as possibl
|
||||
</ReturnValue>
|
||||
<Parameters />
|
||||
<Docs>
|
||||
<summary>Copyright information for the program.</summary>
|
||||
<value>a <see cref="T:System.String" /></value>
|
||||
<remarks />
|
||||
<summary>Gets and sets copyright information for the program.</summary>
|
||||
<value>A <see cref="T:System.String" /> object containing copyright information for the program.</value>
|
||||
<remarks>
|
||||
<para>The copyright text appears below the <see cref="T:Gtk.AboutDialog.Comments" /> text and above the <see cref="T:Gtk.AboutDialog.Website" /> link on the dialog. If unset, not copyright text will appear.</para>
|
||||
</remarks>
|
||||
</Docs>
|
||||
<Attributes>
|
||||
<Attribute>
|
||||
@ -146,9 +213,9 @@ To make constructing a <see cref="T:Gtk.AboutDialog" /> as convenient as possibl
|
||||
</ReturnValue>
|
||||
<Parameters />
|
||||
<Docs>
|
||||
<summary>Credits to the translators.</summary>
|
||||
<value>a <see cref="T:System.String" /></value>
|
||||
<remarks>This string should be marked as translatable. The string may contain email addresses and URLs, which will be displayed as links, see the introduction for more details.</remarks>
|
||||
<summary>Gets and sets credits for the translation of the program.</summary>
|
||||
<value>A <see cref="T:System.String" /> object containing credits for the translation of the program.</value>
|
||||
<remarks>This string should be marked as translatable. Each string may contain email addresses and URLs, which will be displayed as links. See the remarks on <see cref="T:Gtk.AboutDialog" /> for more details.</remarks>
|
||||
</Docs>
|
||||
<Attributes>
|
||||
<Attribute>
|
||||
@ -164,11 +231,25 @@ To make constructing a <see cref="T:Gtk.AboutDialog" /> as convenient as possibl
|
||||
</ReturnValue>
|
||||
<Parameters />
|
||||
<Docs>
|
||||
<summary>A named icon to use as the logo for the about box.</summary>
|
||||
<value>a <see cref="T:System.String" /></value>
|
||||
<remarks>This property overrides the <see cref="P:Gtk.AboutDialog.Logo" /> property.
|
||||
|
||||
</remarks>
|
||||
<summary>Gets and sets the name of the logo icon to display above the program name in the dialog.</summary>
|
||||
<value>A <see cref="T:System.String" /> object containing the name of the logo icon to display above the program name in the dialog.</value>
|
||||
<remarks>
|
||||
<block subset="none" type="note">
|
||||
If set, this property overrides the <see cref="P:Gtk.AboutDialog.Logo" /> property.
|
||||
</block>
|
||||
<para>The name should be equal to the name of the program, without any sort of extension, eg. <c>"monodoc"</c>. The dialog will use that name to load an icon by trying the following:</para>
|
||||
<list type="number">
|
||||
<item>
|
||||
<term>The current icon theme, eg. <c>"/usr/share/icons/Tango/48x48/apps/monodoc.png"</c>.</term>
|
||||
</item>
|
||||
<item>
|
||||
<term>The pixmap directory, eg. <c>"/usr/share/pixmaps/monodoc.png"</c></term>
|
||||
</item>
|
||||
<item>
|
||||
<term>The broken image icon.</term>
|
||||
</item>
|
||||
</list>
|
||||
</remarks>
|
||||
</Docs>
|
||||
<Attributes>
|
||||
<Attribute>
|
||||
@ -184,9 +265,9 @@ To make constructing a <see cref="T:Gtk.AboutDialog" /> as convenient as possibl
|
||||
</ReturnValue>
|
||||
<Parameters />
|
||||
<Docs>
|
||||
<summary>The label for the link to the website of the program.</summary>
|
||||
<value>a <see cref="T:System.String" /></value>
|
||||
<remarks>If this is not set, it defaults to the URL specified in the <see cref="P:Gtk.AboutDialog.Website" /> property.</remarks>
|
||||
<summary>Gets and sets the text label to display for the link to <see cref="P:Gtk.AboutDialog.Website" />.</summary>
|
||||
<value>A <see cref="T:System.String" /> containing the text label to display for the link to <see cref="P:Gtk.AboutDialog.Website" />.</value>
|
||||
<remarks>This value is used to provide a user friendly link to the website, for example <c>"Visit home page."</c> or <c>"AppName website"</c>. If not set, the link defaults to the URL specified in the <see cref="P:Gtk.AboutDialog.Website" /> property.</remarks>
|
||||
</Docs>
|
||||
<Attributes>
|
||||
<Attribute>
|
||||
@ -202,9 +283,14 @@ To make constructing a <see cref="T:Gtk.AboutDialog" /> as convenient as possibl
|
||||
</ReturnValue>
|
||||
<Parameters />
|
||||
<Docs>
|
||||
<summary>A logo for the about box.</summary>
|
||||
<value>a <see cref="T:Gdk.Pixbuf" /></value>
|
||||
<remarks>If this is not set, it defaults to <see cref="P:Gtk.Window.DefaultIconList()" />.</remarks>
|
||||
<summary>Gets and sets a logo to display above the program name in the dialog.</summary>
|
||||
<value>A <see cref="T:Gdk.Pixbuf" /> object containing a logo to display above the program name in the dialog.</value>
|
||||
<remarks>
|
||||
<para>
|
||||
<block subset="none" type="note">The prefered way to set the logo is through <see cref="P:Gtk.Logo.LogoIconName" />.</block>
|
||||
</para>
|
||||
<para>If this is not set, it defaults to <see cref="P:Gtk.Window.DefaultIconList()" />.</para>
|
||||
</remarks>
|
||||
</Docs>
|
||||
<Attributes>
|
||||
<Attribute>
|
||||
@ -220,9 +306,15 @@ To make constructing a <see cref="T:Gtk.AboutDialog" /> as convenient as possibl
|
||||
</ReturnValue>
|
||||
<Parameters />
|
||||
<Docs>
|
||||
<summary>The URL for the link to the website of the program.</summary>
|
||||
<value>a <see cref="T:System.String" /></value>
|
||||
<remarks>This should be a string starting with "http://".</remarks>
|
||||
<summary>Gets and sets the URL of the program's website.</summary>
|
||||
<value>A <see cref="T:System.String" /> containing the URL of the program's website.</value>
|
||||
<remarks>
|
||||
<para>The value should be a string starting with "http://". If set, the link is displayed at the bottom of the dialog, however if <see cref="M:Gtk.AboutDialog.SetUriHook" /> has not been used, the URL will appear as plain text and not be clickable.</para>
|
||||
<para>
|
||||
<block subset="none" type="note">
|
||||
<see cref="P:Gtk.AboutDialog.WebsiteLabel" /> may be used to provide a plain-text label for the link.</block>
|
||||
</para>
|
||||
</remarks>
|
||||
</Docs>
|
||||
<Attributes>
|
||||
<Attribute>
|
||||
@ -238,9 +330,12 @@ To make constructing a <see cref="T:Gtk.AboutDialog" /> as convenient as possibl
|
||||
</ReturnValue>
|
||||
<Parameters />
|
||||
<Docs>
|
||||
<summary>Comments about the program.</summary>
|
||||
<value>a <see cref="T:System.String" /></value>
|
||||
<remarks>This string is displayed in a label in the main dialog, thus it should be a short explanation of the main purpose of the program, not a detailed list of features.</remarks>
|
||||
<summary>Gets and sets a comment about the program to appear immediately below the program name in the dialog.</summary>
|
||||
<value>A <see cref="T:System.String" /> object containing a comment, description, or subtitle for the program.</value>
|
||||
<remarks>
|
||||
<para>If unset, no comment text is displayed.</para>
|
||||
<para>This string is displayed in a label in the main dialog, thus it should be a short explanation of the main purpose of the program, not a detailed list of features.</para>
|
||||
</remarks>
|
||||
</Docs>
|
||||
<Attributes>
|
||||
<Attribute>
|
||||
@ -256,9 +351,9 @@ To make constructing a <see cref="T:Gtk.AboutDialog" /> as convenient as possibl
|
||||
</ReturnValue>
|
||||
<Parameters />
|
||||
<Docs>
|
||||
<summary>The version of the program.</summary>
|
||||
<value>a <see cref="T:System.String" /></value>
|
||||
<remarks />
|
||||
<summary>Get and set the version of the program.</summary>
|
||||
<value>A <see cref="T:System.String" /> object containing the version of the program.</value>
|
||||
<remarks>The most appropriate value to put here would be the assembly version, but any string is valid, eg "2.0.0.1", "2.5.3", "2.0 RC1", etc.</remarks>
|
||||
</Docs>
|
||||
<Attributes>
|
||||
<Attribute>
|
||||
@ -277,9 +372,13 @@ To make constructing a <see cref="T:Gtk.AboutDialog" /> as convenient as possibl
|
||||
</Parameters>
|
||||
<Docs>
|
||||
<summary>Installs a global function to be called whenever the user activates an email link in an about dialog.</summary>
|
||||
<param name="func">a <see cref="T:Gtk.AboutDialogActivateLinkFunc" /> to call when an email link is activated.</param>
|
||||
<returns>a <see cref="T:Gtk.AboutDialogActivateLinkFunc" />, the previous email hook.</returns>
|
||||
<remarks />
|
||||
<param name="func">A <see cref="T:Gtk.AboutDialogActivateLinkFunc" /> delegate to be called when an email link is activated.</param>
|
||||
<returns>The <see cref="T:Gtk.AboutDialogActivateLinkFunc" /> delegate that was previously used as the email hook.</returns>
|
||||
<remarks>If no hook is set, email addresses will appear in the dialogs as standard non-clickable text.
|
||||
|
||||
<example><para>The following example uses the built in <see cref="Gnome.Url.Show(System.String)" /> to open emails:</para><code lang="C#"> Gtk.AboutDialog.SetEmailHook(delegate(Gtk.AboutDialog dialog, string email) {
|
||||
Gnome.Url.Show("mailto:" + email);
|
||||
});</code></example></remarks>
|
||||
</Docs>
|
||||
</Member>
|
||||
<Member MemberName="SetUrlHook">
|
||||
@ -293,9 +392,17 @@ To make constructing a <see cref="T:Gtk.AboutDialog" /> as convenient as possibl
|
||||
</Parameters>
|
||||
<Docs>
|
||||
<summary>Installs a global function to be called whenever the user activates a URL link in an about dialog.</summary>
|
||||
<param name="func">a <see cref="T:Gtk.AboutDialogActivateLinkFunc" /> to call when a URL link is activated.</param>
|
||||
<returns>a <see cref="T:Gtk.AboutDialogActivateLinkFunc" /> that is the previous URL hook.</returns>
|
||||
<remarks />
|
||||
<param name="func">A <see cref="T:Gtk.AboutDialogActivateLinkFunc" /> to be called when a URL link is activated.</param>
|
||||
<returns>The <see cref="T:Gtk.AboutDialogActivateLinkFunc" /> delegate that was the previous used as the URL hook.</returns>
|
||||
<remarks>
|
||||
<para>If no hook is set, the <see cref="P:Gtk.AboutDialog.Website" /> will in the dialogs appear as standard non-clickable text.</para>
|
||||
<example>
|
||||
<para>The following example uses the built in <see cref="Gnome.Url.Show(System.String)" /> to open links:</para>
|
||||
<code lang="C#"> Gtk.AboutDialog.SetUrlHook(delegate(Gtk.AboutDialog dialog, string link) {
|
||||
Gnome.Url.Show(link);
|
||||
});</code>
|
||||
</example>
|
||||
</remarks>
|
||||
</Docs>
|
||||
</Member>
|
||||
<Member MemberName="Documenters">
|
||||
@ -310,9 +417,9 @@ To make constructing a <see cref="T:Gtk.AboutDialog" /> as convenient as possibl
|
||||
<ReturnType>System.String[]</ReturnType>
|
||||
</ReturnValue>
|
||||
<Docs>
|
||||
<summary>The people documenting the program.</summary>
|
||||
<value>a <see cref="T:System.String[]" />.</value>
|
||||
<remarks>Each string may contain email addresses and URLs, which will be displayed as links, see the introduction for more details.</remarks>
|
||||
<summary>Gets and sets the list of people who contributed documentation to the program.</summary>
|
||||
<value>A <see cref="T:System.String[]" /> containing the list of people who contributed documentation to the program.</value>
|
||||
<remarks>Each string may contain email addresses and URLs, which will be displayed as links. See the remarks on <see cref="T:Gtk.AboutDialog" /> for more details.</remarks>
|
||||
</Docs>
|
||||
</Member>
|
||||
<Member MemberName="Authors">
|
||||
@ -327,9 +434,9 @@ To make constructing a <see cref="T:Gtk.AboutDialog" /> as convenient as possibl
|
||||
<ReturnType>System.String[]</ReturnType>
|
||||
</ReturnValue>
|
||||
<Docs>
|
||||
<summary>The authors of the program.</summary>
|
||||
<value>a <see cref="T:System.String[]" />.</value>
|
||||
<remarks>Each string may contain email addresses and URLs, which will be displayed as links, see the introduction for more details.</remarks>
|
||||
<summary>Gets and sets the list of people who authored the program.</summary>
|
||||
<value>A <see cref="T:System.String[]" /> containing the list of people who authored the program.</value>
|
||||
<remarks>Each string may contain email addresses and URLs, which will be displayed as links. See the remarks on <see cref="T:Gtk.AboutDialog" /> for more details.</remarks>
|
||||
</Docs>
|
||||
</Member>
|
||||
<Member MemberName="Artists">
|
||||
@ -344,9 +451,9 @@ To make constructing a <see cref="T:Gtk.AboutDialog" /> as convenient as possibl
|
||||
<ReturnType>System.String[]</ReturnType>
|
||||
</ReturnValue>
|
||||
<Docs>
|
||||
<summary>The people who contributed artwork to the program.</summary>
|
||||
<value>a <see cref="T:System.String[]" />.</value>
|
||||
<remarks>Each string may contain email addresses and URLs, which will be displayed as links, see the introduction for more details.</remarks>
|
||||
<summary>Gets and sets the list of people who contributed artwork to the program.</summary>
|
||||
<value>A <see cref="T:System.String[]" /> containing the list of people who contributed artwork to the program.</value>
|
||||
<remarks>Each string may contain email addresses and URLs, which will be displayed as links. See the remarks on <see cref="T:Gtk.AboutDialog" /> for more details.</remarks>
|
||||
</Docs>
|
||||
</Member>
|
||||
<Member MemberName="WrapLicense">
|
||||
@ -361,12 +468,11 @@ To make constructing a <see cref="T:Gtk.AboutDialog" /> as convenient as possibl
|
||||
<ReturnType>System.Boolean</ReturnType>
|
||||
</ReturnValue>
|
||||
<Docs>
|
||||
<summary>Indicates if the License text is automatically wrapped.</summary>
|
||||
<value>
|
||||
<see langword="true" /> if the text is auto-wrapped.</value>
|
||||
<remarks />
|
||||
<summary>Gets and sets whether the text in the <see cref="P:Gtk.AboutDialog.License" /> is to be automatically wrapped.</summary>
|
||||
<value>If <see langword="true" />, the text is auto-wrapped. Otherwise long lines of text will extend past the edge of the frame and a horizontal scroll bar will appear.</value>
|
||||
<remarks>By default, this option is set to <see langword="false" />. Most standard licenses, as will be found in the LICENSE file of a package, are already manually wrapped and auto-wrapping is unneccessary an unwanted.</remarks>
|
||||
<since version="Gtk# 2.8" />
|
||||
</Docs>
|
||||
</Member>
|
||||
</Members>
|
||||
</Type>
|
||||
</Type>
|
@ -8,9 +8,19 @@
|
||||
<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>
|
||||
<param name="about">The <see cref="T:Gtk.AboutDialog" /> in which the link was activated.</param>
|
||||
<param name="link">The URL or email address to which the activated link points..</param>
|
||||
<summary>The type of the method which is called when a URL or email link in an about dialog.</summary>
|
||||
<remarks />
|
||||
<param name="link">A <see cref="T:System.String" /> containing the URL or email address to which the activated link points.</param>
|
||||
<summary>The type of the method which is called when a URL or email link in an <see cref="T:Gtk.AboutDialog" />.</summary>
|
||||
<remarks>
|
||||
<example>
|
||||
<para>The following example uses the built in <see cref="Gnome.Url.Show(System.String)" /> to open links:</para>
|
||||
<code lang="C#"> void OpenLink (Gtk.AboutDialog dialog, string link)
|
||||
{
|
||||
Gnome.Url.Show(link);
|
||||
}
|
||||
|
||||
Gtk.AboutDialog.SetUrlHook (new Gtk.AboutDialogActivateLinkFunc (OpenLink));</code>
|
||||
</example>
|
||||
</remarks>
|
||||
<since version="Gtk# 2.6" />
|
||||
</Docs>
|
||||
<Base>
|
||||
@ -24,4 +34,4 @@
|
||||
<Parameter Name="about" Type="Gtk.AboutDialog" />
|
||||
<Parameter Name="link" Type="System.String" />
|
||||
</Parameters>
|
||||
</Type>
|
||||
</Type>
|
@ -7,7 +7,7 @@
|
||||
</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>Event data.</summary>
|
||||
<summary>This class extends <see cref="M:GLib.SignalArgs" /> with information about an activated accelerator.</summary>
|
||||
<remarks>
|
||||
<para>The <see cref="M:Gtk.AccelGroup.AccelActivate" /> event invokes <see cref="T:Gtk.AccelActivateHandler" /> delegates which pass event data via this class.</para>
|
||||
</remarks>
|
||||
@ -24,8 +24,8 @@
|
||||
<ReturnValue />
|
||||
<Parameters />
|
||||
<Docs>
|
||||
<summary>Public Constructor.</summary>
|
||||
<remarks>Create a new <see cref="T:Gtk.AccelActivateArgs" /> instance with this constructor if you need to invoke a <see cref="T:Gtk.AccelActivateHandler" /> delegate.</remarks>
|
||||
<summary>Constructs and initializes a new instance of <see cref="T:Gtk.AccelActivatedArgs" /> with the default values.</summary>
|
||||
<remarks>When manually evoking an <see cref="T:Gtk.AccelActivateHandler" /> delegate, this constructor is used create the second argument.</remarks>
|
||||
</Docs>
|
||||
</Member>
|
||||
<Member MemberName="Acceleratable">
|
||||
@ -36,8 +36,8 @@
|
||||
</ReturnValue>
|
||||
<Parameters />
|
||||
<Docs>
|
||||
<summary>The object on which the accelerator was activated</summary>
|
||||
<value>a <see cref="T:GLib.Object" /></value>
|
||||
<summary>Gets the object on which the accelerator was activated.</summary>
|
||||
<value>A <see cref="T:GLib.Object" /> containing the object on which the accelerator was activated.</value>
|
||||
<remarks>
|
||||
</remarks>
|
||||
</Docs>
|
||||
@ -50,9 +50,11 @@
|
||||
</ReturnValue>
|
||||
<Parameters />
|
||||
<Docs>
|
||||
<summary>The accelerator keyval</summary>
|
||||
<value>a <see cref="T:System.UInt32" /></value>
|
||||
<summary>Gets the key value that was used to activate the accelerator.</summary>
|
||||
<value>A <see cref="T:System.UInt32" /> containing the key value that was used to activate the accelerator.</value>
|
||||
<remarks>
|
||||
<para>This value represents a specific non-modifier key on the keyboard.</para>
|
||||
<para>A key combination may include a standard key and modifier keys, for example <c>Ctrl-S</c>. Check <see cref="P:Gtk.AccelActivateArgs.Modifier" /> for the modifiers that were applied.</para>
|
||||
</remarks>
|
||||
</Docs>
|
||||
</Member>
|
||||
@ -64,11 +66,10 @@
|
||||
</ReturnValue>
|
||||
<Parameters />
|
||||
<Docs>
|
||||
<summary>The modifier combination of the accelerator</summary>
|
||||
<value>a <see cref="T:Gdk.ModifierType" /></value>
|
||||
<remarks>
|
||||
</remarks>
|
||||
<summary>Gets the mouse and keyboard modifier combination that was used to activate the accelerator.</summary>
|
||||
<value>A bitwise combined <see cref="T:Gdk.ModifierType" /> containing the mouse and keyboard modifier combination that was used to activate the accelerator.</value>
|
||||
<remarks>Modifiers can include Ctrl, Shift, Alt, Meta keys (Windows, Apple), and mouse buttons. These are items that by themselves my perform no task, but when combined, often with <see cref="P:Gtk.AccelActivateArgs" />, represent an accelerator. For example, <c>Ctrl-S</c>, <c>Ctrl-Alt-Del</c>, <c>Ctrl-Left Mouse Button</c>, or <c>Apple-Control-Reset</c>.</remarks>
|
||||
</Docs>
|
||||
</Member>
|
||||
</Members>
|
||||
</Type>
|
||||
</Type>
|
@ -7,14 +7,10 @@
|
||||
</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>
|
||||
<param name="o">Event sender.</param>
|
||||
<param name="args">Event arguments.</param>
|
||||
<summary>Event handler.</summary>
|
||||
<remarks>
|
||||
<para>The <see cref="M:Gtk.AccelGroup.AccelActivate" /> event utilizes this delegate:</para>
|
||||
<para>Event data is passed via the <see cref="T:Gtk.AccelActivateArgs" /> parameter.</para>
|
||||
<para>To attach a <see cref="T:Gtk.AccelActivateHandler" /> to an event, add the AccelActivateHandler instance to the event. The methods referenced by the AccelActivateHandler instance are invoked whenever the event is raised, until the AccelActivateHandler is removed from the event.</para>
|
||||
</remarks>
|
||||
<param name="o">A <see cref="T:System.Object" /> containing the object that sent the event.</param>
|
||||
<param name="args">A <see cref="T:Gtk.AccelActivateArgs" /> object containing information about the accelerator that was activated, including the key value and modifiiers.</param>
|
||||
<summary>This type of method is used for handling <see cref="E:Gtk.AccelGroup.AccelActivate" /> events.</summary>
|
||||
<remarks>A delegate of this type can be attached to a <see cref="T:Gtk.AccelGroup" /> to monitor the activation of events via <see cref="E:Gtk.AccelGroup.AccelActivate" />, however this is typically unneccessary, as most accelerators are bound directly to a widget and signal.</remarks>
|
||||
<since version="Gtk# 2.4" />
|
||||
</Docs>
|
||||
<Base>
|
||||
@ -28,4 +24,4 @@
|
||||
<Parameter Name="o" Type="System.Object" />
|
||||
<Parameter Name="args" Type="Gtk.AccelActivateArgs" />
|
||||
</Parameters>
|
||||
</Type>
|
||||
</Type>
|
@ -7,8 +7,52 @@
|
||||
</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 button to launch a font selection dialog.</summary>
|
||||
<summary>This class extends <see cref="T:Gtk.Button" />, providing an simple button for font selection.</summary>
|
||||
<remarks>
|
||||
<para>When clicked, a <see cref="T:Gtk.FontButton" /> shows a <see cref="T:Gtk.FontSelectionDialog" /> and when the dialog closes with a change, <see cref="E:Gtk.FontButton.FontSet" /> is evoked.</para>
|
||||
<example>
|
||||
<para>In the following example, a <see cref="T:Gtk.FontButton" /> is used to modify the font of a <see cref="T:Gtk.Label" />.</para>
|
||||
<code lang="C#">using System;
|
||||
using Gtk;
|
||||
using Pango;
|
||||
|
||||
public class FontButtonExample
|
||||
{
|
||||
static Label label;
|
||||
static FontButton button;
|
||||
|
||||
public static void Main ()
|
||||
{
|
||||
Application.Init ();
|
||||
|
||||
Window myWindow = new Window ("FontButton Example");
|
||||
myWindow.DeleteEvent += OnDelete;
|
||||
|
||||
button = new FontButton ();
|
||||
button.FontSet += OnFontSet;
|
||||
|
||||
label = new Label ("Sample text");
|
||||
|
||||
VBox box = new VBox ();
|
||||
box.Add (button);
|
||||
box.Add (label);
|
||||
|
||||
myWindow.Add (box);
|
||||
myWindow.ShowAll ();
|
||||
Application.Run ();
|
||||
}
|
||||
|
||||
static void OnFontSet (object o, EventArgs e)
|
||||
{
|
||||
label.ModifyFont (FontDescription.FromString (button.FontName));
|
||||
}
|
||||
|
||||
static void OnDelete (object o, DeleteEventArgs e)
|
||||
{
|
||||
Application.Quit ();
|
||||
}
|
||||
}</code>
|
||||
</example>
|
||||
</remarks>
|
||||
<since version="Gtk# 2.4" />
|
||||
</Docs>
|
||||
@ -38,8 +82,8 @@
|
||||
<Parameter Name="gtype" Type="GLib.GType" />
|
||||
</Parameters>
|
||||
<Docs>
|
||||
<summary>Protected Constructor.</summary>
|
||||
<param name="gtype">a <see cref="T:GLib.GType" /></param>
|
||||
<summary>Constructs and initializes a new instance of <see cref="T:Gtk.FontButton" /> for a specified native GLib type.</summary>
|
||||
<param name="gtype">A <see cref="T:GLib.GType" /> object containing the native GLib type for the new instance.</param>
|
||||
<remarks>Chain to this constructor if you have manually registered a native <see cref="T:GLib.GType" /> value for your subclass.</remarks>
|
||||
</Docs>
|
||||
<Attributes>
|
||||
@ -56,9 +100,9 @@
|
||||
<Parameter Name="raw" Type="System.IntPtr" />
|
||||
</Parameters>
|
||||
<Docs>
|
||||
<summary>Internal constructor</summary>
|
||||
<param name="raw">a <see cref="T:System.IntPtr" /></param>
|
||||
<remarks>This is not typically used by C# code.</remarks>
|
||||
<summary>Constructs and initializes a new instance of <see cref="T:Gtk.FontButton" /> using an existing unmanaged object as its base.</summary>
|
||||
<param name="raw">A <see cref="T:System.IntPtr" /> pointing to the raw object to be managed by the new instance.</param>
|
||||
<remarks>This is not typically used by managed code. It is primarily used for enclosing an existing object, created by unmanaged code, in a managed wrapper.</remarks>
|
||||
</Docs>
|
||||
</Member>
|
||||
<Member MemberName=".ctor">
|
||||
@ -67,9 +111,8 @@
|
||||
<ReturnValue />
|
||||
<Parameters />
|
||||
<Docs>
|
||||
<summary>Public constructor.</summary>
|
||||
<remarks>
|
||||
</remarks>
|
||||
<summary>Constructs and initializes a new instance of <see cref="T:Gtk.FontButton" /> with the default font.</summary>
|
||||
<remarks>To specify the default font on creation, use <see cref="C:Gtk.FontButton(System.String)" />.</remarks>
|
||||
</Docs>
|
||||
</Member>
|
||||
<Member MemberName=".ctor">
|
||||
@ -80,10 +123,9 @@
|
||||
<Parameter Name="fontname" Type="System.String" />
|
||||
</Parameters>
|
||||
<Docs>
|
||||
<summary>Public constructor with a font name.</summary>
|
||||
<param name="fontname">a <see cref="T:System.String" />, name of font to display in font selection dialog.</param>
|
||||
<remarks>
|
||||
</remarks>
|
||||
<summary>Constructs and initializes a new instance of <see cref="T:Gtk.FontButton" /> with a specified initial font.</summary>
|
||||
<param name="fontname">A <see cref="T:System.String" /> object containing the name of the initial font to use in the new instance.</param>
|
||||
<remarks>The value of <paramref name="fontname" /> is in the same format as described in the remarks on <see cref="P:Gtk.FontButton.FontName" />.</remarks>
|
||||
</Docs>
|
||||
</Member>
|
||||
<Member MemberName="GType">
|
||||
@ -94,9 +136,9 @@
|
||||
</ReturnValue>
|
||||
<Parameters />
|
||||
<Docs>
|
||||
<summary>GType Property.</summary>
|
||||
<value>a <see cref="T:GLib.GType" /></value>
|
||||
<remarks>Returns the native <see cref="T:GLib.GType" /> value for <see cref="T:Gtk.FontButton" />.</remarks>
|
||||
<summary>Gets the GLib type of the current instance.</summary>
|
||||
<value>A <see cref="T:GLib.GType" /> value representing the native GLib type of <see cref="T:Gtk.FontButton" />.</value>
|
||||
<remarks>The value is used internally by the GLib type management system.</remarks>
|
||||
</Docs>
|
||||
</Member>
|
||||
<Member MemberName="ShowSize">
|
||||
@ -107,10 +149,11 @@
|
||||
</ReturnValue>
|
||||
<Parameters />
|
||||
<Docs>
|
||||
<summary>If this property is <see langword="true" />, the font size will be displayed along with the name of the selected font.</summary>
|
||||
<value>a <see cref="T:System.Boolean" /></value>
|
||||
<remarks>
|
||||
</remarks>
|
||||
<summary>Gets and sets whether or not to show the font size in the button.</summary>
|
||||
<value>
|
||||
<para>A <see cref="T:System.Boolean" />. If <see langword="true" />, the font size will be displayed in the button.</para>
|
||||
</value>
|
||||
<remarks>Default Value: <see langword="true" /></remarks>
|
||||
</Docs>
|
||||
<Attributes>
|
||||
<Attribute>
|
||||
@ -126,11 +169,11 @@
|
||||
</ReturnValue>
|
||||
<Parameters />
|
||||
<Docs>
|
||||
<summary>
|
||||
If this property is set to <see langword="true" />, the selected font size will be shown in the label.
|
||||
</summary>
|
||||
<value>a <see cref="T:System.Boolean" /></value>
|
||||
<remarks>For a more WYSIWYG way to show the selected size, see the <see cref="P:Gtk.FontButton.UseSize" /> property.</remarks>
|
||||
<summary>Gets and sets whether or not button label should be displayed using the selected font size.</summary>
|
||||
<value>
|
||||
<para>A <see cref="T:System.Boolean" />. If <see langword="true" />, the button label will be displayed using the selected font size. Otherwise in the default system font size.</para>
|
||||
</value>
|
||||
<remarks>For a more WYSIWYG way to show the selected size, see the <see cref="P:Gtk.FontButton.UseFont" /> property.</remarks>
|
||||
</Docs>
|
||||
<Attributes>
|
||||
<Attribute>
|
||||
@ -146,9 +189,11 @@
|
||||
</ReturnValue>
|
||||
<Parameters />
|
||||
<Docs>
|
||||
<summary>Retrieves the name of the currently selected font.</summary>
|
||||
<value>a <see cref="T:System.String" /></value>
|
||||
<summary>Gets and sets the name of the currently selected font, including the style and size.</summary>
|
||||
<value>A <see cref="T:System.String" /> object containing the name of the currently selected font, including the style and font.</value>
|
||||
<remarks>
|
||||
<para>The font name contains the name, style, and size. For example, <c>"Bistream Vera Serif Bold Italic 24"</c>. If the style is not specified, <c>"Regular"</c> is assumed, and if the size is not specified, <c>"0"</c> is assumed.</para>
|
||||
<para>Default Value: <c>"Sans 12"</c>. This value is identical to the one that would be used by <see cref="M:Gdk.Font.Load(System.String)" /> and <see cref="M:Pango.FontDescription.FromString(System.String)" />.</para>
|
||||
</remarks>
|
||||
</Docs>
|
||||
<Attributes>
|
||||
@ -165,10 +210,11 @@
|
||||
</ReturnValue>
|
||||
<Parameters />
|
||||
<Docs>
|
||||
<summary>Whether the label is drawn in the selected font.</summary>
|
||||
<value>a <see cref="T:System.Boolean" /></value>
|
||||
<remarks>
|
||||
</remarks>
|
||||
<summary>Gets and sets whether or not button label should be displayed using the selected font.</summary>
|
||||
<value>
|
||||
<para>A <see cref="T:System.Boolean" />. If <see langword="true" />, the button label will be displayed using the selected font. Otherwise in the default system font.</para>
|
||||
</value>
|
||||
<remarks>Default Value: <see langword="false" /></remarks>
|
||||
</Docs>
|
||||
<Attributes>
|
||||
<Attribute>
|
||||
@ -184,10 +230,9 @@
|
||||
</ReturnValue>
|
||||
<Parameters />
|
||||
<Docs>
|
||||
<summary>The title of the font dialog.</summary>
|
||||
<value>a <see cref="T:System.String" /></value>
|
||||
<remarks>
|
||||
</remarks>
|
||||
<summary>Gets and sets the title used for the <see cref="T:Gtk.FontSelectionDialog" /> created by the currrent instance.</summary>
|
||||
<value>A <see cref="T:System.String" /> object containing the title used for the <see cref="T:Gtk.FontSelectionDialog" /> created by the currrent instance.</value>
|
||||
<remarks>Default Value: <c>"Pick a Font"</c> or a translated version.</remarks>
|
||||
</Docs>
|
||||
<Attributes>
|
||||
<Attribute>
|
||||
@ -203,10 +248,11 @@
|
||||
</ReturnValue>
|
||||
<Parameters />
|
||||
<Docs>
|
||||
<summary>Returns whether the name of the font style will be shown in the label.</summary>
|
||||
<value>a <see cref="T:System.Boolean" /></value>
|
||||
<remarks>
|
||||
</remarks>
|
||||
<summary>Gets and sets whether or not the font style will be shown with the font name in the button.</summary>
|
||||
<value>
|
||||
<para>A <see cref="T:System.Boolean" />. If <see langword="true" />, the font style will be displayed along with the name of the selected font, unless the style is "Regular".</para>
|
||||
</value>
|
||||
<remarks>Default Value: <see langword="true" /></remarks>
|
||||
</Docs>
|
||||
<Attributes>
|
||||
<Attribute>
|
||||
@ -222,9 +268,8 @@
|
||||
</ReturnValue>
|
||||
<Parameters />
|
||||
<Docs>
|
||||
<summary>Event raised when the font is set.</summary>
|
||||
<remarks>
|
||||
</remarks>
|
||||
<summary>This event is raised when the user closes the child <see cref="T:Gtk.FontSelectionDialog" /> after making a change.</summary>
|
||||
<remarks>Child classes should override <see cref="M:Gtk.FontButton.OnFontSet" /> instead of adding a handler to this event.</remarks>
|
||||
</Docs>
|
||||
<Attributes>
|
||||
<Attribute>
|
||||
@ -242,13 +287,12 @@
|
||||
<Parameter Name="fontname" Type="System.String" />
|
||||
</Parameters>
|
||||
<Docs>
|
||||
<summary>Sets or updates the currently-displayed font in font picker dialog.</summary>
|
||||
<param name="fontname">a <see cref="T:System.String" />, name of font to display in font selection dialog</param>
|
||||
<returns>A string containing the font name if the
|
||||
font selection dialog exists, otherwise <see langword="false" />.</returns>
|
||||
<summary>Sets or updates the font displayed in the child <see cref="T:Gtk.FontSelectionDialog" />.</summary>
|
||||
<param name="fontname">A <see cref="T:System.String" /> object containing the name of the font to display in the child <see cref="T:Gtk.FontSelectionDialog" />.</param>
|
||||
<returns>The result of <see cref="M:Gtk.FontSelectionDialog.SetFontName(System.String)" /> if the child dialog exists. Otherwise <see langword="false" />.</returns>
|
||||
<remarks>
|
||||
</remarks>
|
||||
</Docs>
|
||||
</Member>
|
||||
</Members>
|
||||
</Type>
|
||||
</Type>
|
Loading…
Reference in New Issue
Block a user