gtk.LinkButton a button bound to a URL (new in PyGTK 2.10) Synopsis gtk.LinkButton gtk.Button gtk.LinkButton uri labelNone get_uri get_visited set_uri uri set_visited visited Functions gtk.link_button_set_uri_hook func dataNone Ancestry +-- gobject.GObject +-- gtk.Object +-- gtk.Widget +-- gtk.Container +-- gtk.Bin +-- gtk.Button +-- gtk.LinkButton Implemented Interfaces gtk.LinkButton implements gtk.Buildable gtk.LinkButton Properties gtk.Object Properties gtk.Widget Properties gtk.Container Properties gtk.Button Properties
"uri" Read-Write The URI bound to this button. Available in GTK+ 2.10. "visited" Read-Write The 'visited' state of this button. A visited link is drawn in a different color. Default value: False. Available in GTK+ 2.14.
gtk.LinkButton Style Properties gtk.Widget Style Properties gtk.Button Style Properties gtk.LinkButton Signal Prototypes gobject.GObject Signal Prototypes gtk.Object Signal Prototypes gtk.Widget Signal Prototypes gtk.Container Signal Prototypes gtk.Button Signal Prototypes Description The gtk.LinkButton is available in PyGTK 2.10 and above. A gtk.LinkButton is a gtk.Button with a hyperlink, similar to the one used by web browsers, that triggers an action when clicked. It is useful to show quick links to resources. A link button is created by calling the gtk.LinkButton constructor. The URI you pass to the constructor is used as a label for the widget. The URI bound to a gtk.LinkButton can be set specifically using the set_uri()) method, and retrieved using the get_uri() method. gtk.LinkButton offers a global hook, which is called when the used clicks on it: see the gtk.link_button_set_uri_hook() function. Constructor gtk.LinkButton gtk.LinkButton uri labelNone uri : a valid URI label : the text of the button or None Returns : a new link button widget. This constructor is available in PyGTK 2.10 and above. Creates a new gtk.LinkButton with the URI specified by uri as its text if label is None. If label is not None, it is used as the text of the button. Methods gtk.LinkButton.get_uri get_uri Returns : the associated URI. This method is available in PyGTK 2.10 and above. The get_uri() method returns the URI set using the gtk.LinkButton.set_uri() method or the gtk.LinkButton() constructor. gtk.LinkButton.get_visited get_visited Returns : True if the link has been visited, False otherwise This method is available in PyGTK 2.14 and above. The get_visited() method retrieves the 'visited' state of the URI where the GtkLinkButton points. The button becomes visited when it is clicked. If the URI is changed on the button, the 'visited' state is unset again. gtk.LinkButton.set_uri set_uri uri uri : a valid URI This method is available in PyGTK 2.10 and above. The set_uri() method sets the string specified by uri as the URI the gtk.LinkButton points to. gtk.LinkButton.set_visited set_visited visited visited : the new 'visited' state. This method is available in PyGTK 2.14 and above. The set_visited() method setsthe 'visited' state of the URI where the gtk.LinkButton points. See gtk.LinkButton.get_visited() for more details. Functions gtk.link_button_set_uri_hook gtk.link_button_set_uri_hook func dataNone func : a function called each time a gtk.LinkButton is clicked, or None data : user data to be passed to func This function is available in PyGTK 2.10 and above. The gtk.link_button_set_uri_hook() function sets func as the function that should be invoked every time a user clicks a gtk.LinkButton. This function is called before every callback registered for the "clicked" signal. If func is None the current callback function will be removed.