1 //
2 // "$Id: fl_ask.H 8441 2011-02-18 08:52:48Z AlbrechtS $"
3 //
4 // Standard dialog header file for the Fast Light Tool Kit (FLTK).
5 //
6 // Copyright 1998-2011 by Bill Spitzak and others.
7 //
8 // This library is free software; you can redistribute it and/or
9 // modify it under the terms of the GNU Library General Public
10 // License as published by the Free Software Foundation; either
11 // version 2 of the License, or (at your option) any later version.
12 //
13 // This library is distributed in the hope that it will be useful,
14 // but WITHOUT ANY WARRANTY; without even the implied warranty of
15 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
16 // Library General Public License for more details.
17 //
18 // You should have received a copy of the GNU Library General Public
19 // License along with this library; if not, write to the Free Software
20 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
21 // USA.
22 //
23 // Please report all bugs and problems on the following page:
24 //
25 //     http://www.fltk.org/str.php
26 //
27 
28 #ifndef fl_ask_H
29 #  define fl_ask_H
30 
31 #  include "Enumerations.H"
32 
33 class Fl_Widget;
34 /** Different system beeps available. \relatesalso fl_beep(int) */
35 enum {
36   FL_BEEP_DEFAULT = 0,
37   FL_BEEP_MESSAGE,
38   FL_BEEP_ERROR,
39   FL_BEEP_QUESTION,
40   FL_BEEP_PASSWORD,
41   FL_BEEP_NOTIFICATION
42 };
43 
44 #  ifdef __GNUC__
45 #    define __fl_attr(x) __attribute__ (x)
46 #  else
47 #    define __fl_attr(x)
48 #  endif // __GNUC__
49 
50 FL_EXPORT void fl_beep(int type = FL_BEEP_DEFAULT);
51 FL_EXPORT void fl_message(const char *,...) __fl_attr((__format__ (__printf__, 1, 2)));
52 FL_EXPORT void fl_alert(const char *,...) __fl_attr((__format__ (__printf__, 1, 2)));
53 // fl_ask() is deprecated since it uses "Yes" and "No" for the buttons,
54 // which does not conform to the current FLTK Human Interface Guidelines.
55 // Use fl_choice() instead with the appropriate verbs instead.
56 FL_EXPORT int fl_ask(const char *,...) __fl_attr((__format__ (__printf__, 1, 2), __deprecated__));
57 FL_EXPORT int fl_choice(const char *q,const char *b0,const char *b1,const char *b2,...) __fl_attr((__format__ (__printf__, 1, 5)));
58 FL_EXPORT const char *fl_input(const char *label, const char *deflt = 0, ...) __fl_attr((__format__ (__printf__, 1, 3)));
59 FL_EXPORT const char *fl_password(const char *label, const char *deflt = 0, ...) __fl_attr((__format__ (__printf__, 1, 3)));
60 
61 FL_EXPORT Fl_Widget *fl_message_icon();
62 extern FL_EXPORT Fl_Font fl_message_font_;
63 extern FL_EXPORT Fl_Fontsize fl_message_size_;
fl_message_font(Fl_Font f,Fl_Fontsize s)64 inline void fl_message_font(Fl_Font f, Fl_Fontsize s) {
65   fl_message_font_ = f; fl_message_size_ = s;}
66 
67 FL_EXPORT void fl_message_hotspot(int enable);
68 FL_EXPORT int fl_message_hotspot(void);
69 
70 FL_EXPORT void fl_message_title(const char *title);
71 FL_EXPORT void fl_message_title_default(const char *title);
72 
73 // pointers you can use to change FLTK to a foreign language:
74 extern FL_EXPORT const char* fl_no;
75 extern FL_EXPORT const char* fl_yes;
76 extern FL_EXPORT const char* fl_ok;
77 extern FL_EXPORT const char* fl_cancel;
78 extern FL_EXPORT const char* fl_close;
79 #endif // !fl_ask_H
80 
81 //
82 // End of "$Id: fl_ask.H 8441 2011-02-18 08:52:48Z AlbrechtS $".
83 //
84