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_tool_button_i(fltk::Button
*, void*) {
179 void UI::cb_tool_button(fltk::Button
* o
, void* v
) {
180 ((UI
*)(o
->parent()->parent()->parent()->user_data()))->cb_tool_button_i(o
,v
);
183 inline void UI::cb_qbutton4_i(fltk::Button
*, void*) {
186 void UI::cb_qbutton4(fltk::Button
* o
, void* v
) {
187 ((UI
*)(o
->parent()->parent()->parent()->user_data()))->cb_qbutton4_i(o
,v
);
190 inline void UI::cb_qbutton8_i(fltk::Button
*, void*) {
193 void UI::cb_qbutton8(fltk::Button
* o
, void* v
) {
194 ((UI
*)(o
->parent()->parent()->parent()->user_data()))->cb_qbutton8_i(o
,v
);
197 inline void UI::cb_qbutton16_i(fltk::Button
*, void*) {
200 void UI::cb_qbutton16(fltk::Button
* o
, void* v
) {
201 ((UI
*)(o
->parent()->parent()->parent()->user_data()))->cb_qbutton16_i(o
,v
);
204 inline void UI::cb_qbutton32_i(fltk::Button
*, void*) {
207 void UI::cb_qbutton32(fltk::Button
* o
, void* v
) {
208 ((UI
*)(o
->parent()->parent()->parent()->user_data()))->cb_qbutton32_i(o
,v
);
211 inline void UI::cb_qbutton64_i(fltk::Button
*, void*) {
214 void UI::cb_qbutton64(fltk::Button
* o
, void* v
) {
215 ((UI
*)(o
->parent()->parent()->parent()->user_data()))->cb_qbutton64_i(o
,v
);
218 inline void UI::cb_qbutton128_i(fltk::Button
*, void*) {
221 void UI::cb_qbutton128(fltk::Button
* o
, void* v
) {
222 ((UI
*)(o
->parent()->parent()->parent()->user_data()))->cb_qbutton128_i(o
,v
);
225 inline void UI::cb_qbutton0_i(fltk::Button
*, void*) {
228 void UI::cb_qbutton0(fltk::Button
* o
, void* v
) {
229 ((UI
*)(o
->parent()->parent()->parent()->user_data()))->cb_qbutton0_i(o
,v
);
232 inline void UI::cb_edit_button_i(fltk::Button
*, void*) {
235 void UI::cb_edit_button(fltk::Button
* o
, void* v
) {
236 ((UI
*)(o
->parent()->parent()->parent()->user_data()))->cb_edit_button_i(o
,v
);
239 inline void UI::cb_color_button_i(fltk::Button
*, void*) {
242 void UI::cb_color_button(fltk::Button
* o
, void* v
) {
243 ((UI
*)(o
->parent()->parent()->parent()->user_data()))->cb_color_button_i(o
,v
);
246 inline void UI::cb_unclone_button_i(fltk::Button
*, void*) {
249 void UI::cb_unclone_button(fltk::Button
* o
, void* v
) {
250 ((UI
*)(o
->parent()->parent()->parent()->user_data()))->cb_unclone_button_i(o
,v
);
253 inline void UI::cb_split_button_i(fltk::Button
*, void*) {
256 void UI::cb_split_button(fltk::Button
* o
, void* v
) {
257 ((UI
*)(o
->parent()->parent()->parent()->user_data()))->cb_split_button_i(o
,v
);
260 inline void UI::cb_join_button_i(fltk::Button
*, void*) {
263 void UI::cb_join_button(fltk::Button
* o
, void* v
) {
264 ((UI
*)(o
->parent()->parent()->parent()->user_data()))->cb_join_button_i(o
,v
);
267 inline void UI::cb_conf_button_i(fltk::Button
* o
, void*) {
269 ui
->config_window
->show();
272 ui
->config_window
->hide();
275 void UI::cb_conf_button(fltk::Button
* o
, void* v
) {
276 ((UI
*)(o
->parent()->parent()->user_data()))->cb_conf_button_i(o
,v
);
279 inline void UI::cb_scope_button_i(fltk::Button
* o
, void*) {
281 ui
->scope_window
->show();
284 ui
->scope_window
->hide();
287 void UI::cb_scope_button(fltk::Button
* o
, void* v
) {
288 ((UI
*)(o
->parent()->parent()->user_data()))->cb_scope_button_i(o
,v
);
291 inline void UI::cb_file_button_i(fltk::Button
* o
, void*) {
293 ui
->action_window
->show();
296 ui
->action_window
->hide();
299 void UI::cb_file_button(fltk::Button
* o
, void* v
) {
300 ((UI
*)(o
->parent()->parent()->user_data()))->cb_file_button_i(o
,v
);
303 inline void UI::cb_new_i(fltk::Item
*, void*) {
305 ui
->file_button
->state(0);
307 void UI::cb_new(fltk::Item
* o
, void* v
) {
308 ((UI
*)(o
->parent()->parent()->parent()->user_data()))->cb_new_i(o
,v
);
311 inline void UI::cb_load_i(fltk::Item
*, void*) {
312 action_window
->hide();
313 ui
->file_button
->state(0);
314 const char* filename
= fltk::file_chooser("open file",NULL
,get_last_dir());
316 if(load(filename
)<0){
321 void UI::cb_load(fltk::Item
* o
, void* v
) {
322 ((UI
*)(o
->parent()->parent()->parent()->user_data()))->cb_load_i(o
,v
);
325 inline void UI::cb_save_i(fltk::Item
*, void*) {
326 action_window
->hide();
327 ui
->file_button
->state(0);
330 void UI::cb_save(fltk::Item
* o
, void* v
) {
331 ((UI
*)(o
->parent()->parent()->parent()->user_data()))->cb_save_i(o
,v
);
334 inline void UI::cb_save1_i(fltk::Item
*, void*) {
335 action_window
->hide();
336 ui
->file_button
->state(0);
337 save(fltk::file_chooser("save file",NULL
,get_last_dir()));
339 void UI::cb_save1(fltk::Item
* o
, void* v
) {
340 ((UI
*)(o
->parent()->parent()->parent()->user_data()))->cb_save1_i(o
,v
);
343 inline void UI::cb_import_i(fltk::Item
*, void*) {
344 action_window
->hide();
345 ui
->file_button
->state(0);
346 const char* filename
= fltk::file_chooser("open file",NULL
,get_last_dir());
348 if(loadsmf(filename
)<0){
353 void UI::cb_import(fltk::Item
* o
, void* v
) {
354 ((UI
*)(o
->parent()->parent()->parent()->user_data()))->cb_import_i(o
,v
);
357 inline void UI::cb_export_i(fltk::Item
*, void*) {
358 action_window
->hide();
359 ui
->file_button
->state(0);
360 savesmf(fltk::file_chooser("export file",NULL
,get_last_dir()));
362 void UI::cb_export(fltk::Item
* o
, void* v
) {
363 ((UI
*)(o
->parent()->parent()->parent()->user_data()))->cb_export_i(o
,v
);
366 inline void UI::cb_help_button_i(fltk::Button
* o
, void*) {
368 ui
->help_window
->show();
371 ui
->help_window
->hide();
374 void UI::cb_help_button(fltk::Button
* o
, void* v
) {
375 ((UI
*)(o
->parent()->parent()->user_data()))->cb_help_button_i(o
,v
);
378 inline void UI::cb_config_window_i(fltk::Window
* o
, void*) {
379 ui
->conf_button
->state(0);
382 void UI::cb_config_window(fltk::Window
* o
, void* v
) {
383 ((UI
*)(o
->user_data()))->cb_config_window_i(o
,v
);
386 inline void UI::cb_beats_per_measure_i(fltk::ValueInput
* o
, void*) {
387 if(o
->value() > o
->maximum())
388 o
->value(o
->maximum());
389 if(o
->value() < o
->minimum())
390 o
->value(o
->minimum());
391 set_beats_per_measure((int)o
->value());
393 void UI::cb_beats_per_measure(fltk::ValueInput
* o
, void* v
) {
394 ((UI
*)(o
->parent()->parent()->parent()->user_data()))->cb_beats_per_measure_i(o
,v
);
397 inline void UI::cb_measures_per_phrase_i(fltk::ValueInput
* o
, void*) {
398 if(o
->value() > o
->maximum())
399 o
->value(o
->maximum());
400 if(o
->value() < o
->minimum())
401 o
->value(o
->minimum());
402 set_measures_per_phrase((int)o
->value());
404 void UI::cb_measures_per_phrase(fltk::ValueInput
* o
, void* v
) {
405 ((UI
*)(o
->parent()->parent()->parent()->user_data()))->cb_measures_per_phrase_i(o
,v
);
408 inline void UI::cb_bpm_wheel_i(fltk::ThumbWheel
* o
, void*) {
409 set_bpm((int)o
->value());
410 ui
->bpm_output
->value(o
->value());
412 void UI::cb_bpm_wheel(fltk::ThumbWheel
* o
, void* v
) {
413 ((UI
*)(o
->parent()->parent()->parent()->user_data()))->cb_bpm_wheel_i(o
,v
);
416 inline void UI::cb_measures_until_record_i(fltk::ValueInput
* o
, void*) {
417 if(o
->value() > o
->maximum())
418 o
->value(o
->maximum());
419 if(o
->value() < o
->minimum())
420 o
->value(o
->minimum());
421 set_measures_until_record((int)o
->value());
423 void UI::cb_measures_until_record(fltk::ValueInput
* o
, void* v
) {
424 ((UI
*)(o
->parent()->parent()->parent()->user_data()))->cb_measures_until_record_i(o
,v
);
427 inline void UI::cb_check_alwayscopy_i(fltk::CheckButton
* o
, void*) {
428 set_alwayscopy(o
->value());
430 void UI::cb_check_alwayscopy(fltk::CheckButton
* o
, void* v
) {
431 ((UI
*)(o
->parent()->parent()->parent()->user_data()))->cb_check_alwayscopy_i(o
,v
);
434 inline void UI::cb_check_trackinit_i(fltk::CheckButton
* o
, void*) {
435 set_trackinit(o
->value());
437 void UI::cb_check_trackinit(fltk::CheckButton
* o
, void* v
) {
438 ((UI
*)(o
->parent()->parent()->parent()->user_data()))->cb_check_trackinit_i(o
,v
);
441 inline void UI::cb_check_autotrackname_i(fltk::CheckButton
* o
, void*) {
442 set_autotrackname(o
->value());
444 void UI::cb_check_autotrackname(fltk::CheckButton
* o
, void* v
) {
445 ((UI
*)(o
->parent()->parent()->parent()->user_data()))->cb_check_autotrackname_i(o
,v
);
448 inline void UI::cb_check_passthru_i(fltk::CheckButton
* o
, void*) {
449 set_passthru(o
->value());
451 void UI::cb_check_passthru(fltk::CheckButton
* o
, void* v
) {
452 ((UI
*)(o
->parent()->parent()->parent()->user_data()))->cb_check_passthru_i(o
,v
);
455 inline void UI::cb_check_playinsert_i(fltk::CheckButton
* o
, void*) {
456 set_playinsert(o
->value());
458 void UI::cb_check_playinsert(fltk::CheckButton
* o
, void* v
) {
459 ((UI
*)(o
->parent()->parent()->parent()->user_data()))->cb_check_playinsert_i(o
,v
);
462 inline void UI::cb_check_recordonchan_i(fltk::CheckButton
* o
, void*) {
463 set_recordonchan(o
->value());
465 void UI::cb_check_recordonchan(fltk::CheckButton
* o
, void* v
) {
466 ((UI
*)(o
->parent()->parent()->parent()->user_data()))->cb_check_recordonchan_i(o
,v
);
469 inline void UI::cb_check_playmove_i(fltk::CheckButton
* o
, void*) {
470 set_playmove(o
->value());
472 void UI::cb_check_playmove(fltk::CheckButton
* o
, void* v
) {
473 ((UI
*)(o
->parent()->parent()->parent()->user_data()))->cb_check_playmove_i(o
,v
);
476 inline void UI::cb_check_follow_i(fltk::CheckButton
* o
, void*) {
477 set_follow(o
->value());
479 void UI::cb_check_follow(fltk::CheckButton
* o
, void* v
) {
480 ((UI
*)(o
->parent()->parent()->parent()->user_data()))->cb_check_follow_i(o
,v
);
483 inline void UI::cb_default_velocity_i(fltk::ValueInput
* o
, void*) {
484 if(o
->value() > o
->maximum())
485 o
->value(o
->maximum());
486 if(o
->value() < o
->minimum())
487 o
->value(o
->minimum());
488 set_defaultvelocity((int)o
->value());
490 void UI::cb_default_velocity(fltk::ValueInput
* o
, void* v
) {
491 ((UI
*)(o
->parent()->parent()->parent()->user_data()))->cb_default_velocity_i(o
,v
);
494 inline void UI::cb_merge_i(fltk::Item
*, void*) {
497 void UI::cb_merge(fltk::Item
* o
, void* v
) {
498 ((UI
*)(o
->parent()->parent()->parent()->parent()->user_data()))->cb_merge_i(o
,v
);
501 inline void UI::cb_overwrite_i(fltk::Item
*, void*) {
504 void UI::cb_overwrite(fltk::Item
* o
, void* v
) {
505 ((UI
*)(o
->parent()->parent()->parent()->parent()->user_data()))->cb_overwrite_i(o
,v
);
508 inline void UI::cb_layer_i(fltk::Item
*, void*) {
511 void UI::cb_layer(fltk::Item
* o
, void* v
) {
512 ((UI
*)(o
->parent()->parent()->parent()->parent()->user_data()))->cb_layer_i(o
,v
);
515 inline void UI::cb_do_i(fltk::Item
*, void*) {
518 void UI::cb_do(fltk::Item
* o
, void* v
) {
519 ((UI
*)(o
->parent()->parent()->parent()->parent()->user_data()))->cb_do_i(o
,v
);
522 inline void UI::cb_new1_i(fltk::Item
*, void*) {
525 void UI::cb_new1(fltk::Item
* o
, void* v
) {
526 ((UI
*)(o
->parent()->parent()->parent()->parent()->user_data()))->cb_new1_i(o
,v
);
529 inline void UI::cb_extend_i(fltk::Item
*, void*) {
532 void UI::cb_extend(fltk::Item
* o
, void* v
) {
533 ((UI
*)(o
->parent()->parent()->parent()->parent()->user_data()))->cb_extend_i(o
,v
);
536 inline void UI::cb_kg_l10_i(KeyGrabber
*, void*) {
539 void UI::cb_kg_l10(KeyGrabber
* o
, void* v
) {
540 ((UI
*)(o
->parent()->parent()->parent()->user_data()))->cb_kg_l10_i(o
,v
);
543 inline void UI::cb_help_window_i(fltk::Window
* o
, void*) {
544 ui
->help_button
->state(0);
547 void UI::cb_help_window(fltk::Window
* o
, void* v
) {
548 ((UI
*)(o
->user_data()))->cb_help_window_i(o
,v
);
551 inline void UI::cb_action_window_i(fltk::Window
* o
, void*) {
552 ui
->file_button
->state(0);
555 void UI::cb_action_window(fltk::Window
* o
, void* v
) {
556 ((UI
*)(o
->user_data()))->cb_action_window_i(o
,v
);
559 inline void UI::cb_new2_i(fltk::Button
*, void*) {
561 ui
->file_button
->state(0);
563 void UI::cb_new2(fltk::Button
* o
, void* v
) {
564 ((UI
*)(o
->parent()->user_data()))->cb_new2_i(o
,v
);
567 inline void UI::cb_save2_i(fltk::Button
*, void*) {
568 action_window
->hide();
569 ui
->file_button
->state(0);
572 void UI::cb_save2(fltk::Button
* o
, void* v
) {
573 ((UI
*)(o
->parent()->user_data()))->cb_save2_i(o
,v
);
576 inline void UI::cb_save3_i(fltk::Button
*, void*) {
577 action_window
->hide();
578 ui
->file_button
->state(0);
579 save(fltk::file_chooser("save file",NULL
,get_last_dir()));
581 void UI::cb_save3(fltk::Button
* o
, void* v
) {
582 ((UI
*)(o
->parent()->user_data()))->cb_save3_i(o
,v
);
585 inline void UI::cb_load1_i(fltk::Button
*, void*) {
586 action_window
->hide();
587 ui
->file_button
->state(0);
588 if(load(fltk::file_chooser("open file",NULL
,get_last_dir()))<0){
592 void UI::cb_load1(fltk::Button
* o
, void* v
) {
593 ((UI
*)(o
->parent()->user_data()))->cb_load1_i(o
,v
);
596 inline void UI::cb_import1_i(fltk::Button
*, void*) {
597 action_window
->hide();
598 ui
->file_button
->state(0);
599 if(loadsmf(fltk::file_chooser("import file",NULL
,get_last_dir()))<0){
603 void UI::cb_import1(fltk::Button
* o
, void* v
) {
604 ((UI
*)(o
->parent()->user_data()))->cb_import1_i(o
,v
);
607 inline void UI::cb_export1_i(fltk::Button
*, void*) {
608 action_window
->hide();
609 ui
->file_button
->state(0);
610 savesmf(fltk::file_chooser("export file",NULL
,get_last_dir()));
612 void UI::cb_export1(fltk::Button
* o
, void* v
) {
613 ((UI
*)(o
->parent()->user_data()))->cb_export1_i(o
,v
);
616 inline void UI::cb_scope_window_i(fltk::Window
* o
, void*) {
617 ui
->scope_button
->state(0);
620 void UI::cb_scope_window(fltk::Window
* o
, void* v
) {
621 ((UI
*)(o
->user_data()))->cb_scope_window_i(o
,v
);
624 inline void UI::cb_on_i(fltk::Button
* o
, void*) {
632 void UI::cb_on(fltk::Button
* o
, void* v
) {
633 ((UI
*)(o
->parent()->parent()->user_data()))->cb_on_i(o
,v
);
638 {fltk::Window
* o
= main_window
= new fltk::Window(640, 480, "Epichord");
640 o
->callback((fltk::Callback
*)cb_main_window
, (void*)(this));
642 {fltk::Group
* o
= new fltk::Group(0, 0, 640, 445);
644 {fltk::Group
* o
= song_edit
= new fltk::Group(0, 0, 640, 445);
646 {fltk::Group
* o
= new fltk::Group(0, 0, 255, 445);
648 o
->box(fltk::FLAT_BOX
);
650 {TrackInfo
* o
= track_info
= new TrackInfo(0, 15, 255, 415, "track info");
652 fltk::Group::current()->resizable(o
);
654 {fltk::Button
* o
= new fltk::Button(170, 0, 85, 15, "@");
655 o
->callback((fltk::Callback
*)cb_
);
656 o
->tooltip("more settings");
658 {fltk::Button
* o
= new fltk::Button(0, 0, 85, 15, "+");
659 o
->callback((fltk::Callback
*)cb_1
);
660 o
->tooltip("add new track");
662 {fltk::Button
* o
= new fltk::Button(85, 0, 85, 15, "-");
663 o
->tooltip("delete last track");
667 {fltk::Group
* o
= new fltk::Group(255, 0, 385, 15);
669 {Timeline
* o
= song_timeline
= new Timeline(0, 0, 370, 15, "timeline");
670 fltk::Group::current()->resizable(o
);
676 {fltk::Group
* o
= song_scrollgroup
= new fltk::Group(255, 15, 385, 430);
679 {Arranger
* o
= arranger
= new Arranger(0, 0, 370, 415, "arranger");
681 o
->box(fltk::FLAT_BOX
);
682 fltk::Group::current()->resizable(o
);
684 {fltk::Scrollbar
* o
= song_vscroll
= new fltk::Scrollbar(370, 0, 15, 415);
687 o
->callback((fltk::Callback
*)cb_song_vscroll
);
689 {DragBar
* o
= song_hscroll
= new DragBar(0, 415, 370, 15);
690 o
->callback((fltk::Callback
*)cb_song_hscroll
);
693 fltk::Group::current()->resizable(o
);
697 {fltk::Group
* o
= pattern_edit
= new fltk::Group(0, 0, 640, 445);
700 {fltk::Group
* o
= new fltk::Group(45, 0, 595, 445);
702 {fltk::Group
* o
= new fltk::Group(0, 0, 595, 15);
704 {Timeline
* o
= pattern_timeline
= new Timeline(0, 0, 580, 15, "timeline");
705 o
->box(fltk::FLAT_BOX
);
706 fltk::Group::current()->resizable(o
);
711 {fltk::Group
* o
= pattern_scrollgroup
= new fltk::Group(0, 15, 595, 355);
713 {PianoRoll
* o
= piano_roll
= new PianoRoll(0, 0, 580, 340, "pianoroll");
714 o
->box(fltk::FLAT_BOX
);
715 fltk::Group::current()->resizable(o
);
717 {fltk::Scrollbar
* o
= pattern_vscroll
= new fltk::Scrollbar(580, 0, 15, 340);
719 o
->callback((fltk::Callback
*)cb_pattern_vscroll
);
721 {DragBar
* o
= pattern_hscroll
= new DragBar(0, 340, 580, 15);
722 o
->callback((fltk::Callback
*)cb_pattern_hscroll
);
725 fltk::Group::current()->resizable(o
);
727 {fltk::Group
* o
= new fltk::Group(0, 370, 595, 75);
729 {EventEdit
* o
= event_edit
= new EventEdit(0, 0, 580, 75, "event editor");
730 o
->box(fltk::FLAT_BOX
);
731 fltk::Group::current()->resizable(o
);
733 {EventMenu
* o
= event_menu
= new EventMenu(0, 0, 580, 75);
734 o
->box(fltk::FLAT_BOX
);
737 {fltk::Button
* o
= event_menu_button
= new fltk::Button(580, 0, 15, 15, "E");
738 o
->callback((fltk::Callback
*)cb_event_menu_button
);
739 o
->tooltip("pick event type");
740 o
->type(fltk::Button::TOGGLE
);
742 {fltk::Button
* o
= new fltk::Button(580, 15, 15, 15, "L");
743 o
->callback((fltk::Callback
*)cb_L
);
744 o
->tooltip("toggle event value labels");
745 o
->type(fltk::Button::TOGGLE
);
747 {fltk::Button
* o
= new fltk::Button(580, 30, 15, 15, "C");
748 o
->callback((fltk::Callback
*)cb_C
);
749 o
->tooltip("clear these events");
751 {fltk::Button
* o
= new fltk::Button(580, 45, 15, 15, "X");
752 o
->callback((fltk::Callback
*)cb_X
);
753 o
->tooltip("clear all non note events in pattern");
755 {fltk::Button
* o
= new fltk::Button(580, 60, 15, 15, "Z");
756 o
->labelcolor((fltk::Color
)0xff000000);
757 o
->callback((fltk::Callback
*)cb_Z
);
758 o
->tooltip("clear everything");
763 fltk::Group::current()->resizable(o
);
765 {fltk::Group
* o
= new fltk::Group(0, 0, 45, 445);
767 new fltk::Button(0, 0, 45, 15, "@line");
768 {fltk::Group
* o
= new fltk::Group(0, 15, 45, 340);
771 {TrackSelect
* o
= track_select
= new TrackSelect(0, 35, 45, 305, "track picker");
774 {SampleView
* o
= sample_view
= new SampleView(0, 35, 45, 305, "sample names");
777 {Keyboard
* o
= keyboard
= new Keyboard(0, 0, 45, 340, "keyboard");
781 fltk::Group::current()->resizable(o
);
783 {fltk::Button
* o
= new fltk::Button(0, 370, 45, 75, "@<-");
785 o
->callback((fltk::Callback
*)cb_2
);
792 fltk::Group::current()->resizable(o
);
794 {fltk::Group
* o
= new fltk::Group(0, 445, 640, 35);
795 o
->box(fltk::UP_BOX
);
797 {fltk::Button
* o
= play_button
= new fltk::Button(5, 5, 25, 25, "@>");
798 o
->labelcolor((fltk::Color
)0x800000);
799 o
->callback((fltk::Callback
*)cb_play_button
);
801 {fltk::Button
* o
= stop_button
= new fltk::Button(35, 5, 25, 25, "@square");
802 o
->labelcolor((fltk::Color
)0x800000);
803 o
->callback((fltk::Callback
*)cb_stop_button
);
805 {fltk::Button
* o
= record_button
= new fltk::Button(65, 5, 25, 25, "@circle");
806 o
->labelcolor((fltk::Color
)0xff000000);
807 o
->callback((fltk::Callback
*)cb_record_button
);
808 o
->type(fltk::Button::TOGGLE
);
810 {Metronome
* o
= metronome
= new Metronome(95, 5, 25, 25, "0");
811 o
->color((fltk::Color
)56);
812 o
->labelcolor((fltk::Color
)0xffffff00);
814 {fltk::Button
* o
= loop_toggle
= new fltk::Button(125, 5, 25, 25);
815 o
->callback((fltk::Callback
*)cb_loop_toggle
);
816 o
->tooltip("toggle looping");
817 o
->type(fltk::Button::TOGGLE
);
819 {fltk::Group
* o
= new fltk::Group(155, 0, 20, 35);
821 fltk::Group::current()->resizable(o
);
823 {fltk::Group
* o
= pattern_buttons
= new fltk::Group(200, 5, 310, 25);
826 {fltk::Button
* o
= quant1_button
= new fltk::Button(35, 0, 25, 25, "qua");
827 o
->tooltip("quantize selected notes");
829 {fltk::Button
* o
= quant0_button
= new fltk::Button(60, 0, 25, 25, "qu_");
830 o
->tooltip("quantize length of selected notes");
832 {fltk::Button
* o
= tool_button
= new fltk::Button(85, 0, 25, 25, "tool");
833 o
->callback((fltk::Callback
*)cb_tool_button
);
835 {fltk::Button
* o
= qbutton4
= new fltk::Button(135, 0, 25, 25);
836 o
->callback((fltk::Callback
*)cb_qbutton4
);
837 o
->type(fltk::Button::TOGGLE
);
839 {fltk::Button
* o
= qbutton8
= new fltk::Button(160, 0, 25, 25);
840 o
->callback((fltk::Callback
*)cb_qbutton8
);
841 o
->type(fltk::Button::TOGGLE
);
843 {fltk::Button
* o
= qbutton16
= new fltk::Button(185, 0, 25, 25);
844 o
->callback((fltk::Callback
*)cb_qbutton16
);
845 o
->type(fltk::Button::TOGGLE
);
848 {fltk::Button
* o
= qbutton32
= new fltk::Button(210, 0, 25, 25);
849 o
->callback((fltk::Callback
*)cb_qbutton32
);
850 o
->type(fltk::Button::TOGGLE
);
852 {fltk::Button
* o
= qbutton64
= new fltk::Button(235, 0, 25, 25);
853 o
->callback((fltk::Callback
*)cb_qbutton64
);
854 o
->type(fltk::Button::TOGGLE
);
856 {fltk::Button
* o
= qbutton128
= new fltk::Button(260, 0, 25, 25);
857 o
->callback((fltk::Callback
*)cb_qbutton128
);
858 o
->type(fltk::Button::TOGGLE
);
860 {fltk::Button
* o
= qbutton0
= new fltk::Button(285, 0, 25, 25);
861 o
->callback((fltk::Callback
*)cb_qbutton0
);
862 o
->type(fltk::Button::TOGGLE
);
866 {fltk::Group
* o
= song_buttons
= new fltk::Group(385, 5, 145, 25);
868 {fltk::Button
* o
= edit_button
= new fltk::Button(0, 0, 25, 25);
869 o
->set_flag(fltk::STATE
);
870 o
->callback((fltk::Callback
*)cb_edit_button
);
871 o
->tooltip("create delete move resize select paste blocks");
873 {fltk::Button
* o
= color_button
= new fltk::Button(25, 0, 25, 25);
874 o
->callback((fltk::Callback
*)cb_color_button
);
875 o
->tooltip("color tool");
876 o
->type(fltk::Button::TOGGLE
);
878 {fltk::Button
* o
= unclone_button
= new fltk::Button(50, 0, 25, 25);
879 o
->callback((fltk::Callback
*)cb_unclone_button
);
880 o
->tooltip("click on blocks to unclone them");
881 o
->type(fltk::Button::TOGGLE
);
883 {fltk::Button
* o
= split_button
= new fltk::Button(75, 0, 25, 25);
884 o
->callback((fltk::Callback
*)cb_split_button
);
885 o
->tooltip("click on a block to split in two");
886 o
->type(fltk::Button::TOGGLE
);
888 {fltk::Button
* o
= join_button
= new fltk::Button(100, 0, 25, 25);
889 o
->callback((fltk::Callback
*)cb_join_button
);
890 o
->tooltip("click on adjacent blocks to join them");
891 o
->type(fltk::Button::TOGGLE
);
895 {fltk::Button
* o
= conf_button
= new fltk::Button(535, 5, 25, 25);
896 o
->callback((fltk::Callback
*)cb_conf_button
);
897 o
->tooltip("configuration");
898 o
->type(fltk::Button::TOGGLE
);
900 {fltk::Button
* o
= scope_button
= new fltk::Button(560, 5, 25, 25);
901 o
->callback((fltk::Callback
*)cb_scope_button
);
903 o
->type(fltk::Button::TOGGLE
);
905 {fltk::Button
* o
= file_button
= new fltk::Button(585, 5, 25, 25);
906 o
->callback((fltk::Callback
*)cb_file_button
);
909 o
->type(fltk::Button::TOGGLE
);
911 {fltk::PopupMenu
* o
= file_menu
= new fltk::PopupMenu(585, 5, 25, 25);
913 {fltk::Item
* o
= new fltk::Item("new");
914 o
->callback((fltk::Callback
*)cb_new
);
916 {fltk::Item
* o
= new fltk::Item("load");
917 o
->callback((fltk::Callback
*)cb_load
);
919 {fltk::Item
* o
= new fltk::Item("save");
920 o
->callback((fltk::Callback
*)cb_save
);
922 {fltk::Item
* o
= new fltk::Item("save as...");
923 o
->callback((fltk::Callback
*)cb_save1
);
926 {fltk::Item
* o
= new fltk::Item("import");
927 o
->callback((fltk::Callback
*)cb_import
);
929 {fltk::Item
* o
= new fltk::Item("export");
930 o
->callback((fltk::Callback
*)cb_export
);
934 {fltk::Button
* o
= help_button
= new fltk::Button(610, 5, 25, 25);
935 o
->callback((fltk::Callback
*)cb_help_button
);
937 o
->type(fltk::Button::TOGGLE
);
944 o
->size_range(640,455);
947 {fltk::Window
* o
= config_window
= new fltk::Window(320, 285, "config");
949 o
->callback((fltk::Callback
*)cb_config_window
, (void*)(this));
951 {fltk::TabGroup
* o
= new fltk::TabGroup(0, 0, 320, 285);
953 {fltk::Group
* o
= new fltk::Group(145, 15, 170, 265, "options");
955 {fltk::ValueInput
* o
= beats_per_measure
= new fltk::ValueInput(5, 5, 45, 20, "beats per measure");
960 o
->callback((fltk::Callback
*)cb_beats_per_measure
);
962 {fltk::ValueInput
* o
= measures_per_phrase
= new fltk::ValueInput(5, 30, 45, 20, "measures per phrase");
966 o
->callback((fltk::Callback
*)cb_measures_per_phrase
);
968 {fltk::ValueOutput
* o
= bpm_output
= new fltk::ValueOutput(5, 55, 45, 20, "bpm");
974 {fltk::ThumbWheel
* o
= bpm_wheel
= new fltk::ThumbWheel(55, 55, 105, 20);
979 o
->callback((fltk::Callback
*)cb_bpm_wheel
);
980 o
->align(fltk::ALIGN_LEFT
);
982 {fltk::ValueInput
* o
= measures_until_record
= new fltk::ValueInput(5, 80, 45, 20, "measures until record");
986 o
->callback((fltk::Callback
*)cb_measures_until_record
);
988 {fltk::CheckButton
* o
= check_alwayscopy
= new fltk::CheckButton(5, 105, 25, 25, "always hard copy");
989 o
->callback((fltk::Callback
*)cb_check_alwayscopy
);
990 o
->align(fltk::ALIGN_LEFT
);
991 o
->tooltip("instead of making a linked clone when you copy a block in the song view.");
993 {fltk::CheckButton
* o
= check_trackinit
= new fltk::CheckButton(145, 80, 25, 25, "track init");
994 o
->set_flag(fltk::STATE
);
995 o
->callback((fltk::Callback
*)cb_check_trackinit
);
996 o
->align(fltk::ALIGN_LEFT
);
998 {fltk::CheckButton
* o
= check_autotrackname
= new fltk::CheckButton(145, 105, 25, 25, "auto track name");
999 o
->callback((fltk::Callback
*)cb_check_autotrackname
);
1000 o
->align(fltk::ALIGN_LEFT
);
1001 o
->tooltip("Fill in GM instruments for track names when you change the program.");
1003 {fltk::CheckButton
* o
= check_passthru
= new fltk::CheckButton(5, 130, 25, 26, "record pass-thru");
1004 o
->set_flag(fltk::STATE
);
1005 o
->callback((fltk::Callback
*)cb_check_passthru
);
1006 o
->align(fltk::ALIGN_LEFT
);
1007 o
->tooltip("Echo midi input to midi output.");
1009 {fltk::CheckButton
* o
= check_playinsert
= new fltk::CheckButton(145, 130, 25, 26, "play note insertion");
1010 o
->set_flag(fltk::STATE
);
1011 o
->callback((fltk::Callback
*)cb_check_playinsert
);
1012 o
->align(fltk::ALIGN_LEFT
);
1013 o
->tooltip("Send midi note on when you create notes.");
1015 {fltk::CheckButton
* o
= check_recordonchan
= new fltk::CheckButton(5, 155, 25, 25, "record on channel");
1016 o
->callback((fltk::Callback
*)cb_check_recordonchan
);
1017 o
->align(fltk::ALIGN_LEFT
);
1018 o
->tooltip("Record on first track that matches channel of midi input instead of selected \
1021 {fltk::CheckButton
* o
= check_playmove
= new fltk::CheckButton(145, 155, 25, 26, "play note move");
1022 o
->set_flag(fltk::STATE
);
1023 o
->callback((fltk::Callback
*)cb_check_playmove
);
1024 o
->align(fltk::ALIGN_LEFT
);
1025 o
->tooltip("Send midi note on when you move notes.");
1027 {fltk::CheckButton
* o
= check_follow
= new fltk::CheckButton(5, 179, 25, 26, "follow playback");
1028 o
->set_flag(fltk::STATE
);
1029 o
->callback((fltk::Callback
*)cb_check_follow
);
1030 o
->align(fltk::ALIGN_LEFT
);
1031 o
->tooltip("Auto scroll horizontally when play head leaves viewing area.");
1033 {fltk::ValueInput
* o
= default_velocity
= new fltk::ValueInput(120, 180, 45, 20, "default velocity");
1037 o
->callback((fltk::Callback
*)cb_default_velocity
);
1039 {fltk::Choice
* o
= menu_recordmode
= new fltk::Choice(5, 210, 160, 25, "record mode");
1041 {fltk::Item
* o
= new fltk::Item("merge");
1042 o
->callback((fltk::Callback
*)cb_merge
);
1044 {fltk::Item
* o
= new fltk::Item("overwrite");
1045 o
->callback((fltk::Callback
*)cb_overwrite
);
1047 {fltk::Item
* o
= new fltk::Item("layer");
1048 o
->callback((fltk::Callback
*)cb_layer
);
1052 {fltk::Choice
* o
= menu_rob
= new fltk::Choice(5, 240, 160, 25, "record outside block");
1054 {fltk::Item
* o
= new fltk::Item("do nothing");
1055 o
->callback((fltk::Callback
*)cb_do
);
1057 {fltk::Item
* o
= new fltk::Item("new block");
1058 o
->callback((fltk::Callback
*)cb_new1
);
1060 {fltk::Item
* o
= new fltk::Item("extend block");
1061 o
->callback((fltk::Callback
*)cb_extend
);
1067 {fltk::Group
* o
= new fltk::Group(0, 15, 320, 270, "keyboard");
1070 {KeyGrabber
* o
= kg_l0
= new KeyGrabber(35, 5, 45, 15, "C0");
1071 o
->align(fltk::ALIGN_LEFT
);
1073 {KeyGrabber
* o
= kg_l1
= new KeyGrabber(35, 20, 45, 15, "C#0");
1074 o
->align(fltk::ALIGN_LEFT
);
1076 {KeyGrabber
* o
= kg_l2
= new KeyGrabber(35, 35, 45, 15, "D0");
1077 o
->align(fltk::ALIGN_LEFT
);
1079 {KeyGrabber
* o
= kg_l3
= new KeyGrabber(35, 50, 45, 15, "D#0");
1080 o
->align(fltk::ALIGN_LEFT
);
1082 {KeyGrabber
* o
= kg_l4
= new KeyGrabber(35, 65, 45, 15, "E0");
1083 o
->align(fltk::ALIGN_LEFT
);
1085 {KeyGrabber
* o
= kg_l5
= new KeyGrabber(35, 80, 45, 15, "F0");
1086 o
->align(fltk::ALIGN_LEFT
);
1088 {KeyGrabber
* o
= kg_l6
= new KeyGrabber(35, 95, 45, 15, "F#0");
1089 o
->align(fltk::ALIGN_LEFT
);
1091 {KeyGrabber
* o
= kg_l7
= new KeyGrabber(35, 110, 45, 15, "G0");
1092 o
->align(fltk::ALIGN_LEFT
);
1094 {KeyGrabber
* o
= kg_l8
= new KeyGrabber(35, 125, 45, 15, "G#0");
1095 o
->align(fltk::ALIGN_LEFT
);
1097 {KeyGrabber
* o
= kg_l9
= new KeyGrabber(35, 140, 45, 15, "A0");
1098 o
->align(fltk::ALIGN_LEFT
);
1100 {KeyGrabber
* o
= kg_l10
= new KeyGrabber(35, 155, 45, 15, "A#0");
1101 o
->callback((fltk::Callback
*)cb_kg_l10
);
1102 o
->align(fltk::ALIGN_LEFT
);
1104 {KeyGrabber
* o
= kg_l11
= new KeyGrabber(35, 170, 45, 15, "B0");
1105 o
->align(fltk::ALIGN_LEFT
);
1107 {KeyGrabber
* o
= kg_l12
= new KeyGrabber(35, 185, 45, 15, "C1");
1108 o
->align(fltk::ALIGN_LEFT
);
1110 {KeyGrabber
* o
= kg_l13
= new KeyGrabber(35, 200, 45, 15, "C#1");
1111 o
->align(fltk::ALIGN_LEFT
);
1113 {KeyGrabber
* o
= kg_l14
= new KeyGrabber(35, 215, 45, 15, "D1");
1114 o
->align(fltk::ALIGN_LEFT
);
1116 {KeyGrabber
* o
= kg_l15
= new KeyGrabber(35, 230, 45, 15, "D#1");
1117 o
->align(fltk::ALIGN_LEFT
);
1119 {KeyGrabber
* o
= kg_l16
= new KeyGrabber(35, 245, 45, 15, "E1");
1120 o
->align(fltk::ALIGN_LEFT
);
1122 {KeyGrabber
* o
= kg_u0
= new KeyGrabber(130, 5, 45, 15, "C1");
1123 o
->align(fltk::ALIGN_LEFT
);
1125 {KeyGrabber
* o
= kg_u1
= new KeyGrabber(130, 20, 45, 15, "C#1");
1126 o
->align(fltk::ALIGN_LEFT
);
1128 {KeyGrabber
* o
= kg_u2
= new KeyGrabber(130, 35, 45, 15, "D1");
1129 o
->align(fltk::ALIGN_LEFT
);
1131 {KeyGrabber
* o
= kg_u3
= new KeyGrabber(130, 50, 45, 15, "D#1");
1132 o
->align(fltk::ALIGN_LEFT
);
1134 {KeyGrabber
* o
= kg_u4
= new KeyGrabber(130, 65, 45, 15, "E1");
1135 o
->align(fltk::ALIGN_LEFT
);
1137 {KeyGrabber
* o
= kg_u5
= new KeyGrabber(130, 80, 45, 15, "F1");
1138 o
->align(fltk::ALIGN_LEFT
);
1140 {KeyGrabber
* o
= kg_u6
= new KeyGrabber(130, 95, 45, 15, "F#1");
1141 o
->align(fltk::ALIGN_LEFT
);
1143 {KeyGrabber
* o
= kg_u7
= new KeyGrabber(130, 110, 45, 15, "G1");
1144 o
->align(fltk::ALIGN_LEFT
);
1146 {KeyGrabber
* o
= kg_u8
= new KeyGrabber(130, 125, 45, 15, "G#1");
1147 o
->align(fltk::ALIGN_LEFT
);
1149 {KeyGrabber
* o
= kg_u9
= new KeyGrabber(130, 140, 45, 15, "A1");
1150 o
->align(fltk::ALIGN_LEFT
);
1152 {KeyGrabber
* o
= kg_u10
= new KeyGrabber(130, 155, 45, 15, "A#1");
1153 o
->align(fltk::ALIGN_LEFT
);
1155 {KeyGrabber
* o
= kg_u11
= new KeyGrabber(130, 170, 45, 15, "B1");
1156 o
->align(fltk::ALIGN_LEFT
);
1158 {KeyGrabber
* o
= kg_u12
= new KeyGrabber(130, 185, 45, 15, "C2");
1159 o
->align(fltk::ALIGN_LEFT
);
1161 {KeyGrabber
* o
= kg_u13
= new KeyGrabber(130, 200, 45, 15, "C#2");
1162 o
->align(fltk::ALIGN_LEFT
);
1164 {KeyGrabber
* o
= kg_u14
= new KeyGrabber(130, 215, 45, 15, "D2");
1165 o
->align(fltk::ALIGN_LEFT
);
1167 {KeyGrabber
* o
= kg_u15
= new KeyGrabber(130, 230, 45, 15, "D#2");
1168 o
->align(fltk::ALIGN_LEFT
);
1170 {KeyGrabber
* o
= kg_u16
= new KeyGrabber(130, 245, 45, 15, "E2");
1171 o
->align(fltk::ALIGN_LEFT
);
1173 {KeyGrabber
* o
= kg_u17
= new KeyGrabber(265, 5, 45, 15, "F2");
1174 o
->align(fltk::ALIGN_LEFT
);
1176 {KeyGrabber
* o
= kg_u18
= new KeyGrabber(265, 20, 45, 15, "F#2");
1177 o
->align(fltk::ALIGN_LEFT
);
1179 {KeyGrabber
* o
= kg_u19
= new KeyGrabber(265, 35, 45, 15, "G2");
1180 o
->align(fltk::ALIGN_LEFT
);
1182 {KeyGrabber
* o
= kg_u20
= new KeyGrabber(265, 50, 45, 15, "G#2");
1183 o
->align(fltk::ALIGN_LEFT
);
1185 {KeyGrabber
* o
= kg_zi
= new KeyGrabber(265, 65, 45, 15, "zoom in");
1186 o
->align(fltk::ALIGN_LEFT
);
1188 {KeyGrabber
* o
= kg_zo
= new KeyGrabber(265, 80, 45, 15, "zoom out");
1189 o
->align(fltk::ALIGN_LEFT
);
1191 {KeyGrabber
* o
= kg_ou
= new KeyGrabber(265, 95, 45, 15, "octave up");
1192 o
->align(fltk::ALIGN_LEFT
);
1194 {KeyGrabber
* o
= kg_od
= new KeyGrabber(265, 110, 45, 15, "octave down");
1195 o
->align(fltk::ALIGN_LEFT
);
1199 {fltk::Group
* o
= new fltk::Group(0, 15, 320, 270, "colors");
1202 new fltk::Button(250, 245, 65, 20, "apply");
1203 {fltk::Choice
* o
= new fltk::Choice(55, 10, 100, 20, "presets");
1205 new fltk::Item("windo");
1206 new fltk::Item("midnight");
1207 new fltk::Item("xterm");
1217 {fltk::Window
* o
= help_window
= new fltk::Window(580, 370, "help");
1218 o
->shortcut(0xff1b);
1219 o
->callback((fltk::Callback
*)cb_help_window
, (void*)(this));
1221 {fltk::TabGroup
* o
= new fltk::TabGroup(0, 0, 580, 370);
1223 {fltk::Group
* o
= new fltk::Group(0, 25, 580, 345, "info");
1225 title_text
= new fltk::Input(55, 5, 520, 20, "Title");
1226 author_text
= new fltk::Input(55, 30, 520, 20, "Author");
1227 {fltk::TextEditor
* o
= info_text
= new fltk::TextEditor(5, 55, 570, 285);
1228 o
->textfont(fltk::COURIER
);
1229 fltk::Group::current()->resizable(o
);
1232 fltk::Group::current()->resizable(o
);
1234 {fltk::Group
* o
= new fltk::Group(0, 25, 580, 345, "controls");
1237 {fltk::TextDisplay
* o
= new fltk::TextDisplay(5, 5, 570, 335);
1238 o
->textfont(fltk::COURIER
);
1239 fltk::Group::current()->resizable(o
);
1240 load_text(o
,ROOT_DATA_DIR
"doc/controls.txt");
1244 {fltk::Group
* o
= new fltk::Group(0, 25, 580, 345, "guide");
1247 {fltk::TextDisplay
* o
= new fltk::TextDisplay(5, 5, 570, 335);
1248 o
->textfont(fltk::COURIER
);
1249 fltk::Group::current()->resizable(o
);
1250 load_text(o
,ROOT_DATA_DIR
"doc/guide.txt");
1254 {fltk::Group
* o
= new fltk::Group(0, 25, 580, 345, "license");
1257 {fltk::TextDisplay
* o
= new fltk::TextDisplay(5, 5, 570, 335);
1258 o
->textfont(fltk::COURIER
);
1259 fltk::Group::current()->resizable(o
);
1260 load_text(o
,ROOT_DATA_DIR
"doc/license.txt");
1264 {fltk::Group
* o
= new fltk::Group(0, 25, 580, 345, "about");
1267 {fltk::TextDisplay
* o
= new fltk::TextDisplay(5, 5, 570, 335);
1268 o
->textfont(fltk::COURIER
);
1269 fltk::Group::current()->resizable(o
);
1270 load_text(o
,ROOT_DATA_DIR
"doc/README");
1277 o
->size_range(580,370);
1280 {fltk::Window
* o
= action_window
= new fltk::Window(100, 130, "menu");
1281 o
->shortcut(0xff1b);
1282 o
->callback((fltk::Callback
*)cb_action_window
, (void*)(this));
1284 {fltk::Button
* o
= new fltk::Button(5, 5, 90, 20, "new");
1285 o
->callback((fltk::Callback
*)cb_new2
);
1287 {fltk::Button
* o
= new fltk::Button(5, 25, 90, 20, "save");
1288 o
->callback((fltk::Callback
*)cb_save2
);
1290 {fltk::Button
* o
= new fltk::Button(5, 45, 90, 20, "save as");
1291 o
->callback((fltk::Callback
*)cb_save3
);
1293 {fltk::Button
* o
= new fltk::Button(5, 65, 90, 20, "load");
1294 o
->callback((fltk::Callback
*)cb_load1
);
1296 {fltk::Button
* o
= new fltk::Button(5, 85, 90, 20, "import");
1297 o
->callback((fltk::Callback
*)cb_import1
);
1299 {fltk::Button
* o
= new fltk::Button(5, 105, 90, 20, "export");
1300 o
->callback((fltk::Callback
*)cb_export1
);
1305 {fltk::Window
* o
= scope_window
= new fltk::Window(425, 280, "scope");
1307 o
->shortcut(0xff1b);
1308 o
->callback((fltk::Callback
*)cb_scope_window
, (void*)(this));
1310 {fltk::TextDisplay
* o
= scope
= new fltk::TextDisplay(5, 5, 415, 245);
1311 o
->textfont(fltk::COURIER
);
1312 o
->color((fltk::Color
)0x280000);
1313 o
->textcolor((fltk::Color
)0xff0000);
1314 fltk::Group::current()->resizable(o
);
1317 {fltk::Group
* o
= new fltk::Group(5, 255, 415, 20);
1319 {fltk::Button
* o
= new fltk::Button(0, 0, 40, 20, "on");
1320 o
->callback((fltk::Callback
*)cb_on
);
1321 o
->type(fltk::Button::TOGGLE
);
1323 {fltk::InvisibleBox
* o
= new fltk::InvisibleBox(45, 0, 95, 20);
1324 fltk::Group::current()->resizable(o
);
1330 loop_toggle
->image(fltk::SharedImage::get(ROOT_DATA_DIR
"gfx/loop.gif"));
1331 conf_button
->image(fltk::SharedImage::get(ROOT_DATA_DIR
"gfx/conf.gif"));
1332 scope_button
->image(fltk::SharedImage::get(ROOT_DATA_DIR
"gfx/scope.gif"));
1333 file_button
->image(fltk::SharedImage::get(ROOT_DATA_DIR
"gfx/file.gif"));
1334 file_menu
->image(fltk::SharedImage::get(ROOT_DATA_DIR
"gfx/file.gif"));
1335 help_button
->image(fltk::SharedImage::get(ROOT_DATA_DIR
"gfx/help.gif"));
1337 edit_button
->image(fltk::SharedImage::get(ROOT_DATA_DIR
"gfx/edit.gif"));
1338 color_button
->image(fltk::SharedImage::get(ROOT_DATA_DIR
"gfx/color.gif"));
1339 unclone_button
->image(fltk::SharedImage::get(ROOT_DATA_DIR
"gfx/fork.gif"));
1340 split_button
->image(fltk::SharedImage::get(ROOT_DATA_DIR
"gfx/split.gif"));
1341 join_button
->image(fltk::SharedImage::get(ROOT_DATA_DIR
"gfx/join.gif"));
1343 qbutton4
->image(fltk::SharedImage::get(ROOT_DATA_DIR
"gfx/q4.gif"));
1344 qbutton8
->image(fltk::SharedImage::get(ROOT_DATA_DIR
"gfx/q8.gif"));
1345 qbutton16
->image(fltk::SharedImage::get(ROOT_DATA_DIR
"gfx/q16.gif"));
1346 qbutton32
->image(fltk::SharedImage::get(ROOT_DATA_DIR
"gfx/q32.gif"));
1347 qbutton64
->image(fltk::SharedImage::get(ROOT_DATA_DIR
"gfx/q64.gif"));
1348 qbutton128
->image(fltk::SharedImage::get(ROOT_DATA_DIR
"gfx/q128.gif"));
1349 qbutton0
->image(fltk::SharedImage::get(ROOT_DATA_DIR
"gfx/q0.gif"));
1350 track_info
->set_rec(0);
1352 main_window
->show();