Rev 7924 | Go to most recent revision | Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
7921 | leency | 1 | |
2 | { |
||
3 | //search.clear(); |
||
4 | list.KeyHome(); |
||
5 | list.count=0; |
||
6 | |||
7 | |||
8 | |||
9 | |||
10 | if (list.count < list.visible) { |
||
11 | DrawBuf.bufh = list.visible; |
||
12 | } else { |
||
13 | DrawBuf.bufh = list.count; |
||
14 | } |
||
15 | |||
16 | |||
17 | DrawPage(); |
||
18 | } |
||
19 | |||
20 | |||
21 | { |
||
22 | dword off; |
||
23 | int line_end; |
||
24 | dword line_length=0; |
||
25 | dword line_start = io.buffer_data; |
||
26 | dword buflen = strlen(io.buffer_data) + io.buffer_data; |
||
27 | |||
28 | |||
29 | lines.add(io.buffer_data); |
||
30 | selection.cancel(); |
||
31 | |||
32 | |||
33 | { |
||
34 | line_length += list.font_w; |
||
35 | if (line_length + 30 >= list.w) || (ESBYTE[off] == 10) |
||
36 | { |
||
37 | //searching a 'white' for a normal word-break |
||
38 | for(line_end = off; line_end != line_start; line_end--) |
||
39 | { |
||
40 | if (__isWhite(ESBYTE[line_end])) { off=line_end+1; break; } |
||
41 | } |
||
42 | line_length = off - line_start * list.font_w; |
||
43 | list.count++; |
||
44 | lines.add(off); |
||
45 | line_start = off; |
||
46 | line_length = 0; |
||
47 | } |
||
48 | } |
||
49 | lines.add(buflen); |
||
50 | list.count++; |
||
51 | } |
||
52 | |||
53 | |||
54 | { |
||
55 | int i; |
||
56 | dword y; |
||
57 | dword line_bg; |
||
58 | bool swapped = false; |
||
59 | |||
60 | |||
61 | list.CheckDoesValuesOkey(); |
||
62 | if (selection.end_offset < selection.start_offset) { |
||
63 | swapped = selection.swap_start_end(); |
||
64 | } |
||
65 | |||
66 | |||
67 | { |
||
68 | y = i * list.item_h; |
||
69 | line_bg = theme.bg; |
||
70 | |||
71 | |||
72 | DrawBuf.DrawBar(0, y, list.w, list.item_h, line_bg); |
||
73 | |||
74 | |||
75 | |||
76 | |||
77 | lines.get(i), lines.get(i+1) - lines.get(i)); |
||
78 | } |
||
79 | |||
80 | |||
81 | DrawBuf.bufw, list.h, list.x, list.y, 32, 0); |
||
82 | |||
83 | |||
84 | }>>>>> |
||
85 |