source: trunk/gsdl/src/recpt/browsetools.cpp@ 928

Last change on this file since 928 was 928, checked in by kjm18, 24 years ago

search history stuff added.

  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
File size: 23.5 KB
Line 
1
2/**********************************************************************
3 *
4 * browsetools.cpp --
5 * Copyright (C) 1999 The New Zealand Digital Library Project
6 *
7 * A component of the Greenstone digital library software
8 * from the New Zealand Digital Library Project at the
9 * University of Waikato, New Zealand.
10 *
11 * This program is free software; you can redistribute it and/or modify
12 * it under the terms of the GNU General Public License as published by
13 * the Free Software Foundation; either version 2 of the License, or
14 * (at your option) any later version.
15 *
16 * This program is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU General Public License for more details.
20 *
21 * You should have received a copy of the GNU General Public License
22 * along with this program; if not, write to the Free Software
23 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
24 *
25 * $Id: browsetools.cpp 928 2000-02-15 22:53:52Z kjm18 $
26 *
27 *********************************************************************/
28
29/*
30 $Log$
31 Revision 1.37 2000/02/15 22:53:47 kjm18
32 search history stuff added.
33
34 Revision 1.36 2000/02/06 21:31:36 sjboddie
35 made some formerly static functions accessible from elsewhere (for
36 cstr receptionist)
37
38 Revision 1.35 2000/01/26 23:46:16 sjboddie
39 wrap every second button now (was every third)
40
41 Revision 1.34 1999/11/09 02:28:47 sjboddie
42 fixed minor bug in expanded contents
43
44 Revision 1.33 1999/10/30 22:22:26 sjboddie
45 added collection argument to browserclass output_section_group
46 functions -- moved table functions to formattools
47
48 Revision 1.32 1999/10/24 07:22:37 sjboddie
49 added a FullTOC option
50
51 Revision 1.31 1999/10/20 03:54:20 sjboddie
52 problem with expanded contents
53
54 Revision 1.30 1999/10/19 21:36:59 sjboddie
55 fixed bug in DocumentContents
56
57 Revision 1.29 1999/10/19 08:40:12 sjboddie
58 fixed some stupid compiler warnings on windows
59
60 Revision 1.28 1999/10/18 20:08:36 sjboddie
61 tidied up a few things
62
63 Revision 1.27 1999/10/15 03:31:42 sjboddie
64 oops, left out an '&'
65
66 Revision 1.26 1999/10/14 22:58:05 sjboddie
67 finished up on changes to browseing support - may still need some
68 tidying up
69
70 Revision 1.25 1999/10/10 08:14:04 sjboddie
71 - metadata now returns mp rather than array
72 - redesigned browsing support (although it's not finished so
73 won't currently work ;-)
74
75 Revision 1.24 1999/09/28 01:46:55 rjmcnab
76 removed some unused stuff
77
78 Revision 1.23 1999/09/23 10:09:17 sjboddie
79 made some changes so AZLists within other classifications are
80 handled properly
81
82 Revision 1.22 1999/09/07 23:06:58 rjmcnab
83 removed some compiler warnings.
84
85 Revision 1.21 1999/09/07 04:56:52 sjboddie
86 added GPL notice
87
88 Revision 1.20 1999/08/25 04:46:58 sjboddie
89 fixed bug
90
91 Revision 1.19 1999/08/13 04:18:04 sjboddie
92 fixed some typos
93
94 Revision 1.18 1999/08/10 22:42:21 sjboddie
95 added more format options to document tocs - there are now just two
96 types of toc - standard (Hierarchical) and document (as in books)
97
98 Revision 1.17 1999/08/09 02:12:07 sjboddie
99 made it so dates may be only 4 digits (i.e. year only)
100
101 Revision 1.16 1999/07/30 02:16:10 sjboddie
102 -added ability to display nested classifications (expanded versions
103 of nested classifications has yet to be done).
104 -changed set_arrow_macros slightly to fit in with new showtoppage
105 format option
106
107 Revision 1.15 1999/07/21 05:01:56 sjboddie
108 wrote handler for DateList classification
109
110 Revision 1.14 1999/07/20 02:58:15 sjboddie
111 got List and AZList classifications using format strings - tidied
112 up a bit
113
114 Revision 1.13 1999/07/07 05:44:25 sjboddie
115 Made some changes to allow for new way classifiers work (i.e. you can
116 now have classifiers containing other classifiers). At present there's
117 only a special case for dealing with the hdl 'magazine' section. A bit
118 of a redesign is needed to get it completely flexible
119
120 Revision 1.12 1999/07/01 03:47:49 rjmcnab
121 Fixed a small warning.
122
123 Revision 1.11 1999/06/27 21:49:01 sjboddie
124 fixed a couple of version conflicts - tidied up some small things
125
126 Revision 1.10 1999/06/26 01:07:21 rjmcnab
127 Fixed a small "bug" -- well I probably just covered another one...
128
129 Revision 1.9 1999/06/24 05:12:15 sjboddie
130 lots of small changes
131
132 Revision 1.8 1999/06/17 03:06:53 sjboddie
133 got detach button working properly - the close book icon is now disabled
134 when page is detached as the javascript close() function I was using is
135 too unreliable over different browsers
136 note that in my last comment I meant the "cl" arg (not the "c" arg).
137
138 Revision 1.7 1999/06/16 23:53:14 sjboddie
139 tidied a few things up. documentaction::define_external_macros now
140 resets the "c" arg if it's set to something stupid by the .xx suffixes
141
142 Revision 1.6 1999/06/16 04:03:47 sjboddie
143 Now sets "cl" arg to "search" when going to a document from a search
144 results page. This allows the close book icon (in hierarchy toc) to
145 take you back to the results page if that's where you came from.
146 If you got to the document page somehow other than from a
147 classification or a search (i.e. if "cl" isn't set) then the close
148 book icon is disabled
149
150 Revision 1.5 1999/06/16 03:11:25 sjboddie
151 get_info() now takes a getParents argument
152
153 Revision 1.4 1999/05/10 03:40:26 sjboddie
154 lots of changes - slowly getting document action sorted out
155
156 Revision 1.3 1999/04/30 01:59:39 sjboddie
157 lots of stuff - getting documentaction working (documentaction replaces
158 old browseaction)
159
160 Revision 1.2 1999/03/29 02:14:29 sjboddie
161
162 More changes to browseaction
163
164 Revision 1.1 1999/03/25 03:10:15 sjboddie
165
166 new library for browse stuff
167
168 */
169
170#include "browsetools.h"
171#include "OIDtools.h"
172
173
174// output_controls displays the detach, expand/contract contents,
175// expand/contract text and highlighting/no highlighting buttons
176
177void output_controls (cgiargsclass &args, const text_tarray &ibuttons,
178 recptproto * /*collectproto*/, displayclass &disp,
179 outconvertclass &outconvert, ostream &textout,
180 ostream &/*logout*/) {
181
182 if (args["u"] != "1") {
183
184 FilterResponse_t response;
185 text_tarray metadata;
186 text_tarray buttons;
187
188 text_tarray::const_iterator here = ibuttons.begin();
189 text_tarray::const_iterator end = ibuttons.end();
190
191 while (here != end) {
192
193 if (*here == "Detach")
194 buttons.push_back ("_document:imagedetach_");
195 else if (*here == "Highlight") {
196 if (args["hl"] == "1")
197 buttons.push_back ("_document:imagenohighlight_");
198 else
199 buttons.push_back ("_document:imagehighlight_");
200 } else if (*here == "Expand Contents") {
201 if (args["gc"] == "1")
202 buttons.push_back ("_document:imagecontracttoc_");
203 else
204 buttons.push_back ("_document:imageexpandtoc_");
205 } else if (*here == "Expand Text") {
206 if (args.getintarg("gt"))
207 buttons.push_back ("_document:imagecontracttext_");
208 else
209 buttons.push_back ("_document:imageexpandtext_");
210 }
211 here ++;
212 }
213
214 here = buttons.begin();
215 end = buttons.end();
216 int count = 0;
217 while (here != end) {
218 if ((count != 0) && ((count % 2) == 0)) textout << "<br>\n";
219 textout << outconvert << disp << *here;
220 count ++;
221 here ++;
222 }
223 }
224}
225
226
227// at the moment this just writes out the html to display
228// the cover image (assuming it's called cover.jpg)
229// this whole thing should be done with a call to the collection
230// server which would send a link to the cover image if there
231// was one otherwise send title, author and stuff
232 void output_cover_image (cgiargsclass &args, recptproto * /*collectproto*/,
233 displayclass &disp, outconvertclass &outconvert,
234 ostream &textout, ostream &/*logout*/) {
235
236 if (args["d"].empty()) return;
237
238 textout << outconvert << disp <<
239 "<img src=\"_httpcollection_/archives/_thisOID_/cover.jpg\"><br>\n";
240 }
241
242 void output_titles (cgiargsclass &args, recptproto *collectproto,
243 formatinfo_t &formatinfo, displayclass &disp,
244 outconvertclass &outconvert, ostream &textout,
245 ostream &logout) {
246
247 if (args["d"].empty()) return;
248
249 text_tset metadata;
250 bool getParents;
251 FilterResponse_t response;
252
253 format_t *formatlistptr = new format_t();
254 parse_formatstring (formatinfo.DocumentHeading, formatlistptr, metadata, getParents);
255
256 if (!get_info (args["d"], args["c"], metadata, getParents, collectproto, response, logout))
257 return;
258
259 textout << outconvert << disp << get_formatted_string (response.docInfo[0], formatlistptr);
260}
261
262
263static void recurse_contents (ResultDocInfo_t &section, cgiargsclass &args, bool fulltoc,
264 browserclass *bptr, text_tset &metadata, bool &getParents,
265 format_t *formatlistptr, format_tmap &formatlistmap,
266 formatinfo_t &formatinfo, browsermapclass *browsermap,
267 int tabcount, recptproto *collectproto, displayclass &disp,
268 outconvertclass &outconvert, ostream &textout, ostream &logout) {
269 text_t formatstring;
270
271 bool is_classify = false;
272 if (args["d"].empty() || fulltoc) is_classify = true;
273
274 // output this section
275 bool use_table = is_table_content (formatlistptr);
276 tabcount += bptr->output_section_group (section, args, "", tabcount, formatlistptr, use_table,
277 metadata, getParents, collectproto, disp, outconvert,
278 textout, logout);
279
280 text_t classification;
281 if (!is_classify) classification = "Document";
282 else get_top (args["cl"], classification);
283
284 int haschildren = section.metadata["haschildren"].values[0].getint();
285 const text_t &doctype = section.metadata["doctype"].values[0];
286 text_t classifytype = section.metadata["childtype"].values[0];
287 // HLists and DateLists are displayed as VLists when contents
288 // are expanded, Paged documents are displayed as HLists
289 if (classifytype == "HList" || classifytype == "DateList") classifytype = "VList";
290 if (classifytype == "Paged") classifytype = "HList";
291
292 // recurse through children
293 if ((haschildren == 1) && (!is_classify || fulltoc || doctype == "classify")) {
294
295 // get browser for displaying children
296 bptr = browsermap->getbrowser (classifytype);
297 bptr->load_metadata_defaults (metadata);
298
299 // get the formatstring if there is one
300 if (!get_formatstring (classification, classifytype,
301 formatinfo.formatstrings, formatstring))
302 formatstring = bptr->get_default_formatstring();
303
304 format_tmap::const_iterator it = formatlistmap.find (formatstring);
305 // check if formatlistptr is cached
306 if (it != formatlistmap.end()) formatlistptr = (*it).second;
307 else {
308 formatlistptr = new format_t();
309 parse_formatstring (formatstring, formatlistptr, metadata, getParents);
310 formatlistmap[formatstring] = formatlistptr;
311 }
312
313 FilterResponse_t tmp;
314 get_children (section.OID, args["c"], metadata, getParents, collectproto, tmp, logout);
315 ResultDocInfo_tarray::iterator thisdoc = tmp.docInfo.begin();
316 ResultDocInfo_tarray::iterator lastdoc = tmp.docInfo.end();
317
318 while (thisdoc != lastdoc) {
319 recurse_contents (*thisdoc, args, fulltoc, bptr, metadata, getParents,
320 formatlistptr, formatlistmap, formatinfo, browsermap,
321 tabcount, collectproto, disp, outconvert, textout, logout);
322 thisdoc ++;
323 }
324 }
325}
326
327
328// expanded_contents recurses through all contents. there's a special case
329// for an HList when contents are expanded (i.e. it's displayed as a VList)
330//
331// if we're inside a document we expand all contents from the top,
332// if we're at classification level we'll just expand out those contents below
333// the current one
334
335void expanded_contents (cgiargsclass &args, int tabcount, bool fulltoc,
336 browsermapclass *browsermap, formatinfo_t &formatinfo,
337 recptproto *collectproto, displayclass &disp,
338 outconvertclass &outconvert, ostream &textout,
339 ostream &logout) {
340
341 if (args["d"].empty() && args["cl"].empty()) return;
342 text_t OID;
343
344 FilterResponse_t response;
345 bool getParents = false;
346 text_tset metadata;
347 text_t classifytype, classification, formatstring;
348
349 if (!args["d"].empty()) {
350 // document level
351 if (fulltoc) {
352 get_top (args["cl"], OID);
353 classification = OID;
354 }
355 else {
356 // always expand document level from top
357 get_top (args["d"], OID);
358 classification = "Document";
359 }
360 } else {
361 // classification level
362 OID = args["cl"];
363 get_top (args["cl"], classification);
364 }
365
366 // get classifytype of this level
367 text_t tOID;
368 if (is_top(OID)) {
369 classifytype = "thistype";
370 tOID = OID;
371 } else {
372 classifytype = "childtype";
373 tOID = get_parent (OID);
374 }
375 metadata.insert (classifytype);
376
377 if (!get_info (tOID, args["c"], metadata, getParents, collectproto, response, logout))
378 return;
379 classifytype = response.docInfo[0].metadata[classifytype].values[0];
380 // if we still don't have a classifytype we'll use the default
381 if (classifytype.empty()) {
382 browserclass *bptr = browsermap->get_default_browser ();
383 classifytype = bptr->get_browser_name ();
384 }
385
386 // HLists are displayed as VLists when contents are expanded,
387 // Paged documents are displayed as HLists
388 if (classifytype == "HList") {
389 classifytype = "VList";
390 text_t pOID = get_parent (OID);
391 if (!pOID.empty()) {
392 OID = pOID;
393 // this is assuming that top levels are always 'Invisible' !!!
394 if (is_top (OID)) classifytype = "Invisible";
395 }
396 }
397 if (classifytype == "Paged") classifytype = "HList";
398
399 metadata.erase (metadata.begin(), metadata.end());
400
401 // metadata elements needed by recurse_contents
402 metadata.insert ("childtype");
403 metadata.insert ("doctype");
404 metadata.insert ("haschildren");
405
406 // load up metadata array with browser defaults
407 browserclass *bptr = browsermap->getbrowser (classifytype);
408 bptr->load_metadata_defaults (metadata);
409
410 // get the formatstring if there is one or use the browsers default
411 if (!get_formatstring (classification, classifytype,
412 formatinfo.formatstrings, formatstring))
413 formatstring = bptr->get_default_formatstring();
414
415 format_t *formatlistptr = new format_t();
416 parse_formatstring (formatstring, formatlistptr, metadata, getParents);
417
418 // protocol call
419 if (!get_info (OID, args["c"], metadata, getParents, collectproto, response, logout))
420 return;
421
422 format_tmap formatlistmap;
423 formatlistmap[formatstring] = formatlistptr;
424
425 recurse_contents (response.docInfo[0], args, fulltoc, bptr, metadata,
426 getParents, formatlistptr, formatlistmap, formatinfo, browsermap,
427 tabcount, collectproto, disp, outconvert, textout, logout);
428
429 // clean up format list pointers
430 format_tmap::const_iterator here = formatlistmap.begin();
431 format_tmap::const_iterator end = formatlistmap.end();
432 while (here != end) {
433 delete (*here).second;
434 here ++;
435 }
436}
437
438
439static void load_formatstring (const text_t &classifytype, text_tset &metadata,
440 bool &getParents, const text_t &classification,
441 browsermapclass *browsermap, formatinfo_t &formatinfo,
442 format_tmap &formatlistmap) {
443 text_t formatstring;
444
445 // load up metadata array with browser defaults
446 browserclass *bptr = browsermap->getbrowser (classifytype);
447 bptr->load_metadata_defaults (metadata);
448
449 // get the formatstring if there is one or use the browsers default
450 if (!get_formatstring (classification, classifytype,
451 formatinfo.formatstrings, formatstring))
452 formatstring = bptr->get_default_formatstring();
453
454 // see if it's cached
455 format_tmap::const_iterator it = formatlistmap.find (formatstring);
456 if (it == formatlistmap.end()) {
457 format_t *formatlistptr = new format_t();
458 parse_formatstring (formatstring, formatlistptr, metadata, getParents);
459 formatlistmap[formatstring] = formatlistptr;
460 }
461}
462
463static void load_formatstrings (FilterResponse_t &response, text_tset &metadata,
464 bool &getParents, const text_t &classification,
465 browsermapclass *browsermap, formatinfo_t &formatinfo,
466 format_tmap &formatlistmap) {
467
468 text_tset cache;
469
470 ResultDocInfo_tarray::iterator thisdoc = response.docInfo.begin();
471 ResultDocInfo_tarray::iterator lastdoc = response.docInfo.end();
472
473 while (thisdoc != lastdoc) {
474
475 if (is_top ((*thisdoc).OID))
476 load_formatstring ((*thisdoc).metadata["thistype"].values[0], metadata,
477 getParents, classification, browsermap, formatinfo,
478 formatlistmap);
479
480 text_t &childtype = (*thisdoc).metadata["childtype"].values[0];
481 text_tset::const_iterator it = cache.find (childtype);
482 if (it == cache.end()) {
483 load_formatstring (childtype, metadata, getParents, classification,
484 browsermap, formatinfo, formatlistmap);
485 cache.insert (childtype);
486 }
487 thisdoc ++;
488 }
489}
490
491static void output_parents (FilterResponse_t &response, cgiargsclass &args,
492 browsermapclass *browsermap, formatinfo_t &formatinfo,
493 format_tmap &formatlistmap, const text_t &classification,
494 int &tabcount, text_tset &metadata, bool &getParents,
495 recptproto *collectproto, displayclass &disp,
496 outconvertclass &outconvert, ostream &textout,
497 ostream &logout) {
498
499 format_t *formatlistptr = NULL;
500 text_t classifytype, formatstring;
501 bool use_table, first = true;
502 ResultDocInfo_tarray::iterator thisparent = response.docInfo.begin();
503 ResultDocInfo_tarray::iterator lastparent = response.docInfo.end();
504 while (thisparent != lastparent) {
505
506 // get classifytype of this level
507 if (is_top ((*thisparent).OID)) classifytype = (*thisparent).metadata["thistype"].values[0];
508 else if (!first) classifytype = (*(thisparent-1)).metadata["childtype"].values[0];
509
510 // if we still don't have a classifytype we'll use the default
511 if (classifytype.empty()) {
512 browserclass *bptr = browsermap->get_default_browser ();
513 classifytype = bptr->get_browser_name ();
514 }
515
516 browserclass *bptr = browsermap->getbrowser (classifytype);
517
518 // get the formatstring if there is one or use the browsers default
519 if (!get_formatstring (classification, classifytype,
520 formatinfo.formatstrings, formatstring))
521 formatstring = bptr->get_default_formatstring();
522
523 // see if it's cached
524 format_tmap::const_iterator it = formatlistmap.find (formatstring);
525 if (it != formatlistmap.end()) formatlistptr = (*it).second;
526 else {
527 logout << "browsetools error\n";
528 return;
529 }
530
531 use_table = is_table_content (formatlistptr);
532 tabcount += bptr->output_section_group (*thisparent, args, "", tabcount, formatlistptr,
533 use_table, metadata, getParents, collectproto,
534 disp, outconvert, textout, logout);
535 first = false;
536 thisparent ++;
537 }
538}
539
540void contracted_contents (cgiargsclass &args, int tabcount, bool fulltoc,
541 browsermapclass *browsermap, formatinfo_t &formatinfo,
542 recptproto *collectproto, displayclass &disp,
543 outconvertclass &outconvert, ostream &textout,
544 ostream &logout) {
545
546 FilterResponse_t response;
547 text_tset metadata;
548 bool getParents = false;
549 text_t formatstring;
550 text_tarray parents;
551 text_t OID = args["d"];
552 text_t classification = "Document";
553 if (OID.empty()) {
554 OID = args["cl"];
555 get_top (OID, classification);
556 } else if (fulltoc)
557 get_top (args["cl"], classification);
558
559 bool haschildren = has_children (OID, args["c"], collectproto, logout);
560
561 if ((!args["d"].empty()) && fulltoc)
562 get_parents_array (args["cl"] + ".fc", parents);
563 if (haschildren) get_parents_array (OID + ".fc", parents);
564 else get_parents_array (OID, parents);
565
566 if (!parents.empty()) {
567 // get classifytypes of each parent
568 metadata.insert ("thistype");
569 metadata.insert ("childtype");
570
571 if (!get_info (parents, args["c"], metadata, getParents, collectproto, response, logout))
572 return;
573
574 // get formatstrings for all parents
575 format_tmap formatlistmap;
576 load_formatstrings (response, metadata, getParents, classification,
577 browsermap, formatinfo, formatlistmap);
578
579 if (!get_info (parents, args["c"], metadata, getParents, collectproto, response, logout))
580 return;
581
582 // display each parent
583 output_parents (response, args, browsermap, formatinfo, formatlistmap,
584 classification, tabcount, metadata, getParents,
585 collectproto, disp, outconvert, textout, logout);
586
587 metadata.erase (metadata.begin(), metadata.end());
588
589 // clean up cached format list pointers
590 format_tmap::const_iterator here = formatlistmap.begin();
591 format_tmap::const_iterator end = formatlistmap.end();
592 while (here != end) {
593 delete (*here).second;
594 here ++;
595 }
596 }
597
598 // get childrens classifytype
599 text_t classifytype;
600 int numparents = response.docInfo.size();
601 if (!parents.empty())
602 classifytype = response.docInfo[numparents-1].metadata["childtype"].values[0];
603 else {
604 // use the default
605 browserclass *bptr = browsermap->get_default_browser ();
606 classifytype = bptr->get_browser_name ();
607 }
608
609 // load up metadata array with browser defaults
610 browserclass *bptr = browsermap->getbrowser (classifytype);
611 bptr->load_metadata_defaults (metadata);
612
613 // get the formatstring if there is one or use the browsers default
614 if (!get_formatstring (classification, classifytype,
615 formatinfo.formatstrings, formatstring))
616 formatstring = bptr->get_default_formatstring();
617
618 format_t *formatlistptr = new format_t();
619 parse_formatstring (formatstring, formatlistptr, metadata, getParents);
620
621 if (haschildren)
622 get_children (OID, args["c"], metadata, getParents,
623 collectproto, response, logout);
624 else
625 get_children (OID + ".pr", args["c"], metadata, getParents,
626 collectproto, response, logout);
627
628 // display children
629 bool use_table = is_table_content (formatlistptr);
630 bptr->output_section_group (response, args, "", tabcount, formatlistptr, use_table,
631 metadata, getParents, collectproto, disp, outconvert,
632 textout, logout);
633
634 delete formatlistptr;
635}
636
637void output_toc (cgiargsclass &args, browsermapclass *browsermap,
638 formatinfo_t &formatinfo, recptproto *collectproto,
639 displayclass &disp, outconvertclass &outconvert,
640 ostream &textout, ostream &logout) {
641
642 int tabcount = 0;
643 bool havecontrols = false;
644 bool fulltoc = false;
645
646 if (args["cl"] != "search") {
647 // see if there's a FullTOC string
648 text_t cl_top, full_toc;
649 get_top (args["cl"], cl_top);
650 if (get_formatstring (cl_top, "FullTOC", formatinfo.formatstrings, full_toc))
651 if (full_toc == "true") fulltoc = true;
652 }
653
654 // get the cover image (if there is one) and the control buttons
655 // if we're inside a book
656 if ((!fulltoc) && (!args["d"].empty())) {
657 textout << "<p><table cellpadding=0 cellspacing=0><tr>\n";
658 textout << "<td valign=top";
659 if (formatinfo.DocumentContents) textout << " width=200>\n";
660 else textout << " width=100%>\n";
661 if (formatinfo.DocumentImages)
662 output_cover_image (args, collectproto, disp, outconvert, textout, logout);
663 else if (formatinfo.DocumentTitles)
664 output_titles (args, collectproto, formatinfo, disp, outconvert, textout, logout);
665 output_controls (args, formatinfo.DocumentButtons, collectproto, disp,
666 outconvert, textout, logout);
667 textout << "</td><td valign=top>\n";
668 havecontrols = true;
669 }
670
671 if (formatinfo.DocumentContents || args["d"].empty()) {
672 if (args.getintarg("gc") == 1) {
673
674 // expanded table of contents
675 expanded_contents (args, tabcount, fulltoc, browsermap, formatinfo,
676 collectproto, disp, outconvert, textout, logout);
677 } else {
678
679 // contracted table of contents
680 contracted_contents (args, tabcount, fulltoc, browsermap, formatinfo,
681 collectproto, disp, outconvert, textout, logout);
682 }
683 }
684
685 if (havecontrols) textout << "</td></tr></table>\n";
686}
687
688
689
Note: See TracBrowser for help on using the repository browser.