function inpdefbtns
%
% Function: sysdefbtns
% 
% Usage: sysdefbtns
% 
% Description:
%    Initializes the System Definition Window
%    Handles and graphics elements.
%    Returns a vector to those elements.
%

% Version SWD970804
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% 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

%%===========================================
%% Strain energy/curvature buttons
%%===========================================

%====================================
% General buttons parameters
%====================================
top=.2;
lft=.2;
wd=.6;
ht=.6;
sp=.01;

%====================================
% Set up the console frame
%=====================================
frmborder=0.01;
ypos=.4-frmborder;
frmpos=[lft top wd ht];

HANDLES.siminpdef.comm(1)=uicontrol(HANDLES.hfigdmnd, ...
        'Style','Frame', ...
        'Position',frmpos, ...
        'BackgroundColor',[.5 .5 .5]);

%
% Common text message windows
%
HANDLES.siminpdef.comm(2)=uicontrol(HANDLES.hfigdmnd, ...
   'style','text',...
   'Position',[lft+.1 top+.55 .15 .02],...
   'string','Total signal duration?');


HANDLES.siminpdef.comm(3)=uicontrol(HANDLES.hfigdmnd, ...
   'style','text',...
   'Position',[lft+.3 top+.55 .15 .02],...
   'string','Number of points?');

%
%  Command buttons
%

HANDLES.siminpdef.comm(4)=uicontrol(HANDLES.hfigdmnd, ...
   'style','pushbutton', ...
   'position',[lft+.22 top+.05 .05 .03],...
   'string','OK',...
   'callback','inpokhand');

HANDLES.siminpdef.comm(5)=uicontrol(HANDLES.hfigdmnd, ...
   'style','pushbutton', ...
   'position',[lft+.32 top+.05 .05 .03],...
   'string','Cancel',...
   'callback','hideallbtns');
%
%  Edit text boxes
%
HANDLES.siminpdef.edt(1)=uicontrol(HANDLES.hfigdmnd, ...
   'style','edit',...
   'BackgroundColor',[1 1 1],...
   'Position',[lft+.1 top+.52 .15 .03],...
   'string','');

HANDLES.siminpdef.edt(2)=uicontrol(HANDLES.hfigdmnd, ...
   'style','edit',...
   'BackgroundColor',[1 1 1],...
   'Position',[lft+.3 top+.52 .15 .03],...
   'string','');

HANDLES.siminpdef.edt(3)=uicontrol(HANDLES.hfigdmnd, ...
   'style','edit',...
   'BackgroundColor',[1 1 1],...
   'Position',[lft+.1 top+.42 .15 .03],...
   'string','');

HANDLES.siminpdef.edt(4)=uicontrol(HANDLES.hfigdmnd, ...
   'style','edit',...
   'BackgroundColor',[1 1 1],...
   'Position',[lft+.3 top+.42 .15 .03],...
   'string','');

HANDLES.siminpdef.edt(5)=uicontrol(HANDLES.hfigdmnd, ...
   'style','edit',...
   'BackgroundColor',[1 1 1],...
   'Position',[lft+.1 top+.32 .15 .03],...
   'string','');

HANDLES.siminpdef.edt(6)=uicontrol(HANDLES.hfigdmnd, ...
   'style','edit',...
   'BackgroundColor',[1 1 1],...
   'Position',[lft+.3 top+.32 .15 .03],...
   'string','');

HANDLES.siminpdef.edt(7)=uicontrol(HANDLES.hfigdmnd, ...
   'style','edit',...
   'BackgroundColor',[1 1 1],...
   'Position',[lft+.1 top+.22 .15 .03],...
   'string','');


%lft=lft+.1;
%
%  Impulse text boxes
%

HANDLES.siminpdef.imp(1)=uicontrol(HANDLES.hfigdmnd, ...
   'style','text',...
   'Position',[lft+.1 top+.45 .15 .02],...
   'string','Pulse start time?');

HANDLES.siminpdef.imp(2)=uicontrol(HANDLES.hfigdmnd, ...
   'style','text',...
   'Position',[lft+.3 top+.45 .15 .02],...
   'string','Pulse duration?');

HANDLES.siminpdef.imp(3)=uicontrol(HANDLES.hfigdmnd, ...
   'style','text',...
   'Position',[lft+.1 top+.35 .15 .02],...
   'string','Pulse Amplitude?');


%
%  harmonic text boxes
%

HANDLES.siminpdef.har(1)=uicontrol(HANDLES.hfigdmnd, ...
   'style','text',...
   'Position',[lft+.1 top+.45 .15 .02],...
   'string','Number of components?');

HANDLES.siminpdef.har(2)=uicontrol(HANDLES.hfigdmnd, ...
   'style','text',...
   'Position',[lft+.3 top+.45 .15 .02],...
   'string','Vector of frequencies?');

HANDLES.siminpdef.har(3)=uicontrol(HANDLES.hfigdmnd, ...
   'style','text',...
   'Position',[lft+.1 top+.35 .15 .02],...
   'string','Vector of amplitudes?');

HANDLES.siminpdef.har(4)=uicontrol(HANDLES.hfigdmnd, ...
   'style','text',...
   'Position',[lft+.3 top+.35 .15 .02],...
   'string','Vector of start times?');

HANDLES.siminpdef.har(5)=uicontrol(HANDLES.hfigdmnd, ...
   'style','text',...
   'Position',[lft+.1 top+.25 .15 .02],...
   'string','Vector of stop times?');


%
%  Random text messages
%
HANDLES.siminpdef.ran(1)=uicontrol(HANDLES.hfigdmnd, ...
   'style','text',...
   'Position',[lft+.1 top+.45 .15 .02],...
   'string','Power spectral density?');

%
%  Input from workspace variables
%
HANDLES.siminpdef.oth(1)=uicontrol(HANDLES.hfigdmnd, ...
   'style','text',...
   'Position',[lft+.1 top+.55 .15 .02],...
   'string','Time vector variable name?');

HANDLES.siminpdef.oth(2)=uicontrol(HANDLES.hfigdmnd, ...
   'style','text',...
   'Position',[lft+.3 top+.55 .15 .02],...
   'string','Input vector variable name?');



set(HANDLES.siminpdef.comm,'visible','off');
set(HANDLES.siminpdef.imp,'visible','off');
set(HANDLES.siminpdef.har,'visible','off');
set(HANDLES.siminpdef.ran,'visible','off');
set(HANDLES.siminpdef.edt,'visible','off');
set(HANDLES.siminpdef.oth,'visible','off');


return
