GtkSharp/doc/en/Gtk/IconFactory.xml
Duncan Mak ada2962e92 2003-07-17 Duncan Mak <duncan@ximian.com>
* Added new documentation files for the new classes, and fixed the
	off-by-one enum member name bug that was introduced in the previous
	commit.

svn path=/trunk/gtk-sharp/; revision=16325
2003-07-17 06:38:40 +00:00

268 lines
11 KiB
XML

<Type Name="IconFactory" FullName="Gtk.IconFactory">
<TypeSignature Language="C#" Value="public class IconFactory : GLib.Object, IWrapper, IDisposable" Maintainer="duncan" />
<AssemblyInfo>
<AssemblyName>gtk-sharp</AssemblyName>
<AssemblyVersion>0.0.0.0</AssemblyVersion>
<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 icon factory manages a collection of Gtk.IconSet</summary>
<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="LookupDefault">
<MemberSignature Language="C#" Value="public static Gtk.IconSet LookupDefault (string stock_id);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>Gtk.IconSet</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="stock_id" Type="System.String" />
</Parameters>
<Docs>
<summary>Looks for an icon in the list of default icon factories.</summary>
<param name="stock_id">an icon name</param>
<returns>
a <see cref="T:Gtk.IconSet" />, or <see langword="null" />.
</returns>
<remarks>
Looks for an icon in the list of default icon factories. For
display to the user, you should use
<see cref="M:Gtk.Style.LookupIconSet(System.String)" /> on the <see cref="T:Gtk.Style" /> for the widget
that will display the icon, instead of using this function
directly, so that themes are taken into account.
</remarks>
</Docs>
</Member>
<Member MemberName="AddDefault">
<MemberSignature Language="C#" Value="public void AddDefault ();" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>
Adds an icon factory to the list of icon factories searched
by <see cref="M:Gtk.Style.LookupIconSet" />.
</summary>
<remarks>
Adds an icon factory to the list of icon factories searched
by <see cref="M:Gtk.Style.LookupIconSet(System.String)" />. This means that, for example, <see cref="C:Gtk.Image(System.String,Gtk.IconSize)" /> will be
able to find icons in factory. There will normally be an
icon factory added for each library or application that
comes with icons. The default icon factories can be
overridden by themes.
</remarks>
</Docs>
</Member>
<Member MemberName="Add">
<MemberSignature Language="C#" Value="public void Add (string stock_id, Gtk.IconSet icon_set);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="stock_id" Type="System.String" />
<Parameter Name="icon_set" Type="Gtk.IconSet" />
</Parameters>
<Docs>
<summary>
Adds the given <see paramref="icon_set" /> to the icon factory, under the name
<see paramref="stock_id" />.
</summary>
<param name="stock_id">The icon's name</param>
<param name="icon_set"> The icon set</param>
<remarks>
Adds the given <see paramref="icon_set" /> to the icon factory, under the name
<see paramref="stock_id" />. <see paramref="stock_id" /> should be namespaced for your
application, e.g. "myapp-name-of-icon". Normally
applications create a <see cref="T:Gtk.IconFactory" />, then add it to the
list of default factories with
<see cref="M:Gtk.IconFactory.AddDefault" />. They pass the
<see paramref="stock_id" /> to widgets such as <see cref="T:Gtk.Image" /> to display the icon. Themes can
provide an icon with the same name (such as
"myapp-name-of-icon") to override your application's
default icons. If an icon already existed in factory for
<see paramref="stock_id" />, it is unreferenced and replaced with the new
<see paramref="icon_set" />.
</remarks>
</Docs>
</Member>
<Member MemberName="Lookup">
<MemberSignature Language="C#" Value="public Gtk.IconSet Lookup (string stock_id);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>Gtk.IconSet</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="stock_id" Type="System.String" />
</Parameters>
<Docs>
<summary>
Looks up a Stock ID in the icon factory.
</summary>
<param name="stock_id">an icon name</param>
<returns>
a <see cref="T:Gtk.IconSet" />, or <see langword="null" />.
</returns>
<remarks>
Looks up <see paramref="stock_id" /> in the icon factory, returning an icon set
if found, otherwise <see langword="null" />. For display to the user, you
should use <see cref="M:Gtk.Style.LookupIconSet(System.String)" /> on the
<see cref="T:Gtk.Style" /> for
the widget that will display the icon, instead of using this
function directly, so that themes are taken into account.
</remarks>
</Docs>
</Member>
<Member MemberName="RemoveDefault">
<MemberSignature Language="C#" Value="public void RemoveDefault ();" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>
Removes an icon factory from the list of default icon factories.
</summary>
<remarks>
Removes an icon factory from the list of default icon
factories. Not normally used; you might use it for a library
that can be unloaded or shut down.
</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>Disposes the resources associated with the object.</summary>
<remarks />
</Docs>
</Member>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public IconFactory (IntPtr raw);" />
<MemberType>Constructor</MemberType>
<ReturnValue />
<Parameters>
<Parameter Name="raw" Type="System.IntPtr" />
</Parameters>
<Docs>
<summary>Internal constructor</summary>
<param name="raw">Pointer to the C object.</param>
<returns>An instance of IconFactory, wrapping the C object.</returns>
<remarks>
<para>This is an internal constructor, and should not be used by user code.</para>
</remarks>
</Docs>
</Member>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public IconFactory ();" />
<MemberType>Constructor</MemberType>
<ReturnValue />
<Parameters />
<Docs>
<summary>Creates a new <see cref="T:Gtk.IconFactory" />.</summary>
<returns>A new <see cref="T:Gtk.IconFactory" />.</returns>
<remarks>
Creates a new <see cref="T:Gtk.IconFactory" />. An icon factory manages a
collection of <see cref="T:Gtk.IconSet" />s; a <see cref="T:Gtk.IconSet" /> manages a set of
variants of a particular icon (i.e. a GtkIconSet contains
variants for different sizes and widget states). Icons in an
icon factory are named by a stock ID, which is a simple
string identifying the icon. Each <see cref="T:Gtk.Style" /> has a list of
GtkIconFactorys derived from the current theme; those icon
factories are consulted first when searching for an icon. If
the theme doesn't set a particular icon, GTK+ looks for the
icon in a list of default icon factories, maintained by
<see cref="M:Gtk.IconFactory.AddDefault" /> and
<see cref="M:Gtk.IconFactory.RemoveDefault" />. Applications with icons
should add a default icon factory with their icons, which
will allow themes to override the icons for the application.
</remarks>
</Docs>
</Member>
<Member MemberName="GType">
<MemberSignature Language="C#" Value="public static uint GType { get; };" />
<MemberType>Property</MemberType>
<ReturnValue>
<ReturnType>System.UInt32</ReturnType>
</ReturnValue>
<Docs>
<summary>The GLib Type for Gtk.IconFactory</summary>
<returns>The GLib Type for the Gtk.IconFactory class.</returns>
<remarks />
</Docs>
</Member>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="protected IconFactory (GLib.Type gtype);" />
<MemberType>Constructor</MemberType>
<ReturnValue />
<Parameters>
<Parameter Name="gtype" Type="GLib.Type" />
</Parameters>
<Docs>
<summary>Internal constructor</summary>
<param name="gtype">GLib type for the type</param>
<returns>Creates a new instance of IconFactory, using the GLib-provided type</returns>
<remarks>
<para>This is a constructor used by derivative types of <see cref="T:Gtk.IconFactory" /> that would have their own GLib type assigned to it. This is not typically used by C# code.</para>
</remarks>
</Docs>
</Member>
<Member MemberName="LookupIconSize">
<MemberSignature Language="C#" Value="public void LookupIconSize (Gtk.IconSize size, out int width, out int height);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="size" Type="Gtk.IconSize" />
<Parameter Name="width" Type="System.Int32&amp;" />
<Parameter Name="height" Type="System.Int32&amp;" />
</Parameters>
<Docs>
<summary>Obtains the pixel size of a semantic icon size</summary>
<param name="size">an icon size</param>
<param name="width">an integer to store the icon's width</param>
<param name="height">an integer to store the icon's height</param>
<remarks />
</Docs>
</Member>
<Member MemberName="LookupIconSize">
<MemberSignature Language="C#" Value="public System.Drawing.Size LookupIconSize (Gtk.IconSize size);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Drawing.Size</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="size" Type="Gtk.IconSize" />
</Parameters>
<Docs>
<summary>To be added</summary>
<param name="size">a <see cref="T:Gtk.IconSize" /></param>
<returns>a <see cref="T:System.Drawing.Size" /></returns>
<remarks>To be added</remarks>
</Docs>
</Member>
</Members>
</Type>