Rearranged the GUI.
[epichord.git] / src / ui.fl
blobaa3507454c5ce0bf1a1b12d8fc5ca5d4248efc4a
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();} open
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} resizable
77       } {
78         {fltk::Group} song_edit {open
79           xywh {0 0 640 445}
80         } {
81           {fltk::Group} {} {open
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 {
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 {
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::Button} loop_toggle {
286           callback {toggle_loop();}
287           tooltip {toggle looping}
288           xywh {125 5 25 25}
289           extra_code {o->type(fltk::Button::TOGGLE);}
290         }
291         {fltk::Group} {} {open
292           xywh {155 0 20 35} resizable
293         } {}
294         {fltk::Group} pattern_buttons {
295           xywh {200 5 310 25} hide
296         } {
297           {fltk::Button} quant1_button {
298             label qua
299             tooltip {quantize selected notes}
300             xywh {35 0 25 25}
301           }
302           {fltk::Button} quant0_button {
303             label qu_
304             tooltip {quantize length of selected notes}
305             xywh {60 0 25 25}
306           }
307           {fltk::Button} tool_button {
308             label tool
309             callback {toggle_tool();}
310             xywh {85 0 25 25}
311           }
312           {fltk::Button} qbutton4 {
313             callback {set_quant(4);}
314             xywh {135 0 25 25}
315             extra_code {o->type(fltk::Button::TOGGLE);}
316           }
317           {fltk::Button} qbutton8 {
318             callback {set_quant(8);}
319             xywh {160 0 25 25}
320             extra_code {o->type(fltk::Button::TOGGLE);}
321           }
322           {fltk::Button} qbutton16 {
323             callback {set_quant(16);}
324             xywh {185 0 25 25}
325             extra_code {o->type(fltk::Button::TOGGLE);
326 o->state(1);}
327           }
328           {fltk::Button} qbutton32 {
329             callback {set_quant(32);}
330             xywh {210 0 25 25}
331             extra_code {o->type(fltk::Button::TOGGLE);}
332           }
333           {fltk::Button} qbutton64 {
334             callback {set_quant(64);}
335             xywh {235 0 25 25}
336             extra_code {o->type(fltk::Button::TOGGLE);}
337           }
338           {fltk::Button} qbutton128 {
339             callback {set_quant(128);}
340             xywh {260 0 25 25}
341             extra_code {o->type(fltk::Button::TOGGLE);}
342           }
343           {fltk::Button} qbutton0 {
344             callback {set_quant(0);}
345             xywh {285 0 25 25}
346             extra_code {o->type(fltk::Button::TOGGLE);}
347           }
348         }
349         {fltk::Group} song_buttons {open
350           xywh {385 5 145 25}
351         } {
352           {fltk::Button} edit_button {
353             callback {set_songtool(0);}
354             tooltip {create delete move resize select paste blocks}
355             xywh {0 0 25 25} value 1
356           }
357           {fltk::Button} color_button {
358             callback {set_songtool(1);}
359             tooltip {color tool}
360             xywh {25 0 25 25}
361             extra_code {o->type(fltk::Button::TOGGLE);}
362           }
363           {fltk::Button} unclone_button {
364             callback {set_songtool(2);}
365             tooltip {click on blocks to unclone them}
366             xywh {50 0 25 25}
367             extra_code {o->type(fltk::Button::TOGGLE);}
368           }
369           {fltk::Button} split_button {
370             callback {set_songtool(3);}
371             tooltip {click on a block to split in two}
372             xywh {75 0 25 25}
373             extra_code {o->type(fltk::Button::TOGGLE);}
374           }
375           {fltk::Button} join_button {
376             callback {set_songtool(4);}
377             tooltip {click on adjacent blocks to join them}
378             xywh {100 0 25 25}
379             extra_code {o->type(fltk::Button::TOGGLE);}
380           }
381         }
382         {fltk::Button} conf_button {
383           callback {if(o->state()){
384   ui->config_window->show();
386 else{
387   ui->config_window->hide();
389           tooltip configuration
390           xywh {535 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 {560 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 {585 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 config
431       callback {ui->conf_button->state(0);
432 o->hide();} open selected
433       xywh {52 125 320 285} hide
434     } {
435       {fltk::TabGroup} {} {open
436         xywh {0 0 320 285}
437       } {
438         {fltk::Group} {} {
439           label options
440           xywh {145 15 170 265} horizontal
441         } {
442           {fltk::ValueInput} beats_per_measure {
443             label {beats per measure}
444             callback {if(o->value() > o->maximum())
445   o->value(o->maximum());
446 if(o->value() < o->minimum())
447   o->value(o->minimum());
448 set_beats_per_measure((int)o->value());}
449             xywh {5 5 45 20} minimum 1 maximum 31 step 1 value 4
450           }
451           {fltk::ValueInput} measures_per_phrase {
452             label {measures per phrase}
453             callback {if(o->value() > o->maximum())
454   o->value(o->maximum());
455 if(o->value() < o->minimum())
456   o->value(o->minimum());
457 set_measures_per_phrase((int)o->value());}
458             xywh {5 30 45 20} maximum 128 step 1 value 4
459           }
460           {fltk::ValueOutput} bpm_output {
461             label bpm
462             xywh {5 55 45 20} minimum 1 maximum 1000 step 1 value 120
463           }
464           {fltk::ThumbWheel} bpm_wheel {
465             callback {set_bpm((int)o->value());
466 ui->bpm_output->value(o->value());}
467             xywh {55 55 105 20} align 4 minimum 1 maximum 1000 step 1 value 120
468           }
469           {fltk::ValueInput} measures_until_record {
470             label {measures until record}
471             callback {if(o->value() > o->maximum())
472   o->value(o->maximum());
473 if(o->value() < o->minimum())
474   o->value(o->minimum());
475 set_measures_until_record((int)o->value());}
476             xywh {5 80 45 20} maximum 128 step 1 value 1
477           }
478           {fltk::CheckButton} check_alwayscopy {
479             label {always hard copy}
480             callback {set_alwayscopy(o->value());}
481             tooltip {instead of making a linked clone when you copy a block in the song view.}
482             xywh {5 105 25 25} align 4
483           }
484           {fltk::CheckButton} check_autotrackname {
485             label {auto track name}
486             callback {set_autotrackname(o->value());}
487             tooltip {Fill in GM instruments for track names when you change the program.}
488             xywh {145 105 25 25} align 4
489           }
490           {fltk::CheckButton} check_passthru {
491             label {record pass-thru}
492             callback {set_passthru(o->value());}
493             tooltip {Echo midi input to midi output.}
494             xywh {5 130 25 26} horizontal align 4 value 1
495           }
496           {fltk::CheckButton} check_playinsert {
497             label {play note insertion}
498             callback {set_playinsert(o->value());}
499             tooltip {Send midi note on when you create notes.}
500             xywh {145 130 25 26} horizontal align 4 value 1
501           }
502           {fltk::CheckButton} check_recordonchan {
503             label {record on channel}
504             callback {set_recordonchan(o->value());}
505             tooltip {Record on first track that matches channel of midi input instead of selected track.}
506             xywh {5 155 25 25} align 4
507           }
508           {fltk::CheckButton} check_playmove {
509             label {play note move}
510             callback {set_playmove(o->value());}
511             tooltip {Send midi note on when you move notes.}
512             xywh {145 155 25 26} horizontal align 4 value 1
513           }
514           {fltk::CheckButton} check_follow {
515             label {follow playback}
516             callback {set_follow(o->value());}
517             tooltip {Auto scroll horizontally when play head leaves viewing area.}
518             xywh {5 179 25 26} horizontal align 4 value 1
519           }
520           {fltk::ValueInput} default_velocity {
521             label {default velocity}
522             callback {if(o->value() > o->maximum())
523   o->value(o->maximum());
524 if(o->value() < o->minimum())
525   o->value(o->minimum());
526 set_defaultvelocity((int)o->value());}
527             xywh {120 180 45 20} maximum 127 step 1 value 96
528           }
529           {fltk::Choice} menu_recordmode {
530             label {record mode} open
531             xywh {5 210 160 25}
532           } {
533             {fltk::Item} {} {
534               label merge
535               callback {set_recordmode(0);}
536               }
537             {fltk::Item} {} {
538               label overwrite
539               callback {set_recordmode(1);}
540               }
541             {fltk::Item} {} {
542               label layer
543               callback {set_recordmode(2);}
544               }
545           }
546           {fltk::Choice} menu_rob {
547             label {record outside block} open
548             xywh {5 240 160 25}
549           } {
550             {fltk::Item} {} {
551               label {do nothing}
552               callback {set_robmode(0);}
553               }
554             {fltk::Item} {} {
555               label {new block}
556               callback {set_robmode(1);}
557               }
558             {fltk::Item} {} {
559               label {extend block}
560               callback {set_robmode(2);}
561               }
562           }
563         }
564         {fltk::Group} {} {
565           label keyboard
566           xywh {0 15 320 270} hide
567         } {
568           {fltk::Widget} kg_l0 {
569             label C0
570             xywh {35 5 45 15} align 4
571             class KeyGrabber
572           }
573           {fltk::Widget} kg_l1 {
574             label {C\#0}
575             xywh {35 20 45 15} align 4
576             class KeyGrabber
577           }
578           {fltk::Widget} kg_l2 {
579             label D0
580             xywh {35 35 45 15} align 4
581             class KeyGrabber
582           }
583           {fltk::Widget} kg_l3 {
584             label {D\#0}
585             xywh {35 50 45 15} align 4
586             class KeyGrabber
587           }
588           {fltk::Widget} kg_l4 {
589             label E0
590             xywh {35 65 45 15} align 4
591             class KeyGrabber
592           }
593           {fltk::Widget} kg_l5 {
594             label F0
595             xywh {35 80 45 15} align 4
596             class KeyGrabber
597           }
598           {fltk::Widget} kg_l6 {
599             label {F\#0}
600             xywh {35 95 45 15} align 4
601             class KeyGrabber
602           }
603           {fltk::Widget} kg_l7 {
604             label G0
605             xywh {35 110 45 15} align 4
606             class KeyGrabber
607           }
608           {fltk::Widget} kg_l8 {
609             label {G\#0}
610             xywh {35 125 45 15} align 4
611             class KeyGrabber
612           }
613           {fltk::Widget} kg_l9 {
614             label A0
615             xywh {35 140 45 15} align 4
616             class KeyGrabber
617           }
618           {fltk::Widget} kg_l10 {
619             label {A\#0}
620             callback {;}
621             xywh {35 155 45 15} align 4
622             class KeyGrabber
623           }
624           {fltk::Widget} kg_l11 {
625             label B0
626             xywh {35 170 45 15} align 4
627             class KeyGrabber
628           }
629           {fltk::Widget} kg_l12 {
630             label C1
631             xywh {35 185 45 15} align 4
632             class KeyGrabber
633           }
634           {fltk::Widget} kg_l13 {
635             label {C\#1}
636             xywh {35 200 45 15} align 4
637             class KeyGrabber
638           }
639           {fltk::Widget} kg_l14 {
640             label D1
641             xywh {35 215 45 15} align 4
642             class KeyGrabber
643           }
644           {fltk::Widget} kg_l15 {
645             label {D\#1}
646             xywh {35 230 45 15} align 4
647             class KeyGrabber
648           }
649           {fltk::Widget} kg_l16 {
650             label E1
651             xywh {35 245 45 15} align 4
652             class KeyGrabber
653           }
654           {fltk::Widget} kg_u0 {
655             label C1
656             xywh {130 5 45 15} align 4
657             class KeyGrabber
658           }
659           {fltk::Widget} kg_u1 {
660             label {C\#1}
661             xywh {130 20 45 15} align 4
662             class KeyGrabber
663           }
664           {fltk::Widget} kg_u2 {
665             label D1
666             xywh {130 35 45 15} align 4
667             class KeyGrabber
668           }
669           {fltk::Widget} kg_u3 {
670             label {D\#1}
671             xywh {130 50 45 15} align 4
672             class KeyGrabber
673           }
674           {fltk::Widget} kg_u4 {
675             label E1
676             xywh {130 65 45 15} align 4
677             class KeyGrabber
678           }
679           {fltk::Widget} kg_u5 {
680             label F1
681             xywh {130 80 45 15} align 4
682             class KeyGrabber
683           }
684           {fltk::Widget} kg_u6 {
685             label {F\#1}
686             xywh {130 95 45 15} align 4
687             class KeyGrabber
688           }
689           {fltk::Widget} kg_u7 {
690             label G1
691             xywh {130 110 45 15} align 4
692             class KeyGrabber
693           }
694           {fltk::Widget} kg_u8 {
695             label {G\#1}
696             xywh {130 125 45 15} align 4
697             class KeyGrabber
698           }
699           {fltk::Widget} kg_u9 {
700             label A1
701             xywh {130 140 45 15} align 4
702             class KeyGrabber
703           }
704           {fltk::Widget} kg_u10 {
705             label {A\#1}
706             xywh {130 155 45 15} align 4
707             class KeyGrabber
708           }
709           {fltk::Widget} kg_u11 {
710             label B1
711             xywh {130 170 45 15} align 4
712             class KeyGrabber
713           }
714           {fltk::Widget} kg_u12 {
715             label C2
716             xywh {130 185 45 15} align 4
717             class KeyGrabber
718           }
719           {fltk::Widget} kg_u13 {
720             label {C\#2}
721             xywh {130 200 45 15} align 4
722             class KeyGrabber
723           }
724           {fltk::Widget} kg_u14 {
725             label D2
726             xywh {130 215 45 15} align 4
727             class KeyGrabber
728           }
729           {fltk::Widget} kg_u15 {
730             label {D\#2}
731             xywh {130 230 45 15} align 4
732             class KeyGrabber
733           }
734           {fltk::Widget} kg_u16 {
735             label E2
736             xywh {130 245 45 15} align 4
737             class KeyGrabber
738           }
739           {fltk::Widget} kg_u17 {
740             label F2
741             xywh {265 5 45 15} align 4
742             class KeyGrabber
743           }
744           {fltk::Widget} kg_u18 {
745             label {F\#2}
746             xywh {265 20 45 15} align 4
747             class KeyGrabber
748           }
749           {fltk::Widget} kg_u19 {
750             label G2
751             xywh {265 35 45 15} align 4
752             class KeyGrabber
753           }
754           {fltk::Widget} kg_u20 {
755             label {G\#2}
756             xywh {265 50 45 15} align 4
757             class KeyGrabber
758           }
759           {fltk::Widget} kg_zi {
760             label {zoom in}
761             xywh {265 65 45 15} align 4
762             class KeyGrabber
763           }
764           {fltk::Widget} kg_zo {
765             label {zoom out}
766             xywh {265 80 45 15} align 4
767             class KeyGrabber
768           }
769           {fltk::Widget} kg_ou {
770             label {octave up}
771             xywh {265 95 45 15} align 4
772             class KeyGrabber
773           }
774           {fltk::Widget} kg_od {
775             label {octave down}
776             xywh {265 110 45 15} align 4
777             class KeyGrabber
778           }
779         }
780         {fltk::Group} {} {
781           label colors open
782           xywh {0 15 320 270} hide
783         } {
784           {fltk::Button} {} {
785             label apply
786             xywh {250 245 65 20}
787           }
788           {fltk::Choice} {} {
789             label presets open
790             xywh {55 10 100 20}
791           } {
792             {fltk::Item} {} {
793               label windo
794               }
795             {fltk::Item} {} {
796               label midnight
797               }
798             {fltk::Item} {} {
799               label xterm
800               }
801           }
802         }
803       }
804     }
805     {fltk::Window} help_window {
806       label help
807       callback {ui->help_button->state(0);
808 o->hide();}
809       xywh {519 345 580 370} hide resizable
810       extra_code {o->size_range(580,370);}
811     } {
812       {fltk::TabGroup} {} {open
813         xywh {0 0 580 370}
814       } {
815         {fltk::Group} {} {
816           label info open
817           xywh {0 25 580 345} resizable
818         } {
819           {fltk::Input} title_text {
820             label Title
821             xywh {55 5 520 20}
822           }
823           {fltk::Input} author_text {
824             label Author
825             xywh {55 30 520 20}
826           }
827           {fltk::TextEditor} info_text {
828             xywh {5 55 570 285} resizable textfont 4
829           }
830         }
831         {fltk::Group} {} {
832           label controls open
833           xywh {0 25 580 345} hide
834         } {
835           {fltk::TextDisplay} {} {
836             xywh {5 5 570 335} resizable textfont 4
837             extra_code {load_text(o,ROOT_DATA_DIR"doc/controls.txt");}
838           }
839         }
840         {fltk::Group} {} {
841           label guide open
842           xywh {0 25 580 345} hide
843         } {
844           {fltk::TextDisplay} {} {
845             xywh {5 5 570 335} resizable textfont 4
846             extra_code {load_text(o,ROOT_DATA_DIR"doc/guide.txt");}
847           }
848         }
849         {fltk::Group} {} {
850           label license open
851           xywh {0 25 580 345} hide
852         } {
853           {fltk::TextDisplay} {} {
854             xywh {5 5 570 335} resizable textfont 4
855             extra_code {load_text(o,ROOT_DATA_DIR"doc/license.txt");}
856           }
857         }
858         {fltk::Group} {} {
859           label about open
860           xywh {0 25 580 345} hide
861         } {
862           {fltk::TextDisplay} {} {
863             xywh {5 5 570 335} resizable textfont 4
864             extra_code {load_text(o,ROOT_DATA_DIR"doc/README");}
865           }
866         }
867       }
868     }
869     {fltk::Window} action_window {
870       label menu
871       callback {ui->file_button->state(0);
872 o->hide();}
873       xywh {286 302 100 130} horizontal hide
874     } {
875       {fltk::Button} {} {
876         label new
877         callback {reset_song();}
878         xywh {5 5 90 20}
879       }
880       {fltk::Button} {} {
881         label save
882         callback {action_window->hide();
883 save();}
884         xywh {5 25 90 20}
885       }
886       {fltk::Button} {} {
887         label {save as}
888         callback {action_window->hide();
889 save(fltk::file_chooser("save file",NULL,get_last_dir()));}
890         xywh {5 45 90 20}
891       }
892       {fltk::Button} {} {
893         label load
894         callback {action_window->hide();
895 if(load(fltk::file_chooser("open file",NULL,get_last_dir()))<0){
896   reset_song();
898         xywh {5 65 90 20}
899       }
900       {fltk::Button} {} {
901         label import
902         callback {action_window->hide();
903 if(loadsmf(fltk::file_chooser("import file",NULL,get_last_dir()))<0){
904   reset_song();
906         xywh {5 85 90 20}
907       }
908       {fltk::Button} {} {
909         label export
910         callback {action_window->hide();
911 savesmf(fltk::file_chooser("export file",NULL,get_last_dir()));}
912         xywh {5 105 90 20}
913       }
914     }
915     {fltk::Window} scope_window {
916       label scope
917       callback {ui->scope_button->state(0);
918 o->hide();}
919       xywh {647 310 425 280} hide resizable
920     } {
921       {fltk::TextDisplay} scope {
922         xywh {5 5 415 245} resizable textfont 4 color 0x280000 textcolor 0xff0000
923         extra_code {o->wrap_mode(1);}
924       }
925       {fltk::Group} {} {open
926         xywh {5 255 415 20}
927       } {
928         {fltk::Button} {} {
929           label on
930           callback {if(o->state()){
931   turnonscope();
933 else{
934   turnoffscope();
936           xywh {0 0 40 20}
937           extra_code {o->type(fltk::Button::TOGGLE);}
938         }
939         {fltk::InvisibleBox} {} {
940           xywh {45 0 95 20} resizable
941         }
942       }
943     }
944     code {loop_toggle->image(fltk::SharedImage::get(ROOT_DATA_DIR"gfx/loop.gif"));
945 conf_button->image(fltk::SharedImage::get(ROOT_DATA_DIR"gfx/conf.gif"));
946 scope_button->image(fltk::SharedImage::get(ROOT_DATA_DIR"gfx/scope.gif"));
947 file_button->image(fltk::SharedImage::get(ROOT_DATA_DIR"gfx/file.gif"));
948 help_button->image(fltk::SharedImage::get(ROOT_DATA_DIR"gfx/help.gif"));
950 edit_button->image(fltk::SharedImage::get(ROOT_DATA_DIR"gfx/edit.gif"));
951 color_button->image(fltk::SharedImage::get(ROOT_DATA_DIR"gfx/color.gif"));
952 unclone_button->image(fltk::SharedImage::get(ROOT_DATA_DIR"gfx/fork.gif"));
953 split_button->image(fltk::SharedImage::get(ROOT_DATA_DIR"gfx/split.gif"));
954 join_button->image(fltk::SharedImage::get(ROOT_DATA_DIR"gfx/join.gif"));
956 qbutton4->image(fltk::SharedImage::get(ROOT_DATA_DIR"gfx/q4.gif"));
957 qbutton8->image(fltk::SharedImage::get(ROOT_DATA_DIR"gfx/q8.gif"));
958 qbutton16->image(fltk::SharedImage::get(ROOT_DATA_DIR"gfx/q16.gif"));
959 qbutton32->image(fltk::SharedImage::get(ROOT_DATA_DIR"gfx/q32.gif"));
960 qbutton64->image(fltk::SharedImage::get(ROOT_DATA_DIR"gfx/q64.gif"));
961 qbutton128->image(fltk::SharedImage::get(ROOT_DATA_DIR"gfx/q128.gif"));
962 qbutton0->image(fltk::SharedImage::get(ROOT_DATA_DIR"gfx/q0.gif"));} {}
963     code {track_info->set_rec(0);} {}
964     code {start_monitor();} {}
965     code {main_window->show();} {}
966   }