summaryrefslogtreecommitdiff
path: root/fluid/panels/function_panel.fl
blob: 23240f469774890586f1cc194f11345d39c7fd4f (plain)
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
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
# data file for the Fltk User Interface Designer (fluid)
version 1.0500
header_name {.h}
code_name {.cxx}
include_guard {}
snap {
  ver 1
  current_suite FLTK
  current_preset 1
}
comment {//
// Code dialogs for the Fast Light Tool Kit (FLTK).
//
// Copyright 1998-2023 by Bill Spitzak and others.
//
// This library is free software. Distribution and use rights are outlined in
// the file "COPYING" which should have been included with this file.  If this
// file is missing or damaged, see the license at:
//
//     https://www.fltk.org/COPYING.php
//
// Please see the following page on how to report bugs and issues:
//
//     https://www.fltk.org/bugs.php
//
} {in_source in_header
}

decl {\#include "Fluid.h"} {private local
}

decl {\#include "proj/undo.h"} {private local
}

decl {\#include "nodes/Node.h"} {private local
}

decl {\#include "nodes/factory.h"} {private local
}

decl {\#include "rsrcs/pixmaps.h"} {private local
}

decl {\#include "widgets/Bin_Button.h"} {private global
}

decl {\#include "widgets/Node_Browser.h"} {private local
}

Function {type_make_cb(Fl_Widget*,void*d)} {open return_type void
} {
  code {const char *type_name = (const char*)d;
if (Fluid.proj.tree.current && Fluid.proj.tree.current->can_have_children())
  add_new_widget_from_user(type_name, Strategy::AS_LAST_CHILD);
else
  add_new_widget_from_user(type_name, Strategy::AFTER_CURRENT);} {}
}

