Doc: Fix many duplicate/missing label warnings and other issues.

This commit is contained in:
Kai Huuhko 2013-11-11 14:46:19 +02:00
parent 29073c7754
commit 0e21d6bfac
14 changed files with 74 additions and 187 deletions

View File

@ -1,3 +1,5 @@
.. py:module:: efl.elementary
:mod:`efl.elementary` Package
=============================
@ -26,62 +28,11 @@ Event callbacks have signature of::
object, source_object, event_type, event_info, *args, **kwargs
Hello Python Elementary
-----------------------
A sample Python Elementary program
----------------------------------
Let's create an interactive "Hello World" gui where you can click the ok
button to exit::
import efl.elementary as elm
def on_done(obj):
# quit the mainloop
elm.exit()
class Spam:
def __init__(self):
# new window - do the usual and give it a name (hello) and title (Hello)
win = elm.StandardWindow("hello", "Hello")
# when the user clicks "close" on a window there is a request to delete
win.callback_delete_request_add(on_done)
# add a box object - default is vertical. a box holds children in a row,
# either horizontally or vertically. nothing more.
box = elm.Box(win)
# make the box horizontal
box.horizontal = True
# add object as a resize object for the window (controls window minimum
# size as well as gets resized if window is resized)
win.resize_object_add(box)
box.show()
# add a label widget, set the text and put it in the pad frame
lab = elm.Label(win)
# set default text of the label
lab.text = "Hello out there world!"
# pack the label at the end of the box
box.pack_end(lab)
lab.show()
# add an ok button
btn = elm.Button(win)
# set default text of button to "OK"
btn.text = "OK"
# pack the button at the end of the box
box.pack_end(btn)
btn.show()
# call on_done when button is clicked
btn.callback_clicked_add(on_done)
# now we are done, show the window
win.show()
if __name__ == "__main__":
elm.init()
food = Spam()
# run the mainloop and process events and callbacks
elm.run()
elm.shutdown()
.. literalinclude:: ../../examples/elementary/test_panel.py
:lines: 4-50
What is Elementary?
-------------------
@ -96,6 +47,15 @@ of flexibility.
Reference
---------
Package
^^^^^^^
Everything in the modules :py:mod:`~efl.elementary.general` and
:py:mod:`~efl.elementary.need` is also available at package level.
Modules
^^^^^^^
.. toctree::
:maxdepth: 4
@ -199,6 +159,7 @@ Inheritance diagram
efl.elementary.gengrid
efl.elementary.genlist
efl.elementary.gesture_layer
efl.elementary.glview
efl.elementary.grid
efl.elementary.hover
efl.elementary.hoversel

View File

@ -82,7 +82,7 @@ cdef class SelectionData(object):
return self.sel_data.y
property format:
""":type: :ref:`Elm_Selection_Format`"""
""":type: :ref:`Elm_Object_Sel_Format`"""
def __get__(self):
return self.sel_data.format
@ -99,7 +99,7 @@ cdef class SelectionData(object):
property action:
"""The action to perform with the data
:type: :ref:`Elm_Xdnd_Action`
:type: :ref:`Elm_Object_Xdnd_Action`
:since: 1.8
"""

View File

