/* Customized for selectionEditorWin.mel (v 1.5) by robin http://www.uberware.net/mel/ 6-11-99 builds the character set menu and makes it a marking menu i use this as my select command hotkey (q) but it could be any marking menu you like! version 1.1 (6-17-99): - fixed display with no sets listed - fixed multiple menu builds if you didn't let go of the key between clicks - cosmetic adjustments Discalimer: Use and modify at your own risk. */ global proc doSelectSetsMM() // // Creates entries in the "Select Character" subMenu // in the Edit Menu. { if (!`menuItem -exists ss_selEditorItem`) { menuItem -l "Selection Editor..." -c "selectionEditorWin" ss_selEditorItem; menuItem -divider true; // Get a list of all character sets in the // system, then generate an entry per set // string $charSets[] = `ls -sets`; int $added = 0; for( $character in $charSets ) { if( `sets -q -t $character` == "gCharacterSet" ) { menuItem -l $character -c ( "select -r " + $character ); $added++; } } if (!$added) // // No characters defined - create a default menu item // to inform the user { menuItem -l "No Quick Select Sets Defined" -enable false; } } } global proc buildSelectMM() // // Creates a marking menu that allows the user // to select quick character sets. It reuses // the name tempMM for the name of the menu, to // ensure that there's only one of these at // any one time. { if( `popupMenu -exists tempMM` ) { deleteUI tempMM; } global string $gSelect; setToolTo $gSelect; popupMenu -alt 0 -mm 1 -b 1 -aob 1 -p viewPanes -pmc "doSelectSetsMM" tempMM; }