Add to git.
[monolith.git] / doc / ml_button_set_key.3.html
1 <html>
2 <head>
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>
6 </head>
7 <body>
8
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>
16
17 <hr>
18 <!-- Creator     : groff version 1.17.2 -->
19 <!-- CreationDate: Sat Aug 31 18:05:51 2002 -->
20 <a name="NAME"></a>
21 <h2>NAME</h2>
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>
28 <h2>SYNOPSIS</h2>
29
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 &lt;ml_button.h&gt;
35
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>
43 <h2>DESCRIPTION</h2>
44
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>
51
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
57 widget.</td></table>
58
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
70 pressed.</td></table>
71
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>
78
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 &quot;key&quot;
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 &quot;1em&quot;, resulting in a more pleasing overall
88 effect.</td></table>
89
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 &quot;<b>appname</b>_<b>name</b>&quot;). To change a popup
102 button back to an ordinary button, set the popup property to
103 <b>NULL</b>.</td></table>
104
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
111 error.</td></table>
112
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>
122 <h2>AUTHOR</h2>
123
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 &lt;rich@annexia.org&gt;</td></table>
129 <a name="LICENSE"></a>
130 <h2>LICENSE</h2>
131
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>
138 <h2>VERSION</h2>
139
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>
145 <hr>
146 </body>
147 </html>