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 |
|
---|
38 | class browsetoolsclass
|
---|
39 | {
|
---|
40 | public:
|
---|
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 | virtual text_t get_assocfile_path();
|
---|
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 |
|
---|
56 | virtual void expanded_contents(cgiargsclass &args, int tabcount, bool fulltoc,
|
---|
57 | browsermapclass *browsermap, formatinfo_t &formatinfo,
|
---|
58 | recptproto *collectproto, displayclass &disp,
|
---|
59 | outconvertclass &outconvert, ostream &textout,
|
---|
60 | ostream &logout, bool expand_from_current_level);
|
---|
61 |
|
---|
62 | virtual void expand_show_contents(cgiargsclass &args, int tabcount, bool fulltoc,
|
---|
63 | browsermapclass *browsermap, formatinfo_t &formatinfo,
|
---|
64 | recptproto *collectproto, displayclass &disp,
|
---|
65 | outconvertclass &outconvert, ostream &textout,
|
---|
66 | ostream &logout);
|
---|
67 |
|
---|
68 | virtual void contracted_contents(cgiargsclass &args, int tabcount, bool fulltoc,
|
---|
69 | browsermapclass *browsermap, formatinfo_t &formatinfo,
|
---|
70 | recptproto *collectproto, displayclass &disp,
|
---|
71 | outconvertclass &outconvert, ostream &textout,
|
---|
72 | ostream &logout);
|
---|
73 |
|
---|
74 | protected:
|
---|
75 |
|
---|
76 | typedef map<text_t, format_t*, lttext_t> format_tmap;
|
---|
77 |
|
---|
78 | virtual void recurse_contents_levels(text_tarray &parents, cgiargsclass &args, int coloffset,
|
---|
79 | int tabcount, bool fulltoc, browsermapclass *browsermap,
|
---|
80 | formatinfo_t &formatinfo, recptproto *collectproto,
|
---|
81 | displayclass &disp, outconvertclass &outconvert,
|
---|
82 | ostream &textout, 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 §ion, 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 | #endif
|
---|