function addcontrols(sisodb)
%ADDCONTROLS  Add SISO Tool UI controls.
%
%   See also SISOTOOL.

%   Author: P. Gahinet  
%   Copyright 1986-2002 The MathWorks, Inc.
%   $Revision: 1.9 $  $Date: 2002/04/10 04:59:30 $

sisodb.HG = struct(...
    'CompensatorFrame',sisodb.compframe,...
    'LoopConfigFrame',sisodb.configframe,...
    'StatusFrame',LocalStatusFrame(sisodb.EventManager),... 
    'Toolbar',sisodb.toolbar,...
    'Menus',sisodb.figmenus);

%-------------------------Internal Functions-------------------------

%%%%%%%%%%%%%%%%%%%%%%%%
%%% LocalStatusFrame %%%
%%%%%%%%%%%%%%%%%%%%%%%%
function Frame = LocalStatusFrame(EventManager)

SISOfig = EventManager.Frame;
StdUnit = get(SISOfig,'Unit');
FigPos = get(SISOfig,'Position');

xBorder = 2.5;
fWidth = FigPos(3)-2*xBorder;
FrameHandle = uicontrol('Parent',SISOfig, ...
    'Units',StdUnit, ...
    'Style','frame', ...
    'HelpTopicKey','sisostatusbar',...
    'Position',[xBorder .25 fWidth 2.4]);

% Create status text field
StatusText = uicontrol('Parent',SISOfig,...
    'Units',StdUnit, ...
    'Style','text', ...
    'Horiz','left', ...
    'TooltipString','Status Bar',...
    'HelpTopicKey','sisostatusbar',...
    'Position',[xBorder+1 .45 fWidth-2 2.0]);
EventManager.StatusField = StatusText;

Frame = struct(... 
     'FrameHandle',FrameHandle,... 
     'StatusText',StatusText); 
  
  
