diff options
Diffstat (limited to 'ide/AndroidStudio3')
| -rw-r--r-- | ide/AndroidStudio3/app/src/main/cpp/CMakeLists.txt | 2 | ||||
| -rw-r--r-- | ide/AndroidStudio3/app/src/main/cpp/HelloAndroid.cxx | 18 |
2 files changed, 6 insertions, 14 deletions
diff --git a/ide/AndroidStudio3/app/src/main/cpp/CMakeLists.txt b/ide/AndroidStudio3/app/src/main/cpp/CMakeLists.txt index c7530ae38..c9f4fab48 100644 --- a/ide/AndroidStudio3/app/src/main/cpp/CMakeLists.txt +++ b/ide/AndroidStudio3/app/src/main/cpp/CMakeLists.txt @@ -17,6 +17,8 @@ cmake_minimum_required(VERSION 3.4.1) set(FLTK_DIR ../../../../../..) +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") + # FIXME: add as a second argument the binary build dir # so that the first argument can link directly to FLTK diff --git a/ide/AndroidStudio3/app/src/main/cpp/HelloAndroid.cxx b/ide/AndroidStudio3/app/src/main/cpp/HelloAndroid.cxx index 207a78817..02b563517 100644 --- a/ide/AndroidStudio3/app/src/main/cpp/HelloAndroid.cxx +++ b/ide/AndroidStudio3/app/src/main/cpp/HelloAndroid.cxx @@ -22,7 +22,7 @@ #include <FL/fl_draw.H> -Fl_Window *win, *win2, *win3; +Fl_Window *win; Fl_Button *btn; @@ -31,30 +31,20 @@ class MyButton : public Fl_Button public: MyButton(int x, int y, int w, int h, const char *l) : Fl_Button(x, y, w, h, l) { } void draw() { - fl_push_clip(x(), y(), w()*2/3, h()*2/3); + //fl_push_clip(x(), y(), w()*2/3, h()*2/3); Fl_Button::draw(); - fl_pop_clip(); + //fl_pop_clip(); } }; int main(int argc, char **argv) { - win2 = new Fl_Window(100, 50, 150, 200, "on bottom"); - win2->color(FL_BLUE); - win2->end(); - win2->show(); - win = new Fl_Window(50, 150, 500, 400, "Hallo"); btn = new MyButton((win->w()-280)/2, 200, 280, 35, "Hello, Android!"); btn->color(FL_LIGHT2); win->show(argc, argv); -/* - win3 = new Fl_Window(300, 50, 150, 200, "on top"); - win3->color(FL_RED); - win3->end(); - win3->show(); -*/ + Fl::run(); return 0; |
