diff options
| author | Matthias Melcher <fltk@matthiasm.com> | 2018-03-26 21:28:18 +0000 |
|---|---|---|
| committer | Matthias Melcher <fltk@matthiasm.com> | 2018-03-26 21:28:18 +0000 |
| commit | 3b7e1a5ec69d606488f5adf5ca15bf9baf67818f (patch) | |
| tree | 938156a6055f58590e6d77e5f0a6adcd90ac99fc /ide/AndroidStudio3/app/src/main/cpp/HelloAndroid.cxx | |
| parent | 5040bbff1f11f83baa424021b4c75ad7a6e053f8 (diff) | |
Android: Draws Fl_Bitmap.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12807 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 | 43 |
1 files changed, 40 insertions, 3 deletions
diff --git a/ide/AndroidStudio3/app/src/main/cpp/HelloAndroid.cxx b/ide/AndroidStudio3/app/src/main/cpp/HelloAndroid.cxx index 6d7c055f2..e0623f172 100644 --- a/ide/AndroidStudio3/app/src/main/cpp/HelloAndroid.cxx +++ b/ide/AndroidStudio3/app/src/main/cpp/HelloAndroid.cxx @@ -89,7 +89,44 @@ int main(int argc, char **argv) #elif 1 +#include <stdlib.h> +#include <FL/Fl.H> +#include <FL/Fl_Double_Window.H> +#include <FL/Fl_Adjuster.H> +#include <FL/Fl_Box.H> + +void adjcb(Fl_Widget *o, void *v) { + Fl_Adjuster *a = (Fl_Adjuster*)o; + Fl_Box *b = (Fl_Box *)v; + a->format((char *)(b->label())); + b->redraw(); +} + +int main(int argc, char ** argv) { + Fl_Double_Window window(320,100,argv[0]); + + char buf1[100]; + Fl_Box b1(FL_DOWN_BOX,20,30,80,25,buf1); + b1.color(FL_WHITE); + Fl_Adjuster a1(20+80,30,3*25,25); + a1.callback(adjcb,&b1); + adjcb(&a1,&b1); + + char buf2[100]; + Fl_Box b2(FL_DOWN_BOX,20+80+4*25,30,80,25,buf2); + b2.color(FL_WHITE); + Fl_Adjuster a2(b2.x()+b2.w(),10,25,3*25); + a2.callback(adjcb,&b2); + adjcb(&a2,&b2); + + window.resizable(window); + window.end(); + window.show(argc, argv); + return Fl::run(); +} + +#elif 0 #include <FL/Fl.H> @@ -411,7 +448,7 @@ int xmain(int argc, char **argv) test/CubeMain.cxx test/line_style.cxx test/CubeView.cxx test/list_visuals.cxx - * test/adjuster.cxx : - missing bitmap drawing + * test/adjuster.cxx : + 'adjuster' works test/mandelbrot.cxx test/animated.cxx test/menubar.cxx * test/arc.cxx : + 'arc' works as expected @@ -420,7 +457,7 @@ test/ask.cxx * test/minimum.cxx : + 'minimum' works test/bitmap.cxx test/native-filechooser.cxx test/blocks.cxx test/navigation.cxx - * test/boxtype.cxx : + 'boxtype': works + * test/boxtype.cxx : + 'boxtype' works test/offscreen.cxx test/browser.cxx test/output.cxx test/button.cxx test/overlay.cxx @@ -456,6 +493,6 @@ test/image.cxx test/unittest_viewport.cxx test/input.cxx test/unittests.cxx test/input_choice.cxx test/utf8.cxx test/keyboard.cxx test/windowfocus.cxx - * test/label.cxx : - pixmap, keyboard events + * test/label.cxx : - pixmap */
\ No newline at end of file |
