Rev 8462 | Rev 8491 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 8462 | Rev 8490 | ||
---|---|---|---|
Line 113... | Line 113... | ||
113 | memmov(o_bufpointer, bufpointer, bufsize); |
113 | memmov(o_bufpointer, bufpointer, bufsize); |
114 | if (custom_encoding != -1) { |
114 | if (custom_encoding != -1) { |
115 | cur_encoding = custom_encoding; |
115 | cur_encoding = custom_encoding; |
116 | bufpointer = ChangeCharset(cur_encoding, "CP866", bufpointer); |
116 | bufpointer = ChangeCharset(cur_encoding, "CP866", bufpointer); |
117 | } |
117 | } |
- | 118 | list.SetFont(8, 14, 10011000b); |
|
118 | } |
119 | } |
119 | //============================================================================================ |
120 | //============================================================================================ |
120 | void TWebBrowser::ParseHtml(dword _bufpointer, _bufsize){ |
121 | void TWebBrowser::ParseHtml(dword _bufpointer, _bufsize){ |
121 | char unicode_symbol[10]; |
122 | char unicode_symbol[10]; |
122 | dword j; |
123 | dword j; |
Line 148... | Line 149... | ||
148 | case 0x0a: |
149 | case 0x0a: |
149 | if (style.pre) { |
150 | if (style.pre) { |
150 | Render(); |
151 | Render(); |
151 | NewLine(); |
152 | NewLine(); |
152 | } else { |
153 | } else { |
153 | AddCharToTheLine(0x0a); |
154 | AddCharToTheLine(' '); |
154 | } |
155 | } |
155 | break; |
156 | break; |
156 | case 0x09: |
157 | case 0x09: |
157 | if (style.pre) { |
158 | if (style.pre) { |
158 | tab_len = draw_x - left_gap / list.font_w + strlen(#line) % 4; |
159 | tab_len = draw_x - left_gap / list.font_w + strlen(#line) % 4; |
159 | if (!tab_len) tab_len = 4; else tab_len = 4 - tab_len; |
160 | if (!tab_len) tab_len = 4; else tab_len = 4 - tab_len; |
160 | for (j=0; j |
161 | for (j=0; j |
161 | } else { |
162 | } else { |
162 | AddCharToTheLine(0x09); |
163 | AddCharToTheLine(' '); |
163 | } |
164 | } |
164 | break; |
165 | break; |
165 | case '&': // and so on |
166 | case '&': // and so on |
166 | for (j=1, unicode_symbol=0; (ESBYTE[bufpos+j]<>';') && (!__isWhite(ESBYTE[bufpos+j])) && (j<8); j++) |
167 | for (j=1, unicode_symbol=0; (ESBYTE[bufpos+j]<>';') && (!__isWhite(ESBYTE[bufpos+j])) && (j<8); j++) |
167 | { |
168 | { |
Line 174... | Line 175... | ||
174 | AddCharToTheLine('&'); |
175 | AddCharToTheLine('&'); |
175 | } |
176 | } |
176 | break; |
177 | break; |
177 | case '<': |
178 | case '<': |
178 | if (!is_html) goto _DEFAULT; |
179 | if (!is_html) goto _DEFAULT; |
- | 180 | if (!strchr("!/?abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ", ESBYTE[bufpos+1])) goto _DEFAULT; |
|
179 | bufpos++; |
181 | bufpos++; |
180 | switch (ESBYTE[bufpos]) { |
- | |
181 | case '!': case '/': case '?': |
- | |
182 | case 'a'...'z': case 'A'...'Z': |
- | |
183 | goto _TAG; |
- | |
184 | default: |
- | |
185 | goto _DEFAULT; |
- | |
186 | } |
- | |
187 | _TAG: |
- | |
188 | if (tag.parse(#bufpos, bufpointer + bufsize)) { |
182 | if (tag.parse(#bufpos, bufpointer + bufsize)) { |
189 | CheckForLineBreak(); |
183 | CheckForLineBreak(); |
190 | Render(); |
184 | Render(); |
191 | $push cur_encoding |
185 | $push cur_encoding |
192 | SetStyle(); |
186 | SetStyle(); |
Line 312... | Line 306... | ||
312 | scroll_wv.position = list.first; |
306 | scroll_wv.position = list.first; |
313 | scroll_wv.all_redraw = 0; |
307 | scroll_wv.all_redraw = 0; |
314 | scroll_wv.start_x = list.x + list.w; |
308 | scroll_wv.start_x = list.x + list.w; |
315 | scroll_wv.start_y = list.y; |
309 | scroll_wv.start_y = list.y; |
316 | scroll_wv.size_y = list.h; |
310 | scroll_wv.size_y = list.h; |
317 | scrollbar_v_draw(#scroll_wv); |
- | |
Line -... | Line 311... | ||
- | 311 | ||
- | 312 | if (list.count <= list.visible) { |
|
- | 313 | DrawBar(scroll_wv.start_x, scroll_wv.start_y, scroll_wv.size_x, |
|
- | 314 | scroll_wv.size_y, bg_colors.get(0) & 0x00FFFFFF); |
|
- | 315 | } else { |
|
- | 316 | scrollbar_v_draw(#scroll_wv); |
|
318 | 317 | } |
|
319 | }>>=15)>': |
318 | }=>>>=15)>': |