function hinsert = render_sptinsertmenu(hFig, pos)
%RENDER_SPTINSERTMENU Render a Signal Processing Toolbox "Insert" menu.
%   HINSERT = RENDER_SPTINSERTMENU(HFIG, POS) creates a "Insert" menu in POS position
%   on a figure whose handle is HFIG and return the handles to all the menu items.

%   Author(s): V.Pellissier
%   Copyright 1988-2009 The MathWorks, Inc.

strs = {getString(message('signal:sigtools:Insert')), ...
    ['&' getString(message('signal:sigtools:XLabel'))], ...
    ['&' getString(message('signal:sigtools:YLabel'))], ...
    ['&' 'Title'], ...
    getString(message('signal:sigtools:DoubleArrow')), ...
    getString(message('signal:sigtools:Arrow')), ...
    getString(message('signal:sigtools:Line')), ...
    getString(message('signal:sigtools:Textbox')), ...
    getString(message('signal:sigtools:Rectangle'))};

% Work around so our zoom and the scribe buttons remain exclusive
cbs = {'', ...
    'sigsetappdata(gcbf,''siggui'',''ZoomState'', ''none'');setzoomstate(gcbf);insertmenufcn Xlabel', ...
    'sigsetappdata(gcbf,''siggui'',''ZoomState'', ''none'');setzoomstate(gcbf);insertmenufcn Ylabel', ...
    'sigsetappdata(gcbf,''siggui'',''ZoomState'', ''none'');setzoomstate(gcbf);insertmenufcn Title', ...
    'sigsetappdata(gcbf,''siggui'',''ZoomState'', ''none'');setzoomstate(gcbf);insertmenufcn DoubleArrow', ...
    'sigsetappdata(gcbf,''siggui'',''ZoomState'', ''none'');setzoomstate(gcbf);insertmenufcn Arrow', ...
    'sigsetappdata(gcbf,''siggui'',''ZoomState'', ''none'');setzoomstate(gcbf);insertmenufcn Line', ...
    'sigsetappdata(gcbf,''siggui'',''ZoomState'', ''none'');setzoomstate(gcbf);insertmenufcn Textbox', ...
    'sigsetappdata(gcbf,''siggui'',''ZoomState'', ''none'');setzoomstate(gcbf);insertmenufcn Rectangle'};

tags = {'insert', ...
    'figMenuInsertXLabel', ...
    'figMenuInsertYLabel', ...
    'figMenuInsertTitle', ...
    'figMenuInsertArrow', ...
    'figMenuInsertArrow', ...
    'figMenuInsertLine', ...
    'figMenuInsertTextbox', ...
    'figMenuInsertRectangle'};

sep = {'off', ...
    'off', ...
    'off', ...
    'off', ...
    'on', ...
    'off', ...
    'off', ...
    'off', ...
    'off'};

accel = {'', ...
    '', ...
    '', ...
    '', ...
    '', ...
    '', ...
    '', ...
    '', ...
    '', ...
    ''};

hinsert = addmenu(hFig,pos,strs,cbs,tags,sep,accel);

% [EOF]
