summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGreg Ercolano <erco@seriss.com>2018-04-18 18:28:46 +0000
committerGreg Ercolano <erco@seriss.com>2018-04-18 18:28:46 +0000
commit8c32c708a9ad32970f332d2c8863edba1071bec8 (patch)
tree8afc3b7798805e03c8ec23a3fe641a2aff343549
parent71d23d5574f3f53f10ae50d20b8c67917547eeea (diff)
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
-rw-r--r--documentation/src/fl_choice_left_middle_right.pngbin0 -> 5004 bytes
-rw-r--r--src/fl_ask.cxx26
2 files changed, 8 insertions, 18 deletions
diff --git a/documentation/src/fl_choice_left_middle_right.png b/documentation/src/fl_choice_left_middle_right.png
new file mode 100644
index 000000000..1295a409e
--- /dev/null
+++ b/documentation/src/fl_choice_left_middle_right.png
Binary files differ
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: