GtkSharp/doc/en/Gtk/Tooltips.xml

236 lines
10 KiB
XML
Raw Normal View History

<Type Name="Tooltips" FullName="Gtk.Tooltips">
<TypeSignature Language="C#" Maintainer="John Luke" Value="public class Tooltips : Gtk.Object" />
<AssemblyInfo>
<AssemblyName>gtk-sharp</AssemblyName>
<AssemblyPublicKey>
</AssemblyPublicKey>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</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>Add Tooltips to your widgets.</summary>
<remarks>
<para>Tooltips are the messages that appear next to a widget when the mouse pointer is held over it for a short amount of time.
They are especially helpful for adding more verbose descriptions of things such as <see cref="T:Gtk.Button" /> in a toolbar.</para>
<para>An individual tooltip belongs to a group of tooltips.
A group is created by calling the constructor <see cref="C:Gtk.Tooltips()" />.
Every tooltip in the group can then be turned off with <see cref="M:Gtk.Tooltips.Disable()" /> and on with <see cref="M:Gtk.Tooltips.Enable()" />.</para>
<para>To assign a tip to a particular <see cref="T:Gtk.Widget" />, <see cref="M:Gtk.Tooltips.SetTip(Gtk.Widget,System.String,System.String)" /> is used.</para>
<para>Note: Tooltips can only be set on widgets which have their own X window.
To add a tooltip to a <see cref="T:Gtk.Widget" /> that does not have its own <see cref="T:Gtk.Window" />, place the widget inside a <see cref="T:Gtk.EventBox" /> and add a tooltip to that instead.</para>
<para>The default appearance of all tooltips in a program is determined by the current Gtk theme that the user has selected.</para>
<example>
<code lang="C#">
using Gtk;
class ToolTipsExample
{
static void Main()
{
Application.Init();
Window win = new Window("Tooltips");
Button load_button, save_button;
HBox hbox;
Tooltips button_bar_tips;
button_bar_tips = new Tooltips ();
// Create the buttons and pack them into a Gtk.HBox
hbox = new HBox (true, 2);
win.Add(hbox);
load_button = new Button ("Load a file");
hbox.Add(load_button);
save_button = new Button ("Save a file");
hbox.Add(save_button);
// Add the tips
button_bar_tips.SetTip (load_button,
"Load a new document into this window",
"longer explanation");
button_bar_tips.SetTip (save_button,
"Saves the current document to a file",
"longer explanation");
win.ShowAll();
Application.Run();
}
}
</code>
</example>
</remarks>
</Docs>
<Base>
<BaseTypeName>Gtk.Object</BaseTypeName>
</Base>
<Interfaces>
</Interfaces>
<Members>
<Member MemberName="Enable">
<MemberSignature Language="C#" Value="public void Enable ();" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Allows the user to see your tooltips as they navigate your application.</summary>
<remarks>Allows the user to see your tooltips as they navigate your application.</remarks>
</Docs>
</Member>
<Member MemberName="Disable">
<MemberSignature Language="C#" Value="public void Disable ();" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Causes all tooltips in the tooltips group to become inactive.</summary>
<remarks>Causes all tooltips in the tooltips group to become inactive.
Any widgets that have tips associated with that group will no longer display their tips until they are enabled again with <see cref="M:Gtk.Tooltips.Enable()" />.</remarks>
</Docs>
</Member>
<Member MemberName="ForceWindow">
<MemberSignature Language="C#" Value="public void ForceWindow ();" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Ensures that the window used for displaying the given tooltip is created.</summary>
<remarks>Ensures that the window used for displaying the given tooltip is created.
(Applications should never have to call this function, since Gtk# takes care of this.) </remarks>
</Docs>
</Member>
<Member MemberName="SetTip">
<MemberSignature Language="C#" Value="public void SetTip (Gtk.Widget widget, string tip_text, string tip_private);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="widget" Type="Gtk.Widget" />
<Parameter Name="tip_text" Type="System.String" />
<Parameter Name="tip_private" Type="System.String" />
</Parameters>
<Docs>
<summary>Adds a tooltip containing the specified message to the specified <see cref="T:Gtk.Widget" />.</summary>
<param name="widget">an object of type <see cref="T:Gtk.Widget" /></param>
<param name="tip_text">an object of type <see cref="System.String" /></param>
<param name="tip_private">an object of type <see cref="System.String" /></param>
<remarks>Adds a tooltip containing the specified message to the specified <see cref="T:Gtk.Widget" />.</remarks>
</Docs>
</Member>
<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 the object.</summary>
<remarks />
</Docs>
</Member>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public Tooltips (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>
<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 Tooltips ();" />
<MemberType>Constructor</MemberType>
<ReturnValue />
<Parameters />
<Docs>
<summary>Creates an empty group of tooltips.</summary>
<remarks>Creates an empty group of tooltips. This function initializes a <see cref="T:Gtk.TooltipsData" /> structure.
Without at least one such structure, you can not add individual tips to your application.</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>
<value>a <see cref="T:GLib.GType" /></value>
<remarks>Returns the native <see cref="T:GLib.GType" /> value for <see cref="T:Gtk.Tooltips" />.</remarks>
</Docs>
</Member>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="protected Tooltips (GLib.GType gtype);" />
<MemberType>Constructor</MemberType>
<ReturnValue />
<Parameters>
<Parameter Name="gtype" Type="GLib.GType" />
</Parameters>
<Docs>
<summary>Protected Constructor.</summary>
<param name="gtype">a <see cref="T:GLib.GType" /></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>
<Attribute>
<AttributeName>System.Obsolete(Message=null, IsError=False)</AttributeName>
</Attribute>
</Attributes></Member>
<Member MemberName="Delay">
<MemberSignature Language="C#" Value="public uint Delay { set; };" />
<MemberType>Property</MemberType>
<ReturnValue>
<ReturnType>System.UInt32</ReturnType>
</ReturnValue>
<Docs>
<summary>Number of milliseconds of mouse-hover before tooltips pop up.</summary>
<value>a <see cref="T:System.UInt32" /></value>
<remarks>
</remarks>
</Docs>
</Member>
<Member MemberName="GetInfoFromTipWindow">
<MemberSignature Language="C#" Value="public static bool GetInfoFromTipWindow (Gtk.Window tip_window, Gtk.Tooltips tooltips, Gtk.Widget current_widget);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="tip_window" Type="Gtk.Window" />
<Parameter Name="tooltips" Type="Gtk.Tooltips" />
<Parameter Name="current_widget" Type="Gtk.Widget" />
</Parameters>
<Docs>
<summary> Determines the tooltips and the widget they belong
to from the window in which they are displayed. </summary>
<param name="tip_window">a <see cref="T:Gtk.Window" /></param>
<param name="tooltips">a <see cref="T:Gtk.Tooltips" /></param>
<param name="current_widget">a <see cref="T:Gtk.Widget" /></param>
<returns>a <see cref="T:System.Boolean" /></returns>
<remarks>This function is mostly intended for use by
accessibility technologies; applications should have little use for
it.</remarks>
</Docs>
</Member>
</Members>
</Type>