Add to git.
[monolith.git] / src / ml_form_radio.h
1 /* Monolith form radio button input class.
2  * - by Richard W.M. Jones <rich@annexia.org>
3  *
4  * This library is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Library General Public
6  * License as published by the Free Software Foundation; either
7  * version 2 of the License, or (at your option) any later version.
8  *
9  * This library is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12  * Library General Public License for more details.
13  *
14  * You should have received a copy of the GNU Library General Public
15  * License along with this library; if not, write to the Free
16  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
17  *
18  * $Id: ml_form_radio.h,v 1.1 2002/08/30 14:28:47 rich Exp $
19  */
20
21 #ifndef ML_FORM_RADIO_H
22 #define ML_FORM_RADIO_H
23
24 #include "monolith.h"
25 #include "ml_form_radio_group.h"
26
27 struct ml_form_radio;
28 typedef struct ml_form_radio *ml_form_radio;
29
30 /* Function: new_ml_form_radio - monolith radio button widget
31  * Function: ml_form_radio_set_checked
32  * Function: ml_form_radio_get_checked
33  *
34  * This is a radio button input, for use in forms. Radio buttons
35  * represent choices, and thus are grouped together. For this reason,
36  * you must place all related radio buttons inside a @code{ml_form_radio_group}
37  * widget, which itself goes inside the form.
38  *
39  * @code{new_ml_form_radio} creates a new radio button widget. The
40  * radio button group into which this widget is being embedded is passed as the
41  * @code{group} parameter.
42  *
43  * After the form has been submitted, you can see which button was
44  * pressed by checking the value of the @code{ml_form_radio_group}
45  * widget, or by looking at the checked status of each individual
46  * radio button using @code{ml_form_radio_(set|get)_checked}.
47  *
48  * See also: @ref{new_ml_form(3)}, @ref{new_ml_form_radio_group(3)}.
49  */
50 extern ml_form_radio new_ml_form_radio (pool pool, ml_form_radio_group group, const char *value);
51 extern void ml_form_radio_set_checked (ml_form_radio w, int checked);
52 extern int ml_form_radio_get_checked (ml_form_radio w);
53
54 #endif /* ML_FORM_RADIO_H */