• Main Page
  • Related Pages
  • Modules
  • Classes
  • Files
  • File List
  • File Members

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 /* the GNUC-specific attribute appearing below in prototypes with a variable list of arguments
00043  helps detection of mismatches between format string and argument list at compilation time */
00044 #    define __fl_attr(x) __attribute__ (x)
00045 #  else
00046 #    define __fl_attr(x)
00047 #  endif // __GNUC__
00048 
00049 FL_EXPORT void fl_beep(int type = FL_BEEP_DEFAULT);
00050 FL_EXPORT void fl_message(const char *,...) __fl_attr((__format__ (__printf__, 1, 2)));
00051 FL_EXPORT void fl_alert(const char *,...) __fl_attr((__format__ (__printf__, 1, 2)));
00052 // fl_ask() is deprecated since it uses "Yes" and "No" for the buttons,
00053 // which does not conform to the current FLTK Human Interface Guidelines.
00054 // Use fl_choice() instead with the appropriate verbs instead.
00055 FL_EXPORT int fl_ask(const char *,...) __fl_attr((__format__ (__printf__, 1, 2), __deprecated__));
00056 FL_EXPORT int fl_choice(const char *q,const char *b0,const char *b1,const char *b2,...) __fl_attr((__format__ (__printf__, 1, 5)));
00057 FL_EXPORT const char *fl_input(const char *label, const char *deflt = 0, ...) __fl_attr((__format__ (__printf__, 1, 3)));
00058 FL_EXPORT const char *fl_password(const char *label, const char *deflt = 0, ...) __fl_attr((__format__ (__printf__, 1, 3)));
00059 
00060 FL_EXPORT Fl_Widget *fl_message_icon();
00061 extern FL_EXPORT Fl_Font fl_message_font_;
00062 extern FL_EXPORT Fl_Fontsize fl_message_size_;
00063 inline void fl_message_font(Fl_Font f, Fl_Fontsize s) {
00064   fl_message_font_ = f; fl_message_size_ = s;}
00065 
00066 FL_EXPORT void fl_message_hotspot(int enable);
00067 FL_EXPORT int fl_message_hotspot(void);
00068 
00069 FL_EXPORT void fl_message_title(const char *title);
00070 FL_EXPORT void fl_message_title_default(const char *title);
00071 
00072 // pointers you can use to change FLTK to a foreign language:
00073 extern FL_EXPORT const char* fl_no;
00074 extern FL_EXPORT const char* fl_yes;
00075 extern FL_EXPORT const char* fl_ok;
00076 extern FL_EXPORT const char* fl_cancel;
00077 extern FL_EXPORT const char* fl_close;
00078 #endif // !fl_ask_H
00079 
00080 //
00081 // End of "$Id$".
00082 //
  • © 1998-2016 by Bill Spitzak and others.     FLTK

  • © 1998-2016 by Bill Spitzak and others.     FLTK

    Permission is granted to reproduce this manual or any portion for any purpose, provided this copyright and permission notice are preserved.