Permalink
Browse files

Merge branch 'doc_updates' of https://github.com/aspidites/kivy into …

…aspidites-doc_updates
  • Loading branch information...
2 parents ba58922 + c7408e0 commit 57fe6b504fb8bc5971e582f13936173813257578 @tito tito committed Jul 28, 2012
Showing with 156 additions and 144 deletions.
  1. +1 −0 Makefile
  2. +9 −1 doc/Makefile
  3. +3 −6 doc/README
  4. +3 −6 doc/sources/conf.py
  5. +1 −0 doc/sources/contribute.rst
  6. +1 −1 doc/sources/gettingstarted/events.rst
  7. +1 −1 doc/sources/gettingstarted/layouts.rst
  8. +2 −2 doc/sources/guide/inputs.rst
  9. +3 −2 doc/sources/guide/layouts.rst
  10. +1 −1 doc/sources/guide/widgettree.rst
  11. +1 −1 doc/sources/installation/installation.rst
  12. +1 −1 doc/sources/sphinxext/preprocess.py
  13. +13 −9 kivy/__init__.py
  14. +1 −1 kivy/animation.py
  15. +1 −1 kivy/app.py
  16. +1 −1 kivy/base.py
  17. +4 −4 kivy/clock.py
  18. +1 −1 kivy/config.py
  19. +2 −2 kivy/core/clipboard/__init__.py
  20. +1 −1 kivy/core/image/__init__.py
  21. +10 −7 kivy/core/window/__init__.py
  22. +3 −3 kivy/graphics/compiler.pyx
  23. +1 −1 kivy/graphics/fbo.pyx
  24. +3 −3 kivy/graphics/transformation.pyx
  25. +2 −2 kivy/input/factory.py
  26. +4 −4 kivy/input/motionevent.py
  27. +1 −1 kivy/input/postproc/dejitter.py
  28. +1 −1 kivy/input/postproc/doubletap.py
  29. +1 −1 kivy/input/postproc/ignorelist.py
  30. +1 −1 kivy/input/postproc/retaintouch.py
  31. +2 −2 kivy/input/providers/hidinput.py
  32. +1 −1 kivy/input/providers/linuxwacom.py
  33. +2 −2 kivy/input/providers/mouse.py
  34. +1 −1 kivy/input/providers/mtdev.py
  35. +1 −1 kivy/input/providers/probesysfs.py
  36. +2 −2 kivy/lang.py
  37. +1 −1 kivy/loader.py
  38. +1 −1 kivy/properties.pyx
  39. +1 −1 kivy/tools/pep8checker/pre-commit.githook
  40. +1 −1 kivy/uix/anchorlayout.py
  41. +2 −2 kivy/uix/button.py
  42. +2 −2 kivy/uix/camera.py
  43. +10 −11 kivy/uix/floatlayout.py
  44. +4 −4 kivy/uix/image.py
  45. +4 −4 kivy/uix/label.py
  46. +4 −4 kivy/uix/popup.py
  47. +1 −1 kivy/uix/progressbar.py
  48. +6 −6 kivy/uix/relativelayout.py
  49. +6 −6 kivy/uix/scatter.py
  50. +1 −1 kivy/uix/screenmanager.py
  51. +1 −1 kivy/uix/scrollview.py
  52. +5 −5 kivy/uix/slider.py
  53. +3 −3 kivy/uix/tabbedpanel.py
  54. +7 −7 kivy/uix/textinput.py
  55. +1 −1 kivy/uix/togglebutton.py
  56. +2 −1 kivy/uix/treeview.py
  57. +2 −2 kivy/uix/video.py
  58. +1 −1 kivy/uix/videoplayer.py
  59. +3 −3 kivy/utils.py
