function [hsemb] = sembbtns(figNumber)
% Function: sembbtns.m
% 
% Usage: hsemb = sembbtns(figNumber);
% 
% Description:
%    Initializes the Strain Energy Window
%    Handles and graphics elements.
%    Returns a vector to those elements.
%

% Version SWD970707
%
% Author(s): Erik Straser, estraser@lanl.gov
%	     Scott W. Doebling, doebling@lanl.gov
%
% Institution: Los Alamos National Laboratory, ESA-EA
%
% Copyright (c) 1996-1997, The Regents of the University
%     	of California.

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

%====================================
% 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 .9+2*frmborder];
hsemb(1)=uicontrol(figNumber, ...
        'Style','Frame', ...
        'Position',frmpos, ...
        'BackgroundColor',[.5 .5 .5]);

%
%  hsemb(2:5) are defunct
%

hsemb(2)=uicontrol('position',[0 0 eps eps]);
hsemb(3)=uicontrol('position',[0 0 eps eps]);
hsemb(4)=uicontrol('position',[0 0 eps eps]);
hsemb(5)=uicontrol('position',[0 0 eps eps]);

%
%  Display tools button
% 

%btnnum=6;
%ypos=top-(btnnum-1)*(btnht+spacing);
%btnpos=[left ypos-btnht btnwd btnht];
%hsemb(33)=uicontrol(figNumber, ...
%      'style','pushbutton', ...
%      'position',btnpos, ...
%      'string','Display Tools', ...
%      'Callback', ...
%   'set(hdamtl(1),''visible'',''on''), figure(hdamtl(1))');

hsemb(33) = uicontrol('position',[0 0 eps eps]);


%
% calculate button
%

btnnum=3;
ypos=top-(btnnum-1)*(btnht+spacing);
btnpos=[left ypos-btnht btnwd btnht];
hsemb(6)=uicontrol(figNumber, ...
      'style','pushbutton', ...
      'position',btnpos, ...
      'string','Calculate', ...
      'callback',[ ...
	'if ishandle(hl), delete(hl), end,',...
   'if ~isempty(SEMquads),',...
   '   sedamshl,',...
   'elseif ~isempty(SEMbeams),',...
   '   sedambar,',...
   'end,',...
	'set(onHndlVector(22:31),''visible'',''on'');', ...
	'set(onHndlVector(33),''visible'',''on'');', ...
	]);


%
%  To choose which mode to plot
%

btnnum=5;
ypos=top-(btnnum-1)*(btnht);
btnpos=[left ypos-btnht btnwd btnht];
hsemb(7)=uicontrol(figNumber, ...
      'style','pushbutton', ...
      'position',btnpos, ...
      'string','Select Modes', ...
      'Callback', ...
      ['set(hmdsel(1),''visible'',''on''), figure(hmdsel(1)),']);         

%
%  hsemb(8) is a dummy
%

hsemb(8) = uicontrol('position',[0 0 eps eps]);

%
% Number of divisions
%
btnnum=7;
ypos=top-(btnnum-1)*(btnht+spacing)-btnht/2;
btnpos=[left ypos-btnht btnwd btnht];
hsemb(9)=uicontrol(figNumber, ...
      'style','text', ...
      'position',btnpos, ...
      'string','Divisions per Element');

btnnum=8;
ypos=top-(btnnum-1)*(btnht+spacing);
btnpos=[left ypos-btnht btnwd btnht];
hsemb(10)=uicontrol(figNumber, ...
      'style','edit', ...
      'position',btnpos, ...
      'string','10', ...
      'back','white');
%
% Interpolation
%
btnnum=9;
ypos=top-(btnnum-1)*(btnht+spacing)-btnht/2;
btnpos=[left ypos-btnht btnwd btnht];
hsemb(11)=uicontrol(figNumber, ...
      'style','text', ...
      'position',btnpos, ...
      'string','Interpolation');
btnnum=10;
ypos=top-(btnnum-1)*(btnht+spacing);
btnpos=[left ypos-btnht btnwd btnht];
hsemb(12)=uicontrol(figNumber, ...
      'style','popup', ...
      'position',btnpos, ...
      'string','Spline|Cubic', ...
      'back','white', ...
      'value',1);
%
% hsemb(13:21) are defunct
%

hsemb(13)=uicontrol('position',[0 0 eps eps]);
hsemb(14) = uicontrol('position',[0 0 eps eps]);
hsemb(15) = uicontrol('position',[0 0 eps eps]);
hsemb(18) = uicontrol('position',[0 0 eps eps]);
hsemb(19) = uicontrol('position',[0 0 eps eps]);
hsemb(20) = uicontrol('position',[0 0 eps eps]);
hsemb(21) = uicontrol('position',[0 0 eps eps]);

%
%  Poisson's ratio (needed for 2-D fit)
%

btnnum=11;
ypos=top-(btnnum-1)*(btnht+spacing)-btnht/2;
btnpos=[left ypos-btnht btnwd btnht];
hsemb(16)=uicontrol(figNumber, ...
      'style','text', ...
      'position',btnpos, ...
      'string','Nu');
   
btnnum=12;
ypos=top-(btnnum-1)*(btnht+spacing);
btnpos=[left ypos-btnht btnwd btnht];
hsemb(17)=uicontrol(figNumber, ...
      'style','edit', ...
      'position',btnpos, ...
      'string','.3', ...
      'back','w');
   
%
% Define Elevation Slider (defunct)
%

hsemb(22) = uicontrol('pos',[0 0 0.01 0.01]);
hsemb(23) = uicontrol('pos',[0 0 0.01 0.01]);
hsemb(24) = uicontrol('pos',[0 0 0.01 0.01]);
hsemb(25) = uicontrol('pos',[0 0 0.01 0.01]);
hsemb(26) = uicontrol('pos',[0 0 0.01 0.01]);

%
% Define Azimuth Slider (defunct)
%

hsemb(27) = uicontrol('pos',[0 0 0.01 0.01]);
hsemb(28) = uicontrol('pos',[0 0 0.01 0.01]);
hsemb(29) = uicontrol('pos',[0 0 0.01 0.01]);
hsemb(30) = uicontrol('pos',[0 0 0.01 0.01]);
hsemb(31) = uicontrol('pos',[0 0 0.01 0.01]);

%
%  Axes and legend for the strain energy method plots
%

hsemb(32) = axes('position',[.1 .22 .7 .7]);
hsemb(34) = axes('position',[.1 .1 .7 .10]);


set(hsemb,'visible','off');

return
