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>
29#include <FL/Fl_Input.H>
30#include <FL/Fl_Pixmap.H>
32#define MSGBOX_MAX_BUTTONS 4
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*) { }
314 int run(
bool center =
true);
325 const char* input = 0,
const char* password = 0);
342 const char*
ask = 0,
const char*
input = 0,
const char*
password = 0) EDELIB_DEPRECATED;
361EDELIB_API
void alert(const
char* fmt, ...);
368EDELIB_API
int ask(const
char* fmt, ...);
380EDELIB_API const
char*
input(const
char* fmt, const
char* deflt = 0, ...);
386EDELIB_API const
char*
password(const
char* fmt, const
char* deflt = 0, ...);
392extern void (*fl_message)(
const char* fmt, ...);
393extern void (*fl_alert)(
const char* fmt, ...);
394extern int (*fl_ask)(
const char* fmt, ...);
395extern const char* (*fl_input)(
const char* fmt,
const char* deflt, ...);
396extern const char* (*fl_password)(
const char* fmt,
const char* deflt, ...);
Standard dialog.
Definition: MessageBox.h:196
void set_text(const char *t)
bool set_theme_icon(const char *name)
void add_button(Fl_Button *b, MessageBoxButtonType bt=MSGBOX_BUTTON_PLAIN)
void themed_dialog_icons(const char *msg, const char *alert=0, const char *ask=0, const char *input=0, const char *password=0)
void set_xpm_icon(const char *const *arr)
void clear(MessageBoxType t=MSGBOX_PLAIN)
MessageBox(MessageBoxType t=MSGBOX_PLAIN)
static void clear_themed_icons(void)
int ask(const char *fmt,...)
void add_button(const char *l, MessageBoxButtonType bt=MSGBOX_BUTTON_PLAIN, Fl_Callback cb=0, void *param=0)
bool set_icon(const char *path)
void run_plain(bool center=true)
const char * input(const char *fmt, const char *deflt=0,...)
static void set_themed_icons(const char *msg, const char *alert=0, const char *ask=0, const char *input=0, const char *password=0)
int run(bool center=true)
void alert(const char *fmt,...)
void set_input(const char *txt)
void message(const char *fmt,...)
void set_icon_from_type(MessageBoxIconType type)
const char * password(const char *fmt, const char *deflt=0,...)
const char * get_input(void)
@ MSGBOX_ICON_TYPE_INPUT
Input-like icon.
Definition: MessageBox.h:72
@ MSGBOX_ICON_TYPE_PASSWORD
Password-like icon.
Definition: MessageBox.h:73
@ MSGBOX_ICON_TYPE_QUESTION
Question-like icon.
Definition: MessageBox.h:71
@ MSGBOX_ICON_TYPE_ALERT
Alert-like icon.
Definition: MessageBox.h:70
@ MSGBOX_ICON_TYPE_INFO
Info-like icon.
Definition: MessageBox.h:69
@ MSGBOX_BUTTON_RETURN
Button with 'enter' shortcut (Fl_Return_Button)
Definition: MessageBox.h:60
@ MSGBOX_BUTTON_PLAIN
Ordinary button (Fl_Button)
Definition: MessageBox.h:59
@ MSGBOX_PLAIN
Plain dialog.
Definition: MessageBox.h:48
@ MSGBOX_INPUT
Dialog with input field.
Definition: MessageBox.h:49
@ MSGBOX_INPUT_SECRET
Dialog with secret input field.
Definition: MessageBox.h:50