Debian Codegraph @

envisage/ui/action/action.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 *definition* of an action in a tool bar or menu. """
11
12
13 # Enthought library imports.
14 from traits.api import Str
15
16 # Local imports.
17 from .location import Location
18
19
20 class Action(Location):
21 """The *definition* of an action in a tool bar or menu."""
22
23 #### Action implementation ################################################
24
25 # The action's name (appears on menus and toolbars etc).
26 name = Str
27
28 # The name of the class that implements the action.
29 class_name = Str
30
31 ###########################################################################
32 # 'object' interface
33 ###########################################################################
34
35 def __str__(self):
36 """Return the 'informal' string representation of the object."""
37
38 return "Action(%s)" % self.name
39
40 __repr__ = __str__