From 8c32c708a9ad32970f332d2c8863edba1071bec8 Mon Sep 17 00:00:00 2001 From: Greg Ercolano Date: Wed, 18 Apr 2018 18:28:46 +0000 Subject: Clarified the fl_choice ordering in first example with an image and arrows, as it's not clear in the text how the code order is reversed on-screen. Also, the whole 'three musketeers' thing with the case values not matching the numeric button names has always been confusing: case 0: .. // One case 1: .. // Two (default) case 2: .. // Three Changed that so it's a Zero/One/Two example instead. case 0: .. // "Zero" case 1: .. // "One" (default) case 2: .. // "Two" git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12853 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- src/fl_ask.cxx | 26 ++++++++------------------ 1 file changed, 8 insertions(+), 18 deletions(-) (limited to 'src') diff --git a/src/fl_ask.cxx b/src/fl_ask.cxx index 09ff328cb..0eeb33660 100644 --- a/src/fl_ask.cxx +++ b/src/fl_ask.cxx @@ -363,19 +363,9 @@ int fl_ask(const char *fmt, ...) { /** Shows a dialog displaying the printf style \p fmt message, this dialog features up to 3 customizable choice buttons - which are specified in *right-to-left* order, e.g. - \code - // - // ______________________________________________ - // | ___ | - // | | ? | Message text.. | - // | |___| | - // | [Left] [Middle] [Right] | - // |______________________________________________| - // - // - fl_choice("Message text..", "Right", "Middle", "Left"); - \endcode + which are specified in order of *right-to-left* in the dialog, e.g. + \image html fl_choice_left_middle_right.png + \image latex fl_choice_left_middle_right.png "fl_choice() button ordering" width=4cm \note Common dialog boxes are application modal. No more than one common dialog box can be open at any time. Requests for additional dialog boxes are ignored. @@ -398,11 +388,11 @@ int fl_ask(const char *fmt, ...) { \image html fl_choice_three.png \image latex fl_choice_three.png "fl_choice() three choices" width=4cm \code - switch ( fl_choice("How many musketeers?", "One", "Two", "Three") ) { - case 0: .. // One - case 1: .. // Two (default) - case 2: .. // Three - } + switch ( fl_choice("How many bedrooms?", "Zero", "One", "Two") ) { + case 0: .. // "Zero" + case 1: .. // "One" (default) + case 2: .. // "Two" + } \endcode Two choice example: -- cgit v1.2.3