1 // generated by Fast Light User Interface Designer (fluid) version 2.1000
5 Epichord - a midi sequencer
6 Copyright (C) 2008 Evan Rinehart
8 This program is free software; you can redistribute it and/or
9 modify it under the terms of the GNU General Public License
10 as published by the Free Software Foundation; either version 2
11 of the License, or (at your option) any later version.
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
18 You should have received a copy of the GNU General Public License
19 along with this program; if not, write to
21 The Free Software Foundation, Inc.
22 51 Franklin Street, Fifth Floor
23 Boston, MA 02110-1301, USA
26 #include <fltk/events.h>
27 #include <fltk/file_chooser.h>
34 inline void UI::cb_main_window_i(fltk::Window
*, void*) {
35 if(!fltk::ask("Quit?")){
43 void UI::cb_main_window(fltk::Window
* o
, void* v
) {
44 ((UI
*)(o
->user_data()))->cb_main_window_i(o
,v
);
47 inline void UI::cb__i(fltk::Button
*, void*) {
48 ui
->track_info
->toggle_controls();
50 void UI::cb_(fltk::Button
* o
, void* v
) {
51 ((UI
*)(o
->parent()->parent()->parent()->parent()->user_data()))->cb__i(o
,v
);
54 inline void UI::cb_1_i(fltk::Button
*, void*) {
55 track
* t
= new track();
57 ui
->track_info
->redraw();
58 ui
->arranger
->layout();
59 ui
->song_vscroll
->redraw();
61 void UI::cb_1(fltk::Button
* o
, void* v
) {
62 ((UI
*)(o
->parent()->parent()->parent()->parent()->user_data()))->cb_1_i(o
,v
);
65 inline void UI::cb_song_vscroll_i(fltk::Scrollbar
* o
, void*) {
66 int target
= (int)o
->value();
67 int dummy
= ui
->arranger
->scrollx
;
68 ui
->arranger
->scrollTo(dummy
,target
);
70 void UI::cb_song_vscroll(fltk::Scrollbar
* o
, void* v
) {
71 ((UI
*)(o
->parent()->parent()->parent()->parent()->user_data()))->cb_song_vscroll_i(o
,v
);
74 inline void UI::cb_song_hscroll_i(DragBar
* o
, void*) {
75 ui
->arranger
->scrollTo(o
->value(), ui
->arranger
->scrolly
);
77 void UI::cb_song_hscroll(DragBar
* o
, void* v
) {
78 ((UI
*)(o
->parent()->parent()->parent()->parent()->user_data()))->cb_song_hscroll_i(o
,v
);
81 inline void UI::cb_pattern_vscroll_i(fltk::Scrollbar
* o
, void*) {
82 int target
= (int)o
->value();
83 int dummy
= ui
->piano_roll
->scrollx
;
84 ui
->piano_roll
->scrollTo(dummy
,target
);
86 void UI::cb_pattern_vscroll(fltk::Scrollbar
* o
, void* v
) {
87 ((UI
*)(o
->parent()->parent()->parent()->parent()->parent()->user_data()))->cb_pattern_vscroll_i(o
,v
);
90 inline void UI::cb_pattern_hscroll_i(DragBar
* o
, void*) {
91 ui
->piano_roll
->scrollTo(o
->value(),ui
->piano_roll
->scrolly
);
93 void UI::cb_pattern_hscroll(DragBar
* o
, void* v
) {
94 ((UI
*)(o
->parent()->parent()->parent()->parent()->parent()->user_data()))->cb_pattern_hscroll_i(o
,v
);
97 inline void UI::cb_event_menu_button_i(fltk::Button
* o
, void*) {
99 ui
->event_menu
->hide();
100 ui
->event_edit
->show();
103 ui
->event_edit
->hide();
104 ui
->event_edit
->recount_has();
105 ui
->event_menu
->show();
108 void UI::cb_event_menu_button(fltk::Button
* o
, void* v
) {
109 ((UI
*)(o
->parent()->parent()->parent()->parent()->parent()->user_data()))->cb_event_menu_button_i(o
,v
);
112 inline void UI::cb_L_i(fltk::Button
* o
, void*) {
113 ui
->event_edit
->label_flag
= o
->state();
114 ui
->event_edit
->redraw();
116 void UI::cb_L(fltk::Button
* o
, void* v
) {
117 ((UI
*)(o
->parent()->parent()->parent()->parent()->parent()->user_data()))->cb_L_i(o
,v
);
120 inline void UI::cb_C_i(fltk::Button
*, void*) {
121 ui
->event_edit
->clear_events();
123 void UI::cb_C(fltk::Button
* o
, void* v
) {
124 ((UI
*)(o
->parent()->parent()->parent()->parent()->parent()->user_data()))->cb_C_i(o
,v
);
127 inline void UI::cb_X_i(fltk::Button
*, void*) {
128 ui
->event_edit
->clear_non_note_events();
130 void UI::cb_X(fltk::Button
* o
, void* v
) {
131 ((UI
*)(o
->parent()->parent()->parent()->parent()->parent()->user_data()))->cb_X_i(o
,v
);
134 inline void UI::cb_Z_i(fltk::Button
*, void*) {
135 ui
->event_edit
->clear_all_events();
137 void UI::cb_Z(fltk::Button
* o
, void* v
) {
138 ((UI
*)(o
->parent()->parent()->parent()->parent()->parent()->user_data()))->cb_Z_i(o
,v
);
141 inline void UI::cb_2_i(fltk::Button
*, void*) {
144 void UI::cb_2(fltk::Button
* o
, void* v
) {
145 ((UI
*)(o
->parent()->parent()->parent()->parent()->user_data()))->cb_2_i(o
,v
);
148 inline void UI::cb_play_button_i(fltk::Button
*, void*) {
151 void UI::cb_play_button(fltk::Button
* o
, void* v
) {
152 ((UI
*)(o
->parent()->parent()->user_data()))->cb_play_button_i(o
,v
);
155 inline void UI::cb_stop_button_i(fltk::Button
*, void*) {
158 void UI::cb_stop_button(fltk::Button
* o
, void* v
) {
159 ((UI
*)(o
->parent()->parent()->user_data()))->cb_stop_button_i(o
,v
);
162 inline void UI::cb_record_button_i(fltk::Button
*, void*) {
163 toggle_backend_recording();
165 void UI::cb_record_button(fltk::Button
* o
, void* v
) {
166 ((UI
*)(o
->parent()->parent()->user_data()))->cb_record_button_i(o
,v
);
169 inline void UI::cb_loop_toggle_i(fltk::Button
*, void*) {
172 void UI::cb_loop_toggle(fltk::Button
* o
, void* v
) {
173 ((UI
*)(o
->parent()->parent()->user_data()))->cb_loop_toggle_i(o
,v
);
176 inline void UI::cb_tri_button_i(fltk::Button
* o
, void*) {
177 set_trip(o
->value());
179 void UI::cb_tri_button(fltk::Button
* o
, void* v
) {
180 ((UI
*)(o
->parent()->parent()->parent()->user_data()))->cb_tri_button_i(o
,v
);
183 inline void UI::cb_tool_button_i(fltk::Button
*, void*) {
186 void UI::cb_tool_button(fltk::Button
* o
, void* v
) {
187 ((UI
*)(o
->parent()->parent()->parent()->user_data()))->cb_tool_button_i(o
,v
);
190 inline void UI::cb_qbutton4_i(fltk::Button
*, void*) {
193 void UI::cb_qbutton4(fltk::Button
* o
, void* v
) {
194 ((UI
*)(o
->parent()->parent()->parent()->user_data()))->cb_qbutton4_i(o
,v
);
197 inline void UI::cb_qbutton8_i(fltk::Button
*, void*) {
200 void UI::cb_qbutton8(fltk::Button
* o
, void* v
) {
201 ((UI
*)(o
->parent()->parent()->parent()->user_data()))->cb_qbutton8_i(o
,v
);
204 inline void UI::cb_qbutton16_i(fltk::Button
*, void*) {
207 void UI::cb_qbutton16(fltk::Button
* o
, void* v
) {
208 ((UI
*)(o
->parent()->parent()->parent()->user_data()))->cb_qbutton16_i(o
,v
);
211 inline void UI::cb_qbutton32_i(fltk::Button
*, void*) {
214 void UI::cb_qbutton32(fltk::Button
* o
, void* v
) {
215 ((UI
*)(o
->parent()->parent()->parent()->user_data()))->cb_qbutton32_i(o
,v
);
218 inline void UI::cb_qbutton64_i(fltk::Button
*, void*) {
221 void UI::cb_qbutton64(fltk::Button
* o
, void* v
) {
222 ((UI
*)(o
->parent()->parent()->parent()->user_data()))->cb_qbutton64_i(o
,v
);
225 inline void UI::cb_qbutton128_i(fltk::Button
*, void*) {
228 void UI::cb_qbutton128(fltk::Button
* o
, void* v
) {
229 ((UI
*)(o
->parent()->parent()->parent()->user_data()))->cb_qbutton128_i(o
,v
);
232 inline void UI::cb_qbutton0_i(fltk::Button
*, void*) {
235 void UI::cb_qbutton0(fltk::Button
* o
, void* v
) {
236 ((UI
*)(o
->parent()->parent()->parent()->user_data()))->cb_qbutton0_i(o
,v
);
239 inline void UI::cb_edit_button_i(fltk::Button
*, void*) {
242 void UI::cb_edit_button(fltk::Button
* o
, void* v
) {
243 ((UI
*)(o
->parent()->parent()->parent()->user_data()))->cb_edit_button_i(o
,v
);
246 inline void UI::cb_color_button_i(fltk::Button
*, void*) {
249 void UI::cb_color_button(fltk::Button
* o
, void* v
) {
250 ((UI
*)(o
->parent()->parent()->parent()->user_data()))->cb_color_button_i(o
,v
);
253 inline void UI::cb_unclone_button_i(fltk::Button
*, void*) {
256 void UI::cb_unclone_button(fltk::Button
* o
, void* v
) {
257 ((UI
*)(o
->parent()->parent()->parent()->user_data()))->cb_unclone_button_i(o
,v
);
260 inline void UI::cb_split_button_i(fltk::Button
*, void*) {
263 void UI::cb_split_button(fltk::Button
* o
, void* v
) {
264 ((UI
*)(o
->parent()->parent()->parent()->user_data()))->cb_split_button_i(o
,v
);
267 inline void UI::cb_join_button_i(fltk::Button
*, void*) {
270 void UI::cb_join_button(fltk::Button
* o
, void* v
) {
271 ((UI
*)(o
->parent()->parent()->parent()->user_data()))->cb_join_button_i(o
,v
);
274 inline void UI::cb_conf_button_i(fltk::Button
* o
, void*) {
276 ui
->config_window
->show();
279 ui
->config_window
->hide();
282 void UI::cb_conf_button(fltk::Button
* o
, void* v
) {
283 ((UI
*)(o
->parent()->parent()->user_data()))->cb_conf_button_i(o
,v
);
286 inline void UI::cb_scope_button_i(fltk::Button
* o
, void*) {
288 ui
->scope_window
->show();
291 ui
->scope_window
->hide();
294 void UI::cb_scope_button(fltk::Button
* o
, void* v
) {
295 ((UI
*)(o
->parent()->parent()->user_data()))->cb_scope_button_i(o
,v
);
298 inline void UI::cb_file_button_i(fltk::Button
* o
, void*) {
300 ui
->action_window
->show();
303 ui
->action_window
->hide();
306 void UI::cb_file_button(fltk::Button
* o
, void* v
) {
307 ((UI
*)(o
->parent()->parent()->user_data()))->cb_file_button_i(o
,v
);
310 inline void UI::cb_new_i(fltk::Item
*, void*) {
312 ui
->file_button
->state(0);
314 void UI::cb_new(fltk::Item
* o
, void* v
) {
315 ((UI
*)(o
->parent()->parent()->parent()->user_data()))->cb_new_i(o
,v
);
318 inline void UI::cb_load_i(fltk::Item
*, void*) {
319 action_window
->hide();
320 ui
->file_button
->state(0);
321 const char* filename
= fltk::file_chooser("open file",NULL
,get_last_dir());
323 if(load(filename
)<0){
328 void UI::cb_load(fltk::Item
* o
, void* v
) {
329 ((UI
*)(o
->parent()->parent()->parent()->user_data()))->cb_load_i(o
,v
);
332 inline void UI::cb_save_i(fltk::Item
*, void*) {
333 action_window
->hide();
334 ui
->file_button
->state(0);
337 void UI::cb_save(fltk::Item
* o
, void* v
) {
338 ((UI
*)(o
->parent()->parent()->parent()->user_data()))->cb_save_i(o
,v
);
341 inline void UI::cb_save1_i(fltk::Item
*, void*) {
342 action_window
->hide();
343 ui
->file_button
->state(0);
344 save(fltk::file_chooser("save file",NULL
,get_last_dir()));
346 void UI::cb_save1(fltk::Item
* o
, void* v
) {
347 ((UI
*)(o
->parent()->parent()->parent()->user_data()))->cb_save1_i(o
,v
);
350 inline void UI::cb_import_i(fltk::Item
*, void*) {
351 action_window
->hide();
352 ui
->file_button
->state(0);
353 const char* filename
= fltk::file_chooser("open file",NULL
,get_last_dir());
355 if(loadsmf(filename
)<0){
360 void UI::cb_import(fltk::Item
* o
, void* v
) {
361 ((UI
*)(o
->parent()->parent()->parent()->user_data()))->cb_import_i(o
,v
);
364 inline void UI::cb_export_i(fltk::Item
*, void*) {
365 action_window
->hide();
366 ui
->file_button
->state(0);
367 savesmf(fltk::file_chooser("export file",NULL
,get_last_dir()));
369 void UI::cb_export(fltk::Item
* o
, void* v
) {
370 ((UI
*)(o
->parent()->parent()->parent()->user_data()))->cb_export_i(o
,v
);
373 inline void UI::cb_help_button_i(fltk::Button
* o
, void*) {
375 ui
->help_window
->show();
378 ui
->help_window
->hide();
381 void UI::cb_help_button(fltk::Button
* o
, void* v
) {
382 ((UI
*)(o
->parent()->parent()->user_data()))->cb_help_button_i(o
,v
);
385 inline void UI::cb_config_window_i(fltk::Window
* o
, void*) {
386 ui
->conf_button
->state(0);
389 void UI::cb_config_window(fltk::Window
* o
, void* v
) {
390 ((UI
*)(o
->user_data()))->cb_config_window_i(o
,v
);
393 inline void UI::cb_beats_per_measure_i(fltk::ValueInput
* o
, void*) {
394 if(o
->value() > o
->maximum())
395 o
->value(o
->maximum());
396 if(o
->value() < o
->minimum())
397 o
->value(o
->minimum());
398 set_beats_per_measure((int)o
->value());
400 void UI::cb_beats_per_measure(fltk::ValueInput
* o
, void* v
) {
401 ((UI
*)(o
->parent()->parent()->parent()->user_data()))->cb_beats_per_measure_i(o
,v
);
404 inline void UI::cb_measures_per_phrase_i(fltk::ValueInput
* o
, void*) {
405 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());
411 void UI::cb_measures_per_phrase(fltk::ValueInput
* o
, void* v
) {
412 ((UI
*)(o
->parent()->parent()->parent()->user_data()))->cb_measures_per_phrase_i(o
,v
);
415 inline void UI::cb_bpm_wheel_i(fltk::ThumbWheel
* o
, void*) {
416 set_bpm((int)o
->value());
417 ui
->bpm_output
->value(o
->value());
419 void UI::cb_bpm_wheel(fltk::ThumbWheel
* o
, void* v
) {
420 ((UI
*)(o
->parent()->parent()->parent()->user_data()))->cb_bpm_wheel_i(o
,v
);
423 inline void UI::cb_measures_until_record_i(fltk::ValueInput
* o
, void*) {
424 if(o
->value() > o
->maximum())
425 o
->value(o
->maximum());
426 if(o
->value() < o
->minimum())
427 o
->value(o
->minimum());
428 set_measures_until_record((int)o
->value());
430 void UI::cb_measures_until_record(fltk::ValueInput
* o
, void* v
) {
431 ((UI
*)(o
->parent()->parent()->parent()->user_data()))->cb_measures_until_record_i(o
,v
);
434 inline void UI::cb_check_alwayscopy_i(fltk::CheckButton
* o
, void*) {
435 set_alwayscopy(o
->value());
437 void UI::cb_check_alwayscopy(fltk::CheckButton
* o
, void* v
) {
438 ((UI
*)(o
->parent()->parent()->parent()->user_data()))->cb_check_alwayscopy_i(o
,v
);
441 inline void UI::cb_check_trackinit_i(fltk::CheckButton
* o
, void*) {
442 set_trackinit(o
->value());
444 void UI::cb_check_trackinit(fltk::CheckButton
* o
, void* v
) {
445 ((UI
*)(o
->parent()->parent()->parent()->user_data()))->cb_check_trackinit_i(o
,v
);
448 inline void UI::cb_check_autotrackname_i(fltk::CheckButton
* o
, void*) {
449 set_autotrackname(o
->value());
451 void UI::cb_check_autotrackname(fltk::CheckButton
* o
, void* v
) {
452 ((UI
*)(o
->parent()->parent()->parent()->user_data()))->cb_check_autotrackname_i(o
,v
);
455 inline void UI::cb_check_passthru_i(fltk::CheckButton
* o
, void*) {
456 set_passthru(o
->value());
458 void UI::cb_check_passthru(fltk::CheckButton
* o
, void* v
) {
459 ((UI
*)(o
->parent()->parent()->parent()->user_data()))->cb_check_passthru_i(o
,v
);
462 inline void UI::cb_check_playinsert_i(fltk::CheckButton
* o
, void*) {
463 set_playinsert(o
->value());
465 void UI::cb_check_playinsert(fltk::CheckButton
* o
, void* v
) {
466 ((UI
*)(o
->parent()->parent()->parent()->user_data()))->cb_check_playinsert_i(o
,v
);
469 inline void UI::cb_check_recordonchan_i(fltk::CheckButton
* o
, void*) {
470 set_recordonchan(o
->value());
472 void UI::cb_check_recordonchan(fltk::CheckButton
* o
, void* v
) {
473 ((UI
*)(o
->parent()->parent()->parent()->user_data()))->cb_check_recordonchan_i(o
,v
);
476 inline void UI::cb_check_playmove_i(fltk::CheckButton
* o
, void*) {
477 set_playmove(o
->value());
479 void UI::cb_check_playmove(fltk::CheckButton
* o
, void* v
) {
480 ((UI
*)(o
->parent()->parent()->parent()->user_data()))->cb_check_playmove_i(o
,v
);
483 inline void UI::cb_check_follow_i(fltk::CheckButton
* o
, void*) {
484 set_follow(o
->value());
486 void UI::cb_check_follow(fltk::CheckButton
* o
, void* v
) {
487 ((UI
*)(o
->parent()->parent()->parent()->user_data()))->cb_check_follow_i(o
,v
);
490 inline void UI::cb_default_velocity_i(fltk::ValueInput
* o
, void*) {
491 if(o
->value() > o
->maximum())
492 o
->value(o
->maximum());
493 if(o
->value() < o
->minimum())
494 o
->value(o
->minimum());
495 set_defaultvelocity((int)o
->value());
497 void UI::cb_default_velocity(fltk::ValueInput
* o
, void* v
) {
498 ((UI
*)(o
->parent()->parent()->parent()->user_data()))->cb_default_velocity_i(o
,v
);
501 inline void UI::cb_merge_i(fltk::Item
*, void*) {
504 void UI::cb_merge(fltk::Item
* o
, void* v
) {
505 ((UI
*)(o
->parent()->parent()->parent()->parent()->user_data()))->cb_merge_i(o
,v
);
508 inline void UI::cb_overwrite_i(fltk::Item
*, void*) {
511 void UI::cb_overwrite(fltk::Item
* o
, void* v
) {
512 ((UI
*)(o
->parent()->parent()->parent()->parent()->user_data()))->cb_overwrite_i(o
,v
);
515 inline void UI::cb_layer_i(fltk::Item
*, void*) {
518 void UI::cb_layer(fltk::Item
* o
, void* v
) {
519 ((UI
*)(o
->parent()->parent()->parent()->parent()->user_data()))->cb_layer_i(o
,v
);
522 inline void UI::cb_do_i(fltk::Item
*, void*) {
525 void UI::cb_do(fltk::Item
* o
, void* v
) {
526 ((UI
*)(o
->parent()->parent()->parent()->parent()->user_data()))->cb_do_i(o
,v
);
529 inline void UI::cb_new1_i(fltk::Item
*, void*) {
532 void UI::cb_new1(fltk::Item
* o
, void* v
) {
533 ((UI
*)(o
->parent()->parent()->parent()->parent()->user_data()))->cb_new1_i(o
,v
);
536 inline void UI::cb_extend_i(fltk::Item
*, void*) {
539 void UI::cb_extend(fltk::Item
* o
, void* v
) {
540 ((UI
*)(o
->parent()->parent()->parent()->parent()->user_data()))->cb_extend_i(o
,v
);
543 inline void UI::cb_kg_l10_i(KeyGrabber
*, void*) {
546 void UI::cb_kg_l10(KeyGrabber
* o
, void* v
) {
547 ((UI
*)(o
->parent()->parent()->parent()->user_data()))->cb_kg_l10_i(o
,v
);
550 inline void UI::cb_help_window_i(fltk::Window
* o
, void*) {
551 ui
->help_button
->state(0);
554 void UI::cb_help_window(fltk::Window
* o
, void* v
) {
555 ((UI
*)(o
->user_data()))->cb_help_window_i(o
,v
);
558 inline void UI::cb_action_window_i(fltk::Window
* o
, void*) {
559 ui
->file_button
->state(0);
562 void UI::cb_action_window(fltk::Window
* o
, void* v
) {
563 ((UI
*)(o
->user_data()))->cb_action_window_i(o
,v
);
566 inline void UI::cb_new2_i(fltk::Button
*, void*) {
568 ui
->file_button
->state(0);
570 void UI::cb_new2(fltk::Button
* o
, void* v
) {
571 ((UI
*)(o
->parent()->user_data()))->cb_new2_i(o
,v
);
574 inline void UI::cb_save2_i(fltk::Button
*, void*) {
575 action_window
->hide();
576 ui
->file_button
->state(0);
579 void UI::cb_save2(fltk::Button
* o
, void* v
) {
580 ((UI
*)(o
->parent()->user_data()))->cb_save2_i(o
,v
);
583 inline void UI::cb_save3_i(fltk::Button
*, void*) {
584 action_window
->hide();
585 ui
->file_button
->state(0);
586 save(fltk::file_chooser("save file",NULL
,get_last_dir()));
588 void UI::cb_save3(fltk::Button
* o
, void* v
) {
589 ((UI
*)(o
->parent()->user_data()))->cb_save3_i(o
,v
);
592 inline void UI::cb_load1_i(fltk::Button
*, void*) {
593 action_window
->hide();
594 ui
->file_button
->state(0);
595 if(load(fltk::file_chooser("open file",NULL
,get_last_dir()))<0){
599 void UI::cb_load1(fltk::Button
* o
, void* v
) {
600 ((UI
*)(o
->parent()->user_data()))->cb_load1_i(o
,v
);
603 inline void UI::cb_import1_i(fltk::Button
*, void*) {
604 action_window
->hide();
605 ui
->file_button
->state(0);
606 if(loadsmf(fltk::file_chooser("import file",NULL
,get_last_dir()))<0){
610 void UI::cb_import1(fltk::Button
* o
, void* v
) {
611 ((UI
*)(o
->parent()->user_data()))->cb_import1_i(o
,v
);
614 inline void UI::cb_export1_i(fltk::Button
*, void*) {
615 action_window
->hide();
616 ui
->file_button
->state(0);
617 savesmf(fltk::file_chooser("export file",NULL
,get_last_dir()));
619 void UI::cb_export1(fltk::Button
* o
, void* v
) {
620 ((UI
*)(o
->parent()->user_data()))->cb_export1_i(o
,v
);
623 inline void UI::cb_scope_window_i(fltk::Window
* o
, void*) {
624 ui
->scope_button
->state(0);
627 void UI::cb_scope_window(fltk::Window
* o
, void* v
) {
628 ((UI
*)(o
->user_data()))->cb_scope_window_i(o
,v
);
631 inline void UI::cb_on_i(fltk::Button
* o
, void*) {
639 void UI::cb_on(fltk::Button
* o
, void* v
) {
640 ((UI
*)(o
->parent()->parent()->user_data()))->cb_on_i(o
,v
);
645 {fltk::Window
* o
= main_window
= new fltk::Window(640, 480, "Epichord");
647 o
->callback((fltk::Callback
*)cb_main_window
, (void*)(this));
649 {fltk::Group
* o
= new fltk::Group(0, 0, 640, 445);
651 {fltk::Group
* o
= song_edit
= new fltk::Group(0, 0, 640, 445);
653 {fltk::Group
* o
= new fltk::Group(0, 0, 255, 445);
655 o
->box(fltk::FLAT_BOX
);
657 {TrackInfo
* o
= track_info
= new TrackInfo(0, 15, 255, 415, "track info");
659 fltk::Group::current()->resizable(o
);
661 {fltk::Button
* o
= new fltk::Button(170, 0, 85, 15, "@");
662 o
->callback((fltk::Callback
*)cb_
);
663 o
->tooltip("more settings");
665 {fltk::Button
* o
= new fltk::Button(0, 0, 85, 15, "+");
666 o
->callback((fltk::Callback
*)cb_1
);
667 o
->tooltip("add new track");
669 {fltk::Button
* o
= new fltk::Button(85, 0, 85, 15, "-");
670 o
->tooltip("delete last track");
674 {fltk::Group
* o
= new fltk::Group(255, 0, 385, 15);
676 {Timeline
* o
= song_timeline
= new Timeline(0, 0, 370, 15, "timeline");
677 fltk::Group::current()->resizable(o
);
683 {fltk::Group
* o
= song_scrollgroup
= new fltk::Group(255, 15, 385, 430);
686 {Arranger
* o
= arranger
= new Arranger(0, 0, 370, 415, "arranger");
688 o
->box(fltk::FLAT_BOX
);
689 fltk::Group::current()->resizable(o
);
691 {fltk::Scrollbar
* o
= song_vscroll
= new fltk::Scrollbar(370, 0, 15, 415);
694 o
->callback((fltk::Callback
*)cb_song_vscroll
);
696 {DragBar
* o
= song_hscroll
= new DragBar(0, 415, 370, 15);
697 o
->callback((fltk::Callback
*)cb_song_hscroll
);
700 fltk::Group::current()->resizable(o
);
704 {fltk::Group
* o
= pattern_edit
= new fltk::Group(0, 0, 640, 445);
707 {fltk::Group
* o
= new fltk::Group(45, 0, 595, 445);
709 {fltk::Group
* o
= new fltk::Group(0, 0, 595, 15);
711 {Timeline
* o
= pattern_timeline
= new Timeline(0, 0, 580, 15, "timeline");
712 o
->box(fltk::FLAT_BOX
);
713 fltk::Group::current()->resizable(o
);
718 {fltk::Group
* o
= pattern_scrollgroup
= new fltk::Group(0, 15, 595, 355);
720 {PianoRoll
* o
= piano_roll
= new PianoRoll(0, 0, 580, 340, "pianoroll");
721 o
->box(fltk::FLAT_BOX
);
722 fltk::Group::current()->resizable(o
);
724 {fltk::Scrollbar
* o
= pattern_vscroll
= new fltk::Scrollbar(580, 0, 15, 340);
726 o
->callback((fltk::Callback
*)cb_pattern_vscroll
);
728 {DragBar
* o
= pattern_hscroll
= new DragBar(0, 340, 580, 15);
729 o
->callback((fltk::Callback
*)cb_pattern_hscroll
);
732 fltk::Group::current()->resizable(o
);
734 {fltk::Group
* o
= new fltk::Group(0, 370, 595, 75);
736 {EventEdit
* o
= event_edit
= new EventEdit(0, 0, 580, 75, "event editor");
737 o
->box(fltk::FLAT_BOX
);
738 fltk::Group::current()->resizable(o
);
740 {EventMenu
* o
= event_menu
= new EventMenu(0, 0, 580, 75);
741 o
->box(fltk::FLAT_BOX
);
744 {fltk::Button
* o
= event_menu_button
= new fltk::Button(580, 0, 15, 15, "E");
745 o
->callback((fltk::Callback
*)cb_event_menu_button
);
746 o
->tooltip("pick event type");
747 o
->type(fltk::Button::TOGGLE
);
749 {fltk::Button
* o
= new fltk::Button(580, 15, 15, 15, "L");
750 o
->callback((fltk::Callback
*)cb_L
);
751 o
->tooltip("toggle event value labels");
752 o
->type(fltk::Button::TOGGLE
);
754 {fltk::Button
* o
= new fltk::Button(580, 30, 15, 15, "C");
755 o
->callback((fltk::Callback
*)cb_C
);
756 o
->tooltip("clear these events");
758 {fltk::Button
* o
= new fltk::Button(580, 45, 15, 15, "X");
759 o
->callback((fltk::Callback
*)cb_X
);
760 o
->tooltip("clear all non note events in pattern");
762 {fltk::Button
* o
= new fltk::Button(580, 60, 15, 15, "Z");
763 o
->labelcolor((fltk::Color
)0xff000000);
764 o
->callback((fltk::Callback
*)cb_Z
);
765 o
->tooltip("clear everything");
770 fltk::Group::current()->resizable(o
);
772 {fltk::Group
* o
= new fltk::Group(0, 0, 45, 445);
774 new fltk::Button(0, 0, 45, 15, "@line");
775 {fltk::Group
* o
= new fltk::Group(0, 15, 45, 340);
778 {TrackSelect
* o
= track_select
= new TrackSelect(0, 35, 45, 305, "track picker");
781 {SampleView
* o
= sample_view
= new SampleView(0, 35, 45, 305, "sample names");
784 {Keyboard
* o
= keyboard
= new Keyboard(0, 0, 45, 340, "keyboard");
788 fltk::Group::current()->resizable(o
);
790 {fltk::Button
* o
= new fltk::Button(0, 370, 45, 75, "@<-");
792 o
->callback((fltk::Callback
*)cb_2
);
799 fltk::Group::current()->resizable(o
);
801 {fltk::Group
* o
= new fltk::Group(0, 445, 640, 35);
802 o
->box(fltk::UP_BOX
);
804 {fltk::Button
* o
= play_button
= new fltk::Button(5, 5, 25, 25, "@>");
805 o
->labelcolor((fltk::Color
)0x800000);
806 o
->callback((fltk::Callback
*)cb_play_button
);
808 {fltk::Button
* o
= stop_button
= new fltk::Button(35, 5, 25, 25, "@square");
809 o
->labelcolor((fltk::Color
)0x800000);
810 o
->callback((fltk::Callback
*)cb_stop_button
);
812 {fltk::Button
* o
= record_button
= new fltk::Button(65, 5, 25, 25, "@circle");
813 o
->labelcolor((fltk::Color
)0xff000000);
814 o
->callback((fltk::Callback
*)cb_record_button
);
815 o
->type(fltk::Button::TOGGLE
);
817 {Metronome
* o
= metronome
= new Metronome(95, 5, 25, 25, "0");
818 o
->color((fltk::Color
)56);
819 o
->labelcolor((fltk::Color
)0xffffff00);
821 {fltk::Button
* o
= loop_toggle
= new fltk::Button(125, 5, 25, 25);
822 o
->callback((fltk::Callback
*)cb_loop_toggle
);
823 o
->tooltip("toggle looping");
824 o
->type(fltk::Button::TOGGLE
);
826 {fltk::Group
* o
= new fltk::Group(155, 0, 20, 35);
828 fltk::Group::current()->resizable(o
);
830 {fltk::Group
* o
= pattern_buttons
= new fltk::Group(200, 5, 310, 25);
833 {fltk::Button
* o
= tri_button
= new fltk::Button(10, 0, 25, 25, "tri");
834 o
->callback((fltk::Callback
*)cb_tri_button
);
835 o
->type(fltk::Button::TOGGLE
);
837 {fltk::Button
* o
= quant1_button
= new fltk::Button(35, 0, 25, 25, "qua");
838 o
->tooltip("quantize selected notes");
840 {fltk::Button
* o
= quant0_button
= new fltk::Button(60, 0, 25, 25, "qu_");
841 o
->tooltip("quantize length of selected notes");
843 {fltk::Button
* o
= tool_button
= new fltk::Button(85, 0, 25, 25, "tool");
844 o
->callback((fltk::Callback
*)cb_tool_button
);
846 {fltk::Button
* o
= qbutton4
= new fltk::Button(135, 0, 25, 25);
847 o
->callback((fltk::Callback
*)cb_qbutton4
);
848 o
->type(fltk::Button::TOGGLE
);
850 {fltk::Button
* o
= qbutton8
= new fltk::Button(160, 0, 25, 25);
851 o
->callback((fltk::Callback
*)cb_qbutton8
);
852 o
->type(fltk::Button::TOGGLE
);
854 {fltk::Button
* o
= qbutton16
= new fltk::Button(185, 0, 25, 25);
855 o
->callback((fltk::Callback
*)cb_qbutton16
);
856 o
->type(fltk::Button::TOGGLE
);
859 {fltk::Button
* o
= qbutton32
= new fltk::Button(210, 0, 25, 25);
860 o
->callback((fltk::Callback
*)cb_qbutton32
);
861 o
->type(fltk::Button::TOGGLE
);
863 {fltk::Button
* o
= qbutton64
= new fltk::Button(235, 0, 25, 25);
864 o
->callback((fltk::Callback
*)cb_qbutton64
);
865 o
->type(fltk::Button::TOGGLE
);
867 {fltk::Button
* o
= qbutton128
= new fltk::Button(260, 0, 25, 25);
868 o
->callback((fltk::Callback
*)cb_qbutton128
);
869 o
->type(fltk::Button::TOGGLE
);
871 {fltk::Button
* o
= qbutton0
= new fltk::Button(285, 0, 25, 25);
872 o
->callback((fltk::Callback
*)cb_qbutton0
);
873 o
->type(fltk::Button::TOGGLE
);
877 {fltk::Group
* o
= song_buttons
= new fltk::Group(385, 5, 145, 25);
879 {fltk::Button
* o
= edit_button
= new fltk::Button(0, 0, 25, 25);
880 o
->set_flag(fltk::STATE
);
881 o
->callback((fltk::Callback
*)cb_edit_button
);
882 o
->tooltip("create delete move resize select paste blocks");
884 {fltk::Button
* o
= color_button
= new fltk::Button(25, 0, 25, 25);
885 o
->callback((fltk::Callback
*)cb_color_button
);
886 o
->tooltip("color tool");
887 o
->type(fltk::Button::TOGGLE
);
889 {fltk::Button
* o
= unclone_button
= new fltk::Button(50, 0, 25, 25);
890 o
->callback((fltk::Callback
*)cb_unclone_button
);
891 o
->tooltip("click on blocks to unclone them");
892 o
->type(fltk::Button::TOGGLE
);
894 {fltk::Button
* o
= split_button
= new fltk::Button(75, 0, 25, 25);
895 o
->callback((fltk::Callback
*)cb_split_button
);
896 o
->tooltip("click on a block to split in two");
897 o
->type(fltk::Button::TOGGLE
);
899 {fltk::Button
* o
= join_button
= new fltk::Button(100, 0, 25, 25);
900 o
->callback((fltk::Callback
*)cb_join_button
);
901 o
->tooltip("click on adjacent blocks to join them");
902 o
->type(fltk::Button::TOGGLE
);
906 {fltk::Button
* o
= conf_button
= new fltk::Button(535, 5, 25, 25);
907 o
->callback((fltk::Callback
*)cb_conf_button
);
908 o
->tooltip("configuration");
909 o
->type(fltk::Button::TOGGLE
);
911 {fltk::Button
* o
= scope_button
= new fltk::Button(560, 5, 25, 25);
912 o
->callback((fltk::Callback
*)cb_scope_button
);
914 o
->type(fltk::Button::TOGGLE
);
916 {fltk::Button
* o
= file_button
= new fltk::Button(585, 5, 25, 25);
917 o
->callback((fltk::Callback
*)cb_file_button
);
920 o
->type(fltk::Button::TOGGLE
);
922 {fltk::PopupMenu
* o
= file_menu
= new fltk::PopupMenu(585, 5, 25, 25);
924 {fltk::Item
* o
= new fltk::Item("new");
925 o
->callback((fltk::Callback
*)cb_new
);
927 {fltk::Item
* o
= new fltk::Item("load");
928 o
->callback((fltk::Callback
*)cb_load
);
930 {fltk::Item
* o
= new fltk::Item("save");
931 o
->callback((fltk::Callback
*)cb_save
);
933 {fltk::Item
* o
= new fltk::Item("save as...");
934 o
->callback((fltk::Callback
*)cb_save1
);
937 {fltk::Item
* o
= new fltk::Item("import");
938 o
->callback((fltk::Callback
*)cb_import
);
940 {fltk::Item
* o
= new fltk::Item("export");
941 o
->callback((fltk::Callback
*)cb_export
);
945 {fltk::Button
* o
= help_button
= new fltk::Button(610, 5, 25, 25);
946 o
->callback((fltk::Callback
*)cb_help_button
);
948 o
->type(fltk::Button::TOGGLE
);
955 o
->size_range(640,455);
958 {fltk::Window
* o
= config_window
= new fltk::Window(320, 285, "config");
960 o
->callback((fltk::Callback
*)cb_config_window
, (void*)(this));
962 {fltk::TabGroup
* o
= new fltk::TabGroup(0, 0, 320, 285);
964 {fltk::Group
* o
= new fltk::Group(145, 15, 170, 265, "options");
966 {fltk::ValueInput
* o
= beats_per_measure
= new fltk::ValueInput(5, 5, 45, 20, "beats per measure");
971 o
->callback((fltk::Callback
*)cb_beats_per_measure
);
973 {fltk::ValueInput
* o
= measures_per_phrase
= new fltk::ValueInput(5, 30, 45, 20, "measures per phrase");
977 o
->callback((fltk::Callback
*)cb_measures_per_phrase
);
979 {fltk::ValueOutput
* o
= bpm_output
= new fltk::ValueOutput(5, 55, 45, 20, "bpm");
985 {fltk::ThumbWheel
* o
= bpm_wheel
= new fltk::ThumbWheel(55, 55, 105, 20);
990 o
->callback((fltk::Callback
*)cb_bpm_wheel
);
991 o
->align(fltk::ALIGN_LEFT
);
993 {fltk::ValueInput
* o
= measures_until_record
= new fltk::ValueInput(5, 80, 45, 20, "measures until record");
997 o
->callback((fltk::Callback
*)cb_measures_until_record
);
999 {fltk::CheckButton
* o
= check_alwayscopy
= new fltk::CheckButton(5, 105, 25, 25, "always hard copy");
1000 o
->callback((fltk::Callback
*)cb_check_alwayscopy
);
1001 o
->align(fltk::ALIGN_LEFT
);
1002 o
->tooltip("instead of making a linked clone when you copy a block in the song view.");
1004 {fltk::CheckButton
* o
= check_trackinit
= new fltk::CheckButton(145, 80, 25, 25, "track init");
1005 o
->set_flag(fltk::STATE
);
1006 o
->callback((fltk::Callback
*)cb_check_trackinit
);
1007 o
->align(fltk::ALIGN_LEFT
);
1009 {fltk::CheckButton
* o
= check_autotrackname
= new fltk::CheckButton(145, 105, 25, 25, "auto track name");
1010 o
->callback((fltk::Callback
*)cb_check_autotrackname
);
1011 o
->align(fltk::ALIGN_LEFT
);
1012 o
->tooltip("Fill in GM instruments for track names when you change the program.");
1014 {fltk::CheckButton
* o
= check_passthru
= new fltk::CheckButton(5, 130, 25, 26, "record pass-thru");
1015 o
->set_flag(fltk::STATE
);
1016 o
->callback((fltk::Callback
*)cb_check_passthru
);
1017 o
->align(fltk::ALIGN_LEFT
);
1018 o
->tooltip("Echo midi input to midi output.");
1020 {fltk::CheckButton
* o
= check_playinsert
= new fltk::CheckButton(145, 130, 25, 26, "play note insertion");
1021 o
->set_flag(fltk::STATE
);
1022 o
->callback((fltk::Callback
*)cb_check_playinsert
);
1023 o
->align(fltk::ALIGN_LEFT
);
1024 o
->tooltip("Send midi note on when you create notes.");
1026 {fltk::CheckButton
* o
= check_recordonchan
= new fltk::CheckButton(5, 155, 25, 25, "record on channel");
1027 o
->callback((fltk::Callback
*)cb_check_recordonchan
);
1028 o
->align(fltk::ALIGN_LEFT
);
1029 o
->tooltip("Record on first track that matches channel of midi input instead of selected \
1032 {fltk::CheckButton
* o
= check_playmove
= new fltk::CheckButton(145, 155, 25, 26, "play note move");
1033 o
->set_flag(fltk::STATE
);
1034 o
->callback((fltk::Callback
*)cb_check_playmove
);
1035 o
->align(fltk::ALIGN_LEFT
);
1036 o
->tooltip("Send midi note on when you move notes.");
1038 {fltk::CheckButton
* o
= check_follow
= new fltk::CheckButton(5, 179, 25, 26, "follow playback");
1039 o
->set_flag(fltk::STATE
);
1040 o
->callback((fltk::Callback
*)cb_check_follow
);
1041 o
->align(fltk::ALIGN_LEFT
);
1042 o
->tooltip("Auto scroll horizontally when play head leaves viewing area.");
1044 {fltk::ValueInput
* o
= default_velocity
= new fltk::ValueInput(120, 180, 45, 20, "default velocity");
1048 o
->callback((fltk::Callback
*)cb_default_velocity
);
1050 {fltk::Choice
* o
= menu_recordmode
= new fltk::Choice(5, 210, 160, 25, "record mode");
1052 {fltk::Item
* o
= new fltk::Item("merge");
1053 o
->callback((fltk::Callback
*)cb_merge
);
1055 {fltk::Item
* o
= new fltk::Item("overwrite");
1056 o
->callback((fltk::Callback
*)cb_overwrite
);
1058 {fltk::Item
* o
= new fltk::Item("layer");
1059 o
->callback((fltk::Callback
*)cb_layer
);
1063 {fltk::Choice
* o
= menu_rob
= new fltk::Choice(5, 240, 160, 25, "record outside block");
1065 {fltk::Item
* o
= new fltk::Item("do nothing");
1066 o
->callback((fltk::Callback
*)cb_do
);
1068 {fltk::Item
* o
= new fltk::Item("new block");
1069 o
->callback((fltk::Callback
*)cb_new1
);
1071 {fltk::Item
* o
= new fltk::Item("extend block");
1072 o
->callback((fltk::Callback
*)cb_extend
);
1078 {fltk::Group
* o
= new fltk::Group(0, 15, 320, 270, "keyboard");
1081 {KeyGrabber
* o
= kg_l0
= new KeyGrabber(35, 5, 45, 15, "C0");
1082 o
->align(fltk::ALIGN_LEFT
);
1084 {KeyGrabber
* o
= kg_l1
= new KeyGrabber(35, 20, 45, 15, "C#0");
1085 o
->align(fltk::ALIGN_LEFT
);
1087 {KeyGrabber
* o
= kg_l2
= new KeyGrabber(35, 35, 45, 15, "D0");
1088 o
->align(fltk::ALIGN_LEFT
);
1090 {KeyGrabber
* o
= kg_l3
= new KeyGrabber(35, 50, 45, 15, "D#0");
1091 o
->align(fltk::ALIGN_LEFT
);
1093 {KeyGrabber
* o
= kg_l4
= new KeyGrabber(35, 65, 45, 15, "E0");
1094 o
->align(fltk::ALIGN_LEFT
);
1096 {KeyGrabber
* o
= kg_l5
= new KeyGrabber(35, 80, 45, 15, "F0");
1097 o
->align(fltk::ALIGN_LEFT
);
1099 {KeyGrabber
* o
= kg_l6
= new KeyGrabber(35, 95, 45, 15, "F#0");
1100 o
->align(fltk::ALIGN_LEFT
);
1102 {KeyGrabber
* o
= kg_l7
= new KeyGrabber(35, 110, 45, 15, "G0");
1103 o
->align(fltk::ALIGN_LEFT
);
1105 {KeyGrabber
* o
= kg_l8
= new KeyGrabber(35, 125, 45, 15, "G#0");
1106 o
->align(fltk::ALIGN_LEFT
);
1108 {KeyGrabber
* o
= kg_l9
= new KeyGrabber(35, 140, 45, 15, "A0");
1109 o
->align(fltk::ALIGN_LEFT
);
1111 {KeyGrabber
* o
= kg_l10
= new KeyGrabber(35, 155, 45, 15, "A#0");
1112 o
->callback((fltk::Callback
*)cb_kg_l10
);
1113 o
->align(fltk::ALIGN_LEFT
);
1115 {KeyGrabber
* o
= kg_l11
= new KeyGrabber(35, 170, 45, 15, "B0");
1116 o
->align(fltk::ALIGN_LEFT
);
1118 {KeyGrabber
* o
= kg_l12
= new KeyGrabber(35, 185, 45, 15, "C1");
1119 o
->align(fltk::ALIGN_LEFT
);
1121 {KeyGrabber
* o
= kg_l13
= new KeyGrabber(35, 200, 45, 15, "C#1");
1122 o
->align(fltk::ALIGN_LEFT
);
1124 {KeyGrabber
* o
= kg_l14
= new KeyGrabber(35, 215, 45, 15, "D1");
1125 o
->align(fltk::ALIGN_LEFT
);
1127 {KeyGrabber
* o
= kg_l15
= new KeyGrabber(35, 230, 45, 15, "D#1");
1128 o
->align(fltk::ALIGN_LEFT
);
1130 {KeyGrabber
* o
= kg_l16
= new KeyGrabber(35, 245, 45, 15, "E1");
1131 o
->align(fltk::ALIGN_LEFT
);
1133 {KeyGrabber
* o
= kg_u0
= new KeyGrabber(130, 5, 45, 15, "C1");
1134 o
->align(fltk::ALIGN_LEFT
);
1136 {KeyGrabber
* o
= kg_u1
= new KeyGrabber(130, 20, 45, 15, "C#1");
1137 o
->align(fltk::ALIGN_LEFT
);
1139 {KeyGrabber
* o
= kg_u2
= new KeyGrabber(130, 35, 45, 15, "D1");
1140 o
->align(fltk::ALIGN_LEFT
);
1142 {KeyGrabber
* o
= kg_u3
= new KeyGrabber(130, 50, 45, 15, "D#1");
1143 o
->align(fltk::ALIGN_LEFT
);
1145 {KeyGrabber
* o
= kg_u4
= new KeyGrabber(130, 65, 45, 15, "E1");
1146 o
->align(fltk::ALIGN_LEFT
);
1148 {KeyGrabber
* o
= kg_u5
= new KeyGrabber(130, 80, 45, 15, "F1");
1149 o
->align(fltk::ALIGN_LEFT
);
1151 {KeyGrabber
* o
= kg_u6
= new KeyGrabber(130, 95, 45, 15, "F#1");
1152 o
->align(fltk::ALIGN_LEFT
);
1154 {KeyGrabber
* o
= kg_u7
= new KeyGrabber(130, 110, 45, 15, "G1");
1155 o
->align(fltk::ALIGN_LEFT
);
1157 {KeyGrabber
* o
= kg_u8
= new KeyGrabber(130, 125, 45, 15, "G#1");
1158 o
->align(fltk::ALIGN_LEFT
);
1160 {KeyGrabber
* o
= kg_u9
= new KeyGrabber(130, 140, 45, 15, "A1");
1161 o
->align(fltk::ALIGN_LEFT
);
1163 {KeyGrabber
* o
= kg_u10
= new KeyGrabber(130, 155, 45, 15, "A#1");
1164 o
->align(fltk::ALIGN_LEFT
);
1166 {KeyGrabber
* o
= kg_u11
= new KeyGrabber(130, 170, 45, 15, "B1");
1167 o
->align(fltk::ALIGN_LEFT
);
1169 {KeyGrabber
* o
= kg_u12
= new KeyGrabber(130, 185, 45, 15, "C2");
1170 o
->align(fltk::ALIGN_LEFT
);
1172 {KeyGrabber
* o
= kg_u13
= new KeyGrabber(130, 200, 45, 15, "C#2");
1173 o
->align(fltk::ALIGN_LEFT
);
1175 {KeyGrabber
* o
= kg_u14
= new KeyGrabber(130, 215, 45, 15, "D2");
1176 o
->align(fltk::ALIGN_LEFT
);
1178 {KeyGrabber
* o
= kg_u15
= new KeyGrabber(130, 230, 45, 15, "D#2");
1179 o
->align(fltk::ALIGN_LEFT
);
1181 {KeyGrabber
* o
= kg_u16
= new KeyGrabber(130, 245, 45, 15, "E2");
1182 o
->align(fltk::ALIGN_LEFT
);
1184 {KeyGrabber
* o
= kg_u17
= new KeyGrabber(265, 5, 45, 15, "F2");
1185 o
->align(fltk::ALIGN_LEFT
);
1187 {KeyGrabber
* o
= kg_u18
= new KeyGrabber(265, 20, 45, 15, "F#2");
1188 o
->align(fltk::ALIGN_LEFT
);
1190 {KeyGrabber
* o
= kg_u19
= new KeyGrabber(265, 35, 45, 15, "G2");
1191 o
->align(fltk::ALIGN_LEFT
);
1193 {KeyGrabber
* o
= kg_u20
= new KeyGrabber(265, 50, 45, 15, "G#2");
1194 o
->align(fltk::ALIGN_LEFT
);
1196 {KeyGrabber
* o
= kg_zi
= new KeyGrabber(265, 65, 45, 15, "zoom in");
1197 o
->align(fltk::ALIGN_LEFT
);
1199 {KeyGrabber
* o
= kg_zo
= new KeyGrabber(265, 80, 45, 15, "zoom out");
1200 o
->align(fltk::ALIGN_LEFT
);
1202 {KeyGrabber
* o
= kg_ou
= new KeyGrabber(265, 95, 45, 15, "octave up");
1203 o
->align(fltk::ALIGN_LEFT
);
1205 {KeyGrabber
* o
= kg_od
= new KeyGrabber(265, 110, 45, 15, "octave down");
1206 o
->align(fltk::ALIGN_LEFT
);
1210 {fltk::Group
* o
= new fltk::Group(0, 15, 320, 270, "colors");
1213 new fltk::Button(250, 245, 65, 20, "apply");
1214 {fltk::Choice
* o
= new fltk::Choice(55, 10, 100, 20, "presets");
1216 new fltk::Item("windo");
1217 new fltk::Item("midnight");
1218 new fltk::Item("xterm");
1228 {fltk::Window
* o
= help_window
= new fltk::Window(580, 370, "help");
1229 o
->shortcut(0xff1b);
1230 o
->callback((fltk::Callback
*)cb_help_window
, (void*)(this));
1232 {fltk::TabGroup
* o
= new fltk::TabGroup(0, 0, 580, 370);
1234 {fltk::Group
* o
= new fltk::Group(0, 25, 580, 345, "info");
1236 title_text
= new fltk::Input(55, 5, 520, 20, "Title");
1237 author_text
= new fltk::Input(55, 30, 520, 20, "Author");
1238 {fltk::TextEditor
* o
= info_text
= new fltk::TextEditor(5, 55, 570, 285);
1239 o
->textfont(fltk::COURIER
);
1240 fltk::Group::current()->resizable(o
);
1243 fltk::Group::current()->resizable(o
);
1245 {fltk::Group
* o
= new fltk::Group(0, 25, 580, 345, "controls");
1248 {fltk::TextDisplay
* o
= new fltk::TextDisplay(5, 5, 570, 335);
1249 o
->textfont(fltk::COURIER
);
1250 fltk::Group::current()->resizable(o
);
1251 load_text(o
,ROOT_DATA_DIR
"doc/controls.txt");
1255 {fltk::Group
* o
= new fltk::Group(0, 25, 580, 345, "guide");
1258 {fltk::TextDisplay
* o
= new fltk::TextDisplay(5, 5, 570, 335);
1259 o
->textfont(fltk::COURIER
);
1260 fltk::Group::current()->resizable(o
);
1261 load_text(o
,ROOT_DATA_DIR
"doc/guide.txt");
1265 {fltk::Group
* o
= new fltk::Group(0, 25, 580, 345, "license");
1268 {fltk::TextDisplay
* o
= new fltk::TextDisplay(5, 5, 570, 335);
1269 o
->textfont(fltk::COURIER
);
1270 fltk::Group::current()->resizable(o
);
1271 load_text(o
,ROOT_DATA_DIR
"doc/license.txt");
1275 {fltk::Group
* o
= new fltk::Group(0, 25, 580, 345, "about");
1278 {fltk::TextDisplay
* o
= new fltk::TextDisplay(5, 5, 570, 335);
1279 o
->textfont(fltk::COURIER
);
1280 fltk::Group::current()->resizable(o
);
1281 load_text(o
,ROOT_DATA_DIR
"doc/README");
1288 o
->size_range(580,370);
1291 {fltk::Window
* o
= action_window
= new fltk::Window(100, 130, "menu");
1292 o
->shortcut(0xff1b);
1293 o
->callback((fltk::Callback
*)cb_action_window
, (void*)(this));
1295 {fltk::Button
* o
= new fltk::Button(5, 5, 90, 20, "new");
1296 o
->callback((fltk::Callback
*)cb_new2
);
1298 {fltk::Button
* o
= new fltk::Button(5, 25, 90, 20, "save");
1299 o
->callback((fltk::Callback
*)cb_save2
);
1301 {fltk::Button
* o
= new fltk::Button(5, 45, 90, 20, "save as");
1302 o
->callback((fltk::Callback
*)cb_save3
);
1304 {fltk::Button
* o
= new fltk::Button(5, 65, 90, 20, "load");
1305 o
->callback((fltk::Callback
*)cb_load1
);
1307 {fltk::Button
* o
= new fltk::Button(5, 85, 90, 20, "import");
1308 o
->callback((fltk::Callback
*)cb_import1
);
1310 {fltk::Button
* o
= new fltk::Button(5, 105, 90, 20, "export");
1311 o
->callback((fltk::Callback
*)cb_export1
);
1316 {fltk::Window
* o
= scope_window
= new fltk::Window(425, 280, "scope");
1318 o
->shortcut(0xff1b);
1319 o
->callback((fltk::Callback
*)cb_scope_window
, (void*)(this));
1321 {fltk::TextDisplay
* o
= scope
= new fltk::TextDisplay(5, 5, 415, 245);
1322 o
->textfont(fltk::COURIER
);
1323 o
->color((fltk::Color
)0x280000);
1324 o
->textcolor((fltk::Color
)0xff0000);
1325 fltk::Group::current()->resizable(o
);
1328 {fltk::Group
* o
= new fltk::Group(5, 255, 415, 20);
1330 {fltk::Button
* o
= new fltk::Button(0, 0, 40, 20, "on");
1331 o
->callback((fltk::Callback
*)cb_on
);
1332 o
->type(fltk::Button::TOGGLE
);
1334 {fltk::InvisibleBox
* o
= new fltk::InvisibleBox(45, 0, 95, 20);
1335 fltk::Group::current()->resizable(o
);
1341 loop_toggle
->image(fltk::SharedImage::get(ROOT_DATA_DIR
"gfx/loop.gif"));
1342 conf_button
->image(fltk::SharedImage::get(ROOT_DATA_DIR
"gfx/conf.gif"));
1343 scope_button
->image(fltk::SharedImage::get(ROOT_DATA_DIR
"gfx/scope.gif"));
1344 file_button
->image(fltk::SharedImage::get(ROOT_DATA_DIR
"gfx/file.gif"));
1345 file_menu
->image(fltk::SharedImage::get(ROOT_DATA_DIR
"gfx/file.gif"));
1346 help_button
->image(fltk::SharedImage::get(ROOT_DATA_DIR
"gfx/help.gif"));
1348 edit_button
->image(fltk::SharedImage::get(ROOT_DATA_DIR
"gfx/edit.gif"));
1349 color_button
->image(fltk::SharedImage::get(ROOT_DATA_DIR
"gfx/color.gif"));
1350 unclone_button
->image(fltk::SharedImage::get(ROOT_DATA_DIR
"gfx/fork.gif"));
1351 split_button
->image(fltk::SharedImage::get(ROOT_DATA_DIR
"gfx/split.gif"));
1352 join_button
->image(fltk::SharedImage::get(ROOT_DATA_DIR
"gfx/join.gif"));
1354 qbutton4
->image(fltk::SharedImage::get(ROOT_DATA_DIR
"gfx/q4.gif"));
1355 qbutton8
->image(fltk::SharedImage::get(ROOT_DATA_DIR
"gfx/q8.gif"));
1356 qbutton16
->image(fltk::SharedImage::get(ROOT_DATA_DIR
"gfx/q16.gif"));
1357 qbutton32
->image(fltk::SharedImage::get(ROOT_DATA_DIR
"gfx/q32.gif"));
1358 qbutton64
->image(fltk::SharedImage::get(ROOT_DATA_DIR
"gfx/q64.gif"));
1359 qbutton128
->image(fltk::SharedImage::get(ROOT_DATA_DIR
"gfx/q128.gif"));
1360 qbutton0
->image(fltk::SharedImage::get(ROOT_DATA_DIR
"gfx/q0.gif"));
1361 track_info
->set_rec(0);
1363 main_window
->show();