FLTK 1.3.0
fl_ask.H
00001 //
00002 // "$Id$"
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. Distribution and use rights are outlined in
00009 // the file "COPYING" which should have been included with this file.  If this
00010 // file is missing or damaged, see the license at:
00011 //
00012 //     http://www.fltk.org/COPYING.php
00013 //
00014 // Please report all bugs and problems on the following page:
00015 //
00016 //     http://www.fltk.org/str.php
00017 //
00018 
00019 #ifndef fl_ask_H
00020 #  define fl_ask_H
00021 
00022 #  include "Enumerations.H"
00023 
00024 class Fl_Widget;
00026 enum {
00027   FL_BEEP_DEFAULT = 0,
00028   FL_BEEP_MESSAGE,
00029   FL_BEEP_ERROR,
00030   FL_BEEP_QUESTION,
00031   FL_BEEP_PASSWORD,
00032   FL_BEEP_NOTIFICATION
00033 };
00034 
00035 #  ifdef __GNUC__
00036 #    define __fl_attr(x) __attribute__ (x)
00037 #  else
00038 #    define __fl_attr(x)
00039 #  endif // __GNUC__
00040 
00041 FL_EXPORT void fl_beep(int type = FL_BEEP_DEFAULT);
00042 FL_EXPORT void fl_message(const char *,...) __fl_attr((__format__ (__printf__, 1, 2)));
00043 FL_EXPORT void fl_alert(const char *,...) __fl_attr((__format__ (__printf__, 1, 2)));
00044 // fl_ask() is deprecated since it uses "Yes" and "No" for the buttons,
00045 // which does not conform to the current FLTK Human Interface Guidelines.
00046 // Use fl_choice() instead with the appropriate verbs instead.
00047 FL_EXPORT int fl_ask(const char *,...) __fl_attr((__format__ (__printf__, 1, 2), __deprecated__));
00048 FL_EXPORT int fl_choice(const char *q,const char *b0,const char *b1,const char *b2,...) __fl_attr((__format__ (__printf__, 1, 5)));
00049 FL_EXPORT const char *fl_input(const char *label, const char *deflt = 0, ...) __fl_attr((__format__ (__printf__, 1, 3)));
00050 FL_EXPORT const char *fl_password(const char *label, const char *deflt = 0, ...) __fl_attr((__format__ (__printf__, 1, 3)));
00051 
00052 FL_EXPORT Fl_Widget *fl_message_icon();
00053 extern FL_EXPORT Fl_Font fl_message_font_;
00054 extern FL_EXPORT Fl_Fontsize fl_message_size_;
00055 inline void fl_message_font(Fl_Font f, Fl_Fontsize s) {
00056   fl_message_font_ = f; fl_message_size_ = s;}
00057 
00058 FL_EXPORT void fl_message_hotspot(int enable);
00059 FL_EXPORT int fl_message_hotspot(void);
00060 
00061 FL_EXPORT void fl_message_title(const char *title);
00062 FL_EXPORT void fl_message_title_default(const char *title);
00063 
00064 // pointers you can use to change FLTK to a foreign language:
00065 extern FL_EXPORT const char* fl_no;
00066 extern FL_EXPORT const char* fl_yes;
00067 extern FL_EXPORT const char* fl_ok;
00068 extern FL_EXPORT const char* fl_cancel;
00069 extern FL_EXPORT const char* fl_close;
00070 #endif // !fl_ask_H
00071 
00072 //
00073 // End of "$Id$".
00074 //