Debian Codegraph @

envisage/ui/workbench/default_action_set.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 default workbench action set. """
11
12
13 # Enthought library imports.
14 from envisage.ui.action.api import Action, ActionSet, Group, Menu
15
16 # This module's package.
17 PKG = ".".join(__name__.split(".")[:-1])
18
19
20 class DefaultActionSet(ActionSet):
21 """The default workbench action set."""
22
23 menus = [
24 Menu(
25 name="&File",
26 path="MenuBar",
27 groups=[
28 Group(id="OpenGroup"),
29 Group(id="SaveGroup"),
30 Group(id="ImportGroup"),
31 Group(id="ExitGroup"),
32 ],
33 ),
34 Menu(
35 path="MenuBar",
36 class_name="pyface.workbench.action.api:ViewMenuManager",
37 ),
38 Menu(
39 name="&Tools",
40 path="MenuBar",
41 groups=[Group(id="PreferencesGroup")],
42 ),
43 Menu(name="&Help", path="MenuBar", groups=[Group(id="AboutGroup")]),
44 ]
45
46 actions = [
47 Action(
48 path="MenuBar/File",
49 group="ExitGroup",
50 class_name=PKG + ".action.api:ExitAction",
51 ),
52 Action(
53 path="MenuBar/Tools",
54 group="PreferencesGroup",
55 class_name=PKG + ".action.api:EditPreferencesAction",
56 ),
57 Action(
58 path="MenuBar/Help",
59 group="AboutGroup",
60 class_name=PKG + ".action.api:AboutAction",
61 ),
62 ]