* TestFileSelection.cs: Update to reflect FileSelection changes.

* sources/Gtk.metadata: Add GetLayoutOffsets to the rule for out params.

* gtk/FileSelection.custom (Button): Rename to FSButton, so that
we won't wipe out our original Gtk.Button docs.

svn path=/trunk/gtk-sharp/; revision=11761
This commit is contained in:
Duncan Mak 2003-02-20 04:03:15 +00:00
parent e6f24508c4
commit 8e10c2d7ff
7 changed files with 349 additions and 26 deletions

View file

@ -1,3 +1,10 @@
2003-02-19 Duncan Mak <duncan@ximian.com>
* sources/Gtk.metadata: Add GetLayoutOffsets to the rule for out params.
* gtk/FileSelection.custom (Button): Rename to FSButton, so that
we won't wipe out our original Gtk.Button docs.
2003-02-19 Mike Kestner <mkestner@speakeasy.net> 2003-02-19 Mike Kestner <mkestner@speakeasy.net>
* generator/GenBase.cs : mark #line 1 for .customs * generator/GenBase.cs : mark #line 1 for .customs

View file

@ -1,5 +1,5 @@
<Type Name="Button" FullName="Gtk.FileSelection+Button"> <Type Name="Button" FullName="Gtk.Button">
<TypeSignature Language="C#" Value="public class Button : Gtk.Button, Implementor, IWrapper, IWrapper, IDisposable" Maintainer="auto" /> <TypeSignature Language="C#" Value="public class Button : Gtk.Bin, Implementor, IWrapper, IWrapper, IDisposable" Maintainer="Duncan Mak" />
<AssemblyInfo> <AssemblyInfo>
<AssemblyName>gtk-sharp</AssemblyName> <AssemblyName>gtk-sharp</AssemblyName>
<AssemblyVersion>0.0.0.0</AssemblyVersion> <AssemblyVersion>0.0.0.0</AssemblyVersion>
@ -7,11 +7,18 @@
</AssemblyInfo> </AssemblyInfo>
<ThreadSafetyStatement>To be added</ThreadSafetyStatement> <ThreadSafetyStatement>To be added</ThreadSafetyStatement>
<Docs> <Docs>
<summary>To be added</summary> <summary>A widget that creates a signal when clicked on.</summary>
<remarks>To be added</remarks> <remarks>
<para>
The GtkButton widget is generally used to attach a function to that is called when the button is pressed. The various signals and how to use them are outlined below.
</para>
<para>
The GtkButton widget can hold any valid child widget. That is it can hold most any other standard <see cref="T:Gtk.Widget"/>. The most commonly used child is the <see cref="T:Gtk.Label"/>.
</para>
</remarks>
</Docs> </Docs>
<Base> <Base>
<BaseTypeName>Gtk.Button</BaseTypeName> <BaseTypeName>Gtk.Bin</BaseTypeName>
</Base> </Base>
<Interfaces> <Interfaces>
<Interface> <Interface>
@ -29,33 +36,340 @@
</Interfaces> </Interfaces>
<Attributes /> <Attributes />
<Members> <Members>
<Member MemberName="ActionGetType">
<MemberSignature Language="C#" Value="public static uint ActionGetType ();" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.UInt32</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>To be added</summary>
<returns>To be added: an object of type 'uint'</returns>
<remarks>To be added</remarks>
</Docs>
</Member>
<Member MemberName="NewWithLabel">
<MemberSignature Language="C#" Value="public static Gtk.Button NewWithLabel (string label);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>Gtk.Button</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="label" Type="System.String" />
</Parameters>
<Docs>
<summary>Creates a <see cref="T:Gtk.Button"/> widget with a <see cref="T:Gtk.Label"/> child containing the given text.</summary>
<param name="label">The text you want the <see cref="T:Gtk.Label"/> to hold.</param>
<returns>The newly created <see cref="T:Gtk.Button"/> widget.</returns>
<remarks>Creates a <see cref="T:Gtk.Button"/> widget with a <see cref="T:Gtk.Label"/> child containing the given text.</remarks>
</Docs>
</Member>
<Member MemberName="NewFromStock">
<MemberSignature Language="C#" Value="public static Gtk.Button NewFromStock (string stock_id);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>Gtk.Button</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="stock_id" Type="System.String" />
</Parameters>
<Docs>
<summary>Creates a new <see cref="TGtk.Button"/> containing the image and text from a stock item.</summary>
<param name="stock_id">To be added: an object of type 'string'</param>
<returns>To be added: an object of type 'Gtk.Button'</returns>
<remarks>
<para>
Creates a new <see cref="T:Gtk.Button"/> containing the image and text from a stock item. Some stock ids are available from the <see cref="T:Gtk.Stock"/> class.
</para>
<para>
If <paramref name="stock_id"/> is unknown, then it will be treated as a mnemonic label (similar to <see cref="C:Gtk.Button"/>).
</para>
</remarks>
</Docs>
</Member>
<Member MemberName="Leave">
<MemberSignature Language="C#" Value="public void Leave ();" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Emits a <see cref="E:Gtk.Button.Left"/> event to the given <see cref="T:Gtk.Button"/>.</summary>
<remarks>Emits a <see cref="E:Gtk.Button.Left"/> event to the given <see cref="T:Gtk.Button"/>.</remarks>
</Docs>
</Member>
<Member MemberName="Press">
<MemberSignature Language="C#" Value="public void Press ();" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Emits a <see cref="E:Gtk.Button.Pressed"/> event to the given <see cref="T:Gtk.Button"/>.</summary>
<remarks>Emits a <see cref="E:Gtk.Button.Pressed"/> event to the given <see cref="T:Gtk.Button"/>.</remarks>
</Docs>
</Member>
<Member MemberName="Release">
<MemberSignature Language="C#" Value="public void Release ();" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Emits a <see cref="E:Gtk.Button.Released"/> event to the given <see cref="T:Gtk.Button"/>.</summary>
<remarks>Emits a <see cref="E:Gtk.Button.Released"/> event to the given <see cref="T:Gtk.Button"/>.</remarks>
</Docs>
</Member>
<Member MemberName="Click">
<MemberSignature Language="C#" Value="public void Click ();" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Emits a <see cref="E:Gtk.Button.Clicked"/> event to the given <see cref="T:Gtk.Button"/>.</summary>
<remarks>Emits a <see cref="E:Gtk.Button.Clicked"/> event to the given <see cref="T:Gtk.Button"/>.</remarks>
</Docs>
</Member>
<Member MemberName="Enter">
<MemberSignature Language="C#" Value="public void Enter ();" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Emits a <see cref="E:Gtk.Button.Entered"/> event to the given <see cref="T:Gtk.Button"/>.</summary>
<remarks>Emits a <see cref="E:Gtk.Button.Entered"/> event to the given <see cref="T:Gtk.Button"/>.</remarks>
</Docs>
</Member>
<Member MemberName="Finalize">
<MemberSignature Language="C#" Value="protected virtual void Finalize ();" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>To be added</summary>
<remarks>To be added</remarks>
</Docs>
</Member>
<Member MemberName=".ctor"> <Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public Button (Gtk.FileSelection fs, IntPtr raw);" /> <MemberSignature Language="C#" Value="protected Button (uint gtype);" />
<MemberType>Constructor</MemberType>
<ReturnValue />
<Parameters>
<Parameter Name="gtype" Type="System.UInt32" />
</Parameters>
<Docs>
<summary>To be added</summary>
<param name="gtype">To be added: an object of type 'uint'</param>
<returns>To be added: an object of type 'Gtk.Button'</returns>
<remarks>To be added</remarks>
</Docs>
</Member>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public Button (IntPtr raw);" />
<MemberType>Constructor</MemberType> <MemberType>Constructor</MemberType>
<ReturnValue /> <ReturnValue />
<Parameters> <Parameters>
<Parameter Name="fs" Type="Gtk.FileSelection" />
<Parameter Name="raw" Type="System.IntPtr" /> <Parameter Name="raw" Type="System.IntPtr" />
</Parameters> </Parameters>
<Docs> <Docs>
<summary>To be added</summary> <summary>To be added</summary>
<param name="fs">To be added: an object of type 'Gtk.FileSelection'</param>
<param name="raw">To be added: an object of type 'IntPtr'</param> <param name="raw">To be added: an object of type 'IntPtr'</param>
<returns>To be added: an object of type 'Gtk.FileSelection+Button'</returns> <returns>To be added: an object of type 'Gtk.Button'</returns>
<remarks>To be added</remarks> <remarks>To be added</remarks>
</Docs> </Docs>
</Member> </Member>
<Member MemberName="FileSelection"> <Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public Gtk.FileSelection FileSelection { get; };" /> <MemberSignature Language="C#" Value="public Button ();" />
<MemberType>Constructor</MemberType>
<ReturnValue />
<Parameters />
<Docs>
<summary>Creates an empty <see cref="T:Gtk.Button"/> widget.</summary>
<returns>The newly created <see cref="T:Gtk.Button"/> widget.</returns>
<remarks>Creates a new <see cref="T:Gtk.Button"/> widget. To add a child widget to the button, use <see cref="M:Gtk.Container.Add"/>.</remarks>
</Docs>
</Member>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public Button (string label);" />
<MemberType>Constructor</MemberType>
<ReturnValue />
<Parameters>
<Parameter Name="label" Type="System.String" />
</Parameters>
<Docs>
<summary>Creates a <see cref="T:Gtk.Button"/> widget with a <see cref="T:Gtk.Label"/> child containing the given text.</summary>
<param name="label">The text you want the <see cref="T:Gtk.Label"/> to hold.</param>
<returns>The newly created <see cref="T:Gtk.Button"/> widget.</returns>
<remarks>To be added</remarks>
</Docs>
</Member>
<Member MemberName="GType">
<MemberSignature Language="C#" Value="public static uint GType { get; };" />
<MemberType>Property</MemberType> <MemberType>Property</MemberType>
<ReturnValue> <ReturnValue>
<ReturnType>Gtk.FileSelection</ReturnType> <ReturnType>System.UInt32</ReturnType>
</ReturnValue> </ReturnValue>
<Docs> <Docs>
<summary>To be added</summary> <summary>To be added</summary>
<returns>To be added: an object of type 'Gtk.FileSelection'</returns> <returns>To be added: an object of type 'uint'</returns>
<remarks>To be added</remarks> <remarks>To be added</remarks>
</Docs> </Docs>
</Member> </Member>
<Member MemberName="UseStock">
<MemberSignature Language="C#" Value="public bool UseStock { set; get; };" />
<MemberType>Property</MemberType>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="value" Type="System.Boolean" />
</Parameters>
<Docs>
<summary>The button label is a stock item.</summary>
<param name="value"><see cref="langword:true"/> if the button should use a stock item.</param>
<returns><see cref="langword:true"/> if the button label is used to select a stock item instead of being used directly as the label text.</returns>
<remarks>
<para>
Sets whether the button label is a stock item. If <see cref="langword:true"/> if the button label is used to select a stock item instead of being used directly as the label text.
</para>
</remarks>
</Docs>
</Member>
<Member MemberName="UseUnderline">
<MemberSignature Language="C#" Value="public bool UseUnderline { set; get; };" />
<MemberType>Property</MemberType>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="value" Type="System.Boolean" />
</Parameters>
<Docs>
<summary>Sets whether an embedded underline in the button label indicates a mnemonic.</summary>
<param name="value"><see cref="langword:true"/> if underlines in the text indicate mnemonics.</param>
<returns><see cref="langword:true"/> if an embedded underline in the button label indicates the mnemonic accelerator keys.</returns>
<remarks>
<para>Sets whether an embedded underline in the button label indicates a mnemonic.</para>
</remarks>
</Docs>
</Member>
<Member MemberName="Relief">
<MemberSignature Language="C#" Value="public Gtk.ReliefStyle Relief { set; get; };" />
<MemberType>Property</MemberType>
<ReturnValue>
<ReturnType>Gtk.ReliefStyle</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="value" Type="Gtk.ReliefStyle" />
</Parameters>
<Docs>
<summary>To be added</summary>
<param name="value">To be added: an object of type 'Gtk.ReliefStyle'</param>
<returns>To be added: an object of type 'Gtk.ReliefStyle'</returns>
<remarks>To be added</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>
<Parameter Name="value" Type="System.String" />
</Parameters>
<Docs>
<summary>The text from the label of the button.</summary>
<param name="value">A string</param>
<returns>The text of the label widget.</returns>
<remarks>
<para>
Sets or gets the text from the label of the button. If the label text has not been set the return value will be <see cref="langword:null"/>. This will be the case if you create an empty button to use as a container.
</para>
</remarks>
</Docs>
</Member>
<Member MemberName="Activated">
<MemberSignature Language="C#" Value="public event EventHandler Activated;" />
<MemberType>Event</MemberType>
<ReturnValue />
<Parameters />
<Docs>
<summary>To be added</summary>
<remarks>To be added</remarks>
</Docs>
</Member>
<Member MemberName="Clicked">
<MemberSignature Language="C#" Value="public event EventHandler Clicked;" />
<MemberType>Event</MemberType>
<ReturnValue />
<Parameters />
<Docs>
<summary>Emitted when a button clicked on by the mouse and the cursor stays on the button.</summary>
<remarks>
<para>
Emitted when a button clicked on by the mouse and the cursor stays on the button. If the cursor is not on the button when the mouse button is released, the signal is not emitted.
</para>
</remarks>
</Docs>
</Member>
<Member MemberName="Left">
<MemberSignature Language="C#" Value="public event EventHandler Left;" />
<MemberType>Event</MemberType>
<ReturnValue />
<Parameters />
<Docs>
<summary>Emitted when the mouse cursor leaves the region of the button.</summary>
<remarks>
<para>Emitted when the mouse cursor leaves the region of the button.</para>
</remarks>
</Docs>
</Member>
<Member MemberName="Pressed">
<MemberSignature Language="C#" Value="public event EventHandler Pressed;" />
<MemberType>Event</MemberType>
<ReturnValue />
<Parameters />
<Docs>
<summary>Emitted when the button is initially pressed.</summary>
<remarks>
<para>Emitted when the button is initially pressed.</para>
</remarks>
</Docs>
</Member>
<Member MemberName="Released">
<MemberSignature Language="C#" Value="public event EventHandler Released;" />
<MemberType>Event</MemberType>
<ReturnValue />
<Parameters />
<Docs>
<summary>Emitted when a button which is pressed is released, no matter where the mouse cursor is.</summary>
<remarks>
<para>Emitted when a button which is pressed is released, no matter where the mouse cursor is.</para>
</remarks>
</Docs>
</Member>
<Member MemberName="Entered">
<MemberSignature Language="C#" Value="public event EventHandler Entered;" />
<MemberType>Event</MemberType>
<ReturnValue />
<Parameters />
<Docs>
<summary>Emitted when the mouse cursor enters the region of the button.</summary>
<remarks>
<para>Emitted when the mouse cursor enters the region of the button.</para>
</remarks>
</Docs>
</Member>
</Members> </Members>
</Type> </Type>

