Subversion Repositories Kolibri OS

Rev

Rev 7975 | Rev 8511 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
7921 leency 1
 
2
{
3
	list.count=0;
4
	selection.cancel();
7924 leency 5
7921 leency 6
 
7
8
 
9
	canvas.Init(list.x, list.y, list.w, list.visible+1*list.item_h);
8439 leency 10
	DrawPage();
7921 leency 11
}
12
13
 
14
{
15
dword off;
16
int line_end;
17
dword line_length=0;
18
dword line_start = io.buffer_data;
19
dword buflen = strlen(io.buffer_data) + io.buffer_data;
20
21
 
22
	lines.add(io.buffer_data);
23
24
 
25
	{
26
		line_length += list.font_w;
27
		if (line_length + 30 >= list.w) || (ESBYTE[off] == 10)
28
		{
29
			//searching a 'white' for a normal word-break
30
			for(line_end = off; line_end != line_start; line_end--)
31
			{
32
				if (__isWhite(ESBYTE[line_end])) { off=line_end+1; break; }
33
			}
34
			line_length = off - line_start * list.font_w;
35
			list.count++;
36
			lines.add(off);
37
			line_start = off;
38
			line_length = 0;
39
		}
40
	}
41
	lines.add(buflen);
42
	list.count++;
43
}
44
45
 
46
{
47
	int i, ff;
7960 leency 48
	signed s1, s2;
49
	dword ydraw, absolute_y;
7924 leency 50
	dword line_bg;
7921 leency 51
	bool swapped_selection = false;
7924 leency 52
7921 leency 53
 
7935 leency 54
	list.CheckDoesValuesOkey();
7921 leency 55
	if (selection.end_offset < selection.start_offset) {
56
		swapped_selection = selection.swap_start_end();
7924 leency 57
	}
7921 leency 58
59
 
7924 leency 60
	{
7921 leency 61
		ydraw = i * list.item_h;
7924 leency 62
		absolute_y = i + list.first;
63
		line_bg = theme.bg;
7921 leency 64
65
 
7924 leency 66
		canvas.DrawBar(0, ydraw, list.w, list.item_h, line_bg);
8439 leency 67
7921 leency 68
 
7924 leency 69
7921 leency 70
 
7975 leency 71
			s1 = search.found.get(ff) - lines.get(absolute_y);
7960 leency 72
			s2 = search.found.get(ff) - lines.get(absolute_y+1);
73
74
 
75
76
 
77
				canvas.DrawBar(search.found.get(ff) - lines.get(absolute_y) * list.font_w + 3,
8439 leency 78
					ydraw, strlen(#found_text) * list.font_w, list.item_h, theme.found);
7960 leency 79
				search_next = false;
7975 leency 80
			}
7960 leency 81
		}
82
83
 
8439 leency 84
			lines.get(absolute_y), lines.len(absolute_y));
7935 leency 85
	}
7921 leency 86
87
 
8439 leency 88
7921 leency 89
 
7924 leency 90
}
7921 leency 91