From deccda070b3d2954d2217b906815c59aec905c3a Mon Sep 17 00:00:00 2001 From: G Date: Wed, 20 Mar 2013 19:41:37 +0530 Subject: [PATCH] doc: guide edits in-line with suggestions from geojeff --- doc/sources/guide/events.rst | 46 ++++++++++------ .../guide/images/guide_customize_step1.png | Bin 0 -> 10146 bytes doc/sources/guide/lang.rst | 23 +++++++- doc/sources/guide/packaging.rst | 1 + doc/sources/guide/widgets.rst | 51 +++++++++++++++++- 5 files changed, 102 insertions(+), 19 deletions(-) create mode 100644 doc/sources/guide/images/guide_customize_step1.png diff --git a/doc/sources/guide/events.rst b/doc/sources/guide/events.rst index 453e92d84..63ab245fb 100644 --- a/doc/sources/guide/events.rst +++ b/doc/sources/guide/events.rst @@ -26,7 +26,7 @@ dispatchers). The :class:`~kivy.uix.widget.Widget`, examples of event dispatchers. -As outlined in the Illustration above, Kivy has a `main loop`. It's important +As outlined in the illustration above, Kivy has a `main loop`. It's important that you avoid breaking it. The main loop is responsible for reading from inputs, loading images asynchronously, drawing to frame, ...etc. Avoid long/infinite loops or sleeping. For example the following code does both:: @@ -168,7 +168,7 @@ Example:: ev.do_something('test') -Introduction to properties +Introduction to Properties -------------------------- Properties are an awesome way to define events and bind to them. Essentially, @@ -243,7 +243,7 @@ In the code above at line 3:: pressed = ListProperty([0, 0]) We define the `pressed` Property of type :class:`~kivy.properties.ListProperty`, -giving it a default value of `[0, 0]`. From this point onwards, the `on_pressed` +giving it a default value of `[0, 0]`. From this point forward, the `on_pressed` event will be called whenever the value of this property is changed. At Line 5:: @@ -258,7 +258,7 @@ We override the :meth:`on_touch_down` method of the Widget class. Here, we check for collision of the `touch` with our widget. If the touch falls inside of our widget, we change the value of `pressed` to touch.pos -and return True, indicating that we have consumed the touch and don't want it +and return True, indicating that we have consumed the touch and don't want it to propagate any further. Finally, if the touch falls outside our widget, we call the original event @@ -274,14 +274,14 @@ We define an `on_pressed` function that will be called by the property whenever property value is changed. .. Note:: - This `on_` event is called within the class that the property is - defined in. To monitor/observe the change to a property outside of a class - it's defined in, you should bind to the property. + This `on_` event is called within the class where the property is + defined. To monitor/observe any change to a property outside of the class + where it's defined, you should bind to the property as shown below. **Binding to the property** -How to monitor changes to a property when all you have access to is a widgets +How to monitor changes to a property when all you have access to is a widget instance? You *bind* to the property:: your_widget_instance.bind(property_name=function_name) @@ -308,7 +308,7 @@ If you run the code as is, you will notice two print statements in the console. One from the `on_pressed` event that is called inside the `CustomBtn` class and another from the `btn_pressed` function that we bind to the property change. -The reason that both the functions are called is simple. Binding doesn't mean +The reason that both functions are called is simple. Binding doesn't mean overriding. Having both of these functions is redundant and you should generally only use one of the methods of listening/reacting to property changes. @@ -319,8 +319,8 @@ You should also take note of the parameters that are passed to the def btn_pressed(self, instance, pos): -The first parameter is `self`, which is the instance of the class this function is -defined in. You can use an in-line function as follows: +The first parameter is `self`, which is the instance of the class where this +function is defined. You can use an in-line function as follows: .. code-block:: python :linenos: @@ -334,12 +334,12 @@ defined in. You can use an in-line function as follows: self.add_widget(cb) The first parameter would be the `instance` of the class the property is -defined in. +defined. The second parameter would be the `value`, which is the new value of the property. Here is the complete example, derived from the snippets above, that you can -use to copy and paste into an editor to experiment with. +use to copy and paste into an editor to experiment. .. code-block:: python :linenos: @@ -395,11 +395,11 @@ Running the code above will give you the following output: Our CustomBtn has no visual representation and thus appears black. You can touch/click on the black area to see the output on your console. -Some Gotchas in :class:`~kivy.properties.AliasProperty` and -:class:`~kivy.properties.ReferenceListProperty`. +Compound Properties +------------------- When defining an :class:`~kivy.properties.AliasProperty`, you normally define -a getter and a setter functions yourself. Here, it falls on to you to define +a getter and a setter function yourself. Here, it falls on to you to define when the getter and the setter functions are called using the `bind` argument. Consider the following code. @@ -407,4 +407,16 @@ Consider the following code. .. code-block:: python :linenos: - class TODO:: + cursor_pos = AliasProperty(_get_cursor_pos, None, bind=( + 'cursor', 'padding', 'pos', 'size', 'focus', + 'scroll_x', 'scroll_y')) + '''Current position of the cursor, in (x, y). + + :data:`cursor_pos` is a :class:`~kivy.properties.AliasProperty`, read-only. + +Here `cursor_pos` is a :class:`~kivy.properties.AliasProperty` which uses the +`getter` `_get_cursor_pos` with the `setter` part set to None, implying this +is a read only Property. + +The bind argument at the end defines that `on_cursor_pos` event is dispatched +when any of the properties used in the `bind=` argument change. diff --git a/doc/sources/guide/images/guide_customize_step1.png b/doc/sources/guide/images/guide_customize_step1.png new file mode 100644 index 0000000000000000000000000000000000000000..35748efac94140eae01d7ca6f7b1624b362a0184 GIT binary patch literal 10146 zcmcI~WmH_j((M4jogjm|2Y0u@gC9E4dlr%o=RW}c(Q>xd8#U3W?(SYi(cx?5T^PLCpnSSMl_K$5E%Fod5yg;4$i~eta0}AW?Q;Vs z0#8$BDAb~qBK9gF(?{ixGNtLS7m_Qh)^t3*eut>DG_;UNztMpRQn(#J2ElvAJ~7Z? z&<@n`gAVxY$&n@+`00{|@~XCO^)VZ|b>9~(NEGTr7kLS#oEQb0@r?E2FQPHmy(7sE zFt&XWK`EvqX3yj8DCR&kYH!BE(*&_pkNNC9-KBMhJ;|$w6KiC=I@d5Vy<|@pJ-_oP zFA>HZDU()+YrxejW=BaXzcsm0Zu5a-WBQfI5}^9)`H}oh_;#Ap{LP-l5CPObH5hYk zAKdrrSvK|mn2DQ$unSoUqs79Df%%1A^4&v>WN!+8a^VO4N*hi1VZz3akADfW6B+%X zpwpc^^(jhl`khtkp8(&<>E>j)y&2b6bA26!$VE#tE+JlqaW@5jv45yYyi=5&owJ;{ zw{+?&saojb*)G)-ImZxUxT679lX98W8y3Izw&a+1Q6v@obPB)tElanvv@`2o>(CYJ z5_f6?&sI{>8;jSaGJ>6?oPEgMhrfe)B;NkZ-p{K4<}yF1x(nbhBRV+kJRXMI& zfvynm^QcbZVf*rg=;&B`PnFTSvuk(u@z)70sVx>5+sMs)GC?z!my!U^57KWRr%IN| zjVm|;mm@JiHS9)0^b(zKZ{6(R_;Q)LmMkCj>FiTdzQ+@=QwgYSiCQRFq?yY?BO(^Y zwwdS(IbDs{+1tcI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^;!m{CNMt9CWfQV**BVagA4Tt6Bkb2R zxEm#DaoD#N+`}ZjUr~*TDJPO+ht(S!u6Rw13l<-~7Nqx>&`tbcyxDF&p))AjSR8ke?MfYwPO;q5c-jMGkD4?=6 z-NZ8^J{yHVc5Bv%jd!wuRUaeHjD>dndTi)d%`mq`d$Qb`zqn(iUd?F1OB2}|aqLZt zb&+(nP}V@*!3p*MWFV~dY3nALe;%*j|Hh|I=BL9BNdzy)wk=QgM^Cm`LP`+E z|I?&G-Jjl5EzS|JKH`&BWOVq4Lb0Sfe(O$QUdvipom4^D(&1EJVPkPY_{#d7|E+?u z)`rcLa1NtpDv?szwo-6g-PoI`^f+=h{B%bAfs^qM^!8{21X?p+wB)jC;`NF1nA9PJ zvWfflo9{;7wjA59GzK1$n~cJQd$?xaSq(J=@#`D`tuX=w=yQt(jzpcKx#|GQG~gA%lX-%F?5B9aa-!ls1Efpg*aC$bE(n$<77 z28*Q=9YD7CyWy1sJ6AIP^3|dN(7eOCjU<~Xs_pXEZ(w2CPV?E#3}xTww-XkK&O0^Z zN?ZF&w>Wi%@m-C1rl~mt)``|azP$yyCu%qlq*GHdSn@W3t_+3g$%Y;oq>!dU6*9%< zcO-gI=Klf};xu1bkl24&!^*rGz?Uuvc^htA&^0t)c*af&B%!pkaQ>_z)XpE_X`B=> z()DuqEGFD70UVMK?ehEh(r=^%AHt41v7Y-_c(JNPW;2oS``oG_`G=aXE;l4j)H!cm_lN_4paZ%(@2HGwRMOSzaF10ELv2taPSC@Pt5JHojz$-f~ z=T$V>zuZ^=v()yzu=tYyLepjxKc#^Hf68Viqi%U1aznL-?lw mDEBTPGXZ1%UtG6wPq?YsiTu!M86}{}4x}uv4ylnf3;Q3c^`T7w literal 0 HcmV?d00001 diff --git a/doc/sources/guide/lang.rst b/doc/sources/guide/lang.rst index e61bb3964..1d224e0c9 100644 --- a/doc/sources/guide/lang.rst +++ b/doc/sources/guide/lang.rst @@ -162,11 +162,32 @@ callback to an event: Widget: on_size: my_callback() -You can pass the values dispatched by the signal using the `args` keyword:: +You can pass the values dispatched by the signal using the `args` keyword: + +.. code-block:: kv TextInput: on_text: app.search(args[1]) +More complex expressions can be used, like: + +.. code-block:: kv + + pos: self.center_x - self.texture_size[0] / 2., self.center_y - self.texture_size[1] / 2. + +This expression listens for a change in ``center_x``, ``center_y``, +and ``texture_size``. If one of them is changing, the expression will be +re-evaluated, and update the ``pos`` field. + +You can also handle ``on_`` events inside your kv language. +For example the TextInput class has a ``focus`` property whose auto-generated +``on_focus`` event can be accessed inside the kv language like so: + +.. code-block:: kv + + TextInput: + on_focus: print args + Extend canvas ------------- diff --git a/doc/sources/guide/packaging.rst b/doc/sources/guide/packaging.rst index c7e6f6ffe..eef26289f 100644 --- a/doc/sources/guide/packaging.rst +++ b/doc/sources/guide/packaging.rst @@ -10,4 +10,5 @@ Packaging your application packaging-macosx packaging-android packaging-ios + android diff --git a/doc/sources/guide/widgets.rst b/doc/sources/guide/widgets.rst index e7de5b29c..e2a3c7eed 100644 --- a/doc/sources/guide/widgets.rst +++ b/doc/sources/guide/widgets.rst @@ -133,7 +133,56 @@ its children. There are different kinds of layouts, allowing for different automatic organization of their children. Layouts use |size_hint| and |pos_hint| properties to determine the |size| and |pos| of their |children|. -Look at the documentation of the various Layouts to see How they honor + - Layout types + + **BoxLayout**: + Arranges widgets in a side to side (either vertically or horizontally) manner, + to fill all the place. + size_hint of children can be used to change proportions allowed to each + children, or set fixed size for some of them + `pos_hint` not honored + + .. image:: ../images/boxlayout.gif + + **GridLayout**: + Arranges 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 + + **StackLayout**: + Arranges widgets side to side, but with a set size in a dimension, without + trying to make them fit the whole size, this is useful to have a set of + chilgren of the same predefined size, side to side. + `pos_hint` not honored + + .. image:: ../images/stacklayout.gif + + **AnchorLayout**: + A simple layout only caring about children position, allows to stick the + children to a position relative to a border of the layout. + `size_hint` not honored. + + .. image:: ../images/anchorlayout.gif + + **FloatLayout**: + Allow to place children to arbitrary places and size, either absolute or + relative to the layout size. Default size_hint (1, 1) will make everychildren + the same size as the whole layout, so you probably want to change this value + if you have more than one child. You can set size_hint to (None, None) to use + absolute size with `size`, this widget honors `pos_hint` too, which as a dict + allowing to set position relatively to layout position. + + .. image:: ../images/floatlayout.gif + + **RelativeLayout**: + Behave just like FloatLayout, except children pos is relative to layout + position, not screen. + +Look at the documentation of the various Layouts to get a in-depth +understanding. |size_hint| and |pos_hint|: - |FloatLayout|