diff options
| author | Michael R Sweet <michael.r.sweet@gmail.com> | 1998-11-05 16:04:53 +0000 |
|---|---|---|
| committer | Michael R Sweet <michael.r.sweet@gmail.com> | 1998-11-05 16:04:53 +0000 |
| commit | 80b1529ef4d69d9e34a48a419a018d7f4d64054b (patch) | |
| tree | 7c743dc2f7f17654f1535314f6b0e6c5eadfc21b /test | |
| parent | 60399e3945dcfe9a2bb9f00f794d9e8634dd6bd9 (diff) | |
Multiple patches from Bill:
- Double-buffered window fixes.
- Tabs fixes.
- X/WIN32 fixes.
- Fl_Input fixes.
- Support for vsnprintf and friends.
- Support for printf-style arguments in utility functions.
git-svn-id: file:///fltk/svn/fltk/trunk@52 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'test')
| -rw-r--r-- | test/message.cxx | 29 | ||||
| -rw-r--r-- | test/pixmap_browser.cxx | 6 |
2 files changed, 23 insertions, 12 deletions
diff --git a/test/message.cxx b/test/message.cxx index 4ddf864d3..177200a73 100644 --- a/test/message.cxx +++ b/test/message.cxx @@ -1,5 +1,5 @@ // -// "$Id: message.cxx,v 1.3 1998/10/21 14:21:35 mike Exp $" +// "$Id: message.cxx,v 1.4 1998/11/05 16:04:52 mike Exp $" // // Message test program for the Fast Light Tool Kit (FLTK). // @@ -29,19 +29,30 @@ #include <stdio.h> int main(int, char **) { - fl_message("Spelling check sucessfull."); - fl_alert("Quantum fluctuations in the space-time continuim detected."); + + fl_message("Spelling check sucessfull, %d errors found with %g%% confidence", + 1002, 100*(15/77.0)); + + fl_alert("Quantum fluctuations in the space-time continuim detected, " + "you have %g seconds to comply.", 10.0); + printf("fl_ask returned %d\n", - fl_ask("Do you really want to?")); + fl_ask("Do you really want to %s?", "continue")); + printf("fl_choice returned %d\n", fl_choice("Choose one of the following:","choice0","choice1","choice2")); - printf("fl_show_input returned \"%s\"\n", - fl_show_input("Please enter a string:", "this is the default value")); - printf("fl_password returned \"%s\"\n", - fl_password("Enter your password:")); + const char *r; + + r = fl_input("Please enter a string for '%s':", "this is the default value", + "testing"); + printf("fl_input returned \"%s\"\n", r ? r : "NULL"); + + r = fl_password("Enter %s's password:", 0, "somebody"); + printf("fl_password returned \"%s\"\n", r ? r : "NULL"); + return 0; } // -// End of "$Id: message.cxx,v 1.3 1998/10/21 14:21:35 mike Exp $". +// End of "$Id: message.cxx,v 1.4 1998/11/05 16:04:52 mike Exp $". // diff --git a/test/pixmap_browser.cxx b/test/pixmap_browser.cxx index 914d3936f..8399cfa48 100644 --- a/test/pixmap_browser.cxx +++ b/test/pixmap_browser.cxx @@ -1,5 +1,5 @@ // -// "$Id: pixmap_browser.cxx,v 1.3 1998/10/21 14:21:39 mike Exp $" +// "$Id: pixmap_browser.cxx,v 1.4 1998/11/05 16:04:53 mike Exp $" // // Another pixmap test program for the Fast Light Tool Kit (FLTK). // @@ -55,7 +55,7 @@ static int hexdigit(int x) { int load_file(const char *name) { FILE *f = fopen(name,"r"); if (!f) { - fl_show_message("Can't open",name,strerror(errno)); + fl_message("Can't open %s, %s",name,strerror(errno)); return 0; } if (data) { @@ -164,5 +164,5 @@ int main(int argc, char **argv) { } // -// End of "$Id: pixmap_browser.cxx,v 1.3 1998/10/21 14:21:39 mike Exp $". +// End of "$Id: pixmap_browser.cxx,v 1.4 1998/11/05 16:04:53 mike Exp $". // |
