Subversion Repositories Kolibri OS

Rev

Rev 6058 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 6058 Rev 6059
Line 51... Line 51...
51
			line_length = 0;
51
			line_length = 0;
52
		}
52
		}
53
	}
53
	}
54
	if (draw==false) {
54
	if (draw==false) {
55
		list.count = stroka_y/list.item_h+2;
55
		list.count = stroka_y/list.item_h+3;
56
		if (list.count < list.visible) list.count = list.visible;
56
		if (list.count < list.visible) list.count = list.visible;
57
		label.size.height = list.count+1*list.item_h;
57
		label.size.height = list.count+5*list.item_h;
58
		label.raw_size = 0;
58
		label.raw_size = 0;
59
	} 
59
	} 
60
	if (draw==true) WriteTextIntoBuf(8, stroka_y, 0x000000, line_start);
60
	if (draw==true) WriteTextIntoBuf(8, stroka_y, 0x000000, line_start);
61
}
61
}
62
 
62
 
Line 169... Line 169...
169
			if (tag.nameis("title")) {
169
			if (tag.nameis("title")) {
170
				strcpy(#title, text.start);
170
				strcpy(#title, text.start);
171
				continue;
171
				continue;
172
			}
172
			}
173
			while (get_label_len(text.start) + stroka_x + 30 > list.w)
173
			strtrim(text.start);
-
 
174
			while (get_label_len(text.start) + stroka_x + 30 > list.w)
174
			{
175
			{
175
				zeroch = 0;
176
				zeroch = 0;
176
				for (line_break=tag.start-1; line_break>text.start; line_break--;)
177
				for (line_break=tag.start-1; line_break>text.start; line_break--;)
177
				{
178
				{
178
					ESBYTE[line_break] >< zeroch; //set line end
179
					ESBYTE[line_break] >< zeroch; //set line end
Line 184... Line 185...
184
						link.add(stroka_x,stroka_y,get_label_len(text.start),list.item_h,text.start," ");
185
						link.add(stroka_x,stroka_y,get_label_len(text.start),list.item_h,text.start," ");
185
						label_draw_bar(stroka_x, stroka_y+label.size.pt+1, get_label_len(text.start), style.color);
186
						label_draw_bar(stroka_x, stroka_y+label.size.pt+1, get_label_len(text.start), style.color);
186
					}
187
					}
187
					WriteTextIntoBuf(stroka_x, stroka_y, style.color, text.start);
188
					WriteTextIntoBuf(stroka_x, stroka_y, style.color, text.start);
188
				}
189
					stroka_x+=char_width[' '];
-
 
190
				}
189
				ESBYTE[line_break] >< zeroch; //restore line
191
				ESBYTE[line_break] >< zeroch; //restore line
190
				text.start = line_break;
192
				text.start = line_break;
191
				stroka_x = HTML_PADDING_X;
193
				stroka_x = HTML_PADDING_X;
192
				stroka_y += list.item_h;
194
				stroka_y += list.item_h;
193
			}
195
			}
Line 196... Line 198...
196
					link.add(stroka_x,stroka_y,get_label_len(text.start),list.item_h,text.start," ");	
198
					link.add(stroka_x,stroka_y,get_label_len(text.start),list.item_h,text.start," ");	
197
					label_draw_bar(stroka_x, stroka_y+label.size.pt+1, get_label_len(text.start), style.color);
199
					label_draw_bar(stroka_x, stroka_y+label.size.pt+1, get_label_len(text.start), style.color);
198
				}
200
				}
199
				WriteTextIntoBuf(stroka_x, stroka_y, style.color, text.start);
201
				WriteTextIntoBuf(stroka_x, stroka_y, style.color, text.start);
200
			}
202
				stroka_x+=char_width[' '];
-
 
203
			}
201
			stroka_x += get_label_len(text.start);
204
			stroka_x += get_label_len(text.start);
202
		}
205
		}
203
		if (ch=='>') {
206
		if (ch=='>') {
204
			ESBYTE[DOM_pos] = '\0';
207
			ESBYTE[DOM_pos] = '\0';
205
			text.start = DOM_pos + 1;
208
			text.start = DOM_pos + 1;
206
			tag.parce();
209
			tag.parce();
207
			if (tag.nameis("br")) || (tag.nameis("p")) || (tag.nameis("div")) || (tag.nameis("h1")) || (tag.nameis("h2")) {
210
			if (tag.nameis("br")) 
-
 
211
				|| (tag.nameis("p")) 
-
 
212
				|| (tag.nameis("div")) 
-
 
213
				|| (tag.nameis("tr")) {
-
 
214
				stroka_y+= list.item_h;
-
 
215
				stroka_x = HTML_PADDING_X;
-
 
216
				continue;
-
 
217
			}
-
 
218
			if 	(tag.nameis("h1")) || (tag.nameis("/h1"))
-
 
219
				|| (tag.nameis("h2")) || (tag.nameis("/h2")) {
208
				stroka_y+= list.item_h;
220
					stroka_y+= list.item_h;
209
				stroka_x = HTML_PADDING_X;
221
					stroka_x = HTML_PADDING_X;
210
				continue;
222
					continue;					
211
			}
223
				}
212
			if (tag.nameis("script")) || (tag.nameis("style")) style.ignore = true;
224
			if (tag.nameis("script")) || (tag.nameis("style")) style.ignore = true;
213
			if (tag.nameis("/script")) || (tag.nameis("/style")) style.ignore = false;
225
			if (tag.nameis("/script")) || (tag.nameis("/style")) style.ignore = false;
Line 215... Line 227...
215
			if (tag.nameis("/a")) { style.a = false; style.color=0x000000; }
227
			if (tag.nameis("/a")) { style.a = false; style.color=0x000000; }
216
		}		
228
		}		
217
	}
229
	}
218
	if (draw==false) {
230
	if (draw==false) {
219
		list.count = stroka_y/list.item_h+2;
231
		list.count = stroka_y/list.item_h+3;
220
		if (list.count < list.visible) list.count = list.visible;
232
		if (list.count < list.visible) list.count = list.visible;
221
		label.size.height = list.count+1*list.item_h;
233
		label.size.height = list.count+5*list.item_h;
222
		label.raw_size = 0;
234
		label.raw_size = 0;
223
	}
235
	}
224
	free(DOM.start);
236
	free(DOM.start);
225
}
237
}
226
238
227
239