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