diff --git a/src/main.cpp b/src/main.cpp new file mode 100644 index 0000000..e9bb938 --- /dev/null +++ b/src/main.cpp @@ -0,0 +1,27 @@ +#include +#include +#include +#include +#include + +#include +using namespace std; + +int main(int argc,char *argv[]){ + auto window = make_unique(500,300); + auto box = make_unique(20,40,260,100,"Hello world"); + box->box(FL_UP_BOX); + box->labelsize(20); + box->labelfont(FL_BOLD+FL_ITALIC); + box->labeltype(FL_SHADOW_LABEL); + + auto btn = make_unique(20,200,100,50,"btn"); + btn->callback((Fl_Callback*)[](Fl_Widget *w,void *v)->void{ + fl_alert("btn callback"); + }); + + window->end(); + window->show(argc,argv); + + return Fl::run(); +} \ No newline at end of file