function macbtns
%
%  Function: macbtns
% 
%  Usage: macbtns
% 
%  Description:
%    Initializes the MAC/COMAC damage ID window
%

%
%  Version SWD970916
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% This matlab source code was originally     %
% developed as part of "DIAMOND" at          %
% Los Alamos National Laboratory. It may     %
% be copied, modified, and distributed in    %
% any form, provided:                        %
%  a) This notice accompanies the files and  %
%     appears near the top of all source     %
%     code files.                            %
%  b) No payment or commercial services are  %
%     received in exchange for the code.     %
%                                            %
% Original copyright is reserved by the      %
% Regents of the University of California,   %
% in addition to Scott W. Doebling, Phillip  %
% J. Cornwell, Erik G. Straser, and Charles  %
% R. Farrar.                                 %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

global HANDLES

%====================================
% General buttons parameters
%====================================
top=.95;
left=.84;
btnwd=.15;
btnht=.06;
spacing=.01;

%====================================
% Set up the console frame
%=====================================
frmborder=0.01;
ypos=.05-frmborder;
frmpos=[left-frmborder ypos btnwd+2*frmborder .95+2*frmborder];
HANDLES.hmacdam(1)=uicontrol(HANDLES.hfigdmnd, ...
   'Style','Frame', ...
   'Position',frmpos, ...
   'visible','off',...
   'BackgroundColor',[.5 .5 .5]);

%
% Set up plot axes
%

HANDLES.hmacdam(2) = axes('position',[.1 .2 .7 .7],'parent',HANDLES.hfigdmnd,'visible','off');
HANDLES.hmacdam(5) = axes('position',[.1 .1 .7 .10],'parent',HANDLES.hfigdmnd,'visible','off');


%
% MAC Button
%

btnnum=0.5;
ypos=top-(btnnum-1)*(btnht+spacing);
btnpos=[left ypos-btnht btnwd btnht];
HANDLES.hmacdam(3)=uicontrol(HANDLES.hfigdmnd, ...
   'style','pushbutton', ...
   'position',btnpos, ...
   'string','Damage MAC',...
   'visible','off',...
   'callback',...
   ['showall(HANDLES.hmacdam(2));',...
      'macplot(HANDLES.hmacdam(2),DAMAGEID.undammode,DAMAGEID.dammode,''Undamaged Modes'',''Damaged Modes''),']);

%
% COMAC Button
%

btnnum=1.5;
ypos=top-(btnnum-1)*(btnht+spacing);
btnpos=[left ypos-btnht btnwd btnht];
HANDLES.hmacdam(4)=uicontrol(HANDLES.hfigdmnd, ...
   'style','pushbutton', ...
   'position',btnpos, ...
   'string','Damage COMAC',...
   'visible','off',...
   'callback',...
   ['showall(HANDLES.hmacdam(2));',...
      'comacplot(HANDLES.hmacdam(2),DAMAGEID.undammode,DAMAGEID.dammode,''Undamaged Modes'',''Damaged Modes''),']);

return
