Rev 4497 | Rev 4533 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 4497 | Rev 4508 | ||
---|---|---|---|
Line 14... | Line 14... | ||
14 | #include "..\lib\figures.h" |
14 | #include "..\lib\figures.h" |
15 | #include "..\lib\encoding.h" |
15 | #include "..\lib\encoding.h" |
16 | #include "..\lib\file_system.h" |
16 | #include "..\lib\file_system.h" |
17 | #include "..\lib\mem.h" |
17 | #include "..\lib\mem.h" |
18 | #include "..\lib\dll.h" |
18 | #include "..\lib\dll.h" |
- | 19 | #include "..\lib\draw_buf.h" |
|
- | 20 | #include "..\lib\list_box.h" |
|
- | 21 | #include "..\lib\cursor.h" |
|
- | 22 | ||
19 | //*.obj libraries |
23 | //*.obj libraries |
20 | #include "..\lib\lib.obj\box_lib.h" |
24 | #include "..\lib\lib.obj\box_lib.h" |
21 | #include "..\lib\lib.obj\libio_lib.h" |
25 | #include "..\lib\lib.obj\libio_lib.h" |
22 | #include "..\lib\lib.obj\libimg_lib.h" |
26 | #include "..\lib\lib.obj\libimg_lib.h" |
23 | //images |
27 | //images |
Line 60... | Line 64... | ||
60 | if (load_dll2(boxlib, #box_lib_init,0)!=0) {notify("System Error: library doesn't exists /rd/1/lib/box_lib.obj"); ExitProcess();} |
64 | if (load_dll2(boxlib, #box_lib_init,0)!=0) {notify("System Error: library doesn't exists /rd/1/lib/box_lib.obj"); ExitProcess();} |
61 | if (load_dll2(libio, #libio_init,1)!=0) debug("Error: library doesn't exists - libio"); |
65 | if (load_dll2(libio, #libio_init,1)!=0) debug("Error: library doesn't exists - libio"); |
62 | if (load_dll2(libimg, #libimg_init,1)!=0) debug("Error: library doesn't exists - libimg"); |
66 | if (load_dll2(libimg, #libimg_init,1)!=0) debug("Error: library doesn't exists - libimg"); |
Line 63... | Line 67... | ||
63 | 67 | ||
64 | if (!URL) strcpy(#URL, "/sys/index.htm"); |
- | |
65 | strcpy(#editURL, #URL); |
- | |
66 | 68 | if (!URL) strcpy(#URL, "/sys/index.htm"); |
|
67 | CursorPointer.Load(#CursorFile); |
69 | CursorPointer.Load(#CursorFile); |
68 | Form.width=WIN_W; |
70 | Form.width=WIN_W; |
69 | Form.height=WIN_H; |
71 | Form.height=WIN_H; |
70 | SetElementSizes(); |
72 | SetElementSizes(); |
Line 209... | Line 211... | ||
209 | DefineButton(Form.cwidth-47,15, 17, 16, SEARCHWEB+BT_HIDE, 0xE4DFE1); |
211 | DefineButton(Form.cwidth-47,15, 17, 16, SEARCHWEB+BT_HIDE, 0xE4DFE1); |
210 | DrawRectangle(205,14,Form.cwidth-205-49,18,0x94AECE); //around adress bar |
212 | DrawRectangle(205,14,Form.cwidth-205-49,18,0x94AECE); //around adress bar |
211 | DrawRectangle(206,15,Form.cwidth-205-50,16,0xE4ECF3); |
213 | DrawRectangle(206,15,Form.cwidth-205-50,16,0xE4ECF3); |
Line 212... | Line 214... | ||
212 | 214 | ||
213 | SetElementSizes(); |
215 | SetElementSizes(); |
Line 214... | Line 216... | ||
214 | WB1.ShowPage(); |
216 | ShowPage(); |
215 | 217 | ||
216 | DefineButton(scroll_wv.start_x+1, scroll_wv.start_y+1, 16, 16, BTN_UP+BT_HIDE, 0xE4DFE1); |
218 | DefineButton(scroll_wv.start_x+1, scroll_wv.start_y+1, 16, 16, BTN_UP+BT_HIDE, 0xE4DFE1); |
Line 349... | Line 351... | ||
349 | { |
351 | { |
350 | if (condition_href |
352 | if (condition_href |
351 | } |
353 | } |
352 | if (URL[1]!='-') && (URL[1]!='+') condition_href = atoi(#URL+1); |
354 | if (URL[1]!='-') && (URL[1]!='+') condition_href = atoi(#URL+1); |
353 | strcpy(#URL, BrowserHistory.CurrentUrl()); |
355 | strcpy(#URL, BrowserHistory.CurrentUrl()); |
354 | WB1.ShowPage(); |
356 | ShowPage(); |
355 | return; |
357 | return; |
356 | } |
358 | } |
357 | //#1 |
359 | //#1 |
358 | if (URL[0] == '#') |
360 | if (URL[0] == '#') |
359 | { |
361 | { |
360 | strcpy(#anchor, #URL+strrchr(#URL, '#')); |
362 | strcpy(#anchor, #URL+strrchr(#URL, '#')); |
361 | strcpy(#URL, BrowserHistory.CurrentUrl()); |
363 | strcpy(#URL, BrowserHistory.CurrentUrl()); |
362 | WB1.list.first=WB1.list.count-WB1.list.visible; |
364 | WB1.list.first=WB1.list.count-WB1.list.visible; |
363 | WB1.ShowPage(); |
365 | ShowPage(); |
364 | return; |
366 | return; |
365 | } |
367 | } |
366 | //liner.ru#1 |
368 | //liner.ru#1 |
367 | if (strrchr(#URL, '#')!=-1) |
369 | if (strrchr(#URL, '#')!=-1) |
368 | { |
370 | { |
Line 410... | Line 412... | ||
410 | Draw_Window(); |
412 | Draw_Window(); |
411 | return; |
413 | return; |
412 | } |
414 | } |
413 | WB1.list.first = WB1.list.count =0; |
415 | WB1.list.first = WB1.list.count =0; |
414 | WB1.ReadHtml(_WIN); |
416 | WB1.ReadHtml(_WIN); |
415 | WB1.ShowPage(); |
417 | ShowPage(); |
- | 418 | } |
|
- | 419 | ||
- | 420 | void ShowPage() |
|
- | 421 | { |
|
- | 422 | address_box.size = address_box.pos = strlen(#editURL); |
|
- | 423 | address_box.offset=0; |
|
- | 424 | edit_box_draw stdcall(#address_box); |
|
- | 425 | ||
- | 426 | if (!filesize) |
|
- | 427 | { |
|
- | 428 | PageLinks.Clear(); |
|
- | 429 | DrawBar(WB1.list.x, WB1.list.y, WB1.list.w+scroll_wv.size_x+1, WB1.list.h, 0xFFFFFF); //fill all |
|
- | 430 | if (GetProcessSlot(downloader_id)<>0) WriteText(WB1.list.x + 10, WB1.list.y + 18, 0x80, 0, "Loading..."); |
|
- | 431 | else |
|
- | 432 | { |
|
- | 433 | WriteText(WB1.list.x + 10, WB1.list.y + 18, 0x80, 0, "Page not found. May be, URL contains some errors."); |
|
- | 434 | if (!strncmp(#URL,"http:",5)) WriteText(WB1.list.x + 10, WB1.list.y + 32, 0x80, 0, "Or Internet unavilable for your configuration."); |
|
416 | } |
435 | } |
- | 436 | //return; |
|
- | 437 | } |
|
- | 438 | else |
|
- | 439 | WB1.ParseHTML(buf); |
|
Line -... | Line 440... | ||
- | 440 | ||
- | 441 | if (!header) strcpy(#header, #version); |
|
- | 442 | if (!strcmp(#version, #header)) DrawTitle(#header); |
|
Line 417... | Line 443... | ||
417 | 443 | } |