aboutsummaryrefslogtreecommitdiff
path: root/src/dialog.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/dialog.cc')
-rw-r--r--src/dialog.cc42
1 files changed, 22 insertions, 20 deletions
diff --git a/src/dialog.cc b/src/dialog.cc
index 64f60e38..da623f98 100644
--- a/src/dialog.cc
+++ b/src/dialog.cc
@@ -9,7 +9,9 @@
* (at your option) any later version.
*/
-// UI dialogs
+/** @file
+ * UI dialogs
+ */
#include <math.h> // for rint()
@@ -44,8 +46,8 @@ static int choice_answer;
*/
//----------------------------------------------------------------------------
-/*
- * Used to enable CTRL+{a,e,d,k} in search dialog (for start,end,del,cut)
+/**
+ * Used to enable CTRL+{a,e,d,k} in search dialog (for start,end,del,cut).
* TODO: bind down arrow to a search engine selection list.
*/
class CustInput3 : public Fl_Input {
@@ -79,7 +81,7 @@ int CustInput3::handle(int e)
return Fl_Input::handle(e);
}
-/*
+/**
* Used to make the ENTER key activate the CustChoice
*/
class CustChoice2 : public Fl_Choice {
@@ -117,7 +119,7 @@ int EnterButton::handle(int e)
//----------------------------------------------------------------------------
-/*
+/**
* Display a message in a popup window.
*/
void a_Dialog_msg(const char *title, const char *msg)
@@ -129,7 +131,7 @@ void a_Dialog_msg(const char *title, const char *msg)
}
-/*
+/**
* Callback for a_Dialog_input()
*/
static void input_cb(Fl_Widget *button, void *number)
@@ -138,11 +140,11 @@ static void input_cb(Fl_Widget *button, void *number)
button->window()->hide();
}
-/*
+/**
* Dialog for one line of Input with a message.
* avoids the sound bell in fl_input(), and allows customization
*
- * Return value: string on success, NULL upon Cancel or Close window
+ * @return string on success, NULL upon Cancel or Close window
*/
const char *a_Dialog_input(const char *title, const char *msg)
{
@@ -223,7 +225,7 @@ const char *a_Dialog_input(const char *title, const char *msg)
return (input_answer == 1) ? input_str : NULL;
}
-/*
+/**
* Dialog for password
*/
const char *a_Dialog_passwd(const char *title, const char *msg)
@@ -234,10 +236,10 @@ const char *a_Dialog_passwd(const char *title, const char *msg)
return fl_password("%s", "", msg);
}
-/*
+/**
* Show the save file dialog.
*
- * Return: pointer to chosen filename, or NULL on Cancel.
+ * @return pointer to chosen filename, or NULL on Cancel.
*/
const char *a_Dialog_save_file(const char *title,
const char *pattern, const char *fname)
@@ -245,10 +247,10 @@ const char *a_Dialog_save_file(const char *title,
return fl_file_chooser(title, pattern, fname);
}
-/*
+/**
* Show the select file dialog.
*
- * Return: pointer to chosen filename, or NULL on Cancel.
+ * @return pointer to chosen filename, or NULL on Cancel.
*/
const char *a_Dialog_select_file(const char *title,
const char *pattern, const char *fname)
@@ -260,10 +262,10 @@ const char *a_Dialog_select_file(const char *title,
return a_Dialog_save_file(title, pattern, fname);
}
-/*
+/**
* Show the open file dialog.
*
- * Return: pointer to chosen filename, or NULL on Cancel.
+ * @return pointer to chosen filename, or NULL on Cancel.
*/
char *a_Dialog_open_file(const char *title,
const char *pattern, const char *fname)
@@ -274,7 +276,7 @@ char *a_Dialog_open_file(const char *title,
return (fc_name) ? a_Misc_escape_chars(fc_name, "% #") : NULL;
}
-/*
+/**
* Close text window.
*/
static void text_window_close_cb(Fl_Widget *, void *vtd)
@@ -286,7 +288,7 @@ static void text_window_close_cb(Fl_Widget *, void *vtd)
delete buf;
}
-/*
+/**
* Show a new window with the provided text
*/
void a_Dialog_text_window(const char *title, const char *txt)
@@ -329,11 +331,11 @@ static void choice_cb(Fl_Widget *button, void *number)
button->window()->hide();
}
-/*
+/**
* Make a question-dialog with a question and alternatives.
* Last parameter must be NULL.
*
- * Return value: 0 = dialog was cancelled, >0 = selected alternative.
+ * @return 0 = dialog was cancelled, >0 = selected alternative.
*/
int a_Dialog_choice(const char *title, const char *msg, ...)
{
@@ -402,7 +404,7 @@ static void Dialog_user_password_cb(Fl_Widget *button, void *)
button->window()->hide();
}
-/*
+/**
* Make a user/password dialog.
* Call the callback with the result (OK or not) and the given user and
* password if OK.