C A Cool Simple Month Calendar using FLTK in C language ?

Hello,

I would like to learn FLTK further in C language. Would you eventually know a possible link or idea of code in this direction.
Note that 1.3 is fine and new, but 1.1 is classic and stable without too much changes.

It would fine if 1.1 would be there also.

Thank you and yours sincerely



The usual first code :
Code:
// g++ -lfltk -lXext -lX11 -lm  mycode.cxx 
#include <stdlib.h>
#include <stdio.h>
#include <FL/Fl.H>
#include <FL/Fl_Window.H>
#include <FL/Fl_Button.H>
#include <FL/fl_ask.H>

void mupdfcb(Fl_Widget *, void *) {
  system( " screen -d -m mupdf doc.pdf "  );
  fflush(stdout);
}

void beepcb(Fl_Widget *, void *) {
  fl_beep();
  fflush(stdout);
}


void exitcb(Fl_Widget *, void *) {
  exit(0);
}

// test Fl::add_fd()...
void stdin_cb(int, void*) {
  char buf[1000];
  fgets(buf, sizeof(buf), stdin);
  printf("stdin callback\n");
}


int main(int argc, char ** argv)
{
  Fl_Window *window = new Fl_Window(320,180);
  Fl_Button *b1 =     new Fl_Button(20, 20, 80, 125, "&Beep");
  b1->callback(beepcb,0);
  Fl_Button *b2 =     new Fl_Button(120,20, 80, 125, "&PDF");
  b2->callback(mupdfcb,0);

  Fl_Button *b3 =     new Fl_Button(220,20, 80, 125, "E&xit");

  b3->callback(exitcb,0);
  window->end();
  window->show(argc,argv);

  Fl::add_fd(0, stdin_cb);

  return Fl::run();
}
 
I have to say I'd never heard of it till you just mentioned it.
Their web page is a mess of colours, I hope their SDK is better...

Anyway, try github by doing a search:
 
Back
Top