160
166
Context_Item menu_geometry_elementary_add[] = {
161
{"0Geometry>Elementary>Add", NULL} ,
167
{"0Geometry>Elementary>Add", NULL} ,
162
168
{"New", (Fl_Callback *)geometry_elementary_add_new_cb} ,
163
{"Translate", (Fl_Callback *)geometry_elementary_add_translate_cb} ,
164
{"Rotate", (Fl_Callback *)geometry_elementary_add_rotate_cb} ,
165
{"Scale", (Fl_Callback *)geometry_elementary_add_scale_cb} ,
166
{"Symmetry", (Fl_Callback *)geometry_elementary_add_symmetry_cb} ,
169
{"Translate", (Fl_Callback *)geometry_elementary_add_translate_cb} ,
170
{"Rotate", (Fl_Callback *)geometry_elementary_add_rotate_cb} ,
171
{"Scale", (Fl_Callback *)geometry_elementary_add_scale_cb} ,
172
{"Symmetry", (Fl_Callback *)geometry_elementary_add_symmetry_cb} ,
169
175
Context_Item menu_geometry_elementary_add_new[] = {
170
{"0Geometry>Elementary>Add>New", NULL} ,
176
{"0Geometry>Elementary>Add>New", NULL} ,
171
177
{"Parameter", (Fl_Callback *)geometry_elementary_add_new_parameter_cb} ,
172
{"Point", (Fl_Callback *)geometry_elementary_add_new_point_cb} ,
173
{"Straight line", (Fl_Callback *)geometry_elementary_add_new_line_cb} ,
174
{"Spline", (Fl_Callback *)geometry_elementary_add_new_spline_cb} ,
175
{"B-Spline", (Fl_Callback *)geometry_elementary_add_new_bspline_cb} ,
176
{"Circle arc", (Fl_Callback *)geometry_elementary_add_new_circle_cb} ,
177
{"Ellipse arc", (Fl_Callback *)geometry_elementary_add_new_ellipse_cb} ,
178
{"Plane surface", (Fl_Callback *)geometry_elementary_add_new_planesurface_cb} ,
179
{"Ruled surface", (Fl_Callback *)geometry_elementary_add_new_ruledsurface_cb} ,
180
{"Volume", (Fl_Callback *)geometry_elementary_add_new_volume_cb} ,
178
{"Point", (Fl_Callback *)geometry_elementary_add_new_point_cb} ,
179
{"Straight line", (Fl_Callback *)geometry_elementary_add_new_line_cb} ,
180
{"Spline", (Fl_Callback *)geometry_elementary_add_new_spline_cb} ,
181
{"B-Spline", (Fl_Callback *)geometry_elementary_add_new_bspline_cb} ,
182
{"Circle arc", (Fl_Callback *)geometry_elementary_add_new_circle_cb} ,
183
{"Ellipse arc", (Fl_Callback *)geometry_elementary_add_new_ellipse_cb} ,
184
{"Plane surface", (Fl_Callback *)geometry_elementary_add_new_planesurface_cb} ,
185
{"Ruled surface", (Fl_Callback *)geometry_elementary_add_new_ruledsurface_cb} ,
186
{"Volume", (Fl_Callback *)geometry_elementary_add_new_volume_cb} ,
183
189
Context_Item menu_geometry_elementary_add_translate[] = {
184
{"0Geometry>Elementary>Add>Translate", NULL} ,
190
{"0Geometry>Elementary>Add>Translate", NULL} ,
185
191
{"Point", (Fl_Callback *)geometry_elementary_add_translate_point_cb} ,
186
{"Line", (Fl_Callback *)geometry_elementary_add_translate_line_cb} ,
187
{"Surface", (Fl_Callback *)geometry_elementary_add_translate_surface_cb} ,
192
{"Line", (Fl_Callback *)geometry_elementary_add_translate_line_cb} ,
193
{"Surface", (Fl_Callback *)geometry_elementary_add_translate_surface_cb} ,
190
196
Context_Item menu_geometry_elementary_add_rotate[] = {
191
{"0Geometry>Elementary>Add>Rotate", NULL} ,
197
{"0Geometry>Elementary>Add>Rotate", NULL} ,
192
198
{"Point", (Fl_Callback *)geometry_elementary_add_rotate_point_cb} ,
193
{"Line", (Fl_Callback *)geometry_elementary_add_rotate_line_cb} ,
194
{"Surface", (Fl_Callback *)geometry_elementary_add_rotate_surface_cb} ,
199
{"Line", (Fl_Callback *)geometry_elementary_add_rotate_line_cb} ,
200
{"Surface", (Fl_Callback *)geometry_elementary_add_rotate_surface_cb} ,
197
203
Context_Item menu_geometry_elementary_add_scale[] = {
198
{"0Geometry>Elementary>Add>Scale", NULL} ,
199
{"Point", (Fl_Callback *)geometry_elementary_add_scale_point_cb} ,
200
{"Line", (Fl_Callback *)geometry_elementary_add_scale_line_cb} ,
201
{"Surface", (Fl_Callback *)geometry_elementary_add_scale_surface_cb} ,
204
{"0Geometry>Elementary>Add>Scale", NULL} ,
205
{"Point", (Fl_Callback *)geometry_elementary_add_scale_point_cb} ,
206
{"Line", (Fl_Callback *)geometry_elementary_add_scale_line_cb} ,
207
{"Surface", (Fl_Callback *)geometry_elementary_add_scale_surface_cb} ,
204
210
Context_Item menu_geometry_elementary_add_symmetry[] = {
205
{"0Geometry>Elementary>Add>Symmetry", NULL} ,
206
{"Point", (Fl_Callback *)geometry_elementary_add_symmetry_point_cb} ,
207
{"Line", (Fl_Callback *)geometry_elementary_add_symmetry_line_cb} ,
208
{"Surface", (Fl_Callback *)geometry_elementary_add_symmetry_surface_cb} ,
211
{"0Geometry>Elementary>Add>Symmetry", NULL} ,
212
{"Point", (Fl_Callback *)geometry_elementary_add_symmetry_point_cb} ,
213
{"Line", (Fl_Callback *)geometry_elementary_add_symmetry_line_cb} ,
214
{"Surface", (Fl_Callback *)geometry_elementary_add_symmetry_surface_cb} ,
211
217
Context_Item menu_geometry_elementary_translate[] = {
212
{"0Geometry>Elementary>Translate", NULL} ,
213
{"Point", (Fl_Callback *)geometry_elementary_translate_point_cb} ,
214
{"Line", (Fl_Callback *)geometry_elementary_translate_line_cb} ,
215
{"Surface", (Fl_Callback *)geometry_elementary_translate_surface_cb} ,
218
{"0Geometry>Elementary>Translate", NULL} ,
219
{"Point", (Fl_Callback *)geometry_elementary_translate_point_cb} ,
220
{"Line", (Fl_Callback *)geometry_elementary_translate_line_cb} ,
221
{"Surface", (Fl_Callback *)geometry_elementary_translate_surface_cb} ,
218
224
Context_Item menu_geometry_elementary_rotate[] = {
219
{"0Geometry>Elementary>Rotate", NULL} ,
220
{"Point", (Fl_Callback *)geometry_elementary_rotate_point_cb} ,
221
{"Line", (Fl_Callback *)geometry_elementary_rotate_line_cb} ,
222
{"Surface", (Fl_Callback *)geometry_elementary_rotate_surface_cb} ,
225
{"0Geometry>Elementary>Rotate", NULL} ,
226
{"Point", (Fl_Callback *)geometry_elementary_rotate_point_cb} ,
227
{"Line", (Fl_Callback *)geometry_elementary_rotate_line_cb} ,
228
{"Surface", (Fl_Callback *)geometry_elementary_rotate_surface_cb} ,
225
231
Context_Item menu_geometry_elementary_scale[] = {
226
{"0Geometry>Elementary>Scale", NULL} ,
227
{"Point", (Fl_Callback *)geometry_elementary_scale_point_cb} ,
228
{"Line", (Fl_Callback *)geometry_elementary_scale_line_cb} ,
229
{"Surface", (Fl_Callback *)geometry_elementary_scale_surface_cb} ,
232
{"0Geometry>Elementary>Scale", NULL} ,
233
{"Point", (Fl_Callback *)geometry_elementary_scale_point_cb} ,
234
{"Line", (Fl_Callback *)geometry_elementary_scale_line_cb} ,
235
{"Surface", (Fl_Callback *)geometry_elementary_scale_surface_cb} ,
232
238
Context_Item menu_geometry_elementary_symmetry[] = {
233
{"0Geometry>Elementary>Symmetry", NULL} ,
234
{"Point", (Fl_Callback *)geometry_elementary_symmetry_point_cb} ,
235
{"Line", (Fl_Callback *)geometry_elementary_symmetry_line_cb} ,
236
{"Surface", (Fl_Callback *)geometry_elementary_symmetry_surface_cb} ,
239
{"0Geometry>Elementary>Symmetry", NULL} ,
240
{"Point", (Fl_Callback *)geometry_elementary_symmetry_point_cb} ,
241
{"Line", (Fl_Callback *)geometry_elementary_symmetry_line_cb} ,
242
{"Surface", (Fl_Callback *)geometry_elementary_symmetry_surface_cb} ,
239
245
Context_Item menu_geometry_elementary_extrude[] = {
240
{"0Geometry>Elementary>Extrude", NULL} ,
241
{"Translate", (Fl_Callback *)geometry_elementary_extrude_translate_cb} ,
242
{"Rotate", (Fl_Callback *)geometry_elementary_extrude_rotate_cb} ,
246
{"0Geometry>Elementary>Extrude", NULL} ,
247
{"Translate", (Fl_Callback *)geometry_elementary_extrude_translate_cb} ,
248
{"Rotate", (Fl_Callback *)geometry_elementary_extrude_rotate_cb} ,
245
251
Context_Item menu_geometry_elementary_extrude_translate[] = {
246
{"0Geometry>Elementary>Extrude>Translate", NULL} ,
247
{"Point", (Fl_Callback *)geometry_elementary_extrude_translate_point_cb} ,
248
{"Line", (Fl_Callback *)geometry_elementary_extrude_translate_line_cb} ,
249
{"Surface", (Fl_Callback *)geometry_elementary_extrude_translate_surface_cb} ,
252
{"0Geometry>Elementary>Extrude>Translate", NULL} ,
253
{"Point", (Fl_Callback *)geometry_elementary_extrude_translate_point_cb} ,
254
{"Line", (Fl_Callback *)geometry_elementary_extrude_translate_line_cb} ,
255
{"Surface", (Fl_Callback *)geometry_elementary_extrude_translate_surface_cb} ,
252
258
Context_Item menu_geometry_elementary_extrude_rotate[] = {
253
{"0Geometry>Elementary>Extrude>Rotate", NULL} ,
254
{"Point", (Fl_Callback *)geometry_elementary_extrude_rotate_point_cb} ,
255
{"Line", (Fl_Callback *)geometry_elementary_extrude_rotate_line_cb} ,
256
{"Surface", (Fl_Callback *)geometry_elementary_extrude_rotate_surface_cb} ,
259
{"0Geometry>Elementary>Extrude>Rotate", NULL} ,
260
{"Point", (Fl_Callback *)geometry_elementary_extrude_rotate_point_cb} ,
261
{"Line", (Fl_Callback *)geometry_elementary_extrude_rotate_line_cb} ,
262
{"Surface", (Fl_Callback *)geometry_elementary_extrude_rotate_surface_cb} ,
259
265
Context_Item menu_geometry_elementary_delete[] = {
260
{"0Geometry>Elementary>Delete", NULL} ,
261
{"Point", (Fl_Callback *)geometry_elementary_delete_point_cb} ,
262
{"Line", (Fl_Callback *)geometry_elementary_delete_line_cb} ,
263
{"Surface", (Fl_Callback *)geometry_elementary_delete_surface_cb} ,
266
{"0Geometry>Elementary>Delete", NULL} ,
267
{"Point", (Fl_Callback *)geometry_elementary_delete_point_cb} ,
268
{"Line", (Fl_Callback *)geometry_elementary_delete_line_cb} ,
269
{"Surface", (Fl_Callback *)geometry_elementary_delete_surface_cb} ,
266
272
Context_Item menu_geometry_physical[] = {
267
273
{"0Geometry>Physical", NULL} ,
268
274
{"Add", (Fl_Callback *)geometry_physical_add_cb} ,
271
277
Context_Item menu_geometry_physical_add[] = {
272
{"0Geometry>Physical>Add", NULL} ,
273
{"Point", (Fl_Callback *)geometry_physical_add_point_cb } ,
274
{"Line", (Fl_Callback *)geometry_physical_add_line_cb } ,
275
{"Surface", (Fl_Callback *)geometry_physical_add_surface_cb } ,
276
{"Volume", (Fl_Callback *)geometry_physical_add_volume_cb } ,
278
{"0Geometry>Physical>Add", NULL} ,
279
{"Point", (Fl_Callback *)geometry_physical_add_point_cb } ,
280
{"Line", (Fl_Callback *)geometry_physical_add_line_cb } ,
281
{"Surface", (Fl_Callback *)geometry_physical_add_surface_cb } ,
282
{"Volume", (Fl_Callback *)geometry_physical_add_volume_cb } ,
280
286
Context_Item menu_mesh[] = {
281
287
{"1Mesh", NULL} ,
282
288
{"Define", (Fl_Callback *)mesh_define_cb} ,
283
289
{"Inspect", (Fl_Callback *)mesh_inspect_cb} ,
284
{"Edit", (Fl_Callback *)mesh_edit_cb} ,
290
{"Delete", (Fl_Callback *)mesh_delete_cb} ,
285
291
{"1D", (Fl_Callback *)mesh_1d_cb} ,
286
292
{"2D", (Fl_Callback *)mesh_2d_cb} ,
287
293
{"3D", (Fl_Callback *)mesh_3d_cb} ,
288
294
{"First order", (Fl_Callback *)mesh_degree_cb, (void*)1 } ,
289
295
{"Second order", (Fl_Callback *)mesh_degree_cb, (void*)2 } ,
296
{"Optimize", (Fl_Callback *)mesh_optimize_cb} ,
290
297
#if defined(HAVE_NETGEN)
291
{"Optimize quality", (Fl_Callback *)mesh_optimize_cb} ,
298
{"Optimize (Netgen)", (Fl_Callback *)mesh_optimize_netgen_cb} ,
300
#if defined(HAVE_FOURIER_MODEL)
301
{"Reparameterize", (Fl_Callback *)mesh_parameterize_cb} ,
303
// {"Reclassify", (Fl_Callback *)mesh_classify_cb} ,
293
304
{"Save", (Fl_Callback *)mesh_save_cb} ,
296
Context_Item menu_mesh_edit[] = {
297
{"1Mesh>Edit", NULL} ,
298
{"Delete", (Fl_Callback *)mesh_delete_cb} ,
299
//{"Update edges", (Fl_Callback *)mesh_update_edges_cb} ,
300
{"Reparameterize", (Fl_Callback *)mesh_parameterize_cb} ,
301
//{"Remesh 2D", (Fl_Callback *)mesh_remesh_cb} ,
304
Context_Item menu_mesh_delete[] = {
305
{"1Mesh>Edit>Delete", NULL} ,
306
{"Elements", (Fl_Callback *)mesh_delete_parts_cb, (void*)"elements"} ,
307
{"Lines", (Fl_Callback *)mesh_delete_parts_cb, (void*)"lines"} ,
308
{"Surfaces", (Fl_Callback *)mesh_delete_parts_cb, (void*)"surfaces"} ,
309
{"Volumes", (Fl_Callback *)mesh_delete_parts_cb, (void*)"volumes"} ,
312
307
Context_Item menu_mesh_define[] = {
313
308
{"1Mesh>Define", NULL} ,
309
{"Fields", (Fl_Callback *)view_field_cb, (void*)(-1) },
314
310
{"Characteristic length", (Fl_Callback *)mesh_define_length_cb } ,
315
311
{"Recombine", (Fl_Callback *)mesh_define_recombine_cb } ,
316
312
{"Transfinite", (Fl_Callback *)mesh_define_transfinite_cb } ,
319
315
Context_Item menu_mesh_define_transfinite[] = {
320
{"1Mesh>Define>Transfinite", NULL} ,
321
{"Line", (Fl_Callback *)mesh_define_transfinite_line_cb} ,
322
{"Surface", (Fl_Callback *)mesh_define_transfinite_surface_cb} ,
323
{"Volume", (Fl_Callback *)mesh_define_transfinite_volume_cb} ,
316
{"1Mesh>Define>Transfinite", NULL} ,
317
{"Line", (Fl_Callback *)mesh_define_transfinite_line_cb} ,
318
{"Surface", (Fl_Callback *)mesh_define_transfinite_surface_cb} ,
319
{"Volume", (Fl_Callback *)mesh_define_transfinite_volume_cb} ,
322
Context_Item menu_mesh_delete[] = {
323
{"1Mesh>Edit>Delete", NULL} ,
324
{"Elements", (Fl_Callback *)mesh_delete_parts_cb, (void*)"elements"} ,
325
{"Lines", (Fl_Callback *)mesh_delete_parts_cb, (void*)"lines"} ,
326
{"Surfaces", (Fl_Callback *)mesh_delete_parts_cb, (void*)"surfaces"} ,
327
{"Volumes", (Fl_Callback *)mesh_delete_parts_cb, (void*)"volumes"} ,
327
331
// FIXME: should create MAXSOLVERS items...
328
332
Context_Item menu_solver[] = {
1232
1255
p[1]->type(Fl_Menu_Button::POPUP3);
1234
1257
for(int j = 0; j < 2; j++) {
1235
p[j]->add("Reload/View", 'r',
1236
(Fl_Callback *) view_reload_cb, (void *)nb, 0);
1237
p[j]->add("Reload/Visible Views", 0,
1238
(Fl_Callback *) view_reload_visible_cb, (void *)nb, 0);
1239
p[j]->add("Reload/All Views", 0,
1240
(Fl_Callback *) view_reload_all_cb, (void *)nb, 0);
1241
p[j]->add("Remove/View", FL_Delete,
1242
(Fl_Callback *) view_remove_cb, (void *)nb, 0);
1243
p[j]->add("Remove/Other Views", 0,
1244
(Fl_Callback *) view_remove_other_cb, (void *)nb, 0);
1245
p[j]->add("Remove/Visible Views", 0,
1246
(Fl_Callback *) view_remove_visible_cb, (void *)nb, 0);
1247
p[j]->add("Remove/Invisible Views", 0,
1248
(Fl_Callback *) view_remove_invisible_cb, (void *)nb, 0);
1249
p[j]->add("Remove/Empty Views", 0,
1250
(Fl_Callback *) view_remove_empty_cb, (void *)nb, 0);
1251
p[j]->add("Remove/All Views", 0,
1252
(Fl_Callback *) view_remove_all_cb, (void *)nb, 0);
1253
p[j]->add("Alias/View without Options", 0,
1254
(Fl_Callback *) view_alias_cb, (void *)nb, 0);
1255
p[j]->add("Alias/View with Options", 0,
1256
(Fl_Callback *) view_alias_with_options_cb, (void *)nb, 0);
1257
p[j]->add("Combine/Elements from Visible Views", 0,
1258
(Fl_Callback *) view_combine_space_visible_cb, (void *)nb, 0);
1259
p[j]->add("Combine/Elements from All Views", 0,
1260
(Fl_Callback *) view_combine_space_all_cb, (void *)nb, 0);
1261
p[j]->add("Combine/Elements by View Name", 0,
1262
(Fl_Callback *) view_combine_space_by_name_cb, (void *)nb, 0);
1263
p[j]->add("Combine/Time Steps from Visible Views", 0,
1264
(Fl_Callback *) view_combine_time_visible_cb, (void *)nb, 0);
1265
p[j]->add("Combine/Time Steps from All Views", 0,
1266
(Fl_Callback *) view_combine_time_all_cb, (void *)nb, 0);
1267
p[j]->add("Combine/Time Steps by View Name", 0,
1268
(Fl_Callback *) view_combine_time_by_name_cb, (void *)nb, 0);
1269
p[j]->add("Set Visibility/All On", 0,
1270
(Fl_Callback *) view_all_visible_cb, (void *)1, 0);
1271
p[j]->add("Set Visibility/All Off", 0,
1272
(Fl_Callback *) view_all_visible_cb, (void *)0, 0);
1273
p[j]->add("Set Visibility/Invert", 0,
1274
(Fl_Callback *) view_all_visible_cb, (void *)-1, 0);
1275
p[j]->add("Save As/Parsed View...", 0,
1276
(Fl_Callback *) view_save_parsed_cb, (void *)nb, 0);
1277
p[j]->add("Save As/ASCII View...", 0,
1278
(Fl_Callback *) view_save_ascii_cb, (void *)nb, 0);
1279
p[j]->add("Save As/Binary View...", 0,
1280
(Fl_Callback *) view_save_binary_cb, (void *)nb, 0);
1281
p[j]->add("Save As/STL Triangulation...", 0,
1282
(Fl_Callback *) view_save_stl_cb, (void *)nb, 0);
1283
p[j]->add("Save As/Raw Text...", 0,
1284
(Fl_Callback *) view_save_txt_cb, (void *)nb, 0);
1285
p[j]->add("Save As/Gmsh Mesh...", 0,
1286
(Fl_Callback *) view_save_msh_cb, (void *)nb, 0);
1287
p[j]->add("Apply As Background Mesh", 0,
1288
(Fl_Callback *) view_applybgmesh_cb, (void *)nb, FL_MENU_DIVIDER);
1289
p[j]->add("Options...", 'o',
1290
(Fl_Callback *) view_options_cb, (void *)nb, 0);
1291
p[j]->add("Plugins...", 'p',
1292
(Fl_Callback *) view_plugin_cb, (void *)nb, 0);
1258
p[j]->add("Reload/View", 'r',
1259
(Fl_Callback *) view_reload_cb, (void *)nb, 0);
1260
p[j]->add("Reload/Visible Views", 0,
1261
(Fl_Callback *) view_reload_visible_cb, (void *)nb, 0);
1262
p[j]->add("Reload/All Views", 0,
1263
(Fl_Callback *) view_reload_all_cb, (void *)nb, 0);
1264
p[j]->add("Remove/View", FL_Delete,
1265
(Fl_Callback *) view_remove_cb, (void *)nb, 0);
1266
p[j]->add("Remove/Other Views", 0,
1267
(Fl_Callback *) view_remove_other_cb, (void *)nb, 0);
1268
p[j]->add("Remove/Visible Views", 0,
1269
(Fl_Callback *) view_remove_visible_cb, (void *)nb, 0);
1270
p[j]->add("Remove/Invisible Views", 0,
1271
(Fl_Callback *) view_remove_invisible_cb, (void *)nb, 0);
1272
p[j]->add("Remove/Empty Views", 0,
1273
(Fl_Callback *) view_remove_empty_cb, (void *)nb, 0);
1274
p[j]->add("Remove/All Views", 0,
1275
(Fl_Callback *) view_remove_all_cb, (void *)nb, 0);
1276
p[j]->add("Alias/View without Options", 0,
1277
(Fl_Callback *) view_alias_cb, (void *)nb, 0);
1278
p[j]->add("Alias/View with Options", 0,
1279
(Fl_Callback *) view_alias_with_options_cb, (void *)nb, 0);
1280
p[j]->add("Combine Elements/From Visible Views", 0,
1281
(Fl_Callback *) view_combine_space_visible_cb, (void *)nb, 0);
1282
p[j]->add("Combine Elements/From All Views", 0,
1283
(Fl_Callback *) view_combine_space_all_cb, (void *)nb, 0);
1284
p[j]->add("Combine Elements/By View Name", 0,
1285
(Fl_Callback *) view_combine_space_by_name_cb, (void *)nb, 0);
1286
p[j]->add("Combine Time Steps/From Visible Views", 0,
1287
(Fl_Callback *) view_combine_time_visible_cb, (void *)nb, 0);
1288
p[j]->add("Combine Time Steps/From All Views", 0,
1289
(Fl_Callback *) view_combine_time_all_cb, (void *)nb, 0);
1290
p[j]->add("Combine Time Steps/By View Name", 0,
1291
(Fl_Callback *) view_combine_time_by_name_cb, (void *)nb, 0);
1292
p[j]->add("Set Visibility/All On", 0,
1293
(Fl_Callback *) view_all_visible_cb, (void *)1, 0);
1294
p[j]->add("Set Visibility/All Off", 0,
1295
(Fl_Callback *) view_all_visible_cb, (void *)0, 0);
1296
p[j]->add("Set Visibility/Invert", 0,
1297
(Fl_Callback *) view_all_visible_cb, (void *)-1, 0);
1298
p[j]->add("Save As/Parsed View...", 0,
1299
(Fl_Callback *) view_save_parsed_cb, (void *)nb, 0);
1300
p[j]->add("Save As/ASCII View...", 0,
1301
(Fl_Callback *) view_save_ascii_cb, (void *)nb, 0);
1302
p[j]->add("Save As/Binary View...", 0,
1303
(Fl_Callback *) view_save_binary_cb, (void *)nb, 0);
1304
p[j]->add("Save As/STL Triangulation...", 0,
1305
(Fl_Callback *) view_save_stl_cb, (void *)nb, 0);
1306
p[j]->add("Save As/Raw Text...", 0,
1307
(Fl_Callback *) view_save_txt_cb, (void *)nb, 0);
1308
p[j]->add("Save As/Gmsh Mesh...", 0,
1309
(Fl_Callback *) view_save_msh_cb, (void *)nb, 0);
1310
#if defined(HAVE_MED)
1311
p[j]->add("Save As/MED file...", 0,
1312
(Fl_Callback *) view_save_med_cb, (void *)nb, 0);
1314
p[j]->add("Apply As Background Mesh", 0,
1315
(Fl_Callback *) view_applybgmesh_cb, (void *)nb, FL_MENU_DIVIDER);
1316
p[j]->add("Options...", 'o',
1317
(Fl_Callback *) view_options_cb, (void *)nb, 0);
1318
p[j]->add("Plugins...", 'p',
1319
(Fl_Callback *) view_plugin_cb, (void *)nb, 0);
1295
1322
m_toggle_butt.push_back(b1);
3152
3241
view_value[44] = new Fl_Value_Input(L + 2 * WB + 2 * IW-WB, 2 * WB + 3 * BH, 7*IW/10, BH, "Y");
3153
3242
view_value[45] = new Fl_Value_Input(L + 2 * WB + 2 * IW-WB, 2 * WB + 4 * BH, 7*IW/10, BH, "Z");
3155
for(int i = 40; i <= 45; i++){
3156
view_value[i]->align(FL_ALIGN_RIGHT);
3157
view_value[i]->when(FL_WHEN_RELEASE);
3158
view_value[i]->callback(view_options_ok_cb);
3244
view_value[46] = new Fl_Value_Input(L + 2 * WB, 2 * WB + 5 * BH, 3*ss, BH, "Normal raise");
3246
for(int i = 40; i <= 46; i++){
3247
view_value[i]->align(FL_ALIGN_RIGHT);
3248
view_value[i]->when(FL_WHEN_RELEASE);
3249
view_value[i]->callback(view_options_ok_cb);
3160
3251
for(int i = 51; i <= 59; i++){
3161
view_value[i]->minimum(-1.);
3162
view_value[i]->maximum(1.);
3163
view_value[i]->step(0.1);
3164
view_value[i]->align(FL_ALIGN_RIGHT);
3165
view_value[i]->when(FL_WHEN_RELEASE);
3166
view_value[i]->callback(view_options_ok_cb);
3252
view_value[i]->minimum(-1.);
3253
view_value[i]->maximum(1.);
3254
view_value[i]->step(0.1);
3255
view_value[i]->align(FL_ALIGN_RIGHT);
3256
view_value[i]->when(FL_WHEN_RELEASE);
3257
view_value[i]->callback(view_options_ok_cb);
3169
view_butt[6] = new Fl_Check_Button(L + 2 * WB, 2 * WB + 5 * BH, BW, BH, "Use general transformation expressions");
3260
view_butt[6] = new Fl_Check_Button(L + 2 * WB, 2 * WB + 6 * BH, BW, BH, "Use general transformation expressions");
3170
3261
view_butt[6]->type(FL_TOGGLE_BUTTON);
3171
3262
view_butt[6]->callback(view_options_ok_cb, (void*)"general_transform");
3173
view_choice[11] = new Fl_Choice(L + 2 * WB, 2 * WB + 6 * BH, IW, BH, "Data source");
3264
view_choice[11] = new Fl_Choice(L + 2 * WB, 2 * WB + 7 * BH, IW, BH, "Data source");
3174
3265
view_choice[11]->align(FL_ALIGN_RIGHT);
3175
3266
view_choice[11]->add("Self");
3176
3267
view_choice[11]->callback(view_options_ok_cb);
3178
view_value[2] = new Fl_Value_Input(L + 2 * WB, 2 * WB + 7 * BH, IW, BH, "Factor");
3269
view_value[2] = new Fl_Value_Input(L + 2 * WB, 2 * WB + 8 * BH, IW, BH, "Factor");
3179
3270
view_value[2]->align(FL_ALIGN_RIGHT);
3180
3271
view_value[2]->when(FL_WHEN_RELEASE);
3181
3272
view_value[2]->callback(view_options_ok_cb);
3183
view_input[4] = new Fl_Input(L + 2 * WB, 2 * WB + 8 * BH, IW, BH, "X expression");
3274
view_input[4] = new Fl_Input(L + 2 * WB, 2 * WB + 9 * BH, IW, BH, "X expression");
3184
3275
view_input[4]->align(FL_ALIGN_RIGHT);
3185
3276
view_input[4]->callback(view_options_ok_cb);
3187
view_input[5] = new Fl_Input(L + 2 * WB, 2 * WB + 9 * BH, IW, BH, "Y expression");
3278
view_input[5] = new Fl_Input(L + 2 * WB, 2 * WB + 10 * BH, IW, BH, "Y expression");
3188
3279
view_input[5]->align(FL_ALIGN_RIGHT);
3189
3280
view_input[5]->callback(view_options_ok_cb);
3191
view_input[6] = new Fl_Input(L + 2 * WB, 2 * WB + 10 * BH, IW, BH, "Z expression");
3282
view_input[6] = new Fl_Input(L + 2 * WB, 2 * WB + 11 * BH, IW, BH, "Z expression");
3192
3283
view_input[6]->align(FL_ALIGN_RIGHT);
3193
3284
view_input[6]->callback(view_options_ok_cb);
3254
3345
view_value[60]->maximum(500);
3255
3346
view_value[60]->step(1);
3256
3347
view_value[60]->align(FL_ALIGN_RIGHT);
3257
view_value[60]->callback(view_options_ok_cb);
3348
view_value[60]->callback(view_options_ok_cb);
3259
view_butt[0] = new Fl_Check_Button(L + 2 * IW - 2 * WB, 2 * WB + 7 * BH, (int)(1.5*BB), BH, "Proportional");
3260
view_butt[0]->type(FL_TOGGLE_BUTTON);
3261
view_butt[0]->callback(view_options_ok_cb);
3350
view_butt[0] = new Fl_Check_Button(L + 2 * IW - 2 * WB, 2 * WB + 7 * BH, (int)(1.5*BB), BH, "Proportional");
3351
view_butt[0]->type(FL_TOGGLE_BUTTON);
3352
view_butt[0]->callback(view_options_ok_cb);
3263
3354
view_value[63] = new Fl_Value_Input(L + 2 * WB, 2 * WB + 8 * BH, IW, BH, "Displacement factor");
3264
3355
view_value[63]->minimum(0.);
3265
3356
view_value[63]->maximum(1.);
3266
3357
view_value[63]->step(0.01);
3267
3358
view_value[63]->align(FL_ALIGN_RIGHT);
3268
view_value[63]->when(FL_WHEN_RELEASE);
3269
view_value[63]->callback(view_options_ok_cb);
3359
view_value[63]->when(FL_WHEN_RELEASE);
3360
view_value[63]->callback(view_options_ok_cb);
3271
3362
view_choice[10] = new Fl_Choice(L + 2 * WB, 2 * WB + 9 * BH, IW, BH, "Data source");
3272
3363
view_choice[10]->align(FL_ALIGN_RIGHT);
3273
view_choice[10]->add("Self");
3274
view_choice[10]->callback(view_options_ok_cb);
3364
view_choice[10]->add("Self");
3365
view_choice[10]->callback(view_options_ok_cb);
3276
3367
view_vector->end();
3279
3370
static Fl_Menu_Item menu_vecloc[] = {
3280
{"Barycenter", 0, 0, 0},
3281
{"Vertex", 0, 0, 0},
3371
{"Barycenter", 0, 0, 0},
3372
{"Vertex", 0, 0, 0},
3284
3375
view_choice[3] = new Fl_Choice(L + 2 * WB, 2 * WB + 10 * BH, IW, BH, "Glyph location");
3285
3376
view_choice[3]->menu(menu_vecloc);
3286
3377
view_choice[3]->align(FL_ALIGN_RIGHT);
3287
3378
view_choice[3]->callback(view_options_ok_cb);
3380
view_butt[1] = new Fl_Check_Button(L + 2 * IW - 2 * WB, 2 * WB + 10 * BH, (int)(1.5*BB), BH, "Center glyphs");
3381
view_butt[1]->type(FL_TOGGLE_BUTTON);
3382
view_butt[1]->callback(view_options_ok_cb);
3289
3384
static Fl_Menu_Item menu_tensor[] = {
3290
{"Von-Mises", 0, 0, 0},
3291
{"LMGC90", 0, 0, 0},
3292
{"LMGC90 Type", 0, 0, 0},
3293
{"LMGC90 Coordinance", 0, 0, 0},
3294
{"LMGC90 Pression", 0, 0, 0},
3295
{"LMGC90 Normal stress", 0, 0, 0},
3296
{"LMGC90 X displacement", 0, 0, 0},
3297
{"LMGC90 Y displacement", 0, 0, 0},
3298
{"LMGC90 Z displacement", 0, 0, 0},
3299
{"LMGC90 Average displacement", 0, 0, 0},
3300
{"LMGC90 Norm of displacement", 0, 0, 0},
3385
{"Von-Mises", 0, 0, 0},
3303
3388
view_choice[4] = new Fl_Choice(L + 2 * WB, 2 * WB + 11 * BH, IW, BH, "Tensor display");
3304
3389
view_choice[4]->menu(menu_tensor);
3737
3830
plugin_window->end();
3833
void FieldDialogBox::save_values()
3835
std::list<Fl_Widget*>::iterator input=inputs.begin();
3836
Field *f=current_field;
3837
std::ostringstream sstream;
3838
std::istringstream istream;
3841
sstream.precision(16);
3842
for(std::map<const char*,FieldOption*>::iterator it=f->options.begin();it!=f->options.end();it++){
3843
FieldOption *option=it->second;
3845
switch(option->get_type()){
3846
case FIELD_OPTION_STRING:
3847
case FIELD_OPTION_PATH:
3848
sstream<<"\""<<((Fl_Input*)*input)->value()<<"\"";
3850
case FIELD_OPTION_INT:
3851
sstream<<(int)((Fl_Value_Input*)*input)->value();
3853
case FIELD_OPTION_DOUBLE:
3854
sstream<<((Fl_Value_Input*)*input)->value();
3856
case FIELD_OPTION_BOOL:
3857
sstream<<(bool)((Fl_Check_Button*)*input)->value();
3859
case FIELD_OPTION_LIST:
3861
istream.str(((Fl_Input*)*input)->value());
3866
Msg(GERROR, "Unexpected character \'%c\' while parsing option '%s' of field \'%s\'",a,it->first,f->id);
3873
if((*input)->changed()){
3874
add_field_option(f->id,it->first,sstream.str().c_str(),CTX.filename);
3875
(*input)->clear_changed();
3881
void FieldDialogBox::load_field(Field *f)
3884
std::list<Fl_Widget*>::iterator input=inputs.begin();
3885
for(std::map<const char*,FieldOption*>::iterator it=f->options.begin();it!=f->options.end();it++){
3886
FieldOption *option=it->second;
3887
std::ostringstream vstr;
3888
std::list<int>::iterator list_it;;
3889
switch(option->get_type()){
3890
case FIELD_OPTION_STRING:
3891
case FIELD_OPTION_PATH:
3892
((Fl_Input*)(*input))->value(option->string().c_str());
3894
case FIELD_OPTION_INT:
3895
case FIELD_OPTION_DOUBLE:
3896
((Fl_Value_Input*)(*input))->value(option->numerical_value());
3898
case FIELD_OPTION_BOOL:
3899
((Fl_Check_Button*)(*input))->value((int)option->numerical_value());
3901
case FIELD_OPTION_LIST:
3903
for(list_it=option->list().begin();list_it!=option->list().end();list_it++){
3904
if(list_it!=option->list().begin())
3908
((Fl_Input*)(*input))->value(vstr.str().c_str());
3913
if(PView::list.size()){
3914
put_on_view_btn->activate();
3915
for(unsigned int i = 0; i < PView::list.size(); i++) {
3916
std::ostringstream s;
3917
s<<"View ["<<i<<"]";
3918
put_on_view_btn->add(s.str().c_str());
3922
put_on_view_btn->deactivate();
3924
set_size_btn->value(GModel::current()->getFields()->background_field==f->id);
3927
FieldDialogBox::FieldDialogBox(Field *f, int x, int y, int width, int height,int fontsize)
3930
group=new Fl_Group(x, y, width, height);
3932
Fl_Box *b = new Fl_Box(x, y, width, BH,f->get_name());
3933
b->labelfont(FL_BOLD);
3934
Fl_Tabs *o = new Fl_Tabs(x, y + BH + WB, width, height-2*BH-2*WB);
3935
group->resizable(o);
3937
Fl_Group *g = new Fl_Group(x, y + 2*BH + WB, width, height - 2*BH-3*WB, "Options");
3938
apply_btn = new Fl_Return_Button(x+width - BB-WB ,y+ height - 2*BH -2*WB, BB, BH, "Apply");
3939
apply_btn->callback(view_field_apply_cb,this);
3940
revert_btn = new Fl_Button(x+width - 2*BB-2*WB ,y+ height - 2*BH -2*WB, BB, BH, "Revert");
3941
revert_btn->callback(view_field_revert_cb,this);
3942
Fl_Scroll *s = new Fl_Scroll(x + WB, y + 2*WB + 2*BH, width - 2 * WB, height - 4*BH - 5 * WB);
3944
for(std::map<const char*,FieldOption*>::iterator it=f->options.begin();it!=f->options.end();it++){
3946
switch(it->second->get_type()){
3947
case FIELD_OPTION_INT:
3948
case FIELD_OPTION_DOUBLE:
3949
input=new Fl_Value_Input(x+WB,yy,IW,BH,it->first);
3951
case FIELD_OPTION_BOOL:
3952
input=new Fl_Check_Button(x+WB,yy,BH,BH,it->first);
3954
case FIELD_OPTION_PATH:
3955
case FIELD_OPTION_STRING:
3956
input=new Fl_Input(x+WB,yy,IW,BH,it->first);
3958
case FIELD_OPTION_LIST:
3961
Fl_Button *b=new Fl_Button(x+WB,yy,BH,BH);
3963
b->callback(view_field_select_node_cb);
3965
input=new Fl_Input(x+WB+2*BH,yy,IW-2*BH,BH,it->first);*/
3966
input=new Fl_Input(x+WB,yy,IW,BH,it->first);
3969
input->align(FL_ALIGN_RIGHT);
3970
inputs.push_back(input);
3973
o->resizable(g); // to avoid ugly resizing of tab labels
3979
Fl_Group *g = new Fl_Group(x, y + 2*BH + WB, width, height - 2*BH-3*WB, "Help");
3980
Fl_Browser *o = new Fl_Browser(x + WB, y + 2*WB + 2*BH, width - 2 * WB, height - 4 * WB - 3 * BH);
3982
// char name[1024], copyright[256], author[256], help[4096];
3983
// p->getName(name);
3984
// p->getInfos(author, copyright, help);
3987
// add_multiline_in_browser(o, "@c@b@.", name);
3989
// add_multiline_in_browser(o, "", help);
3991
//add_multiline_in_browser(o, "Author: ", author);
3992
//add_multiline_in_browser(o, "Copyright (C) ", copyright);
4000
Fl_Button *b = new Fl_Button(x+width - BB,y+ height - BH , BB, BH, "Delete");
4001
b->callback(view_field_delete_cb,this);
4003
put_on_view_btn = new Fl_Menu_Button(x+BB*3/2+WB,y+ height - BH ,BB*3/2,BH,"Put on view");
4004
put_on_view_btn->callback(view_field_put_on_view_cb,this);
4006
set_size_btn = new Fl_Check_Button(x,y+ height - BH ,BB*3/2,BH,"Background size");
4007
set_size_btn->callback(view_field_set_size_btn_cb,this);
4013
void GUI::create_field_window(int numfield)
4015
int width0 = 40 * fontsize;
4016
int height0 = 13 * BH + 5 * WB;
4018
int width = (CTX.field_size[0] < width0) ? width0 : CTX.field_size[0];
4019
int height = (CTX.field_size[1] < height0) ? height0 : CTX.field_size[1];
4024
width=field_window->w();
4025
height=field_window->h();
4026
FieldManager &fields=*GModel::current()->getFields();
4027
field_browser->clear();
4028
for(FieldManager::iterator it=fields.begin();it!=fields.end();it++){
4029
Field *field=it->second;
4030
std::ostringstream sstream;
4031
if(it->first==fields.background_field)
4034
sstream<<" "<<field->get_name();
4035
field_browser->add(sstream.str().c_str(),field);
4036
if(!field->dialog_box()){
4037
field_window->begin();
4038
field->dialog_box()=new FieldDialogBox(field, 2 * WB + L1 , WB, width - L1 - 3 * WB, height - 2*WB ,fontsize);
4039
field_window->end();
4041
if(it->second->id==numfield){
4042
field_browser->select(i_entry);
4043
field_browser->do_callback();
4047
field_window->show();
4051
selected_field_dialog_box=NULL;
4052
field_window = new Dialog_Window(width, height, CTX.non_modal_windows, "Fields");
4053
field_window->box(GMSH_WINDOW_BOX);
4054
Fl_Group *resize_box = new Fl_Group(2*WB+L1, 2*WB+BB,width-3*WB-L1, height - 3 * WB-BB);
4057
Fl_Menu_Button *b= new Fl_Menu_Button(WB,WB,L1,BH,"New");
4058
FieldManager &fields=*GModel::current()->getFields();
4059
std::map<const std::string, FieldFactory*>::iterator it;
4060
for(it=fields.map_type_name.begin();it!=fields.map_type_name.end();it++)
4061
b->add(it->first.c_str());
4062
b->callback(view_field_new_cb);
4064
field_browser = new Fl_Hold_Browser(WB, 2*WB+BH, L1, height - 3 * WB - BH);
4065
field_browser->callback(view_field_browser_cb);
4066
field_window->resizable(resize_box);
4067
field_window->size_range(width0, height0);
4068
field_window->position(CTX.field_position[0], CTX.field_position[1]);
4069
field_window->end();
3740
4072
// Create the window for the statistics
3742
4074
void GUI::create_statistics_window()
4760
5093
void GUI::create_solver_window(int num)
4762
int i, nbbutts = 0, newrow = 0;
4763
static Fl_Group *g[10];
4765
int LL = (int)(1.75 * IW);
4766
int BBS = (5 * fontsize + 1); // smaller width of a button with internal label
4768
5095
if(solver[num].window) {
4769
5096
solver[num].window->show();
4773
for(i = 0; i < MAXSOLVERS; i++)
5100
for(int i = 0; i < MAXSOLVERS; i++)
4774
5101
if(strlen(SINFO[num].option_name[i]))
4775
5102
SINFO[num].nboptions = i + 1;
4777
for(i = 0; i < MAXSOLVERS; i++)
4778
if(strlen(SINFO[num].button_name[i]))
4783
int width = 5 * BBS + 6 * WB;
4784
int height = (8 + SINFO[num].nboptions + newrow) * WB + (6 + SINFO[num].nboptions + newrow) * BH;
4785
if(height < 8 * WB + 8 * BH)
4786
height = 8 * WB + 8 * BH; //minimum height required by Options tab
4788
solver[num].window = new Dialog_Window(width, height);
5105
int width = LL + BB + BB / 3 + 4 * WB;
5106
int height = (8 + SINFO[num].nboptions) * BH + 6 * WB;
5107
int BBS = (width - 8 * WB) / 5;
5109
solver[num].window = new Dialog_Window(width, height, CTX.non_modal_windows);
4789
5110
solver[num].window->box(GMSH_WINDOW_BOX);
4791
Fl_Tabs *o = new Fl_Tabs(WB, WB, width - 2 * WB, height - (3 + newrow) * WB - (1 + newrow) * BH);
5112
Fl_Tabs *o = new Fl_Tabs(WB, WB, width - 2 * WB, height - 3 * WB - 1 * BH);
4793
g[0] = new Fl_Group(WB, WB + BH, width - 2 * WB, height - (3 + newrow) * WB - (2 + newrow) * BH, "General");
4795
solver[num].input[0] = new Fl_Input(2 * WB, 2 * WB + 1 * BH, LL, BH, "Problem");
4796
Fl_Button *b1 = new Fl_Button(2 * WB, 3 * WB + 2 * BH, BB, BH, "Choose");
4797
b1->callback(solver_file_open_cb, (void *)num);
4798
Fl_Button *b2 = new Fl_Button(3 * WB + BB, 3 * WB + 2 * BH, BB, BH, "Edit");
4799
b2->callback(solver_file_edit_cb, (void *)num);
4801
solver[num].input[1] = new Fl_Input(2 * WB, 4 * WB + 3 * BH, LL, BH, "Mesh");
4802
Fl_Button *b3 = new Fl_Button(2 * WB, 5 * WB + 4 * BH, BB, BH, "Choose");
4803
b3->callback(solver_choose_mesh_cb, (void *)num);
4805
for(i = 0; i < 2; i++) {
5114
Fl_Group *g = new Fl_Group(WB, WB + BH, width - 2 * WB, height - 3 * WB - 2 * BH, "Controls");
5116
solver[num].input[2] = new Fl_Input(2 * WB, 2 * WB + 1 * BH, LL, BH, "Solver");
5117
solver[num].input[2]->callback(solver_ok_cb, (void *)num);
5119
Fl_Button *b1 = new Fl_Button(width - 2 * WB - BBS, 2 * WB + 1 * BH, BBS, BH, "Choose");
5120
b1->callback(solver_choose_executable_cb, (void *)num);
5121
Fl_Button *b2 = new Fl_Button(width - 2 * WB - BBS, 2 * WB + 2 * BH, BBS, BH, "Save");
5122
b2->callback(options_save_cb);
5124
int ww = (LL - WB) / 2;
5125
solver[num].butt[2] = new Fl_Check_Button(2 * WB, 2 * WB + 2 * BH, ww, BH, "Client/server");
5126
solver[num].butt[0] = new Fl_Check_Button(2 * WB, 2 * WB + 3 * BH, ww, BH, "Pop-up messages");
5127
solver[num].butt[1] = new Fl_Check_Button(3 * WB + ww, 2 * WB + 2 * BH, ww, BH, "Auto-load results");
5129
for(int i = 0; i < 3; i++){
5130
solver[num].butt[i]->type(FL_TOGGLE_BUTTON);
5131
solver[num].butt[i]->callback(solver_ok_cb, (void *)num);
5134
solver[num].input[0] = new Fl_Input(2 * WB + BB / 2, 2 * WB + 4 * BH, LL - BB / 2, BH, "Input");
5135
Fl_Button *b3 = new Fl_Button(width - 2 * WB - BBS, 2 * WB + 4 * BH, BBS, BH, "Choose");
5136
b3->callback(solver_file_open_cb, (void *)num);
5138
Fl_Button *b4 = new Fl_Button(2 * WB, 2 * WB + 4 * BH, BB / 2, BH, "Edit");
5139
b4->callback(solver_file_edit_cb, (void *)num);
5141
solver[num].input[1] = new Fl_Input(2 * WB, 2 * WB + 5 * BH, LL, BH, "Mesh");
5142
Fl_Button *b5 = new Fl_Button(width - 2 * WB - BBS, 2 * WB + 5 * BH, BBS, BH, "Choose");
5143
b5->callback(solver_choose_mesh_cb, (void *)num);
5145
for(int i = 0; i < 3; i++) {
4806
5146
solver[num].input[i]->align(FL_ALIGN_RIGHT);
4809
for(i = 0; i < SINFO[num].nboptions; i++) {
4810
solver[num].choice[i] = new Fl_Choice(2 * WB, (6 + i) * WB + (5 + i) * BH, LL, BH, SINFO[num].option_name[i]);
5149
for(int i = 0; i < SINFO[num].nboptions; i++) {
5150
solver[num].choice[i] = new Fl_Choice(2 * WB, 2 * WB + (6 + i) * BH, LL, BH,
5151
SINFO[num].option_name[i]);
4811
5152
solver[num].choice[i]->align(FL_ALIGN_RIGHT);
4817
g[1] = new Fl_Group(WB, WB + BH, width - 2 * WB, height - (3 + newrow) * WB - (2 + newrow) * BH, "Options");
4819
solver[num].input[2] = new Fl_Input(2 * WB, 2 * WB + 1 * BH, LL, BH, "Executable");
4820
solver[num].input[2]->align(FL_ALIGN_RIGHT);
4821
solver[num].input[2]->callback(solver_ok_cb);
4823
Fl_Button *b = new Fl_Button(2 * WB, 3 * WB + 2 * BH, BB, BH, "Choose");
4824
b->callback(solver_choose_executable_cb, (void *)num);
4826
solver[num].butt[2] = new Fl_Check_Button(2 * WB, 4 * WB + 3 * BH, LL, BH, "Enable client-server connection");
4827
solver[num].butt[2]->type(FL_TOGGLE_BUTTON);
4828
solver[num].butt[2]->callback(solver_ok_cb);
4829
solver[num].butt[0] = new Fl_Check_Button(2 * WB, 4 * WB + 4 * BH, LL, BH, "Display client messages");
4830
solver[num].butt[0]->type(FL_TOGGLE_BUTTON);
4831
solver[num].butt[0]->callback(solver_ok_cb);
4832
solver[num].butt[1] = new Fl_Check_Button(2 * WB, 4 * WB + 5 * BH, LL, BH, "Merge views automatically");
4833
solver[num].butt[1]->type(FL_TOGGLE_BUTTON);
4834
solver[num].butt[1]->callback(solver_ok_cb);
4837
Fl_Button *o = new Fl_Button(width - BB - 2 * WB,
4838
height - (3 + newrow) * WB - (2 + newrow) * BH,
4840
o->callback(options_save_cb);
5155
static int arg[MAXSOLVERS][5][2];
5156
for(int i = 0; i < 5; i++) {
5157
if(strlen(SINFO[num].button_name[i])) {
5158
arg[num][i][0] = num;
5160
solver[num].command[i] = new Fl_Button((2 + i) * WB + i * BBS,
5161
3 * WB + (6 + SINFO[num].nboptions) * BH,
5162
BBS, BH, SINFO[num].button_name[i]);
5163
solver[num].command[i]->callback(solver_command_cb, (void *)arg[num][i]);
4845
g[2] = new Fl_Group(WB, WB + BH, width - 2 * WB, height - (3 + newrow) * WB - (2 + newrow) * BH, "About");
5170
Fl_Group *g = new Fl_Group(WB, WB + BH, width - 2 * WB, height - 3 * WB - 2 * BH, "About");
4847
5172
Fl_Browser *o = new Fl_Browser(2 * WB, 2 * WB + 1 * BH, width - 4 * WB,
4848
height - (5 + newrow) * WB - (2 + newrow) * BH);
5173
height - 5 * WB - 2 * BH);
4850
5175
add_multiline_in_browser(o, "@c@b@.", SINFO[num].name);
4852
5177
add_multiline_in_browser(o, "@c@. ", SINFO[num].help);
4859
static int arg[MAXSOLVERS][5][2];
4861
for(i = 4; i >= 0; i--) {
4862
if(strlen(SINFO[num].button_name[i])) {
4863
arg[num][i][0] = num;
4865
solver[num].command[nb] = new Fl_Button(width - (1 + nb + 2 * !newrow) * BBS - (1 + nb + 2 * !newrow) * WB,
4866
height - (1 + newrow) * BH - (1 + newrow) * WB, BBS, BH,
4867
SINFO[num].button_name[i]);
4868
solver[num].command[nb]->callback(solver_command_cb, (void *)arg[num][i]);
4874
Fl_Button *o = new Fl_Button(width - 2 * BBS - 2 * WB, height - BH - WB, BBS, BH, "Kill");
4875
o->callback(solver_kill_cb, (void *)num);
4878
Fl_Button *o = new Fl_Button(width - BBS - WB, height - BH - WB, BBS, BH, "Cancel");
4879
o->callback(cancel_cb, (void *)solver[num].window);
5185
Fl_Button *b1 = new Fl_Button(width - 2 * BB - 2 * WB, height - BH - WB, BB, BH, "Kill solver");
5186
b1->callback(solver_kill_cb, (void *)num);
5187
Fl_Button *b2 = new Fl_Button(width - BB - WB, height - BH - WB, BB, BH, "Cancel");
5188
b2->callback(cancel_cb, (void *)solver[num].window);
4882
5191
solver[num].window->position(CTX.solver_position[0], CTX.solver_position[1]);