fl_ask.H 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. //
  2. // "$Id: fl_ask.H 7903 2010-11-28 21:06:39Z matt $"
  3. //
  4. // Standard dialog header file for the Fast Light Tool Kit (FLTK).
  5. //
  6. // Copyright 1998-2010 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. #ifndef fl_ask_H
  28. # define fl_ask_H
  29. # include "Enumerations.H"
  30. class Fl_Widget;
  31. /** Different system beeps available. \relatesalso fl_beep(int) */
  32. enum {
  33. FL_BEEP_DEFAULT = 0,
  34. FL_BEEP_MESSAGE,
  35. FL_BEEP_ERROR,
  36. FL_BEEP_QUESTION,
  37. FL_BEEP_PASSWORD,
  38. FL_BEEP_NOTIFICATION
  39. };
  40. # ifdef __GNUC__
  41. # define __fl_attr(x) __attribute__ (x)
  42. # else
  43. # define __fl_attr(x)
  44. # endif // __GNUC__
  45. FL_EXPORT void fl_beep(int type = FL_BEEP_DEFAULT);
  46. FL_EXPORT void fl_message(const char *,...) __fl_attr((__format__ (__printf__, 1, 2)));
  47. FL_EXPORT void fl_alert(const char *,...) __fl_attr((__format__ (__printf__, 1, 2)));
  48. // fl_ask() is deprecated since it uses "Yes" and "No" for the buttons,
  49. // which does not conform to the current FLTK Human Interface Guidelines.
  50. // Use fl_choice() instead with the appropriate verbs instead.
  51. FL_EXPORT int fl_ask(const char *,...) __fl_attr((__format__ (__printf__, 1, 2), __deprecated__));
  52. FL_EXPORT int fl_choice(const char *q,const char *b0,const char *b1,const char *b2,...) __fl_attr((__format__ (__printf__, 1, 5)));
  53. FL_EXPORT const char *fl_input(const char *label, const char *deflt = 0, ...) __fl_attr((__format__ (__printf__, 1, 3)));
  54. FL_EXPORT const char *fl_password(const char *label, const char *deflt = 0, ...) __fl_attr((__format__ (__printf__, 1, 3)));
  55. FL_EXPORT Fl_Widget *fl_message_icon();
  56. extern FL_EXPORT Fl_Font fl_message_font_;
  57. extern FL_EXPORT Fl_Fontsize fl_message_size_;
  58. inline void fl_message_font(Fl_Font f, Fl_Fontsize s) {
  59. fl_message_font_ = f; fl_message_size_ = s;}
  60. // pointers you can use to change FLTK to a foreign language:
  61. extern FL_EXPORT const char* fl_no;
  62. extern FL_EXPORT const char* fl_yes;
  63. extern FL_EXPORT const char* fl_ok;
  64. extern FL_EXPORT const char* fl_cancel;
  65. extern FL_EXPORT const char* fl_close;
  66. #endif // !fl_ask_H
  67. //
  68. // End of "$Id: fl_ask.H 7903 2010-11-28 21:06:39Z matt $".
  69. //