3 %>@brief welcome Dialog
6 function varargout = welcome(varargin)
7 % Last Modified by GUIDE v2.5 24-May-2013 20:41:28
9 % Begin initialization code - DO NOT EDIT
11 gui_State =
struct(
'gui_Name', mfilename, ...
12 'gui_Singleton', gui_Singleton, ...
13 'gui_OpeningFcn', @welcome_OpeningFcn, ...
14 'gui_OutputFcn', @welcome_OutputFcn, ...
15 'gui_LayoutFcn', [] , ...
17 if nargin && ischar(varargin{1})
18 gui_State.gui_Callback = str2func(varargin{1});
22 [varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:});
24 gui_mainfcn(gui_State, varargin{:});
26 % End initialization code - DO NOT EDIT
28 % --- Executes just before welcome is made visible.
29 function welcome_OpeningFcn(hObject, eventdata, handles, varargin)
30 % This
function has no output args, see OutputFcn.
31 % hObject handle to figure
32 % eventdata reserved - to be defined in a future version of MATLAB
33 % handles structure with handles and user data (see GUIDATA)
34 % varargin command line arguments to welcome (see VARARGIN)
36 % Update handles structure
37 guidata(hObject, handles);
39 % Determine the position of the dialog - centered on the callback figure
40 %
if available,
else, centered on the screen
41 FigPos=
get(0,
'DefaultFigurePosition');
42 OldUnits =
get(hObject,
'Units');
43 set(hObject,
'Units',
'pixels');
44 OldPos =
get(hObject,
'Position');
46 FigHeight = OldPos(4);
48 % ScreenUnits=
get(0,
'Units');
49 % set(0,
'Units',
'pixels');
50 % ScreenSize=
get(0,
'ScreenSize');
51 % set(0,
'Units',ScreenUnits);
53 % FigPos(1)=1/2*(ScreenSize(3)-FigWidth);
54 % FigPos(2)=2/3*(ScreenSize(4)-FigHeight);
56 GCBFOldUnits =
get(gcbf,
'Units');
57 set(gcbf,
'Units',
'pixels');
58 GCBFPos =
get(gcbf,
'Position');
59 set(gcbf,
'Units',GCBFOldUnits);
60 FigPos(1:2) = [(GCBFPos(1) + GCBFPos(3) / 2) - FigWidth / 2, ...
61 (GCBFPos(2) + GCBFPos(4) / 2) - FigHeight / 2];
63 FigPos(3:4)=[FigWidth FigHeight];
64 set(hObject,
'Position', FigPos);
65 set(hObject,
'Units', OldUnits);
67 % Show a question icon from dialogicons.mat - variables questIconData
70 set(handles.edit2,
'String', [sprintf(
'\n'),
get_cite(0)])
71 set(handles.figure1, 'Name', 'Welcome to IRootLab')
74 set(handles.figure1,'WindowStyle','modal')
77 % UIWAIT makes welcome wait for user response (see UIRESUME)
78 uiwait(handles.figure1);
80 % --- Outputs from this function are returned to the command line.
81 function varargout = welcome_OutputFcn(hObject, eventdata, handles)
82 % varargout cell array for returning output args (see VARARGOUT);
83 % hObject handle to figure
84 % eventdata reserved - to be defined in a future version of MATLAB
85 % handles structure with handles and user data (see GUIDATA)
87 % The figure can be deleted now
88 delete(handles.figure1);
90 % --- Executes on button press in pushbutton1.
92 % hObject handle to pushbutton1 (see GCBO)
93 % eventdata reserved - to be defined in a future version of MATLAB
94 % handles structure with handles and user data (see GUIDATA)
96 handles.output = get(hObject,'String');
98 % Update handles structure
99 guidata(hObject, handles);
101 % Use UIRESUME instead of delete because the OutputFcn needs
102 % to get the updated handles structure.
103 uiresume(handles.figure1);
105 % --- Executes on button press in pushbutton2.
107 % hObject handle to pushbutton2 (see GCBO)
108 % eventdata reserved - to be defined in a future version of MATLAB
109 % handles structure with handles and user data (see GUIDATA)
111 handles.output = get(hObject,'String');
113 % Update handles structure
114 guidata(hObject, handles);
116 % Use UIRESUME instead of delete because the OutputFcn needs
117 % to get the updated handles structure.
118 uiresume(handles.figure1);
121 % --- Executes when user attempts to close figure1.
123 % hObject handle to figure1 (see GCBO)
124 % eventdata reserved - to be defined in a future version of MATLAB
125 % handles structure with handles and user data (see GUIDATA)
127 if isequal(get(handles.figure1, 'waitstatus'), 'waiting')
128 % The GUI is still in UIWAIT, us UIRESUME
129 uiresume(handles.figure1);
131 % The GUI is no longer waiting, just close it
132 delete(handles.figure1);
136 % --- Executes on key press over figure1 with no controls selected.
138 % hObject handle to figure1 (see GCBO)
139 % eventdata reserved - to be defined in a future version of MATLAB
140 % handles structure with handles and user data (see GUIDATA)
142 % Check for "enter" or "escape"
143 if isequal(get(hObject,'CurrentKey'),'escape')
144 % User said no by hitting escape
145 handles.output = 'No';
147 % Update handles structure
148 guidata(hObject, handles);
150 uiresume(handles.figure1);
153 if isequal(get(hObject,'CurrentKey'),'return')
154 uiresume(handles.figure1);
158 % --- Executes on button press in pushbutton3.
159 function pushbutton3_Callback(hObject, eventdata, handles)
160 uiresume(handles.figure1)
function edit2_Callback(in hObject, in eventdata, in handles)
function figure1_KeyPressFcn(in hObject, in eventdata, in handles)
function figure1_CloseRequestFcn(in hObject, in eventdata, in handles)
function get_cite(in flagHref)
function edit2_CreateFcn(in hObject, in eventdata, in handles)
function pushbutton1_Callback(in hObject, in eventdata, in handles)
function pushbutton2_Callback(in hObject, in eventdata, in handles)