Add to git.
[monolith.git] / doc / new_ml_frameset.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_window</title>
6 </head>
7 <body>
8
9 <h1 align=center>new_ml_window</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:06:12 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_window, ml_window_pack, ml_window_set_title, ml_window_get_title, ml_window_set_stylesheet, ml_window_get_stylesheet, ml_window_set_charset, ml_window_get_charset, new_ml_frameset, ml_frameset_set_description, ml_frameset_set_title, ml_frameset_get_title - monolith window and frameset</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_window.h&gt;
35
36 ml_window new_ml_window (struct ml_session *, pool pool);
37 void ml_window_pack (ml_window, ml_widget);
38 void ml_window_set_title (ml_window, const char *title);
39 const char *ml_window_get_title (ml_window);
40 void ml_window_set_stylesheet (ml_window, const char *stylesheet);
41 const char *ml_window_get_stylesheet (ml_window);
42 void ml_window_set_charset (ml_window, const char *charset);
43 const char *ml_window_get_charset (ml_window);
44 ml_window new_ml_frameset (struct ml_session *, pool pool, const char *rows, const char *cols, vector frames);
45 void ml_frameset_set_description (ml_window, struct ml_session *, const char *rows, const char *cols, vector frames);
46 void ml_frameset_set_title (ml_window, const char *);
47 const char *ml_frameset_get_title (ml_window);
48 </b></pre></td></table>
49 <a name="DESCRIPTION"></a>
50 <h2>DESCRIPTION</h2>
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 A &quot;window&quot; is a top-level window. Every
57 application has at least one window, created in the main
58 function. A window is just a wrapper. To actually do
59 anything, you must pack a single widget inside the window.
60 Windows can only take a single widget. If you want more than
61 one widget to appear inside a window, then you must pack
62 them into some sort of layout widget first, and pack the
63 layout widget into the window.</td></table>
64
65 <table width="100%" border=0 rules="none" frame="void"
66        cols="2" cellspacing="0" cellpadding="0">
67 <tr valign="top" align="left">
68 <td width="10%"></td><td width="90%">
69 A &quot;frameset&quot; is used to create framesets (several
70 ordinary windows packed into one top-level window, with
71 independent scrolling capabilities). Windows and framesets
72 are actually so similar, that I have included them in the
73 same class (and also so that other code can deal with an
74 opaque <b>ml_window</b> pointer and not have to worry about
75 whether it is a window or a frameset). Framesets may contain
76 windows or other framesets, or a mixture of
77 both.</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 Monolith windows are not widgets (unlike many of the other
84 classes in monolith).</td></table>
85
86 <table width="100%" border=0 rules="none" frame="void"
87        cols="2" cellspacing="0" cellpadding="0">
88 <tr valign="top" align="left">
89 <td width="10%"></td><td width="90%">
90 <b>new_ml_window</b> creates a new monolith
91 window.</td></table>
92
93 <table width="100%" border=0 rules="none" frame="void"
94        cols="2" cellspacing="0" cellpadding="0">
95 <tr valign="top" align="left">
96 <td width="10%"></td><td width="90%">
97 <b>ml_window_pack</b> packs a widget into the window. Since
98 a window can only contain a single widget, subsequent calls
99 to this function overwrite the packed widget. (Note: this
100 call does not apply to framesets).</td></table>
101
102 <table width="100%" border=0 rules="none" frame="void"
103        cols="2" cellspacing="0" cellpadding="0">
104 <tr valign="top" align="left">
105 <td width="10%"></td><td width="90%">
106 <b>ml_window_(set|get)_title</b> changes the title of the
107 window. The title of the window defaults to no title at all,
108 so it is a good idea to set this.</td></table>
109
110 <table width="100%" border=0 rules="none" frame="void"
111        cols="2" cellspacing="0" cellpadding="0">
112 <tr valign="top" align="left">
113 <td width="10%"></td><td width="90%">
114 <b>ml_window_(set|get)_stylesheet</b> changes the stylesheet
115 of the page. Monolith default stylesheets are installed in
116 <b>/ml-styles/</b>, and the default stylesheet is
117 <b>/ml-styles/default.css</b> (supplied in the monolith
118 distribution). Stylesheets are used to 'theme' monolith
119 applications.</td></table>
120
121 <table width="100%" border=0 rules="none" frame="void"
122        cols="2" cellspacing="0" cellpadding="0">
123 <tr valign="top" align="left">
124 <td width="10%"></td><td width="90%">
125 <b>ml_window_(set|get)_charset</b> changes the character
126 encoding associated with the window. Because of limitations
127 in HTML, only a single charset can be associated with all of
128 the widgets in a window. The default charset is
129 <b>iso-8859-1</b>. For multilingual support, it is
130 recommended that users change the charset to either their
131 native language encoding, or to <b>utf-8</b>.</td></table>
132
133 <table width="100%" border=0 rules="none" frame="void"
134        cols="2" cellspacing="0" cellpadding="0">
135 <tr valign="top" align="left">
136 <td width="10%"></td><td width="90%">
137 <b>new_ml_frameset</b> creates a new frameset. <b>rows</b>
138 and <b>cols</b> define the number of frames and their
139 layout. You can use <b>rows</b> and <b>cols</b> to create
140 frameset layouts including grids, as described in the HTML 4
141 standard (<b>http://www.w3.org/TR/html401/</b>). To create
142 nested framesets, use a frame which generates a frameset
143 instead of a window. <b>frames</b> is a vector of <b>struct
144 ml_frame_description</b> structures (note: the structures
145 themselves, not pointers to the structures). <b>struct
146 ml_frame_description</b> contains the following
147 fields:</td></table>
148
149 <table width="100%" border=0 rules="none" frame="void"
150        cols="2" cellspacing="0" cellpadding="0">
151 <tr valign="top" align="left">
152 <td width="10%"></td><td width="90%">
153 <b>fn</b>: The function which is called generate the frame
154 (or nested frameset). This function must call either
155 <b>new_ml_window</b> or <b>new_ml_frameset</b>. The function
156 is prototyped as <b>void fn (ml_session session, void
157 *data);</b>.</td></table>
158
159 <table width="100%" border=0 rules="none" frame="void"
160        cols="2" cellspacing="0" cellpadding="0">
161 <tr valign="top" align="left">
162 <td width="10%"></td><td width="90%">
163 <b>data</b>: Data pointer passed to this
164 function.</td></table>
165
166 <table width="100%" border=0 rules="none" frame="void"
167        cols="2" cellspacing="0" cellpadding="0">
168 <tr valign="top" align="left">
169 <td width="10%"></td><td width="90%">
170 <b>ml_frameset_set_description</b> allows the frameset
171 description to be updated.</td></table>
172
173 <table width="100%" border=0 rules="none" frame="void"
174        cols="2" cellspacing="0" cellpadding="0">
175 <tr valign="top" align="left">
176 <td width="10%"></td><td width="90%">
177 <b>ml_frameset_(set|get)_title</b> updates the window
178 title.</td></table>
179 <a name="AUTHOR"></a>
180 <h2>AUTHOR</h2>
181
182 <table width="100%" border=0 rules="none" frame="void"
183        cols="2" cellspacing="0" cellpadding="0">
184 <tr valign="top" align="left">
185 <td width="10%"></td><td width="90%">
186 Richard Jones &lt;rich@annexia.org&gt;</td></table>
187 <a name="LICENSE"></a>
188 <h2>LICENSE</h2>
189
190 <table width="100%" border=0 rules="none" frame="void"
191        cols="2" cellspacing="0" cellpadding="0">
192 <tr valign="top" align="left">
193 <td width="10%"></td><td width="90%">
194 GNU LGPL (see http://www.gnu.org/)</td></table>
195 <a name="VERSION"></a>
196 <h2>VERSION</h2>
197
198 <table width="100%" border=0 rules="none" frame="void"
199        cols="2" cellspacing="0" cellpadding="0">
200 <tr valign="top" align="left">
201 <td width="10%"></td><td width="90%">
202 monolith-1.0.0</td></table>
203 <hr>
204 </body>
205 </html>