You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: ui_event_types.m
    path of file: ./repos/malini/Codes/deconvolution - model/spm8/marsbar-0.44/@mardo
    
    the code of the file until where you have to start completion: function [D, ic, status] = ui_event_types(D)
% ui method for selection / editing of event types
% FORMAT [D, ic, status] = ui_event_typ
    
function [F, hDone, hList, hEdit] = sf_start_window(D)
% Put up window and set up callbacks

% Window tag
w_tag = 'ui_event_types';
  
% Close any event_types windows currently open
close(findobj('Tag', w_tag))
  
%-Generic CallBack code to get embedded object 
cb = ['et_D = get(findobj(''Tag'', ''' w_tag '''),''UserData''); '];

%-Create window, compute scaling for screen size
%-----------------------------------------------------------------------
WS = spm('WinScale');				%-Window scaling factors
FS = spm('FontSizes');				%-Scaled font sizes
PF = spm_platform('fonts');			%-Font names (for this platform)
S0 = get(0,'ScreenSize');			%-Screen size

% Window size, button size, position, in WS units
win_sz      = [400 300];
ratio_dor   = (1 + sqrt(5))/2;

% Button sizes and positions
n_buttons   = 5;
button_sz_x = 75;
button_border = [12 12]; 
button_sz   = [button_sz_x button_sz_x / ratio_dor];
button_x    = win_sz(1) - button_sz(1) - button_border(1);
l_b         = button_border(2);
h_b         = win_sz(2) - button_border(2) - button_sz(2);
gap_b       = (h_b - l_b) / (n_buttons-1);
buttons_y   = l_b:gap_b:h_b;

% Event list size, position
elist_border = button_border;
elist_pos    = elist_border;
elist_sz(1)  = button_x - elist_border(1)*2;
elist_sz(2)  = win_sz(2) - elist_border(2)*2;

F = figure('IntegerHandle','off',...
	   'Tag', w_tag,...
	   'UserData', D, ...
	   'Name','Event type', ...
	   'NumberTitle','off',...
	   'Position',[S0(3)/2,S0(4)/2,0,0] + [-250,-200, win_sz].*WS,...
	   'Resize','off',...
	   'Color',[1 1 1]*.7,...
	   'MenuBar','none',...
	   'DefaultTextColor','k',...
	   'DefaultTextFontName',PF.helvetica,...
	   'DefaultTextFontSize',FS(10),...
	   'DefaultAxesFontName',PF.helvetica,...
	   'DefaultUicontrolBackgroundColor',[1 1 1]*.7,...
	   'DefaultUicontrolFontName',PF.helvetica,...
	   'DefaultUicontrolFontSize',FS(10),...
	   'DefaultUicontrolInterruptible','on',...
	   'Colormap',gray(64),...
	   'Rend