function h = sisotool
%SISOTOOL  Constructor for SISO Tool GUI database.

%   Author(s): P. Gahinet
%   Copyright 1986-2000 The MathWorks, Inc. 
%   $Revision: 1.4 $ $Date: 2000/06/14 20:22:16 $


if nargout==0
    % Register class 
    c = schema.class(findpackage('sisogui'),'sisotool');
    
    % Define public properties
    hv = schema.prop(c,'DataViews','mxArray');   % Data views (handles)
    schema.prop(c,'Figure','handle');            % Handle of host figure
    hg = schema.prop(c,'HG','mxArray');          % HG objects (struct)
    schema.prop(c,'History','mxArray');          % History text
    schema.prop(c,'LoopData','handle');          % Model database
    schema.prop(c,'PlotEditors','handle vector');% Graphical editor handles
    schema.prop(c,'TextEditors','handle vector');% Text editor handles
    schema.prop(c,'Status','String');            % Status text
    schema.prop(c,'Preferences','handle');       % Tool-wide preferences
     
    % Access and defaults
    set(hv,'AccessFlags.Init','on','FactoryValue',zeros(0,1));
    set(hg,'AccessFlags.PublicSet','off');
    
    % Define private properties 
    p1 = schema.prop(c,'GlobalMode','String');       % Global edit mode
    p2 = schema.prop(c,'Listeners','handle vector'); % Listeners
    set(p1,'AccessFlags.Init','on','FactoryValue','off');
    set(p2,'AccessFlags.PublicGet','off','AccessFlags.PublicSet','off');
    
    % Events
    schema.event(c,'ShowPZEditor');       % Request to open PZ editor
    schema.event(c,'ShowData');           % Request to show data
    schema.event(c,'MoveGain');           % Dynamic gain update (start/finish)
    schema.event(c,'MovePZ');             % Dynamic pole/zero update (start/finish)
    schema.event(c,'StatusChanged');      % Notifies of status changed
    schema.event(c,'LocalModeChange');    % Notifies of mode change in editor
    
else
    % Create class instance
    h = sisogui.sisotool;
    
end
