Subversion Repositories Kolibri OS

Rev

Rev 7921 | Rev 7935 | 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
	//search.clear();
4
	list.count=0;
5
	selection.cancel();
7924 leency 6
7921 leency 7
 
8
9
 
10
	DrawBuf.Init(list.x, list.y, list.w, list.visible+1*list.item_h);
7924 leency 11
	DrawPage();
7921 leency 12
}
13
14
 
15
{
16
dword off;
17
int line_end;
18
dword line_length=0;
19
dword line_start = io.buffer_data;
20
dword buflen = strlen(io.buffer_data) + io.buffer_data;
21
22
 
23
	lines.add(io.buffer_data);
24
25
 
26
	{
27
		line_length += list.font_w;
28
		if (line_length + 30 >= list.w) || (ESBYTE[off] == 10)
29
		{
30
			//searching a 'white' for a normal word-break
31
			for(line_end = off; line_end != line_start; line_end--)
32
			{
33
				if (__isWhite(ESBYTE[line_end])) { off=line_end+1; break; }
34
			}
35
			line_length = off - line_start * list.font_w;
36
			list.count++;
37
			lines.add(off);
38
			line_start = off;
39
			line_length = 0;
40
		}
41
	}
42
	lines.add(buflen);
43
	list.count++;
44
}
45
46
 
47
{
48
	int i;
49
	dword ydraw, absolute_y;
7924 leency 50
	dword line_bg;
7921 leency 51
	bool swapped_selection = false;
7924 leency 52
7921 leency 53
 
54
	list.CheckDoesValuesOkey();
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
		DrawBuf.DrawBar(0, ydraw, list.w, list.item_h, line_bg);
67
7921 leency 68
 
7924 leency 69
7921 leency 70
 
7924 leency 71
			lines.get(absolute_y), lines.get(absolute_y+1) - lines.get(absolute_y));
72
	}
7921 leency 73
74
 
7924 leency 75
7921 leency 76
 
7924 leency 77
}
7921 leency 78