1 /* Monolith close button 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_close_button.h,v 1.3 2002/11/13 21:41:01 rich Exp $
21 #ifndef ML_CLOSE_BUTTON_H
22 #define ML_CLOSE_BUTTON_H
26 struct ml_close_button;
27 typedef struct ml_close_button *ml_close_button;
29 /* Function: new_ml_close_button - monolith button widget
31 * A close button widget is a simple widget which displays a button.
32 * When pressed, the button closes the current window.
34 * @code{new_ml_close_button} creates a new close button widget.
36 * The following properties can be changed on buttons (see
37 * @ref{ml_widget_set_property(3)}):
39 * @code{text}: The HTML text printed
40 * on the button. Note that the text string must be either
41 * static, or already allocated in the button's pool, or allocated
42 * in a pool with a longer lifetime than the button. If the text
43 * is set to @code{NULL} then this has the same effect as setting
44 * the text to the empty string, which is not very useful because
45 * the button can never be pressed.
47 * @code{button.reload-opener} (boolean): If set, then when the
48 * close button is pressed, then the window which was responsible
49 * for opening this window (the "opener") is reloaded. This is
50 * useful when we have used a popup button to open a new window,
51 * entered some data into a form in the new window, and then need
52 * to refresh the old window to show the new data.
54 extern ml_close_button new_ml_close_button (pool, const char *text);
56 #endif /* ML_CLOSE_BUTTON_H */