function idbwtext(figure_name,posXY)
%IDBWTEXT This function builds the INFO TEXT dialog.

%	L. Ljung 9-27-94
%	Copyright (c) 1986-95 by the MathWorks, Inc.
%	$Revision: 1.5 $  $Date: 1995/05/10 21:36:59 $

global XIDlayout
layout
butwh=[mStdButtonWidth mStdButtonHeight];%butw=55;buth=25;
butw=0.6*butwh(1);buth=butwh(2);
ftb=mFrameToText;  % Frame to button
bb = 2; % between buttons
etf = mEdgeToFrame;
figW=iduilay2(3);
set(figure_name,'Color',get(0,'DefaultUIControlBackgroundcolor'));
s1='iduipoin(1);';s3='iduipoin(2);';

   % LEVEL 1

   pos = iduilay1(figW,3);
   uicontrol(figure_name,'pos',pos(1,:),'style','frame');

   uicontrol(figure_name,'pos',pos(2,:),'style',...
   'push','string','Present','callback',[s1,'iduiedit(''present'');',s3]);
   uicontrol(figure_name,'pos',pos(3,:),'style',...
   'push','string','Close','callback',[s1,'iduiaxes(''close'',8);',s3]);
   uicontrol(figure_name,'pos',pos(4,:),'style',...
   'push','string','Help','callback','iduihelp(''idtexti.hlp'',''Help: Text Information'');');

   % LEVEL 2 MAIN INFO BOX

   lev2=pos(1,2)+pos(1,4);
   uicontrol(figure_name,'pos',[etf lev2+mEdgeToFrame figW-2*etf ...
           9*buth+2*ftb],'style','frame');

   h(1)=uicontrol(figure_name,'pos',...
             [etf+ftb lev2+etf+mStdButtonHeight/2 ...
             figW-2*(etf+ftb)-buth 8*buth],...
             'style','edit','max',2,'Backgroundcolor','w','callback',...
           [s1,'iduiedit(''update_info'');',s3],'Horizontalalignment','left');
   h(2)=uicontrol(figure_name,'pos',...
            [figW-(etf+ftb)-buth lev2+etf+mStdButtonHeight/2  buth 8*buth],...
            'style','slider','callback',[s1,'iduiedit(''slide'');',s3]);
   uicontrol(figure_name,...
             'pos',[etf+ftb lev2+etf+mStdButtonHeight/2+8*buth+bb figW-2*(etf+ftb) buth],...
             'style','text','string','Diary And Notes');

   % LEVEL 3 INFO BOX

   lev3=lev2+9*buth+etf+2*ftb;
  uicontrol(figure_name,'pos',[etf lev3+etf figW-2*etf ...
            5*mLineHeight+mStdButtonHeight],'style','frame');  
   h(3)=uicontrol(figure_name,'pos',...
          [etf+ftb lev3+etf+mStdButtonHeight/2 figW-2*(etf+ftb) 5*mLineHeight],...
          'style','edit','max',2);

   % LEVEL 4: HEADING

  lev4 = lev3+etf+5*mLineHeight+mStdButtonHeight;
  pos = iduilay1(figW,4,2,lev4,[],[1 2]); 
  uicontrol(figure_name,'pos',pos(1,:),'style','frame');
  uicontrol(figure_name,'pos',pos(4,:),...
             'style','text',...
             'string','Color:','horizontalalignment','left');
   h(6)=uicontrol(figure_name,'pos',pos(5,:),'style','edit',...
             'backgroundcolor','w','HorizontalAlignment','left',...
             'callback',[s1,'iduiedit(''update_color'');',s3],'tag','color');

   h(4)=uicontrol(figure_name,'pos',pos(2,:),...
             'style','text','horizontalalignment','left',...
             'string','Doubleclick on model/data  for info!');
   h(5)= uicontrol(figure_name,'pos',pos(3,:),'style','edit',...
             'backgroundcolor','w','HorizontalAlignment','left',...
             'callback',[s1,'iduiedit(''update_name'');',s3]);
   figH=pos(1,2)+pos(1,4)+etf;
   FigWH=[figW figH];
   set(figure_name,'pos',[posXY FigWH]);
   set(figure_name,'userdata',h);
   set(get(figure_name,'children'),'unit','norm');
   if length(XIDlayout)>=8,if XIDlayout(8,3)
   	eval('set(figure_name,''pos'',XIDlayout(8,1:4));','')
   end,end

end
iduistat('Done!',1)