@ -264,7 +264,7 @@ Default text parts of the entry that you can use for are:
Enumerations
------------
.. _Elm_Autocapital_Type:
.. _Elm_Entry_Autocapital_Type:
Autocapitalization types
========================
@ -286,7 +286,7 @@ Autocapitalization types
Autocapitalize all letters
.. _Elm_Cnp_Mode:
.. _Elm_Entry_Cnp_Mode:
Copy & paste modes
==================
@ -304,7 +304,7 @@ Copy & paste modes
Copy & paste text without markup tags
.. _Elm_Input_Panel_Lang:
.. _Elm_Entry_Input_Panel_Lang:
Input panel language sort order
===============================
@ -318,7 +318,7 @@ Input panel language sort order
Alphabetic
.. _Elm_Input_Panel_Layout:
.. _Elm_Entry_Input_Panel_Layout:
Input panel layouts
===================
@ -372,7 +372,7 @@ Input panel layouts
Like normal, but no auto-correct, no auto-capitalization etc.
.. _Elm_Input_Panel_Return_Key_Type:
.. _Elm_Entry_Input_Panel_Return_Key_Type:
Input panel return key modes
============================
@ -410,25 +410,7 @@ Input panel return key modes
Send
.. _Elm_Scroller_Policy:
Scrollbar visibility
====================
.. data:: ELM_SCROLLER_POLICY_AUTO
Scrollbar visibility is automatically determined
.. data:: ELM_SCROLLER_POLICY_ON
Scrollbars are always visible
.. data:: ELM_SCROLLER_POLICY_OFF
Scrollbars are never visible
.. _Elm_Text_Format:
.. _Elm_Entry_Text_Format:
Text format
===========
@ -442,7 +424,7 @@ Text format
UTF-8 with markup
.. _Elm_Wrap_Type:
.. _Elm_Entry_Wrap_Type:
Wrap mode
=========
@ -464,7 +446,7 @@ Wrap mode
Word wrap, and if that fails, char wrap
.. _Elm_Icon_Type:
.. _Elm_Entry_Icon_Type:
Icon types
==========
@ -1020,7 +1002,7 @@ cdef class Entry(Object):
Note that this only makes sense for multi-line entries. A widget set
to be single line will never wrap.
:type: :ref:`Elm_Wrap_Type`
:type: :ref:`Elm_Entry_Wrap_Type`
"""
def __get__(self):
@ -1432,7 +1414,7 @@ cdef class Entry(Object):
will be saved if the autosave feature is enabled, otherwise, the file
will be silently discarded and any non-saved changes will be lost.
:type: (unicode **file_name**, :ref:`Elm_Text_Format` **file_format**)
:type: (unicode **file_name**, :ref:`Elm_Entry_Text_Format` **file_format**)
:raise RuntimeError: when setting the file fails
"""
@ -1540,7 +1522,7 @@ cdef class Entry(Object):
property input_panel_layout:
"""The input panel layout of the entry
:type: :ref:`Elm_Input_Panel_Layout`
:type: :ref:`Elm_Entry_Input_Panel_Layout`
"""
def __get__(self):
@ -1577,7 +1559,7 @@ cdef class Entry(Object):
property autocapital_type:
"""Autocapitalization type on the immodule.
:type: :ref:`Elm_Autocapital_Type`
:type: :ref:`Elm_Entry_Autocapital_Type`
"""
def __set__(self, Elm_Autocapital_Type autocapital_type):
@ -1641,7 +1623,7 @@ cdef class Entry(Object):
This API can be used if you want to show the alphabet keyboard mode.
:type: :ref:`Elm_Input_Panel_Lang`
:type: :ref:`Elm_Entry_Input_Panel_Lang`
"""
def __get__(self):
@ -1687,7 +1669,7 @@ cdef class Entry(Object):
An input panel displays the string or icon associated with this type
:type: :ref:`Elm_Input_Panel_Return_Key_Type`
:type: :ref:`Elm_Entry_Input_Panel_Return_Key_Type`
"""
def __get__(self):
@ -1842,7 +1824,7 @@ cdef class Entry(Object):
.. note:: This only changes the behaviour of text.
:type: :ref:`Elm_Cnp_Mode`
:type: :ref:`Elm_Entry_Cnp_Mode`
"""
def __get__(self):

View File

@ -58,22 +58,6 @@ for are:
- "icon" - Icon of the fileselector_button
Enumerations
------------
.. _Elm_Fileselector_Mode:
Fileselector modes
==================
.. data:: ELM_FILESELECTOR_LIST
Layout as a list
.. data:: ELM_FILESELECTOR_GRID
Layout as a grid
"""
@ -87,9 +71,6 @@ from efl.evas cimport Object as evasObject
cimport enums
ELM_FILESELECTOR_LIST = enums.ELM_FILESELECTOR_LIST
ELM_FILESELECTOR_GRID = enums.ELM_FILESELECTOR_GRID
cdef class FileselectorButton(Button):
"""This is the class that actually implements the widget."""

