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.loadRfb();' ...
);
uimenu( ...
    loadHandle, ...
    'Label', 'Interim file', ...
    'Callback', 'artoa.controller.file.loadInterim();' ...
);
uimenu( ...
    loadHandle, ...
    'Label', 'SoSo file', ...
    'Callback', 'artoa.controller.loadSoundSourceFile();' ...
);

% SAVE
saveHandle = uimenu(artoaGui.main.menus.file, 'Label', 'Save');
uimenu( ...
    saveHandle, ...
    'Label', 'RIC file', ...
    'Callback', 'artoa.controller.saveRic();', ...
    'Enable', 'off' ...
);

uimenu( ...
    saveHandle, ...
    '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' ...
);

% TOA
%toaHandle = uimenu(artoaGui.main.menus.edit, 'Label', 'Time of Arrivals', '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();' ...
);

%% Initialize view menu

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

artoaGui.main.menus.viewShowAllPoints = uimenu( ...
    artoaGui.main.menus.view, ...
    'Label', 'Show all data points', ...
    'Callback', 'artoa.controller.switchViewShowAll();' ...
);


end

