diff options
| author | Albrecht Schlosser <albrechts.fltk@online.de> | 2020-05-07 17:43:04 +0200 |
|---|---|---|
| committer | Albrecht Schlosser <albrechts.fltk@online.de> | 2020-05-07 17:43:04 +0200 |
| commit | 46253603de6ac40df5403efe1c059b33b89ee2e2 (patch) | |
| tree | e4772fec99560215a043622b4d2819e9ef96baef /FL/fl_ask.H | |
| parent | ee7577a89708370e424d90221cecf05c4b2ec121 (diff) | |
Extend fl_message_position() with 'center' option
Add argument 'center' to position the message box centered over
the given x/y coordinates.
Add another method to supply a widget or window to center the
message box over.
Fix documentation and don't use INT_MIN to avoid having to
include limits.h in user code.
Diffstat (limited to 'FL/fl_ask.H')
| -rw-r--r-- | FL/fl_ask.H | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/FL/fl_ask.H b/FL/fl_ask.H index 9fad23d8e..2a9f1b107 100644 --- a/FL/fl_ask.H +++ b/FL/fl_ask.H @@ -3,17 +3,17 @@ // // Standard dialog header file for the Fast Light Tool Kit (FLTK). // -// Copyright 1998-2011 by Bill Spitzak and others. +// Copyright 1998-2020 by Bill Spitzak and others. // // This library is free software. Distribution and use rights are outlined in // the file "COPYING" which should have been included with this file. If this // file is missing or damaged, see the license at: // -// http://www.fltk.org/COPYING.php +// https://www.fltk.org/COPYING.php // // Please report all bugs and problems on the following page: // -// http://www.fltk.org/str.php +// https://www.fltk.org/str.php // /** \file fl_ask.H @@ -65,8 +65,14 @@ inline void fl_message_font(Fl_Font f, Fl_Fontsize s) { FL_EXPORT void fl_message_hotspot(int enable); FL_EXPORT int fl_message_hotspot(void); -FL_EXPORT void fl_message_position(const int x = 0, const int y = 0); -FL_EXPORT void fl_message_position(int* x = 0, int* y = 0); +FL_EXPORT void fl_message_position(const int x, const int y, const int center = 0); +FL_EXPORT void fl_message_position(Fl_Widget *widget); +FL_EXPORT int fl_message_position(int *x = 0, int *y = 0); + +/** \see fl_message_position(Fl_Widget *widget). */ +inline void fl_message_position(Fl_Widget &widget) { + fl_message_position(&widget); +} FL_EXPORT void fl_message_title(const char *title); FL_EXPORT void fl_message_title_default(const char *title); |
