3 %> @brief Report Dialog Box
4 %> @image html Screenshot-reportdlg.png
5 %> Visualization of
object report. Called when the user chooses <em>Visualize->Report</em>
8 function varargout = reportdlg(varargin)
10 % Edit the above text to modify the response to help reportdlg
12 % Last Modified by GUIDE v2.5 09-Feb-2011 17:03:12
14 % Begin initialization code - DO NOT EDIT
16 gui_State =
struct(
'gui_Name', mfilename, ...
17 'gui_Singleton', gui_Singleton, ...
18 'gui_OpeningFcn', @reportdlg_OpeningFcn, ...
19 'gui_OutputFcn', @reportdlg_OutputFcn, ...
20 'gui_LayoutFcn', [] , ...
22 if nargin && ischar(varargin{1})
23 gui_State.gui_Callback = str2func(varargin{1});
27 [varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:});
29 gui_mainfcn(gui_State, varargin{:});
31 % End initialization code - DO NOT EDIT
34 % --- Executes just before reportdlg is made visible.
35 function reportdlg_OpeningFcn(hObject, eventdata, handles, varargin)
37 % Choose
default command line output
for reportdlg
38 handles.output = hObject;
39 % Update handles structure
40 guidata(hObject, handles);
42 if numel(varargin) > 0
43 set(handles.editText,
'String', varargin{1});
45 set(handles.editText,
'String',
'?');
51 % --- Outputs from
this function are returned to the command line.
52 function varargout = reportdlg_OutputFcn(hObject, eventdata, handles)
53 varargout{1} = handles.output;
56 % --- Executes on button press in pushbutton_save.
57 function pushbutton_save_Callback(hObject, eventdata, handles)
59 [name, path, filterindex] = uiputfile({
'*.txt',
'MATLAB source file(*.m)';
'*.*',
'All files'},
'Save as',
'log.txt');
61 filename = fullfile(path, name);
62 h = fopen(filename,
'w');
63 fwrite(h,
get(handles.editText,
'string'));
65 irverbose([
'File ''' filename
''' saved successfully!
'], 1);
68 irerrordlg(ME.message, 'Error saving file!
');
71 function editText_Callback(hObject, eventdata, handles)
72 % hObject handle to editText (see GCBO)
73 % eventdata reserved - to be defined in a future version of MATLAB
74 % handles structure with handles and user data (see GUIDATA)
76 % Hints: get(hObject,'String
') returns contents of editText as text
77 % str2double(get(hObject,'String
')) returns contents of editText as a double
80 % --- Executes during object creation, after setting all properties.
81 function editText_CreateFcn(hObject, eventdata, handles)
82 % hObject handle to editText (see GCBO)
83 % eventdata reserved - to be defined in a future version of MATLAB
84 % handles empty - handles not created until after all CreateFcns called
86 % Hint: edit controls usually have a white background on Windows.
87 % See ISPC and COMPUTER.
88 if ispc && isequal(get(hObject,'BackgroundColor
'), get(0,'defaultUicontrolBackgroundColor
'))
89 set(hObject,'BackgroundColor
','white
');
function irverbose(in s, in level)
function gui_set_position(in hObject)