|
Packit |
1470ea |
|
|
Packit |
1470ea |
|
|
Packit |
1470ea |
xmlns:its="http://www.w3.org/2005/11/its"
|
|
Packit |
1470ea |
xmlns:xi="http://www.w3.org/2001/XInclude"
|
|
Packit |
1470ea |
type="guide" style="task"
|
|
Packit |
1470ea |
id="linkbutton.py">
|
|
Packit |
1470ea |
<info>
|
|
Packit |
1470ea |
<title type="text">LinkButton (Python)</title>
|
|
Packit |
1470ea |
<link type="guide" xref="beginner.py#buttons"/>
|
|
Packit |
1470ea |
<link type="next" xref="checkbutton.py"/>
|
|
Packit |
1470ea |
<revision version="0.1" date="2012-05-23" status="draft"/>
|
|
Packit |
1470ea |
|
|
Packit |
1470ea |
<credit type="author copyright">
|
|
Packit |
1470ea |
<name>Marta Maria Casetti</name>
|
|
Packit |
1470ea |
<email its:translate="no">mmcasetti@gmail.com</email>
|
|
Packit |
1470ea |
<years>2012</years>
|
|
Packit |
1470ea |
</credit>
|
|
Packit |
1470ea |
|
|
Packit |
1470ea |
<desc>A button bound to an URL</desc>
|
|
Packit |
1470ea |
</info>
|
|
Packit |
1470ea |
|
|
Packit |
1470ea |
<title>LinkButton</title>
|
|
Packit |
1470ea |
|
|
Packit |
1470ea |
<media type="image" mime="image/png" src="media/linkbutton.png"/>
|
|
Packit |
1470ea |
A button that links to a web page.
|
|
Packit |
1470ea |
|
|
Packit |
1470ea |
<links type="section" />
|
|
Packit |
1470ea |
|
|
Packit |
1470ea |
<section id="code">
|
|
Packit |
1470ea |
<title>Code used to generate this example</title>
|
|
Packit |
1470ea |
|
|
Packit |
1470ea |
<xi:include href="samples/linkbutton.py" parse="text"><xi:fallback/></xi:include>
|
|
Packit |
1470ea |
|
|
Packit |
1470ea |
</section>
|
|
Packit |
1470ea |
<section id="methods">
|
|
Packit |
1470ea |
<title>Useful methods for a LinkButton widget</title>
|
|
Packit |
1470ea |
<list>
|
|
Packit |
1470ea |
<item>get_visited() returns the 'visited' state (True or False ) of the URI where the LinkButton points. The button becomes visited when it is clicked. </item>
|
|
Packit |
1470ea |
<item>set_visited(True) sets the 'visited' state of the URI where the LinkButton points as True (analogously for False ). </item>
|
|
Packit |
1470ea |
<item>Each time the button is clicked, the signal "activate-link" is emitted. For an explanation of signals and callback functions, see <link xref="signals-callbacks.py" />. </item>
|
|
Packit |
1470ea |
</list>
|
|
Packit |
1470ea |
</section>
|
|
Packit |
1470ea |
<section id="references">
|
|
Packit |
1470ea |
<title>API References</title>
|
|
Packit |
1470ea |
In this sample we used the following:
|
|
Packit |
1470ea |
<list>
|
|
Packit |
1470ea |
<item><link href="http://developer.gnome.org/gtk3/unstable/GtkWindow.html">GtkWindow</link> </item>
|
|
Packit |
1470ea |
<item><link href="http://developer.gnome.org/gtk3/unstable/GtkLinkButton.html">GtkLinkButton</link> </item>
|
|
Packit |
1470ea |
</list>
|
|
Packit |
1470ea |
</section>
|
|
Packit |
1470ea |
</page>
|