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
This commit is contained in:
parent
71d23d5574
commit
8c32c708a9
BIN
documentation/src/fl_choice_left_middle_right.png
Normal file
BIN
documentation/src/fl_choice_left_middle_right.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 4.9 KiB |
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user