File: location.py

package info (click to toggle)
python-envisageplugins 3.2.0-2
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 1,600 kB
  • sloc: python: 6,968; sh: 11; makefile: 8; lisp: 1
file content (45 lines) | stat: -rw-r--r-- 1,346 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
""" The location of a group, menu, or action, within an action hierarchy. """


# Enthought library imports.
from enthought.traits.api import HasTraits, Str


class Location(HasTraits):
    """ The location of a group, menu, or action, within an action hierarchy.

    """

    # A forward-slash-separated path through the action hierarchy to the menu
    # to add the action, group or menu to.
    #
    # Examples
    # --------
    #
    # * To add an item to the menu bar: ``path = "MenuBar"``
    #
    # * To add an item to the tool bar: ``path = "ToolBar"``
    #
    # * To add an item to a sub-menu: ``path = "MenuBar/File/New"``
    #
    path = Str

    #### Placement of the action within the menu specified by the path ########
    
    # The ID of the group to add the action or menu to (you can't have nested
    # groups).
    group = Str
    
    # The item appears after the item with this ID.
    #
    # - for groups, this is the ID of another group.
    # - for menus and actions, this is the ID of another menu or action.
    after = Str

    # The action appears before the item with this ID.
    #
    # - for groups, this is the ID of another group.
    # - for menus and actions, this is the ID of another menu or action.
    before = Str

#### EOF ######################################################################