View File

@ -72,22 +72,6 @@ are:
- "button icon" - Button icon of the fileselector_entry
Enumerations
------------
.. _Elm_Fileselector_Mode:
Fileselector modes
==================
.. data:: ELM_FILESELECTOR_LIST
Layout as a list
.. data:: ELM_FILESELECTOR_GRID
Layout as a grid
"""
@ -102,9 +86,6 @@ from object cimport Object
cimport enums
ELM_FILESELECTOR_LIST = enums.ELM_FILESELECTOR_LIST
ELM_FILESELECTOR_GRID = enums.ELM_FILESELECTOR_GRID
cdef class FileselectorEntry(Object):
"""This is the class that actually implements the widget."""

View File

@ -253,7 +253,7 @@ Smart events that you can add callbacks for are:
Enumerations
------------
.. _Elm_Genlist_Item_Scrollto_Type:
.. _Elm_Gengrid_Item_Scrollto_Type:
Items' scroll to types
======================

View File

@ -438,7 +438,7 @@ Genlist items' scroll-to types
Scroll to the middle of viewport
.. _Elm_List_Mode:
.. _Elm_Genlist_List_Mode:
List sizing
===========
@ -480,7 +480,7 @@ List sizing
externally.
.. _Elm_Object_Select_Mode:
.. _Elm_Genlist_Object_Select_Mode:
Selection modes
===============

View File

@ -780,7 +780,7 @@ cdef class GenlistItem(ObjectItem):
property select_mode:
"""Item's select mode. Possible values are:
:type: :ref:`Elm_Object_Select_Mode`
:type: :ref:`Elm_Genlist_Object_Select_Mode`
"""
def __set__(self, mode):

View File

@ -618,7 +618,7 @@ cdef class Genlist(Object):
select items entirely and they will neither appear selected nor
call selected callback functions.
:type: Elm_Object_Select_Mode
:type: :ref:`Elm_Genlist_Object_Select_Mode`
"""
def __set__(self, mode):

View File

@ -53,7 +53,7 @@ Default text parts of the hoversel widget that you can use for are:
Enumerations
------------
.. _Elm_Icon_Type:
.. _Elm_Hoversel_Icon_Type:
Icon types
==========
@ -109,7 +109,7 @@ cdef class HoverselItem(ObjectItem):
standard icon name (None if not desired)
:type icon_file: string
:param icon_type: The icon type if relevant
:type icon_type: :ref:`Elm_Icon_Type`
:type icon_type: :ref:`Elm_Hoversel_Icon_Type`
:param callback: Convenience function to call when this item is
selected
:type callback: function

View File

