function [ ] = main()
%MAIN Contains the definition of main ARTOA4 gui.

global artoaGui;

%% Initialize main window

artoaGui.figures.main = figure( ...
    'Name', 'ARTOA 4', ...
    'NumberTitle', 'off', ...
    'Color', 'white', ...
    'MenuBar', 'none' ...
);

set(artoaGui.figures.main, 'CloseRequestFcn', 'artoa.controller.quit();');

%% Initialize file menu
artoaGui.main.menus = struct();

artoaGui.main.menus.file = uimenu(artoaGui.figures.main, 'Label', 'File');
% LOAD
loadHandle = uimenu(artoaGui.main.menus.file, 'Label', 'Load');
uimenu( ...
    loadHandle, ...
    'Label', 'ARGOS file', ...%'Callback', 'artoa.controller.loadArgos' ...
    'Enable', 'off' ...
);
uimenu( ...
    loadHandle, ...
    'Label', 'RFB file', ...
    'Callback', 'artoa.controller.file.loadRfb();' ...
);
uimenu( ...
    loadHandle, ...
    'Label', 'Interim file', ...
    'Callback', 'artoa.controller.file.loadInterim();' ...
);
uimenu( ...
    loadHandle, ...
    'Label', 'SoSo file', ...
    'Callback', 'artoa.controller.file.loadSoundSourceFile();' ...
);


% SAVE
artoaGui.main.menus.fileSave = uimenu( ...
    artoaGui.main.menus.file, ...
    'Label', 'Save', ...
    'Enable', 'off' ...
);

uimenu( ...
    artoaGui.main.menus.fileSave, ...
    'Label', 'RIC file', ...
    'Callback', 'artoa.controller.saveRic();', ...
    'Enable', 'off' ...
);

uimenu( ...
    artoaGui.main.menus.fileSave, ...
    'Label', 'Interim file', ...
    'Callback', 'artoa.controller.file.saveInterim();' ...
);

% QUIT
artoaGui.main.menus.fileQuit = uimenu( ...
    artoaGui.main.menus.file, ...
    'Label', 'Quit', ...
    'Callback', 'artoa.controller.quit();' ...
);

%% Initialize edit menu

artoaGui.main.menus.edit = uimenu( ...
    artoaGui.figures.main, ...
    'Label', 'Edit', ...
    'Enable', 'off' ...
);

% TEMPERATURE
artoaGui.main.menus.editTemperature = uimenu( ...
    artoaGui.main.menus.edit, ...
    'Label', 'Temperature', ...
    'Callback', 'artoa.controller.edit.temperature.open();' ...
);

% PRESSURE
artoaGui.main.menus.editPressure = uimenu( ...
    artoaGui.main.menus.edit, ...
    'Label', 'Pressure', ...
    'Callback', 'artoa.controller.edit.pressure.open();' ...
);

% TIME OF ARRIVAL
artoaGui.main.menus.editTimeOfArrival = uimenu( ...
    artoaGui.main.menus.edit, ...
    'Label', 'Time of arrival', ...
    'Callback', 'artoa.controller.edit.timeOfArrival.open();', ...
    'Separator', 'on', ...
    'Enable', 'off' ...
);

%% Initialize track menu

artoaGui.main.menus.track = uimenu( ...
    artoaGui.figures.main, ...
    'Label', 'Track', ...
    'Enable', 'off' ...
);

% TRACK PARAMETER
artoaGui.main.menus.trackParameter = uimenu( ...
    artoaGui.main.menus.track, ...
    'Label', 'Track Parameter', ...
    'Callback', 'artoa.controller.track.parameter.open();' ...
);

%% Initialize view menu

artoaGui.main.menus.view = uimenu( ...
    artoaGui.figures.main, ...
    'Label', 'View', ...
    'Enable', 'on' ...
);

artoaGui.main.menus.viewHideDeletedDataPoints = uimenu( ...
    artoaGui.main.menus.view, ...
    'Label', 'Hide deleted data points', ...
    'Callback', 'artoa.controller.switchHideDeletedPoints();' ...
);


end

