function [winclassnames, winnames] = findallwinclasses(flag)
%FINDALLWINCLASSES Find all the non-abstract window classes in the sigwin class
%   [WINCLASSNAMES, WINNAMES] = FINDALLWINCLASSES returns two cell arrays. WINCLASSNAMES
%   contains the names of the classes (barthannwin, ...) and WINNAMES contains the names
%   of the windows (Bartlett-Hanning, ...).
%   [WINCLASSNAMES, WINNAMES] = FINDALLWINCLASSES('NONUSERDEFINED') return the all windows 
%   of the Signal Processing toolbox.
%
%   See also FINDNONABSTRACTSUBCLASSES.

%   Copyright 1988-2023 The MathWorks, Inc.

narginchk(0,1);
if nargin>0 && ~strcmpi(flag, 'nonuserdefined')
    error(message('signal:findallwinclasses:InvalidParam'));
end

winclassnames = {'bartlett'; ...
    'barthannwin'; ...
    'blackman'; ...
    'blackmanharris'; ...
    'bohmanwin'; ...
    'chebwin'; ...
    'flattopwin';...
    'gausswin'; ...
    'hamming'; ...
    'hann'; ...
    'kaiser'; ...
    'nuttallwin'; ...
    'parzenwin'; ...
    'rectwin'; ...
    'taylorwin'; ...
    'triang'; ...
    'tukeywin'; ...
    'userdefined'; ...
    'functiondefined'};

winnames = {'Bartlett'; ...
    'Bartlett-Hanning'; ...
    'Blackman'; ...
    'Blackman-Harris'; ...
    'Bohman'; ...
    'Chebyshev'; ...
    'Flat Top';...
    'Gaussian'; ...
    'Hamming'; ...
    'Hann'; ...
    'Kaiser'; ...
    'Nuttall'; ...
    'Parzen'; ...
    'Rectangular'; ...
    'Taylor'; ...
    'Triangular'; ...
    'Tukey'; ...
    'User Defined'; ...
    'User Defined'};

if nargin>0
    % Remove the user defined classes
    winnames(end-1:end) = [];
    winclassnames(end-1:end) = [];
end


% [EOF]
