Blob Blame History Raw
<?xml version="1.0" encoding="utf-8"?>
<page xmlns="http://projectmallard.org/1.0/" xmlns:its="http://www.w3.org/2005/11/its" xmlns:e="http://projectmallard.org/experimental/" type="guide" style="task" id="tutorial.py" xml:lang="fr">

<info>
  <title type="text">Tutorial for beginners (Python)</title>
  <link type="guide" xref="py#tutorial"/>
  <revision pkgversion="3.8" date="2013-02-25" status="draft"/>

  <desc>Un tutoriel pour les débutants souhaitant apprendre comment programmer des interfaces utilisateur graphiques en Python.</desc>
  <credit type="author copyright">
    <name>Tiffany Antopolski</name>
    <email its:translate="no">tiffany.antopolski@gmail.com</email>
    <years>2012</years>
  </credit>
  <credit type="author copyright">
    <name>Marta Maria Casetti</name>
    <email its:translate="no">mmcasetti@gmail.com</email>
    <years>2012 2013</years>
  </credit>
  <credit type="editor author">
    <name>Jim Campbell</name>
    <email its:translate="no">jwcampbell@gmail.com</email>
    <years>2013</years>
  </credit>

    <mal:credit xmlns:mal="http://projectmallard.org/1.0/" type="translator copyright">
      <mal:name>Luc Rebert,</mal:name>
      <mal:email>traduc@rebert.name</mal:email>
      <mal:years>2011</mal:years>
    </mal:credit>
  
    <mal:credit xmlns:mal="http://projectmallard.org/1.0/" type="translator copyright">
      <mal:name>Alain Lojewski,</mal:name>
      <mal:email>allomervan@gmail.com</mal:email>
      <mal:years>2011-2012</mal:years>
    </mal:credit>
  
    <mal:credit xmlns:mal="http://projectmallard.org/1.0/" type="translator copyright">
      <mal:name>Luc Pionchon</mal:name>
      <mal:email>pionchon.luc@gmail.com</mal:email>
      <mal:years>2011</mal:years>
    </mal:credit>
  
    <mal:credit xmlns:mal="http://projectmallard.org/1.0/" type="translator copyright">
      <mal:name>Bruno Brouard</mal:name>
      <mal:email>annoa.b@gmail.com</mal:email>
      <mal:years>2011-12</mal:years>
    </mal:credit>
  
    <mal:credit xmlns:mal="http://projectmallard.org/1.0/" type="translator copyright">
      <mal:name>Luis Menina</mal:name>
      <mal:email>liberforce@freeside.fr</mal:email>
      <mal:years>2014</mal:years>
    </mal:credit>
  </info>

<title>Tutorial for beginners</title>

<synopsis>
 <p>By following these tutorials you will learn the basics of GUI programming using GTK+ in Python.</p>

 <p>Si vous n'avez jamais programmé auparavant, ou si vous n'êtes pas à l'aise avec le concept de programmation orienté objets, il est préférable d'acquérir quelques bases avant toute chose. Vous pourriez par exemple commencer par lire les livres <link href="http://learnpythonthehardway.org/book/">Learn Python the Hard Way</link> ou <link href="http://docs.python.org/tutorial/index.html">The Python Tutorial</link>. Vous pourriez aussi être intéressé par <link href="http://python-gtk-3-tutorial.readthedocs.org/en/latest/index.html">The Python GTK+ 3 Tutorial</link>. Dès que vous maîtrisez les bases, n'oubliez pas de revenir consulter ces tutoriels.</p>
</synopsis>

<links type="section"/>

<section id="to-run">
<title>Lancement des exemples de code</title>

  <p>To run the code samples in the tutorial:</p>
  <steps>
    <item><p>Type or copy and paste the code into a file, and save the file with a name like <var>filename</var>.py</p></item>
    <item><p>To execute the code, type in the terminal:</p>
          <screen>python <var>nomdufichier</var>.py</screen>
    </item>
  </steps>
  <p>After executing the code, you will either see the widget on your screen, or (if you have mistyped some of the code) you will see an error message that will help you identify the problem.</p>
</section>

