You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: enableDisableFig.m
    path of file: ./repos/EEGapp/EEGapp/custom_stuff
    
    the code of the file until where you have to start completion: function currentState = enableDisableFig(hFig, newState)

    
function currentState = enableDisableFig(hFig, newState)
% enableDisableFig enable or disable an entire figure window
%
% Syntax:
%    currentState = enableDisableFig(hFig, newState)
%
% Description:
%    enableDisableFig sets the figure hFig's enable/disable state, which
%    is otherwise supported by Matlab only for specific components but not
%    figures. Using this function, the entire figure window, including all
%    internal menus, toolbars and components, is enabled/disabled in a
%    single call. Valid values for newState are true, false, 'on' & 'off'
%    (case insensitive). hFig may be a list of figure handles.
%
%    Note 1: when the state is enabled, internal figure components may
%    remain disabled if their personal 'enabled' property is 'off'.
%
%    Note 2: in disabled state, a figure cannot be moved, resized, closed
%    or accessed. None of its menues, toolbars, buttons etc. are clickable.
%
%    enableDisableFig(newState) sets the state of the current figure (gcf).
%    Note 3: this syntax (without hFig) might cause unexpected results if
%    newState is a numeric value (interpreted as a figure handle), instead
%    of a string or logical value.
%
%    state = enableDisableFig(hFig) returns the current enabled/disabled
%    state of figure hFig, or of the current figure (gcf) if hFig is not
%    supplied. The returned state is either 'on' or 'off'.
%
% Examples:
%    state = enableDisableFig;
%    state = enableDisableFig(hFig);
%    oldState = enableDisableFig(hFig, 'on');
%    oldState = enableDisableFig(hFig, result>0);
%    oldState = enableDisableFig(true);  % on current figure (Note 3 above)
%
% Technical description:
%    http://UndocumentedMatlab.com/blog/disable-entire-figure-window
%
% Bugs and suggestions:
%    Please send