% SIGBUILDER is a graphical user interface for building signals using LTPDA
% objects.
%
% CALL: sigBuilder
%       sigBuilder(h) % build the sigBuilder in the figure with handle, h.
%
% M Hewitson 18-10-08
%
% $Id: sigBuilder.m,v 1.2 2011/04/08 08:56:35 hewitson Exp $
%
classdef sigBuilder < handle

  properties
    handle      = [];
    signals     = [];
  end
  properties (SetAccess=private, GetAccess=private)
    Gproperties = [];
    SigSelected = [];
  end
  
  methods
    function mainfig = sigBuilder(varargin)
      % Build the main figure
      mainfig = buildMainfig(mainfig, varargin{:});      
      % Make the GUI visible.
      set(mainfig.handle,'Visible','on')
    end
  end % End public methods

  methods (Static=true)
    % Main figure
    varargout = cb_mainfigClose(varargin);  
    varargout = cb_selectSignalType(varargin);
    varargout = cb_drawControls(varargin);
    varargout = cb_addSignal(varargin);
    varargout = cb_sigListClick(varargin);
    varargout = cb_sigListSelect(varargin);
    varargout = cb_removeSignal(varargin);
    varargout = cb_clearSignals(varargin);
    varargout = cb_exportCommands(varargin);
    varargout = cb_buildSave(varargin);
    varargout = buildSignal(varargin);
    varargout = cb_buildView(varargin);
    varargout = cb_buildExport(varargin);
    varargout = cb_toggleAddState(varargin);
    varargout = cb_addAll(varargin);
    
    function sigs = getSignalTypes
      sigs = {...
        'Sine Wave', 'white noise', 'chirp', 'Gaussian Pulse', ...
        'Square Wave', 'Sawtooth', ...
        'noise generator', ...
        'polynomial', 'custom'};
    end
    
  end
  
  methods (Access = private)    
    varargout = buildMainfig(varargin);
  end
  
  methods (Access = public)
  end
  
end

% END
