Subversion Repositories Kolibri OS

Rev

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

Rev 6001 Rev 6021
Line 88... Line 88...
88
	{
88
	{
89
		start_x = stolbec * list.font_w + body_magrin * DrawBuf.zoom + list.x;
89
		start_x = stolbec * list.font_w + body_magrin * DrawBuf.zoom + list.x;
90
		start_y = stroka * list.item_h + body_magrin;
90
		start_y = stroka * list.item_h + body_magrin;
91
		stolbec_len = utf8_strlen(#line) * DrawBuf.zoom;
91
		stolbec_len = strlen(#line) * DrawBuf.zoom;
92
		line_length = stolbec_len * list.font_w;
92
		line_length = stolbec_len * list.font_w;
93
 
93
 
Line 94... Line 94...
94
		if (style.h) stroka++;
94
		if (style.h) stroka++;
95
		WriteBufText(start_x, start_y, list.font_type, text_colors[text_color_index], #line, buf_data);
95
		WriteBufText(start_x, start_y, list.font_type, text_colors[text_color_index], #line, buf_data);
96
		if (style.b) WriteBufText(start_x+1, start_y, list.font_type, text_colors[text_color_index], #line, buf_data);
96
		if (style.b) WriteBufText(start_x+1, start_y, list.font_type, text_colors[text_color_index], #line, buf_data);
Line 210... Line 210...
210
		default:
210
		default:
211
			DEFAULT_MARK:
211
			DEFAULT_MARK:
212
			if (bukva<=15) bukva=' ';
212
			if (bukva<=15) bukva=' ';
213
			line_len = utf8_strlen(#line);
213
			line_len = strlen(#line);
214
			if (!style.pre) && (bukva == ' ')
214
			if (!style.pre) && (bukva == ' ')
215
			{
215
			{
216
				if (line[line_len-1]==' ') break; //no double spaces
216
				if (line[line_len-1]==' ') break; //no double spaces
217
				if (!stolbec) && (!line) break; //no paces at the beginning of the line
217
				if (!stolbec) && (!line) break; //no paces at the beginning of the line
218
			}
218
			}
219
			if (line_len < sizeof(line)) chrcat(#line, bukva);
219
			if (line_len < sizeof(line)) chrcat(#line, bukva);
220
			Perenos();
220
			Perenos();
Line 236... Line 236...
236
{
236
{
237
	int perenos_num;
237
	int perenos_num;
238
	char new_line_text[4096];
238
	char new_line_text[4096];
239
	if (utf8_strlen(#line)*DrawBuf.zoom + stolbec < list.column_max) return;
239
	if (strlen(#line)*DrawBuf.zoom + stolbec < list.column_max) return;
240
	perenos_num = strrchr(#line, ' ');
240
	perenos_num = strrchr(#line, ' ');
241
	if (!perenos_num) && (utf8_strlen(#line)*DrawBuf.zoom>list.column_max) perenos_num=list.column_max/DrawBuf.zoom;
241
	if (!perenos_num) && (strlen(#line)*DrawBuf.zoom>list.column_max) perenos_num=list.column_max/DrawBuf.zoom;
242
	strcpy(#new_line_text, #line + perenos_num);
242
	strcpy(#new_line_text, #line + perenos_num);
243
	line[perenos_num] = 0x00;
243
	line[perenos_num] = 0x00;
244
	DrawStyle();
244
	DrawStyle();
245
	strcpy(#line, #new_line_text);
245
	strcpy(#line, #new_line_text);
246
	NewLine();
246
	NewLine();
247
}
247
}
248
//============================================================================================
248
//============================================================================================