| 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 interface for action manager builders. """ |
| 11 |
|
| 12 |
|
| 13 |
# Enthought library imports. |
| 14 |
from traits.api import Interface, List |
| 15 |
|
| 16 |
# Local imports. |
| 17 |
from .action_set import ActionSet |
| 18 |
|
| 19 |
|
| 20 |
class IActionManagerBuilder(Interface): |
| 21 |
"""The interface for action manager builders. |
| 22 |
|
| 23 |
An action manager builder populates action managers (i.e. menus, menu bars |
| 24 |
and tool bars) from the menus, groups and actions defined in its action |
| 25 |
sets. |
| 26 |
|
| 27 |
""" |
| 28 |
|
| 29 |
# The action sets used by the builder. |
| 30 |
action_sets = List(ActionSet) |
| 31 |
|
| 32 |
def initialize_action_manager(self, action_manager, root): |
| 33 |
"""Initialize an action manager from the builder's action sets.""" |