From 4ae1b14d11d593a6307e4bb2ca52daaf2e03d599 Mon Sep 17 00:00:00 2001 From: "Edwin Marshall (aspidites)" Date: Sat, 28 Jul 2012 02:46:38 -0500 Subject: [PATCH] - trying a more flexible method of suppressing warnings - added reference to clock documentation --- doc/Makefile | 4 ++-- doc/sources/conf.py | 3 +-- doc/sources/contents.rst.inc | 1 + doc/sources/gettingstarted/framework.rst | 2 +- doc/sources/index.rst | 23 +++++++++++++++++++++++ kivy/clock.py | 4 ++++ 6 files changed, 32 insertions(+), 5 deletions(-) diff --git a/doc/Makefile b/doc/Makefile index 943ac23f0..571a0b883 100644 --- a/doc/Makefile +++ b/doc/Makefile @@ -3,8 +3,8 @@ # You can set these variables from the command line. PYTHON = python -#SPHINXOPTS = -W -SPHINXOPTS = +SPHINXOPTS = -W +#SPHINXOPTS = SPHINXBUILD = sphinx-build PAPER = diff --git a/doc/sources/conf.py b/doc/sources/conf.py index 975060499..d4608cae1 100644 --- a/doc/sources/conf.py +++ b/doc/sources/conf.py @@ -63,8 +63,7 @@ release = kivy.__version__ today_fmt = '%B %d, %Y' # suppress exclusion warnings -#exclude_patterns = ['gettingstarted/*', 'api-index.rst', -# 'api-kivy.lib.osc.*', 'guide/layouts.rst'] +exclude_patterns = ['gettingstarted/*', 'guide/layouts.rst'] # The reST default role (used for this markup: `text`) to use for all documents. #default_role = None diff --git a/doc/sources/contents.rst.inc b/doc/sources/contents.rst.inc index abe45c875..51533c074 100644 --- a/doc/sources/contents.rst.inc +++ b/doc/sources/contents.rst.inc @@ -6,6 +6,7 @@ and why you'd want to use it. It goes on with a discussion of the architecture and shows you how to create stunning applications in short time using the framework. + .. toctree:: :maxdepth: 2 diff --git a/doc/sources/gettingstarted/framework.rst b/doc/sources/gettingstarted/framework.rst index a42310cf9..c3d43c65b 100644 --- a/doc/sources/gettingstarted/framework.rst +++ b/doc/sources/gettingstarted/framework.rst @@ -15,7 +15,7 @@ Non-widget stuff .. |atlas_text| replace:: :class:`Atlas ` is a class for managing texture maps, i.e. packing multiple textures into one image. Using it allows you to reduce the number of images to load and speed up the application start. -.. |clock_text| replace:: :class:`Clock ` provides you with a convenient way to do jobs at set time intervals and is preferred over *sleep()* which would block the kivy Event Loop. These intervals can be set relative to the OpenGL Drawing instructions, :ref:`before ` or :ref:`after ` frame. Clock also provides you with a way to create :ref:`triggered events ` that are grouped together and only called once before the next frame. +.. |clock_text| replace:: :class:`Clock ` provides you with a convenient way to do jobs at set time intervals and is preferred over *sleep()* which would block the kivy Event Loop. These intervals can be set relative to the OpenGL Drawing instructions, :ref:`before ` or :ref:`after ` frame. Clock also provides you with a way to create :ref:`triggered events ` that are grouped together and only called once before the next frame. .. |sched_once| replace:: :meth:`~kivy.clock.ClockBase.schedule_once` .. |sched_intrvl| replace:: :meth:`~kivy.clock.ClockBase.schedule_interval` diff --git a/doc/sources/index.rst b/doc/sources/index.rst index fcbd1f03c..9c0c8bd6e 100644 --- a/doc/sources/index.rst +++ b/doc/sources/index.rst @@ -1,5 +1,6 @@ :orphan: + Welcome to Kivy =============== @@ -19,6 +20,28 @@ concern isn't addressed in the documentation, feel free to :ref:`contact`. .. include:: contents.rst.inc +.. Suppress warnings about documents not being included in toc, but don't + actually show them. +.. toctree:: + :hidden: + + api-index + api-kivy.lib.osc.OSC + api-kivy.lib.osc.oscAPI +.. gettingstarted/diving + gettingstarted/drawing + gettingstarted/events + gettingstarted/examples + gettingstarted/first_app + gettingstarted/framework + gettingstarted/installation + gettingstarted/intro + gettingstarted/layouts + gettingstarted/packaging + gettingstarted/properties + gettingstarted/rules + guide/layouts + Appendix ======== diff --git a/kivy/clock.py b/kivy/clock.py index 37a8a3988..b0fcd5e27 100644 --- a/kivy/clock.py +++ b/kivy/clock.py @@ -59,6 +59,8 @@ module:: # and keep the instance of foo, until you don't need it anymore! +.. _schedule-before-frame: + Schedule before frame --------------------- @@ -85,6 +87,8 @@ If you need to increase the limit, set the :data:`max_iteration` property:: from kivy.clock import Clock Clock.max_iteration = 20 +.. _triggered-events: + Triggered Events ----------------