-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest.cxx
293 lines (277 loc) · 13.3 KB
/
test.cxx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
// generated by Fast Light User Interface Designer (fluid) version 1.0303
#include "test.h"
void userAction(Fl_Widget* target);
void userAction(selection sel, Ca_Canvas* sender);
void mark_data_dirty();
void reduce_all();
void UserInterface::cb_main_window_i(Fl_Double_Window*, void*) {
userAction(main_window);
}
void UserInterface::cb_main_window(Fl_Double_Window* o, void* v) {
((UserInterface*)(o->user_data()))->cb_main_window_i(o,v);
}
void UserInterface::cb_btn_open_run_file_i(Fl_Button*, void*) {
userAction(btn_open_run_file);
}
void UserInterface::cb_btn_open_run_file(Fl_Button* o, void* v) {
((UserInterface*)(o->parent()->parent()->user_data()))->cb_btn_open_run_file_i(o,v);
}
void UserInterface::cb_btn_save_run_file_i(Fl_Button*, void*) {
userAction(btn_save_run_file);
}
void UserInterface::cb_btn_save_run_file(Fl_Button* o, void* v) {
((UserInterface*)(o->parent()->parent()->user_data()))->cb_btn_save_run_file_i(o,v);
}
void UserInterface::cb_btn_preview_run_file_i(Fl_Button*, void*) {
userAction(btn_preview_run_file);
}
void UserInterface::cb_btn_preview_run_file(Fl_Button* o, void* v) {
((UserInterface*)(o->parent()->parent()->user_data()))->cb_btn_preview_run_file_i(o,v);
}
void UserInterface::cb_btn_revert_run_file_i(Fl_Button*, void*) {
userAction(btn_revert_run_file);
}
void UserInterface::cb_btn_revert_run_file(Fl_Button* o, void* v) {
((UserInterface*)(o->parent()->parent()->user_data()))->cb_btn_revert_run_file_i(o,v);
}
void UserInterface::cb_btn_new_files_i(Fl_Button*, void*) {
userAction(btn_new_files);
}
void UserInterface::cb_btn_new_files(Fl_Button* o, void* v) {
((UserInterface*)(o->parent()->parent()->user_data()))->cb_btn_new_files_i(o,v);
}
void UserInterface::cb_btn_change_model_dir_i(Fl_Button*, void*) {
userAction(btn_change_model_dir);
}
void UserInterface::cb_btn_change_model_dir(Fl_Button* o, void* v) {
((UserInterface*)(o->parent()->parent()->user_data()))->cb_btn_change_model_dir_i(o,v);
}
void UserInterface::cb_btn_change_settings_dir_i(Fl_Button*, void*) {
userAction(btn_change_settings_dir);
}
void UserInterface::cb_btn_change_settings_dir(Fl_Button* o, void* v) {
((UserInterface*)(o->parent()->parent()->user_data()))->cb_btn_change_settings_dir_i(o,v);
}
void UserInterface::cb_btn_change_output_dir_i(Fl_Button*, void*) {
userAction(btn_change_output_dir);
}
void UserInterface::cb_btn_change_output_dir(Fl_Button* o, void* v) {
((UserInterface*)(o->parent()->parent()->user_data()))->cb_btn_change_output_dir_i(o,v);
}
void UserInterface::cb_txedt_new_output_name_i(Fl_Text_Editor*, void*) {
mark_data_dirty();
}
void UserInterface::cb_txedt_new_output_name(Fl_Text_Editor* o, void* v) {
((UserInterface*)(o->parent()->parent()->user_data()))->cb_txedt_new_output_name_i(o,v);
}
void UserInterface::cb_btn_save_new_files_i(Fl_Button*, void*) {
userAction(btn_save_new_files);
}
void UserInterface::cb_btn_save_new_files(Fl_Button* o, void* v) {
((UserInterface*)(o->parent()->user_data()))->cb_btn_save_new_files_i(o,v);
}
void UserInterface::cb_btn_revert_new_files_i(Fl_Button*, void*) {
userAction(btn_revert_new_files);
}
void UserInterface::cb_btn_revert_new_files(Fl_Button* o, void* v) {
((UserInterface*)(o->parent()->user_data()))->cb_btn_revert_new_files_i(o,v);
}
Fl_Double_Window* UserInterface::make_window() {
{ main_window = new Fl_Double_Window(1225, 560, "Tritium Diffusion Software - v0.1 - Chris Stuart");
main_window->callback((Fl_Callback*)cb_main_window, (void*)(this));
main_window->align(Fl_Align(FL_ALIGN_CLIP|FL_ALIGN_INSIDE));
{ grp_run_file = new Fl_Group(825, 20, 385, 90);
grp_run_file->box(FL_DOWN_BOX);
{ txdsp_run_file_name = new Fl_Text_Display(835, 43, 265, 23, "Current run file:");
txdsp_run_file_name->box(FL_UP_FRAME);
txdsp_run_file_name->align(Fl_Align(FL_ALIGN_TOP_LEFT));
txdsp_run_file_name->scrollbar_align(0);
txdsp_run_file_name->scroll(0,1);
} // Fl_Text_Display* txdsp_run_file_name
{ btn_open_run_file = new Fl_Button(1105, 42, 98, 25, "Open...");
btn_open_run_file->callback((Fl_Callback*)cb_btn_open_run_file);
} // Fl_Button* btn_open_run_file
{ btn_save_run_file = new Fl_Button(1073, 75, 130, 25, "Save Changes");
btn_save_run_file->callback((Fl_Callback*)cb_btn_save_run_file);
} // Fl_Button* btn_save_run_file
{ btn_preview_run_file = new Fl_Button(973, 79, 95, 21, "Preview");
btn_preview_run_file->callback((Fl_Callback*)cb_btn_preview_run_file);
} // Fl_Button* btn_preview_run_file
{ btn_revert_run_file = new Fl_Button(893, 79, 75, 21, "Revert");
btn_revert_run_file->callback((Fl_Callback*)cb_btn_revert_run_file);
} // Fl_Button* btn_revert_run_file
grp_run_file->end();
} // Fl_Group* grp_run_file
{ grp_current_files = new Fl_Group(825, 385, 385, 120, "Current files");
grp_current_files->box(FL_DOWN_FRAME);
grp_current_files->align(Fl_Align(FL_ALIGN_TOP_LEFT));
{ txdsp_model_dir = new Fl_Text_Display(920, 400, 100, 18, "Model Directory");
txdsp_model_dir->box(FL_THIN_DOWN_FRAME);
txdsp_model_dir->color(FL_BACKGROUND_COLOR);
txdsp_model_dir->labelsize(9);
txdsp_model_dir->textsize(10);
txdsp_model_dir->align(Fl_Align(FL_ALIGN_LEFT));
txdsp_model_dir->when(FL_WHEN_RELEASE_ALWAYS);
txdsp_model_dir->hide_cursor();
txdsp_model_dir->scrollbar_align(FL_ALIGN_CLIP);
} // Fl_Text_Display* txdsp_model_dir
{ txdsp_model_name = new Fl_Text_Display(1100, 400, 100, 18, "Model Name");
txdsp_model_name->box(FL_THIN_DOWN_FRAME);
txdsp_model_name->color(FL_BACKGROUND_COLOR);
txdsp_model_name->labelsize(9);
txdsp_model_name->textsize(10);
txdsp_model_name->align(Fl_Align(FL_ALIGN_LEFT));
txdsp_model_name->hide_cursor();
txdsp_model_name->scrollbar_align(FL_ALIGN_CLIP);
} // Fl_Text_Display* txdsp_model_name
{ txdsp_settings_dir = new Fl_Text_Display(920, 422, 100, 18, "Settings Directory");
txdsp_settings_dir->box(FL_THIN_DOWN_FRAME);
txdsp_settings_dir->color(FL_BACKGROUND_COLOR);
txdsp_settings_dir->labelsize(9);
txdsp_settings_dir->textsize(10);
txdsp_settings_dir->align(Fl_Align(FL_ALIGN_LEFT));
txdsp_settings_dir->hide_cursor();
txdsp_settings_dir->scrollbar_align(FL_ALIGN_CLIP);
} // Fl_Text_Display* txdsp_settings_dir
{ txdsp_settings_name = new Fl_Text_Display(1100, 422, 100, 18, "Settings Name");
txdsp_settings_name->box(FL_THIN_DOWN_FRAME);
txdsp_settings_name->color(FL_BACKGROUND_COLOR);
txdsp_settings_name->labelsize(9);
txdsp_settings_name->textsize(10);
txdsp_settings_name->align(Fl_Align(FL_ALIGN_LEFT));
txdsp_settings_name->hide_cursor();
txdsp_settings_name->scrollbar_align(FL_ALIGN_CLIP);
} // Fl_Text_Display* txdsp_settings_name
{ txdsp_output_dir = new Fl_Text_Display(920, 444, 100, 18, "Output Directory");
txdsp_output_dir->box(FL_THIN_DOWN_FRAME);
txdsp_output_dir->color(FL_BACKGROUND_COLOR);
txdsp_output_dir->labelsize(9);
txdsp_output_dir->textsize(10);
txdsp_output_dir->align(Fl_Align(FL_ALIGN_LEFT));
txdsp_output_dir->hide_cursor();
txdsp_output_dir->scrollbar_align(FL_ALIGN_CLIP);
} // Fl_Text_Display* txdsp_output_dir
{ txdsp_output_name = new Fl_Text_Display(1100, 444, 100, 18, "Output Name");
txdsp_output_name->box(FL_THIN_DOWN_FRAME);
txdsp_output_name->color(FL_BACKGROUND_COLOR);
txdsp_output_name->labelsize(9);
txdsp_output_name->textsize(10);
txdsp_output_name->align(Fl_Align(FL_ALIGN_LEFT));
txdsp_output_name->hide_cursor();
txdsp_output_name->scrollbar_align(FL_ALIGN_CLIP);
} // Fl_Text_Display* txdsp_output_name
{ btn_new_files = new Fl_Button(945, 470, 190, 25, "New files...");
btn_new_files->callback((Fl_Callback*)cb_btn_new_files);
} // Fl_Button* btn_new_files
grp_current_files->end();
} // Fl_Group* grp_current_files
{ txedt_run_file_contents = new Fl_Text_Editor(825, 129, 385, 221);
txedt_run_file_contents->box(FL_DOWN_BOX);
txedt_run_file_contents->textfont(4);
txedt_run_file_contents->textsize(9);
txedt_run_file_contents->cursor_style(Fl_Text_Display::NORMAL_CURSOR);
} // Fl_Text_Editor* txedt_run_file_contents
{ grp_simulation = new Fl_Group(25, 20, 790, 485);
grp_simulation->box(FL_DOWN_BOX);
{ brwsr_run_output = new Fl_Browser(35, 45, 770, 320, "Console Output:");
brwsr_run_output->align(Fl_Align(FL_ALIGN_TOP_LEFT));
} // Fl_Browser* brwsr_run_output
grp_simulation->end();
} // Fl_Group* grp_simulation
{ grp_status_bar = new Fl_Group(-5, 532, 1235, 36);
grp_status_bar->box(FL_ENGRAVED_FRAME);
{ txdsp_status_bar = new Fl_Text_Display(5, 537, 1097, 19);
txdsp_status_bar->box(FL_THIN_DOWN_FRAME);
txdsp_status_bar->color(FL_BACKGROUND_COLOR);
txdsp_status_bar->textfont(13);
txdsp_status_bar->textsize(11);
txdsp_status_bar->deactivate();
} // Fl_Text_Display* txdsp_status_bar
{ txdsp_data_dirty = new Fl_Text_Display(1105, 537, 117, 19);
txdsp_data_dirty->box(FL_THIN_DOWN_FRAME);
txdsp_data_dirty->color(FL_BACKGROUND_COLOR);
txdsp_data_dirty->textfont(13);
txdsp_data_dirty->textsize(11);
txdsp_data_dirty->deactivate();
} // Fl_Text_Display* txdsp_data_dirty
grp_status_bar->end();
} // Fl_Group* grp_status_bar
main_window->size_range(1225, 560, 1225, 560);
main_window->end();
} // Fl_Double_Window* main_window
{ wndw_run_file = new Fl_Double_Window(575, 365, "View Run File");
wndw_run_file->user_data((void*)(this));
{ brwsr_run_file_preview = new Fl_Browser(0, 0, 575, 365);
brwsr_run_file_preview->type(1);
brwsr_run_file_preview->textfont(4);
brwsr_run_file_preview->textsize(13);
} // Fl_Browser* brwsr_run_file_preview
wndw_run_file->end();
} // Fl_Double_Window* wndw_run_file
{ wndw_new_files = new Fl_Double_Window(540, 430, "Change Simulation Files");
wndw_new_files->user_data((void*)(this));
{ grp_new_model = new Fl_Group(15, 30, 250, 285, "Model");
grp_new_model->box(FL_THIN_DOWN_BOX);
grp_new_model->align(Fl_Align(FL_ALIGN_TOP_LEFT));
{ txdsp_new_model_dir = new Fl_Text_Display(27, 43, 190, 25);
txdsp_new_model_dir->color(FL_BACKGROUND_COLOR);
txdsp_new_model_dir->align(Fl_Align(FL_ALIGN_TOP_LEFT));
} // Fl_Text_Display* txdsp_new_model_dir
{ btn_change_model_dir = new Fl_Button(224, 43, 30, 25, "...");
btn_change_model_dir->callback((Fl_Callback*)cb_btn_change_model_dir);
} // Fl_Button* btn_change_model_dir
{ brwsr_model_name = new Fl_Browser(27, 78, 228, 224);
} // Fl_Browser* brwsr_model_name
grp_new_model->end();
} // Fl_Group* grp_new_model
{ grp_new_settings = new Fl_Group(280, 30, 250, 285, "Settings");
grp_new_settings->box(FL_THIN_DOWN_BOX);
grp_new_settings->align(Fl_Align(FL_ALIGN_TOP_LEFT));
{ txdsp_new_settings_dir = new Fl_Text_Display(292, 43, 190, 25);
txdsp_new_settings_dir->color(FL_BACKGROUND_COLOR);
txdsp_new_settings_dir->align(Fl_Align(FL_ALIGN_TOP_LEFT));
} // Fl_Text_Display* txdsp_new_settings_dir
{ btn_change_settings_dir = new Fl_Button(489, 43, 30, 25, "...");
btn_change_settings_dir->callback((Fl_Callback*)cb_btn_change_settings_dir);
} // Fl_Button* btn_change_settings_dir
{ brwsr_settings_name = new Fl_Browser(292, 78, 228, 224);
} // Fl_Browser* brwsr_settings_name
grp_new_settings->end();
} // Fl_Group* grp_new_settings
{ grp_new_output = new Fl_Group(15, 340, 340, 80, "Output");
grp_new_output->box(FL_THIN_DOWN_BOX);
grp_new_output->align(Fl_Align(FL_ALIGN_TOP_LEFT));
{ txdsp_new_output_dir = new Fl_Text_Display(27, 353, 281, 25);
txdsp_new_output_dir->color(FL_BACKGROUND_COLOR);
txdsp_new_output_dir->align(Fl_Align(FL_ALIGN_TOP_LEFT));
} // Fl_Text_Display* txdsp_new_output_dir
{ btn_change_output_dir = new Fl_Button(315, 353, 30, 25, "...");
btn_change_output_dir->callback((Fl_Callback*)cb_btn_change_output_dir);
} // Fl_Button* btn_change_output_dir
{ txedt_new_output_name = new Fl_Text_Editor(27, 385, 320, 25);
txedt_new_output_name->box(FL_DOWN_BOX);
txedt_new_output_name->callback((Fl_Callback*)cb_txedt_new_output_name);
} // Fl_Text_Editor* txedt_new_output_name
grp_new_output->end();
} // Fl_Group* grp_new_output
{ btn_save_new_files = new Fl_Button(400, 350, 130, 29, "Close");
btn_save_new_files->callback((Fl_Callback*)cb_btn_save_new_files);
} // Fl_Button* btn_save_new_files
{ btn_revert_new_files = new Fl_Button(425, 388, 105, 25, "Revert");
btn_revert_new_files->labelsize(13);
btn_revert_new_files->callback((Fl_Callback*)cb_btn_revert_new_files);
} // Fl_Button* btn_revert_new_files
wndw_new_files->set_modal();
wndw_new_files->end();
} // Fl_Double_Window* wndw_new_files
return wndw_new_files;
}
void UserInterface::show() {
make_window();
//ChnButton[0]=Chn0;
main_window->show();
}
void UserInterface::start_showing_window() {
Fl::scheme("gtk+");
show();
}