Skip to content

adding examples to Readthedocs #80

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 6, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
100 changes: 95 additions & 5 deletions docs/examples.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,42 @@ Ensure your device works with this simple test.
:caption: examples/displayio_layout_simpletest.py
:linenos:

Cartesian plane simple test
---------------------------

Create a simple plot plane.

.. literalinclude:: ../examples/displayio_layout_cartesian_simpletest.py
:caption: examples/displayio_layout_cartesian_simpletest.py
:linenos:

Cartesian lineplot
---------------------

Create a lineplot.

.. literalinclude:: ../examples/displayio_layout_cartesian_lineplot.py
:caption: examples/displayio_layout_cartesian_lineplot.py
:linenos:

Cartesian Advanced
---------------------

Create three different cartesian planes in the display

.. literalinclude:: ../examples/displayio_layout_cartesian_advanced_test.py
:caption: examples/displayio_layout_cartesian_advanced_test.py
:linenos:

GridLayout simple text
------------------------

Make green and purple rectangles and a "Hello World" label

.. literalinclude:: ../examples/displayio_layout_gridlayout_simpletest.py
:caption: examples/displayio_layout_gridlayout_simpletest.py
:linenos:

GridLayout divider lines example
--------------------------------

Expand All @@ -16,6 +52,15 @@ Create GridLayouts with divider lines.
:caption: examples/displayio_layout_gridlayout_dividers.py
:linenos:

GridLayout Get Cell
-------------------------

Make green and purple rectangles and then update the color and text values of the labels using the get_cell() function.

.. literalinclude:: ../examples/displayio_layout_grid_layout_get_cell_test.py
:caption: examples/displayio_layout_grid_layout_get_cell_test.py
:linenos:

Pygame simple test
------------------

Expand All @@ -25,6 +70,42 @@ Display Hello World using Blinka_Displayio_PyGameDisplay.
:caption: examples/displayio_layout_gridlayout_pygame_display_simpletest.py
:linenos:

Icon Animated simple test
-------------------------

Creates two animated icons with touch response: zoom and shrink animations.

.. literalinclude:: ../examples/displayio_layout_icon_animated_simpletest.py
:caption: examples/displayio_layout_icon_animated_simpletest.py
:linenos:

Page Layout simple test
-------------------------

Make a PageLayout with two pages and change between them.

.. literalinclude:: ../examples/displayio_layout_page_layout_simpletest.py
:caption: examples/displayio_layout_page_layout_simpletest.py
:linenos:

Page Layout advanced test
-------------------------

Make a PageLayout and illustrate all of it's features

.. literalinclude:: ../examples/displayio_layout_page_layout_advancedtest.py
:caption: examples/displayio_layout_page_layout_advancedtest.py
:linenos:

Pygame Switch example
-------------------------

Make a GridLayout with some Labels in its cells. Displayed with Blinka_Displayio_PyGameDisplay

.. literalinclude:: ../examples/displayio_layout_page_layout_advancedtest.py
:caption: examples/displayio_layout_page_layout_advancedtest.py
:linenos:

Switch simple test
------------------

Expand Down Expand Up @@ -52,11 +133,20 @@ Create three FlipInput selectors.
:caption: examples/displayio_layout_flip_input_simpletest.py
:linenos:

Cartesian plane simple test
---------------------------
Tab Layout simple test
-----------------------

Create a simple plot plane.
Make a TabLayout and illustrate the most basic features and usage.

.. literalinclude:: ../examples/displayio_layout_cartesian_simpletest.py
:caption: examples/displayio_layout_cartesian_simpletest.py
.. literalinclude:: ../examples/displayio_layout_tab_layout_simpletest.py
:caption: examples/displayio_layout_tab_layout_simpletest.py
:linenos:

Tab Layout touch test
---------------------

Make a TabLayout change tabs with the touchscreen

.. literalinclude:: ../examples/displayio_layout_tab_layout_touchtest.py
:caption: examples/ddisplayio_layout_tab_layout_touchtest.py
:linenos: