Rev 6803 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 6803 | Rev 6806 | ||
---|---|---|---|
Line 1... | Line 1... | ||
1 | void PreparePage() |
1 | void PreparePage() |
2 | { |
2 | { |
3 | list.SetSizes(0, TOOLBAR_H, Form.cwidth-scroll.size_x-1, Form.cheight-TOOLBAR_H, label.size.pt+2); |
3 | list.SetSizes(0, TOOLBAR_H, Form.cwidth-scroll.size_x-1, Form.cheight-TOOLBAR_H, kfont.size.pt+2); |
4 | strcpy(#title, history.current()+strrchr(history.current(),'/')); |
4 | strcpy(#title, history.current()+strrchr(history.current(),'/')); |
5 | //get font chars width, need to increase performance |
5 | //get font chars width, need to increase performance |
6 | get_label_symbols_size(); |
6 | get_label_symbols_size(); |
7 | ChangeCharset(charsets[encoding], "CP866", io.buffer_data); |
7 | ChangeCharset(charsets[encoding], "CP866", io.buffer_data); |
8 | link.clear(); |
8 | link.clear(); |
Line 18... | Line 18... | ||
18 | // debugln("DONE STEP 3"); |
18 | // debugln("DONE STEP 3"); |
19 | } |
19 | } |
20 | strcat(#title, " - Aelia"); |
20 | strcat(#title, " - Aelia"); |
21 | DrawTitle(#title); |
21 | DrawTitle(#title); |
22 | DrawProgress(STEP_4_SMOOTH_FONT); label.ApplySmooth(); |
22 | DrawProgress(STEP_4_SMOOTH_FONT); kfont.ApplySmooth(); |
23 | DrawProgress(STEP_5_STOP); DrawPage(); |
23 | DrawProgress(STEP_5_STOP); DrawPage(); |
24 | } |
24 | } |
25 | 25 | ||
Line 26... | Line 26... | ||
26 | void ParceTxt(byte draw) |
26 | void ParceTxt(byte draw) |
27 | { |
27 | { |
Line 55... | Line 55... | ||
55 | } |
55 | } |
56 | if (draw==false) { |
56 | if (draw==false) { |
57 | list.count = stroka_y/list.item_h+3; |
57 | list.count = stroka_y/list.item_h+3; |
58 | if (list.count < list.visible) list.count = list.visible; |
58 | if (list.count < list.visible) list.count = list.visible; |
59 | label.size.height = list.count+5*list.item_h; |
59 | kfont.size.height = list.count+5*list.item_h; |
60 | label.raw_size = 0; |
60 | kfont.raw_size = 0; |
61 | } |
61 | } |
62 | if (draw==true) WriteTextIntoBuf(8, stroka_y, 0x000000, line_start); |
62 | if (draw==true) WriteTextIntoBuf(8, stroka_y, 0x000000, line_start); |
63 | } |
63 | } |
64 | 64 | ||
Line 122... | Line 122... | ||
122 | } |
122 | } |
123 | if (draw==true) { |
123 | if (draw==true) { |
124 | if (style.a) { |
124 | if (style.a) { |
125 | link.add(stroka_x,stroka_y + size_pt_change,get_label_len(text.start),list.item_h,text.start," "); |
125 | link.add(stroka_x,stroka_y + size_pt_change,get_label_len(text.start),list.item_h,text.start," "); |
126 | label_draw_bar(stroka_x, stroka_y+label.size.pt+1, get_label_len(text.start), style.color); |
126 | label_draw_bar(stroka_x, stroka_y+kfont.size.pt+1, get_label_len(text.start), style.color); |
127 | } |
127 | } |
128 | WriteTextIntoBuf(stroka_x, stroka_y, style.color, text.start); |
128 | WriteTextIntoBuf(stroka_x, stroka_y, style.color, text.start); |
129 | } |
129 | } |
130 | stroka_x+=char_width[' ']; |
130 | stroka_x+=char_width[' ']; |
131 | ESBYTE[line_break] >< zeroch; //restore line |
131 | ESBYTE[line_break] >< zeroch; //restore line |
132 | text.start = line_break; |
132 | text.start = line_break; |
Line 135... | Line 135... | ||
135 | } |
135 | } |
136 | if (draw==true) { |
136 | if (draw==true) { |
137 | if (style.a) { |
137 | if (style.a) { |
138 | link.add(stroka_x,stroka_y + size_pt_change,get_label_len(text.start),list.item_h,text.start," "); |
138 | link.add(stroka_x,stroka_y + size_pt_change,get_label_len(text.start),list.item_h,text.start," "); |
139 | label_draw_bar(stroka_x, stroka_y+label.size.pt+1, get_label_len(text.start), style.color); |
139 | label_draw_bar(stroka_x, stroka_y+kfont.size.pt+1, get_label_len(text.start), style.color); |
140 | } |
140 | } |
141 | WriteTextIntoBuf(stroka_x, stroka_y, style.color, text.start); |
141 | WriteTextIntoBuf(stroka_x, stroka_y, style.color, text.start); |
142 | } |
142 | } |
143 | stroka_x+=char_width[' ']; |
143 | stroka_x+=char_width[' ']; |
144 | stroka_x += get_label_len(text.start); |
144 | stroka_x += get_label_len(text.start); |
145 | } |
145 | } |
Line 170... | Line 170... | ||
170 | size_pt_change = 4; |
170 | size_pt_change = 4; |
171 | } else if (tag.nameis("/h3")) { |
171 | } else if (tag.nameis("/h3")) { |
172 | size_pt_change = -4; |
172 | size_pt_change = -4; |
173 | } |
173 | } |
174 | label.size.pt += size_pt_change; |
174 | kfont.size.pt += size_pt_change; |
175 | get_label_symbols_size(); |
175 | get_label_symbols_size(); |
176 | if (size_pt_change > 0) { |
176 | if (size_pt_change > 0) { |
177 | stroka_y+= list.item_h;//что если будет очень длинная строка в теге? |
177 | stroka_y+= list.item_h;//что если будет очень длинная строка в теге? |
178 | } else {//коммент выше и коммент ниже связаны |
178 | } else {//коммент выше и коммент ниже связаны |
179 | stroka_y+= list.item_h - size_pt_change;//не очень понятна логика этого места |
179 | stroka_y+= list.item_h - size_pt_change;//не очень понятна логика этого места |
180 | size_pt_change = 0; |
180 | size_pt_change = 0; |
Line 190... | Line 190... | ||
190 | } |
190 | } |
191 | if (draw==false) { |
191 | if (draw==false) { |
192 | list.count = stroka_y/list.item_h+3; |
192 | list.count = stroka_y/list.item_h+3; |
193 | if (list.count < list.visible) list.count = list.visible; |
193 | if (list.count < list.visible) list.count = list.visible; |
194 | label.size.height = list.count+5*list.item_h; |
194 | kfont.size.height = list.count+5*list.item_h; |
195 | label.raw_size = 0; |
195 | kfont.raw_size = 0; |
196 | } |
196 | } |
197 | free(DOM_start); |
197 | free(DOM_start); |
198 | }>>>=>>')>>>> |