Sophie

Sophie

distrib > Mandriva > 2010.1 > i586 > by-pkgid > 8bbba06f6eb6f0632d0990c21e6178cf > files > 545

libgnome32-devel-1.4.2-24mdv2010.1.i586.rpm

<refentry id="GnomeHRef">
<refmeta>
<refentrytitle>GnomeHRef</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>GNOMEUI Library</refmiscinfo>
</refmeta>

<refnamediv>
<refname>GnomeHRef</refname><refpurpose>A clickable URL button.</refpurpose>
</refnamediv>

<refsynopsisdiv><title>Synopsis</title>
<synopsis>

#include &lt;gnome.h&gt;


struct      <link linkend="GnomeHRef-struct">GnomeHRef</link>;
<link linkend="GtkWidget">GtkWidget</link>*  <link linkend="gnome-href-new">gnome_href_new</link>                  (const <link linkend="gchar">gchar</link> *url,
                                             const <link linkend="gchar">gchar</link> *label);
void        <link linkend="gnome-href-set-url">gnome_href_set_url</link>              (<link linkend="GnomeHRef">GnomeHRef</link> *href,
                                             const <link linkend="gchar">gchar</link> *url);
<link linkend="gchar">gchar</link>*      <link linkend="gnome-href-get-url">gnome_href_get_url</link>              (<link linkend="GnomeHRef">GnomeHRef</link> *href);
void        <link linkend="gnome-href-set-label">gnome_href_set_label</link>            (<link linkend="GnomeHRef">GnomeHRef</link> *href,
                                             const <link linkend="gchar">gchar</link> *label);
<link linkend="gchar">gchar</link>*      <link linkend="gnome-href-get-label">gnome_href_get_label</link>            (<link linkend="GnomeHRef">GnomeHRef</link> *href);

</synopsis>
</refsynopsisdiv>

<refsect1>
<title>Object Hierarchy</title>
<synopsis>

  <link linkend="GtkObject">GtkObject</link>
   +----<link linkend="GtkWidget">GtkWidget</link>
         +----<link linkend="GtkContainer">GtkContainer</link>
               +----<link linkend="GtkBin">GtkBin</link>
                     +----<link linkend="GtkButton">GtkButton</link>
                           +----GnomeHRef
</synopsis>

</refsect1>




<refsect1>
<title>Description</title>
<para>
   This widget is a <link linkend="GtkButton">GtkButton</link> button that contains a URL.  When
   clicked it invokes the configured browser for the URL you provided.

</para>

<para>
   This sample program creates a button whose label is "GNOME Web
   site" and when clicked launches a browser to view the site at
   <filename>http://www.gnome.org</filename>.

<programlisting>
   GtkWidget *button;

   button = gnome_href_new ("http://www.gnome.org", "GNOME Web site");
</programlisting>
</para>
</refsect1>

<refsect1>
<title>Details</title>
<refsect2>
<title><anchor id="GnomeHRef-struct">struct GnomeHRef</title>
<programlisting>struct GnomeHRef;</programlisting>
<para>

</para></refsect2>
<refsect2>
<title><anchor id="gnome-href-new">gnome_href_new ()</title>
<programlisting><link linkend="GtkWidget">GtkWidget</link>*  gnome_href_new                  (const <link linkend="gchar">gchar</link> *url,
                                             const <link linkend="gchar">gchar</link> *label);</programlisting>
<para>
Created a GNOME href object, a label widget with a clickable action
and an associated URL.  If <parameter>label</parameter> is set to <literal>NULL</literal>, <parameter>url</parameter> is used as
the label.</para>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>url</parameter>&nbsp;:</entry>
<entry> URL assigned to this object.
</entry></row>
<row><entry align="right"><parameter>label</parameter>&nbsp;:</entry>
<entry> Text associated with the URL.
</entry></row>
<row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry>  Pointer to new GNOME href widget.
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gnome-href-set-url">gnome_href_set_url ()</title>
<programlisting>void        gnome_href_set_url              (<link linkend="GnomeHRef">GnomeHRef</link> *href,
                                             const <link linkend="gchar">gchar</link> *url);</programlisting>
<para>
Sets the internal URL value within <parameter>self</parameter> to the value of <parameter>url</parameter>.</para>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>self</parameter>&nbsp;:</entry>
<entry> Pointer to GnomeHRef widget
</entry></row>
<row><entry align="right"><parameter>url</parameter>&nbsp;:</entry>
<entry> String containing the URL to be stored within <parameter>self</parameter>.
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gnome-href-get-url">gnome_href_get_url ()</title>
<programlisting><link linkend="gchar">gchar</link>*      gnome_href_get_url              (<link linkend="GnomeHRef">GnomeHRef</link> *href);</programlisting>
<para>
Returns the pointer to the URL associated with the <parameter>self</parameter> href object.</para>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>self</parameter>&nbsp;:</entry>
<entry> Pointer to GnomeHRef widget
</entry></row>
<row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry>  Pointer to URL string, or <literal>NULL</literal> if failure.
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gnome-href-set-label">gnome_href_set_label ()</title>
<programlisting>void        gnome_href_set_label            (<link linkend="GnomeHRef">GnomeHRef</link> *href,
                                             const <link linkend="gchar">gchar</link> *label);</programlisting>
<para>
Sets the internal label widget text (used to display a URL's link
text) to the value given in <parameter>label</parameter>.</para>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>self</parameter>&nbsp;:</entry>
<entry> Pointer to GnomeHRef widget
</entry></row>
<row><entry align="right"><parameter>label</parameter>&nbsp;:</entry>
<entry> New link text for the href object.
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gnome-href-get-label">gnome_href_get_label ()</title>
<programlisting><link linkend="gchar">gchar</link>*      gnome_href_get_label            (<link linkend="GnomeHRef">GnomeHRef</link> *href);</programlisting>
<para>
Returns the contents of the label widget used to display the link
text.</para>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>self</parameter>&nbsp;:</entry>
<entry> Pointer to GnomeHRef widget
</entry></row>
<row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry>  Pointer to text contained in the label widget.
</entry></row>
</tbody></tgroup></informaltable></refsect2>

</refsect1>



<refsect1>
<title>See Also</title>
<para>
<link linkend="gnome-url-show">gnome_url_show</link>(), <link linkend="GtkButton">GtkButton</link>,
</para>
</refsect1>

</refentry>