NTK 1.3.0
fl_ask.H
1//
2// "$Id: fl_ask.H 8441 2011-02-18 08:52:48Z AlbrechtS $"
3//
4// Standard dialog header file for the Fast Light Tool Kit (FLTK).
5//
6// Copyright 1998-2011 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
28#ifndef fl_ask_H
29# define fl_ask_H
30
31# include "Enumerations.H"
32
33class Fl_Widget;
35enum {
36 FL_BEEP_DEFAULT = 0,
37 FL_BEEP_MESSAGE,
38 FL_BEEP_ERROR,
39 FL_BEEP_QUESTION,
40 FL_BEEP_PASSWORD,
41 FL_BEEP_NOTIFICATION
42};
43
44# ifdef __GNUC__
45# define __fl_attr(x) __attribute__ (x)
46# else
47# define __fl_attr(x)
48# endif // __GNUC__
49
50FL_EXPORT void fl_beep(int type = FL_BEEP_DEFAULT);
51FL_EXPORT void fl_message(const char *,...) __fl_attr((__format__ (__printf__, 1, 2)));
52FL_EXPORT void fl_alert(const char *,...) __fl_attr((__format__ (__printf__, 1, 2)));
53// fl_ask() is deprecated since it uses "Yes" and "No" for the buttons,
54// which does not conform to the current FLTK Human Interface Guidelines.
55// Use fl_choice() instead with the appropriate verbs instead.
56FL_EXPORT int fl_ask(const char *,...) __fl_attr((__format__ (__printf__, 1, 2), __deprecated__));
57FL_EXPORT int fl_choice(const char *q,const char *b0,const char *b1,const char *b2,...) __fl_attr((__format__ (__printf__, 1, 5)));
58FL_EXPORT const char *fl_input(const char *label, const char *deflt = 0, ...) __fl_attr((__format__ (__printf__, 1, 3)));
59FL_EXPORT const char *fl_password(const char *label, const char *deflt = 0, ...) __fl_attr((__format__ (__printf__, 1, 3)));
60
61FL_EXPORT Fl_Widget *fl_message_icon();
62extern FL_EXPORT Fl_Font fl_message_font_;
63extern FL_EXPORT Fl_Fontsize fl_message_size_;
64inline void fl_message_font(Fl_Font f, Fl_Fontsize s) {
65 fl_message_font_ = f; fl_message_size_ = s;}
66
67FL_EXPORT void fl_message_hotspot(int enable);
68FL_EXPORT int fl_message_hotspot(void);
69
70FL_EXPORT void fl_message_title(const char *title);
71FL_EXPORT void fl_message_title_default(const char *title);
72
73// pointers you can use to change FLTK to a foreign language:
74extern FL_EXPORT const char* fl_no;
75extern FL_EXPORT const char* fl_yes;
76extern FL_EXPORT const char* fl_ok;
77extern FL_EXPORT const char* fl_cancel;
78extern FL_EXPORT const char* fl_close;
79#endif // !fl_ask_H
80
81//
82// End of "$Id: fl_ask.H 8441 2011-02-18 08:52:48Z AlbrechtS $".
83//
This file contains type definitions and general enumerations.
int Fl_Font
A font number is an index into the internal font table.
Definition: Enumerations.H:707
int Fl_Fontsize
Size of a font in pixels.
Definition: Enumerations.H:736
Fl_Widget is the base class for all widgets in FLTK.
Definition: Fl_Widget.H:111
const char * label() const
Gets the current label text.
Definition: Fl_Widget.H:419
uchar type() const
Gets the widget type.
Definition: Fl_Widget.H:272
FL_EXPORT const char * fl_yes
string pointer used in common dialogs, you can change it to another language
Definition: fl_ask.cxx:268
const char * fl_input(const char *fmt, const char *defstr,...)
Shows an input dialog displaying the fmt message.
Definition: fl_ask.cxx:459
FL_EXPORT const char * fl_close
string pointer used in common dialogs, you can change it to another language
Definition: fl_ask.cxx:271
int fl_choice(const char *fmt, const char *b0, const char *b1, const char *b2,...)
Shows a dialog displaying the fmt message, this dialog features up to 3 customizable choice buttons.
Definition: fl_ask.cxx:414
FL_EXPORT const char * fl_ok
string pointer used in common dialogs, you can change it to another language
Definition: fl_ask.cxx:269
FL_EXPORT int FL_EXPORT const char FL_EXPORT const char FL_EXPORT Fl_Widget * fl_message_icon()
Gets the Fl_Box icon container of the current default dialog used in many common dialogs like fl_mess...
Definition: fl_ask.cxx:432
const char * fl_password(const char *fmt, const char *defstr,...)
Shows an input dialog displaying the fmt message.
Definition: fl_ask.cxx:485
void fl_message(const char *fmt,...)
Shows an information message dialog box.
Definition: fl_ask.cxx:336
FL_EXPORT void fl_message_title_default(const char *title)
Sets the default title of the dialog window used in many common dialogs.
Definition: fl_ask.cxx:561
FL_EXPORT void fl_message_hotspot(int enable)
Sets whether or not to move the common message box used in many common dialogs like fl_message(),...
Definition: fl_ask.cxx:509
FL_EXPORT void fl_beep(int type=FL_BEEP_DEFAULT)
Emits a system beep message.
Definition: fl_ask.cxx:278
FL_EXPORT void fl_message_title(const char *title)
Sets the title of the dialog window used in many common dialogs.
Definition: fl_ask.cxx:540
FL_EXPORT const char * fl_cancel
string pointer used in common dialogs, you can change it to another language
Definition: fl_ask.cxx:270
int fl_ask(const char *fmt,...)
Shows a dialog displaying the fmt message, this dialog features 2 yes/no buttons.
Definition: fl_ask.cxx:384
void fl_alert(const char *fmt,...)
Shows an alert message dialog box.
Definition: fl_ask.cxx:359
FL_EXPORT const char * fl_no
string pointer used in common dialogs, you can change it to another language
Definition: fl_ask.cxx:267