diff options
Diffstat (limited to 'test/image.cxx')
| -rw-r--r-- | test/image.cxx | 31 |
1 files changed, 21 insertions, 10 deletions
diff --git a/test/image.cxx b/test/image.cxx index 565353cdb..fe70b73cd 100644 --- a/test/image.cxx +++ b/test/image.cxx @@ -1,5 +1,5 @@ // -// "$Id: image.cxx,v 1.6.2.3.2.2 2001/11/18 20:52:28 easysw Exp $" +// "$Id: image.cxx,v 1.6.2.3.2.3 2001/11/19 01:06:45 easysw Exp $" // // Fl_Image test program for the Fast Light Tool Kit (FLTK). // @@ -61,7 +61,7 @@ void make_image() { #include <FL/Fl_Toggle_Button.H> -Fl_Toggle_Button *leftb,*rightb,*topb,*bottomb,*insideb,*overb; +Fl_Toggle_Button *leftb,*rightb,*topb,*bottomb,*insideb,*overb,*inactb; Fl_Button *b; Fl_Window *w; @@ -74,6 +74,8 @@ void button_cb(Fl_Widget *,void *) { if (insideb->value()) i |= FL_ALIGN_INSIDE; if (overb->value()) i |= FL_ALIGN_TEXT_OVER_IMAGE; b->align(i); + if (inactb->value()) b->deactivate(); + else b->activate(); w->redraw(); } @@ -124,19 +126,28 @@ int main(int argc, char **argv) { window.color(FL_WHITE); Fl_Button b(140,160,120,120,"Image w/Alpha"); ::b = &b; make_image(); - b.image(new Fl_RGB_Image(image, width, height,4)); - leftb = new Fl_Toggle_Button(25,75,50,25,"left"); + Fl_RGB_Image *rgb = new Fl_RGB_Image(image, width, height,4); + Fl_RGB_Image *dergb; + dergb = (Fl_RGB_Image *)rgb->copy(); + dergb->inactive(); + + b.image(rgb); + b.deimage(dergb); + + leftb = new Fl_Toggle_Button(25,50,50,25,"left"); leftb->callback(button_cb); - rightb = new Fl_Toggle_Button(75,75,50,25,"right"); + rightb = new Fl_Toggle_Button(75,50,50,25,"right"); rightb->callback(button_cb); - topb = new Fl_Toggle_Button(125,75,50,25,"top"); + topb = new Fl_Toggle_Button(125,50,50,25,"top"); topb->callback(button_cb); - bottomb = new Fl_Toggle_Button(175,75,50,25,"bottom"); + bottomb = new Fl_Toggle_Button(175,50,50,25,"bottom"); bottomb->callback(button_cb); - insideb = new Fl_Toggle_Button(225,75,50,25,"inside"); + insideb = new Fl_Toggle_Button(225,50,50,25,"inside"); insideb->callback(button_cb); - overb = new Fl_Toggle_Button(275,75,100,25,"text over"); + overb = new Fl_Toggle_Button(25,75,100,25,"text over"); overb->callback(button_cb); + inactb = new Fl_Toggle_Button(125,75,100,25,"inactive"); + inactb->callback(button_cb); window.resizable(window); window.end(); window.show(argc, argv); @@ -144,5 +155,5 @@ int main(int argc, char **argv) { } // -// End of "$Id: image.cxx,v 1.6.2.3.2.2 2001/11/18 20:52:28 easysw Exp $". +// End of "$Id: image.cxx,v 1.6.2.3.2.3 2001/11/19 01:06:45 easysw Exp $". // |