View
@@ -48,6 +48,7 @@ clean:
-rm .coverage
-rm .noseids
-rm -rf kivy/tests/build
+ -find kivy -iname '*.so' -exec rm {} \;
-find kivy -iname '*.pyc' -exec rm {} \;
-find kivy -iname '*.pyo' -exec rm {} \;
View
@@ -2,7 +2,8 @@
#
# You can set these variables from the command line.
-SPHINXOPTS =
+PYTHON = python
+SPHINXOPTS = -W
SPHINXBUILD = sphinx-build
PAPER =
@@ -28,19 +29,22 @@ clean:
html:
mkdir -p build/html build/doctrees
+ $(PYTHON) autobuild.py
$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) build/html
@echo
@echo "Build finished. The HTML pages are in build/html."
gettext:
mkdir -p build/html build/doctrees_gettext
+ $(PYTHON) autobuild.py
$(SPHINXBUILD) -b gettext $(ALLSPHINXOPTSGT) build/gettext
@echo
@echo "Build finished. The Gettext pages are in build/gettext."
pickle:
mkdir -p build/pickle build/doctrees
+ $(PYTHON) autobuild.py
$(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) build/pickle
@echo
@echo "Build finished; now you can process the pickle files or run"
@@ -51,13 +55,15 @@ web: pickle
htmlhelp:
mkdir -p build/htmlhelp build/doctrees
+ $(PYTHON) autobuild.py
$(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) build/htmlhelp
@echo
@echo "Build finished; now you can run HTML Help Workshop with the" \
".hhp project file in build/htmlhelp."
latex:
mkdir -p build/latex build/doctrees
+ $(PYTHON) autobuild.py
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) build/latex
@echo
@echo "Build finished; the LaTeX files are in build/latex."
@@ -66,12 +72,14 @@ latex:
changes:
mkdir -p build/changes build/doctrees
+ $(PYTHON) autobuild.py
$(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) build/changes
@echo
@echo "The overview file is in build/changes."
linkcheck:
mkdir -p build/linkcheck build/doctrees
+ $(PYTHON) autobuild.py
$(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) build/linkcheck
@echo
@echo "Link check complete; look for any errors in the above output " \
View
@@ -1,9 +1,9 @@
Kivy - Documentation
====================
-You can access to the API documentation on web :
+You can access the API documentation on web :
* last released version : http://kivy.org/docs/api
- * trunk version, nightly updated : http://kivy.org/docs/api-trunk/
+ * trunk version, updated nightly : http://kivy.org/docs/api-trunk/
How to build the documentation
@@ -13,10 +13,7 @@ You need to install :
* Python Sphinx (apt-get install python-sphinx)
* Latest kivy
-Run autobuild.py :
- python autobuild.py
-
-And generate documentation
+Generate documentation using make::
make html
Documentation will be accessible in build/html/
View
@@ -62,12 +62,9 @@
# Else, today_fmt is used as the format for a strftime call.
today_fmt = '%B %d, %Y'
-# List of documents that shouldn't be included in the build.
-#unused_docs = []
-
-# List of directories, relative to source directories, that shouldn't be searched
-# for source files.
-#exclude_dirs = []
+# suppress exclusion warnings
+exclude_patterns = ['gettingstarted/*', 'api-index.rst',
+ 'api-kivy.lib.osc.*', 'guide/android.rst', 'guide/layouts.rst']
# The reST default role (used for this markup: `text`) to use for all documents.
#default_role = None
@@ -219,6 +219,7 @@ Will result in:
.. note:: This new feature will likely blow your mind
.. warning:: Please take a seat before trying this feature
+
"""
@@ -57,7 +57,7 @@ Going further
Another thing to note is that if you override an event, you become responsible
for implementing all its behaviour previously handled by the base class. The
-easiest way to do this is to call `super()`: ::
+easiest way to do this is to call `super()`::
def on_touch_down(self, touch):
if super(OurClassName, self).on_touch_down(touch):
@@ -5,7 +5,7 @@ Layouts
Arranging Your Widgets
-Layouts are used to arrange widgets in a perticular manner. ::
+Layouts are used to arrange widgets in a perticular manner::
AnchorLayout: widgets can be anchored to 'top', 'bottom', 'left', 'right', 'center'
BoxLayout: widgets are arranged in a box in either 'vertical' or 'horizontal' orientation
@@ -2,7 +2,7 @@ Input management
================
Input architecture
------------------
+------------------
Kivy is able to handle most types of input: mouse, touchscreen, accelerometer,
gyroscope, etc. It handles the native multitouch protocols on the following
@@ -96,7 +96,7 @@ profile exists::
if 'angle' in touch.profile:
print 'The touch angle is', touch.a
-You can find a list of available profiles in the :doc:`api-kivy.input.motionevent`
+You can find a list of available profiles in the :mod:`api-kivy.input.motionevent`
documentation.
Touch events
@@ -25,8 +25,9 @@ BoxLayout:
.. image:: ../images/boxlayout.gif
GridLayout:
- Arrange widgets in a grid, you must specifiy at least one dimension of the
- grid, so kivy can comput size of the elements and how to arrange them
+ Arrange widgets in a grid. You must specifiy at least one dimension of the
+ grid so kivy can compute the size of the elements and how to arrange them.
+
`pos_hint` not honored
.. image:: ../images/gridlayout.gif
@@ -54,7 +54,7 @@ Traversing the tree
-------------------
The widget class has a :data:`~kivy.uix.widget.Widget.children` list property
-that contains all the children. You can easily traverse the tree by doing ::
+that contains all the children. You can easily traverse the tree by doing::
root = BoxLayout()
# ... add widgets to root ...
@@ -141,7 +141,7 @@ Uninstalling Kivy
If you are mixing multiple Kivy installations, you might be confused about where each Kivy version is
located. Please note that you might need to follow these steps multiple times, if you have multiple kivy versions
installed in the Python library path.
-To find your current installed version, you can use the command line: ::
+To find your current installed version, you can use the command line::
$ python -c 'import kivy; print kivy.__path__'
@@ -63,7 +63,7 @@ def callback_docstring(app, what, name, obj, options, lines):
line = lines.pop(0)
# trick to realign the first line to the second one.
- # FIXME: fail if we finishing with ::
+ # FIXME: fail if we finishing with::
line_with_text = [x for x in lines if len(x.strip())]
if len(line_with_text) and line is not None and len(lines):
l = len(line_with_text[0]) - len(line_with_text[0].lstrip())
View
@@ -24,7 +24,7 @@
'kivy_configure', 'kivy_register_post_configuration',
'kivy_options', 'kivy_base_dir',
'kivy_modules_dir', 'kivy_data_dir', 'kivy_shader_dir',
- 'kivy_icons_dir', 'kivy_home_dir',
+ 'kivy_icons_dir', 'kivy_home_dir', 'kivy_userexts_dir',
'kivy_config_fn', 'kivy_usermodules_dir',
)
@@ -143,7 +143,7 @@ def kivy_register_post_configuration(callback):
def kivy_usage():
- '''Kivy Usage: %s [OPTION...] ::
+ '''Kivy Usage: %s [OPTION...]::
-h, --help
Prints this help message.
@@ -224,20 +224,24 @@ def kivy_usage():
#: Kivy icons config path (don't remove the last '')
kivy_icons_dir = join(kivy_data_dir, 'icons', '')
#: Kivy user-home storage directory
-kivy_home_dir = None
+kivy_home_dir = ''
#: Kivy configuration filename
-kivy_config_fn = None
+kivy_config_fn = ''
#: Kivy user modules directory
-kivy_usermodules_dir = None
+kivy_usermodules_dir = ''
+#: Kivy user extensions directory
+kivy_userexts_dir = ''
+
# Don't go further if we generate documentation
-if basename(sys.argv[0]) in ('sphinx-build', 'autobuild.py'):
+if any(name in sys.argv[0] for name in ('sphinx-build', 'autobuild.py')):
environ['KIVY_DOC'] = '1'
-if basename(sys.argv[0]) in ('sphinx-build', ):
+if 'sphinx-build' in sys.argv[0]:
environ['KIVY_DOC_INCLUDE'] = '1'
-if basename(sys.argv[0]) in ('nosetests', ) or 'nosetests' in sys.argv:
+if any('nosetests' in arg for arg in sys.argv):
environ['KIVY_UNITTEST'] = '1'
-if not 'KIVY_DOC_INCLUDE' in environ:
+
+if not environ.get('KIVY_DOC_INCLUDE'):
# Configuration management
user_home_dir = expanduser('~')
if platform() == 'android':
View
@@ -136,7 +136,7 @@ def stop_all(widget, *largs):
'''Stop all animations that concern a specific widget / list of
properties.
- Example ::
+ Example::
anim = Animation(x=50)
anim.start(widget)
View
@@ -309,7 +309,7 @@ def build(self):
widget and added to the window.
:return: None or a root :class:`~kivy.uix.widget.Widget` instance is no
- self.root exist.
+ self.root exist.
'''
if not self.root:
return Widget()
View
@@ -26,7 +26,7 @@
class ExceptionHandler:
'''Base handler that catch exception in runTouchApp().
- You can derivate and use it like this ::
+ You can derivate and use it like this::
class E(ExceptionHandler):
def handle_exception(self, inst):
View
@@ -3,7 +3,7 @@
============
The :class:`Clock` object allows you to schedule a function call in the
-future; once or on interval. ::
+future; once or on interval::
def my_callback(dt):
pass
@@ -93,7 +93,7 @@ def callback(self, dt):
A triggered event is a way to defer a callback exactly like schedule_once(),
but with some added convenience. The callback will only be scheduled once per
frame, even if you call the trigger twice (or more). This is not the case
-with :func:`Clock.schedule_once` ::
+with :func:`Clock.schedule_once`::
# will run the callback twice before the next frame
Clock.schedule_once(my_callback)
@@ -104,15 +104,15 @@ def callback(self, dt):
t()
t()
-Before triggered events, you may have used this approach in a widget ::
+Before triggered events, you may have used this approach in a widget::
def trigger_callback(self, *largs):
Clock.unschedule(self.callback)
Clock.schedule_once(self.callback)
As soon as you call `trigger_callback()`, it will correctly schedule the
callback once in the next frame. It is more convenient to create and bind to
-the triggered event than using :func:`Clock.schedule_once` in a function ::
+the triggered event than using :func:`Clock.schedule_once` in a function::
from kivy.clock import Clock
from kivy.uix.widget import Widget
View
@@ -255,7 +255,7 @@ def write(self):
return True
-if not 'KIVY_DOC_INCLUDE' in environ:
+if not environ.get('KIVY_DOC_INCLUDE'):
#
# Read, analyse configuration file
@@ -20,8 +20,8 @@
>>> Clipboard.get('UTF8_STRING')
'Great'
-.. note:: the main implementation rely on Pygame, and works great with
-text/string. Anything else might not work the same on all platform.
+.. note:: The main implementation rely on Pygame, and works great with
+ text/string. Anything else might not work the same on all platform.
'''
__all__ = ('ClipboardBase', 'Clipboard')
@@ -623,7 +623,7 @@ def read_pixel(self, x, y):
.. warning::
This function can be used only with images loaded with
- keep_data=True keyword. For examples ::
+ keep_data=True keyword. For examples::
m = Image.load('image.png', keep_data=True)
color = m.read_pixel(150, 150)
@@ -195,18 +195,21 @@ class WindowBase(EventDispatcher):
`on_keyboard`: key, scancode, codepoint, modifier
Fired when the keyboard is in action
.. versionchanged:: 1.3.0
- The *unicode* parameter has be deprecated in favor of
- codepoint, and will be removed completely in future versions
+
+ The *unicode* parameter has be deprecated in favor of
+ codepoint, and will be removed completely in future versions
`on_key_down`: key, scancode, codepoint
Fired when a key is down
.. versionchanged:: 1.3.0
- The *unicode* parameter has be deprecated in favor of
- codepoint, and will be removed completely in future versions
+
+ The *unicode* parameter has be deprecated in favor of
+ codepoint, and will be removed completely in future versions
`on_key_up`: key, scancode, codepoint
Fired when a key is up
.. versionchanged:: 1.3.0
- The *unicode* parameter has be deprecated in favor of
- codepoint, and will be removed completely in future versions
+
+ The *unicode* parameter has be deprecated in favor of
+ codepoint, and will be removed completely in future versions
`on_dropfile`: str
Fired when a file is dropped on the application
'''
@@ -287,7 +290,7 @@ def _set_clearcolor(self, value):
bind=('_clearcolor', ))
'''Color used to clear window.
- ::
+ ::
from kivy.core.window import Window
# red background color
Oops, something went wrong.

0 comments on commit 57fe6b5

Please sign in to comment.