3 <meta name="generator" content="groff -Thtml, see www.gnu.org">
4 <meta name="Content-Style" content="text/css">
5 <title>new_ml_button</title>
9 <h1 align=center>new_ml_button</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_button, ml_button_set_text, ml_button_get_text, ml_button_set_callback, ml_button_set_key - monolith button 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_button.h>
36 ml_button new_ml_button (pool pool, const char *text);
37 void ml_button_set_text (ml_button, const char *text);
38 const char *ml_button_get_text (ml_button);
39 void ml_button_set_callback (ml_button, void (*fn)(ml_session, void *), ml_session, void *);
40 void ml_button_set_key (ml_button, int is_key);
41 </b></pre></td></table>
42 <a name="DESCRIPTION"></a>
45 <table width="100%" border=0 rules="none" frame="void"
46 cols="2" cellspacing="0" cellpadding="0">
47 <tr valign="top" align="left">
48 <td width="10%"></td><td width="90%">
49 A button widget is a simple button which calls a function
50 when clicked.</td></table>
52 <table width="100%" border=0 rules="none" frame="void"
53 cols="2" cellspacing="0" cellpadding="0">
54 <tr valign="top" align="left">
55 <td width="10%"></td><td width="90%">
56 <b>new_ml_button</b> creates a new button
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 <b>ml_button_(set|get)_text</b> updates the HTML text
64 printed on the button. Note that the text string must be
65 either static, or already allocated in the button's pool, or
66 allocated in a pool with a longer lifetime than the button.
67 If the text is set to <b>NULL</b> then this has the same
68 effect as setting the text to the empty string, which is not
69 very useful because the button can never be
72 <table width="100%" border=0 rules="none" frame="void"
73 cols="2" cellspacing="0" cellpadding="0">
74 <tr valign="top" align="left">
75 <td width="10%"></td><td width="90%">
76 <b>ml_button_set_callback</b> updates the callback function
77 which is invoked when the button is pressed.</td></table>
79 <table width="100%" border=0 rules="none" frame="void"
80 cols="2" cellspacing="0" cellpadding="0">
81 <tr valign="top" align="left">
82 <td width="10%"></td><td width="90%">
83 <b>ml_button_set_key</b> sets the boolean "key"
84 property of the button. This should be set on buttons where
85 the text is a single letter, suitable for, say, calculator
86 keys. All key buttons are rendered at a fixed width of
87 "1em", resulting in a more pleasing overall
90 <table width="100%" border=0 rules="none" frame="void"
91 cols="2" cellspacing="0" cellpadding="0">
92 <tr valign="top" align="left">
93 <td width="10%"></td><td width="90%">
94 <b>ml_button_set_popup</b> sets the popup property of the
95 button. When the user clicks on a popup button, a new popup
96 window opens on the screen. To make a button into a popup
97 button, the popup property should be a non-<b>NULL</b>
98 string which is the name of the new browser window (note
99 that because of limitations in HTML, browser window names
100 are global, so it is recommended that names be
101 "<b>appname</b>_<b>name</b>"). To change a popup
102 button back to an ordinary button, set the popup property to
103 <b>NULL</b>.</td></table>
105 <table width="100%" border=0 rules="none" frame="void"
106 cols="2" cellspacing="0" cellpadding="0">
107 <tr valign="top" align="left">
108 <td width="10%"></td><td width="90%">
109 The callback used by a popup button must create a top-level
110 window, otherwise you will get an internal server
113 <table width="100%" border=0 rules="none" frame="void"
114 cols="2" cellspacing="0" cellpadding="0">
115 <tr valign="top" align="left">
116 <td width="10%"></td><td width="90%">
117 <b>ml_button_set_popup_size</b> changes the size of the
118 popup window. The default is width 0, height 0, which
119 usually creates a popup window which is the same size and
120 shape as the current browser window.</td></table>
121 <a name="AUTHOR"></a>
124 <table width="100%" border=0 rules="none" frame="void"
125 cols="2" cellspacing="0" cellpadding="0">
126 <tr valign="top" align="left">
127 <td width="10%"></td><td width="90%">
128 Richard Jones <rich@annexia.org></td></table>
129 <a name="LICENSE"></a>
132 <table width="100%" border=0 rules="none" frame="void"
133 cols="2" cellspacing="0" cellpadding="0">
134 <tr valign="top" align="left">
135 <td width="10%"></td><td width="90%">
136 GNU LGPL (see http://www.gnu.org/)</td></table>
137 <a name="VERSION"></a>
140 <table width="100%" border=0 rules="none" frame="void"
141 cols="2" cellspacing="0" cellpadding="0">
142 <tr valign="top" align="left">
143 <td width="10%"></td><td width="90%">
144 monolith-1.0.0</td></table>