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