add main.cpp
Signed-off-by: Zengtudor <zengtudor@outlook.com>
This commit is contained in:
parent
bf31b0877d
commit
0865e294fc
27
src/main.cpp
Normal file
27
src/main.cpp
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
#include<FL/Fl.H>
|
||||||
|
#include<FL/Fl_Window.H>
|
||||||
|
#include<FL/Fl_Box.H>
|
||||||
|
#include<FL/Fl_Button.H>
|
||||||
|
#include<FL/fl_ask.H>
|
||||||
|
|
||||||
|
#include<bits/stdc++.h>
|
||||||
|
using namespace std;
|
||||||
|
|
||||||
|
int main(int argc,char *argv[]){
|
||||||
|
auto window = make_unique<Fl_Window>(500,300);
|
||||||
|
auto box = make_unique<Fl_Box>(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<Fl_Button>(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();
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user