kuuko pushed a commit to branch master.

commit 4a008cac7f208635505be4419533612e7fd88c5d
Author: Kai Huuhko <[email protected]>
Date:   Mon Apr 15 21:06:07 2013 +0000

    Elementary: Improve documentation for Slider, Slideshow and Spinner.
---
 efl/elementary/slider.pyx    | 23 ++++++++++++-----------
 efl/elementary/slideshow.pyx | 24 +++++++++++++-----------
 efl/elementary/spinner.pyx   | 25 +++++++++++++------------
 3 files changed, 38 insertions(+), 34 deletions(-)

diff --git a/efl/elementary/slider.pyx b/efl/elementary/slider.pyx
index 056dcd7..3ac74aa 100644
--- a/efl/elementary/slider.pyx
+++ b/efl/elementary/slider.pyx
@@ -37,14 +37,14 @@ on the left or top and low values on the right or bottom 
(as opposed to
 normally being low on the left or top and high on the bottom and right).
 
 The slider should have its minimum and maximum values set by the
-application with  :py:attr:`min_max_set()` and value should also be set by
-the application before use with  :py:attr:`value_set()`. The span of the
+application with  :py:attr:`Slider.min_max` and value should also be set by
+the application before use with  :py:attr:`Slider.value`. The span of the
 slider is its length (horizontally or vertically). This will be scaled by
 the object or applications scaling factor. At any point code can query the
-slider for its value with :py:attr:`value_get()`.
+slider for its value with :py:attr:`Slider.value`.
 
 This widget emits the following signals, besides the ones sent from
-:py:class:`elementary.layout.Layout`:
+:py:class:`LayoutClass <efl.elementary.layout_class.LayoutClass>`:
 
 - ``"changed"`` - Whenever the slider value is changed by the user.
 - ``"slider,drag,start"`` - dragging the slider indicator around has
@@ -100,7 +100,7 @@ cdef class Slider(LayoutClass):
             will require their own space, which will make the object to
             require more the ``size``, actually.
 
-        :type: Evas_Coord (int)
+        :type: int
 
         """
         def __get__(self):
@@ -130,7 +130,7 @@ cdef class Slider(LayoutClass):
 
         Default is unit label disabled.
 
-        :type: string
+        :type: unicode
 
         """
         def __get__(self):
@@ -163,7 +163,7 @@ cdef class Slider(LayoutClass):
 
         Default is indicator label disabled.
 
