www.pudn.com > LPCToolbox.rar > RCFIG_SETUP.M


 
function rcfig_setup 
global Handle 
 
Handle.rcfig = figure('menubar', 'none', 'units', 'normalized'); 
set(gcf, 'position', [0.1984 0.2451 0.6375 0.5479]); 
colordef(gcf, 'white'); 
set(Handle.rcfig, 'WindowButtonUpFcn', 'rcfig_click'); 
%set(Handle.rcfig, 'KeyPressFcn', 'rcfig_key'); 
setptr(Handle.rcfig, 'fullcrosshair'); 
 
ctl{1} = {'Ne&xt sound',        'x', 'menuactions(''nextsnd'')'}; 
ctl{2} = {'Pre&vious sound',    'v', 'menuactions(''prevsnd'')'}; 
ctl{3} = {'Play &sound',        's', 'menuactions(''playsnd'')'}; 
ctl{4} = {'&Change parameters', 'c', 'menuactions(''changeparams'')'}; 
ctl{5} = {'&Quit',              'q', 'menuactions(''quit'')'}; 
nctls = length(ctl); 
 
clear h h1 
 
h = uimenu(Handle.rcfig, 'label', '&Lpctool'); 
 
for i=1:nctls, 
 h1(i) = uimenu(h, 'label', ctl{i}{1}, ... 
                   'accelerator', ctl{i}{2}, ... 
                   'callback', ctl{i}{3}); 
end