def _get_layout_menus ( self ):
        names = self._get_layout_names()
        if len( names ) == 0:
            restore_actions = [ Action( name = '<empty>', enabled = False ) ]
            delete_actions  = [ Action( name = '<empty>', enabled = False ) ]
        else:
            names.sort()
            restore_actions = [ Action(
                                    name   = name,
                                    action = "self.on_restore_layout(%s)" %
                                             repr( name ) )
                                for name in names ]
            delete_actions  = [ Action(
                                    name   = name,
                                    action = "self.on_delete_layout(%s)" %
                                             repr( name ) )
                                for name in names ]
        return [ Menu( name = 'Restore Layout', *restore_actions ),
                 Menu( name = 'Delete Layout',  *delete_actions ) ]

#-- Drag and drop event handlers: ----------------------------------------------

    #---------------------------------------------------------------------------
    #  Handles a Python object being dropped on the control:
    #---------------------------------------------------------------------------
Gets the sub-menus for the 'Restore layout' and 'Delete layout' menu
dataset/ETHPy150Open enthought/pyface/pyface/dock/dock_window.py/DockWindow._get_layout_menus