21 #ifndef __EDELIB_MESSAGEBOX_H__
22 #define __EDELIB_MESSAGEBOX_H__
24 #include "edelib-global.h"
26 #include <FL/Fl_Window.H>
27 #include <FL/Fl_Button.H>
28 #include <FL/Fl_Box.H>
29 #include <FL/Fl_Input.H>
30 #include <FL/Fl_Pixmap.H>
32 #define MSGBOX_MAX_BUTTONS 4 // Max buttons in dialog
34 #define MSGBOX_ICON_ERROR "dialog-error"
35 #define MSGBOX_ICON_INFO "dialog-information"
36 #define MSGBOX_ICON_PASSWORD "dialog-password"
37 #define MSGBOX_ICON_WARNING "dialog-warning"
38 #define MSGBOX_ICON_QUESTION "dialog-question"
208 Fl_Button* buttons[MSGBOX_MAX_BUTTONS];
211 void fix_sizes(
void);
213 void add(Fl_Widget*) { }
231 void set_text(
const char* t);
238 bool set_icon(
const char* path);
246 bool set_theme_icon(
const char* name);
251 void set_xpm_icon(
const char*
const* arr);
267 const char* get_input(
void);
272 void set_input(
const char* txt);
277 void focus_button(
int b);
305 void run_plain(
bool center =
true);
314 int run(
bool center =
true);
324 static void set_themed_icons(
const char* msg,
const char* alert = 0,
const char* ask = 0,
325 const char* input = 0,
const char* password = 0);
328 static void clear_themed_icons(
void);
342 const char*
ask = 0,
const char*
input = 0,
const char*
password = 0) EDELIB_DEPRECATED;
355 EDELIB_API
void message(const
char* fmt, ...);
361 EDELIB_API
void alert(const
char* fmt, ...);
368 EDELIB_API
int ask(const
char* fmt, ...);
380 EDELIB_API const
char*
input(const
char* fmt, const
char* deflt = 0, ...);
386 EDELIB_API const
char*
password(const
char* fmt, const
char* deflt = 0, ...);
392 extern void (*fl_message)(
const char* fmt, ...);
393 extern void (*fl_alert)(
const char* fmt, ...);
394 extern int (*fl_ask)(
const char* fmt, ...);
395 extern const char* (*fl_input)(
const char* fmt,
const char* deflt, ...);
396 extern const char* (*fl_password)(
const char* fmt,
const char* deflt, ...);
Button with 'enter' shortcut (Fl_Return_Button)
Definition: MessageBox.h:60
Info-like icon.
Definition: MessageBox.h:69
Alert-like icon.
Definition: MessageBox.h:70
Question-like icon.
Definition: MessageBox.h:71
Ordinary button (Fl_Button)
Definition: MessageBox.h:59
void alert(const char *fmt,...)
void message(const char *fmt,...)
const char * input(const char *fmt, const char *deflt=0,...)
Dialog with secret input field.
Definition: MessageBox.h:50
Plain dialog.
Definition: MessageBox.h:48
Input-like icon.
Definition: MessageBox.h:72
Password-like icon.
Definition: MessageBox.h:73
Dialog with input field.
Definition: MessageBox.h:49
void themed_dialog_icons(const char *msg, const char *alert=0, const char *ask=0, const char *input=0, const char *password=0)
Standard dialog.
Definition: MessageBox.h:196
int ask(const char *fmt,...)
const char * password(const char *fmt, const char *deflt=0,...)