GnomeHRef

Name

GnomeHRef -- A clickable URL button.

Synopsis


#include <gnome.h>


struct      GnomeHRef;
GtkWidget*  gnome_href_new                  (const gchar *url,
                                             const gchar *label);
void        gnome_href_set_url              (GnomeHRef *href,
                                             const gchar *url);
gchar*      gnome_href_get_url              (GnomeHRef *href);
void        gnome_href_set_label            (GnomeHRef *href,
                                             const gchar *label);
gchar*      gnome_href_get_label            (GnomeHRef *href);

Object Hierarchy


  GtkObject
   +----GtkWidget
         +----GtkContainer
               +----GtkBin
                     +----GtkButton
                           +----GnomeHRef

Description

This widget is a GtkButton button that contains a URL. When clicked it invokes the configured browser for the URL you provided.

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

   button = gnome_href_new ("http://www.gnome.org", "GNOME Web site");

Details

struct GnomeHRef

struct GnomeHRef;


gnome_href_new ()

GtkWidget*  gnome_href_new                  (const gchar *url,
                                             const gchar *label);

Created a GNOME href object, a label widget with a clickable action and an associated URL. If label is set to NULL, url is used as the label.

url : URL assigned to this object.
label : Text associated with the URL.
Returns : Pointer to new GNOME href widget.


gnome_href_set_url ()

void        gnome_href_set_url              (GnomeHRef *href,
                                             const gchar *url);

Sets the internal URL value within self to the value of url.

self : Pointer to GnomeHRef widget
url : String containing the URL to be stored within self.


gnome_href_get_url ()

gchar*      gnome_href_get_url              (GnomeHRef *href);

Returns the pointer to the URL associated with the self href object.

self : Pointer to GnomeHRef widget
Returns : Pointer to URL string, or NULL if failure.


gnome_href_set_label ()

void        gnome_href_set_label            (GnomeHRef *href,
                                             const gchar *label);

Sets the internal label widget text (used to display a URL's link text) to the value given in label.

self : Pointer to GnomeHRef widget
label : New link text for the href object.


gnome_href_get_label ()

gchar*      gnome_href_get_label            (GnomeHRef *href);

Returns the contents of the label widget used to display the link text.

self : Pointer to GnomeHRef widget
Returns : Pointer to text contained in the label widget.

See Also

gnome_url_show(), GtkButton,