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