Subversion Repositories Kolibri OS

Rev

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

Rev 7004 Rev 7286
Line 1... Line -...
1
char char_width[255];
-
 
2
 
-
 
3
enum {
1
enum {
4
	COUNT_BUF_HEIGHT,
2
	COUNT_BUF_HEIGHT,
5
	DRAW_BUF
3
	DRAW_BUF
6
};
4
};
Line 17... Line 15...
17
 
15
 
18
	buflen = strlen(io.buffer_data) + io.buffer_data;
16
	buflen = strlen(io.buffer_data) + io.buffer_data;
19
	for (bufoff=io.buffer_data; bufoff
17
	for (bufoff=io.buffer_data; bufoff
20
	{
18
	{
21
		ch = ESBYTE[bufoff];
19
		ch = ESBYTE[bufoff];
22
		line_length += char_width[ch];
20
		line_length += kfont_char_width[ch];
23
		if (line_length>=list.w) || (ch==10) {
21
		if (line_length>=list.w) || (ch==10) {
24
			srch_pos = bufoff;
22
			srch_pos = bufoff;
25
			loop()
23
			loop()
26
			{
24
			{
Line 47... Line 45...
47
	if (mode==DRAW_BUF) kfont.WriteIntoBuffer(8,stroka_y,list.w,kfont.size.height, 0xFFFFFF, 0, kfont.size.pt, line_start);
45
	if (mode==DRAW_BUF) kfont.WriteIntoBuffer(8,stroka_y,list.w,kfont.size.height, 0xFFFFFF, 0, kfont.size.pt, line_start);
48
}
46
}
Line 49... Line 47...
49
 
47
 
50
void PreparePage() 
48
void PreparePage() 
51
{
-
 
52
	//get font chars width, need to increase performance
-
 
53
	int i;
-
 
54
	kfont.changeSIZE();
-
 
55
	for (i=0; i<256; i++) char_width[i] = kfont.symbol_size(i);
-
 
56
 
-
 
57
	//get font buffer height
49
{
58
	list.w = Form.cwidth-scroll.size_x-1;
50
	list.w = Form.cwidth-scroll.size_x-1;
59
	list.count=0;
51
	list.count=0;
Line 60... Line 52...
60
	Parcer(COUNT_BUF_HEIGHT);
52
	Parcer(COUNT_BUF_HEIGHT);