FLTK 1.3.0
fl_ask.H
00001 //
00002 // "$Id: fl_ask.H 8441 2011-02-18 08:52:48Z AlbrechtS $"
00003 //
00004 // Standard dialog header file for the Fast Light Tool Kit (FLTK).
00005 //
00006 // Copyright 1998-2011 by Bill Spitzak and others.
00007 //
00008 // This library is free software; you can redistribute it and/or
00009 // modify it under the terms of the GNU Library General Public
00010 // License as published by the Free Software Foundation; either
00011 // version 2 of the License, or (at your option) any later version.
00012 //
00013 // This library is distributed in the hope that it will be useful,
00014 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00015 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00016 // Library General Public License for more details.
00017 //
00018 // You should have received a copy of the GNU Library General Public
00019 // License along with this library; if not, write to the Free Software
00020 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
00021 // USA.
00022 //
00023 // Please report all bugs and problems on the following page:
00024 //
00025 //     http://www.fltk.org/str.php
00026 //
00027 
00028 #ifndef fl_ask_H
00029 #  define fl_ask_H
00030 
00031 #  include "Enumerations.H"
00032 
00033 class Fl_Widget;
00035 enum {
00036   FL_BEEP_DEFAULT = 0,
00037   FL_BEEP_MESSAGE,
00038   FL_BEEP_ERROR,
00039   FL_BEEP_QUESTION,
00040   FL_BEEP_PASSWORD,
00041   FL_BEEP_NOTIFICATION
00042 };
00043 
00044 #  ifdef __GNUC__
00045 #    define __fl_attr(x) __attribute__ (x)
00046 #  else
00047 #    define __fl_attr(x)
00048 #  endif // __GNUC__
00049 
00050 FL_EXPORT void fl_beep(int type = FL_BEEP_DEFAULT);
00051 FL_EXPORT void fl_message(const char *,...) __fl_attr((__format__ (__printf__, 1, 2)));
00052 FL_EXPORT void fl_alert(const char *,...) __fl_attr((__format__ (__printf__, 1, 2)));
00053 // fl_ask() is deprecated since it uses "Yes" and "No" for the buttons,
00054 // which does not conform to the current FLTK Human Interface Guidelines.
00055 // Use fl_choice() instead with the appropriate verbs instead.
00056 FL_EXPORT int fl_ask(const char *,...) __fl_attr((__format__ (__printf__, 1, 2), __deprecated__));
00057 FL_EXPORT int fl_choice(const char *q,const char *b0,const char *b1,const char *b2,...) __fl_attr((__format__ (__printf__, 1, 5)));
00058 FL_EXPORT const char *fl_input(const char *label, const char *deflt = 0, ...) __fl_attr((__format__ (__printf__, 1, 3)));
00059 FL_EXPORT const char *fl_password(const char *label, const char *deflt = 0, ...) __fl_attr((__format__ (__printf__, 1, 3)));
00060 
00061 FL_EXPORT Fl_Widget *fl_message_icon();
00062 extern FL_EXPORT Fl_Font fl_message_font_;
00063 extern FL_EXPORT Fl_Fontsize fl_message_size_;
00064 inline void fl_message_font(Fl_Font f, Fl_Fontsize s) {
00065   fl_message_font_ = f; fl_message_size_ = s;}
00066 
00067 FL_EXPORT void fl_message_hotspot(int enable);
00068 FL_EXPORT int fl_message_hotspot(void);
00069 
00070 FL_EXPORT void fl_message_title(const char *title);
00071 FL_EXPORT void fl_message_title_default(const char *title);
00072 
00073 // pointers you can use to change FLTK to a foreign language:
00074 extern FL_EXPORT const char* fl_no;
00075 extern FL_EXPORT const char* fl_yes;
00076 extern FL_EXPORT const char* fl_ok;
00077 extern FL_EXPORT const char* fl_cancel;
00078 extern FL_EXPORT const char* fl_close;
00079 #endif // !fl_ask_H
00080 
00081 //
00082 // End of "$Id: fl_ask.H 8441 2011-02-18 08:52:48Z AlbrechtS $".
00083 //