<section id="widgets">
<title>A path through the widgets (with some theory)</title>
<p>The tutorial will walk you through increasingly complex examples and programming theory, but you can also feel free to just go directly to the tutorial that is most helpful to you.</p>
<steps>
  <title>Tutoriel</title>
  <item><steps>
    <title>Fenêtres élémentaires</title>
    <item><p><link xref="window.py"/></p></item>
    <item><p><link xref="GtkApplicationWindow.py"/></p></item>
  </steps></item>
  <item><steps>
    <title>Images et étiquettes</title>
    <item><p><link xref="image.py"/></p></item>
    <item><p><link xref="strings.py"/></p></item>
    <item><p><link xref="label.py"/></p></item>
  </steps></item>
  <item><steps>
    <title>Introduction to properties</title>
    <item><p><link xref="properties.py"/></p></item>
  </steps></item>
  <item><steps>
    <title>Grid, separator and scrolling</title>
    <item><p><link xref="grid.py"/></p></item>
    <item><p><link xref="separator.py"/></p></item>
    <item><p><link xref="scrolledwindow.py"/></p></item>
    <item><p><link xref="paned.py"/></p></item>
  </steps></item>
  <item><steps>
    <title>Signals, callbacks and buttons</title>   
    <item><p><link xref="signals-callbacks.py"/></p></item>
    <item><p><link xref="button.py"/></p></item>
    <item><p><link xref="linkbutton.py"/></p></item>
    <item><p><link xref="checkbutton.py"/></p></item>
    <item><p><link xref="togglebutton.py"/></p></item>
    <item><p><link xref="switch.py"/></p></item>
    <item><p><link xref="radiobutton.py"/></p></item>
  </steps></item>
  <item><steps>
    <title>ButtonBox</title>
    <item><p><link xref="buttonbox.py"/></p></item>
  </steps></item>
  <item><steps>
    <title>Autre éléments graphiques d'affichage</title>
    <item><p><link xref="statusbar.py"/></p></item>
    <item><p><link xref="spinner.py"/></p></item>
    <item><p><link xref="progressbar.py"/></p></item>
  </steps></item>
  <item><steps>
    <title>Entry widgets</title>
    <item><p><link xref="spinbutton.py"/></p></item>
    <item><p><link xref="entry.py"/></p></item>
    <item><p><link xref="scale.py"/></p></item>
  </steps></item>
  <item><steps>
    <title>A widget to write and display text</title>
    <item><p><link xref="textview.py"/></p></item>
  </steps></item>
  <item><steps>
    <title>Boîtes de dialogue</title>
    <item><p><link xref="dialog.py"/></p></item>
    <item><p><link xref="aboutdialog.py"/></p></item>
    <item><p><link xref="messagedialog.py"/></p></item>
  </steps></item>
  <item><steps>
    <title>Menus, Toolbars and Tooltips (also: using Glade and GtkBuilder)</title>
    <item><p><link xref="gmenu.py"/></p></item>
    <item><p><link xref="menubutton.py"/></p></item>
    <item><p><link xref="toolbar.py"/></p></item>
    <item><p><link xref="tooltip.py"/></p></item>
    <item><p><link xref="toolbar_builder.py"/></p></item>
    <item><p><link xref="menubar.py"/></p></item>
  </steps></item>
  <item><steps>
    <title>Sélecteurs</title>
    <item><p><link xref="colorbutton.py"/></p></item>
    <item><p><link xref="fontchooserwidget.py"/></p></item>
    <item><p><link xref="filechooserdialog.py"/></p></item>
  </steps></item>
  <item><steps>
    <title>Arborescences et boites combinées (utilisant la conception M/V/C)</title>
    <item><p><link xref="combobox.py"/></p></item>
    <item><p><link xref="treeview_simple_liststore.py"/></p></item>
    <item><p><link xref="treeview_treestore.py"/></p></item>
    <item><p><link xref="model-view-controller.py"/></p></item>
    <item><p><link xref="combobox_multicolumn.py"/></p></item>
    <item><p><link xref="treeview_advanced_liststore.py"/></p></item>
    <item><p><link xref="treeview_cellrenderertoggle.py"/></p></item>
  </steps></item>
  <item><steps>
    <title>Élément graphique personnalisé</title>
    <item><p><link xref="widget_drawing.py"/></p></item>
  </steps></item>
</steps>
</section>

</page>