3 <meta name="generator" content="groff -Thtml, see www.gnu.org">
4 <meta name="Content-Style" content="text/css">
5 <title>new_ml_dialog</title>
9 <h1 align=center>new_ml_dialog</h1>
10 <a href="#NAME">NAME</a><br>
11 <a href="#SYNOPSIS">SYNOPSIS</a><br>
12 <a href="#DESCRIPTION">DESCRIPTION</a><br>
13 <a href="#AUTHOR">AUTHOR</a><br>
14 <a href="#LICENSE">LICENSE</a><br>
15 <a href="#VERSION">VERSION</a><br>
18 <!-- Creator : groff version 1.17.2 -->
19 <!-- CreationDate: Sat Aug 31 18:05:51 2002 -->
22 <table width="100%" border=0 rules="none" frame="void"
23 cols="2" cellspacing="0" cellpadding="0">
24 <tr valign="top" align="left">
25 <td width="10%"></td><td width="90%">
26 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</td></table>
27 <a name="SYNOPSIS"></a>
30 <table width="100%" border=0 rules="none" frame="void"
31 cols="2" cellspacing="0" cellpadding="0">
32 <tr valign="top" align="left">
33 <td width="10%"></td><td width="90%">
34 <pre><b>#include <ml_dialog.h>
36 ml_dialog new_ml_dialog (pool pool);
37 void ml_dialog_set_text (ml_dialog, const char *text);
38 const char *ml_dialog_get_text (ml_dialog);
39 void ml_dialog_set_title (ml_dialog, const char *title);
40 const char *ml_dialog_get_title (ml_dialog);
41 void ml_dialog_set_icon (ml_dialog, const char *icon);
42 const char *ml_dialog_get_icon (ml_dialog);
43 void ml_dialog_clear_buttons (ml_dialog);
44 void ml_dialog_add_button (ml_dialog, const char *text, void (*callback_fn) (ml_session, void *), ml_session session, void *data);
45 </b></pre></td></table>
46 <a name="DESCRIPTION"></a>
49 <table width="100%" border=0 rules="none" frame="void"
50 cols="2" cellspacing="0" cellpadding="0">
51 <tr valign="top" align="left">
52 <td width="10%"></td><td width="90%">
53 A dialog is a widget for asking a user a question, and
54 getting an answer. It can also be used for presenting the
55 user with confirmation that some operation has been carried
56 out, or for presenting the user with an error
59 <table width="100%" border=0 rules="none" frame="void"
60 cols="2" cellspacing="0" cellpadding="0">
61 <tr valign="top" align="left">
62 <td width="10%"></td><td width="90%">
63 Fundamentally, a dialog consists of some text, and a series
64 of zero or more buttons along the bottom of the widget. A
65 dialog can also have an optional title which appears along
66 the top and an optional icon which appears on the left of
67 the window.</td></table>
69 <table width="100%" border=0 rules="none" frame="void"
70 cols="2" cellspacing="0" cellpadding="0">
71 <tr valign="top" align="left">
72 <td width="10%"></td><td width="90%">
73 Dialogs are almost always used packed directly into a
76 <table width="100%" border=0 rules="none" frame="void"
77 cols="2" cellspacing="0" cellpadding="0">
78 <tr valign="top" align="left">
79 <td width="10%"></td><td width="90%">
80 Dialogs are actually "super-widgets", built up
81 from fundamental widgets like labels, buttons, and table
82 layouts. However currently none of the fundamental widgets
83 are actually exposed through the <b>ml_dialog_*</b>
84 interface.</td></table>
86 <table width="100%" border=0 rules="none" frame="void"
87 cols="2" cellspacing="0" cellpadding="0">
88 <tr valign="top" align="left">
89 <td width="10%"></td><td width="90%">
90 <b>new_ml_dialog</b> creates a new dialog widget with no
91 text, no title, no icon and no buttons (ie. not very useful!
92 - after calling this you should immediately call
93 <b>ml_dialog_set_text</b> and probably
94 <b>ml_dialog_add_button</b> too).</td></table>
96 <table width="100%" border=0 rules="none" frame="void"
97 cols="2" cellspacing="0" cellpadding="0">
98 <tr valign="top" align="left">
99 <td width="10%"></td><td width="90%">
100 <b>ml_dialog_(set|get)_text</b> updates the text in a dialog
101 widget. Although having text is not strictly mandatory, it
102 is highly advisable.</td></table>
104 <table width="100%" border=0 rules="none" frame="void"
105 cols="2" cellspacing="0" cellpadding="0">
106 <tr valign="top" align="left">
107 <td width="10%"></td><td width="90%">
108 <b>ml_dialog_(set|get)_title</b> changes the title. To have
109 no title, set the title to <b>NULL</b>.</td></table>
111 <table width="100%" border=0 rules="none" frame="void"
112 cols="2" cellspacing="0" cellpadding="0">
113 <tr valign="top" align="left">
114 <td width="10%"></td><td width="90%">
115 <b>ml_dialog_(set|get)_icon</b> changes the icon. To have no
116 icon, set the icon to <b>NULL</b>.</td></table>
118 <table width="100%" border=0 rules="none" frame="void"
119 cols="2" cellspacing="0" cellpadding="0">
120 <tr valign="top" align="left">
121 <td width="10%"></td><td width="90%">
122 <b>ml_dialog_clear_buttons</b> removes all the buttons from
123 the dialog.</td></table>
125 <table width="100%" border=0 rules="none" frame="void"
126 cols="2" cellspacing="0" cellpadding="0">
127 <tr valign="top" align="left">
128 <td width="10%"></td><td width="90%">
129 <b>ml_dialog_add_button</b> adds a single button to the
130 dialog. If there are already buttons attached to the dialog,
131 then this adds the new button on the right. The <b>text</b>
132 which appears on the button must be specified. When the
133 button is pressed, <b>callback_fn</b> will be
135 <a name="AUTHOR"></a>
138 <table width="100%" border=0 rules="none" frame="void"
139 cols="2" cellspacing="0" cellpadding="0">
140 <tr valign="top" align="left">
141 <td width="10%"></td><td width="90%">
142 Richard Jones <rich@annexia.org></td></table>
143 <a name="LICENSE"></a>
146 <table width="100%" border=0 rules="none" frame="void"
147 cols="2" cellspacing="0" cellpadding="0">
148 <tr valign="top" align="left">
149 <td width="10%"></td><td width="90%">
150 GNU LGPL (see http://www.gnu.org/)</td></table>
151 <a name="VERSION"></a>
154 <table width="100%" border=0 rules="none" frame="void"
155 cols="2" cellspacing="0" cellpadding="0">
156 <tr valign="top" align="left">
157 <td width="10%"></td><td width="90%">
158 monolith-1.0.0</td></table>