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 ` .. |app_dir| replace:: ./examples/application .. |app_file1| replace:: app_with_build.py .. |app_desc1| replace:: Application example using :py:meth:`~kivy.app.App.build` .. |app_file2| replace:: app_with_kv.py .. |app_desc2| replace:: Application from a :mod:`.kv ` file .. |app_file3| replace:: app_with_kv_in_template1.py .. |app_desc3| replace:: Application from a :mod:`kv_directory ` .. |aud_dir| replace:: ./examples/audio: .. |aud_file| replace:: main.py .. |aud_desc| replace:: How to play :mod:`Audio `. .. |can_dir| replace:: ./examples/canvas .. |can_file1| replace:: bezier.py .. |can_desc1| replace:: How to draw :class:`Bezier ` Lines .. |can_file2| replace:: canvas_stress.py .. |can_desc2| replace:: Stress test :class:`Canvas ` .. |can_file3| replace:: mesh.py .. |can_desc3| replace:: How to use the :class:`Mesh ` in kivy .. |can_file4| replace:: multitexture.py .. |can_desc4| replace:: How to handle multiple textures with a :class:`Shader ` .. |can_file5| replace:: stencil_canvas.py .. |can_desc5| replace:: How to use the :mod:`Stencil ` on the widget canvas .. |dem_dir| replace:: ./examples/demo: .. |dem_file| replace:: camera_puzzle.py .. |dem_desc| replace:: A puzzle using the :class:`Camera ` output .. |pic_dir| replace:: ./examples/demo/pictures .. |pic_file| replace:: main.py .. |pic_desc| replace:: Highlights usage of the :class:`Image ` and :class:`Scatter ` Widgets .. |sed_dir| replace:: ./examples/demo/shadereditor .. |sed_file| replace:: main.py .. |sed_desc| replace:: How to use the :class:`fragment and vertex shaders `. .. |sho_dir| replace:: ../examples/demo/showcase .. |sho_file| replace:: main.py .. |sho_desc| replace:: Showcase of the :class:`widgets ` and :mod:`layouts ` available in kivy .. |tch_dir| replace:: ./examples/demo/touchtracer .. |tch_file| replace:: main.py .. |tch_desc| replace:: Draw lines under every detected touch .. |tch_desc2| replace:: A good place to understand how :mod:`touch events ` work in kivy .. |tws_dir| replace:: ./examples/frameworks/twisted .. |tws_file| replace:: echo_client_app.py .. |tws_file2| replace:: echo_server_app.py .. |tws_desc| replace:: A client and server app using :doc:`Twisted inside Kivy ` .. |gst_dir| replace:: ./examples/gestures .. |gst_file| replace:: gesture_board.py .. |gst_desc| replace:: A clean board to try out :mod:`gestures ` .. |kv_dir| replace:: ./examples/guide/designwithkv .. |kv_file| replace:: main.py .. |kv_desc| replace:: Programming Guide examples on how to :doc:`design with kv lang ` .. |fwd_dir| replace:: ./examples/tutorials/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 .. |fwd_desc| replace:: Programming Guide example: :doc:`Your first widget ` .. |qst_dir| replace:: ./examples/guide/quickstart .. |qst_file| replace:: main.py .. |qst_desc| replace:: Programming Guide example: :doc:`Create an application ` .. _kinect: http://en.wikipedia.org/wiki/kinect .. |kin_dir| replace:: ./examples/kinect .. |kin_file| replace:: main.py .. |kin_desc| replace:: How to use the `kinect`_ for input .. |kvd_dir| replace:: ./examples/kv .. |kvd_file| replace:: kvrun.py .. |kvd_desc| replace:: Load kv files, use :mod:`kv lang ` to load different :class:`widgets `. .. |rst_dir| replace:: ./examples/RST_Editor .. |rst_file| replace:: main.py .. |rst_desc| replace:: An RST editor for the :class:`RstDocument ` Widget .. |sdr_dir| replace:: ./examples/shader .. |sdr_file| replace:: plasma.py .. |sdr_file1| replace:: shadertree.py .. |sdr_desc| replace:: How to use different :class:`Shaders `. .. |png_dir| replace:: ./examples/tutorials/pong .. |png_file| replace:: main.py .. |png_desc| replace:: :doc:`/tutorials/pong`. Your first step in kivy programming .. |wdg_dir| replace:: ./examples/widgets .. |wdg_file1| replace:: accordion_1.py .. |wdg_desc1| replace:: Usage and showcase of :class:`Accordion ` Widget .. |wdg_file2| replace:: asyncimage.py .. |wdg_desc2| replace:: Usage and showcase of :class:`AsyncImage ` Widget .. |wdg_file25| replace:: boxlayout_pos_hint.py .. |wdg_desc25| replace:: Showcase of pos_hint under :class:`BoxLayout ` .. |wdg_file3| replace:: bubble_test.py .. |wdg_desc3| replace:: Usage and Showcase of :class:`Bubble ` Widget .. |wdg_file4| replace:: customcollide.py .. |wdg_desc4| replace:: Test for :attr:`collision ` with custom shaped widget .. |wdg_file5| replace:: fbowidget.py .. |wdg_desc5| replace:: Usage of :class:`FBO ` to speed up graphics .. |wdg_file6| replace:: image_mipmap.py .. |wdg_desc6| replace:: How to use :class:`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 ` widget with .. |wdg_file81| replace:: label_with_markup.py .. |wdg_desc81| replace:: Usage of :class:`Label ` widget with markup .. |wdg_file82| replace:: popup_with_kv.py .. |wdg_desc82| replace:: Usage of :class:`Popup ` widget with ``kv`` language .. |wdg_file9| replace:: rstexample.py .. |wdg_desc9| replace:: Usage and showcase of :class:`RstDocument ` Widget .. |wdg_file10| replace:: scatter.py .. |wdg_desc10| replace:: Usage and showcase of :class:`Scatter ` Widget .. |wdg_file11| replace:: screenmanager.py .. |wdg_desc11| replace:: Usage and showcase of :mod:`ScreenManager ` Module .. |wdg_file12| replace:: scrollview.py .. |wdg_desc12| replace:: Usage and showcase of :class:`ScrollView ` Widget .. |wdg_file14| replace:: spinner.py .. |wdg_desc14| replace:: Usage and showcase of :class:`Spinner ` Widget .. |wdg_file15| replace:: tabbedpanel.py .. |wdg_desc15| replace:: Usage of a simple :class:`TabbedPanel ` .. |wdg_file16| replace:: tabbed_panel_showcase.py .. |wdg_desc16| replace:: Advanced showcase of :class:`TabbedPanel ` .. |wdg_file17| replace:: textalign.py .. |wdg_desc17| replace:: Usage of text alignment in :class:`Label ` widget .. |wdg_file18| replace:: textinput.py .. |wdg_desc18| replace:: Usage and Showcase of :class:`TextInput ` Widget .. |wdg_file19| replace:: unicode_textinput.py .. |wdg_desc19| replace:: Showcase of unicode text in :class:`TextInput ` Widget .. |wdg_file20| replace:: videoplayer.py .. |wdg_desc20| replace:: Usage and options of :class:`VideoPlayer ` Widget .. |seq_dir| replace:: ./examples/widgets/sequenced_images: .. |seq_file| replace:: main.py .. _gifs: http://en.wikipedia.org/wiki/Graphics_Interchange_Format .. |seq_desc| replace:: Showcase usage of sequenced images using `gifs`_ and images in .zip file +------------+---------------+------------------------+ | 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| | | | - |sdr_file1| | | +------------+---------------+------------------------+ |- |wdg_dir| | - |wdg_file1| |- |wdg_desc1| | | | - |wdg_file2| |- |wdg_desc2| | | | - |wdg_file25||- |wdg_desc25| | | | - |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_file81||- |wdg_desc81| | | | - |wdg_file82||- |wdg_desc82| | | | - |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| | | | - |wdg_file17||- |wdg_desc17| | | | - |wdg_file18||- |wdg_desc18| | | | - |wdg_file19||- |wdg_desc19| | | | - |wdg_file20||- |wdg_desc20| | +------------+---------------+------------------------+ |- |seq_dir| | - |seq_file| |- |seq_desc| | +------------+---------------+------------------------+