update
This commit is contained in:
parent
b1fd25f35f
commit
264f81453c
10
src/main.cpp
10
src/main.cpp
@ -3,19 +3,17 @@
|
|||||||
#include<FL/Fl_Box.H>
|
#include<FL/Fl_Box.H>
|
||||||
#include<FL/Fl_Button.H>
|
#include<FL/Fl_Button.H>
|
||||||
#include<FL/fl_ask.H>
|
#include<FL/fl_ask.H>
|
||||||
|
#include <memory>
|
||||||
#include<bits/stdc++.h>
|
|
||||||
using namespace std;
|
|
||||||
|
|
||||||
int main(int argc,char *argv[]){
|
int main(int argc,char *argv[]){
|
||||||
auto window = make_unique<Fl_Window>(500,300);
|
auto window = std::make_unique<Fl_Window>(500,300);
|
||||||
auto box = make_unique<Fl_Box>(20,40,260,100,"Hello world");
|
auto box = std::make_unique<Fl_Box>(20,40,260,100,"Hello world");
|
||||||
box->box(FL_UP_BOX);
|
box->box(FL_UP_BOX);
|
||||||
box->labelsize(20);
|
box->labelsize(20);
|
||||||
box->labelfont(FL_BOLD+FL_ITALIC);
|
box->labelfont(FL_BOLD+FL_ITALIC);
|
||||||
box->labeltype(FL_SHADOW_LABEL);
|
box->labeltype(FL_SHADOW_LABEL);
|
||||||
|
|
||||||
auto btn = make_unique<Fl_Button>(20,200,100,50,"btn");
|
auto btn = std::make_unique<Fl_Button>(20,200,100,50,"btn");
|
||||||
btn->callback((Fl_Callback*)[](Fl_Widget *w,void *v)->void{
|
btn->callback((Fl_Callback*)[](Fl_Widget *w,void *v)->void{
|
||||||
fl_alert("btn callback");
|
fl_alert("btn callback");
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user