Source code for cerebro.menus

# -*- coding: utf-8 -*-
"""
The cerebro.menus module provides access to certain menus in the application to implement user's custom menus there. 
This module is used only for :ref:`user's menus initialization <capi-menu>`.

.. rubric:: Functions

* :py:func:`attachment_menu() <cerebro.menus.attachment_menu>`
* :py:func:`main_menu() <cerebro.menus.main_menu>`
* :py:func:`message_menu() <cerebro.menus.message_menu>`
* :py:func:`task_menu() <cerebro.menus.task_menu>`

.. rubric:: Classes

* :py:class:`Menu <cerebro.menus.AttachmentActions>`
* :py:class:`MainMenu <cerebro.menus.MainMenu>`
* :py:class:`Menu <cerebro.menus.Menu>`
* :py:class:`Menu <cerebro.menus.MessageActions>`
* :py:class:`Menu <cerebro.menus.TaskActions>`
"""

import py_cerebro_action
import cerebro




[docs]def task_menu(): """ :returns: task menu for implementing user's custom menu items. :rtype: :py:class:`cerebro.menus.Menu` Task menu is located in several GUI elements: in Navigator, "To Do" and "Followed" lists, in the task search. Custom submenus, implemented in this menu, appear in all the above GUI elements. """ return Menu(-1, 'app.actions.task.navigator')
[docs]def message_menu(): """ :returns: message menu for implementing user's custom menu items. :rtype: :py:class:`cerebro.menus.Menu` Message menu is located in Forum, adjacent to Attachment menu. """ return Menu(-1, 'app.actions.message.forum')
[docs]def attachment_menu(): """ :returns: attachment menu for implementing user's custom menu items. :rtype: :py:class:`cerebro.menus.Menu` Attachment menu is located in Forum, adjacent to Message menu. Besides, it appears in the attachment search. Custom submenus, implemented in the attachment menu, appear in Forum and attachment search window as well. """ return Menu(-1, 'app.actions.attachment.forum')