@ -54,7 +54,7 @@ This widget emits the following signals, besides the ones sent from
Enumerations
------------
.. _Elm_Wrap_Type:
.. _Elm_Label_Wrap_Type:
Wrap modes
==========
@ -128,7 +128,7 @@ cdef class Label(LayoutClass):
By default no wrapping is done.
:type: :ref:`Elm_Wrap_Type`
:type: :ref:`Elm_Label_Wrap_Type`
"""
def __get__(self):

View File

@ -129,7 +129,7 @@ List sizing modes
externally.
.. _Elm_Object_Select_Mode:
.. _Elm_List_Object_Select_Mode:
Selection modes
===============
@ -156,23 +156,6 @@ Selection modes
No select mode with no finger size rule
.. _Elm_Scroller_Policy:
Scrollbar visibility
====================
.. data:: ELM_SCROLLER_POLICY_AUTO
Show scrollbars as needed
.. data:: ELM_SCROLLER_POLICY_ON
Always show scrollbars
.. data:: ELM_SCROLLER_POLICY_OFF
Never show scrollbars
"""
@ -664,7 +647,7 @@ cdef class List(Object):
.. note:: Default value is ELM_LIST_SCROLL.
:type: :ref:`List mode <Elm_List_Mode>`
:type: :ref:`Elm_List_Mode`
"""
def __get__(self):
@ -700,7 +683,7 @@ cdef class List(Object):
property select_mode:
"""The list select mode.
:type: :ref:`Selection mode <Elm_Object_Select_Mode>`
:type: :ref:`Elm_List_Object_Select_Mode`
"""
def __set__(self, mode):

View File

@ -63,7 +63,7 @@ More information is on
Enumerations
------------
.. _Elm_Focus_Direction:
.. _Elm_Object_Focus_Direction:
Focus direction
===============
@ -77,7 +77,7 @@ Focus direction
Focus next
.. _Elm_Sel_Type:
.. _Elm_Object_Sel_Type:
Selection type
==============
@ -103,7 +103,7 @@ Defines the types of selection property names.
Clipboard selection (ctrl+C)
.. _Elm_Sel_Format:
.. _Elm_Object_Sel_Format:
Selection format
================
@ -139,7 +139,7 @@ Defines the types of content.
Raw HTML-like data (eg. webkit)
.. _Elm_Xdnd_Action:
.. _Elm_Object_Xdnd_Action:
XDND action
===========
@ -583,7 +583,7 @@ cdef class Object(evasObject):
application's window, which is the root of that tree, all other
objects would have valid Elementary widget parents.
:type: :py:class:`elementary.object.Object`
:type: :py:class:`~efl.elementary.object.Object`
"""
def __get__(self):
@ -596,7 +596,7 @@ cdef class Object(evasObject):
"""The top level parent of an Elementary widget.
This is a readonly property.
:type: :py:class:`elementary.object.Object`
:type: :py:class:`~efl.elementary.object.Object`
"""
def __get__(self):
@ -731,7 +731,7 @@ cdef class Object(evasObject):
on a given Elementary widget
Every widget in an Elementary interface set to receive focus, with
elm_object_focus_allow_set(), will propagate **all** of its key up,
:py:func:`focus_allow_set`, will propagate **all** of its key up,
key down and mouse wheel input events up to its parent object, and
so on. All of the focusable ones in this chain which had an event
callback set, with this call, will be able to treat those events.
@ -956,7 +956,7 @@ cdef class Object(evasObject):
property focus_custom_chain:
"""The custom focus chain.
:type: list of :py:class:`elementary.object.Object`
:type: list of :py:class:`~efl.elementary.object.Object`
"""
def __get__(self):
@ -993,9 +993,9 @@ cdef class Object(evasObject):
container.
:param child: The child to be added in custom chain
:type child: :py:class:`elementary.object.Object`
:type child: :py:class:`~efl.elementary.object.Object`
:param relative_child: The relative object to position the child
:type relative_child: :py:class:`elementary.object.Object`
:type relative_child: :py:class:`~efl.elementary.object.Object`
"""
cdef Evas_Object *rel = NULL
@ -1015,9 +1015,9 @@ cdef class Object(evasObject):
container.
:param child: The child to be added in custom chain
:type child: :py:class:`elementary.object.Object`
:type child: :py:class:`~efl.elementary.object.Object`
:param relative_child: The relative object to position the child
:type relative_child: :py:class:`elementary.object.Object`
:type relative_child: :py:class:`~efl.elementary.object.Object`
"""
cdef Evas_Object *rel = NULL
@ -1033,7 +1033,7 @@ cdef class Object(evasObject):
first object of chain.
:param dir: Direction to move the focus
:type dir: :ref:`Focus direction <Elm_Focus_Direction>`
:type dir: :ref:`Elm_Object_Focus_Direction`
"""
elm_object_focus_next(self.obj, direction)
@ -1045,7 +1045,7 @@ cdef class Object(evasObject):
with specific focus direction.
:param dir: Focus direction
:type dir: :ref:`Focus direction <Elm_Focus_Direction>`
:type dir: :ref:`Elm_Object_Focus_Direction`
:return: Focus next object or None, if there is no focus next object.
:see: :py:func:`focus_next`
@ -1065,7 +1065,7 @@ cdef class Object(evasObject):
:param next: Focus next object
:param dir: Focus direction
:type dir: :ref:`Focus direction <Elm_Focus_Direction>`
:type dir: :ref:`Elm_Object_Focus_Direction`
:see: :py:func:`focus_next`
@ -1137,7 +1137,8 @@ cdef class Object(evasObject):
property mirrored_automatic:
"""The widget's mirrored mode setting. When widget in automatic
mode, it follows the system mirrored mode set by elm_mirrored_set().
mode, it follows the system mirrored mode set by
:py:func:`efl.elementary.general.mirrored_set`.
:type: bool
@ -1517,8 +1518,8 @@ cdef class Object(evasObject):
Mark the part text to be translatable or not.
Once you mark the part text to be translatable, the text will be translated
internally regardless of elm_object_part_text_set() and
elm_object_domain_translatable_part_text_set(). In other case, if you set the
internally regardless of :py:meth:`part_text_set` and
:py:meth:`domain_translatable_part_text_set`. In other case, if you set the
Elementary policy that all text will be translatable in default, you can set
the part text to not be translated by calling this API.
@ -1527,9 +1528,7 @@ cdef class Object(evasObject):
:param translatable: ``True``, the part text will be translated
internally. ``False``, otherwise.
:see: elm_object_domain_translatable_part_text_set()
:see: elm_object_part_text_set()
:see: elm_policy()
:seealso: :py:func:`efl.elementary.general.policy_set`
:since: 1.8
@ -1696,9 +1695,9 @@ cdef class Object(evasObject):
and this is used during pasting.
:param selection: Selection type for copying and pasting
:type selection: :ref:`Elm_Sel_Type`
:type selection: :ref:`Elm_Object_Sel_Type`
:param format: Selection format
:type format: :ref:`Elm_Sel_Format`
:type format: :ref:`Elm_Object_Sel_Format`
:param buf: The data selected
:type buf: An object that supports the new buffer interface
@ -1743,7 +1742,7 @@ cdef class Object(evasObject):
Clear all data from the selection which is owned by a widget.
:param selection: Selection type for copying and pasting
:type selection: :ref:`Elm_Sel_Type`
:type selection: :ref:`Elm_Object_Sel_Type`
:raise RuntimeError: if clearing cnp data fails.

