Subversion Repositories Kolibri OS

Rev

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

Rev 7921 Rev 7924
Line 1... Line 1...
1
void ParseAndPaint()
1
void ParseAndPaint()
2
{
2
{
3
	//search.clear();
3
	//search.clear();
4
	list.KeyHome();
-
 
5
	list.count=0;
4
	list.count=0;
-
 
5
	selection.cancel();
Line 6... Line 6...
6
 
6
 
Line 7... Line 7...
7
	Parse();
7
	Parse();
8
 
-
 
9
	list.visible = list.h / list.item_h;
-
 
10
	if (list.count < list.visible) {
-
 
11
		DrawBuf.bufh = list.visible;
-
 
12
	} else {
-
 
13
		DrawBuf.bufh = list.count;
-
 
14
	}
8
 
15
 
9
	list.visible = list.h / list.item_h;
16
	DrawBuf.Init(list.x, list.y, list.w, DrawBuf.bufh+1*list.item_h);
10
	DrawBuf.Init(list.x, list.y, list.w, list.visible+1*list.item_h);
Line 17... Line 11...
17
	DrawPage();	
11
	DrawPage();	
18
}
12
}
Line 26... Line 20...
26
dword buflen = strlen(io.buffer_data) + io.buffer_data;
20
dword buflen = strlen(io.buffer_data) + io.buffer_data;
27
 
21
 
Line 28... Line 22...
28
	lines.drop();
22
	lines.drop();
29
	lines.add(io.buffer_data);
23
	lines.add(io.buffer_data);
30
	selection.cancel();
-
 
Line 31... Line 24...
31
 
24
 
32
	for (off = io.buffer_data; off < buflen; off++)
25
	for (off = io.buffer_data; off < buflen; off++)
33
	{
26
	{
34
		line_length += list.font_w;
27
		line_length += list.font_w;
Line 52... Line 45...
52
 
45
 
Line 53... Line 46...
53
void PaintVisible()
46
void PaintVisible()
54
{
47
{
55
	int i;
48
	int i;
56
	dword y;
49
	dword ydraw, absolute_y;
57
	dword line_bg;
50
	dword line_bg;
58
	bool swapped = false;
51
	bool swapped_selection = false;
Line 59... Line 52...
59
 
52
 
60
	list.column_max = lines.get(list.cur_y+1) - lines.get(list.cur_y);
53
	list.column_max = lines.get(list.cur_y+1) - lines.get(list.cur_y);
61
	list.CheckDoesValuesOkey();
54
	list.CheckDoesValuesOkey();
62
	if (selection.end_offset < selection.start_offset) {
55
	if (selection.end_offset < selection.start_offset) {
63
		swapped = selection.swap_start_end();
56
		swapped_selection = selection.swap_start_end();
Line 64... Line 57...
64
	}
57
	}
65
 
58
 
66
	for ( i=list.first; i < list.first+list.visible+1; i++)
59
	for ( i=0; i < list.visible+1; i++)
-
 
60
	{
67
	{
61
		ydraw = i * list.item_h;
Line 68... Line 62...
68
		y = i * list.item_h;
62
		absolute_y = i + list.first;
69
		line_bg = theme.bg;
63
		line_bg = theme.bg;
Line 70... Line 64...
70
 
64
 
Line 71... Line 65...
71
		if (selection.start_y < i) && (selection.end_y > i) line_bg = selection.color;
65
		if (selection.start_y < absolute_y) && (selection.end_y > absolute_y) line_bg = selection.color;
72
		DrawBuf.DrawBar(0, y, list.w, list.item_h, line_bg);
66
		DrawBuf.DrawBar(0, ydraw, list.w, list.item_h, line_bg);
73
 
67
 
Line 74... Line -...
74
		selection.draw(i);
-
 
75
 
68
		selection.draw(absolute_y);
Line 76... Line 69...
76
		if (i
69
 
77
			lines.get(i), lines.get(i+1) - lines.get(i));
70
		if (absolute_y