Example #1
0
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
}
Example #2
0
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();
}
Example #3
0
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());
}