diff options
| author | Matthias Melcher <fltk@matthiasm.com> | 2018-03-14 21:46:01 +0000 |
|---|---|---|
| committer | Matthias Melcher <fltk@matthiasm.com> | 2018-03-14 21:46:01 +0000 |
| commit | 737d8bef2425d0373a8890b49f9b0babb7f994db (patch) | |
| tree | c8f001d89469dcc66831d4c3f633667910d950af /ide/AndroidStudio3/app/src/main/cpp/HelloAndroid.cxx | |
| parent | c023f26fb0fd5107d520c2170c975d27ab7260f9 (diff) | |
Android: adding stress test for complex clipping.
Complex clipping is needed to allow popup dialogs and menu window while
still correctly rendering windows that are "below" those popups.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12745 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'ide/AndroidStudio3/app/src/main/cpp/HelloAndroid.cxx')
| -rw-r--r-- | ide/AndroidStudio3/app/src/main/cpp/HelloAndroid.cxx | 32 |
1 files changed, 25 insertions, 7 deletions
diff --git a/ide/AndroidStudio3/app/src/main/cpp/HelloAndroid.cxx b/ide/AndroidStudio3/app/src/main/cpp/HelloAndroid.cxx index f22728c33..7e8d11b72 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; +Fl_Window *win, *win1, *win2; Fl_Button *btn, *btn2; @@ -52,21 +52,39 @@ void hello_cb(void*) Fl::remove_timeout(hello_cb, NULL); } -void start_timer(Fl_Widget*, void*) -{ - Fl::add_timeout(1.0, hello_cb, NULL); -} int main(int argc, char **argv) { + win1 = new Fl_Window(10, 10, 200, 200, "back"); + win1->color(FL_RED); + win1->box(FL_DOWN_BOX); + Fl_Button *b1 = new Fl_Button(10, 10, 180, 180, "back"); + win1->end(); + win1->show(); + win = new Fl_Window(50, 150, 500, 400, "Hallo"); - btn2 = new Fl_Button(10, 10, 50, 50, "-@circle;-"); + + btn2 = new Fl_Button(10, 10, 480, 100, "-@circle;-"); btn2->color(FL_BLUE); + btn = new MyButton((win->w()-280)/2, 200, 280, 35, "Hello, Android!"); btn->color(FL_LIGHT2); - btn->callback(start_timer); + btn->callback( + [](Fl_Widget*, void*) { + Fl::add_timeout(1.0, hello_cb, NULL); + } + ); + + win->end(); win->show(argc, argv); + win2 = new Fl_Window(390, 10, 200, 200, "front"); + win2->color(FL_BLUE); + win2->box(FL_UP_BOX); + Fl_Button *b2 = new Fl_Button(10, 10, 180, 180, "front"); + win2->end(); + win2->show(); + Fl::run(); return 0; |
