function [widgets, currRow] = getCosimulationWidget(this, src, currRow, currCol, tagpf, varargin)
%GETCOSIMULATIONWIDGET - Get the CosimulationWidget.

%   Author(s): J.Sun
%   Copyright 2008-2015 The MathWorks, Inc.
%     
% tagpf = [getWidgetTagPrefix(this, product),'TestBenchPanel_'];
widgets = [];

DisableHDLVTestbenches=~strcmpi(src.SimulationTool,'Custom'); 

if this.edalinksinstalled
    
    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+1];
        tbGenerateCoSimModel.Mode    = true;
        tbGenerateCoSimModel.Enabled = DisableHDLVTestbenches;
        tbGenerateCoSimModel.DialogRefresh   = true;
        widgets = {tbGenerateCoSimModel};
        currRow = currRow+1;
    end
    
    
    
        tbGenerateDPITestbench.Name    = DAStudio.message('HDLShared:hdldialog:hdltbGenerateSVDPI');
        tbGenerateDPITestbench.Type    = 'checkbox';
        tbGenerateDPITestbench.ObjectProperty = 'svdpi_tb';
        tbGenerateDPITestbench.Source  = this;
        tbGenerateDPITestbench.Tag     = [tagpf 'svdpi_tb'];
        tbGenerateDPITestbench.RowSpan = [currRow currRow];
        tbGenerateDPITestbench.ColSpan = [currCol currCol];
        tbGenerateDPITestbench.Mode    = true;
        tbGenerateDPITestbench.Enabled = DisableHDLVTestbenches;
        tbGenerateDPITestbench.DialogRefresh   = true;
        widgets = [widgets {tbGenerateDPITestbench}];
        
    
end

% [EOF]
