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