Changeset 12183
- Timestamp:
- 2006-07-12T21:48:07+12:00 (17 years ago)
- Location:
- trunk/gsdl/src/recpt
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl/src/recpt/browsetoolsclass.cpp
r12044 r12183 214 214 // for an HList when contents are expanded (i.e. it's displayed as a VList) 215 215 // 216 // if we're inside a document we expand all contents from the top ,217 // if we're at classification level we'll just expand out those contents below218 // the current one216 // if we're inside a document we expand all contents from the top (unless 217 // expand_from_current_level is true), if we're at classification level we'll just 218 // expand out those contents below the current one 219 219 220 220 void browsetoolsclass::expanded_contents(cgiargsclass &args, int tabcount, bool fulltoc, … … 222 222 recptproto *collectproto, displayclass &disp, 223 223 outconvertclass &outconvert, ostream &textout, 224 ostream &logout )224 ostream &logout, bool expand_from_current_level) 225 225 { 226 226 if (args["d"].empty() && args["cl"].empty()) return; … … 232 232 text_t classifytype, classification, formatstring; 233 233 234 if (!args["d"].empty()) { 235 // document level 236 if (fulltoc) { 237 get_top (args["cl"], OID); 238 classification = OID; 239 } 240 else { 241 // always expand document level from top 242 get_top (args["d"], OID); 243 classification = "Document"; 244 } 245 } else { 246 // classification level 247 OID = args["cl"]; 248 get_top (args["cl"], classification); 249 } 234 if (!args["d"].empty()) 235 { 236 // document level 237 if (fulltoc) 238 { 239 get_top(args["cl"], OID); 240 classification = OID; 241 } 242 else 243 { 244 classification = "Document"; 245 if (expand_from_current_level) 246 { 247 OID = args["d"]; 248 } 249 else 250 { 251 // Always expand document level from top, unless 252 // expand_from_current_level is true. 253 get_top(args["d"], OID); 254 } 255 } 256 } 257 else 258 { 259 // classification level 260 OID = args["cl"]; 261 get_top(args["cl"], classification); 262 } 250 263 251 264 // get classifytype of this level … … 815 828 816 829 } 817 if (args.getintarg("gc") == 1) { 818 819 // expanded table of contents 820 expanded_contents (args, tabcount, fulltoc, browsermap, formatinfo, 821 collectproto, disp, outconvert, textout, logout); 822 } else if (args.getintarg("gc") == 2) { 823 824 // expand visible levels of table of contents 825 expand_show_contents(args, tabcount, fulltoc, browsermap, formatinfo, 826 collectproto, disp, outconvert, textout, logout); 827 } else { 828 829 // contracted table of contents 830 contracted_contents (args, tabcount, fulltoc, browsermap, formatinfo, 831 collectproto, disp, outconvert, textout, logout); 832 } 830 if (args.getintarg("gc") == 1) 831 { 832 // expanded table of contents 833 expanded_contents(args, tabcount, fulltoc, browsermap, formatinfo, 834 collectproto, disp, outconvert, textout, logout, false); 835 } 836 else if (args.getintarg("gc") == 2) 837 { 838 // expand visible levels of table of contents 839 expand_show_contents(args, tabcount, fulltoc, browsermap, formatinfo, 840 collectproto, disp, outconvert, textout, logout); 841 } 842 else 843 { 844 // contracted table of contents 845 contracted_contents(args, tabcount, fulltoc, browsermap, formatinfo, 846 collectproto, disp, outconvert, textout, logout); 847 } 833 848 textout << outconvert << "</div>\n"; 834 849 } … … 850 865 { 851 866 expanded_contents(args, 0, false, browsers, formatinfo, collectproto, 852 disp, outconvert, *tmpstr, logout );867 disp, outconvert, *tmpstr, logout, false); 853 868 } 854 869 else -
trunk/gsdl/src/recpt/browsetoolsclass.h
r12044 r12183 54 54 displayclass &disp, outconvertclass &outconvert, ostream &logout); 55 55 56 protected:57 58 typedef map<text_t, format_t*, lttext_t> format_tmap;59 60 56 virtual void expanded_contents(cgiargsclass &args, int tabcount, bool fulltoc, 61 57 browsermapclass *browsermap, formatinfo_t &formatinfo, 62 58 recptproto *collectproto, displayclass &disp, 63 59 outconvertclass &outconvert, ostream &textout, 64 ostream &logout );60 ostream &logout, bool expand_from_current_level); 65 61 66 62 virtual void expand_show_contents(cgiargsclass &args, int tabcount, bool fulltoc, … … 70 66 ostream &logout); 71 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 72 78 virtual void recurse_contents_levels(text_tarray &parents, cgiargsclass &args, int coloffset, 73 79 int tabcount, bool fulltoc, browsermapclass *browsermap, … … 75 81 displayclass &disp, outconvertclass &outconvert, 76 82 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 83 84 84 virtual void output_titles(cgiargsclass &args, recptproto *collectproto, … … 120 120 outconvertclass &outconvert, ostream &textout, 121 121 ostream &logout); 122 123 124 125 122 }; 126 123
Note:
See TracChangeset
for help on using the changeset viewer.