-        :type: string
+        :type: unicode
 
         """
         def __get__(self):
@@ -246,7 +246,7 @@ cdef class Slider(LayoutClass):
 
         If actual value is less than ``min``, it will be updated to ``min``. 
If it
         is bigger then ``max``, will be updated to ``max``. Actual value can be
-        get with :py:attr:`value_get()`.
+        get with :py:attr:`value`.
 
         By default, min is equal to 0.0, and max is equal to 1.0.
 
@@ -282,9 +282,10 @@ cdef class Slider(LayoutClass):
         .. warning:: The value must to be between min and max values. These
             values are set by :py:attr:`min_max`.
 
-        .. seealso:: :py:attr:`unit_format`
-        .. seealso:: :py:attr:`indicator_format`
-        .. seealso:: :py:attr:`min_max`
+        .. seealso::
+            :py:attr:`unit_format`
+            :py:attr:`indicator_format`
+            :py:attr:`min_max`
 
         :type: float
 
diff --git a/efl/elementary/slideshow.pyx b/efl/elementary/slideshow.pyx
index 57d97c9..a10141d 100644
--- a/efl/elementary/slideshow.pyx
+++ b/efl/elementary/slideshow.pyx
@@ -42,17 +42,17 @@ For slideshow items, just like for :py:class:`Genlist` 
"genlist" ones,
 the user defines a **classes**, specifying functions that will be
 called on the item's creation and deletion times.
 
-The Elm_Slideshow_Item_Class structure contains the following
+The :py:class:`SlideshowItemClass` class contains the following
 members:
 
-- ``func.get`` - When an item is displayed, this function is
+- ``get`` - When an item is displayed, this function is
   called, and it's where one should create the item object, de
   facto. For example, the object can be a pure Evas image object
   or an Elementary :py:class:`Photocam` "photocam" widget.
-  See #SlideshowItemGetFunc.
-- ``func.del`` - When an item is no more displayed, this function
+
+- ``delete`` - When an item is no more displayed, this function
   is called, where the user must delete any data associated to
-  the item. See #SlideshowItemDelFunc.
+  the item.
 
 .. rubric:: Slideshow caching
 
@@ -329,12 +329,13 @@ cdef class Slideshow(LayoutClass):
         parameter is going to be passed to both class functions of the
         item.
 
-        .. seealso:: Elm_Slideshow_Item_Class
-        .. seealso:: :py:func:`item_sorted_insert()`
-        .. seealso:: :py:attr:`ObjectItem.data`
+        .. seealso::
+            :py:class:`SlideshowItemClass`
+            :py:func:`item_sorted_insert()`
+            :py:attr:`efl.elementary.object_item.ObjectItem.data`
 
         :param item_class: The item class for the item
-        :type item_class: SlideshowItemClass
+        :type item_class: :py:class:`SlideshowItemClass`
 
         :return: A handle to the item added or ``None``, on errors
         :rtype: :py:class:`SlideshowItem`
@@ -370,8 +371,9 @@ cdef class Slideshow(LayoutClass):
         than data2, -1 must be returned, if it is 'greater', 1 must be
         returned, and if they are equal, 0 must be returned.
 
-        .. seealso:: :py:class:`SlideshowItemClass`
-        .. seealso:: :py:func:`item_add()`
+        .. seealso::
+            :py:class:`SlideshowItemClass`
+            :py:func:`item_add()`
 
         :param itc: The item class for the item
         :param func: The comparing function to be used to sort slideshow
diff --git a/efl/elementary/spinner.pyx b/efl/elementary/spinner.pyx
index b1c8c23..6f7af01 100644
--- a/efl/elementary/spinner.pyx
+++ b/efl/elementary/spinner.pyx
@@ -79,7 +79,7 @@ cdef class Spinner(LayoutClass):
 
         Default is "%0.f".
 
-        :type: string
+        :type: unicode
 
         """
         def __get__(self):
@@ -156,14 +156,11 @@ cdef class Spinner(LayoutClass):
         """The value the spinner displays.
 
         Value will be presented on the label following format specified with
-        :py:attr:`format`.
+        :py:attr:`label_format`.
 
         .. warning:: The value must to be between min and max values. This 
values
             are set by :py:attr:`min_max`.
 
-        .. seealso:: :py:attr:`format`
-        .. seealso:: :py:attr:`min_max`
-
         :type: float
 
         """
@@ -193,14 +190,15 @@ cdef class Spinner(LayoutClass):
         the minimum.
 
         E.g.:
-            - min value = 10
-            - max value = 50
-            - step value = 20
-            - displayed value = 20
+
+        - min value = 10
+        - max value = 50
+        - step value = 20
+        - displayed value = 20
 
         When the user decrement value (using left or bottom arrow), it will
         display ``40``, because max - (min - (displayed - step)) is
-        ``50`` - (``10`` - (``20`` - ``20``)) = ``40``.
+        ``50 - (10 - (20 - 20)) = 40``.
 
         :type: bool
 
@@ -240,12 +238,15 @@ cdef class Spinner(LayoutClass):
         return elm_spinner_editable_get(self.obj)
 
     def special_value_add(self, value, label):
-        """Set a special string to display in the place of the numerical value.
+        """special_value_add(float value, unicode label)
+
+        Set a special string to display in the place of the numerical value.
 
         It's useful for cases when a user should select an item that is
         better indicated by a label than a value. For example, weekdays or 
months.
 
         E.g.::
+
             sp = Spinner(win)
             sp.min_max_set(1, 3)
             sp.special_value_add(1, "January")
@@ -256,7 +257,7 @@ cdef class Spinner(LayoutClass):
         :param value: The value to be replaced.
         :type value: float
         :param label: The label to be used.
-        :type label: string
+        :type label: unicode
 
         """
         if isinstance(label, unicode): label = label.encode("UTF-8")

-- 

------------------------------------------------------------------------------
Precog is a next-generation analytics platform capable of advanced
analytics on semi-structured data. The platform includes APIs for building
apps and a phenomenal toolset for data science. Developers can use
our toolset for easy data analysis & visualization. Get a free account!
http://www2.precog.com/precogplatform/slashdotnewsletter

Reply via email to