Function {make_widgetbin()} {open
} {
  Fl_Window widgetbin_panel {
    label {Widget Bin}
    callback {if (Fl::event()==FL_SHORTCUT && Fl::event_key()==FL_Escape)
  Fluid.quit();
else
  Fluid.toggle_widget_bin();}
    xywh {395 227 600 102} type Single align 80 non_modal visible
  } {
    Fl_Group {} {
      label Code open
      xywh {3 19 79 79} labelsize 12
    } {
      Fl_Button {} {
        user_data {"Function"}
        callback type_make_cb
        tooltip Function xywh {5 21 24 24} box THIN_UP_BOX
        code0 {o->image(pixmap[(int)Type::Function]);}
      }
      Fl_Button {} {
        user_data {"Class"}
        callback type_make_cb
        tooltip Class xywh {30 21 24 24} box THIN_UP_BOX
        code0 {o->image(pixmap[(int)Type::Class]);}
      }
      Fl_Button {} {
        user_data {"comment"}
        callback type_make_cb
        tooltip Comment xywh {55 21 24 24} box THIN_UP_BOX
        code0 {o->image(pixmap[(int)Type::Comment]);}
      }
      Fl_Button {} {
        user_data {"Code"}
        callback type_make_cb
        tooltip Code xywh {5 46 24 24} box THIN_UP_BOX
        code0 {o->image(pixmap[(int)Type::Code]);}
      }
      Fl_Button {} {
        user_data {"CodeBlock"}
        callback type_make_cb
        tooltip {Code Block} xywh {30 46 24 24} box THIN_UP_BOX
        code0 {o->image(pixmap[(int)Type::CodeBlock]);}
      }
      Fl_Button {} {
        user_data {"widget_class"}
        callback type_make_cb
        tooltip {Widget Class} xywh {55 46 24 24} box THIN_UP_BOX
        code0 {o->image(pixmap[(int)Type::Widget_Class]);}
        class {fld::widget::Bin_Window_Button}
      }
      Fl_Button {} {
        user_data {"decl"}
        callback type_make_cb
        tooltip Declaration xywh {5 71 24 24} box THIN_UP_BOX
        code0 {o->image(pixmap[(int)Type::Decl]);}
      }
      Fl_Button {} {
        user_data {"declblock"}
        callback type_make_cb
        tooltip {Declaration Block} xywh {30 71 24 24} box THIN_UP_BOX
        code0 {o->image(pixmap[(int)Type::DeclBlock]);}
      }
      Fl_Button {} {
        user_data {"data"}
        callback type_make_cb
        tooltip {Inline Data} xywh {55 71 24 24} box THIN_UP_BOX
        code0 {o->image(pixmap[(int)Type::Data]);}
      }
    }
    Fl_Group {} {
      label Groups open
      xywh {87 19 79 79} labelsize 12
    } {
      Fl_Button {} {
        user_data {"Fl_Window"}
        callback type_make_cb
        tooltip Window xywh {89 21 24 24} box THIN_UP_BOX
        code0 {o->image(pixmap[(int)Type::Window]);}
        class {fld::widget::Bin_Window_Button}
      }
      Fl_Button {} {
        user_data {"Fl_Group"}
        callback type_make_cb
        tooltip Group xywh {114 21 24 24} box THIN_UP_BOX
        code0 {o->image(pixmap[(int)Type::Group]);}
        class {fld::widget::Bin_Button}
      }
      Fl_Button {} {
        user_data {"Fl_Pack"}
        callback type_make_cb
        tooltip Pack xywh {139 21 24 24} box THIN_UP_BOX
        code0 {o->image(pixmap[(int)Type::Pack]);}
        class {fld::widget::Bin_Button}
      }
      Fl_Button {} {
        user_data {"Fl_Tabs"}
        callback type_make_cb
        tooltip Tabs xywh {89 46 24 24} box THIN_UP_BOX
        code0 {o->image(pixmap[(int)Type::Tabs]);}
        class {fld::widget::Bin_Button}
      }
      Fl_Button {} {
        user_data {"Fl_Scroll"}
        callback type_make_cb
        tooltip Scroll xywh {114 46 24 24} box THIN_UP_BOX
        code0 {o->image(pixmap[(int)Type::Scroll]);}
        class {fld::widget::Bin_Button}
      }
      Fl_Button {} {
        user_data {"Fl_Flex"}
        callback type_make_cb
        tooltip Flex xywh {139 46 24 24} box THIN_UP_BOX
        code0 {o->image(pixmap[(int)Type::Flex]);}
        class {fld::widget::Bin_Button}
      }
      Fl_Button {} {
        user_data {"Fl_Tile"}
        callback type_make_cb
        tooltip Tile xywh {89 71 24 24} box THIN_UP_BOX
        code0 {o->image(pixmap[(int)Type::Tile]);}
        class {fld::widget::Bin_Button}
      }
      Fl_Button {} {
        user_data {"Fl_Wizard"}
        callback type_make_cb
        tooltip Wizard xywh {114 71 24 24} box THIN_UP_BOX
        code0 {o->image(pixmap[(int)Type::Wizard]);}
        class {fld::widget::Bin_Button}
      }
      Fl_Button {} {
        user_data {"Fl_Grid"}
        callback type_make_cb
        tooltip Grid xywh {139 71 24 24} box THIN_UP_BOX
        code0 {o->image(pixmap[(int)Type::Grid]);}
        class {fld::widget::Bin_Button}
      }
    }
    Fl_Group {} {
      label Buttons open
      xywh {171 19 54 79} labelsize 12
    } {
      Fl_Button {} {
        user_data {"Fl_Button"}
        callback type_make_cb
        tooltip Button xywh {173 21 24 24} box THIN_UP_BOX
        code0 {o->image(pixmap[(int)Type::Button]);}
        class {fld::widget::Bin_Button}
      }
      Fl_Button {} {
        user_data {"Fl_Return_Button"}
        callback type_make_cb
        tooltip {Return Button} xywh {198 21 24 24} box THIN_UP_BOX
        code0 {o->image(pixmap[(int)Type::Return_Button]);}
        class {fld::widget::Bin_Button}
      }
      Fl_Button {} {
        user_data {"Fl_Light_Button"}
        callback type_make_cb
        tooltip {Light Button} xywh {173 46 24 24} box THIN_UP_BOX
        code0 {o->image(pixmap[(int)Type::Light_Button]);}
        class {fld::widget::Bin_Button}
      }
      Fl_Button {} {
        user_data {"Fl_Repeat_Button"}
        callback type_make_cb
        tooltip {Repeat Button} xywh {198 46 24 24} box THIN_UP_BOX
        code0 {o->image(pixmap[(int)Type::Repeat_Button]);}
        class {fld::widget::Bin_Button}
      }
      Fl_Button {} {
        user_data {"Fl_Check_Button"}
        callback type_make_cb
        tooltip {Check Button} xywh {173 71 24 24} box THIN_UP_BOX
        code0 {o->image(pixmap[(int)Type::Check_Button]);}
        class {fld::widget::Bin_Button}
      }
      Fl_Button {} {
        user_data {"Fl_Round_Button"}
        callback type_make_cb
        tooltip {Round Button} xywh {198 71 24 24} box THIN_UP_BOX
        code0 {o->image(pixmap[(int)Type::Round_Button]);}
        class {fld::widget::Bin_Button}
      }
    }
    Fl_Group {} {
      label Valuators open
      xywh {230 19 104 79} labelsize 12
    } {
      Fl_Button {} {
        user_data {"Fl_Slider"}
        callback type_make_cb
        tooltip Slider xywh {232 21 24 24} box THIN_UP_BOX
        code0 {o->image(pixmap[(int)Type::Slider]);}
        class {fld::widget::Bin_Button}
      }
      Fl_Button {} {
        user_data {"Fl_Scrollbar"}
        callback type_make_cb
        tooltip {Scroll Bar} xywh {257 21 24 24} box THIN_UP_BOX
        code0 {o->image(pixmap[(int)Type::Scrollbar]);}
        class {fld::widget::Bin_Button}
      }
      Fl_Button {} {
        user_data {"Fl_Value_Slider"}
        callback type_make_cb
        tooltip {Value Slider} xywh {282 21 24 24} box THIN_UP_BOX
        code0 {o->image(pixmap[(int)Type::Value_Slider]);}
        class {fld::widget::Bin_Button}
      }
      Fl_Button {} {
        user_data {"Fl_Value_Output"}
        callback type_make_cb
        tooltip {Value Output} xywh {307 21 24 24} box THIN_UP_BOX
        code0 {o->image(pixmap[(int)Type::Value_Output]);}
        class {fld::widget::Bin_Button}
      }
      Fl_Button {} {
        user_data {"Fl_Adjuster"}
        callback type_make_cb
        tooltip Adjuster xywh {232 46 24 24} box THIN_UP_BOX
        code0 {o->image(pixmap[(int)Type::Adjuster]);}
        class {fld::widget::Bin_Button}
      }
      Fl_Button {} {
        user_data {"Fl_Counter"}
        callback type_make_cb
        tooltip Counter xywh {257 46 24 24} box THIN_UP_BOX
        code0 {o->image(pixmap[(int)Type::Counter]);}
        class {fld::widget::Bin_Button}
      }
      Fl_Button {} {
        user_data {"Fl_Dial"}
        callback type_make_cb
        tooltip Dial xywh {282 46 24 24} box THIN_UP_BOX
        code0 {o->image(pixmap[(int)Type::Dial]);}
        class {fld::widget::Bin_Button}
      }
      Fl_Button {} {
        user_data {"Fl_Roller"}
        callback type_make_cb
        tooltip Roller xywh {232 71 24 24} box THIN_UP_BOX
        code0 {o->image(pixmap[(int)Type::Roller]);}
        class {fld::widget::Bin_Button}
      }
      Fl_Button {} {
        user_data {"Fl_Spinner"}
        callback type_make_cb
        tooltip Spinner xywh {257 71 24 24} box THIN_UP_BOX
        code0 {o->image(pixmap[(int)Type::Spinner]);}
        class {fld::widget::Bin_Button}
      }
      Fl_Button {} {
        user_data {"Fl_Value_Input"}
        callback type_make_cb
        tooltip {Value Input} xywh {282 71 24 24} box THIN_UP_BOX
        code0 {o->image(pixmap[(int)Type::Value_Input]);}
        class {fld::widget::Bin_Button}
      }
    }
    Fl_Group {} {
      label Text open
      xywh {339 19 54 79} labelsize 12
    } {
      Fl_Button {} {
        user_data {"Fl_Input"}
        callback type_make_cb
        tooltip Input xywh {341 21 24 24} box THIN_UP_BOX
        code0 {o->image(pixmap[(int)Type::Input]);}
        class {fld::widget::Bin_Button}
      }
      Fl_Button {} {
        user_data {"Fl_Output"}
        callback type_make_cb
        tooltip Output xywh {366 21 24 24} box THIN_UP_BOX
        code0 {o->image(pixmap[(int)Type::Output]);}
        class {fld::widget::Bin_Button}
      }
      Fl_Button {} {
        user_data {"Fl_Text_Editor"}
        callback type_make_cb
        tooltip {Text Edit} xywh {341 46 24 24} box THIN_UP_BOX
        code0 {o->image(pixmap[(int)Type::Text_Editor]);}
        class {fld::widget::Bin_Button}
      }
      Fl_Button {} {
        user_data {"Fl_Text_Display"}
        callback type_make_cb
        tooltip {Text Display} xywh {366 46 24 24} box THIN_UP_BOX
        code0 {o->image(pixmap[(int)Type::Text_Display]);}
        class {fld::widget::Bin_Button}
      }
      Fl_Button {} {
        user_data {"Fl_File_Input"}
        callback type_make_cb
        tooltip {File Input} xywh {341 71 24 24} box THIN_UP_BOX
        code0 {o->image(pixmap[(int)Type::File_Input]);}
        class {fld::widget::Bin_Button}
      }
      Fl_Button {} {
        user_data {"Fl_Terminal"}
        callback type_make_cb
        tooltip Terminal xywh {366 71 24 24} box THIN_UP_BOX
        code0 {o->image(pixmap[(int)Type::Terminal]);}
        class {fld::widget::Bin_Button}
      }
    }
    Fl_Group {} {
      label Menus open
      xywh {398 19 79 79} labelsize 12
    } {
      Fl_Button {} {
        user_data {"Fl_Input_Choice"}
        callback type_make_cb
        tooltip {Input Choice} xywh {400 22 24 24} box THIN_UP_BOX
        code0 {o->image(pixmap[(int)Type::Input_Choice]);}
        class {fld::widget::Bin_Button}
      }
      Fl_Button {} {
        user_data {"menuitem"}
        callback type_make_cb
        tooltip {Menu Item} xywh {425 21 24 24} box THIN_UP_BOX
        code0 {o->image(pixmap[(int)Type::Menu_Item]);}
        class {fld::widget::Bin_Button}
      }
      Fl_Button {} {
        user_data {"Fl_Menu_Bar"}
        callback type_make_cb
        tooltip {Menu Bar} xywh {450 21 24 24} box THIN_UP_BOX
        code0 {o->image(pixmap[(int)Type::Menu_Bar]);}
        class {fld::widget::Bin_Button}
      }
      Fl_Button {} {
        user_data {"Fl_Menu_Button"}
        callback type_make_cb
        tooltip {Menu Button} xywh {400 46 24 24} box THIN_UP_BOX
        code0 {o->image(pixmap[(int)Type::Menu_Button]);}
        class {fld::widget::Bin_Button}
      }
      Fl_Button {} {
        user_data {"checkmenuitem"}
        callback type_make_cb
        tooltip {Checkbox Menu Item} xywh {425 46 24 24} box THIN_UP_BOX
        code0 {o->image(pixmap[(int)Type::Checkbox_Menu_Item]);}
        class {fld::widget::Bin_Button}
      }
      Fl_Button {} {
        user_data {"submenu"}
        callback type_make_cb
        tooltip {Sub Menu} xywh {450 46 24 24} box THIN_UP_BOX
        code0 {o->image(pixmap[(int)Type::Submenu]);}
        class {fld::widget::Bin_Button}
      }
      Fl_Button {} {
        user_data {"Fl_Choice"}
        callback type_make_cb
        tooltip Choice xywh {400 71 24 24} box THIN_UP_BOX
        code0 {o->image(pixmap[(int)Type::Choice]);}
        class {fld::widget::Bin_Button}
      }
      Fl_Button {} {
        user_data {"radiomenuitem"}
        callback type_make_cb
        tooltip {Radio Menu Item} xywh {425 71 24 24} box THIN_UP_BOX
        code0 {o->image(pixmap[(int)Type::Radio_Menu_Item]);}
        class {fld::widget::Bin_Button}
      }
    }
    Fl_Group {} {
      label Browsers open
      xywh {482 19 54 79} labelsize 12
    } {
      Fl_Button {} {
        user_data {"Fl_Browser"}
        callback type_make_cb
        tooltip Browser xywh {484 21 24 24} box THIN_UP_BOX
        code0 {o->image(pixmap[(int)Type::Browser]);}
        class {fld::widget::Bin_Button}
      }
      Fl_Button {} {
        user_data {"Fl_Tree"}
        callback type_make_cb
        tooltip Tree xywh {509 21 24 24} box THIN_UP_BOX
        code0 {o->image(pixmap[(int)Type::Tree]);}
        class {fld::widget::Bin_Button}
      }
      Fl_Button {} {
        user_data {"Fl_Check_Browser"}
        callback type_make_cb
        tooltip {Check Browser} xywh {484 46 24 24} box THIN_UP_BOX
        code0 {o->image(pixmap[(int)Type::Check_Browser]);}
        class {fld::widget::Bin_Button}
      }
      Fl_Button {} {
        user_data {"Fl_Help_View"}
        callback type_make_cb
        tooltip {Help Browser} xywh {509 46 24 24} box THIN_UP_BOX
        code0 {o->image(pixmap[(int)Type::Help_View]);}
        class {fld::widget::Bin_Button}
      }
      Fl_Button {} {
        user_data {"Fl_File_Browser"}
        callback type_make_cb
        tooltip {File Browser} xywh {484 71 24 24} box THIN_UP_BOX
        code0 {o->image(pixmap[(int)Type::File_Browser]);}
        class {fld::widget::Bin_Button}
      }
      Fl_Button {} {
        user_data {"Fl_Table"}
        callback type_make_cb
        tooltip Table xywh {509 71 24 24} box THIN_UP_BOX
        code0 {o->image(pixmap[(int)Type::Table]);}
        class {fld::widget::Bin_Button}
      }
    }
    Fl_Group {} {
      label Misc open
      xywh {540 19 55 79} labelsize 12
    } {
      Fl_Button {} {
        user_data {"Fl_Box"}
        callback type_make_cb
        tooltip Box xywh {542 21 24 24} box THIN_UP_BOX
        code0 {o->image(pixmap[(int)Type::Box]);}
        class {fld::widget::Bin_Button}
      }
      Fl_Button {} {
        user_data {"Fl_Clock"}
        callback type_make_cb
        tooltip Clock xywh {567 21 24 24} box THIN_UP_BOX
        code0 {o->image(pixmap[(int)Type::Clock]);}
        class {fld::widget::Bin_Button}
      }
      Fl_Button {} {
        user_data {"Fl_Progress"}
        callback type_make_cb
        tooltip Progress xywh {542 46 24 24} box THIN_UP_BOX
        code0 {o->image(pixmap[(int)Type::Progress]);}
        class {fld::widget::Bin_Button}
      }
    }
  }
}

comment {
//} {in_source in_header
}