void Fl_MIDIKeyboard::hscrollbar_cb(Fl_Widget* w, void*) { // called only if MKB_HORIZONTAL Fl_MIDIKeyboard* mk = (Fl_MIDIKeyboard*)(w->parent()); Fl_Scrollbar* scbar = (Fl_Scrollbar*)w; mk->position((int)(scbar->value()), mk->yposition()); // do the scrolling mk->visible_keys(); // set the visible keys range }
void Fl_MIDIKeyboard::scrollbar_cb(Fl_Widget* w, void*) { // called only if MKB_VERTICAL Fl_MIDIKeyboard* mk = (Fl_MIDIKeyboard*)(w->parent()); Fl_Scrollbar* scbar = (Fl_Scrollbar*)w; mk->position(mk->xposition(), (int)(scbar->value())); // as above mk->visible_keys(); }
static void scroll_cb(Fl_Widget* w, void*) { Fl_Scrollbar *s = (Fl_Scrollbar*)w; EDE_Browser *b = (EDE_Browser*)w->parent(); b->hposition(s->value()); }