Rearranged the GUI.
[epichord.git] / src / ui.cpp
blobf39145d86677c09df80a4a915cb268fd5c7c7d7a
1 // generated by Fast Light User Interface Designer (fluid) version 2.1000
3 #include "ui.h"
4 /*
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
25 #include <stdlib.h>
26 #include <fltk/events.h>
27 #include <fltk/file_chooser.h>
28 #include "backend.h"
29 #include "util.h"
30 #include "uihelper.h"
31 #include "config.h"
32 extern UI* ui;
34 inline void UI::cb_main_window_i(fltk::Window* o, void*) {
35 if(!fltk::ask("Quit?")){
36 return;
39 config_window->hide();
40 help_window->hide();
41 action_window->hide();
42 scope_window->hide();
43 o->hide();
45 save_config();
47 void UI::cb_main_window(fltk::Window* o, void* v) {
48 ((UI*)(o->user_data()))->cb_main_window_i(o,v);
51 inline void UI::cb_line_i(fltk::Button*, void*) {
52 ui->track_info->toggle_controls();
54 void UI::cb_line(fltk::Button* o, void* v) {
55 ((UI*)(o->parent()->parent()->parent()->parent()->user_data()))->cb_line_i(o,v);
58 inline void UI::cb_song_vscroll_i(fltk::Scrollbar* o, void*) {
59 int target = (int)o->value();
60 int dummy = ui->arranger->scrollx;
61 ui->arranger->scrollTo(dummy,target);
63 void UI::cb_song_vscroll(fltk::Scrollbar* o, void* v) {
64 ((UI*)(o->parent()->parent()->parent()->parent()->user_data()))->cb_song_vscroll_i(o,v);
67 inline void UI::cb_song_hscroll_i(fltk::ThumbWheel* o, void*) {
68 ui->arranger->scrollTo((int)o->value(),ui->arranger->scrolly);
70 void UI::cb_song_hscroll(fltk::ThumbWheel* o, void* v) {
71 ((UI*)(o->parent()->parent()->parent()->parent()->user_data()))->cb_song_hscroll_i(o,v);
74 inline void UI::cb_pattern_vscroll_i(fltk::Scrollbar* o, void*) {
75 int target = (int)o->value();
76 int dummy = ui->piano_roll->scrollx;
77 ui->piano_roll->scrollTo(dummy,target);
79 void UI::cb_pattern_vscroll(fltk::Scrollbar* o, void* v) {
80 ((UI*)(o->parent()->parent()->parent()->parent()->parent()->user_data()))->cb_pattern_vscroll_i(o,v);
83 inline void UI::cb_pattern_hscroll_i(fltk::ThumbWheel* o, void*) {
84 ui->piano_roll->scrollTo((int)o->value(),ui->piano_roll->scrolly);
86 void UI::cb_pattern_hscroll(fltk::ThumbWheel* o, void* v) {
87 ((UI*)(o->parent()->parent()->parent()->parent()->parent()->user_data()))->cb_pattern_hscroll_i(o,v);
90 inline void UI::cb_event_menu_button_i(fltk::Button* o, void*) {
91 if(o->state()==0){
92 ui->event_menu->hide();
93 ui->event_edit->show();
95 else{
96 ui->event_edit->hide();
97 ui->event_edit->recount_has();
98 ui->event_menu->show();
101 void UI::cb_event_menu_button(fltk::Button* o, void* v) {
102 ((UI*)(o->parent()->parent()->parent()->parent()->parent()->user_data()))->cb_event_menu_button_i(o,v);
105 inline void UI::cb_L_i(fltk::Button* o, void*) {
106 ui->event_edit->label_flag = o->state();
107 ui->event_edit->redraw();
109 void UI::cb_L(fltk::Button* o, void* v) {
110 ((UI*)(o->parent()->parent()->parent()->parent()->parent()->user_data()))->cb_L_i(o,v);
113 inline void UI::cb_C_i(fltk::Button*, void*) {
114 ui->event_edit->clear_events();
116 void UI::cb_C(fltk::Button* o, void* v) {
117 ((UI*)(o->parent()->parent()->parent()->parent()->parent()->user_data()))->cb_C_i(o,v);
120 inline void UI::cb_X_i(fltk::Button*, void*) {
121 ui->event_edit->clear_non_note_events();
123 void UI::cb_X(fltk::Button* o, void* v) {
124 ((UI*)(o->parent()->parent()->parent()->parent()->parent()->user_data()))->cb_X_i(o,v);
127 inline void UI::cb_Z_i(fltk::Button*, void*) {
128 ui->event_edit->clear_all_events();
130 void UI::cb_Z(fltk::Button* o, void* v) {
131 ((UI*)(o->parent()->parent()->parent()->parent()->parent()->user_data()))->cb_Z_i(o,v);
134 inline void UI::cb__i(fltk::Button*, void*) {
135 show_song_edit();
137 void UI::cb_(fltk::Button* o, void* v) {
138 ((UI*)(o->parent()->parent()->parent()->parent()->user_data()))->cb__i(o,v);
141 inline void UI::cb_play_button_i(fltk::Button*, void*) {
142 press_play();
144 void UI::cb_play_button(fltk::Button* o, void* v) {
145 ((UI*)(o->parent()->parent()->user_data()))->cb_play_button_i(o,v);
148 inline void UI::cb_stop_button_i(fltk::Button*, void*) {
149 press_stop();
151 void UI::cb_stop_button(fltk::Button* o, void* v) {
152 ((UI*)(o->parent()->parent()->user_data()))->cb_stop_button_i(o,v);
155 inline void UI::cb_record_button_i(fltk::Button*, void*) {
156 toggle_backend_recording();
158 void UI::cb_record_button(fltk::Button* o, void* v) {
159 ((UI*)(o->parent()->parent()->user_data()))->cb_record_button_i(o,v);
162 inline void UI::cb_loop_toggle_i(fltk::Button*, void*) {
163 toggle_loop();
165 void UI::cb_loop_toggle(fltk::Button* o, void* v) {
166 ((UI*)(o->parent()->parent()->user_data()))->cb_loop_toggle_i(o,v);
169 inline void UI::cb_tool_button_i(fltk::Button*, void*) {
170 toggle_tool();
172 void UI::cb_tool_button(fltk::Button* o, void* v) {
173 ((UI*)(o->parent()->parent()->parent()->user_data()))->cb_tool_button_i(o,v);
176 inline void UI::cb_qbutton4_i(fltk::Button*, void*) {
177 set_quant(4);
179 void UI::cb_qbutton4(fltk::Button* o, void* v) {
180 ((UI*)(o->parent()->parent()->parent()->user_data()))->cb_qbutton4_i(o,v);
183 inline void UI::cb_qbutton8_i(fltk::Button*, void*) {
184 set_quant(8);
186 void UI::cb_qbutton8(fltk::Button* o, void* v) {
187 ((UI*)(o->parent()->parent()->parent()->user_data()))->cb_qbutton8_i(o,v);
190 inline void UI::cb_qbutton16_i(fltk::Button*, void*) {
191 set_quant(16);
193 void UI::cb_qbutton16(fltk::Button* o, void* v) {
194 ((UI*)(o->parent()->parent()->parent()->user_data()))->cb_qbutton16_i(o,v);
197 inline void UI::cb_qbutton32_i(fltk::Button*, void*) {
198 set_quant(32);
200 void UI::cb_qbutton32(fltk::Button* o, void* v) {
201 ((UI*)(o->parent()->parent()->parent()->user_data()))->cb_qbutton32_i(o,v);
204 inline void UI::cb_qbutton64_i(fltk::Button*, void*) {
205 set_quant(64);
207 void UI::cb_qbutton64(fltk::Button* o, void* v) {
208 ((UI*)(o->parent()->parent()->parent()->user_data()))->cb_qbutton64_i(o,v);
211 inline void UI::cb_qbutton128_i(fltk::Button*, void*) {
212 set_quant(128);
214 void UI::cb_qbutton128(fltk::Button* o, void* v) {
215 ((UI*)(o->parent()->parent()->parent()->user_data()))->cb_qbutton128_i(o,v);
218 inline void UI::cb_qbutton0_i(fltk::Button*, void*) {
219 set_quant(0);
221 void UI::cb_qbutton0(fltk::Button* o, void* v) {
222 ((UI*)(o->parent()->parent()->parent()->user_data()))->cb_qbutton0_i(o,v);
225 inline void UI::cb_edit_button_i(fltk::Button*, void*) {
226 set_songtool(0);
228 void UI::cb_edit_button(fltk::Button* o, void* v) {
229 ((UI*)(o->parent()->parent()->parent()->user_data()))->cb_edit_button_i(o,v);
232 inline void UI::cb_color_button_i(fltk::Button*, void*) {
233 set_songtool(1);
235 void UI::cb_color_button(fltk::Button* o, void* v) {
236 ((UI*)(o->parent()->parent()->parent()->user_data()))->cb_color_button_i(o,v);
239 inline void UI::cb_unclone_button_i(fltk::Button*, void*) {
240 set_songtool(2);
242 void UI::cb_unclone_button(fltk::Button* o, void* v) {
243 ((UI*)(o->parent()->parent()->parent()->user_data()))->cb_unclone_button_i(o,v);
246 inline void UI::cb_split_button_i(fltk::Button*, void*) {
247 set_songtool(3);
249 void UI::cb_split_button(fltk::Button* o, void* v) {
250 ((UI*)(o->parent()->parent()->parent()->user_data()))->cb_split_button_i(o,v);
253 inline void UI::cb_join_button_i(fltk::Button*, void*) {
254 set_songtool(4);
256 void UI::cb_join_button(fltk::Button* o, void* v) {
257 ((UI*)(o->parent()->parent()->parent()->user_data()))->cb_join_button_i(o,v);
260 inline void UI::cb_conf_button_i(fltk::Button* o, void*) {
261 if(o->state()){
262 ui->config_window->show();
264 else{
265 ui->config_window->hide();
268 void UI::cb_conf_button(fltk::Button* o, void* v) {
269 ((UI*)(o->parent()->parent()->user_data()))->cb_conf_button_i(o,v);
272 inline void UI::cb_scope_button_i(fltk::Button* o, void*) {
273 if(o->state()){
274 ui->scope_window->show();
276 else{
277 ui->scope_window->hide();
280 void UI::cb_scope_button(fltk::Button* o, void* v) {
281 ((UI*)(o->parent()->parent()->user_data()))->cb_scope_button_i(o,v);
284 inline void UI::cb_file_button_i(fltk::Button* o, void*) {
285 if(o->state()){
286 ui->action_window->show();
288 else{
289 ui->action_window->hide();
292 void UI::cb_file_button(fltk::Button* o, void* v) {
293 ((UI*)(o->parent()->parent()->user_data()))->cb_file_button_i(o,v);
296 inline void UI::cb_help_button_i(fltk::Button* o, void*) {
297 if(o->state()){
298 ui->help_window->show();
300 else{
301 ui->help_window->hide();
304 void UI::cb_help_button(fltk::Button* o, void* v) {
305 ((UI*)(o->parent()->parent()->user_data()))->cb_help_button_i(o,v);
308 inline void UI::cb_config_window_i(fltk::Window* o, void*) {
309 ui->conf_button->state(0);
310 o->hide();
312 void UI::cb_config_window(fltk::Window* o, void* v) {
313 ((UI*)(o->user_data()))->cb_config_window_i(o,v);
316 inline void UI::cb_beats_per_measure_i(fltk::ValueInput* o, void*) {
317 if(o->value() > o->maximum())
318 o->value(o->maximum());
319 if(o->value() < o->minimum())
320 o->value(o->minimum());
321 set_beats_per_measure((int)o->value());
323 void UI::cb_beats_per_measure(fltk::ValueInput* o, void* v) {
324 ((UI*)(o->parent()->parent()->parent()->user_data()))->cb_beats_per_measure_i(o,v);
327 inline void UI::cb_measures_per_phrase_i(fltk::ValueInput* o, void*) {
328 if(o->value() > o->maximum())
329 o->value(o->maximum());
330 if(o->value() < o->minimum())
331 o->value(o->minimum());
332 set_measures_per_phrase((int)o->value());
334 void UI::cb_measures_per_phrase(fltk::ValueInput* o, void* v) {
335 ((UI*)(o->parent()->parent()->parent()->user_data()))->cb_measures_per_phrase_i(o,v);
338 inline void UI::cb_bpm_wheel_i(fltk::ThumbWheel* o, void*) {
339 set_bpm((int)o->value());
340 ui->bpm_output->value(o->value());
342 void UI::cb_bpm_wheel(fltk::ThumbWheel* o, void* v) {
343 ((UI*)(o->parent()->parent()->parent()->user_data()))->cb_bpm_wheel_i(o,v);
346 inline void UI::cb_measures_until_record_i(fltk::ValueInput* o, void*) {
347 if(o->value() > o->maximum())
348 o->value(o->maximum());
349 if(o->value() < o->minimum())
350 o->value(o->minimum());
351 set_measures_until_record((int)o->value());
353 void UI::cb_measures_until_record(fltk::ValueInput* o, void* v) {
354 ((UI*)(o->parent()->parent()->parent()->user_data()))->cb_measures_until_record_i(o,v);
357 inline void UI::cb_check_alwayscopy_i(fltk::CheckButton* o, void*) {
358 set_alwayscopy(o->value());
360 void UI::cb_check_alwayscopy(fltk::CheckButton* o, void* v) {
361 ((UI*)(o->parent()->parent()->parent()->user_data()))->cb_check_alwayscopy_i(o,v);
364 inline void UI::cb_check_autotrackname_i(fltk::CheckButton* o, void*) {
365 set_autotrackname(o->value());
367 void UI::cb_check_autotrackname(fltk::CheckButton* o, void* v) {
368 ((UI*)(o->parent()->parent()->parent()->user_data()))->cb_check_autotrackname_i(o,v);
371 inline void UI::cb_check_passthru_i(fltk::CheckButton* o, void*) {
372 set_passthru(o->value());
374 void UI::cb_check_passthru(fltk::CheckButton* o, void* v) {
375 ((UI*)(o->parent()->parent()->parent()->user_data()))->cb_check_passthru_i(o,v);
378 inline void UI::cb_check_playinsert_i(fltk::CheckButton* o, void*) {
379 set_playinsert(o->value());
381 void UI::cb_check_playinsert(fltk::CheckButton* o, void* v) {
382 ((UI*)(o->parent()->parent()->parent()->user_data()))->cb_check_playinsert_i(o,v);
385 inline void UI::cb_check_recordonchan_i(fltk::CheckButton* o, void*) {
386 set_recordonchan(o->value());
388 void UI::cb_check_recordonchan(fltk::CheckButton* o, void* v) {
389 ((UI*)(o->parent()->parent()->parent()->user_data()))->cb_check_recordonchan_i(o,v);
392 inline void UI::cb_check_playmove_i(fltk::CheckButton* o, void*) {
393 set_playmove(o->value());
395 void UI::cb_check_playmove(fltk::CheckButton* o, void* v) {
396 ((UI*)(o->parent()->parent()->parent()->user_data()))->cb_check_playmove_i(o,v);
399 inline void UI::cb_check_follow_i(fltk::CheckButton* o, void*) {
400 set_follow(o->value());
402 void UI::cb_check_follow(fltk::CheckButton* o, void* v) {
403 ((UI*)(o->parent()->parent()->parent()->user_data()))->cb_check_follow_i(o,v);
406 inline void UI::cb_default_velocity_i(fltk::ValueInput* o, void*) {
407 if(o->value() > o->maximum())
408 o->value(o->maximum());
409 if(o->value() < o->minimum())
410 o->value(o->minimum());
411 set_defaultvelocity((int)o->value());
413 void UI::cb_default_velocity(fltk::ValueInput* o, void* v) {
414 ((UI*)(o->parent()->parent()->parent()->user_data()))->cb_default_velocity_i(o,v);
417 inline void UI::cb_merge_i(fltk::Item*, void*) {
418 set_recordmode(0);
420 void UI::cb_merge(fltk::Item* o, void* v) {
421 ((UI*)(o->parent()->parent()->parent()->parent()->user_data()))->cb_merge_i(o,v);
424 inline void UI::cb_overwrite_i(fltk::Item*, void*) {
425 set_recordmode(1);
427 void UI::cb_overwrite(fltk::Item* o, void* v) {
428 ((UI*)(o->parent()->parent()->parent()->parent()->user_data()))->cb_overwrite_i(o,v);
431 inline void UI::cb_layer_i(fltk::Item*, void*) {
432 set_recordmode(2);
434 void UI::cb_layer(fltk::Item* o, void* v) {
435 ((UI*)(o->parent()->parent()->parent()->parent()->user_data()))->cb_layer_i(o,v);
438 inline void UI::cb_do_i(fltk::Item*, void*) {
439 set_robmode(0);
441 void UI::cb_do(fltk::Item* o, void* v) {
442 ((UI*)(o->parent()->parent()->parent()->parent()->user_data()))->cb_do_i(o,v);
445 inline void UI::cb_new_i(fltk::Item*, void*) {
446 set_robmode(1);
448 void UI::cb_new(fltk::Item* o, void* v) {
449 ((UI*)(o->parent()->parent()->parent()->parent()->user_data()))->cb_new_i(o,v);
452 inline void UI::cb_extend_i(fltk::Item*, void*) {
453 set_robmode(2);
455 void UI::cb_extend(fltk::Item* o, void* v) {
456 ((UI*)(o->parent()->parent()->parent()->parent()->user_data()))->cb_extend_i(o,v);
459 inline void UI::cb_kg_l10_i(KeyGrabber*, void*) {
462 void UI::cb_kg_l10(KeyGrabber* o, void* v) {
463 ((UI*)(o->parent()->parent()->parent()->user_data()))->cb_kg_l10_i(o,v);
466 inline void UI::cb_help_window_i(fltk::Window* o, void*) {
467 ui->help_button->state(0);
468 o->hide();
470 void UI::cb_help_window(fltk::Window* o, void* v) {
471 ((UI*)(o->user_data()))->cb_help_window_i(o,v);
474 inline void UI::cb_action_window_i(fltk::Window* o, void*) {
475 ui->file_button->state(0);
476 o->hide();
478 void UI::cb_action_window(fltk::Window* o, void* v) {
479 ((UI*)(o->user_data()))->cb_action_window_i(o,v);
482 inline void UI::cb_new1_i(fltk::Button*, void*) {
483 reset_song();
485 void UI::cb_new1(fltk::Button* o, void* v) {
486 ((UI*)(o->parent()->user_data()))->cb_new1_i(o,v);
489 inline void UI::cb_save_i(fltk::Button*, void*) {
490 action_window->hide();
491 save();
493 void UI::cb_save(fltk::Button* o, void* v) {
494 ((UI*)(o->parent()->user_data()))->cb_save_i(o,v);
497 inline void UI::cb_save1_i(fltk::Button*, void*) {
498 action_window->hide();
499 save(fltk::file_chooser("save file",NULL,get_last_dir()));
501 void UI::cb_save1(fltk::Button* o, void* v) {
502 ((UI*)(o->parent()->user_data()))->cb_save1_i(o,v);
505 inline void UI::cb_load_i(fltk::Button*, void*) {
506 action_window->hide();
507 if(load(fltk::file_chooser("open file",NULL,get_last_dir()))<0){
508 reset_song();
511 void UI::cb_load(fltk::Button* o, void* v) {
512 ((UI*)(o->parent()->user_data()))->cb_load_i(o,v);
515 inline void UI::cb_import_i(fltk::Button*, void*) {
516 action_window->hide();
517 if(loadsmf(fltk::file_chooser("import file",NULL,get_last_dir()))<0){
518 reset_song();
521 void UI::cb_import(fltk::Button* o, void* v) {
522 ((UI*)(o->parent()->user_data()))->cb_import_i(o,v);
525 inline void UI::cb_export_i(fltk::Button*, void*) {
526 action_window->hide();
527 savesmf(fltk::file_chooser("export file",NULL,get_last_dir()));
529 void UI::cb_export(fltk::Button* o, void* v) {
530 ((UI*)(o->parent()->user_data()))->cb_export_i(o,v);
533 inline void UI::cb_scope_window_i(fltk::Window* o, void*) {
534 ui->scope_button->state(0);
535 o->hide();
537 void UI::cb_scope_window(fltk::Window* o, void* v) {
538 ((UI*)(o->user_data()))->cb_scope_window_i(o,v);
541 inline void UI::cb_on_i(fltk::Button* o, void*) {
542 if(o->state()){
543 turnonscope();
545 else{
546 turnoffscope();
549 void UI::cb_on(fltk::Button* o, void* v) {
550 ((UI*)(o->parent()->parent()->user_data()))->cb_on_i(o,v);
553 UI::UI() {
554 fltk::Window* w;
555 {fltk::Window* o = main_window = new fltk::Window(640, 480, "Epichord");
556 o->shortcut(0xff1b);
557 o->callback((fltk::Callback*)cb_main_window, (void*)(this));
558 o->begin();
559 {fltk::Group* o = new fltk::Group(0, 0, 640, 445);
560 o->begin();
561 {fltk::Group* o = song_edit = new fltk::Group(0, 0, 640, 445);
562 o->begin();
563 {fltk::Group* o = new fltk::Group(0, 0, 255, 445);
564 o->set_vertical();
565 o->box(fltk::FLAT_BOX);
566 o->begin();
567 {TrackInfo* o = track_info = new TrackInfo(0, 15, 255, 415, "track info");
568 o->set_vertical();
569 fltk::Group::current()->resizable(o);
571 {fltk::Button* o = new fltk::Button(0, 0, 255, 15, "@line");
572 o->callback((fltk::Callback*)cb_line);
574 o->end();
576 {fltk::Group* o = new fltk::Group(255, 0, 385, 15);
577 o->begin();
578 {Timeline* o = song_timeline = new Timeline(0, 0, 370, 15, "timeline");
579 fltk::Group::current()->resizable(o);
580 o->scale=16;
581 o->label_scale=4;
583 o->end();
585 {fltk::Group* o = song_scrollgroup = new fltk::Group(255, 15, 385, 430);
586 o->set_vertical();
587 o->begin();
588 {Arranger* o = arranger = new Arranger(0, 0, 370, 415, "arranger");
589 o->set_vertical();
590 o->box(fltk::FLAT_BOX);
591 fltk::Group::current()->resizable(o);
593 {fltk::Scrollbar* o = song_vscroll = new fltk::Scrollbar(370, 0, 15, 415);
594 o->set_vertical();
595 o->slider_size(60);
596 o->callback((fltk::Callback*)cb_song_vscroll);
598 {fltk::ThumbWheel* o = song_hscroll = new fltk::ThumbWheel(0, 415, 370, 15);
599 o->maximum(10000);
600 o->step(10);
601 o->callback((fltk::Callback*)cb_song_hscroll);
603 o->end();
604 fltk::Group::current()->resizable(o);
606 o->end();
608 {fltk::Group* o = pattern_edit = new fltk::Group(0, 0, 640, 445);
609 o->hide();
610 o->begin();
611 {fltk::Group* o = new fltk::Group(45, 0, 595, 445);
612 o->begin();
613 {fltk::Group* o = new fltk::Group(0, 0, 595, 15);
614 o->begin();
615 {Timeline* o = pattern_timeline = new Timeline(0, 0, 580, 15, "timeline");
616 o->box(fltk::FLAT_BOX);
617 fltk::Group::current()->resizable(o);
618 o->edit_flag = 1;
620 o->end();
622 {fltk::Group* o = pattern_scrollgroup = new fltk::Group(0, 15, 595, 355);
623 o->begin();
624 {PianoRoll* o = piano_roll = new PianoRoll(0, 0, 580, 340, "pianoroll");
625 o->box(fltk::FLAT_BOX);
626 fltk::Group::current()->resizable(o);
628 {fltk::Scrollbar* o = pattern_vscroll = new fltk::Scrollbar(580, 0, 15, 340);
629 o->set_vertical();
630 o->callback((fltk::Callback*)cb_pattern_vscroll);
632 {fltk::ThumbWheel* o = pattern_hscroll = new fltk::ThumbWheel(0, 340, 580, 15);
633 o->step(10);
634 o->callback((fltk::Callback*)cb_pattern_hscroll);
636 o->end();
637 fltk::Group::current()->resizable(o);
639 {fltk::Group* o = new fltk::Group(0, 370, 595, 75);
640 o->begin();
641 {EventEdit* o = event_edit = new EventEdit(0, 0, 580, 75, "event editor");
642 o->box(fltk::FLAT_BOX);
643 fltk::Group::current()->resizable(o);
645 {EventMenu* o = event_menu = new EventMenu(0, 0, 580, 75);
646 o->box(fltk::FLAT_BOX);
647 o->hide();
649 {fltk::Button* o = event_menu_button = new fltk::Button(580, 0, 15, 15, "E");
650 o->callback((fltk::Callback*)cb_event_menu_button);
651 o->tooltip("pick event type");
652 o->type(fltk::Button::TOGGLE);
654 {fltk::Button* o = new fltk::Button(580, 15, 15, 15, "L");
655 o->callback((fltk::Callback*)cb_L);
656 o->tooltip("toggle event value labels");
657 o->type(fltk::Button::TOGGLE);
659 {fltk::Button* o = new fltk::Button(580, 30, 15, 15, "C");
660 o->callback((fltk::Callback*)cb_C);
661 o->tooltip("clear these events");
663 {fltk::Button* o = new fltk::Button(580, 45, 15, 15, "X");
664 o->callback((fltk::Callback*)cb_X);
665 o->tooltip("clear all non note events in pattern");
667 {fltk::Button* o = new fltk::Button(580, 60, 15, 15, "Z");
668 o->labelcolor((fltk::Color)0xff000000);
669 o->callback((fltk::Callback*)cb_Z);
670 o->tooltip("clear everything");
672 o->end();
674 o->end();
675 fltk::Group::current()->resizable(o);
677 {fltk::Group* o = new fltk::Group(0, 0, 45, 445);
678 o->begin();
679 new fltk::Button(0, 0, 45, 15, "@line");
680 {fltk::Group* o = new fltk::Group(0, 15, 45, 340);
681 o->set_vertical();
682 o->begin();
683 {TrackSelect* o = track_select = new TrackSelect(0, 35, 45, 305, "track picker");
684 o->set_vertical();
686 {SampleView* o = sample_view = new SampleView(0, 35, 45, 305, "sample names");
687 o->set_vertical();
689 {Keyboard* o = keyboard = new Keyboard(0, 0, 45, 340, "keyboard");
690 o->set_vertical();
692 o->end();
693 fltk::Group::current()->resizable(o);
695 {fltk::Button* o = new fltk::Button(0, 370, 45, 75, "@<-");
696 o->set_vertical();
697 o->callback((fltk::Callback*)cb_);
699 o->end();
701 o->end();
703 o->end();
704 fltk::Group::current()->resizable(o);
706 {fltk::Group* o = new fltk::Group(0, 445, 640, 35);
707 o->box(fltk::UP_BOX);
708 o->begin();
709 {fltk::Button* o = play_button = new fltk::Button(5, 5, 25, 25, "@>");
710 o->labelcolor((fltk::Color)0x800000);
711 o->callback((fltk::Callback*)cb_play_button);
713 {fltk::Button* o = stop_button = new fltk::Button(35, 5, 25, 25, "@square");
714 o->labelcolor((fltk::Color)0x800000);
715 o->callback((fltk::Callback*)cb_stop_button);
717 {fltk::Button* o = record_button = new fltk::Button(65, 5, 25, 25, "@circle");
718 o->labelcolor((fltk::Color)0xff000000);
719 o->callback((fltk::Callback*)cb_record_button);
720 o->type(fltk::Button::TOGGLE);
722 {Metronome* o = metronome = new Metronome(95, 5, 25, 25, "0");
723 o->color((fltk::Color)56);
724 o->labelcolor((fltk::Color)0xffffff00);
726 {fltk::Button* o = loop_toggle = new fltk::Button(125, 5, 25, 25);
727 o->callback((fltk::Callback*)cb_loop_toggle);
728 o->tooltip("toggle looping");
729 o->type(fltk::Button::TOGGLE);
731 {fltk::Group* o = new fltk::Group(155, 0, 20, 35);
732 o->set_vertical();
733 fltk::Group::current()->resizable(o);
735 {fltk::Group* o = pattern_buttons = new fltk::Group(200, 5, 310, 25);
736 o->hide();
737 o->begin();
738 {fltk::Button* o = quant1_button = new fltk::Button(35, 0, 25, 25, "qua");
739 o->tooltip("quantize selected notes");
741 {fltk::Button* o = quant0_button = new fltk::Button(60, 0, 25, 25, "qu_");
742 o->tooltip("quantize length of selected notes");
744 {fltk::Button* o = tool_button = new fltk::Button(85, 0, 25, 25, "tool");
745 o->callback((fltk::Callback*)cb_tool_button);
747 {fltk::Button* o = qbutton4 = new fltk::Button(135, 0, 25, 25);
748 o->callback((fltk::Callback*)cb_qbutton4);
749 o->type(fltk::Button::TOGGLE);
751 {fltk::Button* o = qbutton8 = new fltk::Button(160, 0, 25, 25);
752 o->callback((fltk::Callback*)cb_qbutton8);
753 o->type(fltk::Button::TOGGLE);
755 {fltk::Button* o = qbutton16 = new fltk::Button(185, 0, 25, 25);
756 o->callback((fltk::Callback*)cb_qbutton16);
757 o->type(fltk::Button::TOGGLE);
758 o->state(1);
760 {fltk::Button* o = qbutton32 = new fltk::Button(210, 0, 25, 25);
761 o->callback((fltk::Callback*)cb_qbutton32);
762 o->type(fltk::Button::TOGGLE);
764 {fltk::Button* o = qbutton64 = new fltk::Button(235, 0, 25, 25);
765 o->callback((fltk::Callback*)cb_qbutton64);
766 o->type(fltk::Button::TOGGLE);
768 {fltk::Button* o = qbutton128 = new fltk::Button(260, 0, 25, 25);
769 o->callback((fltk::Callback*)cb_qbutton128);
770 o->type(fltk::Button::TOGGLE);
772 {fltk::Button* o = qbutton0 = new fltk::Button(285, 0, 25, 25);
773 o->callback((fltk::Callback*)cb_qbutton0);
774 o->type(fltk::Button::TOGGLE);
776 o->end();
778 {fltk::Group* o = song_buttons = new fltk::Group(385, 5, 145, 25);
779 o->begin();
780 {fltk::Button* o = edit_button = new fltk::Button(0, 0, 25, 25);
781 o->set_flag(fltk::STATE);
782 o->callback((fltk::Callback*)cb_edit_button);
783 o->tooltip("create delete move resize select paste blocks");
785 {fltk::Button* o = color_button = new fltk::Button(25, 0, 25, 25);
786 o->callback((fltk::Callback*)cb_color_button);
787 o->tooltip("color tool");
788 o->type(fltk::Button::TOGGLE);
790 {fltk::Button* o = unclone_button = new fltk::Button(50, 0, 25, 25);
791 o->callback((fltk::Callback*)cb_unclone_button);
792 o->tooltip("click on blocks to unclone them");
793 o->type(fltk::Button::TOGGLE);
795 {fltk::Button* o = split_button = new fltk::Button(75, 0, 25, 25);
796 o->callback((fltk::Callback*)cb_split_button);
797 o->tooltip("click on a block to split in two");
798 o->type(fltk::Button::TOGGLE);
800 {fltk::Button* o = join_button = new fltk::Button(100, 0, 25, 25);
801 o->callback((fltk::Callback*)cb_join_button);
802 o->tooltip("click on adjacent blocks to join them");
803 o->type(fltk::Button::TOGGLE);
805 o->end();
807 {fltk::Button* o = conf_button = new fltk::Button(535, 5, 25, 25);
808 o->callback((fltk::Callback*)cb_conf_button);
809 o->tooltip("configuration");
810 o->type(fltk::Button::TOGGLE);
812 {fltk::Button* o = scope_button = new fltk::Button(560, 5, 25, 25);
813 o->callback((fltk::Callback*)cb_scope_button);
814 o->tooltip("scope");
815 o->type(fltk::Button::TOGGLE);
817 {fltk::Button* o = file_button = new fltk::Button(585, 5, 25, 25);
818 o->callback((fltk::Callback*)cb_file_button);
819 o->tooltip("disk");
820 o->type(fltk::Button::TOGGLE);
822 {fltk::Button* o = help_button = new fltk::Button(610, 5, 25, 25);
823 o->callback((fltk::Callback*)cb_help_button);
824 o->tooltip("help");
825 o->type(fltk::Button::TOGGLE);
827 o->end();
829 o->end();
832 o->size_range(640,455);
833 o->resize(640,455);
835 {fltk::Window* o = config_window = new fltk::Window(320, 285, "config");
836 o->shortcut(0xff1b);
837 o->callback((fltk::Callback*)cb_config_window, (void*)(this));
838 o->begin();
839 {fltk::TabGroup* o = new fltk::TabGroup(0, 0, 320, 285);
840 o->begin();
841 {fltk::Group* o = new fltk::Group(145, 15, 170, 265, "options");
842 o->begin();
843 {fltk::ValueInput* o = beats_per_measure = new fltk::ValueInput(5, 5, 45, 20, "beats per measure");
844 o->minimum(1);
845 o->maximum(31);
846 o->step(1);
847 o->value(4);
848 o->callback((fltk::Callback*)cb_beats_per_measure);
850 {fltk::ValueInput* o = measures_per_phrase = new fltk::ValueInput(5, 30, 45, 20, "measures per phrase");
851 o->maximum(128);
852 o->step(1);
853 o->value(4);
854 o->callback((fltk::Callback*)cb_measures_per_phrase);
856 {fltk::ValueOutput* o = bpm_output = new fltk::ValueOutput(5, 55, 45, 20, "bpm");
857 o->minimum(1);
858 o->maximum(1000);
859 o->step(1);
860 o->value(120);
862 {fltk::ThumbWheel* o = bpm_wheel = new fltk::ThumbWheel(55, 55, 105, 20);
863 o->minimum(1);
864 o->maximum(1000);
865 o->step(1);
866 o->value(120);
867 o->callback((fltk::Callback*)cb_bpm_wheel);
868 o->align(fltk::ALIGN_LEFT);
870 {fltk::ValueInput* o = measures_until_record = new fltk::ValueInput(5, 80, 45, 20, "measures until record");
871 o->maximum(128);
872 o->step(1);
873 o->value(1);
874 o->callback((fltk::Callback*)cb_measures_until_record);
876 {fltk::CheckButton* o = check_alwayscopy = new fltk::CheckButton(5, 105, 25, 25, "always hard copy");
877 o->callback((fltk::Callback*)cb_check_alwayscopy);
878 o->align(fltk::ALIGN_LEFT);
879 o->tooltip("instead of making a linked clone when you copy a block in the song view.");
881 {fltk::CheckButton* o = check_autotrackname = new fltk::CheckButton(145, 105, 25, 25, "auto track name");
882 o->callback((fltk::Callback*)cb_check_autotrackname);
883 o->align(fltk::ALIGN_LEFT);
884 o->tooltip("Fill in GM instruments for track names when you change the program.");
886 {fltk::CheckButton* o = check_passthru = new fltk::CheckButton(5, 130, 25, 26, "record pass-thru");
887 o->set_flag(fltk::STATE);
888 o->callback((fltk::Callback*)cb_check_passthru);
889 o->align(fltk::ALIGN_LEFT);
890 o->tooltip("Echo midi input to midi output.");
892 {fltk::CheckButton* o = check_playinsert = new fltk::CheckButton(145, 130, 25, 26, "play note insertion");
893 o->set_flag(fltk::STATE);
894 o->callback((fltk::Callback*)cb_check_playinsert);
895 o->align(fltk::ALIGN_LEFT);
896 o->tooltip("Send midi note on when you create notes.");
898 {fltk::CheckButton* o = check_recordonchan = new fltk::CheckButton(5, 155, 25, 25, "record on channel");
899 o->callback((fltk::Callback*)cb_check_recordonchan);
900 o->align(fltk::ALIGN_LEFT);
901 o->tooltip("Record on first track that matches channel of midi input instead of selected \
902 track.");
904 {fltk::CheckButton* o = check_playmove = new fltk::CheckButton(145, 155, 25, 26, "play note move");
905 o->set_flag(fltk::STATE);
906 o->callback((fltk::Callback*)cb_check_playmove);
907 o->align(fltk::ALIGN_LEFT);
908 o->tooltip("Send midi note on when you move notes.");
910 {fltk::CheckButton* o = check_follow = new fltk::CheckButton(5, 179, 25, 26, "follow playback");
911 o->set_flag(fltk::STATE);
912 o->callback((fltk::Callback*)cb_check_follow);
913 o->align(fltk::ALIGN_LEFT);
914 o->tooltip("Auto scroll horizontally when play head leaves viewing area.");
916 {fltk::ValueInput* o = default_velocity = new fltk::ValueInput(120, 180, 45, 20, "default velocity");
917 o->maximum(127);
918 o->step(1);
919 o->value(96);
920 o->callback((fltk::Callback*)cb_default_velocity);
922 {fltk::Choice* o = menu_recordmode = new fltk::Choice(5, 210, 160, 25, "record mode");
923 o->begin();
924 {fltk::Item* o = new fltk::Item("merge");
925 o->callback((fltk::Callback*)cb_merge);
927 {fltk::Item* o = new fltk::Item("overwrite");
928 o->callback((fltk::Callback*)cb_overwrite);
930 {fltk::Item* o = new fltk::Item("layer");
931 o->callback((fltk::Callback*)cb_layer);
933 o->end();
935 {fltk::Choice* o = menu_rob = new fltk::Choice(5, 240, 160, 25, "record outside block");
936 o->begin();
937 {fltk::Item* o = new fltk::Item("do nothing");
938 o->callback((fltk::Callback*)cb_do);
940 {fltk::Item* o = new fltk::Item("new block");
941 o->callback((fltk::Callback*)cb_new);
943 {fltk::Item* o = new fltk::Item("extend block");
944 o->callback((fltk::Callback*)cb_extend);
946 o->end();
948 o->end();
950 {fltk::Group* o = new fltk::Group(0, 15, 320, 270, "keyboard");
951 o->hide();
952 o->begin();
953 {KeyGrabber* o = kg_l0 = new KeyGrabber(35, 5, 45, 15, "C0");
954 o->align(fltk::ALIGN_LEFT);
956 {KeyGrabber* o = kg_l1 = new KeyGrabber(35, 20, 45, 15, "C#0");
957 o->align(fltk::ALIGN_LEFT);
959 {KeyGrabber* o = kg_l2 = new KeyGrabber(35, 35, 45, 15, "D0");
960 o->align(fltk::ALIGN_LEFT);
962 {KeyGrabber* o = kg_l3 = new KeyGrabber(35, 50, 45, 15, "D#0");
963 o->align(fltk::ALIGN_LEFT);
965 {KeyGrabber* o = kg_l4 = new KeyGrabber(35, 65, 45, 15, "E0");
966 o->align(fltk::ALIGN_LEFT);
968 {KeyGrabber* o = kg_l5 = new KeyGrabber(35, 80, 45, 15, "F0");
969 o->align(fltk::ALIGN_LEFT);
971 {KeyGrabber* o = kg_l6 = new KeyGrabber(35, 95, 45, 15, "F#0");
972 o->align(fltk::ALIGN_LEFT);
974 {KeyGrabber* o = kg_l7 = new KeyGrabber(35, 110, 45, 15, "G0");
975 o->align(fltk::ALIGN_LEFT);
977 {KeyGrabber* o = kg_l8 = new KeyGrabber(35, 125, 45, 15, "G#0");
978 o->align(fltk::ALIGN_LEFT);
980 {KeyGrabber* o = kg_l9 = new KeyGrabber(35, 140, 45, 15, "A0");
981 o->align(fltk::ALIGN_LEFT);
983 {KeyGrabber* o = kg_l10 = new KeyGrabber(35, 155, 45, 15, "A#0");
984 o->callback((fltk::Callback*)cb_kg_l10);
985 o->align(fltk::ALIGN_LEFT);
987 {KeyGrabber* o = kg_l11 = new KeyGrabber(35, 170, 45, 15, "B0");
988 o->align(fltk::ALIGN_LEFT);
990 {KeyGrabber* o = kg_l12 = new KeyGrabber(35, 185, 45, 15, "C1");
991 o->align(fltk::ALIGN_LEFT);
993 {KeyGrabber* o = kg_l13 = new KeyGrabber(35, 200, 45, 15, "C#1");
994 o->align(fltk::ALIGN_LEFT);
996 {KeyGrabber* o = kg_l14 = new KeyGrabber(35, 215, 45, 15, "D1");
997 o->align(fltk::ALIGN_LEFT);
999 {KeyGrabber* o = kg_l15 = new KeyGrabber(35, 230, 45, 15, "D#1");
1000 o->align(fltk::ALIGN_LEFT);
1002 {KeyGrabber* o = kg_l16 = new KeyGrabber(35, 245, 45, 15, "E1");
1003 o->align(fltk::ALIGN_LEFT);
1005 {KeyGrabber* o = kg_u0 = new KeyGrabber(130, 5, 45, 15, "C1");
1006 o->align(fltk::ALIGN_LEFT);
1008 {KeyGrabber* o = kg_u1 = new KeyGrabber(130, 20, 45, 15, "C#1");
1009 o->align(fltk::ALIGN_LEFT);
1011 {KeyGrabber* o = kg_u2 = new KeyGrabber(130, 35, 45, 15, "D1");
1012 o->align(fltk::ALIGN_LEFT);
1014 {KeyGrabber* o = kg_u3 = new KeyGrabber(130, 50, 45, 15, "D#1");
1015 o->align(fltk::ALIGN_LEFT);
1017 {KeyGrabber* o = kg_u4 = new KeyGrabber(130, 65, 45, 15, "E1");
1018 o->align(fltk::ALIGN_LEFT);
1020 {KeyGrabber* o = kg_u5 = new KeyGrabber(130, 80, 45, 15, "F1");
1021 o->align(fltk::ALIGN_LEFT);
1023 {KeyGrabber* o = kg_u6 = new KeyGrabber(130, 95, 45, 15, "F#1");
1024 o->align(fltk::ALIGN_LEFT);
1026 {KeyGrabber* o = kg_u7 = new KeyGrabber(130, 110, 45, 15, "G1");
1027 o->align(fltk::ALIGN_LEFT);
1029 {KeyGrabber* o = kg_u8 = new KeyGrabber(130, 125, 45, 15, "G#1");
1030 o->align(fltk::ALIGN_LEFT);
1032 {KeyGrabber* o = kg_u9 = new KeyGrabber(130, 140, 45, 15, "A1");
1033 o->align(fltk::ALIGN_LEFT);
1035 {KeyGrabber* o = kg_u10 = new KeyGrabber(130, 155, 45, 15, "A#1");
1036 o->align(fltk::ALIGN_LEFT);
1038 {KeyGrabber* o = kg_u11 = new KeyGrabber(130, 170, 45, 15, "B1");
1039 o->align(fltk::ALIGN_LEFT);
1041 {KeyGrabber* o = kg_u12 = new KeyGrabber(130, 185, 45, 15, "C2");
1042 o->align(fltk::ALIGN_LEFT);
1044 {KeyGrabber* o = kg_u13 = new KeyGrabber(130, 200, 45, 15, "C#2");
1045 o->align(fltk::ALIGN_LEFT);
1047 {KeyGrabber* o = kg_u14 = new KeyGrabber(130, 215, 45, 15, "D2");
1048 o->align(fltk::ALIGN_LEFT);
1050 {KeyGrabber* o = kg_u15 = new KeyGrabber(130, 230, 45, 15, "D#2");
1051 o->align(fltk::ALIGN_LEFT);
1053 {KeyGrabber* o = kg_u16 = new KeyGrabber(130, 245, 45, 15, "E2");
1054 o->align(fltk::ALIGN_LEFT);
1056 {KeyGrabber* o = kg_u17 = new KeyGrabber(265, 5, 45, 15, "F2");
1057 o->align(fltk::ALIGN_LEFT);
1059 {KeyGrabber* o = kg_u18 = new KeyGrabber(265, 20, 45, 15, "F#2");
1060 o->align(fltk::ALIGN_LEFT);
1062 {KeyGrabber* o = kg_u19 = new KeyGrabber(265, 35, 45, 15, "G2");
1063 o->align(fltk::ALIGN_LEFT);
1065 {KeyGrabber* o = kg_u20 = new KeyGrabber(265, 50, 45, 15, "G#2");
1066 o->align(fltk::ALIGN_LEFT);
1068 {KeyGrabber* o = kg_zi = new KeyGrabber(265, 65, 45, 15, "zoom in");
1069 o->align(fltk::ALIGN_LEFT);
1071 {KeyGrabber* o = kg_zo = new KeyGrabber(265, 80, 45, 15, "zoom out");
1072 o->align(fltk::ALIGN_LEFT);
1074 {KeyGrabber* o = kg_ou = new KeyGrabber(265, 95, 45, 15, "octave up");
1075 o->align(fltk::ALIGN_LEFT);
1077 {KeyGrabber* o = kg_od = new KeyGrabber(265, 110, 45, 15, "octave down");
1078 o->align(fltk::ALIGN_LEFT);
1080 o->end();
1082 {fltk::Group* o = new fltk::Group(0, 15, 320, 270, "colors");
1083 o->hide();
1084 o->begin();
1085 new fltk::Button(250, 245, 65, 20, "apply");
1086 {fltk::Choice* o = new fltk::Choice(55, 10, 100, 20, "presets");
1087 o->begin();
1088 new fltk::Item("windo");
1089 new fltk::Item("midnight");
1090 new fltk::Item("xterm");
1091 o->end();
1093 o->end();
1095 o->end();
1097 o->end();
1099 {fltk::Window* o = help_window = new fltk::Window(580, 370, "help");
1100 o->shortcut(0xff1b);
1101 o->callback((fltk::Callback*)cb_help_window, (void*)(this));
1102 o->begin();
1103 {fltk::TabGroup* o = new fltk::TabGroup(0, 0, 580, 370);
1104 o->begin();
1105 {fltk::Group* o = new fltk::Group(0, 25, 580, 345, "info");
1106 o->begin();
1107 title_text = new fltk::Input(55, 5, 520, 20, "Title");
1108 author_text = new fltk::Input(55, 30, 520, 20, "Author");
1109 {fltk::TextEditor* o = info_text = new fltk::TextEditor(5, 55, 570, 285);
1110 o->textfont(fltk::COURIER);
1111 fltk::Group::current()->resizable(o);
1113 o->end();
1114 fltk::Group::current()->resizable(o);
1116 {fltk::Group* o = new fltk::Group(0, 25, 580, 345, "controls");
1117 o->hide();
1118 o->begin();
1119 {fltk::TextDisplay* o = new fltk::TextDisplay(5, 5, 570, 335);
1120 o->textfont(fltk::COURIER);
1121 fltk::Group::current()->resizable(o);
1122 load_text(o,ROOT_DATA_DIR"doc/controls.txt");
1124 o->end();
1126 {fltk::Group* o = new fltk::Group(0, 25, 580, 345, "guide");
1127 o->hide();
1128 o->begin();
1129 {fltk::TextDisplay* o = new fltk::TextDisplay(5, 5, 570, 335);
1130 o->textfont(fltk::COURIER);
1131 fltk::Group::current()->resizable(o);
1132 load_text(o,ROOT_DATA_DIR"doc/guide.txt");
1134 o->end();
1136 {fltk::Group* o = new fltk::Group(0, 25, 580, 345, "license");
1137 o->hide();
1138 o->begin();
1139 {fltk::TextDisplay* o = new fltk::TextDisplay(5, 5, 570, 335);
1140 o->textfont(fltk::COURIER);
1141 fltk::Group::current()->resizable(o);
1142 load_text(o,ROOT_DATA_DIR"doc/license.txt");
1144 o->end();
1146 {fltk::Group* o = new fltk::Group(0, 25, 580, 345, "about");
1147 o->hide();
1148 o->begin();
1149 {fltk::TextDisplay* o = new fltk::TextDisplay(5, 5, 570, 335);
1150 o->textfont(fltk::COURIER);
1151 fltk::Group::current()->resizable(o);
1152 load_text(o,ROOT_DATA_DIR"doc/README");
1154 o->end();
1156 o->end();
1158 o->end();
1159 o->size_range(580,370);
1160 o->resizable(o);
1162 {fltk::Window* o = action_window = new fltk::Window(100, 130, "menu");
1163 o->shortcut(0xff1b);
1164 o->callback((fltk::Callback*)cb_action_window, (void*)(this));
1165 o->begin();
1166 {fltk::Button* o = new fltk::Button(5, 5, 90, 20, "new");
1167 o->callback((fltk::Callback*)cb_new1);
1169 {fltk::Button* o = new fltk::Button(5, 25, 90, 20, "save");
1170 o->callback((fltk::Callback*)cb_save);
1172 {fltk::Button* o = new fltk::Button(5, 45, 90, 20, "save as");
1173 o->callback((fltk::Callback*)cb_save1);
1175 {fltk::Button* o = new fltk::Button(5, 65, 90, 20, "load");
1176 o->callback((fltk::Callback*)cb_load);
1178 {fltk::Button* o = new fltk::Button(5, 85, 90, 20, "import");
1179 o->callback((fltk::Callback*)cb_import);
1181 {fltk::Button* o = new fltk::Button(5, 105, 90, 20, "export");
1182 o->callback((fltk::Callback*)cb_export);
1184 o->end();
1186 {fltk::Window* o = scope_window = new fltk::Window(425, 280, "scope");
1187 w = o;
1188 o->shortcut(0xff1b);
1189 o->callback((fltk::Callback*)cb_scope_window, (void*)(this));
1190 o->begin();
1191 {fltk::TextDisplay* o = scope = new fltk::TextDisplay(5, 5, 415, 245);
1192 o->textfont(fltk::COURIER);
1193 o->color((fltk::Color)0x280000);
1194 o->textcolor((fltk::Color)0xff0000);
1195 fltk::Group::current()->resizable(o);
1196 o->wrap_mode(1);
1198 {fltk::Group* o = new fltk::Group(5, 255, 415, 20);
1199 o->begin();
1200 {fltk::Button* o = new fltk::Button(0, 0, 40, 20, "on");
1201 o->callback((fltk::Callback*)cb_on);
1202 o->type(fltk::Button::TOGGLE);
1204 {fltk::InvisibleBox* o = new fltk::InvisibleBox(45, 0, 95, 20);
1205 fltk::Group::current()->resizable(o);
1207 o->end();
1209 o->end();
1211 loop_toggle->image(fltk::SharedImage::get(ROOT_DATA_DIR"gfx/loop.gif"));
1212 conf_button->image(fltk::SharedImage::get(ROOT_DATA_DIR"gfx/conf.gif"));
1213 scope_button->image(fltk::SharedImage::get(ROOT_DATA_DIR"gfx/scope.gif"));
1214 file_button->image(fltk::SharedImage::get(ROOT_DATA_DIR"gfx/file.gif"));
1215 help_button->image(fltk::SharedImage::get(ROOT_DATA_DIR"gfx/help.gif"));
1217 edit_button->image(fltk::SharedImage::get(ROOT_DATA_DIR"gfx/edit.gif"));
1218 color_button->image(fltk::SharedImage::get(ROOT_DATA_DIR"gfx/color.gif"));
1219 unclone_button->image(fltk::SharedImage::get(ROOT_DATA_DIR"gfx/fork.gif"));
1220 split_button->image(fltk::SharedImage::get(ROOT_DATA_DIR"gfx/split.gif"));
1221 join_button->image(fltk::SharedImage::get(ROOT_DATA_DIR"gfx/join.gif"));
1223 qbutton4->image(fltk::SharedImage::get(ROOT_DATA_DIR"gfx/q4.gif"));
1224 qbutton8->image(fltk::SharedImage::get(ROOT_DATA_DIR"gfx/q8.gif"));
1225 qbutton16->image(fltk::SharedImage::get(ROOT_DATA_DIR"gfx/q16.gif"));
1226 qbutton32->image(fltk::SharedImage::get(ROOT_DATA_DIR"gfx/q32.gif"));
1227 qbutton64->image(fltk::SharedImage::get(ROOT_DATA_DIR"gfx/q64.gif"));
1228 qbutton128->image(fltk::SharedImage::get(ROOT_DATA_DIR"gfx/q128.gif"));
1229 qbutton0->image(fltk::SharedImage::get(ROOT_DATA_DIR"gfx/q0.gif"));
1230 track_info->set_rec(0);
1231 start_monitor();
1232 main_window->show();