Subversion Repositories Kolibri OS

Rev

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

Rev 5987 Rev 5995
Line 2... Line 2...
2
{
2
{
3
	char line[4096]=0;
3
	char line[4096]=0;
4
	char char_width[255];
4
	char char_width[255];
5
	dword line_start;
5
	dword line_start;
6
	byte ch;
6
	byte ch;
7
	dword bufoff;
7
	dword bufoff, buflen;
8
	dword line_length=30;
8
	dword line_length=30;
9
	dword stroka_y = 5;
9
	dword stroka_y = 5;
10
	dword stroka=0;
10
	dword stroka=0;
11
	int i, srch_pos;
11
	int i, srch_pos;
Line 12... Line 12...
12
	
12
 
13
	label.changeSIZE();
13
	label.changeSIZE();
14
	list.w = Form.cwidth-scroll.size_x-1;
14
	list.w = Form.cwidth-scroll.size_x-1;
15
	//get font chars width, need to increase performance
15
	//get font chars width, need to increase performance
16
	for (i=0; i<256; i++) char_width[i] = label.symbol_size(i);
16
	for (i=0; i<256; i++) char_width[i] = label.symbol_size(i);
-
 
17
	//get font buffer height
17
	//get font buffer height
18
	buflen = strlen(io.buffer_data) + io.buffer_data;
18
	for (bufoff=io.buffer_data; ESBYTE[bufoff]; bufoff++)
19
	for (bufoff=io.buffer_data; bufoff
19
	{
20
	{
20
		ch = ESBYTE[bufoff];
21
		ch = ESBYTE[bufoff];
21
		line_length += char_width[ch];
22
		line_length += char_width[ch];
22
		if (line_length>=list.w) || (ch==10) {
23
		if (line_length>=list.w) || (ch==10) {
Line 40... Line 41...
40
	label.size.height = list.count+1*list.item_h;
41
	label.size.height = list.count+1*list.item_h;
41
	label.raw_size = 0;
42
	label.raw_size = 0;
Line 42... Line 43...
42
 
43
 
43
	line_length = 30;
44
	line_length = 30;
44
	line_start = io.buffer_data;
45
	line_start = io.buffer_data;
45
	for (bufoff=io.buffer_data; ESBYTE[bufoff]; bufoff++)
46
	for (bufoff=io.buffer_data; bufoff
46
	{
47
	{
47
		ch = ESBYTE[bufoff];
48
		ch = ESBYTE[bufoff];
48
		line_length += char_width[ch];
49
		line_length += char_width[ch];
49
		if (line_length>=list.w) || (ch==10)
50
		if (line_length>=list.w) || (ch==10)