mirror of https://github.com/kivy/kivy.git
iLanguage & editing changes for gettingstarted/ doc files.
This commit is contained in:
parent
ac1775c989
commit
536a0b1c26
|
@ -34,7 +34,7 @@ Kivy framework code `on kivy-dev Google Groups <https://groups.google.com/group/
|
|||
IRC
|
||||
---
|
||||
|
||||
**#kivy on irc.freenode.net**
|
||||
**#Kivy on irc.freenode.net**
|
||||
|
||||
IRC is great for real-time communication, but please make sure to **wait** after
|
||||
you asked your question. If you just join, ask and quit we have **no way** of
|
||||
|
|
|
@ -5,7 +5,7 @@ Tests are located in the kivy/tests folder, if you find a bug in kivy, a good
|
|||
thing to do can be to write a minimal case showing the issue, to ask core devs
|
||||
if the behaviour showed is intended or a real bug, if you put your code as a
|
||||
unittest, it will prevent the bug to come back unnoticed in the future, and
|
||||
will make kivy a better, stronger project. Writting unittest may be a really
|
||||
will make Kivy a better, stronger project. Writting unittest may be a really
|
||||
good way to get familiar with Kivy while doing something useful.
|
||||
|
||||
Unit tests are seperated in two cases:
|
||||
|
@ -71,10 +71,10 @@ Currently, images are generated in 320x240, png.
|
|||
|
||||
.. note::
|
||||
|
||||
Currently, the image comparaison is done per pixel. That mean the reference
|
||||
image that you will generate will be only correct for your GPU/driver. If
|
||||
somebody can implement a image comparaison with "delta" support, patches
|
||||
welcome :)
|
||||
Currently, image comparison is done per-pixel. This means the reference
|
||||
image that you generate will only be correct for your GPU/driver. If
|
||||
somebody can implement image comparison with "delta" support, patches
|
||||
are welcome :)
|
||||
|
||||
To execute gl unit test, you need to create a directory::
|
||||
|
||||
|
|
|
@ -38,7 +38,7 @@ spelling, weird example, please take 2 minutes to report the issue.
|
|||
log_level = debug
|
||||
|
||||
#. Execute again your code, and copy/paste the complete output to http://gist.github.com/,
|
||||
including the log from kivy and the python backtrace.
|
||||
including the log from Kivy and the python backtrace.
|
||||
#. Open https://github.com/kivy/kivy/issues/
|
||||
#. Write a title of your issue
|
||||
#. Explain how we can do to reproduce the issue + paste the link of the output previously sent on pocoo
|
||||
|
@ -149,7 +149,7 @@ Unit tests contributions
|
|||
------------------------
|
||||
|
||||
For testing team, we have the document :doc:`contribute-unittest` that
|
||||
explain how kivy unit test is working, and how you can create your own. Use the
|
||||
explain how Kivy unit test is working, and how you can create your own. Use the
|
||||
same approach as the `Code Workflow` to submit new tests.
|
||||
|
||||
.. toctree::
|
||||
|
|
|
@ -9,13 +9,13 @@ To further get into kivy take a look at :doc:`/index`
|
|||
Kivy comes with a set of :doc:`examples` in the ``examples`` directory.
|
||||
You should try modifying/improving/adapting them to your needs.
|
||||
|
||||
Browse the `snippet wiki <http://wiki.kivy.org>`_ , You can even add your snippet in the user snippets section.
|
||||
Browse the `snippet wiki <http://wiki.kivy.org>`_ . You can even add your snippet in the user snippets section.
|
||||
|
||||
Understand the Basics about `kivy Graphics <http://kivy.org/docs/api-kivy.graphics.html#module-kivy.graphics>`_
|
||||
Understand the basics about `kivy graphics <http://kivy.org/docs/api-kivy.graphics.html#module-kivy.graphics>`_
|
||||
|
||||
Take a look at the built-in `widgets <http://kivy.org/docs/api-kivy.uix.html>`_
|
||||
|
||||
Follow the `programing guide <http://kivy.org/docs/guide-index.html>`_ to get even more familiar with kivy.
|
||||
Follow the `programming guide <http://kivy.org/docs/guide-index.html>`_ to get even more familiar with kivy.
|
||||
|
||||
See how to use different `Modules <http://kivy.org/docs/api-kivy.modules.html>`_ like the Inspector for live inspection in the modules section.
|
||||
|
||||
|
@ -23,6 +23,6 @@ Learn how to handle custom `Input <http://kivy.org/docs/api-kivy.input.html>`_
|
|||
|
||||
See how kivy has been extended with `extensions <http://kivy.org/docs/api-kivy.ext.html#module-kivy.ext>`_ support.
|
||||
|
||||
Familiarize yourself with `kivy framework <http://kivy.org/docs/api-kivy.html#module-kivy>`_
|
||||
Familiarize yourself with the `kivy framework <http://kivy.org/docs/api-kivy.html#module-kivy>`_
|
||||
|
||||
Kivy is open source so you can **contribute** , take a look at :doc:`/contribute` section to follow the guidelines.
|
||||
Kivy is open source so you can **contribute** , take a look at :doc:`/contribute` section to see the guidelines.
|
||||
|
|
|
@ -4,12 +4,17 @@ Drawing
|
|||
|
||||
Graphics Instructions, Canvas
|
||||
|
||||
Each widget has a canvas, i.e. a place to draw on. The canvas is a group of instructions that should be executed whenever there is a change to the widget's graphics representation. You can add two types of instructions to the canvas, context instructions and vertex instructions. You can put instructions either from python or from kv (preffered way). If you add them from kv, the advantage is that they are automatically updated when any property they depend on changes. In python, you need to do this yourself.
|
||||
Each widget has a canvas, i.e. a place to draw on. The canvas is a group of instructions that should be executed
|
||||
whenever there is a change to the widget's graphics representation.
|
||||
You can add two types of instructions to the canvas, *context* instructions and *vertex* instructions.
|
||||
You can add instructions either from Python or from kv (the preferred way).
|
||||
If you add them from kv, the advantage is that they are automatically updated when any property they depend on changes.
|
||||
In Python, you need to do this yourself.
|
||||
|
||||
.. image:: ../images/gs-drawing.png
|
||||
|
||||
In both cases the canvas of the MyWidget is re-drawn whenever the ``position`` or the ``size`` of the widget changes.
|
||||
|
||||
You can use **canvas.before** or **canvas.after** . This allows you to seperate your instructions based on when you want each to happen.
|
||||
You can use **canvas.before** or **canvas.after** . This allows you to separate your instructions based on when you want them to happen.
|
||||
|
||||
For an in depth look at how Kivys Graphics are handled, look `here <http://kivy.org/docs/api-kivy.graphics.html>`_
|
||||
For an in-depth look at how Kivy's graphics are handled, look `here. <http://kivy.org/docs/api-kivy.graphics.html>`_
|
||||
|
|
|
@ -4,7 +4,7 @@ Events
|
|||
|
||||
Events in Kivy
|
||||
|
||||
Kivy is **event oriented**. The most basic events you will work with are. ::
|
||||
Kivy is **event oriented**. The most basic events you will work with are: ::
|
||||
|
||||
1. Clock events:
|
||||
- Repetitive events : X times per second using schedule_interval()
|
||||
|
@ -12,22 +12,22 @@ Kivy is **event oriented**. The most basic events you will work with are. ::
|
|||
- Trigger events: called only once for the next frame
|
||||
2. Widget events :
|
||||
- Property events: if your widget changes its position or size, an event is fired
|
||||
- Widget defined events: A Widget can define custom events
|
||||
- Widget-defined events: A Widget can define custom events
|
||||
Eg. on_press() and on_release() events in Button Widget
|
||||
3. Input events:
|
||||
- Touch events: There are three of them:
|
||||
- on_touch_down: which is dispatched at the begining of a touch
|
||||
- Touch events: There are three of these:
|
||||
- on_touch_down: which is dispatched at the beginning of a touch
|
||||
- on_touch_move: which is dispatched every time a touch is moving
|
||||
- on_touch_up: which is dispatched when the end of the touch
|
||||
Note** that, all widgets get all of these events whatever there positions,
|
||||
- on_touch_up: which is dispatched at the end of the touch
|
||||
Note** that all widgets get all of these events whatever their positions,
|
||||
allowing for the widgets to react to any event.
|
||||
- Keyboard events
|
||||
- system kayboard events (hard/soft keyboards)
|
||||
- virtual Keyboard events (kivy provided virtual keyboard)
|
||||
- virtual keyboard events (kivy provided virtual keyboard)
|
||||
|
||||
Another thing to **Note** is that if you override an event, you now become
|
||||
responsible of implementing all it's behavoiur handled by the base class,
|
||||
the easiest way to do that is to call **super** ::
|
||||
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*: ::
|
||||
|
||||
def on_touch_down(self, touch):
|
||||
if super(OurClaseName, self).on_touch_down(touch):
|
||||
|
@ -36,5 +36,5 @@ the easiest way to do that is to call **super** ::
|
|||
return False
|
||||
print 'you touched me!'
|
||||
|
||||
Get more familiar with events by reading the following `event <http://kivy.org/docs/guide/events.html#events>`_ documentation.
|
||||
Get more familiar with events by reading the `event <http://kivy.org/docs/guide/events.html#events>`_ documentation.
|
||||
|
||||
|
|
|
@ -36,11 +36,11 @@ Examples
|
|||
|
||||
.. |dem_dir| replace:: ./examples/demo:
|
||||
.. |dem_file| replace:: camera_puzzle.py
|
||||
.. |dem_desc| replace:: A puzzle using camera's output
|
||||
.. |dem_desc| replace:: A puzzle using camera output
|
||||
|
||||
.. |pic_dir| replace:: ./examples/demo/pictures
|
||||
.. |pic_file| replace:: main.py
|
||||
.. |pic_desc| replace:: Highlites usage of :class:`Image <kivy.uix.image>` and :class:`Scatter <kivy.uix.scatter>` Widgets
|
||||
.. |pic_desc| replace:: Highlights usage of :class:`Image <kivy.uix.image>` and :class:`Scatter <kivy.uix.scatter>` Widgets
|
||||
|
||||
.. |sed_dir| replace:: ./examples/demo/shadereditor
|
||||
.. |sed_file| replace:: main.py
|
||||
|
@ -52,7 +52,7 @@ Examples
|
|||
|
||||
.. |tch_dir| replace:: ./examples/demo/touchtracer
|
||||
.. |tch_file| replace:: main.py
|
||||
.. |tch_desc| replace:: Draw lines under every touch/s detected.
|
||||
.. |tch_desc| replace:: Draw lines under every detected touch.
|
||||
.. |tch_desc2| replace:: A good place to understand how touch events work in kivy.
|
||||
|
||||
.. |tws_dir| replace:: ./examples/frameworks/twisted
|
||||
|
@ -91,7 +91,7 @@ Examples
|
|||
|
||||
.. |rst_dir| replace:: ./examples/RST_Editor
|
||||
.. |rst_file| replace:: main.py
|
||||
.. |rst_desc| replace:: A RST editor for :class:`RstDocument <kivy.uix.rst.RstDocument>` Widget.
|
||||
.. |rst_desc| replace:: An RST editor for the :class:`RstDocument <kivy.uix.rst.RstDocument>` Widget.
|
||||
|
||||
.. |sdr_dir| replace:: ./examples/shader
|
||||
.. |sdr_file| replace:: plasma.py
|
||||
|
@ -100,7 +100,7 @@ Examples
|
|||
|
||||
.. |png_dir| replace:: ./examples/tutorials/pong
|
||||
.. |png_file| replace:: main.py
|
||||
.. |png_desc| replace:: Pong Game tutorial. Your first step into kivy programming.
|
||||
.. |png_desc| replace:: Pong Game tutorial. Your first step in kivy programming.
|
||||
|
||||
.. |wdg_dir| replace:: ./examples/widgets
|
||||
.. |wdg_file1| replace:: accordion_1.py
|
||||
|
@ -112,7 +112,7 @@ Examples
|
|||
.. |wdg_file4| replace:: customcollide.py
|
||||
.. |wdg_desc4| replace:: Test for collision with custom shaped widget
|
||||
.. |wdg_file5| replace:: fbowidget.py
|
||||
.. |wdg_desc5| replace:: Usage of FBO to speedup graphics.
|
||||
.. |wdg_desc5| replace:: Usage of FBO to speed up graphics.
|
||||
.. |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
|
||||
|
@ -210,4 +210,4 @@ Examples
|
|||
| | - |wdg_file16||- |wdg_desc16| |
|
||||
+------------+---------------+------------------------+
|
||||
|- |seq_dir| | - |seq_file| |- |seq_desc| |
|
||||
+------------+---------------+------------------------+
|
||||
+------------+---------------+------------------------+
|
||||
|
|
|
@ -5,18 +5,18 @@ A first App
|
|||
|
||||
Jump into the code
|
||||
|
||||
Immerse yourself into the world of Kivy with your first App.
|
||||
Immerse yourself in the world of Kivy with your first App.
|
||||
|
||||
.. image:: ../images/gs-tutorial.png
|
||||
:align: center
|
||||
:height: 229px
|
||||
|
||||
The :doc:`/tutorials/pong` introduces the fundamental design patterns and
|
||||
application development process. As you follow the tutorial, you will create a simple app.
|
||||
You will also learn how to run your app in on your OS. The simple steps in the tutorial
|
||||
introduce elegant, useful concepts that you use over and over again in app development.
|
||||
the application development process. As you follow the tutorial, you will create a simple app.
|
||||
You will also learn how to run the app on your OS. The simple steps in the tutorial
|
||||
introduce elegant, useful concepts that you will use over and over again in app development.
|
||||
|
||||
Your :doc:`/tutorials/pong` is the most important article in the road map. It
|
||||
The :doc:`/tutorials/pong` is the most important article in the road map. It
|
||||
lays the foundation for the concepts that you will learn more about later. Each
|
||||
of the other articles expands on one of those concepts.
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
Non widgets stuff
|
||||
Non-widget stuff
|
||||
-----------------
|
||||
|
||||
.. container:: title
|
||||
|
@ -7,19 +7,20 @@ Non widgets stuff
|
|||
|
||||
.. |animation_img| image:: ../images/gs-animation.gif
|
||||
|
||||
.. |animation_text| replace:: :class:`Animation <kivy.animation.Animation>` is used to change a Widget's' properties (size/pos/center...), to a target value, in a target time, various :class:`transition <kivy.animation.AnimationTransition>` functions are provided. Using them, you can animate widgets and build very smoth UI behaviours.
|
||||
.. |animation_text| replace:: :class:`Animation <kivy.animation.Animation>` is used to change a Widget's properties (size/pos/center...), to a target value, in a target time.
|
||||
Various :class:`transition <kivy.animation.AnimationTransition>` functions are provided.
|
||||
Using them, you can animate widgets and build very smooth UI behaviours.
|
||||
|
||||
.. |atlas_img| image:: ../images/gs-atlas.png
|
||||
|
||||
.. |atlas_text| replace:: :class:`Atlas <kivy.atlas.Atlas>` is a class for managing texture maps, i.e. packing multiple texture into one image. Using it allow to reduce the number of images to load and speedup the application starting.
|
||||
.. |atlas_text| replace:: :class:`Atlas <kivy.atlas.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 <kivy.clock.Clock>` provides you with a convenient way to do jobs at set time intervals and is preffered over sleep() as sleep would block kivy Event Loop. These intervals can be set relative to the OpenGL Drawing instructions, :ref:`before <schedule-before-frame>` or :ref:`after <schedule-after-frame>` frame. Clock also provides you with a way to create :ref:`triggered events <triggered-events>` that are clubbed togeather and only called once before the next frame.
|
||||
.. |clock_text| replace:: :class:`Clock <kivy.clock.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 <schedule-before-frame>` or :ref:`after <schedule-after-frame>` frame. Clock also provides you with a way to create :ref:`triggered events <triggered-events>` that are grouped together and only called once before the next frame.
|
||||
|
||||
.. |sched_once| replace:: `Clock.schedule_once <http://kivy.org/docs/api-kivy.clock.html?highlight=clock#kivy.clock.ClockBase.schedule_once>`__
|
||||
.. |sched_intrvl| replace:: `Clock.schedule_interval <http://kivy.org/docs/api-kivy.clock.html?highlight=clock#kivy.clock.ClockBase.schedule_interval>`__
|
||||
.. |unsched| replace:: `Clock.unschedule <http://kivy.org/docs/api-kivy.clock.html?highlight=clock#kivy.clock.ClockBase.unschedule>`__
|
||||
.. |trigger| replace:: `Clock.create_trigger <http://kivy.org/docs/api-kivy.clock.html?highlight=clock#kivy.clock.ClockBase.create_trigger>`__
|
||||
|
||||
.. |urlreq| replace:: :class:`UrlRequest <kivy.network.urlrequest.UrlRequest>` is useful to do asynchronous requests without blocking the event loop, and manage the result and progress with callbacks.
|
||||
|
||||
+------------------+------------------+
|
||||
|
|
|
@ -13,4 +13,5 @@ Getting Started
|
|||
.. include:: layouts.rst
|
||||
.. include:: drawing.rst
|
||||
.. include:: packaging.rst
|
||||
.. include:: examples.rst
|
||||
.. include:: diving.rst
|
||||
|
|
|
@ -5,37 +5,43 @@ Installation
|
|||
|
||||
Installing Kivy
|
||||
|
||||
Using Kivy, you can use your favorite development environment to start
|
||||
With Kivy, you can use your favourite development environment to start
|
||||
coding your App.
|
||||
|
||||
- To get started, you need to download the latest version of Kivy:
|
||||
|
||||
http://kivy.org/#download
|
||||
|
||||
- Please refer to the installation instructions for your specific platform:
|
||||
- Please refer to the installation instructions for your specific platform.
|
||||
|
||||
.. image:: ../images/windows.png
|
||||
:alt: Windows
|
||||
:target: ../installation/installation-windows.html
|
||||
:class: gs-osimage
|
||||
:height: 128px
|
||||
:width: 30%
|
||||
|
||||
.. image:: ../images/macosx.png
|
||||
:alt: MacOSX
|
||||
:target: ../installation/installation-macosx.html
|
||||
:class: gs-osimage
|
||||
:height: 128px
|
||||
:width: 30%
|
||||
|
||||
.. image:: ../images/linux.png
|
||||
:alt: Linux
|
||||
:target: ../installation/installation-linux.html
|
||||
:class: gs-osimage gs-osimage-last
|
||||
:height: 128px
|
||||
:width: 30%
|
||||
|
||||
::
|
||||
::
|
||||
|
||||
|
||||
**Development Version**
|
||||
|
||||
- If you want to use the development version of Kivy, so you can use the latest additions to the framework, you can get the source code from github::
|
||||
- If you want the development version of Kivy, so you can use the latest additions to the framework, you can get the source code from github::
|
||||
|
||||
git clone http://github.com/kivy/kivy
|
||||
|
||||
Take a look at our instructions on Installation of :ref:`installation_devel`
|
||||
Take a look at our instructions on installation of the :ref:`installation_devel`
|
||||
|
|
|
@ -5,11 +5,13 @@ Introduction
|
|||
|
||||
Start Developing Kivy Apps right away!
|
||||
|
||||
Creating Kivy apps is fun and enriching. This guide should be the perfect
|
||||
starting point to get you on the right track for app development.
|
||||
Creating Kivy apps is fun and rewarding. This guide should be the perfect
|
||||
starting point to get you on the right track for app development. You will require a basic knowledge of Python
|
||||
to follow this introduction. If you need more background, you might be interested in these tutorials:
|
||||
|
||||
.. note::
|
||||
Kivy is based on Python, `basic <http://docs.python.org/tutorial/>`_ `python <http://www.korokithakis.net/tutorials/python/>`_ `knowlege <http://learnpythonthehardway.org/>`_ is assumed in this introduction.
|
||||
* `The Python Tutorial (at the Python website) <http://docs.python.org/tutorial/>`_
|
||||
* `Learn Python in 10 minutes <http://www.korokithakis.net/tutorials/python/>`_
|
||||
* `Learn Python the hard way <http://learnpythonthehardway.org/>`_
|
||||
|
||||
.. image:: ../images/gs-introduction.png
|
||||
:align: center
|
||||
|
@ -17,16 +19,18 @@ starting point to get you on the right track for app development.
|
|||
|
||||
On your computer, you can create apps that run on:
|
||||
|
||||
- Desktop computer: MacOSX, Linux, Windows.
|
||||
- Desktop computers: MacOSX, Linux, Windows.
|
||||
- iOs Devices: iPad, iPhone
|
||||
- Android devices: Tablets, Phones.
|
||||
- And any others touch enabled professional/homebrew devices supporting TUIO.
|
||||
- Android devices: Tablets, phones.
|
||||
- Any other touch-enabled professional/homebrew devices supporting TUIO (Tangible User Interface Objects).
|
||||
|
||||
Kivy empowers you with the freedom of writing your code once and having it run as is on different platforms.
|
||||
Kivy empowers you with the freedom of writing your code once and having it run as-is on different platforms.
|
||||
|
||||
Follow this guide to get the tools you need, understand the major concepts and
|
||||
best practices, as this is an introduction, pointers will be provided at the
|
||||
end of each section to find more information.
|
||||
learn best practices. As this is an introduction, pointers to more information will be provided at the
|
||||
end of each section.
|
||||
|
||||
You may also want to look at the :doc:`/gettingstarted/index` guide.
|
||||
|
||||
As you proceed through the guide, you will, using Kivy:
|
||||
|
||||
|
@ -40,7 +44,7 @@ Finally, you will learn how to **Deploy** on a device of your choice.
|
|||
Each section of the guide introduces a new topic, trying to give you enough
|
||||
information to get started and links to related articles for more in-depth
|
||||
explanations. When you are done with this guide, you'll be able to develop
|
||||
Kivy apps and will know where to look for informations for the more challenging
|
||||
Kivy apps and you will know where to look for information for the more challenging
|
||||
stuff your innovative applications will require.
|
||||
|
||||
Enough with the introductions, let's get down to business.
|
||||
Enough introductions, let's get down to business.
|
||||
|
|
|
@ -8,15 +8,15 @@ Layouts
|
|||
Layouts are used to arrange widgets in a perticular manner. ::
|
||||
|
||||
AnchorLayout: widgets can be anchored to 'top', 'bottom', 'left', 'right', 'center'
|
||||
BoxLayout: widgets arranged in a box either in 'vertical' or 'horizontal' orientation
|
||||
BoxLayout: widgets are arranged in a box in either 'vertical' or 'horizontal' orientation
|
||||
FloatLayout: Widgets are essentially unrestricted
|
||||
GridLayout: widgets arranged in a grid defined by `rows` and `cols` properties
|
||||
StackLayout: widgets are stacked in `lr-tb` (left to right then top to bottom) or `tb-lr`
|
||||
GridLayout: widgets are arranged in a grid defined by `rows` and `cols` properties
|
||||
StackLayout: widgets are stacked in `lr-tb` (left to right then top to bottom) or `tb-lr` order
|
||||
|
||||
**Size_hint**: defines the size of a widget in parent space in percentages, values restricted to range 0 - 1 i.e. 0.01 = 1% and 1. = 100%.
|
||||
**Size_hint**: defines the size of a widget in parent space as a percentage. Values are restricted to the range 0.0 - 1.0 i.e. 0.01 = 1% and 1. = 100%.
|
||||
**pos_hint**: is used to place the widget relative to the parent.
|
||||
|
||||
size_hint or pos_hint are used to calculate widget's size and position only if the value/s are not set to None.
|
||||
size_hint and pos_hint are used to calculate widget's size and position only if the value/s are not set to None.
|
||||
However one can set these to None and provide direct values in screen coordinates.
|
||||
|
||||
For a detailed look at how you can arrange widgets using layouts look in
|
||||
|
@ -24,4 +24,4 @@ For a detailed look at how you can arrange widgets using layouts look in
|
|||
`BoxLayout <http://kivy.org/docs/api-kivy.uix.boxlayout.html>`_
|
||||
`FloatLayout <http://kivy.org/docs/api-kivy.uix.floatlayout.html>`_
|
||||
`GridLayout <http://kivy.org/docs/api-kivy.uix.gridlayout.html>`_
|
||||
`StackLayout <http://kivy.org/docs/api-kivy.uix.stacklayout.html>`_
|
||||
`StackLayout <http://kivy.org/docs/api-kivy.uix.stacklayout.html>`_
|
||||
|
|
|
@ -7,14 +7,14 @@ Packaging
|
|||
<span id="packaging"></span><h1>Packaging your application<a class="headerlink" href="#packaging-your-application" title="Permalink to this headline">¶</a></h1>
|
||||
<div class="toctree-wrapper compound">
|
||||
<ul>
|
||||
<li class="toctree-l1"><a class="reference internal" href="packaging-windows.html">Create package for Windows</a><ul>
|
||||
<li class="toctree-l1"><a class="reference internal" href="packaging-windows.html">Create a package for Windows</a><ul>
|
||||
<li class="toctree-l2"><a class="reference internal" href="packaging-windows.html#requirements">Requirements</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="packaging-windows.html#install-and-configure-pyinstaller">Install and configure PyInstaller</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="packaging-windows.html#create-the-spec-file">Create the spec file</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="packaging-windows.html#build-the-spec">Build the spec</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="packaging-macosx.html">Create package for MacOSX</a><ul>
|
||||
<li class="toctree-l1"><a class="reference internal" href="packaging-macosx.html">Create a package for MacOSX</a><ul>
|
||||
<li class="toctree-l2"><a class="reference internal" href="packaging-macosx.html#requirements">Requirements</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="packaging-macosx.html#install-and-configure-pyinstaller">Install and configure PyInstaller</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="packaging-macosx.html#create-the-spec-file">Create the spec file</a></li>
|
||||
|
@ -38,4 +38,4 @@ Packaging
|
|||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -10,14 +10,14 @@ Kivy's properties are useful to:
|
|||
|
||||
- Allow manipulating your widgets in kv language more easily
|
||||
- Automatically observe any changes and dispatch functions/code accordingly
|
||||
- Value checking/validation
|
||||
- Optimize memory managment
|
||||
- Check and validate values
|
||||
- Optimize memory management
|
||||
|
||||
|
||||
To use them, **you have to declare them at class level**. That is, directly in
|
||||
the class, not în any method of the class, the property is a class attribute
|
||||
the class, not în any method of the class. A property is a class attribute
|
||||
that will automatically create instance attributes. Each property by default
|
||||
provides a ``on_property`` event that is called whenever the properties
|
||||
provides an ``on_property`` event that is called whenever the property's
|
||||
state/value changes .
|
||||
|
||||
Kivy provides the following properties:
|
||||
|
@ -33,4 +33,4 @@ Kivy provides the following properties:
|
|||
`DictProperty <http://kivy.org/docs/api-kivy.properties.html?highlight=properties#kivy.properties.DictProperty>`_,
|
||||
|
||||
|
||||
For a in-depth look in how-to use kivy properties start `here <http://kivy.org/docs/api-kivy.properties.html>`_
|
||||
For an in-depth look at how to use kivy properties, start `here. <http://kivy.org/docs/api-kivy.properties.html>`_
|
||||
|
|
|
@ -3,11 +3,11 @@ Kv Design Language
|
|||
|
||||
.. container:: title
|
||||
|
||||
Designing through kv language.
|
||||
Designing with the kv language.
|
||||
|
||||
Kivy provides a design language specifically geared towards ease of GUI Design,
|
||||
it makes seperating the interface design and logic from the internal design and
|
||||
logic easier. for example.
|
||||
which makes it easier to separate interface design and logic from internal design and
|
||||
logic. For example:
|
||||
|
||||
.. image:: ../images/gs-lang.png
|
||||
:align: center
|
||||
|
@ -18,8 +18,8 @@ In the above code :
|
|||
.. code-block:: kv
|
||||
|
||||
<LoginScreen>: # every class in your app can be represented by a rule like this in the kv file
|
||||
GridLayout: # this is how you add your widget/layout to the parent note the indentation.
|
||||
GridLayout: # this is how you add your widget/layout to the parent (note the indentation).
|
||||
rows: 2 # this how you set each property of your widget/layout
|
||||
|
||||
That's it, that's how simple it is to design your GUI in kv language. To get a
|
||||
That's it, that's how simple it is to design your GUI in the kv language. To get a
|
||||
more in-depth understanding look at :doc:`/guide/kvlang`
|
||||
|
|
|
@ -3,10 +3,10 @@
|
|||
Installation
|
||||
============
|
||||
|
||||
We try not to reinvent the wheel but bring something innovative to the
|
||||
market. As a consequence, we're focused on our own code and use already
|
||||
existing, high-quality third-party libraries where possible.
|
||||
For the rich set of features that Kivy offers, several other libraries are
|
||||
We try not to reinvent the wheel, but to bring something innovative to the
|
||||
market. As a consequence, we're focused on our own code and use pre-existing,
|
||||
high-quality third-party libraries where possible.
|
||||
To support the full, rich set of features that Kivy offers, several other libraries are
|
||||
required. If you do not use a specific feature (e.g. video playback) you
|
||||
don't need the corresponding dependency, however.
|
||||
That said, there is one dependency that Kivy **does** require:
|
||||
|
@ -19,7 +19,7 @@ be available. For these, we recommend `Pygame <http://pygame.org>`_, `Gst-Python
|
|||
<http://www.gstreamer.net/modules/gst-python.html>`_ and `Enchant
|
||||
<http://www.rfk.id.au/software/pyenchant/>`_, respectively.
|
||||
|
||||
Other optional libraries (mutually interchangeable) are:
|
||||
Other optional libraries (mutually independent) are:
|
||||
|
||||
* `OpenCV 2.0 <http://sourceforge.net/projects/opencvlibrary/>`_ -- Camera input.
|
||||
* `PIL <http://www.pythonware.com/products/pil/index.htm>`_ -- Image and text display.
|
||||
|
@ -31,7 +31,7 @@ Other optional libraries (mutually interchangeable) are:
|
|||
That said, **DON'T PANIC**!
|
||||
|
||||
We don't ask you to install all those things on your own.
|
||||
Instead, we created nice portable packages that you can use directly
|
||||
Instead, we have created nice portable packages that you can use directly
|
||||
since they already contain the necessary packages for your platform.
|
||||
We just want you to know about the alternatives for the defaults and give
|
||||
you an overview about the things Kivy uses internally.
|
||||
|
@ -120,9 +120,9 @@ code base, please read :ref:`contributing`.
|
|||
Running the test suite
|
||||
~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
To help detecting issues and behaviour changes in kivy, a set of unittests is
|
||||
provided, a good thing to do is to run it just after kivy installation, and
|
||||
then, everytime you intend to push a change, or you think something was brocken
|
||||
To help detect issues and behaviour changes in kivy, a set of unittests is
|
||||
provided. A good thing to do is to run it just after kivy installation, and
|
||||
then, every time you intend to push a change, or you think something was broken
|
||||
in kivy, maybe a test will show this. If not, it might be a good time to write
|
||||
one .)
|
||||
|
||||
|
@ -138,17 +138,17 @@ to run the test suite, do :
|
|||
Uninstalling Kivy
|
||||
~~~~~~~~~~~~~~~~~
|
||||
|
||||
If you are mixing multiple Kivy installation, you might be confused where is
|
||||
located each Kivy version. Please note that you might need to do it multiple
|
||||
time, if you have multiple kivy version installed into python libraries path.
|
||||
To found your current installed version, you can write in command line::
|
||||
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: ::
|
||||
|
||||
$ python -c 'import kivy; print kivy.__path__'
|
||||
|
||||
Then, remove that directory recursively.
|
||||
|
||||
If you have installed Kivy with easy_install on linux, the directory can
|
||||
contain a "egg" directory. Remove it as well::
|
||||
If you have installed Kivy with easy_install on linux, the directory may
|
||||
contain a "egg" directory. Remove that as well::
|
||||
|
||||
$ python -c 'import kivy; print kivy.__path__'
|
||||
['/usr/local/lib/python2.7/dist-packages/Kivy-1.0.7-py2.7-linux-x86_64.egg/kivy']
|
||||
|
|
|
@ -3,16 +3,16 @@
|
|||
Philosophy
|
||||
==========
|
||||
|
||||
In case you are wondering what Kivy is all about and sets it apart from
|
||||
In case you are wondering what Kivy is all about and what sets it apart from
|
||||
different solutions, this document is for you.
|
||||
|
||||
|
||||
Why bother?
|
||||
-----------
|
||||
|
||||
Why would you want to use Kivy? After all, there is many a great toolkit
|
||||
(or framework, or platform) available out there -- for free. Qt and Flash,
|
||||
to just name two good choices for application development, and many of
|
||||
Why would you want to use Kivy? After all, there are many great toolkits
|
||||
(or frameworks, or platforms) available out there -- for free. You have Qt and Flash,
|
||||
to name just two good choices for application development, and many of
|
||||
these numerous solutions already support Multi-Touch.
|
||||
So what is it that makes Kivy special and worth using?
|
||||
|
||||
|
@ -22,7 +22,7 @@ Fresh
|
|||
Kivy is made for today and tomorrow. Novel input methods such as Multi-Touch
|
||||
become increasingly important. We created Kivy from scratch, specifically for
|
||||
this kind of interaction. That means we were able to rethink many things in
|
||||
terms of human computer interaction where older (not saying 'outdated'; rather
|
||||
terms of human computer interaction whereas older (not saying 'outdated'; rather
|
||||
'well-established') toolkits carry their legacy, which is often a burden.
|
||||
We're not trying to force this new approach to using a computer into the corset
|
||||
of existing models (say single-pointer mouse interaction).
|
||||
|
@ -58,14 +58,14 @@ different third-party solutions. For example, on Windows we support WM_TOUCH,
|
|||
which means that any device that has Windows 7 Pen & Touch drivers will *just
|
||||
work* with Kivy. On OS X you can use Apple's Multi-Touch capable devices, such
|
||||
as trackpads and mice. On Linux, you can use HID kernel input events.
|
||||
In addition to that, we support TUIO and a number of other input sources.
|
||||
In addition to that, we support TUIO (Tangible User Interface Objects) and a number of other input sources.
|
||||
|
||||
|
||||
Focused
|
||||
~~~~~~~
|
||||
|
||||
Kivy is focused. You can write a simple application with a few lines of code.
|
||||
Kivy programs are created by using the *Python* programming language, which is
|
||||
Kivy programs are created using the *Python* programming language, which is
|
||||
incredibly versatile, powerful yet easy to use. In addition, we created our
|
||||
own description language, the *Kivy Language*, for creating sophisticated user
|
||||
interfaces. This language allows you to set up, connect and arrange your
|
||||
|
|
Loading…
Reference in New Issue