function h = makeproteinplottoolbar(fig)
%MAKEPROTEINPLOTTOOLBAR creates the toolbar to use with PROTEINPLOT

if nargin < 1
    fig = openfig('proteinplot.fig');
end

h = findall(fig,'type','uitoolbar') ;
if ~isempty(h)
    delete(h)
end

load toolbaricons;

Options=struct('Serializable',       'off',...
               'HandleVisibility',   'off');

h = uitoolbar(fig,...
                     Options,...
                     'Tag','FigureToolBar');

Options.Parent = h;                    


uipushtool(h, 'CData',savedoc, ...
                      'ToolTip', 'Save Figure', ...
                      'Tag', 'figToolSave', ...  
                      'ClickedCallback','proteinplot(''save_Callback'',gcbf,[],guidata(gcbf))',...
                      Options);
uipushtool(h, 'CData',printdoc, ...
                      'ToolTip', 'Print Figure', ...
                      'ClickedCallback','proteinplot(''print_Callback'',gcbf,[],guidata(gcbf))',...                      
                      Options);
      
                  
uicprops.Parent = h;
uicprops.Tag = 'ScribeToolBtn';

uitoggletool('ClickedCallback','proteinplot(''proteinplotzoom'',gcbf,[],guidata(gcbf),''zoomin'')',...
             'CreateFcn','figtoolset(''zoomin'',gcbf)',...
             'ToolTip','Zoom In',...
             'Tag','Exploration.ZoomIn',...
             'CData',zoomplusCData,...
             'Separator', 'on',...
             Options);

uitoggletool('ClickedCallback','proteinplot(''proteinplotzoom'',gcbf,[],guidata(gcbf),''zoomout'')',...
                    'CreateFcn','figtoolset(''zoomout'',gcbf)',...
                    'ToolTip','Zoom Out',...
                    'Tag','Exploration.ZoomOut',...
                    'CData',zoomminusCData,...
                    Options);
                
% saveas(fig,which('proteinplot.fig'))

%   Copyright 2003-2004 The MathWorks, Inc.
%   $Revision: 1.3.4.2 $  $Date: 2004/02/01 21:38:10 $
