I've done some tutorials and can get some things to print when I press a button but I cannot figure out how to store a value that is inserted into an input widget buy the user into a variable for me to use. I'm new to C++ and FLTK so I'm not sure if there's a simple thing like a Java Scanner to use. I'm assuming you would use something like var=input-value();
but I don't know how to use it within the callbacks since they only take certain parameters. Such as:
Fl_Button *butts[2];
static void Button_cb(Fl_Widget * w, void* data){
Fl_Button *b = (Fl_Button*)w;
fprintf(stderr, "Button '%s' was %s\n", b->label(), b->value() ? "Pushed" : "Released");
}
I can't just replace the print line for it to work. None of the tutorials I found and went through explained this.