summaryrefslogtreecommitdiff
path: root/src/fl_ask.cxx
diff options
context:
space:
mode:
authorGreg Ercolano <erco@seriss.com>2018-04-18 09:52:00 +0000
committerGreg Ercolano <erco@seriss.com>2018-04-18 09:52:00 +0000
commit6ada3601743366ca88b239fc23a10ccad08d75e8 (patch)
treea677e80a58cfdc83bd4f055f0af6901bb1fbdcc4 /src/fl_ask.cxx
parent2bae646a3c7c562f0e47b84de2f6406e59df6bc0 (diff)
Docs for fl_choice() clarify argument order, added missing image for one of the examples.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12847 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/fl_ask.cxx')
-rw-r--r--src/fl_ask.cxx27
1 files changed, 21 insertions, 6 deletions
diff --git a/src/fl_ask.cxx b/src/fl_ask.cxx
index be23217f7..09ff328cb 100644
--- a/src/fl_ask.cxx
+++ b/src/fl_ask.cxx
@@ -363,12 +363,27 @@ 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
\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.
\note \#include <FL/fl_ask.H>
Three choices with printf() style formatting:
+ \image html fl_choice_three_fmt.png
+ \image latex fl_choice_three_fmt.png "fl_choice() three choices with printf formatting" width=4cm
\code
int num_msgs = GetNumberOfMessages();
switch ( fl_choice("What to do with %d messages?", "Send", "Save", "Delete", num_msgs) ) {
@@ -408,12 +423,12 @@ int fl_ask(const char *fmt, ...) {
\endcode
\param[in] fmt can be used as an sprintf-like format and variables for the message text
- \param[in] b0 text label of button 0
- \param[in] b1 text label of button 1 (can be 0)
- \param[in] b2 text label of button 2 (can be 0)
- \retval 0 if the first button with \p b0 text is pushed or another dialog box is still open
- \retval 1 if the second button with \p b1 text is pushed
- \retval 2 if the third button with \p b2 text is pushed
+ \param[in] b0 text label for right button 0
+ \param[in] b1 text label for middle button 1 (can be 0)
+ \param[in] b2 text label for left button 2 (can be 0)
+ \retval 0 if the button with \p b0 text is pushed or another dialog box is still open
+ \retval 1 if the button with \p b1 text is pushed
+ \retval 2 if the button with \p b2 text is pushed
*/
int fl_choice(const char*fmt,const char *b0,const char *b1,const char *b2,...){