Package schrodinger :: Package application :: Package msv :: Module msv_menu
[hide private]
[frames] | no frames]

Module msv_menu


Holds the list of all menu information including menu names, menu option names,
slots, tool tips, short cuts, and child lists.

[['menu name', ['action label', 'slot method name', 'tool tip',
                                        'shortcut', 'set checkable', 'icon'],
               ['label2', 'slot', 'tool tip', 'shortcut', 'checkable', 'icon'],
               ['separator'], <-- if want a separator in the menu, put here
               [.... ],
 ['2nd menu name', ['action label', ....],
                ['label for sub list', ['sub-action label', ....]
                                        ['sub-action label',....]
                                        [...] ],
  ['3rd menu name', [..], [...] ] ]

This list will be used in msv's viewer.py to then create a dictionary of
label: actions and creates all the menus.

Functions [hide private]
 
insertSublistAfterPath(path, sub_list, main_list)
Given the path of the action AFTER which you wish to insert the sublist, inserts it into main_list.
 
insertSublistOneAfterPath(path, sub_list, main_list)
just like insertSublistAfterPath, but used when separator between
 
indexOfMenuList(string_name, list)
Get the index of the list containing a specific menu
Variables [hide private]
  maestro = get_maestro()
  SEPARATOR = 'separator'
  MENU_LIST = [['&File', ['New Query', 'viewerNewSet', '', '', '...
  IF_MAESTRO_INSERT = [['&Annotations/Isoelectric Point', '', ['...
  maestro_menu_list = [['&File', ['New Query', 'viewerNewSet', '...
  MAESTRO_MENU_LIST = [['&File', ['New Query', 'viewerNewSet', '...
  __package__ = 'schrodinger.application.msv'
  lst = ['&Tools', '', ['&Maestro', ['Incorporate Entries from W...
Function Details [hide private]

insertSublistAfterPath(path, sub_list, main_list)

 

Given the path of the action AFTER which you wish to insert the sublist,
inserts it into main_list.

For example, given path: "Color/Mark Residues/Red", and sub_list ["HELLO"],
inserts:
    [Mark Residues,
        ['Red', 'viewerMarkResidues', '', '', '', ''],
        ['HELLO'], ...]


Variables Details [hide private]

MENU_LIST

Value:
[['&File',
  ['New Query', 'viewerNewSet', '', '', '', ''],
  ['Rename Query', 'queryRename', '', '', '', ''],
  ['Duplicate Query', 'viewerDuplicateSet', '', '', '', ''],
  ['Delete Query', 'queryDelete', '', '', '', ''],
  ['separator'],
  ['Open...',
   'loadProject',
...

IF_MAESTRO_INSERT

Value:
[['&Annotations/Isoelectric Point',
  '',
  ['Ligand Contacts', 'viewerShowLigands', '', '', 'True', '']],
 ['&Annotations/Ligand Contacts',
  'separator between!',
  ['&Antibody CDRs', 'viewerRenumberToAntibody', '', '', 'True', '']],
 ['&Annotations/&Antibody CDRs',
  '',
...

maestro_menu_list

Value:
[['&File',
  ['New Query', 'viewerNewSet', '', '', '', ''],
  ['Rename Query', 'queryRename', '', '', '', ''],
  ['Duplicate Query', 'viewerDuplicateSet', '', '', '', ''],
  ['Delete Query', 'queryDelete', '', '', '', ''],
  ['separator'],
  ['Open...',
   'loadProject',
...

MAESTRO_MENU_LIST

Value:
[['&File',
  ['New Query', 'viewerNewSet', '', '', '', ''],
  ['Rename Query', 'queryRename', '', '', '', ''],
  ['Duplicate Query', 'viewerDuplicateSet', '', '', '', ''],
  ['Delete Query', 'queryDelete', '', '', '', ''],
  ['separator'],
  ['Open...',
   'loadProject',
...

lst

Value:
['&Tools',
 '',
 ['&Maestro',
  ['Incorporate Entries from Workspace',
   'viewerIncorporateIncluded',
   '',
   '',
   '',
...