How to use the envisage.ui.action.api.Menu function in envisage

To help you get started, we’ve selected a few envisage examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github enthought / envisage / examples / plugins / workbench / AcmeLab / acme / workbench / test_action_set.py View on Github external
class TestActionSet(WorkbenchActionSet):
    """ An action test useful for testing. """

    #### 'ActionSet' interface ################################################

    # The action set's globally unique identifier.
    id = "envisage.ui.workbench.test"

    menus = [
        Menu(
            name="&Test",
            path="MenuBar",
            before="Help",
            groups=["XGroup", "YGroup"],
        ),
        Menu(name="Foo", path="MenuBar/Test", groups=["XGroup", "YGroup"]),
        Menu(name="Bar", path="MenuBar/Test", groups=["XGroup", "YGroup"]),
    ]

    groups = [Group(id="Fred", path="MenuBar/Test")]

    tool_bars = [
        ToolBar(name="Fred", groups=["AToolBarGroup"]),
        ToolBar(name="Wilma"),
        ToolBar(name="Barney"),
    ]

    actions = [
        Action(
            path="MenuBar/Test",
            group="Fred",
            class_name="envisage.ui.workbench.action.api:AboutAction",
github enthought / envisage / examples / plugins / workbench / AcmeLab / acme / workbench / test_action_set.py View on Github external
# Enthought library imports.
from envisage.ui.action.api import Action, Group, Menu, ToolBar
from envisage.ui.workbench.api import WorkbenchActionSet


class TestActionSet(WorkbenchActionSet):
    """ An action test useful for testing. """

    #### 'ActionSet' interface ################################################

    # The action set's globally unique identifier.
    id = "envisage.ui.workbench.test"

    menus = [
        Menu(
            name="&Test",
            path="MenuBar",
            before="Help",
            groups=["XGroup", "YGroup"],
        ),
        Menu(name="Foo", path="MenuBar/Test", groups=["XGroup", "YGroup"]),
        Menu(name="Bar", path="MenuBar/Test", groups=["XGroup", "YGroup"]),
    ]

    groups = [Group(id="Fred", path="MenuBar/Test")]

    tool_bars = [
        ToolBar(name="Fred", groups=["AToolBarGroup"]),
        ToolBar(name="Wilma"),
        ToolBar(name="Barney"),
    ]
github enthought / envisage / examples / plugins / workbench / AcmeLabUsingEggs / src / acme.workbench / acme / workbench / test_action_set.py View on Github external
# Enthought library imports.
from envisage.ui.action.api import Action, Group, Menu, ToolBar
from envisage.ui.workbench.api import WorkbenchActionSet


class TestActionSet(WorkbenchActionSet):
    """ An action test useful for testing. """

    #### 'ActionSet' interface ################################################

    # The action set's globally unique identifier.
    id = "envisage.ui.workbench.test"

    menus = [
        Menu(name="&Test", path="MenuBar", groups=["XGroup", "YGroup"]),
        Menu(name="Foo", path="MenuBar/Test", groups=["XGroup", "YGroup"]),
        Menu(name="Bar", path="MenuBar/Test", groups=["XGroup", "YGroup"]),
    ]

    groups = [Group(id="Fred", path="MenuBar/Test")]

    tool_bars = [
        ToolBar(name="Fred", groups=["AToolBarGroup"]),
        ToolBar(name="Wilma"),
        ToolBar(name="Barney"),
    ]

    actions = [
        Action(
            path="MenuBar/Test",
            group="Fred",
            class_name="envisage.ui.workbench.action.api:AboutAction",
github enthought / envisage / envisage / ui / single_project / project_action_set.py View on Github external
from envisage.ui.action.api import Action, Group, Menu, ToolBar
from envisage.ui.workbench.api import WorkbenchActionSet

# This module's package.
PKG = ".".join(__name__.split(".")[:-1])


class ProjectActionSet(WorkbenchActionSet):
    """ Action set of a default Project. """

    # The action set's globally unique identifier.
    id = "envisage.ui.single_project.action_set"

    # List of menus we provide.
    menus = [
        Menu(
            id="ProjectMenu",
            name="&Project",
            path="MenuBar/File",
            group="ProjectGroup",
        ),
    ]

    # List of groups we provide.
    groups = [
        Group(id="OpenGroup", path="MenuBar/File/ProjectMenu"),
        Group(id="SaveGroup", path="MenuBar/File/ProjectMenu"),
        Group(id="CloseGroup", path="MenuBar/File/ProjectMenu"),
        Group(id="ProjectGroup", path="MenuBar/File", before="ExitGroup"),
    ]

    # List of toolbars we provide.
github enthought / envisage / envisage / ui / workbench / default_action_set.py View on Github external
# This module's package.
PKG = ".".join(__name__.split(".")[:-1])


class DefaultActionSet(ActionSet):
    """ The default workbench action set. """

    menus = [
        Menu(
            name="&File",
            path="MenuBar",
            groups=["OpenGroup", "SaveGroup", "ImportGroup", "ExitGroup"],
        ),
        Menu(
            path="MenuBar",
            class_name="pyface.workbench.action.api:ViewMenuManager",
        ),
        Menu(name="&Tools", path="MenuBar", groups=["PreferencesGroup"]),
        Menu(name="&Help", path="MenuBar", groups=["AboutGroup"]),
    ]

    actions = [
        Action(
            path="MenuBar/File",
            group="ExitGroup",
            class_name=PKG + ".action.api:ExitAction",
        ),
        Action(
            path="MenuBar/Tools",
            group="PreferencesGroup",
github enthought / envisage / envisage / ui / workbench / default_action_set.py View on Github external
class DefaultActionSet(ActionSet):
    """ The default workbench action set. """

    menus = [
        Menu(
            name="&File",
            path="MenuBar",
            groups=["OpenGroup", "SaveGroup", "ImportGroup", "ExitGroup"],
        ),
        Menu(
            path="MenuBar",
            class_name="pyface.workbench.action.api:ViewMenuManager",
        ),
        Menu(name="&Tools", path="MenuBar", groups=["PreferencesGroup"]),
        Menu(name="&Help", path="MenuBar", groups=["AboutGroup"]),
    ]

    actions = [
        Action(
            path="MenuBar/File",
            group="ExitGroup",
            class_name=PKG + ".action.api:ExitAction",
        ),
        Action(
            path="MenuBar/Tools",
            group="PreferencesGroup",
            class_name=PKG + ".action.api:EditPreferencesAction",
        ),
        Action(
            path="MenuBar/Help",
            group="AboutGroup",
github enthought / mayavi / mayavi / plugins / mayavi_ui_action_set.py View on Github external
)

visualize_menu = Menu(
    id     = "VisualizeMenu",
    name   = "Visuali&ze",
    path = "MenuBar",
    before = "View"
)

modules_menu = Menu(
    id     = "ModulesMenu",
    name   = "&Modules",
    path="MenuBar/VisualizeMenu",
)

filters_menu = Menu(
    id     = "FiltersMenu",
    name   = "&Filters",
    path="MenuBar/VisualizeMenu",
    after="ModulesMenu",
)

########################################
# File menu items.

ID = 'mayavi'

####################
# Source actions.

open_file = Action(
    id            = "OpenFile",
github enthought / mayavi / mayavi / plugins / mayavi_ui_action_set.py View on Github external
path='MenuBar/VisualizeMenu',
)

modules_group = Group(
    id='ModulesGroup',
    path='MenuBar/VisualizeMenu/ModulesMenu',
)

filters_group = Group(
    id='FiltersGroup',
    path='MenuBar/VisualizeMenu/FiltersMenu',
)
########################################
# Menus

open_menu = Menu(
    id     = "LoadDataMenu",
    name   = "&Load data",
    path = 'MenuBar/File',
    group='MayaviFileGroup'
)

visualize_menu = Menu(
    id     = "VisualizeMenu",
    name   = "Visuali&ze",
    path = "MenuBar",
    before = "View"
)

modules_menu = Menu(
    id     = "ModulesMenu",
    name   = "&Modules",
github enthought / mayavi / tvtk / plugins / scene / ui / scene_ui_action_set.py View on Github external
#### Groups ###################################################################

scene_group = Group(
    id='TVTKSceneGroup',
    path='MenuBar/File', before='ExitGroup'
)

view_group = Group(
    id='TVTKViewGroup',
    path='MenuBar/Tools', before='PreferencesGroup'
)

#### Menus ####################################################################

new_menu = Menu(
    name='&New',
    path='MenuBar/File', group='TVTKSceneGroup'
)

save_scene_as_menu = Menu(
    id='SaveSceneAs', name="Sa&ve Scene As",
    path='MenuBar/File', group='TVTKSceneGroup', after='New'
)

#### Actions ##################################################################

new_scene = Action(
    class_name = PKG + '.actions.NewScene',
    path       = 'MenuBar/File/New', group='additions'
)
github enthought / mayavi / mayavi / plugins / mayavi_ui_action_set.py View on Github external
filters_group = Group(
    id='FiltersGroup',
    path='MenuBar/VisualizeMenu/FiltersMenu',
)
########################################
# Menus

open_menu = Menu(
    id     = "LoadDataMenu",
    name   = "&Load data",
    path = 'MenuBar/File',
    group='MayaviFileGroup'
)

visualize_menu = Menu(
    id     = "VisualizeMenu",
    name   = "Visuali&ze",
    path = "MenuBar",
    before = "View"
)

modules_menu = Menu(
    id     = "ModulesMenu",
    name   = "&Modules",
    path="MenuBar/VisualizeMenu",
)

filters_menu = Menu(
    id     = "FiltersMenu",
    name   = "&Filters",
    path="MenuBar/VisualizeMenu",