Dillo v3.1.1-119-g140d9ebd
Loading...
Searching...
No Matches
dialog.hh File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Typedefs

typedef void(* UserPasswordCB) (const char *user, const char *password, void *vp)
 

Functions

void a_Dialog_msg (const char *title, const char *msg)
 Display a message in a popup window.
 
int a_Dialog_choice (const char *title, const char *msg,...)
 Make a question-dialog with a question and alternatives.
 
int a_Dialog_user_password (const char *title, const char *msg, UserPasswordCB cb, void *vp)
 Make a user/password dialog.
 
const char * a_Dialog_input (const char *title, const char *msg)
 Dialog for one line of Input with a message.
 
const char * a_Dialog_passwd (const char *title, const char *msg)
 Dialog for password.
 
const char * a_Dialog_save_file (const char *title, const char *pattern, const char *fname)
 Show the save file dialog.
 
const char * a_Dialog_select_file (const char *title, const char *pattern, const char *fname)
 Show the select file dialog.
 
char * a_Dialog_open_file (const char *title, const char *pattern, const char *fname)
 Show the open file dialog.
 
void a_Dialog_text_window (const char *title, const char *txt)
 Show a new window with the provided text.
 

Typedef Documentation

◆ UserPasswordCB

typedef void(* UserPasswordCB) (const char *user, const char *password, void *vp)

Definition at line 8 of file dialog.hh.

Function Documentation

◆ a_Dialog_choice()

int a_Dialog_choice ( const char *  title,
const char *  msg,
  ... 
)

Make a question-dialog with a question and alternatives.

Last parameter must be NULL.

Returns
0 = dialog was cancelled, >0 = selected alternative.

Definition at line 342 of file dialog.cc.

References _MSG, choice_answer, choice_cb(), DilloPrefs::font_factor, INT2VOIDP, MSG_ERR, prefs, and window.

Referenced by a_Dpiapi_dialog(), a_UIcmd_close_all_bw(), Nav_reload_callback(), Tls_check_cert_hostname(), Tls_check_cert_strength(), Tls_examine_certificate(), Tls_examine_certificate(), UIcmd_save_file_check(), and win_cb().

◆ a_Dialog_input()

const char * a_Dialog_input ( const char *  title,
const char *  msg 
)

Dialog for one line of Input with a message.

avoids the sound bell in fl_input(), and allows customization

Returns
string on success, NULL upon Cancel or Close window

Definition at line 151 of file dialog.cc.

References a_Misc_parse_search_url(), dFree(), dList_length(), dList_nth_data(), dStrdup(), input_answer, input_cb(), input_str, INT2VOIDP, prefs, DilloPrefs::search_url_idx, DilloPrefs::search_urls, and window.

Referenced by a_UIcmd_search_dialog().

◆ a_Dialog_msg()

void a_Dialog_msg ( const char *  title,
const char *  msg 
)

Display a message in a popup window.

Definition at line 127 of file dialog.cc.

Referenced by a_UIcmd_view_page_bugs().

◆ a_Dialog_open_file()

char * a_Dialog_open_file ( const char *  title,
const char *  pattern,
const char *  fname 
)

Show the open file dialog.

Returns
pointer to chosen filename, or NULL on Cancel.

Definition at line 272 of file dialog.cc.

References a_Misc_escape_chars().

Referenced by a_UIcmd_open_file().

◆ a_Dialog_passwd()

const char * a_Dialog_passwd ( const char *  title,
const char *  msg 
)

Dialog for password.

Definition at line 233 of file dialog.cc.

Referenced by a_UIcmd_get_passwd().

◆ a_Dialog_save_file()

const char * a_Dialog_save_file ( const char *  title,
const char *  pattern,
const char *  fname 
)

Show the save file dialog.

Returns
pointer to chosen filename, or NULL on Cancel.

Definition at line 246 of file dialog.cc.

Referenced by a_Dialog_select_file(), and UIcmd_save().

◆ a_Dialog_select_file()

const char * a_Dialog_select_file ( const char *  title,
const char *  pattern,
const char *  fname 
)

Show the select file dialog.

Returns
pointer to chosen filename, or NULL on Cancel.

Definition at line 257 of file dialog.cc.

References a_Dialog_save_file().

Referenced by a_UIcmd_select_file().

◆ a_Dialog_text_window()

void a_Dialog_text_window ( const char *  title,
const char *  txt 
)

Show a new window with the provided text.

Definition at line 296 of file dialog.cc.

References DilloPrefs::font_factor, DilloPrefs::height, prefs, text_window_close_cb(), DilloPrefs::width, and window.

Referenced by a_UIcmd_view_page_bugs().

◆ a_Dialog_user_password()

int a_Dialog_user_password ( const char *  title,
const char *  msg,
UserPasswordCB  cb,
void *  vp 
)

Make a user/password dialog.

Call the callback with the result (OK or not) and the given user and password if OK.

Definition at line 414 of file dialog.cc.

References _MSG, Dialog_user_password_cb(), and window.

Referenced by Auth_do_auth_dialog().