FLTK 1.3.2
fl_ask.H
Go to the documentation of this file.
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 
00023 #ifndef fl_ask_H
00024 #  define fl_ask_H
00025 
00026 #  include "Enumerations.H"
00027 
00028 class Fl_Widget;
00029 
00032 enum Fl_Beep {
00033   FL_BEEP_DEFAULT = 0,  
00034   FL_BEEP_MESSAGE,  
00035   FL_BEEP_ERROR,  
00036   FL_BEEP_QUESTION,  
00037   FL_BEEP_PASSWORD,  
00038   FL_BEEP_NOTIFICATION  
00039 };
00040 
00041 #  ifdef __GNUC__
00042 #    define __fl_attr(x) __attribute__ (x)
00043 #  else
00044 #    define __fl_attr(x)
00045 #  endif // __GNUC__
00046 
00047 FL_EXPORT void fl_beep(int type = FL_BEEP_DEFAULT);
00048 FL_EXPORT void fl_message(const char *,...) __fl_attr((__format__ (__printf__, 1, 2)));
00049 FL_EXPORT void fl_alert(const char *,...) __fl_attr((__format__ (__printf__, 1, 2)));
00050 // fl_ask() is deprecated since it uses "Yes" and "No" for the buttons,
00051 // which does not conform to the current FLTK Human Interface Guidelines.
00052 // Use fl_choice() instead with the appropriate verbs instead.
00053 FL_EXPORT int fl_ask(const char *,...) __fl_attr((__format__ (__printf__, 1, 2), __deprecated__));
00054 FL_EXPORT int fl_choice(const char *q,const char *b0,const char *b1,const char *b2,...) __fl_attr((__format__ (__printf__, 1, 5)));
00055 FL_EXPORT const char *fl_input(const char *label, const char *deflt = 0, ...) __fl_attr((__format__ (__printf__, 1, 3)));
00056 FL_EXPORT const char *fl_password(const char *label, const char *deflt = 0, ...) __fl_attr((__format__ (__printf__, 1, 3)));
00057 
00058 FL_EXPORT Fl_Widget *fl_message_icon();
00059 extern FL_EXPORT Fl_Font fl_message_font_;
00060 extern FL_EXPORT Fl_Fontsize fl_message_size_;
00061 inline void fl_message_font(Fl_Font f, Fl_Fontsize s) {
00062   fl_message_font_ = f; fl_message_size_ = s;}
00063 
00064 FL_EXPORT void fl_message_hotspot(int enable);
00065 FL_EXPORT int fl_message_hotspot(void);
00066 
00067 FL_EXPORT void fl_message_title(const char *title);
00068 FL_EXPORT void fl_message_title_default(const char *title);
00069 
00070 // pointers you can use to change FLTK to a foreign language:
00071 extern FL_EXPORT const char* fl_no;
00072 extern FL_EXPORT const char* fl_yes;
00073 extern FL_EXPORT const char* fl_ok;
00074 extern FL_EXPORT const char* fl_cancel;
00075 extern FL_EXPORT const char* fl_close;
00076 #endif // !fl_ask_H
00077 
00078 //
00079 // End of "$Id$".
00080 //