Debian Codegraph @

envisage/ui/action/location.py

raw
1 # (C) Copyright 2007-2025 Enthought, Inc., Austin, TX
2 # All rights reserved.
3 #
4 # This software is provided without warranty under the terms of the BSD
5 # license included in LICENSE.txt and may be redistributed only under
6 # the conditions described in the aforementioned license. The license
7 # is also available online at http://www.enthought.com/licenses/BSD.txt
8 #
9 # Thanks for using Enthought open source!
10 """ The location of a group, menu, or action, within an action hierarchy. """
11
12
13 # Enthought library imports.
14 from traits.api import HasTraits, Str
15
16
17 class Location(HasTraits):
18 """The location of a group, menu, or action, within an action hierarchy."""
19
20 # A forward-slash-separated path through the action hierarchy to the menu
21 # to add the action, group or menu to.
22 #
23 # Examples
24 # --------
25 #
26 # * To add an item to the menu bar: ``path = "MenuBar"``
27 #
28 # * To add an item to the tool bar: ``path = "ToolBar"``
29 #
30 # * To add an item to a sub-menu: ``path = "MenuBar/File/New"``
31 #
32 path = Str
33
34 #### Placement of the action within the menu specified by the path ########
35
36 # The ID of the group to add the action or menu to (you can't have nested
37 # groups).
38 group = Str
39
40 # The item appears after the item with this ID.
41 #
42 # - for groups, this is the ID of another group.
43 # - for menus and actions, this is the ID of another menu or action.
44 after = Str
45
46 # The action appears before the item with this ID.
47 #
48 # - for groups, this is the ID of another group.
49 # - for menus and actions, this is the ID of another menu or action.
50 before = Str