Rev 2811 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 2811 | Rev 2818 | ||
---|---|---|---|
Line 4... | Line 4... | ||
4 | //home icon - rachel fu, GPL licence |
4 | //home icon - rachel fu, GPL licence |
Line 5... | Line 5... | ||
5 | 5 | ||
6 | #include "..\lib\kolibri.h" |
6 | #include "..\lib\kolibri.h" |
7 | #include "..\lib\encoding.h" |
7 | #include "..\lib\encoding.h" |
8 | #include "..\lib\file_system.h" |
- | |
9 | #include "img\toolbar_icons.c" |
- | |
10 | #include "img\URLgoto.txt"; |
8 | #include "..\lib\file_system.h" |
- | 9 | #include "..\lib\mem.h" |
|
- | 10 | #include "..\lib\dll.h" |
|
11 | #include "..\lib\mem.h" |
11 | //áèáëèîòåêè |
12 | #include "..\lib\libio_lib.h" |
12 | #include "..\lib\libio_lib.h" |
13 | #include "..\lib\libimg_lib.h" |
13 | #include "..\lib\libimg_lib.h" |
14 | #include "..\lib\edit_box_lib.h" |
- | |
15 | #include "..\lib\dll.h" |
14 | #include "..\lib\edit_box_lib.h" |
- | 15 | #include "..\lib\scroll_bar\scroll_lib.h" |
|
- | 16 | #include "..\lib\ttf_fonts.h" |
|
- | 17 | //êàðòèíêè |
|
- | 18 | #include "img\toolbar_icons.c" |
|
- | 19 | #include "img\URLgoto.txt"; |
|
Line 16... | Line 20... | ||
16 | #include "..\lib\scroll_bar\scroll_lib.h" |
20 | |
17 | 21 | ||
18 | //ïåðåìåííûå |
22 | //ïåðåìåííûå |
19 | char URL[4096], |
23 | char URL[4096], |
Line 46... | Line 50... | ||
46 | mem_Init(); |
50 | mem_Init(); |
47 | load_dll2(libio, #libio_init,1); |
51 | load_dll2(libio, #libio_init,1); |
48 | load_dll2(libimg, #libimg_init,1); |
52 | load_dll2(libimg, #libimg_init,1); |
49 | load_dll2(boxlib, #edit_box_draw,0); |
53 | load_dll2(boxlib, #edit_box_draw,0); |
50 | load_dll2(#abox_lib, #boxlib_init,0); |
54 | load_dll2(#abox_lib, #boxlib_init,0); |
- | 55 | //load_dll2(libtruetype, #truetype,0); |
|
Line 51... | Line 56... | ||
51 | 56 | ||
52 | if (param) strcpy(#URL, #param); |
57 | if (param) strcpy(#URL, #param); |
53 | else strcpy(#URL, "/sys/index.htm"); |
58 | else strcpy(#URL, "/sys/index.htm"); |
Line 103... | Line 108... | ||
103 | half_scroll_size = WB1.height - 16 * lines.visible / lines.all - 3 /2; |
108 | half_scroll_size = WB1.height - 16 * lines.visible / lines.all - 3 /2; |
104 | if (m.x>=WB1.width-14) && (m.x<=WB1.width+6) |
109 | if (m.x>=WB1.width-14) && (m.x<=WB1.width+6) |
105 | && (m.y>WB1.top+16) && (m.y |
110 | && (m.y>WB1.top+16) && (m.y |
106 | && (lines.all>lines.visible) while (m.lkm) |
111 | && (lines.all>lines.visible) while (m.lkm) |
107 | { |
112 | { |
108 | IF (half_scroll_size/2+WB1.top>m.y) || (m.y<0) || (m.y>4000) m.y=half_scroll_size/2+WB1.top; //åñëè êóðñîð íàä îêíîì |
113 | IF (half_scroll_size+WB1.top>m.y) || (m.y<0) || (m.y>4000) m.y=half_scroll_size+WB1.top; //åñëè êóðñîð íàä îêíîì |
109 | btn=lines.first; //ñîõðàíÿåì ñòàðîå êîëè÷åñòâî |
114 | btn=lines.first; //ñîõðàíÿåì ñòàðîå êîëè÷åñòâî |
110 | lines.first = m.y -half_scroll_size -WB1.top * lines.all / WB1.height; |
115 | lines.first = m.y -half_scroll_size -WB1.top * lines.all / WB1.height; |
111 | IF (lines.visible+lines.first>lines.all) lines.first=lines.all-lines.visible; |
116 | IF (lines.visible+lines.first>lines.all) lines.first=lines.all-lines.visible; |
112 | IF (btn<>lines.first) WB1.ParseHTML(buf, filesize); //÷òîá ëèøíèé ðàç íå ïåðåðèñîâûâàòü |
117 | IF (btn<>lines.first) WB1.ParseHTML(buf, filesize); //÷òîá ëèøíèé ðàç íå ïåðåðèñîâûâàòü |
113 | m.get(); |
118 | m.get(); |
Line 172... | Line 177... | ||
172 | if (GetProcessSlot(downloader_id)<>0) PutImage(#stop_btn,24,24,88,10); |
177 | if (GetProcessSlot(downloader_id)<>0) PutImage(#stop_btn,24,24,88,10); |
Line 173... | Line 178... | ||
173 | 178 | ||
174 | DrawBar(200,0,onLeft(200,9),43,0xE4DFE1); //çàêðàøèâàåì ôîí ïîä òóëáàðîì |
179 | DrawBar(200,0,onLeft(200,9),43,0xE4DFE1); //çàêðàøèâàåì ôîí ïîä òóëáàðîì |
175 | DrawBar(0,42,onLeft(5,4),1,0xE2DBDC); //âûïóêëîñòü |
180 | DrawBar(0,42,onLeft(5,4),1,0xE2DBDC); //âûïóêëîñòü |
176 | DrawBar(0,43,onLeft(5,4),1,0xD2CED0); //âûïóêëîñòü |
181 | DrawBar(0,43,onLeft(5,4),1,0xD2CED0); //âûïóêëîñòü |
177 | for (j=0; j<5; j++) DefineButton(j*37+11, 7, 29, 29, 300+j+BT_HIDE, 0x00E4DFE1); |
182 | for (j=0; j<5; j++) DefineButton(j*37+11, 7, 29, 29, 300+j+BT_HIDE, 0xE4DFE1); |
178 | PutImage(#URLgoto,40,19,onLeft(57,0),14); |
183 | PutImage(#URLgoto,40,19,onLeft(57,0),14); |
179 | DefineButton(onLeft(37,0),15, 18, 16, GOTOURL+BT_HIDE, 0xE4DFE1); |
184 | DefineButton(onLeft(37,0),15, 18, 16, GOTOURL+BT_HIDE, 0xE4DFE1); |
180 | DefineButton(onLeft(56,0),15, 17, 16, SEARCHWEB+BT_HIDE, 0xE4DFE1); |
185 | DefineButton(onLeft(56,0),15, 17, 16, SEARCHWEB+BT_HIDE, 0xE4DFE1); |
181 | DrawRegion(205,14,onLeft(58,205),18,0x94AECE); //îáîäîê ïîëîñû àäðåñà |
186 | DrawRegion(205,14,onLeft(58,205),18,0x94AECE); //îáîäîê ïîëîñû àäðåñà |
Line 187... | Line 192... | ||
187 | WB1.height=onTop(43,5); |
192 | WB1.height=onTop(43,5); |
188 | lines.column_max = WB1.width - 30 / 6; |
193 | lines.column_max = WB1.width - 30 / 6; |
189 | lines.visible = WB1.height - 3 / 10 - 2; |
194 | lines.visible = WB1.height - 3 / 10 - 2; |
Line 190... | Line 195... | ||
190 | 195 | ||
- | 196 | WB1.ShowPage(); |
|
- | 197 | ||
- | 198 | DefineButton(scroll1.start_x+1, scroll1.start_y+1, 16, 16, ID1+BT_HIDE, 0xE4DFE1); |
|
191 | WB1.ShowPage(); |
199 | DefineButton(scroll1.start_x+1, scroll1.start_y+scroll1.size_y-18, 16, 16, ID2+BT_HIDE, 0xE4DFE1); |
Line 192... | Line 200... | ||
192 | } |
200 | } |
193 | 201 |