Source code for pyface.mdi_window_menu
# (C) Copyright 2005-2023 Enthought, Inc., Austin, TX
# All rights reserved.
#
# This software is provided without warranty under the terms of the BSD
# license included in LICENSE.txt and may be redistributed only under
# the conditions described in the aforementioned license. The license
# is also available online at http://www.enthought.com/licenses/BSD.txt
#
# Thanks for using Enthought open source!
""" A menu that mimics the standard MDI window menu.
This is the menu that has the tile/cascade actions etc.
"""
from traits.api import Str
from .action.api import MenuManager, Separator, WindowAction
[docs]class Cascade(WindowAction):
""" Cascades the windows. """
# 'Action' interface ---------------------------------------------------
name = Str("Ca&scade")
tooltip = Str("Cascade the windows")
# ------------------------------------------------------------------------
# 'Action' interface.
# ------------------------------------------------------------------------
[docs]class Tile(WindowAction):
""" Tiles the windows horizontally. """
# 'Action' interface ---------------------------------------------------
name = Str("&Tile")
tooltip = Str("Tile the windows")
# ------------------------------------------------------------------------
# 'Action' interface.
# ------------------------------------------------------------------------
[docs]class ArrangeIcons(WindowAction):
""" Arranges the icons. """
# 'Action' interface ---------------------------------------------------
name = Str("&Arrange Icons")
tooltip = Str("Arrange the icons")
# ------------------------------------------------------------------------
# 'Action' interface.
# ------------------------------------------------------------------------
[docs]class Next(WindowAction):
""" Activates the next window. """
# 'Action' interface ---------------------------------------------------
name = Str("&Next")
tooltip = Str("Activate the next window")
# ------------------------------------------------------------------------
# 'Action' interface.
# ------------------------------------------------------------------------
[docs]class Previous(WindowAction):
""" Activates the previous window. """
# 'Action' interface ---------------------------------------------------
name = Str("&Previous")
tooltip = Str("Activate the previous window")
# ------------------------------------------------------------------------
# 'Action' interface.
# ------------------------------------------------------------------------
[docs]class Close(WindowAction):
""" Closes the current window. """
# 'Action' interface ---------------------------------------------------
name = Str("&Close")
tooltip = Str("Close the current window")
# ------------------------------------------------------------------------
# 'Action' interface.
# ------------------------------------------------------------------------
[docs]class CloseAll(WindowAction):
""" Closes all of the child windows. """
# 'Action' interface ---------------------------------------------------
name = Str("Close A&ll")
tooltip = Str("Close all of the windows.")
# ------------------------------------------------------------------------
# 'Action' interface.
# ------------------------------------------------------------------------