Rev 3006 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 3006 | Rev 3020 | ||
---|---|---|---|
Line 6... | Line 6... | ||
6 | blink; |
6 | blink; |
7 | 7 | ||
Line 8... | Line 8... | ||
8 | char download_path[]="/rd/1/.download"; |
8 | char download_path[]="/rd/1/.download"; |
9 | char search_path[]="http://nigma.ru/index.php?s="; |
9 | char search_path[]="http://nigma.ru/index.php?s="; |
10 | char version[]=" Text-based Browser 0.97.5"; |
10 | char version[]=" Text-based Browser 0.97.6"; |
Line 11... | Line 11... | ||
11 | 11 | ||
12 | 12 | ||
13 | struct TWebBrowser { |
13 | struct TWebBrowser { |
Line 120... | Line 120... | ||
120 | break; |
120 | break; |
121 | case 005: //truetype |
121 | case 005: //truetype |
122 | if (use_truetype == 2) |
122 | if (use_truetype == 2) |
123 | { |
123 | { |
124 | debug("Íå óäàëîñü ïîäêëþ÷èòü áèáëèîòåêó TrueType"); |
124 | RunProgram("@notify", "Library does not exists /rd/1/lib/truetype.obj"w); |
125 | debug("/rd/1/lib/truetype.obj íå îáíàðóæåí èëè èìååò íåïðàâèëüíûé ôîðìàò"); |
125 | return; |
126 | return; |
- | |
127 | } |
126 | } |
128 | if (use_truetype == 1) use_truetype=0; else use_truetype=1; |
127 | if (use_truetype == 1) use_truetype=0; else use_truetype=1; |
129 | break; |
128 | break; |
130 | case BACK: |
129 | case BACK: |
131 | if (!BrowserHistory.GoBack()) return; |
130 | if (!BrowserHistory.GoBack()) return; |
Line 548... | Line 547... | ||
548 | if (use_truetype == 1) |
547 | if (use_truetype == 1) |
549 | { |
548 | { |
550 | //line_length = get_length stdcall (#line,-1,16,line_length); |
549 | //line_length = get_length stdcall (#line,-1,16,line_length); |
551 | text_out stdcall (#line, -1, 17, text_colors[text_color_index], start_x, start_y-3); |
550 | text_out stdcall (#line, -1, 17, text_colors[text_color_index], start_x, start_y-3); |
552 | Pause(10); |
- | |
553 | } |
551 | } |
554 | else |
552 | else |
555 | { |
553 | { |
556 | WriteText(start_x, start_y, 0x80, text_colors[text_color_index], #line, 0); |
554 | WriteText(start_x, start_y, 0x80, text_colors[text_color_index], #line, 0); |
557 | IF (b_text) { $add ebx, 1<<16 $int 0x40 } |
555 | IF (b_text) { $add ebx, 1<<16 $int 0x40 } |
Line 778... | Line 776... | ||
778 | } |
776 | } |
779 | 777 | ||
Line 780... | Line 778... | ||
780 | if (!chTag("img")) |
778 | if (!chTag("img")) |
781 | { |
779 | { |
782 | //if (GetFileInfo(#libimg)<>0) return; //åñëè áèáëèîòåêè íåò |
780 | if (GetFileInfo(libimg)<>0) return; //åñëè áèáëèîòåêè íåò |
783 | IMG_TAG: |
781 | IMG_TAG: |
784 | if (!strcmp(#parametr,"src=")) //íàäî îáúåäèíèòü ñ GetNewUrl() |
782 | if (!strcmp(#parametr,"src=")) //íàäî îáúåäèíèòü ñ GetNewUrl() |
785 | { |
783 | { |
786 | if (downloader_id!=0) strcpy(#temp, #history_list[history_current-1].Item); |
784 | if (downloader_id!=0) strcpy(#temp, #history_list[history_current-1].Item); |
787 | else strcpy(#temp, BrowserHistory.CurrentUrl()); //äîñòà¸ì àäðåñ òåêóùåé ñòðàíèöû |
785 | else strcpy(#temp, BrowserHistory.CurrentUrl()); //äîñòà¸ì àäðåñ òåêóùåé ñòðàíèöû |
Line 804... | Line 802... | ||
804 | GetNextParam(); |
802 | GetNextParam(); |
805 | GOTO IMG_TAG; |
803 | GOTO IMG_TAG; |
806 | } |
804 | } |
807 | 805 | ||
Line 808... | Line 806... | ||
808 | if (!image) |
806 | if (!image) return; |
809 | { |
- | |
810 | //debug(#tag); |
- | |
811 | return; |
- | |
812 | } |
- | |
Line 813... | Line 807... | ||
813 | 807 | ||
Line 814... | Line 808... | ||
814 | if (w>width1) w=width1; |
808 | if (w>width1) w=width1; |
815 | - | ||
816 | if (stroka==0) DrawBar(left, top, width-15, 15, bg_color); //çàêðàøèâàåì ïåðâóþ ñòðîêó |
809 | |
817 | - | ||
818 | stroka+=h/10; |
810 | if (stroka==0) DrawBar(left, top, width-15, 15, bg_color); //çàêðàøèâàåì ïåðâóþ ñòðîêó |
819 | - | ||
820 | if (top1+h |
- | |
821 | return; |
811 | stroka+=h/10; |
822 | 812 | if (top1+h |
|
823 | if (top1 |
813 | if (top1 |
824 | { |
814 | { |
825 | DrawBar(left, top, width-15, 10, bg_color); //çàêðàøèâàåì ïåðâóþ ñòðîêó |
815 | DrawBar(left, top, width-15, 10, bg_color); //çàêðàøèâàåì ïåðâóþ ñòðîêó |
826 | img_lines_first=WB1.top-top1; |
816 | img_lines_first=WB1.top-top1; |
827 | h=h-img_lines_first; |
817 | h=h-img_lines_first; |
828 | top1=WB1.top; |
- | |
829 | } |
818 | top1=WB1.top; |
830 | 819 | } |
|
831 | if (top1>WB1.top+WB1.height-h-15) //åñëè ÷àñòü èçîáðàæåíèÿ ñíèçó IF (stroka - 2 < lines.visible) |
820 | if (top1>WB1.top+WB1.height-h-15) //åñëè ÷àñòü èçîáðàæåíèÿ ñíèçó |
832 | { |
821 | { |
833 | h=WB1.top+WB1.height-top1-15; |
- | |
834 | } |
822 | h=WB1.top+WB1.height-top1-15; |
835 | 823 | } |
|
Line 836... | Line 824... | ||
836 | if (h<=0) return; |
824 | if (h<=0) return; |
837 | if (anchor) return; |
825 | if (anchor) return; |
838 | - | ||
839 | img_draw stdcall (image,left1-5,top1+10,w, h,0,img_lines_first); |
- | |
840 | DrawBar(left1+w - 5, top1 + 10, width1-w + 5, h, bg_color); |
826 | |
841 | IF (link) |
- | |
842 | { |
- | |
843 | DefineButton(left1 - 5, top1+10, w, h, blink + BT_HIDE, 0xB5BFC9); |
827 | img_draw stdcall (image,left1-5,top1+10,w, h,0,img_lines_first); |
844 | } |
828 | DrawBar(left1+w - 5, top1 + 10, width1-w + 5, h, bg_color); |
Line 845... | Line 829... | ||
845 | 829 | IF (link) DefineButton(left1 - 5, top1+10, w, h, blink + BT_HIDE, 0xB5BFC9); |
|
846 | return; |
830 | return; |