Home > vbmeg > functions > gui > project_mgr_dir > create_new_project.m

create_new_project

PURPOSE ^

This function launch the gui for making new project.

SYNOPSIS ^

function [cancelled, err, project_filename] = create_new_project

DESCRIPTION ^

 This function launch the gui for making new project.
 [USAGE]
    [cancelled, err, project_filename] = create_new_project('init');
 [IN]
    none
 [OUT]
    cancelled : true(create project cancelled.) or false.
    err       : true(error occured.) or false.
    project_filename : created new project file(absolute path).

 Copyright (C) 2011, ATR All Rights Reserved.
 License : New BSD License(see VBMEG_LICENSE.txt)

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function [cancelled, err, project_filename] = create_new_project
0002 % This function launch the gui for making new project.
0003 % [USAGE]
0004 %    [cancelled, err, project_filename] = create_new_project('init');
0005 % [IN]
0006 %    none
0007 % [OUT]
0008 %    cancelled : true(create project cancelled.) or false.
0009 %    err       : true(error occured.) or false.
0010 %    project_filename : created new project file(absolute path).
0011 %
0012 % Copyright (C) 2011, ATR All Rights Reserved.
0013 % License : New BSD License(see VBMEG_LICENSE.txt)
0014 
0015 fig      = openfig(mfilename);
0016 H        = guihandles(fig);
0017 H.figure = fig;
0018 
0019 % init data
0020 data = struct;
0021 data.cancelled = false;
0022 data.err = false;
0023 data.project_filename = [];
0024 data.H = H;
0025 
0026 % save data to figure.
0027 guidata(fig, data);
0028 
0029 % SetFocus
0030 if vb_matlab_version >= 7
0031     uicontrol(H.project_name_edit);
0032 end
0033 
0034 % wait for figure visible off
0035 waitfor(fig, 'Visible', 'off'); %%% visible off ==> waitfor cancelled.
0036 
0037 % load data to figure.
0038 data = guidata(fig);
0039 
0040 % set return value
0041 cancelled        = data.cancelled;
0042 err              = data.err;
0043 project_filename = data.project_filename;
0044 
0045 % delete figure
0046 delete(fig);

Generated on Mon 22-May-2023 06:53:56 by m2html © 2005