Subversion Repositories Kolibri OS

Rev

Rev 8511 | Rev 8913 | 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
	Parse();
4
	DrawPage();
8584 leency 5
}
7921 leency 6
7
 
8
{
9
dword ptr;
8584 leency 10
int line_end;
7921 leency 11
dword line_length = 0;
8584 leency 12
dword line_start = textbuf.p;
13
7921 leency 14
 
8584 leency 15
	selection.cancel();
16
	if (list.w != canvas.bufw) canvas.Init(list.x, list.y, list.w, screen.height);
17
18
 
7921 leency 19
	lines.add(textbuf.p);
8584 leency 20
7921 leency 21
 
8584 leency 22
	{
7921 leency 23
		line_length += list.font_w;
24
		if (line_length + 30 >= list.w) || (ESBYTE[ptr] == '\n')
8584 leency 25
		{
7921 leency 26
			//if (ESBYTE[ptr+1] == '\r') ptr++;
8584 leency 27
28
 
7921 leency 29
			for(line_end = ptr; line_end != line_start; line_end--)
8584 leency 30
			{
7921 leency 31
				if (__isWhite(ESBYTE[line_end])) { ptr=line_end+1; break; }
8584 leency 32
			}
7921 leency 33
			line_length = ptr - line_start * list.font_w;
8584 leency 34
			list.count++;
7921 leency 35
			lines.add(ptr);
8584 leency 36
			line_start = ptr;
37
			line_length = 0;
7921 leency 38
		}
39
	}
40
	lines.add(ptr);
8584 leency 41
	list.count++;
7921 leency 42
}
43
44
 
8584 leency 45
{
46
	char t[64];
47
	scroll.max_area = list.count;
48
	scroll.cur_area = list.visible;
49
	scroll.position = list.first;
50
	scroll.all_redraw = 0;
51
	scroll.start_x = list.x + list.w;
52
	scroll.start_y = list.y;
53
	scroll.size_y = list.h;
54
55
 
56
		DrawBar(scroll.start_x, scroll.start_y, scroll.size_x,
57
		scroll.size_y, theme.bg);
58
	} else {
59
		scrollbar_v_draw(#scroll);
60
	}
61
	DrawRectangle(scroll.start_x, scroll.start_y, scroll.size_x,
62
		scroll.size_y-1, scroll.bckg_col);
63
64
 
65
66
 
67
	if (selection.is_active()) DrawStatusBar(#t); else DrawStatusBar(" ");
68
}
69
70
 
7921 leency 71
{
72
	int i, ff;
7960 leency 73
	signed s1, s2;
74
	dword ydraw, absolute_y;
7924 leency 75
	dword line_bg;
7921 leency 76
	bool swapped_selection = false;
7924 leency 77
7921 leency 78
 
7935 leency 79
	list.CheckDoesValuesOkey();
7921 leency 80
	if (selection.end_offset < selection.start_offset) {
81
		swapped_selection = selection.swap_start_end();
7924 leency 82
	}
7921 leency 83
84
 
7924 leency 85
	{
7921 leency 86
		ydraw = i * list.item_h;
7924 leency 87
		absolute_y = i + list.first;
88
		line_bg = theme.bg;
7921 leency 89
90
 
7924 leency 91
		canvas.DrawBar(0, ydraw, list.w, list.item_h, line_bg);
8439 leency 92
7921 leency 93
 
7924 leency 94
7921 leency 95
 
7975 leency 96
			s1 = search.found.get(ff) - lines.get(absolute_y);
7960 leency 97
			s2 = search.found.get(ff) - lines.get(absolute_y+1);
98
99
 
100
101
 
102
				canvas.DrawBar(search.found.get(ff) - lines.get(absolute_y) * list.font_w + 3,
8439 leency 103
					ydraw, strlen(#found_text) * list.font_w, list.item_h, theme.found);
7960 leency 104
				search_next = false;
7975 leency 105
			}
7960 leency 106
		}
107
108
 
8584 leency 109
			lines.get(absolute_y), lines.len(absolute_y));
7935 leency 110
	}
7921 leency 111
112
 
8439 leency 113
7921 leency 114
 
7924 leency 115
}
7921 leency 116