function [widgets, currRow] = getFDHDLCosimulationWidget(this, src, currRow, currCol, tagpf, varargin)
%GETCOSIMULATIONWIDGET - Get the FDHDLCosimulationWidget.
%   Author(s): J.Sun

%   Copyright 2008-2023 The MathWorks, Inc.
%     
% tagpf = [getWidgetTagPrefix(this, product),'TestBenchPanel_'];
widgets = [];
pageName = [message('HDLShared:hdldialog:hdlccHDLCodername').getString '/' ...
            message('HDLShared:hdldialog:hdltbComponentName').getString];

if this.edalinksinstalled
    tbGenerateCoSimBlock.Name    = DAStudio.message('HDLShared:hdldialog:hdltbGenerateCoSimBlock');
    tbGenerateCoSimBlock.Type    = 'checkbox';
    tbGenerateCoSimBlock.ObjectMethod = 'setCheckBox';
    tbGenerateCoSimBlock.Value        = strcmpi(src.GenerateCoSimBlock, 'on');
    tbGenerateCoSimBlock.MethodArgs   = {'%value', 'GenerateCoSimBlock', src};
    tbGenerateCoSimBlock.ArgDataTypes = {'mxArray', 'string', 'mxArray'};
    tbGenerateCoSimBlock.Source  = this;
    tbGenerateCoSimBlock.Tag     = [tagpf 'GenerateCoSimBlock'];
    tbGenerateCoSimBlock.RowSpan = [currRow currRow];
    tbGenerateCoSimBlock.ColSpan = [currCol currCol+1];
    tbGenerateCoSimBlock.Mode    = true;
    tbGenerateCoSimBlock.DialogRefresh   = true;
    widgets = {tbGenerateCoSimBlock};
    currRow = currRow+1;
    
    generateCosimModel = true;
    if ~isempty(varargin) %For FDHDL only for now
        hdlfilter = varargin{1};
        if ~hdlfilter.isGenSLTBsupported
            generateCosimModel = false;
        end
    end
    
    if generateCosimModel == true
        tbGenerateCoSimModel.Name    = DAStudio.message('HDLShared:hdldialog:hdltbCosimModel');
        tbGenerateCoSimModel.Type    = 'checkbox';
        tbGenerateCoSimModel.ObjectProperty = 'CosimModel';
        tbGenerateCoSimModel.Source  = this;
        tbGenerateCoSimModel.Tag     = [tagpf 'CosimModel'];
        tbGenerateCoSimModel.RowSpan = [currRow currRow];
        tbGenerateCoSimModel.ColSpan = [currCol currCol];
        tbGenerateCoSimModel.Mode    = true;
        tbGenerateCoSimModel.DialogRefresh   = true;
        widgets = [widgets {tbGenerateCoSimModel}];
        
        coSimModelType.Type = 'combobox';
        %Associated to local property, need to assign to CLI at apply time.
        coSimModelType.ObjectProperty = 'CosimModelType';
        coSimModelType.Tag = [tagpf 'CosimModelFor'];
        coSimModelType.RowSpan = [currRow currRow];
        coSimModelType.ColSpan = [currCol+1 currCol+2];
        coSimModelType.Source = this;
        coSimModelType.Mode = true;
        coSimModelType.DialogRefresh   = true;
        coSimModelType.Enabled = this.CosimModel == true;
        coSimModelType.UserData.Page = pageName;
        coSimModelType.UserData.Name = tbGenerateCoSimModel.Name;
        
        currRow = currRow+1;
        widgets = [widgets {coSimModelType}];
    end
end

% [EOF]

% LocalWords:  GETCOSIMULATIONWIDGET FDHDL tagpf hdltb
