> Urgh - that's irritating.
>
> I just saw my own post, and it looks like the mail server has mangled it
> somewhat.
>
> I thought that only happened when I was using MS Outlook, not with Apple
> Mail, but apparently Apple Mail gets mangled now too. Oh well...
>
> Is this any better (re-posting, sorry!)
>
>
> // demo of activating a button...
>
> #include <FL/Fl.H>
> #include <FL/Fl_Double_Window.H>
> #include <FL/Fl_Input.H>
> #include <FL/Fl_Button.H>
>
> static Fl_Double_Window *main_win=(Fl_Double_Window *)0;
> static Fl_Button *done_bt=(Fl_Button *)0;
>
> static unsigned inputs_set = 0;
>
> static void check_inputs_are_ready(Fl_Input* in, unsigned mask) {
> if (strlen(in->value())) {
> inputs_set |= mask;
> }
> else {
> inputs_set &= ~mask;
> }
>
> if (inputs_set == 7) {
> done_bt->activate();
> }
> else {
> done_bt->deactivate();
> }
> }
>
> static void cb_input1(Fl_Input* in, void*) {
> // input 1;
> check_inputs_are_ready(in, 1);
> }
>
> static void cb_input2(Fl_Input* in, void*) {
> // input 2;
> check_inputs_are_ready(in, 2);
> }
>
> static void cb_input3(Fl_Input* in, void*) {
> // input 3;
> check_inputs_are_ready(in, 4);
> }
>
> static void cb_done_bt(Fl_Button*, void*) {
> main_win->hide();
> }
>
> int main(int argc, char **argv) {
> main_win = new Fl_Double_Window(348, 367, "Activate Button Demo");
> main_win->begin();
>
> Fl_Input *input1 = new Fl_Input(130, 37, 200, 33, "Enter Some Text");
> input1->callback((Fl_Callback*)cb_input1);
> input1->when(FL_WHEN_CHANGED);
>
> Fl_Input *input2 = new Fl_Input(130, 124, 200, 33, "Enter Some Text");
> input2->callback((Fl_Callback*)cb_input2);
> input2->when(FL_WHEN_CHANGED);
>
> Fl_Input *input3 = new Fl_Input(130, 212, 200, 33, "Enter Some Text");
> input3->callback((Fl_Callback*)cb_input3);
> input3->when(FL_WHEN_CHANGED);
>
> done_bt = new Fl_Button(215, 285, 115, 65, "Done");
> done_bt->callback((Fl_Callback*)cb_done_bt);
> done_bt->deactivate();
>
> main_win->end();
> main_win->show(argc, argv);
>
> return Fl::run();
> } // main
>
> // end of file
>
>
>
Very helpful Thanks :D
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk