diff options
| author | Albrecht Schlosser <albrechts.fltk@online.de> | 2011-02-12 12:08:52 +0000 |
|---|---|---|
| committer | Albrecht Schlosser <albrechts.fltk@online.de> | 2011-02-12 12:08:52 +0000 |
| commit | 3bb11b999318d90632d1d9a412f7c04df1aa86d3 (patch) | |
| tree | 69a0845d90e28d96ea3f9a86a81521e5856cd852 /src | |
| parent | f8c0dd01101139c7b79e02d33c2e7dad5219056c (diff) | |
Common dialogs like fl_message() and fl_ask() can now have a window
title (STR #2562).
Added a test case for disabling the hotspot and using a window title
to test/ask.cxx.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8417 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src')
| -rw-r--r-- | src/fl_ask.cxx | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/fl_ask.cxx b/src/fl_ask.cxx index b6e065daa..133eac2be 100644 --- a/src/fl_ask.cxx +++ b/src/fl_ask.cxx @@ -244,6 +244,7 @@ static int innards(const char* fmt, va_list ap, if (g) // regrab the previous popup menu, if there was one Fl::grab(g); icon->label(prev_icon_label); + message_form->label(0); // reset window title avoidRecursion = 0; return ret_val; @@ -508,6 +509,26 @@ int fl_message_hotspot(void) { return enableHotspot; } +/** Sets the title of the dialog window used in many common dialogs. + + This window \p title will be used in the next call of one of the + common dialogs like fl_message(), fl_alert(), fl_ask(), fl_choice(), + fl_input(), fl_password(). + + The \p title string is copied internally, so that you can use a + local variable or free the string immediately after this call. It + applies only to the \b next call of one of the common dialogs and + will be reset to an empty title (the default for all dialogs) after + that call. + + \note \#include <FL/fl_ask.H> + \param[in] title window label, string copied internally +*/ +void fl_message_title(const char *title) { + makeform(); + message_form->copy_label(title); +} + /** @} */ // |
