new_ml_dialog

NAME
SYNOPSIS
DESCRIPTION
AUTHOR
LICENSE
VERSION

NAME

new_ml_dialog, ml_dialog_set_text, ml_dialog_get_text, ml_dialog_set_title, ml_dialog_get_title, ml_dialog_set_icon, ml_dialog_get_icon, ml_dialog_clear_buttons, ml_dialog_add_button - monolith dialog widget

SYNOPSIS

#include <ml_dialog.h>

ml_dialog new_ml_dialog (pool pool);
void ml_dialog_set_text (ml_dialog, const char *text);
const char *ml_dialog_get_text (ml_dialog);
void ml_dialog_set_title (ml_dialog, const char *title);
const char *ml_dialog_get_title (ml_dialog);
void ml_dialog_set_icon (ml_dialog, const char *icon);
const char *ml_dialog_get_icon (ml_dialog);
void ml_dialog_clear_buttons (ml_dialog);
void ml_dialog_add_button (ml_dialog, const char *text, void (*callback_fn) (ml_session, void *), ml_session session, void *data);

DESCRIPTION

A dialog is a widget for asking a user a question, and getting an answer. It can also be used for presenting the user with confirmation that some operation has been carried out, or for presenting the user with an error message.
Fundamentally, a dialog consists of some text, and a series of zero or more buttons along the bottom of the widget. A dialog can also have an optional title which appears along the top and an optional icon which appears on the left of the window.
Dialogs are almost always used packed directly into a window.
Dialogs are actually "super-widgets", built up from fundamental widgets like labels, buttons, and table layouts. However currently none of the fundamental widgets are actually exposed through the ml_dialog_* interface.
new_ml_dialog creates a new dialog widget with no text, no title, no icon and no buttons (ie. not very useful! - after calling this you should immediately call ml_dialog_set_text and probably ml_dialog_add_button too).
ml_dialog_(set|get)_text updates the text in a dialog widget. Although having text is not strictly mandatory, it is highly advisable.
ml_dialog_(set|get)_title changes the title. To have no title, set the title to NULL.
ml_dialog_(set|get)_icon changes the icon. To have no icon, set the icon to NULL.
ml_dialog_clear_buttons removes all the buttons from the dialog.
ml_dialog_add_button adds a single button to the dialog. If there are already buttons attached to the dialog, then this adds the new button on the right. The text which appears on the button must be specified. When the button is pressed, callback_fn will be called.

AUTHOR

Richard Jones <rich@annexia.org>

LICENSE

GNU LGPL (see http://www.gnu.org/)

VERSION

monolith-1.0.0