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
* o
, void*) {
35 config_window
->hide();
37 action_window
->hide();
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_line_i(fltk::Button
*, void*) {
48 ui
->track_info
->toggle_controls();
50 void UI::cb_line(fltk::Button
* o
, void* v
) {
51 ((UI
*)(o
->parent()->parent()->parent()->parent()->user_data()))->cb_line_i(o
,v
);
54 inline void UI::cb_event_menu_button_i(fltk::Button
* o
, void*) {
56 ui
->event_menu
->hide();
57 ui
->event_edit
->show();
60 ui
->event_edit
->hide();
61 ui
->event_edit
->recount_has();
62 ui
->event_menu
->show();
65 void UI::cb_event_menu_button(fltk::Button
* o
, void* v
) {
66 ((UI
*)(o
->parent()->parent()->parent()->parent()->parent()->user_data()))->cb_event_menu_button_i(o
,v
);
69 inline void UI::cb_L_i(fltk::Button
* o
, void*) {
70 ui
->event_edit
->label_flag
= o
->state();
71 ui
->event_edit
->redraw();
73 void UI::cb_L(fltk::Button
* o
, void* v
) {
74 ((UI
*)(o
->parent()->parent()->parent()->parent()->parent()->user_data()))->cb_L_i(o
,v
);
77 inline void UI::cb_C_i(fltk::Button
*, void*) {
78 ui
->event_edit
->clear_events();
80 void UI::cb_C(fltk::Button
* o
, void* v
) {
81 ((UI
*)(o
->parent()->parent()->parent()->parent()->parent()->user_data()))->cb_C_i(o
,v
);
84 inline void UI::cb_X_i(fltk::Button
*, void*) {
85 ui
->event_edit
->clear_non_note_events();
87 void UI::cb_X(fltk::Button
* o
, void* v
) {
88 ((UI
*)(o
->parent()->parent()->parent()->parent()->parent()->user_data()))->cb_X_i(o
,v
);
91 inline void UI::cb_Z_i(fltk::Button
*, void*) {
92 ui
->event_edit
->clear_all_events();
94 void UI::cb_Z(fltk::Button
* o
, void* v
) {
95 ((UI
*)(o
->parent()->parent()->parent()->parent()->parent()->user_data()))->cb_Z_i(o
,v
);
98 inline void UI::cb__i(fltk::Button
*, void*) {
101 void UI::cb_(fltk::Button
* o
, void* v
) {
102 ((UI
*)(o
->parent()->parent()->parent()->parent()->user_data()))->cb__i(o
,v
);
105 inline void UI::cb_play_button_i(fltk::Button
*, void*) {
108 void UI::cb_play_button(fltk::Button
* o
, void* v
) {
109 ((UI
*)(o
->parent()->parent()->user_data()))->cb_play_button_i(o
,v
);
112 inline void UI::cb_stop_button_i(fltk::Button
*, void*) {
115 void UI::cb_stop_button(fltk::Button
* o
, void* v
) {
116 ((UI
*)(o
->parent()->parent()->user_data()))->cb_stop_button_i(o
,v
);
119 inline void UI::cb_record_button_i(fltk::Button
*, void*) {
120 toggle_backend_recording();
122 void UI::cb_record_button(fltk::Button
* o
, void* v
) {
123 ((UI
*)(o
->parent()->parent()->user_data()))->cb_record_button_i(o
,v
);
126 inline void UI::cb_qbutton4_i(fltk::Button
*, void*) {
129 void UI::cb_qbutton4(fltk::Button
* o
, void* v
) {
130 ((UI
*)(o
->parent()->parent()->parent()->user_data()))->cb_qbutton4_i(o
,v
);
133 inline void UI::cb_qbutton8_i(fltk::Button
*, void*) {
136 void UI::cb_qbutton8(fltk::Button
* o
, void* v
) {
137 ((UI
*)(o
->parent()->parent()->parent()->user_data()))->cb_qbutton8_i(o
,v
);
140 inline void UI::cb_qbutton16_i(fltk::Button
*, void*) {
143 void UI::cb_qbutton16(fltk::Button
* o
, void* v
) {
144 ((UI
*)(o
->parent()->parent()->parent()->user_data()))->cb_qbutton16_i(o
,v
);
147 inline void UI::cb_qbutton32_i(fltk::Button
*, void*) {
150 void UI::cb_qbutton32(fltk::Button
* o
, void* v
) {
151 ((UI
*)(o
->parent()->parent()->parent()->user_data()))->cb_qbutton32_i(o
,v
);
154 inline void UI::cb_qbutton64_i(fltk::Button
*, void*) {
157 void UI::cb_qbutton64(fltk::Button
* o
, void* v
) {
158 ((UI
*)(o
->parent()->parent()->parent()->user_data()))->cb_qbutton64_i(o
,v
);
161 inline void UI::cb_qbutton128_i(fltk::Button
*, void*) {
164 void UI::cb_qbutton128(fltk::Button
* o
, void* v
) {
165 ((UI
*)(o
->parent()->parent()->parent()->user_data()))->cb_qbutton128_i(o
,v
);
168 inline void UI::cb_qbutton0_i(fltk::Button
*, void*) {
171 void UI::cb_qbutton0(fltk::Button
* o
, void* v
) {
172 ((UI
*)(o
->parent()->parent()->parent()->user_data()))->cb_qbutton0_i(o
,v
);
175 inline void UI::cb_tool_button_i(fltk::Button
*, void*) {
178 void UI::cb_tool_button(fltk::Button
* o
, void* v
) {
179 ((UI
*)(o
->parent()->parent()->parent()->user_data()))->cb_tool_button_i(o
,v
);
182 inline void UI::cb_color_toggle_i(fltk::Button
* o
, void*) {
183 arranger
->color_flag
= o
->state();
185 void UI::cb_color_toggle(fltk::Button
* o
, void* v
) {
186 ((UI
*)(o
->parent()->parent()->parent()->user_data()))->cb_color_toggle_i(o
,v
);
189 inline void UI::cb_loop_toggle_i(fltk::Button
*, void*) {
192 void UI::cb_loop_toggle(fltk::Button
* o
, void* v
) {
193 ((UI
*)(o
->parent()->parent()->user_data()))->cb_loop_toggle_i(o
,v
);
196 inline void UI::cb_config_button_i(fltk::Button
* o
, void*) {
198 ui
->config_window
->show();
201 ui
->config_window
->hide();
204 void UI::cb_config_button(fltk::Button
* o
, void* v
) {
205 ((UI
*)(o
->parent()->parent()->user_data()))->cb_config_button_i(o
,v
);
208 inline void UI::cb_scope_button_i(fltk::Button
* o
, void*) {
210 ui
->scope_window
->show();
213 ui
->scope_window
->hide();
216 void UI::cb_scope_button(fltk::Button
* o
, void* v
) {
217 ((UI
*)(o
->parent()->parent()->user_data()))->cb_scope_button_i(o
,v
);
220 inline void UI::cb_file_button_i(fltk::Button
* o
, void*) {
222 ui
->action_window
->show();
225 ui
->action_window
->hide();
228 void UI::cb_file_button(fltk::Button
* o
, void* v
) {
229 ((UI
*)(o
->parent()->parent()->user_data()))->cb_file_button_i(o
,v
);
232 inline void UI::cb_help_button_i(fltk::Button
* o
, void*) {
234 ui
->help_window
->show();
237 ui
->help_window
->hide();
240 void UI::cb_help_button(fltk::Button
* o
, void* v
) {
241 ((UI
*)(o
->parent()->parent()->user_data()))->cb_help_button_i(o
,v
);
244 inline void UI::cb_beats_per_measure_i(fltk::ValueInput
* o
, void*) {
245 if(o
->value() > o
->maximum())
246 o
->value(o
->maximum());
247 if(o
->value() < o
->minimum())
248 o
->value(o
->minimum());
249 set_beats_per_measure((int)o
->value());
251 void UI::cb_beats_per_measure(fltk::ValueInput
* o
, void* v
) {
252 ((UI
*)(o
->parent()->parent()->parent()->user_data()))->cb_beats_per_measure_i(o
,v
);
255 inline void UI::cb_measures_per_phrase_i(fltk::ValueInput
* o
, void*) {
256 if(o
->value() > o
->maximum())
257 o
->value(o
->maximum());
258 if(o
->value() < o
->minimum())
259 o
->value(o
->minimum());
260 set_measures_per_phrase((int)o
->value());
262 void UI::cb_measures_per_phrase(fltk::ValueInput
* o
, void* v
) {
263 ((UI
*)(o
->parent()->parent()->parent()->user_data()))->cb_measures_per_phrase_i(o
,v
);
266 inline void UI::cb_bpm_wheel_i(fltk::ThumbWheel
* o
, void*) {
267 set_bpm((int)o
->value());
268 ui
->bpm_output
->value(o
->value());
270 void UI::cb_bpm_wheel(fltk::ThumbWheel
* o
, void* v
) {
271 ((UI
*)(o
->parent()->parent()->parent()->user_data()))->cb_bpm_wheel_i(o
,v
);
274 inline void UI::cb_measures_until_record_i(fltk::ValueInput
* o
, void*) {
275 if(o
->value() > o
->maximum())
276 o
->value(o
->maximum());
277 if(o
->value() < o
->minimum())
278 o
->value(o
->minimum());
279 set_measures_until_record((int)o
->value());
281 void UI::cb_measures_until_record(fltk::ValueInput
* o
, void* v
) {
282 ((UI
*)(o
->parent()->parent()->parent()->user_data()))->cb_measures_until_record_i(o
,v
);
285 inline void UI::cb_check_alwayscopy_i(fltk::CheckButton
* o
, void*) {
286 set_alwayscopy(o
->value());
288 void UI::cb_check_alwayscopy(fltk::CheckButton
* o
, void* v
) {
289 ((UI
*)(o
->parent()->parent()->parent()->user_data()))->cb_check_alwayscopy_i(o
,v
);
292 inline void UI::cb_check_autotrackname_i(fltk::CheckButton
* o
, void*) {
293 set_autotrackname(o
->value());
295 void UI::cb_check_autotrackname(fltk::CheckButton
* o
, void* v
) {
296 ((UI
*)(o
->parent()->parent()->parent()->user_data()))->cb_check_autotrackname_i(o
,v
);
299 inline void UI::cb_check_passthru_i(fltk::CheckButton
* o
, void*) {
300 set_passthru(o
->value());
302 void UI::cb_check_passthru(fltk::CheckButton
* o
, void* v
) {
303 ((UI
*)(o
->parent()->parent()->parent()->user_data()))->cb_check_passthru_i(o
,v
);
306 inline void UI::cb_check_playinsert_i(fltk::CheckButton
* o
, void*) {
307 set_playinsert(o
->value());
309 void UI::cb_check_playinsert(fltk::CheckButton
* o
, void* v
) {
310 ((UI
*)(o
->parent()->parent()->parent()->user_data()))->cb_check_playinsert_i(o
,v
);
313 inline void UI::cb_check_recordonchan_i(fltk::CheckButton
* o
, void*) {
314 set_recordonchan(o
->value());
316 void UI::cb_check_recordonchan(fltk::CheckButton
* o
, void* v
) {
317 ((UI
*)(o
->parent()->parent()->parent()->user_data()))->cb_check_recordonchan_i(o
,v
);
320 inline void UI::cb_check_playmove_i(fltk::CheckButton
* o
, void*) {
321 set_playmove(o
->value());
323 void UI::cb_check_playmove(fltk::CheckButton
* o
, void* v
) {
324 ((UI
*)(o
->parent()->parent()->parent()->user_data()))->cb_check_playmove_i(o
,v
);
327 inline void UI::cb_check_follow_i(fltk::CheckButton
* o
, void*) {
328 set_follow(o
->value());
330 void UI::cb_check_follow(fltk::CheckButton
* o
, void* v
) {
331 ((UI
*)(o
->parent()->parent()->parent()->user_data()))->cb_check_follow_i(o
,v
);
334 inline void UI::cb_default_velocity_i(fltk::ValueInput
* o
, void*) {
335 if(o
->value() > o
->maximum())
336 o
->value(o
->maximum());
337 if(o
->value() < o
->minimum())
338 o
->value(o
->minimum());
339 set_defaultvelocity((int)o
->value());
341 void UI::cb_default_velocity(fltk::ValueInput
* o
, void* v
) {
342 ((UI
*)(o
->parent()->parent()->parent()->user_data()))->cb_default_velocity_i(o
,v
);
345 inline void UI::cb_merge_i(fltk::Item
*, void*) {
348 void UI::cb_merge(fltk::Item
* o
, void* v
) {
349 ((UI
*)(o
->parent()->parent()->parent()->parent()->user_data()))->cb_merge_i(o
,v
);
352 inline void UI::cb_overwrite_i(fltk::Item
*, void*) {
355 void UI::cb_overwrite(fltk::Item
* o
, void* v
) {
356 ((UI
*)(o
->parent()->parent()->parent()->parent()->user_data()))->cb_overwrite_i(o
,v
);
359 inline void UI::cb_layer_i(fltk::Item
*, void*) {
362 void UI::cb_layer(fltk::Item
* o
, void* v
) {
363 ((UI
*)(o
->parent()->parent()->parent()->parent()->user_data()))->cb_layer_i(o
,v
);
366 inline void UI::cb_do_i(fltk::Item
*, void*) {
369 void UI::cb_do(fltk::Item
* o
, void* v
) {
370 ((UI
*)(o
->parent()->parent()->parent()->parent()->user_data()))->cb_do_i(o
,v
);
373 inline void UI::cb_new_i(fltk::Item
*, void*) {
376 void UI::cb_new(fltk::Item
* o
, void* v
) {
377 ((UI
*)(o
->parent()->parent()->parent()->parent()->user_data()))->cb_new_i(o
,v
);
380 inline void UI::cb_extend_i(fltk::Item
*, void*) {
383 void UI::cb_extend(fltk::Item
* o
, void* v
) {
384 ((UI
*)(o
->parent()->parent()->parent()->parent()->user_data()))->cb_extend_i(o
,v
);
387 inline void UI::cb_kg_l10_i(KeyGrabber
*, void*) {
390 void UI::cb_kg_l10(KeyGrabber
* o
, void* v
) {
391 ((UI
*)(o
->parent()->parent()->parent()->user_data()))->cb_kg_l10_i(o
,v
);
394 inline void UI::cb_new1_i(fltk::Button
*, void*) {
397 void UI::cb_new1(fltk::Button
* o
, void* v
) {
398 ((UI
*)(o
->parent()->user_data()))->cb_new1_i(o
,v
);
401 inline void UI::cb_save_i(fltk::Button
*, void*) {
402 action_window
->hide();
405 void UI::cb_save(fltk::Button
* o
, void* v
) {
406 ((UI
*)(o
->parent()->user_data()))->cb_save_i(o
,v
);
409 inline void UI::cb_save1_i(fltk::Button
*, void*) {
410 action_window
->hide();
411 save(fltk::file_chooser("save file",NULL
,get_last_dir()));
413 void UI::cb_save1(fltk::Button
* o
, void* v
) {
414 ((UI
*)(o
->parent()->user_data()))->cb_save1_i(o
,v
);
417 inline void UI::cb_load_i(fltk::Button
*, void*) {
418 action_window
->hide();
419 if(load(fltk::file_chooser("open file",NULL
,get_last_dir()))<0){
423 void UI::cb_load(fltk::Button
* o
, void* v
) {
424 ((UI
*)(o
->parent()->user_data()))->cb_load_i(o
,v
);
427 inline void UI::cb_import_i(fltk::Button
*, void*) {
428 action_window
->hide();
429 if(loadsmf(fltk::file_chooser("import file",NULL
,get_last_dir()))<0){
433 void UI::cb_import(fltk::Button
* o
, void* v
) {
434 ((UI
*)(o
->parent()->user_data()))->cb_import_i(o
,v
);
437 inline void UI::cb_export_i(fltk::Button
*, void*) {
438 action_window
->hide();
439 savesmf(fltk::file_chooser("export file",NULL
,get_last_dir()));
441 void UI::cb_export(fltk::Button
* o
, void* v
) {
442 ((UI
*)(o
->parent()->user_data()))->cb_export_i(o
,v
);
445 inline void UI::cb_on_i(fltk::Button
* o
, void*) {
453 void UI::cb_on(fltk::Button
* o
, void* v
) {
454 ((UI
*)(o
->parent()->parent()->user_data()))->cb_on_i(o
,v
);
459 {fltk::Window
* o
= main_window
= new fltk::Window(640, 480, "Epichord");
461 o
->callback((fltk::Callback
*)cb_main_window
, (void*)(this));
463 {fltk::Group
* o
= new fltk::Group(0, 0, 640, 445);
465 {fltk::Group
* o
= song_edit
= new fltk::Group(0, 0, 640, 445);
467 {fltk::Group
* o
= new fltk::Group(0, 0, 255, 445);
469 o
->box(fltk::FLAT_BOX
);
471 {TrackInfo
* o
= track_info
= new TrackInfo(0, 15, 255, 415, "track info");
473 fltk::Group::current()->resizable(o
);
475 {fltk::Button
* o
= new fltk::Button(0, 0, 255, 15, "@line");
476 o
->callback((fltk::Callback
*)cb_line
);
480 {fltk::Group
* o
= new fltk::Group(255, 0, 385, 15);
482 {Timeline
* o
= song_timeline
= new Timeline(0, 0, 370, 15, "timeline");
483 fltk::Group::current()->resizable(o
);
489 {fltk::Group
* o
= song_scrollgroup
= new fltk::Group(255, 15, 385, 430);
492 {Arranger
* o
= arranger
= new Arranger(0, 0, 370, 415, "arranger");
494 o
->box(fltk::FLAT_BOX
);
495 fltk::Group::current()->resizable(o
);
497 {fltk::Scrollbar
* o
= song_vscroll
= new fltk::Scrollbar(370, 0, 15, 415);
500 {fltk::ThumbWheel
* o
= song_hscroll
= new fltk::ThumbWheel(0, 415, 370, 15);
505 fltk::Group::current()->resizable(o
);
509 {fltk::Group
* o
= pattern_edit
= new fltk::Group(0, 0, 640, 445);
512 {fltk::Group
* o
= new fltk::Group(45, 0, 595, 445);
514 {fltk::Group
* o
= new fltk::Group(0, 0, 595, 15);
516 {Timeline
* o
= pattern_timeline
= new Timeline(0, 0, 580, 15, "timeline");
517 o
->box(fltk::FLAT_BOX
);
518 fltk::Group::current()->resizable(o
);
523 {fltk::Group
* o
= pattern_scrollgroup
= new fltk::Group(0, 15, 595, 355);
525 {PianoRoll
* o
= piano_roll
= new PianoRoll(0, 0, 580, 340, "pianoroll");
526 o
->box(fltk::FLAT_BOX
);
527 fltk::Group::current()->resizable(o
);
529 {fltk::Scrollbar
* o
= pattern_vscroll
= new fltk::Scrollbar(580, 0, 15, 340);
532 pattern_hscroll
= new fltk::ThumbWheel(0, 340, 580, 15);
534 fltk::Group::current()->resizable(o
);
536 {fltk::Group
* o
= new fltk::Group(0, 370, 595, 75);
538 {EventEdit
* o
= event_edit
= new EventEdit(0, 0, 580, 75, "event editor");
539 o
->box(fltk::FLAT_BOX
);
540 fltk::Group::current()->resizable(o
);
542 {EventMenu
* o
= event_menu
= new EventMenu(0, 0, 580, 75);
543 o
->box(fltk::FLAT_BOX
);
546 {fltk::Button
* o
= event_menu_button
= new fltk::Button(580, 0, 15, 15, "E");
547 o
->callback((fltk::Callback
*)cb_event_menu_button
);
548 o
->tooltip("pick event type");
549 o
->type(fltk::Button::TOGGLE
);
551 {fltk::Button
* o
= new fltk::Button(580, 15, 15, 15, "L");
552 o
->callback((fltk::Callback
*)cb_L
);
553 o
->tooltip("toggle event value labels");
554 o
->type(fltk::Button::TOGGLE
);
556 {fltk::Button
* o
= new fltk::Button(580, 30, 15, 15, "C");
557 o
->callback((fltk::Callback
*)cb_C
);
558 o
->tooltip("clear these events");
560 {fltk::Button
* o
= new fltk::Button(580, 45, 15, 15, "X");
561 o
->callback((fltk::Callback
*)cb_X
);
562 o
->tooltip("clear all non note events in pattern");
564 {fltk::Button
* o
= new fltk::Button(580, 60, 15, 15, "Z");
565 o
->labelcolor((fltk::Color
)0xff000000);
566 o
->callback((fltk::Callback
*)cb_Z
);
567 o
->tooltip("clear everything");
572 fltk::Group::current()->resizable(o
);
574 {fltk::Group
* o
= new fltk::Group(0, 0, 45, 445);
576 new fltk::Button(0, 0, 45, 15, "@line");
577 {fltk::Group
* o
= new fltk::Group(0, 15, 45, 340);
580 {TrackSelect
* o
= track_select
= new TrackSelect(0, 35, 45, 305, "track picker");
583 {SampleView
* o
= sample_view
= new SampleView(0, 35, 45, 305, "sample names");
586 {Keyboard
* o
= keyboard
= new Keyboard(0, 0, 45, 340, "keyboard");
590 fltk::Group::current()->resizable(o
);
592 {fltk::Button
* o
= new fltk::Button(0, 370, 45, 75, "@<-");
594 o
->callback((fltk::Callback
*)cb_
);
601 fltk::Group::current()->resizable(o
);
603 {fltk::Group
* o
= new fltk::Group(0, 445, 640, 35);
604 o
->box(fltk::UP_BOX
);
606 {fltk::Button
* o
= play_button
= new fltk::Button(5, 5, 25, 25, "@>");
607 o
->labelcolor((fltk::Color
)0x800000);
608 o
->callback((fltk::Callback
*)cb_play_button
);
610 {fltk::Button
* o
= stop_button
= new fltk::Button(35, 5, 25, 25, "@square");
611 o
->labelcolor((fltk::Color
)0x800000);
612 o
->callback((fltk::Callback
*)cb_stop_button
);
614 {fltk::Button
* o
= record_button
= new fltk::Button(65, 5, 25, 25, "@circle");
615 o
->labelcolor((fltk::Color
)0xff000000);
616 o
->callback((fltk::Callback
*)cb_record_button
);
617 o
->type(fltk::Button::TOGGLE
);
619 {Metronome
* o
= metronome
= new Metronome(95, 5, 25, 25, "0");
620 o
->color((fltk::Color
)56);
621 o
->labelcolor((fltk::Color
)0xffffff00);
623 {fltk::Group
* o
= new fltk::Group(125, 0, 20, 35);
625 fltk::Group::current()->resizable(o
);
627 {fltk::Group
* o
= pattern_buttons
= new fltk::Group(145, 5, 310, 25);
630 {fltk::Button
* o
= qbutton4
= new fltk::Button(135, 0, 25, 25);
631 o
->callback((fltk::Callback
*)cb_qbutton4
);
632 o
->type(fltk::Button::TOGGLE
);
634 {fltk::Button
* o
= qbutton8
= new fltk::Button(160, 0, 25, 25);
635 o
->callback((fltk::Callback
*)cb_qbutton8
);
636 o
->type(fltk::Button::TOGGLE
);
638 {fltk::Button
* o
= qbutton16
= new fltk::Button(185, 0, 25, 25);
639 o
->callback((fltk::Callback
*)cb_qbutton16
);
640 o
->type(fltk::Button::TOGGLE
);
643 {fltk::Button
* o
= qbutton32
= new fltk::Button(210, 0, 25, 25);
644 o
->callback((fltk::Callback
*)cb_qbutton32
);
645 o
->type(fltk::Button::TOGGLE
);
647 {fltk::Button
* o
= qbutton64
= new fltk::Button(235, 0, 25, 25);
648 o
->callback((fltk::Callback
*)cb_qbutton64
);
649 o
->type(fltk::Button::TOGGLE
);
651 {fltk::Button
* o
= qbutton128
= new fltk::Button(260, 0, 25, 25);
652 o
->callback((fltk::Callback
*)cb_qbutton128
);
653 o
->type(fltk::Button::TOGGLE
);
655 {fltk::Button
* o
= qbutton0
= new fltk::Button(285, 0, 25, 25);
656 o
->callback((fltk::Callback
*)cb_qbutton0
);
657 o
->type(fltk::Button::TOGGLE
);
659 {fltk::Button
* o
= quant1_button
= new fltk::Button(15, 0, 25, 25, "qua");
660 o
->tooltip("quantize selected notes");
662 {fltk::Button
* o
= quant0_button
= new fltk::Button(45, 0, 25, 25, "qu_");
663 o
->tooltip("quantize length of selected notes");
665 {fltk::Button
* o
= tool_button
= new fltk::Button(75, 0, 25, 25, "tool");
666 o
->callback((fltk::Callback
*)cb_tool_button
);
670 {fltk::Group
* o
= song_buttons
= new fltk::Group(340, 5, 115, 25);
672 {fltk::Button
* o
= color_toggle
= new fltk::Button(0, 0, 25, 25);
673 o
->callback((fltk::Callback
*)cb_color_toggle
);
674 o
->tooltip("color tool");
675 o
->type(fltk::Button::TOGGLE
);
677 {fltk::Button
* o
= unclone_button
= new fltk::Button(30, 0, 25, 25, "dclo");
678 o
->tooltip("unclone selected block");
680 {fltk::Button
* o
= join_button
= new fltk::Button(60, 0, 25, 25, "join");
681 o
->tooltip("join selected blocks");
683 {fltk::Button
* o
= split_button
= new fltk::Button(90, 0, 25, 25, "split");
684 o
->tooltip("split selected block");
688 {fltk::Button
* o
= loop_toggle
= new fltk::Button(490, 5, 25, 25);
689 o
->callback((fltk::Callback
*)cb_loop_toggle
);
690 o
->tooltip("toggle looping");
691 o
->type(fltk::Button::TOGGLE
);
693 {fltk::Button
* o
= config_button
= new fltk::Button(520, 5, 25, 25, "conf");
694 o
->callback((fltk::Callback
*)cb_config_button
);
695 o
->tooltip("configuration");
696 o
->type(fltk::Button::TOGGLE
);
698 {fltk::Button
* o
= scope_button
= new fltk::Button(550, 5, 25, 25);
699 o
->callback((fltk::Callback
*)cb_scope_button
);
701 o
->type(fltk::Button::TOGGLE
);
703 {fltk::Button
* o
= file_button
= new fltk::Button(580, 5, 25, 25);
704 o
->callback((fltk::Callback
*)cb_file_button
);
706 o
->type(fltk::Button::TOGGLE
);
708 {fltk::Button
* o
= help_button
= new fltk::Button(610, 5, 25, 25);
709 o
->callback((fltk::Callback
*)cb_help_button
);
711 o
->type(fltk::Button::TOGGLE
);
716 o
->size_range(640,455);
719 {fltk::Window
* o
= config_window
= new fltk::Window(320, 285, "controls");
721 o
->user_data((void*)(this));
723 {fltk::TabGroup
* o
= new fltk::TabGroup(0, 0, 320, 285);
725 {fltk::Group
* o
= new fltk::Group(145, 15, 170, 265, "options");
727 {fltk::ValueInput
* o
= beats_per_measure
= new fltk::ValueInput(5, 5, 45, 20, "beats per measure");
732 o
->callback((fltk::Callback
*)cb_beats_per_measure
);
734 {fltk::ValueInput
* o
= measures_per_phrase
= new fltk::ValueInput(5, 30, 45, 20, "measures per phrase");
738 o
->callback((fltk::Callback
*)cb_measures_per_phrase
);
740 {fltk::ValueOutput
* o
= bpm_output
= new fltk::ValueOutput(5, 55, 45, 20, "bpm");
746 {fltk::ThumbWheel
* o
= bpm_wheel
= new fltk::ThumbWheel(55, 55, 105, 20);
751 o
->callback((fltk::Callback
*)cb_bpm_wheel
);
752 o
->align(fltk::ALIGN_LEFT
);
754 {fltk::ValueInput
* o
= measures_until_record
= new fltk::ValueInput(5, 80, 45, 20, "measures until record");
758 o
->callback((fltk::Callback
*)cb_measures_until_record
);
760 {fltk::CheckButton
* o
= check_alwayscopy
= new fltk::CheckButton(5, 105, 25, 25, "always hard copy");
761 o
->callback((fltk::Callback
*)cb_check_alwayscopy
);
762 o
->align(fltk::ALIGN_LEFT
);
763 o
->tooltip("instead of making a linked clone when you copy a block in the song view.");
765 {fltk::CheckButton
* o
= check_autotrackname
= new fltk::CheckButton(145, 105, 25, 25, "auto track name");
766 o
->callback((fltk::Callback
*)cb_check_autotrackname
);
767 o
->align(fltk::ALIGN_LEFT
);
768 o
->tooltip("Fill in GM instruments for track names when you change the program.");
770 {fltk::CheckButton
* o
= check_passthru
= new fltk::CheckButton(5, 130, 25, 26, "record pass-thru");
771 o
->set_flag(fltk::STATE
);
772 o
->callback((fltk::Callback
*)cb_check_passthru
);
773 o
->align(fltk::ALIGN_LEFT
);
774 o
->tooltip("Echo midi input to midi output.");
776 {fltk::CheckButton
* o
= check_playinsert
= new fltk::CheckButton(145, 130, 25, 26, "play note insertion");
777 o
->set_flag(fltk::STATE
);
778 o
->callback((fltk::Callback
*)cb_check_playinsert
);
779 o
->align(fltk::ALIGN_LEFT
);
780 o
->tooltip("Send midi note on when you create notes.");
782 {fltk::CheckButton
* o
= check_recordonchan
= new fltk::CheckButton(5, 155, 25, 25, "record on channel");
783 o
->callback((fltk::Callback
*)cb_check_recordonchan
);
784 o
->align(fltk::ALIGN_LEFT
);
785 o
->tooltip("Record on first track that matches channel of midi input instead of selected \
788 {fltk::CheckButton
* o
= check_playmove
= new fltk::CheckButton(145, 155, 25, 26, "play note move");
789 o
->set_flag(fltk::STATE
);
790 o
->callback((fltk::Callback
*)cb_check_playmove
);
791 o
->align(fltk::ALIGN_LEFT
);
792 o
->tooltip("Send midi note on when you move notes.");
794 {fltk::CheckButton
* o
= check_follow
= new fltk::CheckButton(5, 179, 25, 26, "follow playback");
795 o
->set_flag(fltk::STATE
);
796 o
->callback((fltk::Callback
*)cb_check_follow
);
797 o
->align(fltk::ALIGN_LEFT
);
798 o
->tooltip("Auto scroll horizontally when play head leaves viewing area.");
800 {fltk::ValueInput
* o
= default_velocity
= new fltk::ValueInput(120, 180, 45, 20, "default velocity");
804 o
->callback((fltk::Callback
*)cb_default_velocity
);
806 {fltk::Choice
* o
= menu_recordmode
= new fltk::Choice(5, 210, 160, 25, "record mode");
808 {fltk::Item
* o
= new fltk::Item("merge");
809 o
->callback((fltk::Callback
*)cb_merge
);
811 {fltk::Item
* o
= new fltk::Item("overwrite");
812 o
->callback((fltk::Callback
*)cb_overwrite
);
814 {fltk::Item
* o
= new fltk::Item("layer");
815 o
->callback((fltk::Callback
*)cb_layer
);
819 {fltk::Choice
* o
= menu_rob
= new fltk::Choice(5, 240, 160, 25, "record outside block");
821 {fltk::Item
* o
= new fltk::Item("do nothing");
822 o
->callback((fltk::Callback
*)cb_do
);
824 {fltk::Item
* o
= new fltk::Item("new block");
825 o
->callback((fltk::Callback
*)cb_new
);
827 {fltk::Item
* o
= new fltk::Item("extend block");
828 o
->callback((fltk::Callback
*)cb_extend
);
834 {fltk::Group
* o
= new fltk::Group(0, 15, 320, 270, "keyboard");
837 {KeyGrabber
* o
= kg_l0
= new KeyGrabber(35, 5, 45, 15, "C0");
838 o
->align(fltk::ALIGN_LEFT
);
840 {KeyGrabber
* o
= kg_l1
= new KeyGrabber(35, 20, 45, 15, "C#0");
841 o
->align(fltk::ALIGN_LEFT
);
843 {KeyGrabber
* o
= kg_l2
= new KeyGrabber(35, 35, 45, 15, "D0");
844 o
->align(fltk::ALIGN_LEFT
);
846 {KeyGrabber
* o
= kg_l3
= new KeyGrabber(35, 50, 45, 15, "D#0");
847 o
->align(fltk::ALIGN_LEFT
);
849 {KeyGrabber
* o
= kg_l4
= new KeyGrabber(35, 65, 45, 15, "E0");
850 o
->align(fltk::ALIGN_LEFT
);
852 {KeyGrabber
* o
= kg_l5
= new KeyGrabber(35, 80, 45, 15, "F0");
853 o
->align(fltk::ALIGN_LEFT
);
855 {KeyGrabber
* o
= kg_l6
= new KeyGrabber(35, 95, 45, 15, "F#0");
856 o
->align(fltk::ALIGN_LEFT
);
858 {KeyGrabber
* o
= kg_l7
= new KeyGrabber(35, 110, 45, 15, "G0");
859 o
->align(fltk::ALIGN_LEFT
);
861 {KeyGrabber
* o
= kg_l8
= new KeyGrabber(35, 125, 45, 15, "G#0");
862 o
->align(fltk::ALIGN_LEFT
);
864 {KeyGrabber
* o
= kg_l9
= new KeyGrabber(35, 140, 45, 15, "A0");
865 o
->align(fltk::ALIGN_LEFT
);
867 {KeyGrabber
* o
= kg_l10
= new KeyGrabber(35, 155, 45, 15, "A#0");
868 o
->callback((fltk::Callback
*)cb_kg_l10
);
869 o
->align(fltk::ALIGN_LEFT
);
871 {KeyGrabber
* o
= kg_l11
= new KeyGrabber(35, 170, 45, 15, "B0");
872 o
->align(fltk::ALIGN_LEFT
);
874 {KeyGrabber
* o
= kg_l12
= new KeyGrabber(35, 185, 45, 15, "C1");
875 o
->align(fltk::ALIGN_LEFT
);
877 {KeyGrabber
* o
= kg_l13
= new KeyGrabber(35, 200, 45, 15, "C#1");
878 o
->align(fltk::ALIGN_LEFT
);
880 {KeyGrabber
* o
= kg_l14
= new KeyGrabber(35, 215, 45, 15, "D1");
881 o
->align(fltk::ALIGN_LEFT
);
883 {KeyGrabber
* o
= kg_l15
= new KeyGrabber(35, 230, 45, 15, "D#1");
884 o
->align(fltk::ALIGN_LEFT
);
886 {KeyGrabber
* o
= kg_l16
= new KeyGrabber(35, 245, 45, 15, "E1");
887 o
->align(fltk::ALIGN_LEFT
);
889 {KeyGrabber
* o
= kg_u0
= new KeyGrabber(130, 5, 45, 15, "C1");
890 o
->align(fltk::ALIGN_LEFT
);
892 {KeyGrabber
* o
= kg_u1
= new KeyGrabber(130, 20, 45, 15, "C#1");
893 o
->align(fltk::ALIGN_LEFT
);
895 {KeyGrabber
* o
= kg_u2
= new KeyGrabber(130, 35, 45, 15, "D1");
896 o
->align(fltk::ALIGN_LEFT
);
898 {KeyGrabber
* o
= kg_u3
= new KeyGrabber(130, 50, 45, 15, "D#1");
899 o
->align(fltk::ALIGN_LEFT
);
901 {KeyGrabber
* o
= kg_u4
= new KeyGrabber(130, 65, 45, 15, "E1");
902 o
->align(fltk::ALIGN_LEFT
);
904 {KeyGrabber
* o
= kg_u5
= new KeyGrabber(130, 80, 45, 15, "F1");
905 o
->align(fltk::ALIGN_LEFT
);
907 {KeyGrabber
* o
= kg_u6
= new KeyGrabber(130, 95, 45, 15, "F#1");
908 o
->align(fltk::ALIGN_LEFT
);
910 {KeyGrabber
* o
= kg_u7
= new KeyGrabber(130, 110, 45, 15, "G1");
911 o
->align(fltk::ALIGN_LEFT
);
913 {KeyGrabber
* o
= kg_u8
= new KeyGrabber(130, 125, 45, 15, "G#1");
914 o
->align(fltk::ALIGN_LEFT
);
916 {KeyGrabber
* o
= kg_u9
= new KeyGrabber(130, 140, 45, 15, "A1");
917 o
->align(fltk::ALIGN_LEFT
);
919 {KeyGrabber
* o
= kg_u10
= new KeyGrabber(130, 155, 45, 15, "A#1");
920 o
->align(fltk::ALIGN_LEFT
);
922 {KeyGrabber
* o
= kg_u11
= new KeyGrabber(130, 170, 45, 15, "B1");
923 o
->align(fltk::ALIGN_LEFT
);
925 {KeyGrabber
* o
= kg_u12
= new KeyGrabber(130, 185, 45, 15, "C2");
926 o
->align(fltk::ALIGN_LEFT
);
928 {KeyGrabber
* o
= kg_u13
= new KeyGrabber(130, 200, 45, 15, "C#2");
929 o
->align(fltk::ALIGN_LEFT
);
931 {KeyGrabber
* o
= kg_u14
= new KeyGrabber(130, 215, 45, 15, "D2");
932 o
->align(fltk::ALIGN_LEFT
);
934 {KeyGrabber
* o
= kg_u15
= new KeyGrabber(130, 230, 45, 15, "D#2");
935 o
->align(fltk::ALIGN_LEFT
);
937 {KeyGrabber
* o
= kg_u16
= new KeyGrabber(130, 245, 45, 15, "E2");
938 o
->align(fltk::ALIGN_LEFT
);
940 {KeyGrabber
* o
= kg_u17
= new KeyGrabber(265, 5, 45, 15, "F2");
941 o
->align(fltk::ALIGN_LEFT
);
943 {KeyGrabber
* o
= kg_u18
= new KeyGrabber(265, 20, 45, 15, "F#2");
944 o
->align(fltk::ALIGN_LEFT
);
946 {KeyGrabber
* o
= kg_u19
= new KeyGrabber(265, 35, 45, 15, "G2");
947 o
->align(fltk::ALIGN_LEFT
);
949 {KeyGrabber
* o
= kg_u20
= new KeyGrabber(265, 50, 45, 15, "G#2");
950 o
->align(fltk::ALIGN_LEFT
);
952 {KeyGrabber
* o
= kg_zi
= new KeyGrabber(265, 65, 45, 15, "zoom in");
953 o
->align(fltk::ALIGN_LEFT
);
955 {KeyGrabber
* o
= kg_zo
= new KeyGrabber(265, 80, 45, 15, "zoom out");
956 o
->align(fltk::ALIGN_LEFT
);
958 {KeyGrabber
* o
= kg_ou
= new KeyGrabber(265, 95, 45, 15, "octave up");
959 o
->align(fltk::ALIGN_LEFT
);
961 {KeyGrabber
* o
= kg_od
= new KeyGrabber(265, 110, 45, 15, "octave down");
962 o
->align(fltk::ALIGN_LEFT
);
966 {fltk::Group
* o
= new fltk::Group(0, 15, 320, 270, "colors");
969 new fltk::Button(250, 245, 65, 20, "apply");
970 {fltk::Choice
* o
= new fltk::Choice(55, 10, 100, 20, "presets");
972 new fltk::Item("windo");
973 new fltk::Item("midnight");
974 new fltk::Item("xterm");
983 {fltk::Window
* o
= help_window
= new fltk::Window(580, 370, "help");
985 o
->user_data((void*)(this));
987 {fltk::TabGroup
* o
= new fltk::TabGroup(0, 0, 580, 370);
989 {fltk::Group
* o
= new fltk::Group(0, 25, 580, 345, "info");
991 title_text
= new fltk::Input(55, 5, 520, 20, "Title");
992 author_text
= new fltk::Input(55, 30, 520, 20, "Author");
993 {fltk::TextEditor
* o
= info_text
= new fltk::TextEditor(5, 55, 570, 285);
994 o
->textfont(fltk::COURIER
);
995 fltk::Group::current()->resizable(o
);
998 fltk::Group::current()->resizable(o
);
1000 {fltk::Group
* o
= new fltk::Group(0, 25, 580, 345, "controls");
1003 {fltk::TextDisplay
* o
= new fltk::TextDisplay(5, 5, 570, 335);
1004 o
->textfont(fltk::COURIER
);
1005 fltk::Group::current()->resizable(o
);
1006 load_text(o
,ROOT_DATA_DIR
"doc/controls.txt");
1010 {fltk::Group
* o
= new fltk::Group(0, 25, 580, 345, "guide");
1013 {fltk::TextDisplay
* o
= new fltk::TextDisplay(5, 5, 570, 335);
1014 o
->textfont(fltk::COURIER
);
1015 fltk::Group::current()->resizable(o
);
1016 load_text(o
,ROOT_DATA_DIR
"doc/guide.txt");
1020 {fltk::Group
* o
= new fltk::Group(0, 25, 580, 345, "license");
1023 {fltk::TextDisplay
* o
= new fltk::TextDisplay(5, 5, 570, 335);
1024 o
->textfont(fltk::COURIER
);
1025 fltk::Group::current()->resizable(o
);
1026 load_text(o
,ROOT_DATA_DIR
"doc/license.txt");
1030 {fltk::Group
* o
= new fltk::Group(0, 25, 580, 345, "about");
1033 {fltk::TextDisplay
* o
= new fltk::TextDisplay(5, 5, 570, 335);
1034 o
->textfont(fltk::COURIER
);
1035 fltk::Group::current()->resizable(o
);
1036 load_text(o
,ROOT_DATA_DIR
"doc/README");
1043 o
->size_range(580,370);
1046 {fltk::Window
* o
= action_window
= new fltk::Window(100, 130, "menu");
1047 o
->shortcut(0xff1b);
1048 o
->user_data((void*)(this));
1050 {fltk::Button
* o
= new fltk::Button(5, 5, 90, 20, "new");
1051 o
->callback((fltk::Callback
*)cb_new1
);
1053 {fltk::Button
* o
= new fltk::Button(5, 25, 90, 20, "save");
1054 o
->callback((fltk::Callback
*)cb_save
);
1056 {fltk::Button
* o
= new fltk::Button(5, 45, 90, 20, "save as");
1057 o
->callback((fltk::Callback
*)cb_save1
);
1059 {fltk::Button
* o
= new fltk::Button(5, 65, 90, 20, "load");
1060 o
->callback((fltk::Callback
*)cb_load
);
1062 {fltk::Button
* o
= new fltk::Button(5, 85, 90, 20, "import");
1063 o
->callback((fltk::Callback
*)cb_import
);
1065 {fltk::Button
* o
= new fltk::Button(5, 105, 90, 20, "export");
1066 o
->callback((fltk::Callback
*)cb_export
);
1070 {fltk::Window
* o
= scope_window
= new fltk::Window(425, 280, "scope");
1072 o
->shortcut(0xff1b);
1073 o
->user_data((void*)(this));
1075 {fltk::TextDisplay
* o
= scope
= new fltk::TextDisplay(5, 5, 415, 245);
1076 o
->textfont(fltk::COURIER
);
1077 o
->color((fltk::Color
)0x280000);
1078 o
->textcolor((fltk::Color
)0xff0000);
1081 {fltk::Group
* o
= new fltk::Group(5, 255, 410, 20);
1083 {fltk::Button
* o
= new fltk::Button(0, 0, 40, 20, "on");
1084 o
->callback((fltk::Callback
*)cb_on
);
1085 o
->type(fltk::Button::TOGGLE
);
1087 {fltk::InvisibleBox
* o
= new fltk::InvisibleBox(45, 0, 95, 20);
1088 fltk::Group::current()->resizable(o
);
1095 loop_toggle
->image(fltk::SharedImage::get(ROOT_DATA_DIR
"gfx/loop.gif"));
1096 color_toggle
->image(fltk::SharedImage::get(ROOT_DATA_DIR
"gfx/color.gif"));
1097 scope_button
->image(fltk::SharedImage::get(ROOT_DATA_DIR
"gfx/conf.gif"));
1098 file_button
->image(fltk::SharedImage::get(ROOT_DATA_DIR
"gfx/file.gif"));
1099 help_button
->image(fltk::SharedImage::get(ROOT_DATA_DIR
"gfx/help.gif"));
1101 qbutton4
->image(fltk::SharedImage::get(ROOT_DATA_DIR
"gfx/q4.gif"));
1102 qbutton8
->image(fltk::SharedImage::get(ROOT_DATA_DIR
"gfx/q8.gif"));
1103 qbutton16
->image(fltk::SharedImage::get(ROOT_DATA_DIR
"gfx/q16.gif"));
1104 qbutton32
->image(fltk::SharedImage::get(ROOT_DATA_DIR
"gfx/q32.gif"));
1105 qbutton64
->image(fltk::SharedImage::get(ROOT_DATA_DIR
"gfx/q64.gif"));
1106 qbutton128
->image(fltk::SharedImage::get(ROOT_DATA_DIR
"gfx/q128.gif"));
1107 qbutton0
->image(fltk::SharedImage::get(ROOT_DATA_DIR
"gfx/q0.gif"));
1108 track_info
->set_rec(0);
1110 main_window
->show();