gtk.LinkButton — a button bound to a URL (new in PyGTK 2.10)
class gtk.LinkButton(gtk.Button): |
Functions
|
+-- gobject.GObject +-- gtk.Object +-- gtk.Widget +-- gtk.Container +-- gtk.Bin +-- gtk.Button +-- gtk.LinkButton |
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.
|
uri : | a valid URI |
label : | the text of the button or None |
Returns : | a new link button widget. |
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.
|
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.
|
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.
|
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.