diff options
| author | Albrecht Schlosser <albrechts.fltk@online.de> | 2021-12-04 20:36:11 +0100 |
|---|---|---|
| committer | Albrecht Schlosser <albrechts.fltk@online.de> | 2021-12-04 20:36:11 +0100 |
| commit | a0724ab7c4fedbd037d5b72332ae47fde8584dff (patch) | |
| tree | 2c2c37ac226d7b26d2c050fc62af12aa0f9efe68 /src/fl_ask.cxx | |
| parent | 130f864d1d3f02f854a5f4085a49318a03a8eea0 (diff) | |
Add fl_message_icon_label() function (STR #2762)
This message icon label (usually one character) will be used in the
next call of one of the common dialogs.
test/ask.cxx: use fl_message_icon_label()
Diffstat (limited to 'src/fl_ask.cxx')
| -rw-r--r-- | src/fl_ask.cxx | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/fl_ask.cxx b/src/fl_ask.cxx index a4e44ffc3..95031753e 100644 --- a/src/fl_ask.cxx +++ b/src/fl_ask.cxx @@ -560,4 +560,28 @@ void fl_message_title_default(const char *title) { Fl_Message::message_title_default(title); } +/** Sets the icon label of the dialog window used in many common dialogs. + + This icon label 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 label \p str is stored internally as a reference, it must be + in scope until the dialog function (e.g. fl_choice) is called. + + It applies only to the \b next call of one of the common dialogs and + will be reset after that call so the next dialog will use its default + label unless set again. + + \note This label string must be short, usually only one character so + it fits in the icon box. You can use any valid UTF-8 character, e.g. + the Euro sign ("€") which is three bytes in UTF-8 encoding. + + \code #include <FL/fl_ask.H> \endcode + \param[in] str icon label +*/ +void fl_message_icon_label(const char *str) { + Fl_Message::icon_label(str); +} + /** @} */ |
