2012-06-04 20:46:34 +00:00
Examples
--------
.. container :: title
Follow through the examples.
.. |ani_dir| replace :: ./examples/animation
.. |ani_file| replace :: animate.py
.. |ani_desc| replace :: Widget animation using :class: `Animation <kivy.animation.Animation>` .
.. |app_dir| replace :: ./examples/application
.. |app_file1| replace :: app_with_build.py
2012-07-08 12:25:50 +00:00
.. |app_desc1| replace :: Application example using :py:meth: `~kivy.app.App.build`
2012-06-04 20:46:34 +00:00
.. |app_file2| replace :: app_with_kv.py
2012-07-08 12:25:50 +00:00
.. |app_desc2| replace :: Application from a **.kv**
2012-06-04 20:46:34 +00:00
.. |app_file3| replace :: app_with_kv_in_template1.py
2012-07-08 12:25:50 +00:00
.. |app_desc3| replace :: Application from a **kv_directory**
2012-06-04 20:46:34 +00:00
.. |aud_dir| replace :: ./examples/audio:
.. |aud_file| replace :: main.py
2012-07-08 12:25:50 +00:00
.. |aud_desc| replace :: How to Play **Audio** .
2012-06-04 20:46:34 +00:00
.. |can_dir| replace :: ./examples/canvas
.. |can_file1| replace :: bezier.py
2012-07-08 12:25:50 +00:00
.. |can_desc1| replace :: How to draw :class: `Bezier <kivy.graphics.Bezier>` Lines
2012-06-04 20:46:34 +00:00
.. |can_file2| replace :: canvas_stress.py
2012-07-08 12:25:50 +00:00
.. |can_desc2| replace :: Stress test :class: `Canvas <kivy.graphics.Canvas>`
2012-06-04 20:46:34 +00:00
.. |can_file3| replace :: mesh.py
2012-07-08 12:25:50 +00:00
.. |can_desc3| replace :: How to use :class: `Mesh <kivy.graphics.Mesh>` in kivy
2012-06-04 20:46:34 +00:00
.. |can_file4| replace :: multitexture.py
2012-07-08 12:25:50 +00:00
.. |can_desc4| replace :: How to handle **multiple textures with shader**
2012-06-04 20:46:34 +00:00
.. |can_file5| replace :: stencil_canvas.py
.. |can_desc5| replace :: How to use :class: `Stencil <kivy.uix.stencil>` on widget canvas
.. |dem_dir| replace :: ./examples/demo:
.. |dem_file| replace :: camera_puzzle.py
2012-07-08 12:25:50 +00:00
.. |dem_desc| replace :: A puzzle using :class: `Camera <kivy.uix.camera.Camera>` output
2012-06-04 20:46:34 +00:00
.. |pic_dir| replace :: ./examples/demo/pictures
.. |pic_file| replace :: main.py
2012-07-08 09:36:49 +00:00
.. |pic_desc| replace :: Highlights usage of :class: `Image <kivy.uix.image>` and :class: `Scatter <kivy.uix.scatter>` Widgets
2012-06-04 20:46:34 +00:00
.. |sed_dir| replace :: ./examples/demo/shadereditor
.. |sed_file| replace :: main.py
2012-07-08 12:25:50 +00:00
.. |sed_desc| replace :: How to use **fragment and vertex shaders**
2012-06-04 20:46:34 +00:00
.. |sho_dir| replace :: ../examples/demo/showcase
.. |sho_file| replace :: main.py
2012-07-08 12:25:50 +00:00
.. |sho_desc| replace :: Showcase of **widgets and layouts** used in kivy.
2012-06-04 20:46:34 +00:00
.. |tch_dir| replace :: ./examples/demo/touchtracer
.. |tch_file| replace :: main.py
2012-07-08 09:36:49 +00:00
.. |tch_desc| replace :: Draw lines under every detected touch.
2012-07-08 12:25:50 +00:00
.. |tch_desc2| replace :: A good place to understand **how touch events work in kivy** .
2012-06-04 20:46:34 +00:00
.. |tws_dir| replace :: ./examples/frameworks/twisted
.. |tws_file| replace :: echo_client_app.py
.. |tws_file2| replace :: echo_server_app.py
.. |tws_desc| replace :: A clent and server app using `twisted-inside-kivy <http://kivy.org/docs/guide/other-frameworks.html?highlight=twisted#using-twisted-inside-kivy> `__
.. |gst_dir| replace :: ./examples/gestures
.. |gst_file| replace :: gesture_board.py
2012-07-08 12:25:50 +00:00
.. |gst_desc| replace :: A clean board to try out **gestures** .
2012-06-04 20:46:34 +00:00
.. |kv_dir| replace :: ./examples/guide/designwithkv
.. |kv_file| replace :: main.py
2012-07-08 12:25:50 +00:00
.. |kv_desc| replace :: Programming Guide examples on how to `design with kv lang <http://kivy.org/docs/guide/designwithkv.html> `__ .
2012-06-04 20:46:34 +00:00
.. |fwd_dir| replace :: ./examples/guide/firstwidget
.. |fwd_file| replace :: 1_skeleton.py
.. |fwd_file2| replace :: 2_print_touch.py
.. |fwd_file3| replace :: 3_draw_ellipse.py
.. |fwd_file4| replace :: 4_draw_line.py
.. |fwd_file5| replace :: 5_random_colors.py
.. |fwd_file6| replace :: 6_button.py
2012-07-08 12:25:50 +00:00
.. |fwd_desc| replace :: Programming Guide examples `Your first widget <http://kivy.org/docs/guide/firstwidget.html> `__ .
2012-06-04 20:46:34 +00:00
.. |qst_dir| replace :: ./examples/guide/quickstart
.. |qst_file| replace :: main.py
2012-07-08 12:25:50 +00:00
.. |qst_desc| replace :: Programming Guide `guide/quickstart <http://kivy.org/docs/guide/quickstart.html> `__ example.
2012-06-04 20:46:34 +00:00
.. |kin_dir| replace :: ./examples/kinect
.. |kin_file| replace :: main.py
2012-07-08 12:25:50 +00:00
.. |kin_desc| replace :: Howto use **kinect** for input.
2012-06-04 20:46:34 +00:00
.. |kvd_dir| replace :: ./examples/kv
.. |kvd_file| replace :: kvrun.py
2012-07-08 12:25:50 +00:00
.. |kvd_desc| replace :: load kv files, use **kv lang to load different widgets** .
2012-06-04 20:46:34 +00:00
.. |rst_dir| replace :: ./examples/RST_Editor
.. |rst_file| replace :: main.py
2012-07-08 09:36:49 +00:00
.. |rst_desc| replace :: An RST editor for the :class: `RstDocument <kivy.uix.rst.RstDocument>` Widget.
2012-06-04 20:46:34 +00:00
.. |sdr_dir| replace :: ./examples/shader
.. |sdr_file| replace :: plasma.py
.. |sdr_file1| replace :: shadertree.py
2012-07-08 12:25:50 +00:00
.. |sdr_desc| replace :: How to use different **Shaders** .
2012-06-04 20:46:34 +00:00
.. |png_dir| replace :: ./examples/tutorials/pong
.. |png_file| replace :: main.py
2012-07-08 12:25:50 +00:00
.. |png_desc| replace :: :doc: `/tutorials/pong` . Your first step in kivy programming.
2012-06-04 20:46:34 +00:00
.. |wdg_dir| replace :: ./examples/widgets
.. |wdg_file1| replace :: accordion_1.py
.. |wdg_desc1| replace :: Usage and Showcase of :class: `Accordion <kivy.uix.accordion>` Widget.
.. |wdg_file2| replace :: asyncimage.py
.. |wdg_desc2| replace :: Usage and Showcase of :class: `AsyncImage <kivy.uix.image.AsyncImage>` Widget.
.. |wdg_file3| replace :: bubble_test.py
.. |wdg_desc3| replace :: Usage and Showcase of :class: `Bubble <kivy.uix.bubble>` Widget.
.. |wdg_file4| replace :: customcollide.py
2012-07-08 12:25:50 +00:00
.. |wdg_desc4| replace :: Test for **collision** with custom shaped widget
2012-06-04 20:46:34 +00:00
.. |wdg_file5| replace :: fbowidget.py
2012-07-08 12:25:50 +00:00
.. |wdg_desc5| replace :: Usage of :class: `FBO <kivy.graphics.fbo>` to speed up graphics.
2012-06-04 20:46:34 +00:00
.. |wdg_file6| replace :: image_mipmap.py
.. |wdg_desc6| replace :: How to use :class: `Image <kivy.uix.image>` widget with mipmap.
.. |wdg_file7| replace :: keyboardlistener.py
.. |wdg_desc7| replace :: listen to the keyboard input and spew result to console.
.. |wdg_file8| replace :: label_mipmap.py
.. |wdg_desc8| replace :: How to use :class: `Label <kivy.uix.label>` widget with mipmap.
.. |wdg_file9| replace :: rstexample.py
.. |wdg_desc9| replace :: Usage and Showcase of :class: `RstDocument <kivy.uix.rst.RstDocument>` Widget.
.. |wdg_file10| replace :: scatter.py
.. |wdg_desc10| replace :: Usage and Showcase of :class: `Scatter <kivy.uix.scatter>` Widget.
.. |wdg_file11| replace :: scrollview.py
.. |wdg_desc11| replace :: Usage and Showcase of :class: `ScrollView <kivy.uix.scrollview>` Widget.
2012-07-08 12:25:50 +00:00
.. |wdg_file12| replace :: tabbedpanel.py
.. |wdg_desc12| replace :: Usage of a simple :class: `TabbedPanel <kivy.uix.tabbedpanel.TabbedPanel>`
.. |wdg_file14| replace :: tabbed_panel_showcase.py
.. |wdg_desc14| replace :: Advanced Showcase of :class: `TabbedPanel <kivy.uix.tabbedpanel.TabbedPanel>`
.. |wdg_file15| replace :: textalign.py
.. |wdg_desc15| replace :: Usage of text alignment in :class: `Label <kivy.uix.label>` widget.
.. |wdg_file16| replace :: textinput.py
.. |wdg_desc16| replace :: Usage and Showcase of :class: `TextInput <kivy.uix.textinput>` Widget.
.. |wdg_file17| replace :: unicode_textinput.py
.. |wdg_desc17| replace :: Showcase of unicode text in :class: `TextInput <kivy.uix.textinput>` Widget.
.. |wdg_file18| replace :: videoplayer.py
.. |wdg_desc18| replace :: Usage and options of :class: `VideoPlayer <kivy.uix.videoplayer>` Widget.
2012-06-04 20:46:34 +00:00
.. |seq_dir| replace :: ./examples/widgets/sequenced_images:
.. |seq_file| replace :: main.py
2012-07-08 12:25:50 +00:00
.. |seq_desc| replace :: Showcase usage of **sequenced images** : gif, images in .zip.
2012-06-04 20:46:34 +00:00
+------------+---------------+------------------------+
| Directory | Filename/s | Example Description |
+============+===============+========================+
|- |ani_dir| | - |ani_file| |- |ani_desc| |
+------------+---------------+------------------------+
|- |app_dir| | - |app_file1| |- |app_desc1| |
| | - |app_file2| |- |app_desc2| |
| | - |app_file3| |- |app_desc3| |
+------------+---------------+------------------------+
|- |can_dir| | - |can_file1| |- |can_desc1| |
| | - |can_file2| |- |can_desc2| |
| | - |can_file3| |- |can_desc3| |
| | - |can_file4| |- |can_desc4| |
| | - |can_file5| |- |can_desc5| |
+------------+---------------+------------------------+
|- |dem_dir| | - |dem_file| |- |dem_desc| |
+------------+---------------+------------------------+
|- |pic_dir| | - |pic_file| |- |pic_desc| |
+------------+---------------+------------------------+
|- |sed_dir| | - |sed_file| |- |sed_desc| |
+------------+---------------+------------------------+
|- |sho_dir| | - |sho_file| |- |sho_desc| |
+------------+---------------+------------------------+
|- |tch_dir| | - |tch_file| |- |tch_desc| |
| | |- |tch_desc2| |
+------------+---------------+------------------------+
|- |tws_dir| | - |tws_file| |- |tws_desc| |
| | - |tws_file2| | |
+------------+---------------+------------------------+
|- |gst_dir| | - |gst_file| |- |gst_desc| |
+------------+---------------+------------------------+
|- |kv_dir| | - |kv_file| |- |kv_desc| |
+------------+---------------+------------------------+
|- |fwd_dir| | - |fwd_file| |- |fwd_desc| |
| | - |fwd_file2| | |
| | - |fwd_file3| | |
| | - |fwd_file4| | |
| | - |fwd_file5| | |
| | - |fwd_file6| | |
+------------+---------------+------------------------+
|- |qst_dir| | - |qst_file| |- |qst_desc| |
+------------+---------------+------------------------+
|- |kin_dir| | - |kin_file| |- |kin_desc| |
+------------+---------------+------------------------+
|- |kvd_dir| | - |kvd_file| |- |kvd_desc| |
+------------+---------------+------------------------+
|- |rst_dir| | - |rst_file| |- |rst_desc| |
+------------+---------------+------------------------+
|- |sdr_dir| | - |sdr_file| |- |sdr_desc| |
2012-07-08 12:25:50 +00:00
| | - |sdr_file1| | |
2012-06-04 20:46:34 +00:00
+------------+---------------+------------------------+
|- |wdg_dir| | - |wdg_file1| |- |wdg_desc1| |
| | - |wdg_file2| |- |wdg_desc2| |
| | - |wdg_file3| |- |wdg_desc3| |
| | - |wdg_file4| |- |wdg_desc4| |
| | - |wdg_file5| |- |wdg_desc5| |
| | - |wdg_file6| |- |wdg_desc6| |
| | - |wdg_file7| |- |wdg_desc7| |
| | - |wdg_file8| |- |wdg_desc8| |
| | - |wdg_file9| |- |wdg_desc9| |
| | - |wdg_file10||- |wdg_desc10| |
| | - |wdg_file11||- |wdg_desc11| |
| | - |wdg_file12||- |wdg_desc12| |
| | - |wdg_file14||- |wdg_desc14| |
| | - |wdg_file15||- |wdg_desc15| |
| | - |wdg_file16||- |wdg_desc16| |
2012-07-08 12:25:50 +00:00
| | - |wdg_file17||- |wdg_desc17| |
| | - |wdg_file18||- |wdg_desc18| |
2012-06-04 20:46:34 +00:00
+------------+---------------+------------------------+
|- |seq_dir| | - |seq_file| |- |seq_desc| |
2012-07-08 09:36:49 +00:00
+------------+---------------+------------------------+