%
%  Name: DIAMOND
%
%  this sets up the main menu structure for analyzing
%  dynamic data to attempt to located damage
%
%  Version SWD970708
%
%  Author(s): Phillip Cornwell, cornwell@lanl.gov
%	      Scott Doebling, doebling@lanl.gov
%		Erik Straser, estraser@lanl.gov
%
%  Institution: Los Alamos National Laboratory,
%               ESA-EA
%
%  Copyright (c) 1996-1997, The Regents of the University
%       of California. This software was produced under
%       a U.S. Government contract (W-7405-ENG-36) by 
%       Los Alamos National Laboratory, which is operated
%       by the University of California for the U.S.
%       Department of Energy. The U.S. Government is 
%       licensed to use, reproduce, and distribute this
%       software. Permission is granted to the public to
%       copy and use this software without charge, provided
%       that this Notice and any statement of authorship
%       are reproduced on all copies. Neither the Government
%       nor the University makes any warranty, express or
%       implied, or assumes any liability or responsibility
%       for the use of this software.
%

%
% SET GLOBAL WORKSPACE DEFAULTS
%

set(0,'DefaultUIcontrolUnits','normal')

colordef none

ntypevec = [];
nds=1;
hl = [];

lnst = ['- ';'--'];

lnco = ['y','r'];

%%===================================
%%  For the SPLASH SCREEN
%%===================================

hfspl = figure('numbertitle','off','name','DIAMOND: STARTUP',...
		'menubar','none','resize','off','units','pixels','position',[20 20 600 400]);

haspl = axes('visible','off');

hspl(1) = text(0.5,0.8,'DIAMOND');

set(hspl(1),'fontname','times','fontsize',72,'Color','r','HorizontalAlignment','Center','Fontangle','italic','fontweight','bold')

hspl(7) = text(0.5,0.65,'Damage Identification And Modal Analysis For Dummies');
set(hspl(7),'horiz','center','fontsize',12,'fontname','times','fontangle','italic')

hspl(6) = text(0.5,0.575,'VERSION SWD970708');
set(hspl(6),'HorizontalAlignment','Center','fontsize',10)

hspl(2) = text(0.5,0.45,'Authors: Scott W. Doebling, Phillip J. Cornwell, and Erik G. Straser');
set(hspl(2),'fontname','times','fontsize',14,'HorizontalAlignment','Center')

hspl(3) = text(0.5,0.40,'Los Alamos National Laboratory');
set(hspl(3),'fontname','times','fontsize',14,'HorizontalAlignment','Center')

hspl(4) = text(0.5,0.30,'Copyright (c) 1996-1997, The Regents of the University of California');
set(hspl(4),'HorizontalAlignment','Center')

hspl(5) = text(0.5,0.25,'Send suggestions and bug reports to: doebling@lanl.gov');
set(hspl(5),'HorizontalAlignment','Center')

hspl(8) = text(0.5, 0.10, 'DIAMOND IS STARTING UP...');
set(hspl(8),'HorizontalAlignment','Center')


drawnow

hdmspl = uicontrol('style','pushbutton','string','START','visible','off',...
	'units','normal',...
	'position',[0.4 0.07 0.2 0.05],...
	'callback',['delete(hfspl),',...
			'set(figNumber,''visible'',''on''),']);

% define the main window

%figurePos=get(0,'DefaultFigurePosition');
%figurePos(3:4)=[650 480];

figNumber=figure( ...
    'Name','Diamond - Modal Analysis', ...
    'NumberTitle','off', ...
    'Resize','on', ...
    'units','normal',...
    'visible','off',...
    'Position',[0.05 0.05 0.9 0.9],...
    'menubar','none');


axes
set(gca,'Position',[0 0 1 1]);
axis off

%
%  Define global variables
% 

if isunix,
   pathname='~';
else
   pathname='C:';
end



%========================================================
% Define some initial parameters and clear some variables
%========================================================


clear onHndlVector offHndlVector hmmenu


%=======================================
% Set up menus
%=======================================

filemenu
modmenu
htmenu

%=======================================
% Set up buttons
%=======================================

hndlMatrix=dmndbtns(figNumber);
onHndlVector = [];

%
%  Set up complex-to-real mode conversion tool

cpxtool

%
%  Set up the plottools
%

plottool

%
%  Set up the damage ID display tools

% damtool

%
%  Set up the mode selection window
%

mdselwin

%
%  Set up the monte carlo tool palette
%

mctool

%
%  Set up the viewport figure and info figure
%

vpsetup
vpinfosetup

%
%  SETUP IS COMPLETE -- READY TO START DIAMOND
%


set(hspl(8),'string','Diamond is Ready. Push the Button.')
set(hdmspl,'visible','on')
