1 /* Monolith form radio button input class.
2 * - by Richard W.M. Jones <rich@annexia.org>
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.
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.
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.
18 * $Id: ml_form_radio.h,v 1.1 2002/08/30 14:28:47 rich Exp $
21 #ifndef ML_FORM_RADIO_H
22 #define ML_FORM_RADIO_H
25 #include "ml_form_radio_group.h"
28 typedef struct ml_form_radio *ml_form_radio;
30 /* Function: new_ml_form_radio - monolith radio button widget
31 * Function: ml_form_radio_set_checked
32 * Function: ml_form_radio_get_checked
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.
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.
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}.
48 * See also: @ref{new_ml_form(3)}, @ref{new_ml_form_radio_group(3)}.
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);
54 #endif /* ML_FORM_RADIO_H */