Added confirmation on quit.
[epichord.git] / src / ui.fl
blob13433c6b746a3bbbfdad19e16358d6b90ce4c588
1 # data file for the FLTK User Interface Designer (FLUID)
2 version 2.1000 
3 images_dir header_name 
4 do_not_include_H_from_C 
5 header_name {.h} 
6 code_name {.cpp} 
7 gridx 5 
8 gridy 5 
9 snap 3
10 decl {/*
11    Epichord - a midi sequencer
12    Copyright (C) 2008  Evan Rinehart
14    This program is free software; you can redistribute it and/or
15    modify it under the terms of the GNU General Public License
16    as published by the Free Software Foundation; either version 2
17    of the License, or (at your option) any later version.
19    This program is distributed in the hope that it will be useful,
20    but WITHOUT ANY WARRANTY; without even the implied warranty of
21    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
22    GNU General Public License for more details.
24    You should have received a copy of the GNU General Public License
25    along with this program; if not, write to
27    The Free Software Foundation, Inc.
28    51 Franklin Street, Fifth Floor
29    Boston, MA  02110-1301, USA
30 */} {} 
32 decl {\#include <stdlib.h>} {} 
34 decl {\#include <fltk/events.h>} {} 
36 decl {\#include <fltk/file_chooser.h>} {} 
38 decl {\#include "backend.h"} {} 
40 decl {\#include "util.h"} {} 
42 decl {\#include "uihelper.h"} {} 
44 decl {\#include "config.h"} {} 
46 decl {extern UI* ui;} {} 
48 class UI {open
49 } {
50   Function {UI()} {open
51   } {
52     {fltk::Window} main_window {
53       label Epichord
54       callback {if(!fltk::ask("Quit?")){
55   return;
58 config_window->hide();
59 help_window->hide();
60 action_window->hide();
61 scope_window->hide();
62 o->hide();
64 save_config();} selected
65       xywh {31 41 640 480} resizable
66       extra_code {\#include <stdio.h>
68 \#include <fltk/ask.h>
70 \#include "seq.h"
71 \#include "trackmodule.h"
72 o->size_range(640,455);
73 o->resize(640,455);} visible
74     } {
75       {fltk::Group} {} {
76         xywh {0 0 640 445}
77       } {
78         {fltk::Group} song_edit {open
79           xywh {0 0 640 445}
80         } {
81           {fltk::Group} {} {
82             xywh {0 0 255 445} box FLAT_BOX
83           } {
84             {fltk::Widget} track_info {
85               label {track info}
86               xywh {0 15 255 415} resizable
87               extra_code {\#include "trackinfo.h"}
88               class TrackInfo
89             }
90             {fltk::Button} {} {
91               label {@line}
92               callback {ui->track_info->toggle_controls();}
93               xywh {0 0 255 15}
94             }
95           }
96           {fltk::Group} {} {open
97             xywh {255 0 385 15}
98           } {
99             {fltk::Widget} song_timeline {
100               label timeline
101               xywh {0 0 370 15} resizable
102               extra_code {o->scale=16;
103 o->label_scale=4;}
104               class Timeline
105             }
106           }
107           {fltk::Group} song_scrollgroup {open
108             xywh {255 15 385 430} resizable
109           } {
110             {fltk::Widget} arranger {
111               label arranger
112               xywh {0 0 370 415} resizable box FLAT_BOX
113               extra_code {\#include "seq.h"
114 \#include "arranger.h"}
115               class Arranger
116             }
117             {fltk::Scrollbar} song_vscroll {
118               callback {int target = (int)o->value();
119 int dummy = ui->arranger->scrollx;
120 ui->arranger->scrollTo(dummy,target);}
121               xywh {370 0 15 415} slider_size 60
122             }
123             {fltk::ThumbWheel} song_hscroll {
124               callback {ui->arranger->scrollTo((int)o->value(),ui->arranger->scrolly);}
125               xywh {0 415 370 15} maximum 10000 step 10
126             }
127           }
128         }
129         {fltk::Group} pattern_edit {open
130           xywh {0 0 640 445} hide
131         } {
132           {fltk::Group} {} {open
133             xywh {45 0 595 445} resizable
134           } {
135             {fltk::Group} {} {
136               xywh {0 0 595 15}
137             } {
138               {fltk::Widget} pattern_timeline {
139                 label timeline
140                 xywh {0 0 580 15} resizable box FLAT_BOX
141                 extra_code {\#include "timeline.h"
142 o->edit_flag = 1;}
143                 class Timeline
144               }
145             }
146             {fltk::Group} pattern_scrollgroup {open
147               xywh {0 15 595 355} resizable
148             } {
149               {fltk::Widget} piano_roll {
150                 label pianoroll
151                 xywh {0 0 580 340} resizable box FLAT_BOX
152                 extra_code {\#include "pianoroll.h"}
153                 class PianoRoll
154               }
155               {fltk::Scrollbar} pattern_vscroll {
156                 callback {int target = (int)o->value();
157 int dummy = ui->piano_roll->scrollx;
158 ui->piano_roll->scrollTo(dummy,target);}
159                 xywh {580 0 15 340}
160               }
161               {fltk::ThumbWheel} pattern_hscroll {
162                 callback {ui->piano_roll->scrollTo((int)o->value(),ui->piano_roll->scrolly);}
163                 xywh {0 340 580 15} step 10
164               }
165             }
166             {fltk::Group} {} {
167               xywh {0 370 595 75}
168             } {
169               {fltk::Widget} event_edit {
170                 label {event editor}
171                 xywh {0 0 580 75} resizable box FLAT_BOX
172                 extra_code {\#include "eventedit.h"}
173                 class EventEdit
174               }
175               {fltk::Widget} event_menu {
176                 xywh {0 0 580 75} hide box FLAT_BOX
177                 extra_code {\#include "eventmenu.h"}
178                 class EventMenu
179               }
180               {fltk::Button} event_menu_button {
181                 label E
182                 callback {if(o->state()==0){
183   ui->event_menu->hide();
184   ui->event_edit->show();
186 else{
187   ui->event_edit->hide();
188   ui->event_edit->recount_has();
189   ui->event_menu->show();
191                 tooltip {pick event type}
192                 xywh {580 0 15 15}
193                 extra_code {o->type(fltk::Button::TOGGLE);}
194               }
195               {fltk::Button} {} {
196                 label L
197                 callback {ui->event_edit->label_flag = o->state();
198 ui->event_edit->redraw();}
199                 tooltip {toggle event value labels}
200                 xywh {580 15 15 15}
201                 extra_code {o->type(fltk::Button::TOGGLE);}
202               }
203               {fltk::Button} {} {
204                 label C
205                 callback {ui->event_edit->clear_events();}
206                 tooltip {clear these events}
207                 xywh {580 30 15 15}
208               }
209               {fltk::Button} {} {
210                 label X
211                 callback {ui->event_edit->clear_non_note_events();}
212                 tooltip {clear all non note events in pattern}
213                 xywh {580 45 15 15}
214               }
215               {fltk::Button} {} {
216                 label Z
217                 callback {ui->event_edit->clear_all_events();}
218                 tooltip {clear everything}
219                 xywh {580 60 15 15} labelcolor 0xff000000
220               }
221             }
222           }
223           {fltk::Group} {} {open
224             xywh {0 0 45 445} horizontal
225           } {
226             {fltk::Button} {} {
227               label {@line}
228               xywh {0 0 45 15}
229             }
230             {fltk::Group} {} {open
231               xywh {0 15 45 340} resizable
232             } {
233               {fltk::Widget} track_select {
234                 label {track picker}
235                 xywh {0 35 45 305}
236                 extra_code {\#include "trackselect.h"}
237                 class TrackSelect
238               }
239               {fltk::Widget} sample_view {
240                 label {sample names}
241                 xywh {0 35 45 305}
242                 extra_code {\#include "sampleview.h"}
243                 class SampleView
244               }
245               {fltk::Widget} keyboard {
246                 label keyboard
247                 xywh {0 0 45 340}
248                 extra_code {\#include "keyboard.h"}
249                 class Keyboard
250               }
251             }
252             {fltk::Button} {} {
253               label {@<-}
254               callback {show_song_edit();}
255               xywh {0 370 45 75}
256             }
257           }
258         }
259       }
260       {fltk::Group} {} {open
261         xywh {0 445 640 35} box UP_BOX
262       } {
263         {fltk::Button} play_button {
264           label {@>}
265           callback {press_play();}
266           xywh {5 5 25 25} labelcolor 0x800000
267         }
268         {fltk::Button} stop_button {
269           label {@square}
270           callback {press_stop();}
271           xywh {35 5 25 25} labelcolor 0x800000
272         }
273         {fltk::Button} record_button {
274           label {@circle}
275           callback {toggle_backend_recording();}
276           xywh {65 5 25 25} labelcolor 0xff000000
277           extra_code {o->type(fltk::Button::TOGGLE);}
278         }
279         {fltk::Widget} metronome {
280           label 0
281           xywh {95 5 25 25} color 56 labelcolor 0xffffff00
282           extra_code {\#include <metronome.h>}
283           class Metronome
284         }
285         {fltk::Group} {} {open
286           xywh {125 0 20 35} resizable
287         } {}
288         {fltk::Group} pattern_buttons {
289           xywh {145 5 310 25} hide
290         } {
291           {fltk::Button} qbutton4 {
292             callback {set_quant(4);}
293             xywh {135 0 25 25}
294             extra_code {o->type(fltk::Button::TOGGLE);}
295           }
296           {fltk::Button} qbutton8 {
297             callback {set_quant(8);}
298             xywh {160 0 25 25}
299             extra_code {o->type(fltk::Button::TOGGLE);}
300           }
301           {fltk::Button} qbutton16 {
302             callback {set_quant(16);}
303             xywh {185 0 25 25}
304             extra_code {o->type(fltk::Button::TOGGLE);
305 o->state(1);}
306           }
307           {fltk::Button} qbutton32 {
308             callback {set_quant(32);}
309             xywh {210 0 25 25}
310             extra_code {o->type(fltk::Button::TOGGLE);}
311           }
312           {fltk::Button} qbutton64 {
313             callback {set_quant(64);}
314             xywh {235 0 25 25}
315             extra_code {o->type(fltk::Button::TOGGLE);}
316           }
317           {fltk::Button} qbutton128 {
318             callback {set_quant(128);}
319             xywh {260 0 25 25}
320             extra_code {o->type(fltk::Button::TOGGLE);}
321           }
322           {fltk::Button} qbutton0 {
323             callback {set_quant(0);}
324             xywh {285 0 25 25}
325             extra_code {o->type(fltk::Button::TOGGLE);}
326           }
327           {fltk::Button} quant1_button {
328             label qua
329             tooltip {quantize selected notes}
330             xywh {15 0 25 25}
331           }
332           {fltk::Button} quant0_button {
333             label qu_
334             tooltip {quantize length of selected notes}
335             xywh {45 0 25 25}
336           }
337           {fltk::Button} tool_button {
338             label tool
339             callback {toggle_tool();}
340             xywh {75 0 25 25}
341           }
342         }
343         {fltk::Group} song_buttons {open
344           xywh {330 5 145 25}
345         } {
346           {fltk::Button} edit_button {
347             callback {set_songtool(0);}
348             tooltip {create delete move resize select paste blocks}
349             xywh {0 0 25 25} value 1
350           }
351           {fltk::Button} color_button {
352             callback {set_songtool(1);}
353             tooltip {color tool}
354             xywh {25 0 25 25}
355             extra_code {o->type(fltk::Button::TOGGLE);}
356           }
357           {fltk::Button} unclone_button {
358             callback {set_songtool(2);}
359             tooltip {click on blocks to unclone them}
360             xywh {50 0 25 25}
361             extra_code {o->type(fltk::Button::TOGGLE);}
362           }
363           {fltk::Button} split_button {
364             callback {set_songtool(3);}
365             tooltip {click on a block to split in two}
366             xywh {75 0 25 25}
367             extra_code {o->type(fltk::Button::TOGGLE);}
368           }
369           {fltk::Button} join_button {
370             callback {set_songtool(4);}
371             tooltip {click on adjacent blocks to join them}
372             xywh {100 0 25 25}
373             extra_code {o->type(fltk::Button::TOGGLE);}
374           }
375         }
376         {fltk::Button} loop_toggle {
377           callback {toggle_loop();}
378           tooltip {toggle looping}
379           xywh {490 5 25 25}
380           extra_code {o->type(fltk::Button::TOGGLE);}
381         }
382         {fltk::Button} conf_toggle {
383           callback {if(o->state()){
384   ui->config_window->show();
386 else{
387   ui->config_window->hide();
389           tooltip configuration
390           xywh {520 5 25 25}
391           extra_code {o->type(fltk::Button::TOGGLE);}
392         }
393         {fltk::Button} scope_button {
394           callback {if(o->state()){
395   ui->scope_window->show();
397 else{
398   ui->scope_window->hide();
400           tooltip scope
401           xywh {550 5 25 25}
402           extra_code {o->type(fltk::Button::TOGGLE);}
403         }
404         {fltk::Button} file_button {
405           callback {if(o->state()){
406   ui->action_window->show();
408 else{
409   ui->action_window->hide();
411           tooltip disk
412           xywh {580 5 25 25}
413           extra_code {\#include "saveload.h"
414 o->type(fltk::Button::TOGGLE);}
415         }
416         {fltk::Button} help_button {
417           callback {if(o->state()){
418   ui->help_window->show();
420 else{
421   ui->help_window->hide();
423           tooltip help
424           xywh {610 5 25 25}
425           extra_code {o->type(fltk::Button::TOGGLE);}
426         }
427       }
428     }
429     {fltk::Window} config_window {
430       label controls
431       xywh {52 125 320 285} hide
432     } {
433       {fltk::TabGroup} {} {open
434         xywh {0 0 320 285}
435       } {
436         {fltk::Group} {} {
437           label options
438           xywh {145 15 170 265} horizontal
439         } {
440           {fltk::ValueInput} beats_per_measure {
441             label {beats per measure}
442             callback {if(o->value() > o->maximum())
443   o->value(o->maximum());
444 if(o->value() < o->minimum())
445   o->value(o->minimum());
446 set_beats_per_measure((int)o->value());}
447             xywh {5 5 45 20} minimum 1 maximum 31 step 1 value 4
448           }
449           {fltk::ValueInput} measures_per_phrase {
450             label {measures per phrase}
451             callback {if(o->value() > o->maximum())
452   o->value(o->maximum());
453 if(o->value() < o->minimum())
454   o->value(o->minimum());
455 set_measures_per_phrase((int)o->value());}
456             xywh {5 30 45 20} maximum 128 step 1 value 4
457           }
458           {fltk::ValueOutput} bpm_output {
459             label bpm
460             xywh {5 55 45 20} minimum 1 maximum 1000 step 1 value 120
461           }
462           {fltk::ThumbWheel} bpm_wheel {
463             callback {set_bpm((int)o->value());
464 ui->bpm_output->value(o->value());}
465             xywh {55 55 105 20} align 4 minimum 1 maximum 1000 step 1 value 120
466           }
467           {fltk::ValueInput} measures_until_record {
468             label {measures until record}
469             callback {if(o->value() > o->maximum())
470   o->value(o->maximum());
471 if(o->value() < o->minimum())
472   o->value(o->minimum());
473 set_measures_until_record((int)o->value());}
474             xywh {5 80 45 20} maximum 128 step 1 value 1
475           }
476           {fltk::CheckButton} check_alwayscopy {
477             label {always hard copy}
478             callback {set_alwayscopy(o->value());}
479             tooltip {instead of making a linked clone when you copy a block in the song view.}
480             xywh {5 105 25 25} align 4
481           }
482           {fltk::CheckButton} check_autotrackname {
483             label {auto track name}
484             callback {set_autotrackname(o->value());}
485             tooltip {Fill in GM instruments for track names when you change the program.}
486             xywh {145 105 25 25} align 4
487           }
488           {fltk::CheckButton} check_passthru {
489             label {record pass-thru}
490             callback {set_passthru(o->value());}
491             tooltip {Echo midi input to midi output.}
492             xywh {5 130 25 26} horizontal align 4 value 1
493           }
494           {fltk::CheckButton} check_playinsert {
495             label {play note insertion}
496             callback {set_playinsert(o->value());}
497             tooltip {Send midi note on when you create notes.}
498             xywh {145 130 25 26} horizontal align 4 value 1
499           }
500           {fltk::CheckButton} check_recordonchan {
501             label {record on channel}
502             callback {set_recordonchan(o->value());}
503             tooltip {Record on first track that matches channel of midi input instead of selected track.}
504             xywh {5 155 25 25} align 4
505           }
506           {fltk::CheckButton} check_playmove {
507             label {play note move}
508             callback {set_playmove(o->value());}
509             tooltip {Send midi note on when you move notes.}
510             xywh {145 155 25 26} horizontal align 4 value 1
511           }
512           {fltk::CheckButton} check_follow {
513             label {follow playback}
514             callback {set_follow(o->value());}
515             tooltip {Auto scroll horizontally when play head leaves viewing area.}
516             xywh {5 179 25 26} horizontal align 4 value 1
517           }
518           {fltk::ValueInput} default_velocity {
519             label {default velocity}
520             callback {if(o->value() > o->maximum())
521   o->value(o->maximum());
522 if(o->value() < o->minimum())
523   o->value(o->minimum());
524 set_defaultvelocity((int)o->value());}
525             xywh {120 180 45 20} maximum 127 step 1 value 96
526           }
527           {fltk::Choice} menu_recordmode {
528             label {record mode} open
529             xywh {5 210 160 25}
530           } {
531             {fltk::Item} {} {
532               label merge
533               callback {set_recordmode(0);}
534               }
535             {fltk::Item} {} {
536               label overwrite
537               callback {set_recordmode(1);}
538               }
539             {fltk::Item} {} {
540               label layer
541               callback {set_recordmode(2);}
542               }
543           }
544           {fltk::Choice} menu_rob {
545             label {record outside block} open
546             xywh {5 240 160 25}
547           } {
548             {fltk::Item} {} {
549               label {do nothing}
550               callback {set_robmode(0);}
551               }
552             {fltk::Item} {} {
553               label {new block}
554               callback {set_robmode(1);}
555               }
556             {fltk::Item} {} {
557               label {extend block}
558               callback {set_robmode(2);}
559               }
560           }
561         }
562         {fltk::Group} {} {
563           label keyboard
564           xywh {0 15 320 270} hide
565         } {
566           {fltk::Widget} kg_l0 {
567             label C0
568             xywh {35 5 45 15} align 4
569             class KeyGrabber
570           }
571           {fltk::Widget} kg_l1 {
572             label {C\#0}
573             xywh {35 20 45 15} align 4
574             class KeyGrabber
575           }
576           {fltk::Widget} kg_l2 {
577             label D0
578             xywh {35 35 45 15} align 4
579             class KeyGrabber
580           }
581           {fltk::Widget} kg_l3 {
582             label {D\#0}
583             xywh {35 50 45 15} align 4
584             class KeyGrabber
585           }
586           {fltk::Widget} kg_l4 {
587             label E0
588             xywh {35 65 45 15} align 4
589             class KeyGrabber
590           }
591           {fltk::Widget} kg_l5 {
592             label F0
593             xywh {35 80 45 15} align 4
594             class KeyGrabber
595           }
596           {fltk::Widget} kg_l6 {
597             label {F\#0}
598             xywh {35 95 45 15} align 4
599             class KeyGrabber
600           }
601           {fltk::Widget} kg_l7 {
602             label G0
603             xywh {35 110 45 15} align 4
604             class KeyGrabber
605           }
606           {fltk::Widget} kg_l8 {
607             label {G\#0}
608             xywh {35 125 45 15} align 4
609             class KeyGrabber
610           }
611           {fltk::Widget} kg_l9 {
612             label A0
613             xywh {35 140 45 15} align 4
614             class KeyGrabber
615           }
616           {fltk::Widget} kg_l10 {
617             label {A\#0}
618             callback {;}
619             xywh {35 155 45 15} align 4
620             class KeyGrabber
621           }
622           {fltk::Widget} kg_l11 {
623             label B0
624             xywh {35 170 45 15} align 4
625             class KeyGrabber
626           }
627           {fltk::Widget} kg_l12 {
628             label C1
629             xywh {35 185 45 15} align 4
630             class KeyGrabber
631           }
632           {fltk::Widget} kg_l13 {
633             label {C\#1}
634             xywh {35 200 45 15} align 4
635             class KeyGrabber
636           }
637           {fltk::Widget} kg_l14 {
638             label D1
639             xywh {35 215 45 15} align 4
640             class KeyGrabber
641           }
642           {fltk::Widget} kg_l15 {
643             label {D\#1}
644             xywh {35 230 45 15} align 4
645             class KeyGrabber
646           }
647           {fltk::Widget} kg_l16 {
648             label E1
649             xywh {35 245 45 15} align 4
650             class KeyGrabber
651           }
652           {fltk::Widget} kg_u0 {
653             label C1
654             xywh {130 5 45 15} align 4
655             class KeyGrabber
656           }
657           {fltk::Widget} kg_u1 {
658             label {C\#1}
659             xywh {130 20 45 15} align 4
660             class KeyGrabber
661           }
662           {fltk::Widget} kg_u2 {
663             label D1
664             xywh {130 35 45 15} align 4
665             class KeyGrabber
666           }
667           {fltk::Widget} kg_u3 {
668             label {D\#1}
669             xywh {130 50 45 15} align 4
670             class KeyGrabber
671           }
672           {fltk::Widget} kg_u4 {
673             label E1
674             xywh {130 65 45 15} align 4
675             class KeyGrabber
676           }
677           {fltk::Widget} kg_u5 {
678             label F1
679             xywh {130 80 45 15} align 4
680             class KeyGrabber
681           }
682           {fltk::Widget} kg_u6 {
683             label {F\#1}
684             xywh {130 95 45 15} align 4
685             class KeyGrabber
686           }
687           {fltk::Widget} kg_u7 {
688             label G1
689             xywh {130 110 45 15} align 4
690             class KeyGrabber
691           }
692           {fltk::Widget} kg_u8 {
693             label {G\#1}
694             xywh {130 125 45 15} align 4
695             class KeyGrabber
696           }
697           {fltk::Widget} kg_u9 {
698             label A1
699             xywh {130 140 45 15} align 4
700             class KeyGrabber
701           }
702           {fltk::Widget} kg_u10 {
703             label {A\#1}
704             xywh {130 155 45 15} align 4
705             class KeyGrabber
706           }
707           {fltk::Widget} kg_u11 {
708             label B1
709             xywh {130 170 45 15} align 4
710             class KeyGrabber
711           }
712           {fltk::Widget} kg_u12 {
713             label C2
714             xywh {130 185 45 15} align 4
715             class KeyGrabber
716           }
717           {fltk::Widget} kg_u13 {
718             label {C\#2}
719             xywh {130 200 45 15} align 4
720             class KeyGrabber
721           }
722           {fltk::Widget} kg_u14 {
723             label D2
724             xywh {130 215 45 15} align 4
725             class KeyGrabber
726           }
727           {fltk::Widget} kg_u15 {
728             label {D\#2}
729             xywh {130 230 45 15} align 4
730             class KeyGrabber
731           }
732           {fltk::Widget} kg_u16 {
733             label E2
734             xywh {130 245 45 15} align 4
735             class KeyGrabber
736           }
737           {fltk::Widget} kg_u17 {
738             label F2
739             xywh {265 5 45 15} align 4
740             class KeyGrabber
741           }
742           {fltk::Widget} kg_u18 {
743             label {F\#2}
744             xywh {265 20 45 15} align 4
745             class KeyGrabber
746           }
747           {fltk::Widget} kg_u19 {
748             label G2
749             xywh {265 35 45 15} align 4
750             class KeyGrabber
751           }
752           {fltk::Widget} kg_u20 {
753             label {G\#2}
754             xywh {265 50 45 15} align 4
755             class KeyGrabber
756           }
757           {fltk::Widget} kg_zi {
758             label {zoom in}
759             xywh {265 65 45 15} align 4
760             class KeyGrabber
761           }
762           {fltk::Widget} kg_zo {
763             label {zoom out}
764             xywh {265 80 45 15} align 4
765             class KeyGrabber
766           }
767           {fltk::Widget} kg_ou {
768             label {octave up}
769             xywh {265 95 45 15} align 4
770             class KeyGrabber
771           }
772           {fltk::Widget} kg_od {
773             label {octave down}
774             xywh {265 110 45 15} align 4
775             class KeyGrabber
776           }
777         }
778         {fltk::Group} {} {
779           label colors open
780           xywh {0 15 320 270} hide
781         } {
782           {fltk::Button} {} {
783             label apply
784             xywh {250 245 65 20}
785           }
786           {fltk::Choice} {} {
787             label presets open
788             xywh {55 10 100 20}
789           } {
790             {fltk::Item} {} {
791               label windo
792               }
793             {fltk::Item} {} {
794               label midnight
795               }
796             {fltk::Item} {} {
797               label xterm
798               }
799           }
800         }
801       }
802     }
803     {fltk::Window} help_window {
804       label help
805       xywh {519 345 580 370} hide resizable
806       extra_code {o->size_range(580,370);}
807     } {
808       {fltk::TabGroup} {} {open
809         xywh {0 0 580 370}
810       } {
811         {fltk::Group} {} {
812           label info open
813           xywh {0 25 580 345} resizable
814         } {
815           {fltk::Input} title_text {
816             label Title
817             xywh {55 5 520 20}
818           }
819           {fltk::Input} author_text {
820             label Author
821             xywh {55 30 520 20}
822           }
823           {fltk::TextEditor} info_text {
824             xywh {5 55 570 285} resizable textfont 4
825           }
826         }
827         {fltk::Group} {} {
828           label controls open
829           xywh {0 25 580 345} hide
830         } {
831           {fltk::TextDisplay} {} {
832             xywh {5 5 570 335} resizable textfont 4
833             extra_code {load_text(o,ROOT_DATA_DIR"doc/controls.txt");}
834           }
835         }
836         {fltk::Group} {} {
837           label guide open
838           xywh {0 25 580 345} hide
839         } {
840           {fltk::TextDisplay} {} {
841             xywh {5 5 570 335} resizable textfont 4
842             extra_code {load_text(o,ROOT_DATA_DIR"doc/guide.txt");}
843           }
844         }
845         {fltk::Group} {} {
846           label license open
847           xywh {0 25 580 345} hide
848         } {
849           {fltk::TextDisplay} {} {
850             xywh {5 5 570 335} resizable textfont 4
851             extra_code {load_text(o,ROOT_DATA_DIR"doc/license.txt");}
852           }
853         }
854         {fltk::Group} {} {
855           label about open
856           xywh {0 25 580 345} hide
857         } {
858           {fltk::TextDisplay} {} {
859             xywh {5 5 570 335} resizable textfont 4
860             extra_code {load_text(o,ROOT_DATA_DIR"doc/README");}
861           }
862         }
863       }
864     }
865     {fltk::Window} action_window {
866       label menu
867       xywh {286 302 100 130} horizontal hide
868     } {
869       {fltk::Button} {} {
870         label new
871         callback {reset_song();}
872         xywh {5 5 90 20}
873       }
874       {fltk::Button} {} {
875         label save
876         callback {action_window->hide();
877 save();}
878         xywh {5 25 90 20}
879       }
880       {fltk::Button} {} {
881         label {save as}
882         callback {action_window->hide();
883 save(fltk::file_chooser("save file",NULL,get_last_dir()));}
884         xywh {5 45 90 20}
885       }
886       {fltk::Button} {} {
887         label load
888         callback {action_window->hide();
889 if(load(fltk::file_chooser("open file",NULL,get_last_dir()))<0){
890   reset_song();
892         xywh {5 65 90 20}
893       }
894       {fltk::Button} {} {
895         label import
896         callback {action_window->hide();
897 if(loadsmf(fltk::file_chooser("import file",NULL,get_last_dir()))<0){
898   reset_song();
900         xywh {5 85 90 20}
901       }
902       {fltk::Button} {} {
903         label export
904         callback {action_window->hide();
905 savesmf(fltk::file_chooser("export file",NULL,get_last_dir()));}
906         xywh {5 105 90 20}
907       }
908     }
909     {fltk::Window} scope_window {
910       label scope
911       xywh {647 310 425 280} hide resizable
912     } {
913       {fltk::TextDisplay} scope {
914         xywh {5 5 415 245} textfont 4 color 0x280000 textcolor 0xff0000
915         extra_code {o->wrap_mode(1);}
916       }
917       {fltk::Group} {} {
918         xywh {5 255 410 20}
919       } {
920         {fltk::Button} {} {
921           label on
922           callback {if(o->state()){
923   turnonscope();
925 else{
926   turnoffscope();
928           xywh {0 0 40 20}
929           extra_code {o->type(fltk::Button::TOGGLE);}
930         }
931         {fltk::InvisibleBox} {} {
932           xywh {45 0 95 20} resizable
933         }
934       }
935     }
936     code {loop_toggle->image(fltk::SharedImage::get(ROOT_DATA_DIR"gfx/loop.gif"));
937 conf_toggle->image(fltk::SharedImage::get(ROOT_DATA_DIR"gfx/conf.gif"));
938 scope_button->image(fltk::SharedImage::get(ROOT_DATA_DIR"gfx/scope.gif"));
939 file_button->image(fltk::SharedImage::get(ROOT_DATA_DIR"gfx/file.gif"));
940 help_button->image(fltk::SharedImage::get(ROOT_DATA_DIR"gfx/help.gif"));
942 edit_button->image(fltk::SharedImage::get(ROOT_DATA_DIR"gfx/edit.gif"));
943 color_button->image(fltk::SharedImage::get(ROOT_DATA_DIR"gfx/color.gif"));
944 unclone_button->image(fltk::SharedImage::get(ROOT_DATA_DIR"gfx/fork.gif"));
945 split_button->image(fltk::SharedImage::get(ROOT_DATA_DIR"gfx/split.gif"));
946 join_button->image(fltk::SharedImage::get(ROOT_DATA_DIR"gfx/join.gif"));
948 qbutton4->image(fltk::SharedImage::get(ROOT_DATA_DIR"gfx/q4.gif"));
949 qbutton8->image(fltk::SharedImage::get(ROOT_DATA_DIR"gfx/q8.gif"));
950 qbutton16->image(fltk::SharedImage::get(ROOT_DATA_DIR"gfx/q16.gif"));
951 qbutton32->image(fltk::SharedImage::get(ROOT_DATA_DIR"gfx/q32.gif"));
952 qbutton64->image(fltk::SharedImage::get(ROOT_DATA_DIR"gfx/q64.gif"));
953 qbutton128->image(fltk::SharedImage::get(ROOT_DATA_DIR"gfx/q128.gif"));
954 qbutton0->image(fltk::SharedImage::get(ROOT_DATA_DIR"gfx/q0.gif"));} {}
955     code {track_info->set_rec(0);} {}
956     code {start_monitor();} {}
957     code {main_window->show();} {}
958   }