View File

@ -65,7 +65,7 @@ using multiple inheritance, for example::
Enumerations
------------
.. _Elm_Icon_Lookup_Order:
.. _Elm_Toolbar_Icon_Lookup_Order:
Icon lookup modes
=================
@ -87,7 +87,7 @@ Icon lookup modes
theme
.. _Elm_Object_Select_Mode:
.. _Elm_Toolbar_Object_Select_Mode:
Selection modes
===============
@ -501,7 +501,7 @@ cdef class ToolbarItem(ObjectItem):
Selected items will be highlighted.
.. seealso:: :py:attr:`Toolbar.selected_item_get()`
.. seealso:: :py:attr:`Toolbar.selected_item`
:type: bool
@ -784,7 +784,7 @@ cdef class Toolbar(Object):
Icons added before calling this function will not be affected.
The default lookup order is ELM_ICON_LOOKUP_THEME_FDO.
:type: :ref:`Icon lookup order <Elm_Icon_Lookup_Order>`
:type: :ref:`Elm_Toolbar_Icon_Lookup_Order`
"""
def __set__(self, order):
@ -895,7 +895,7 @@ cdef class Toolbar(Object):
scroll if ELM_TOOLBAR_SHRINK_SCROLL, and will create a button to pop
up excess elements with ELM_TOOLBAR_SHRINK_MENU.
:type: :ref:`Toolbar shrink mode <Elm_Toolbar_Shrink_Mode>`
:type: :ref:`Elm_Toolbar_Shrink_Mode`
"""
def __get__(self):
@ -1048,7 +1048,7 @@ cdef class Toolbar(Object):
property select_mode:
"""The toolbar select mode.
:type: :ref:`Object select mode <Elm_Object_Select_Mode>`
:type: :ref:`Elm_Toolbar_Object_Select_Mode`
"""
def __get__(self):