1 # data file for the FLTK User Interface Designer (FLUID)
4 do_not_include_H_from_C
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
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;} {}
52 {fltk::Window} main_window {
54 callback {if(!fltk::ask("Quit?")){
58 config_window->hide();
60 action_window->hide();
65 xywh {31 41 640 480} resizable
66 extra_code {\#include <stdio.h>
68 \#include <fltk/ask.h>
71 \#include "trackmodule.h"
72 o->size_range(640,455);
73 o->resize(640,455);} visible
78 {fltk::Group} song_edit {open
82 xywh {0 0 255 445} box FLAT_BOX
84 {fltk::Widget} track_info {
86 xywh {0 15 255 415} resizable
87 extra_code {\#include "trackinfo.h"}
92 callback {ui->track_info->toggle_controls();}
96 {fltk::Group} {} {open
99 {fltk::Widget} song_timeline {
101 xywh {0 0 370 15} resizable
102 extra_code {o->scale=16;
107 {fltk::Group} song_scrollgroup {open
108 xywh {255 15 385 430} resizable
110 {fltk::Widget} arranger {
112 xywh {0 0 370 415} resizable box FLAT_BOX
113 extra_code {\#include "seq.h"
114 \#include "arranger.h"}
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
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
129 {fltk::Group} pattern_edit {open
130 xywh {0 0 640 445} hide
132 {fltk::Group} {} {open
133 xywh {45 0 595 445} resizable
138 {fltk::Widget} pattern_timeline {
140 xywh {0 0 580 15} resizable box FLAT_BOX
141 extra_code {\#include "timeline.h"
146 {fltk::Group} pattern_scrollgroup {open
147 xywh {0 15 595 355} resizable
149 {fltk::Widget} piano_roll {
151 xywh {0 0 580 340} resizable box FLAT_BOX
152 extra_code {\#include "pianoroll.h"}
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);}
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
169 {fltk::Widget} event_edit {
171 xywh {0 0 580 75} resizable box FLAT_BOX
172 extra_code {\#include "eventedit.h"}
175 {fltk::Widget} event_menu {
176 xywh {0 0 580 75} hide box FLAT_BOX
177 extra_code {\#include "eventmenu.h"}
180 {fltk::Button} event_menu_button {
182 callback {if(o->state()==0){
183 ui->event_menu->hide();
184 ui->event_edit->show();
187 ui->event_edit->hide();
188 ui->event_edit->recount_has();
189 ui->event_menu->show();
191 tooltip {pick event type}
193 extra_code {o->type(fltk::Button::TOGGLE);}
197 callback {ui->event_edit->label_flag = o->state();
198 ui->event_edit->redraw();}
199 tooltip {toggle event value labels}
201 extra_code {o->type(fltk::Button::TOGGLE);}
205 callback {ui->event_edit->clear_events();}
206 tooltip {clear these events}
211 callback {ui->event_edit->clear_non_note_events();}
212 tooltip {clear all non note events in pattern}
217 callback {ui->event_edit->clear_all_events();}
218 tooltip {clear everything}
219 xywh {580 60 15 15} labelcolor 0xff000000
223 {fltk::Group} {} {open
224 xywh {0 0 45 445} horizontal
230 {fltk::Group} {} {open
231 xywh {0 15 45 340} resizable
233 {fltk::Widget} track_select {
236 extra_code {\#include "trackselect.h"}
239 {fltk::Widget} sample_view {
242 extra_code {\#include "sampleview.h"}
245 {fltk::Widget} keyboard {
248 extra_code {\#include "keyboard.h"}
254 callback {show_song_edit();}
260 {fltk::Group} {} {open selected
261 xywh {0 445 640 35} box UP_BOX
263 {fltk::Button} play_button {
265 callback {press_play();}
266 xywh {5 5 25 25} labelcolor 0x800000
268 {fltk::Button} stop_button {
270 callback {press_stop();}
271 xywh {35 5 25 25} labelcolor 0x800000
273 {fltk::Button} record_button {
275 callback {toggle_backend_recording();}
276 xywh {65 5 25 25} labelcolor 0xff000000
277 extra_code {o->type(fltk::Button::TOGGLE);}
279 {fltk::Widget} metronome {
281 xywh {95 5 25 25} color 56 labelcolor 0xffffff00
282 extra_code {\#include <metronome.h>}
285 {fltk::Group} {} {open
286 xywh {125 0 20 35} resizable
288 {fltk::Group} pattern_buttons {
289 xywh {145 5 310 25} hide
291 {fltk::Button} qbutton4 {
292 callback {set_quant(4);}
294 extra_code {o->type(fltk::Button::TOGGLE);}
296 {fltk::Button} qbutton8 {
297 callback {set_quant(8);}
299 extra_code {o->type(fltk::Button::TOGGLE);}
301 {fltk::Button} qbutton16 {
302 callback {set_quant(16);}
304 extra_code {o->type(fltk::Button::TOGGLE);
307 {fltk::Button} qbutton32 {
308 callback {set_quant(32);}
310 extra_code {o->type(fltk::Button::TOGGLE);}
312 {fltk::Button} qbutton64 {
313 callback {set_quant(64);}
315 extra_code {o->type(fltk::Button::TOGGLE);}
317 {fltk::Button} qbutton128 {
318 callback {set_quant(128);}
320 extra_code {o->type(fltk::Button::TOGGLE);}
322 {fltk::Button} qbutton0 {
323 callback {set_quant(0);}
325 extra_code {o->type(fltk::Button::TOGGLE);}
327 {fltk::Button} quant1_button {
329 tooltip {quantize selected notes}
332 {fltk::Button} quant0_button {
334 tooltip {quantize length of selected notes}
337 {fltk::Button} tool_button {
339 callback {toggle_tool();}
343 {fltk::Group} song_buttons {open
346 {fltk::Button} edit_button {
347 callback {set_songtool(0);}
348 tooltip {create delete move resize select paste blocks}
349 xywh {0 0 25 25} value 1
351 {fltk::Button} color_button {
352 callback {set_songtool(1);}
355 extra_code {o->type(fltk::Button::TOGGLE);}
357 {fltk::Button} unclone_button {
358 callback {set_songtool(2);}
359 tooltip {click on blocks to unclone them}
361 extra_code {o->type(fltk::Button::TOGGLE);}
363 {fltk::Button} split_button {
364 callback {set_songtool(3);}
365 tooltip {click on a block to split in two}
367 extra_code {o->type(fltk::Button::TOGGLE);}
369 {fltk::Button} join_button {
370 callback {set_songtool(4);}
371 tooltip {click on adjacent blocks to join them}
373 extra_code {o->type(fltk::Button::TOGGLE);}
376 {fltk::Button} loop_toggle {
377 callback {toggle_loop();}
378 tooltip {toggle looping}
380 extra_code {o->type(fltk::Button::TOGGLE);}
382 {fltk::Button} conf_toggle {
383 callback {if(o->state()){
384 ui->config_window->show();
387 ui->config_window->hide();
389 tooltip configuration
391 extra_code {o->type(fltk::Button::TOGGLE);}
393 {fltk::Button} scope_button {
394 callback {if(o->state()){
395 ui->scope_window->show();
398 ui->scope_window->hide();
402 extra_code {o->type(fltk::Button::TOGGLE);}
404 {fltk::Button} file_button {
405 callback {if(o->state()){
406 ui->action_window->show();
409 ui->action_window->hide();
413 extra_code {\#include "saveload.h"
414 o->type(fltk::Button::TOGGLE);}
416 {fltk::Button} help_button {
417 callback {if(o->state()){
418 ui->help_window->show();
421 ui->help_window->hide();
425 extra_code {o->type(fltk::Button::TOGGLE);}
429 {fltk::Window} config_window {
431 xywh {52 125 320 285} hide
433 {fltk::TabGroup} {} {open
438 xywh {145 15 170 265} horizontal
440 {fltk::ValueInput} beats_per_measure {
441 label {beats per measure}
442 callback {if(o->value() > o->maximum())
443 o->value(o->maximum());
444 if(o->value() < o->minimum())
445 o->value(o->minimum());
446 set_beats_per_measure((int)o->value());}
447 xywh {5 5 45 20} minimum 1 maximum 31 step 1 value 4
449 {fltk::ValueInput} measures_per_phrase {
450 label {measures per phrase}
451 callback {if(o->value() > o->maximum())
452 o->value(o->maximum());
453 if(o->value() < o->minimum())
454 o->value(o->minimum());
455 set_measures_per_phrase((int)o->value());}
456 xywh {5 30 45 20} maximum 128 step 1 value 4
458 {fltk::ValueOutput} bpm_output {
460 xywh {5 55 45 20} minimum 1 maximum 1000 step 1 value 120
462 {fltk::ThumbWheel} bpm_wheel {
463 callback {set_bpm((int)o->value());
464 ui->bpm_output->value(o->value());}
465 xywh {55 55 105 20} align 4 minimum 1 maximum 1000 step 1 value 120
467 {fltk::ValueInput} measures_until_record {
468 label {measures until record}
469 callback {if(o->value() > o->maximum())
470 o->value(o->maximum());
471 if(o->value() < o->minimum())
472 o->value(o->minimum());
473 set_measures_until_record((int)o->value());}
474 xywh {5 80 45 20} maximum 128 step 1 value 1
476 {fltk::CheckButton} check_alwayscopy {
477 label {always hard copy}
478 callback {set_alwayscopy(o->value());}
479 tooltip {instead of making a linked clone when you copy a block in the song view.}
480 xywh {5 105 25 25} align 4
482 {fltk::CheckButton} check_autotrackname {
483 label {auto track name}
484 callback {set_autotrackname(o->value());}
485 tooltip {Fill in GM instruments for track names when you change the program.}
486 xywh {145 105 25 25} align 4
488 {fltk::CheckButton} check_passthru {
489 label {record pass-thru}
490 callback {set_passthru(o->value());}
491 tooltip {Echo midi input to midi output.}
492 xywh {5 130 25 26} horizontal align 4 value 1
494 {fltk::CheckButton} check_playinsert {
495 label {play note insertion}
496 callback {set_playinsert(o->value());}
497 tooltip {Send midi note on when you create notes.}
498 xywh {145 130 25 26} horizontal align 4 value 1
500 {fltk::CheckButton} check_recordonchan {
501 label {record on channel}
502 callback {set_recordonchan(o->value());}
503 tooltip {Record on first track that matches channel of midi input instead of selected track.}
504 xywh {5 155 25 25} align 4
506 {fltk::CheckButton} check_playmove {
507 label {play note move}
508 callback {set_playmove(o->value());}
509 tooltip {Send midi note on when you move notes.}
510 xywh {145 155 25 26} horizontal align 4 value 1
512 {fltk::CheckButton} check_follow {
513 label {follow playback}
514 callback {set_follow(o->value());}
515 tooltip {Auto scroll horizontally when play head leaves viewing area.}
516 xywh {5 179 25 26} horizontal align 4 value 1
518 {fltk::ValueInput} default_velocity {
519 label {default velocity}
520 callback {if(o->value() > o->maximum())
521 o->value(o->maximum());
522 if(o->value() < o->minimum())
523 o->value(o->minimum());
524 set_defaultvelocity((int)o->value());}
525 xywh {120 180 45 20} maximum 127 step 1 value 96
527 {fltk::Choice} menu_recordmode {
528 label {record mode} open
533 callback {set_recordmode(0);}
537 callback {set_recordmode(1);}
541 callback {set_recordmode(2);}
544 {fltk::Choice} menu_rob {
545 label {record outside block} open
550 callback {set_robmode(0);}
554 callback {set_robmode(1);}
558 callback {set_robmode(2);}
564 xywh {0 15 320 270} hide
566 {fltk::Widget} kg_l0 {
568 xywh {35 5 45 15} align 4
571 {fltk::Widget} kg_l1 {
573 xywh {35 20 45 15} align 4
576 {fltk::Widget} kg_l2 {
578 xywh {35 35 45 15} align 4
581 {fltk::Widget} kg_l3 {
583 xywh {35 50 45 15} align 4
586 {fltk::Widget} kg_l4 {
588 xywh {35 65 45 15} align 4
591 {fltk::Widget} kg_l5 {
593 xywh {35 80 45 15} align 4
596 {fltk::Widget} kg_l6 {
598 xywh {35 95 45 15} align 4
601 {fltk::Widget} kg_l7 {
603 xywh {35 110 45 15} align 4
606 {fltk::Widget} kg_l8 {
608 xywh {35 125 45 15} align 4
611 {fltk::Widget} kg_l9 {
613 xywh {35 140 45 15} align 4
616 {fltk::Widget} kg_l10 {
619 xywh {35 155 45 15} align 4
622 {fltk::Widget} kg_l11 {
624 xywh {35 170 45 15} align 4
627 {fltk::Widget} kg_l12 {
629 xywh {35 185 45 15} align 4
632 {fltk::Widget} kg_l13 {
634 xywh {35 200 45 15} align 4
637 {fltk::Widget} kg_l14 {
639 xywh {35 215 45 15} align 4
642 {fltk::Widget} kg_l15 {
644 xywh {35 230 45 15} align 4
647 {fltk::Widget} kg_l16 {
649 xywh {35 245 45 15} align 4
652 {fltk::Widget} kg_u0 {
654 xywh {130 5 45 15} align 4
657 {fltk::Widget} kg_u1 {
659 xywh {130 20 45 15} align 4
662 {fltk::Widget} kg_u2 {
664 xywh {130 35 45 15} align 4
667 {fltk::Widget} kg_u3 {
669 xywh {130 50 45 15} align 4
672 {fltk::Widget} kg_u4 {
674 xywh {130 65 45 15} align 4
677 {fltk::Widget} kg_u5 {
679 xywh {130 80 45 15} align 4
682 {fltk::Widget} kg_u6 {
684 xywh {130 95 45 15} align 4
687 {fltk::Widget} kg_u7 {
689 xywh {130 110 45 15} align 4
692 {fltk::Widget} kg_u8 {
694 xywh {130 125 45 15} align 4
697 {fltk::Widget} kg_u9 {
699 xywh {130 140 45 15} align 4
702 {fltk::Widget} kg_u10 {
704 xywh {130 155 45 15} align 4
707 {fltk::Widget} kg_u11 {
709 xywh {130 170 45 15} align 4
712 {fltk::Widget} kg_u12 {
714 xywh {130 185 45 15} align 4
717 {fltk::Widget} kg_u13 {
719 xywh {130 200 45 15} align 4
722 {fltk::Widget} kg_u14 {
724 xywh {130 215 45 15} align 4
727 {fltk::Widget} kg_u15 {
729 xywh {130 230 45 15} align 4
732 {fltk::Widget} kg_u16 {
734 xywh {130 245 45 15} align 4
737 {fltk::Widget} kg_u17 {
739 xywh {265 5 45 15} align 4
742 {fltk::Widget} kg_u18 {
744 xywh {265 20 45 15} align 4
747 {fltk::Widget} kg_u19 {
749 xywh {265 35 45 15} align 4
752 {fltk::Widget} kg_u20 {
754 xywh {265 50 45 15} align 4
757 {fltk::Widget} kg_zi {
759 xywh {265 65 45 15} align 4
762 {fltk::Widget} kg_zo {
764 xywh {265 80 45 15} align 4
767 {fltk::Widget} kg_ou {
769 xywh {265 95 45 15} align 4
772 {fltk::Widget} kg_od {
774 xywh {265 110 45 15} align 4
780 xywh {0 15 320 270} hide
803 {fltk::Window} help_window {
805 xywh {519 345 580 370} hide resizable
806 extra_code {o->size_range(580,370);}
808 {fltk::TabGroup} {} {open
813 xywh {0 25 580 345} resizable
815 {fltk::Input} title_text {
819 {fltk::Input} author_text {
823 {fltk::TextEditor} info_text {
824 xywh {5 55 570 285} resizable textfont 4
829 xywh {0 25 580 345} hide
831 {fltk::TextDisplay} {} {
832 xywh {5 5 570 335} resizable textfont 4
833 extra_code {load_text(o,ROOT_DATA_DIR"doc/controls.txt");}
838 xywh {0 25 580 345} hide
840 {fltk::TextDisplay} {} {
841 xywh {5 5 570 335} resizable textfont 4
842 extra_code {load_text(o,ROOT_DATA_DIR"doc/guide.txt");}
847 xywh {0 25 580 345} hide
849 {fltk::TextDisplay} {} {
850 xywh {5 5 570 335} resizable textfont 4
851 extra_code {load_text(o,ROOT_DATA_DIR"doc/license.txt");}
856 xywh {0 25 580 345} hide
858 {fltk::TextDisplay} {} {
859 xywh {5 5 570 335} resizable textfont 4
860 extra_code {load_text(o,ROOT_DATA_DIR"doc/README");}
865 {fltk::Window} action_window {
867 xywh {286 302 100 130} horizontal hide
871 callback {reset_song();}
876 callback {action_window->hide();
882 callback {action_window->hide();
883 save(fltk::file_chooser("save file",NULL,get_last_dir()));}
888 callback {action_window->hide();
889 if(load(fltk::file_chooser("open file",NULL,get_last_dir()))<0){
896 callback {action_window->hide();
897 if(loadsmf(fltk::file_chooser("import file",NULL,get_last_dir()))<0){
904 callback {action_window->hide();
905 savesmf(fltk::file_chooser("export file",NULL,get_last_dir()));}
909 {fltk::Window} scope_window {
911 xywh {647 310 425 280} hide resizable
913 {fltk::TextDisplay} scope {
914 xywh {5 5 415 245} textfont 4 color 0x280000 textcolor 0xff0000
915 extra_code {o->wrap_mode(1);}
922 callback {if(o->state()){
929 extra_code {o->type(fltk::Button::TOGGLE);}
931 {fltk::InvisibleBox} {} {
932 xywh {45 0 95 20} resizable
936 code {loop_toggle->image(fltk::SharedImage::get(ROOT_DATA_DIR"gfx/loop.gif"));
937 conf_toggle->image(fltk::SharedImage::get(ROOT_DATA_DIR"gfx/conf.gif"));
938 scope_button->image(fltk::SharedImage::get(ROOT_DATA_DIR"gfx/scope.gif"));
939 file_button->image(fltk::SharedImage::get(ROOT_DATA_DIR"gfx/file.gif"));
940 help_button->image(fltk::SharedImage::get(ROOT_DATA_DIR"gfx/help.gif"));
942 edit_button->image(fltk::SharedImage::get(ROOT_DATA_DIR"gfx/edit.gif"));
943 color_button->image(fltk::SharedImage::get(ROOT_DATA_DIR"gfx/color.gif"));
944 unclone_button->image(fltk::SharedImage::get(ROOT_DATA_DIR"gfx/fork.gif"));
945 split_button->image(fltk::SharedImage::get(ROOT_DATA_DIR"gfx/split.gif"));
946 join_button->image(fltk::SharedImage::get(ROOT_DATA_DIR"gfx/join.gif"));
948 qbutton4->image(fltk::SharedImage::get(ROOT_DATA_DIR"gfx/q4.gif"));
949 qbutton8->image(fltk::SharedImage::get(ROOT_DATA_DIR"gfx/q8.gif"));
950 qbutton16->image(fltk::SharedImage::get(ROOT_DATA_DIR"gfx/q16.gif"));
951 qbutton32->image(fltk::SharedImage::get(ROOT_DATA_DIR"gfx/q32.gif"));
952 qbutton64->image(fltk::SharedImage::get(ROOT_DATA_DIR"gfx/q64.gif"));
953 qbutton128->image(fltk::SharedImage::get(ROOT_DATA_DIR"gfx/q128.gif"));
954 qbutton0->image(fltk::SharedImage::get(ROOT_DATA_DIR"gfx/q0.gif"));} {}
955 code {track_info->set_rec(0);} {}
956 code {start_monitor();} {}
957 code {main_window->show();} {}