View file

@ -1,5 +1,5 @@
<Type Name="ScrolledWindow" FullName="Gtk.ScrolledWindow"> <Type Name="ScrolledWindow" FullName="Gtk.ScrolledWindow">
<TypeSignature Language="C#" Value="public class ScrolledWindow : Gtk.Bin, Implementor, IWrapper, IWrapper, IDisposable" Maintainer="auto" /> <TypeSignature Language="C#" Value="public class ScrolledWindow : Gtk.Bin, Implementor, IWrapper, IWrapper, IDisposable" Maintainer="Duncan Mak" />
<AssemblyInfo> <AssemblyInfo>
<AssemblyName>gtk-sharp</AssemblyName> <AssemblyName>gtk-sharp</AssemblyName>
<AssemblyVersion>0.0.0.0</AssemblyVersion> <AssemblyVersion>0.0.0.0</AssemblyVersion>

View file

@ -9,14 +9,14 @@
// This code is inserted after the automatically generated code. // This code is inserted after the automatically generated code.
// //
public class Button : Gtk.Button { public class FSButton : Gtk.Button {
private FileSelection file_sel; FileSelection file_sel;
public FileSelection FileSelection { public FileSelection FileSelection {
get { return file_sel; } get { return file_sel; }
} }
public Button (FileSelection fs, IntPtr raw) : base (raw) { public FSButton (FileSelection fs, IntPtr raw) : base (raw) {
file_sel = fs; file_sel = fs;
} }
} }
@ -48,19 +48,19 @@ public Gtk.Label SelectionText {
[DllImport("gtksharpglue")] [DllImport("gtksharpglue")]
static extern IntPtr gtksharp_file_selection_get_ok_button (IntPtr i); static extern IntPtr gtksharp_file_selection_get_ok_button (IntPtr i);
public Gtk.Button OkButton { public Gtk.Button OkButton {
get { return new Button (this, gtksharp_file_selection_get_ok_button (this.Handle)); } get { return new FSButton (this, gtksharp_file_selection_get_ok_button (this.Handle)); }
} }
[DllImport("gtksharpglue")] [DllImport("gtksharpglue")]
static extern IntPtr gtksharp_file_selection_get_cancel_button (IntPtr i); static extern IntPtr gtksharp_file_selection_get_cancel_button (IntPtr i);
public Gtk.Button CancelButton { public Gtk.Button CancelButton {
get { return new Button (this, gtksharp_file_selection_get_cancel_button (this.Handle)); } get { return new FSButton (this, gtksharp_file_selection_get_cancel_button (this.Handle)); }
} }
[DllImport("gtksharpglue")] [DllImport("gtksharpglue")]
static extern IntPtr gtksharp_file_selection_get_help_button (IntPtr i); static extern IntPtr gtksharp_file_selection_get_help_button (IntPtr i);
public Gtk.Button HelpButton { public Gtk.Button HelpButton {
get { return new Button (this, gtksharp_file_selection_get_help_button (this.Handle)); } get { return new FSButton (this, gtksharp_file_selection_get_help_button (this.Handle)); }
} }
[DllImport("gtksharpglue")] [DllImport("gtksharpglue")]
@ -98,19 +98,19 @@ public string FileopFile {
[DllImport("gtksharpglue")] [DllImport("gtksharpglue")]
static extern IntPtr gtksharp_file_selection_get_fileop_c_dir (IntPtr i); static extern IntPtr gtksharp_file_selection_get_fileop_c_dir (IntPtr i);
public Gtk.Button FileopCDir { public Gtk.Button FileopCDir {
get { return new Button (this, gtksharp_file_selection_get_fileop_c_dir(this.Handle)); } get { return new FSButton (this, gtksharp_file_selection_get_fileop_c_dir(this.Handle)); }
} }
[DllImport("gtksharpglue")] [DllImport("gtksharpglue")]
static extern IntPtr gtksharp_file_selection_get_fileop_del_file (IntPtr i); static extern IntPtr gtksharp_file_selection_get_fileop_del_file (IntPtr i);
public Gtk.Button FileopDelFile { public Gtk.Button FileopDelFile {
get { return new Button (this, gtksharp_file_selection_get_fileop_del_file (this.Handle)); } get { return new FSButton (this, gtksharp_file_selection_get_fileop_del_file (this.Handle)); }
} }
[DllImport("gtksharpglue")] [DllImport("gtksharpglue")]
static extern IntPtr gtksharp_file_selection_get_fileop_ren_file (IntPtr i); static extern IntPtr gtksharp_file_selection_get_fileop_ren_file (IntPtr i);
public Gtk.Button FileopRenFile { public Gtk.Button FileopRenFile {
get { return new Button (this, gtksharp_file_selection_get_fileop_ren_file (this.Handle)); } get { return new FSButton (this, gtksharp_file_selection_get_fileop_ren_file (this.Handle)); }
} }
[DllImport("gtksharpglue")] [DllImport("gtksharpglue")]

View file

@ -1,5 +1,7 @@
2003-02-19 Duncan Mak <duncan@ximian.com> 2003-02-19 Duncan Mak <duncan@ximian.com>
* TestFileSelection.cs: Update to reflect FileSelection changes.
* TestToolbar.cs: Change the method signature for the various * TestToolbar.cs: Change the method signature for the various
SignalFuncs. Thanks to Leoric from #mono for pointing it out. SignalFuncs. Thanks to Leoric from #mono for pointing it out.

View file

@ -39,12 +39,11 @@ namespace WidgetViewer {
static void file_selection_ok (object o, EventArgs args) static void file_selection_ok (object o, EventArgs args)
{ {
Gtk.FileSelection.Button fsbutton = (Gtk.FileSelection.Button) o; Gtk.FileSelection.FSButton fsbutton = (Gtk.FileSelection.FSButton) o;
Console.WriteLine ("ok button clicked!"); Console.WriteLine ("ok button clicked!");
fsbutton.FileSelection.Destroy (); fsbutton.FileSelection.Destroy ();
} }
static void show_fileops (object o, EventArgs args) static void show_fileops (object o, EventArgs args)

View file

@ -257,6 +257,7 @@
<rule> <rule>
<class name="GtkEditable"> <class name="GtkEditable">
<method>GetSelectionBounds</method> <method>GetSelectionBounds</method>
<method>GetLayoutOffsets</method>
</class> </class>
<data> <data>
<attribute target="param"> <attribute target="param">