source: trunk/gsdl/src/recpt/browsetoolsclass.h@ 12044

Last change on this file since 12044 was 12044, checked in by sjboddie, 18 years ago

Wrapped browsetools up into a class and renamed it browsetoolsclass. The
intention of this change is only to make it easier to customise, and it
shouldn't make any functional difference. One exception to this is the
removal of some old code (notably some code for RelatedDocs) which is
now obsolete (I hope).

  • Property svn:keywords set to Author Date Id Revision
File size: 6.1 KB
Line 
1/**********************************************************************
2 *
3 * browsetools.h --
4 * Copyright (C) 1999 The New Zealand Digital Library Project
5 *
6 * A component of the Greenstone digital library software
7 * from the New Zealand Digital Library Project at the
8 * University of Waikato, New Zealand.
9 *
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 2 of the License, or
13 * (at your option) any later version.
14 *
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
19 *
20 * You should have received a copy of the GNU General Public License
21 * along with this program; if not, write to the Free Software
22 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
23 *
24 *********************************************************************/
25
26
27#ifndef BROWSETOOLSCLASS_H
28#define BROWSETOOLSCLASS_H
29
30#include "gsdlconf.h"
31#include "text_t.h"
32#include "cgiargs.h"
33#include "display.h"
34#include "recptproto.h"
35#include "formattools.h"
36#include "browserclass.h"
37
38class browsetoolsclass
39{
40public:
41
42 browsetoolsclass();
43 virtual ~browsetoolsclass();
44
45 virtual void output_toc(cgiargsclass &args, browsermapclass *browsermap,
46 formatinfo_t &formatinfo, recptproto *collectproto,
47 displayclass &disp, outconvertclass &outconvert,
48 ostream &textout, ostream &logout);
49
50 virtual text_t get_cover_image();
51
52 virtual void load_extended_options(text_tmap &options, cgiargsclass &args, browsermapclass *browsers,
53 formatinfo_t &formatinfo, recptproto *collectproto,
54 displayclass &disp, outconvertclass &outconvert, ostream &logout);
55
56protected:
57
58 typedef map<text_t, format_t*, lttext_t> format_tmap;
59
60 virtual void expanded_contents(cgiargsclass &args, int tabcount, bool fulltoc,
61 browsermapclass *browsermap, formatinfo_t &formatinfo,
62 recptproto *collectproto, displayclass &disp,
63 outconvertclass &outconvert, ostream &textout,
64 ostream &logout);
65
66 virtual void expand_show_contents(cgiargsclass &args, int tabcount, bool fulltoc,
67 browsermapclass *browsermap, formatinfo_t &formatinfo,
68 recptproto *collectproto, displayclass &disp,
69 outconvertclass &outconvert, ostream &textout,
70 ostream &logout);
71
72 virtual void recurse_contents_levels(text_tarray &parents, cgiargsclass &args, int coloffset,
73 int tabcount, bool fulltoc, browsermapclass *browsermap,
74 formatinfo_t &formatinfo, recptproto *collectproto,
75 displayclass &disp, outconvertclass &outconvert,
76 ostream &textout, ostream &logout);
77
78 virtual void contracted_contents(cgiargsclass &args, int tabcount, bool fulltoc,
79 browsermapclass *browsermap, formatinfo_t &formatinfo,
80 recptproto *collectproto, displayclass &disp,
81 outconvertclass &outconvert, ostream &textout,
82 ostream &logout);
83
84 virtual void output_titles(cgiargsclass &args, recptproto *collectproto,
85 browsermapclass *browsermap, formatinfo_t &formatinfo,
86 displayclass &disp, outconvertclass &outconvert,
87 ostream &textout, ostream &logout);
88
89 virtual void output_controls(cgiargsclass &args, const text_tarray &ibuttons,
90 recptproto *collectproto, displayclass &disp,
91 outconvertclass &outconvert, ostream &textout,
92 ostream &logout);
93
94 virtual void output_cover_image(cgiargsclass &args, recptproto *collectproto,
95 displayclass &disp, outconvertclass &outconvert,
96 ostream &textout, ostream &logout);
97
98 virtual void recurse_contents(ResultDocInfo_t &section, cgiargsclass &args, bool fulltoc,
99 browserclass *bptr, text_tset &metadata, bool &getParents,
100 format_t *formatlistptr, format_tmap &formatlistmap,
101 formatinfo_t &formatinfo, browsermapclass *browsermap,
102 int tabcount, recptproto *collectproto, displayclass &disp,
103 outconvertclass &outconvert, ostream &textout, ostream &logout);
104
105 virtual void load_formatstring(const text_t &classifytype, text_tset &metadata,
106 bool &getParents, const text_t &classification,
107 browsermapclass *browsermap, formatinfo_t &formatinfo,
108 format_tmap &formatlistmap);
109
110 virtual void load_formatstrings(FilterResponse_t &response, text_tset &metadata,
111 bool &getParents, const text_t &classification,
112 browsermapclass *browsermap, formatinfo_t &formatinfo,
113 format_tmap &formatlistmap);
114
115 virtual void output_parents(FilterResponse_t &response, cgiargsclass &args,
116 browsermapclass *browsermap, formatinfo_t &formatinfo,
117 format_tmap &formatlistmap, const text_t &classification,
118 int &tabcount, text_tset &metadata, bool &getParents,
119 recptproto *collectproto, displayclass &disp,
120 outconvertclass &outconvert, ostream &textout,
121 ostream &logout);
122
123
124
125};
126
127#endif
Note: See TracBrowser for help on using the repository browser.