function control = parameter__control__create(parameter, context)

% MORPHOLOGICAL_BASE > parameter__control__create

%------------------------------
% MASK PLOT
%------------------------------

control(1) = control_create( ...
	'name','mask_plot', ...
	'width',1, ...
	'align','center', ...
	'lines',5, ...
	'width',3/4, ...
	'space',1.25, ...
	'align','left', ...
	'label',0, ...
	'style','axes' ...
);

control(end + 1) = control_create( ...
	'space',0.5, ...
	'style','separator' ...
);

%------------------------------
% STYLE
%------------------------------

types = se_types;

value = find(strcmp(types,parameter.style));

control(end + 1) = control_create( ...
	'name','style', ...
	'style','popup', ...
	'onload',1, ...
	'space',1.25, ...
	'string',types, ... 
	'value',value ...
);

control(end + 1) = control_create( ...
	'space',1.25, ...
	'style','separator' ...
);

%------------------------------
% WIDTH
%------------------------------

value = parameter.width;

control(end + 1) = control_create( ...
	'name','width', ...
	'style','slider', ...
	'type','integer', ...
	'units','pixels', ...
	'min',0, ...
	'max',32, ...
	'sliderstep',[1/32,2/32], ...
	'value',value ...
);

%------------------------------
% HEIGHT
%------------------------------

value = parameter.height;

control(end + 1) = control_create( ...
	'name','height', ...
	'style','slider', ...
	'type','integer', ...
	'units','pixels', ...
	'min',0, ...
	'max',32, ...
	'sliderstep',[1/32,2/32], ...
	'value',value ...
);

%------------------------------
% LINK
%------------------------------

value = 0;

control(end + 1) = control_create( ...
	'name','link', ...
	'style','checkbox', ...
	'space',1.25, ...
	'value',value, ...
	'tooltip',['Link filter width and height'] ...
);
