classdef TensorFlowMaskCallbacks
    % 

    % Copyright 2023 The MathWorks,Inc.


    properties(Constant)
        MLSBName = 'TensorFlow Model Block';
    end

    methods(Static)

        % Following properties of 'maskInitContext' are available to use:
        %  - BlockHandle
        %  - MaskObject
        %  - MaskWorkspace - Use get/set APIs to work with mask workspace.
        function MaskInitialization(maskInitContext)
            internal.pycoexblks.updateMLSB(gcb, TensorFlowMaskCallbacks.MLSBName);
            internal.pycoexblks.updateSubsystemBlockPorts(gcb, TensorFlowMaskCallbacks.MLSBName);
        end

        % Browsing to TensorFlow files:

        function Control2(callbackContext)
            nnet.pycoexblks.browseToTensorFlowFile(gcb, "folder");
        end

        function Control4(callbackContext)
            nnet.pycoexblks.browseToTensorFlowFile(gcb, "file");
        end

        % The input table:

        function InputTable(callbackContext)
            internal.pycoexblks.updateInputTable(gcb, '');
        end

        function InputNew(callbackContext)
            internal.pycoexblks.updateInputTable(gcb, 'New');
        end

        function InputDelete(callbackContext)
            internal.pycoexblks.updateInputTable(gcb, 'Delete');
        end

        function InputUp(callbackContext)
            internal.pycoexblks.updateInputTable(gcb, 'Up');
        end

        function InputDown(callbackContext)
            internal.pycoexblks.updateInputTable(gcb, 'Down');
        end

        % The output table:

        function OutputTable(callbackContext)
            internal.pycoexblks.updateOutputTable(gcb, '');
        end

        function OutputNew(callbackContext)
            internal.pycoexblks.updateOutputTable(gcb, 'New');
        end

        function OutputDelete(callbackContext)
            internal.pycoexblks.updateOutputTable(gcb, 'Delete');
        end

        function OutputUp(callbackContext)
            internal.pycoexblks.updateOutputTable(gcb, 'Up');
        end

        function OutputDown(callbackContext)
            internal.pycoexblks.updateOutputTable(gcb, 'Down');
        end

        % Pre and Post-processing files:

        function PreprocessControl(callbackContext)
            internal.pycoexblks.browseToPreprocessingFile(gcb);
        end

        function PostprocessControl(callbackContext)
            internal.pycoexblks.browseToPostprocessingFile(gcb);
        end

        
    end
end