%
%  Name: dammenu.m
% 
%  Usage: dammenu
% 
%  Description:
%     Initializes damage identification menus
%

%  Version SWD970702
%
%  Author(s): Scott W. Doebling, doebling@lanl.gov
%
%  Institution: Los Alamos National Laboratory,
%		ESA-EA
%
%  Copyright (c) 1997, The Regents of the University
%     	of California. (See top level of code for
%        full copyright statement)
%


%=============================================
% Damage ID Load/Save menu
%=============================================
hmmenu(7)=uimenu(figNumber,'Label','Load/Save','enable','on');  
   uimenu(hmmenu(7),'Label','Load Undamaged Modes','Callback', ...
	['[filename,pathname,error]=loadfile(1,pathname);', ...
  	 'if error==0,',...
	    'damsuf = ''_u''; lddammo;',...
	    'disp(''Undamaged Modes Loaded''),',...
	 'end;']);
   uimenu(hmmenu(7),'Label','Load Damaged Modes','Callback', ...
	['[filename,pathname,error]=loadfile(1,pathname);', ...
         'if error==0,',...
	      'damsuf = ''_d''; lddammo;',...
	    'disp(''Damaged Modes Loaded''),',...
	   'end;']);
      uimenu(hmmenu(7),'Label','Load Geometry','Callback', ...
         ['[filename,pathname,error]=loadfile(2,pathname);', ...
            'if error==0,',...
            '   loadgeom,',...
            'end;']);

%=============================================
% Methods menu
%=============================================
hmmenu(8)=uimenu(figNumber,'Label','Methods','enable','on');  
   uimenu(hmmenu(8),'Label','Strain Energy Methods','Callback',[ ...
	'set(figNumber,''name'',''Diamond: Damage Identification (Strain energy)'');', ...
	'SEMwind']);
   uimenu(hmmenu(8),'Label','Flexibility Methods','Callback',[ ...
	'set(figNumber,''name'',''Diamond: Damage Identification (Flexibility)'');', ...
	'flexwind']);

%
% Viewport menu
%

hmmenu(17) = uimenu(figNumber,'Label','Viewports','enable','on');  
   uimenu(hmmenu(17),'label','Show Viewports','callback','figure(hvpfig)')
   uimenu(hmmenu(17),'label','Send to Viewport 1','callback','vpsend(hvpfig,haxes,hlegax,hvpdataax(1),hvplegax(1)),vpinfostr{1}=damtitstr; set(hvpinfotext(1),''string'',vpinfostr{1})')
   uimenu(hmmenu(17),'label','Send to Viewport 2','callback','vpsend(hvpfig,haxes,hlegax,hvpdataax(2),hvplegax(2)), vpinfostr{2}=damtitstr; set(hvpinfotext(2),''string'',vpinfostr{2})')
   uimenu(hmmenu(17),'label','Send to Viewport 3','callback','vpsend(hvpfig,haxes,hlegax,hvpdataax(3),hvplegax(3)), vpinfostr{3}=damtitstr; set(hvpinfotext(3),''string'',vpinfostr{3})')
   uimenu(hmmenu(17),'label','Send to Viewport 4','callback','vpsend(hvpfig,haxes,hlegax,hvpdataax(4),hvplegax(4)), vpinfostr{4}=damtitstr; set(hvpinfotext(4),''string'',vpinfostr{4})')
