function buildPanelMenuOptions(dp, hParentMenu)
%BUILDPANELMENUOPTIONS Builds menu items to auto-hide and lock the dialog
%panel. This method is used by both HistogramVisual.createNTXMenus() and
%createBaseContext() methods to add these menu items to the main menu and
%context menu. hParentMenu can either be a context menu handle or a
% handle to a main menu.

%   Copyright 2010-2011 The MathWorks, Inc.

% Lock dialog panel widths and order
uimenu('Parent',hParentMenu, ...
    'Label',getString(message('Spcuilib:dialogmgr:MenuLckPanel')), ...
    'Separator','on', ...
    'Callback',@(h,e)togglePanelLock(dp), ...
    'Checked',uiservices.logicalToOnOff(dp.PanelLock),...
    'Tag','LockPanelMenu');

% Add Auto-hide menu, configure checkmark
uimenu('Parent',hParentMenu, ...
    'Label',getString(message('Spcuilib:dialogmgr:MenuAutoHidePanel')), ...
    'Callback',@(h,e)toggleAutoHide(dp), ...
    'Checked',uiservices.logicalToOnOff(dp.AutoHide),...
    'Tag','AutoHideMenu');


% [EOF]
