mirror of
https://github.com/Ryujinx/GtkSharp.git
synced 2024-12-24 15:45:38 +00:00
Documentation contributions from kevin.eeckman@gmail.com
svn path=/trunk/gtk-sharp/; revision=63005
This commit is contained in:
parent
bcf941851d
commit
66c4025593
|
@ -387,16 +387,15 @@ public class ButtonApp {
|
|||
<Docs>
|
||||
<summary>Creates a new <see cref="T:Gtk.Button" /> containing the image and text from a stock item.</summary>
|
||||
<param name="stock_id">a <see cref="T:System.String" /></param>
|
||||
<remarks>The valid names of Stock items can be found in the <see cref="T:Gtk.Stock" /> class.
|
||||
<remarks>The valid names of Stock items can be found in the <see cref="T:Gtk.Stock" /> class. If <paramref name="stock_id" /> is unknown, then it will be treated as a simple label.
|
||||
|
||||
|
||||
<para>
|
||||
This for example creates a stock OK button:
|
||||
This for example creates a stock OK button. It sets a localized label, a standard icon (choosed from your GTK theme), and the appropriate keyboard accelerator:
|
||||
</para><example>
|
||||
<code lang="C#">
|
||||
Button b = new Button (Stock.Ok);
|
||||
</code>
|
||||
</example></remarks>
|
||||
</code></example></remarks>
|
||||
</Docs>
|
||||
</Member>
|
||||
<Member MemberName="GType">
|
||||
|
@ -671,4 +670,4 @@ This for example creates a stock OK button:
|
|||
</Attributes>
|
||||
</Member>
|
||||
</Members>
|
||||
</Type>
|
||||
</Type>
|
|
@ -7,40 +7,34 @@
|
|||
</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 dialog box for choosing files.</summary>
|
||||
<summary>
|
||||
<see cref="T:Gtk.FileChooserDialog" /> is a dialog box suitable for use with "File/Open" or "File/Save as" commands. This widget works by putting a <see cref="T:Gtk.FileChooserWidget" /> inside a <see cref="T:Gtk.Dialog" />. It exposes the <see cref="T:Gtk.FileChooser" /> interface, so you can use all of the <see cref="T:Gtk.FileChooser" /> functions on the file chooser dialog as well as those for <see cref="T:Gtk.Dialog" />.</summary>
|
||||
<remarks>Similar to <see cref="T:Gtk.FileChooserWidget" /> but in a dialog.
|
||||
|
||||
<para /><example>
|
||||
<code lang="C#">
|
||||
static string Open (FileChooserAction action)
|
||||
{
|
||||
string title = Catalog.GetString ("Open");
|
||||
|
||||
if (action == FileChooserAction.SelectFolder)
|
||||
title = Catalog.GetString ("Select Folder");
|
||||
<para> Typical usage. In the simplest of cases, you can use the following code to select a file for opening:
|
||||
<example>
|
||||
<code lang="C#">
|
||||
public class MainWindow: Gtk.Window {
|
||||
|
||||
protected virtual void OnBtnLoadFileClicked(object sender, System.EventArgs e)
|
||||
{
|
||||
Gtk.FileChooserDialog fc=
|
||||
new Gtk.FileChooserDialog("Choose the file to open",
|
||||
this,
|
||||
FileChooserAction.Open,
|
||||
"Cancel",ResponseType.Cancel,
|
||||
"Open",ResponseType.Accept);
|
||||
|
||||
FileChooserDialog chooser = new FileChooserDialog (title,
|
||||
window,
|
||||
action);
|
||||
|
||||
chooser.AddButton (Stock.Cancel, ResponseType.Cancel);
|
||||
chooser.AddButton (Stock.Open, ResponseType.Ok);
|
||||
|
||||
chooser.SetUri (uri.ToString ());
|
||||
int response = chooser.Run ();
|
||||
|
||||
string ret = null;
|
||||
|
||||
if ((ResponseType) response == ResponseType.Ok) {
|
||||
ret = chooser.Uri;
|
||||
}
|
||||
|
||||
chooser.Destroy ();
|
||||
return ret;
|
||||
}
|
||||
|
||||
</code>
|
||||
</example></remarks>
|
||||
if (fc.Run() == (int)ResponseType.Accept)
|
||||
{
|
||||
System.IO.FileStream file=System.IO.File.OpenRead(fc.Filename);
|
||||
file.Close();
|
||||
}
|
||||
//Don't forget to call Destroy() or the FileChooserDialog window won't get closed.
|
||||
fc.Destroy();
|
||||
}
|
||||
</code></example></para></remarks>
|
||||
<since version="Gtk# 2.4" />
|
||||
</Docs>
|
||||
<Base>
|
||||
|
@ -1001,10 +995,10 @@ static string Open (FileChooserAction action)
|
|||
<Docs>
|
||||
<summary>Creates a file chooser dialog.</summary>
|
||||
<param name="title">a title <see cref="T:System.String" /></param>
|
||||
<param name="parent">a parent <see cref="T:Gtk.Window" /> for the dialog, or <see langword="null" />.</param>
|
||||
<param name="parent">a parent <see cref="T:Gtk.Window" /> for the dialog, or <see langword="null" />. See <see cref="P:Gtk.Window.TransientFor" />.</param>
|
||||
<param name="action">an action, for example save or open.</param>
|
||||
<param name="button_data">a list of button text/response pairs for buttons to be added to the dialog, if desired.</param>
|
||||
<remarks />
|
||||
<param name="button_data">a list of button text/response pairs for buttons to be added to the dialog, if desired. The pair format is <see cref="T:System.String" />, <see cref="T:Gtk.ResponseType" /> (see an example in overview section of <see cref="T:Gtk.FileChooserDialog" />)</param>
|
||||
<remarks>By default, a <see cref="T:Gtk.FileChooserDialog" /> comes with no buttons, so you'd better provide at least the most basics one (Save/Cancel or Open/Cancel) or your user won't be able to do anything apart from closing the dialog ( closing the dialog returns <see cref="T:ResponseType" />.None )</remarks>
|
||||
</Docs>
|
||||
</Member>
|
||||
<Member MemberName=".ctor">
|
||||
|
|
|
@ -335,8 +335,7 @@
|
|||
<Docs>
|
||||
<summary>The text from a label widget including any embedded underlines indicating mnemonics and Pango markup.</summary>
|
||||
<value>The text of the label widget.</value>
|
||||
<remarks>
|
||||
</remarks>
|
||||
<remarks>You can include markup tags to change your text appearance. See <see cref="P:Gtk.Label.UseMarkup" /> for more information.</remarks>
|
||||
</Docs>
|
||||
<Attributes>
|
||||
<Attribute>
|
||||
|
@ -437,9 +436,56 @@
|
|||
<Parameters>
|
||||
</Parameters>
|
||||
<Docs>
|
||||
<summary>Whether the label's text is interpreted as marked up with the Pango text markup language.</summary>
|
||||
<value />
|
||||
<remarks />
|
||||
<summary>Whether the label's text is interpreted as marked up with the Pango text markup language ( more information at http://developer.gnome.org/doc/API/2.0/pango/PangoMarkupFormat.html ).</summary>
|
||||
<value>
|
||||
<see langword="true" /> if the label's text should be parsed for markup</value>
|
||||
<remarks>Here are a few examples of the markup you can use:
|
||||
<list type="table">
|
||||
<listheader>
|
||||
<term>Tag</term>
|
||||
<description>Description</description>
|
||||
</listheader>
|
||||
<item>
|
||||
<term><b></term>
|
||||
<description>Bold</description>
|
||||
</item>
|
||||
<item>
|
||||
<term><big></term>
|
||||
<description>Makes font relatively larger</description>
|
||||
</item>
|
||||
<item>
|
||||
<term><i></term>
|
||||
<description>Italic</description>
|
||||
</item>
|
||||
<item>
|
||||
<term><s></term>
|
||||
<description>Strikethrough</description>
|
||||
</item>
|
||||
<item>
|
||||
<term><sub></term>
|
||||
<description>Subscript</description>
|
||||
</item>
|
||||
<item>
|
||||
<term><sup></term>
|
||||
<description>Superscript</description>
|
||||
</item>
|
||||
<item>
|
||||
<term><small></term>
|
||||
<description>Makes font relatively smaller</description>
|
||||
</item>
|
||||
<item>
|
||||
<term><tt></term>
|
||||
<description>Monospace font</description>
|
||||
</item>
|
||||
<item>
|
||||
<term><u></term>
|
||||
<description>Underline</description>
|
||||
</item></list><example>
|
||||
<code lang="C#">
|
||||
Gtk.Label label = new Gtk.Label();
|
||||
label.LabelProp = "The brown <u>fox</u> etc. and the <big>lazy</big> dog";
|
||||
label.UseMarkup = true;
|
||||
</code></example></remarks>
|
||||
</Docs>
|
||||
<Attributes>
|
||||
<Attribute>
|
||||
|
@ -806,4 +852,4 @@
|
|||
</Docs>
|
||||
</Member>
|
||||
</Members>
|
||||
</Type>
|
||||
</Type>
|
Loading…
Reference in a new issue