217: #line 306 "web_weaver.ipk" 218: def _write_section_ref(self, filename, i, text=None): 219: if not text: text = str(i) 220: name = filename + '['+str(i)+']' 221: anchor = self.get_anchor(name) 222: if anchor: 223: anchor = '<A HREF="'+anchor+'">'+text+'</A>' 224: self._writeline (anchor+' ') 225: 226: def code_head(self,tangler, secno): 227: dst_filename = tangler.sink.name 228: self.set_anchor(dst_filename+'['+str(secno)+']') 229: self._endmode() 230: filename =tangler.sink.get_sink_name() 231: language = tangler.get_language() 232: dict = self.master.section_index 233: if dict.has_key(filename): 234: nsections = len(dict[filename]) 235: else: nsections = 0 236: w = self._write 237: wl = self._writeline 238: w ( '<DIV CLASS="CODE_SECTION_HEAD"><SMALL>Start <EM>'+\ 239: language+'</EM> section to <STRONG>'+\ 240: filename+'['+str(secno)) 241: if nsections: w('/'+str(nsections)) 242: w(']</STRONG></SMALL>') 243: 244: if nsections: 245: if secno != nsections: 246: self._write_section_ref(filename, secno+1, 'Next') 247: if secno!=1: 248: self._write_section_ref(filename, secno-1, 'Prev') 249: if secno !=1: 250: self._write_section_ref(filename, 0, 'First') 251: if secno != nsections: 252: self._write_section_ref(filename, nsections, 'Last') 253: wl ('</DIV>') 254: wl ( '<DIV CLASS="CODE">') 255: