forked from KolibriOS/kolibrios
HTMLv 0.97.7
git-svn-id: svn://kolibrios.org@3058 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
c69c5c905b
commit
29de2e5854
@ -5,11 +5,12 @@
|
||||
|
||||
#include "..\lib\kolibri.h"
|
||||
#include "..\lib\strings.h"
|
||||
#include "..\lib\figures.h"
|
||||
#include "..\lib\encoding.h"
|
||||
#include "..\lib\file_system.h"
|
||||
#include "..\lib\mem.h"
|
||||
#include "..\lib\dll.h"
|
||||
//áèáëèîòåêè
|
||||
//áèáëèîòåêè .obj
|
||||
#include "..\lib\libio_lib.h"
|
||||
#include "..\lib\libimg_lib.h"
|
||||
#include "..\lib\edit_box_lib.h"
|
||||
@ -47,6 +48,7 @@ mouse m;
|
||||
#include "TWB.h"
|
||||
#include "include\menu_rmb.h"
|
||||
|
||||
|
||||
void tre()
|
||||
{
|
||||
char *font_picture;
|
||||
@ -55,22 +57,10 @@ void tre()
|
||||
int height=20;
|
||||
// char palette[256*4];
|
||||
int x;
|
||||
debug("fuck this shit\n");
|
||||
//init_font(#fontinfo);
|
||||
debug("fuck this shit!\n");
|
||||
|
||||
strcpy(#text, "hello world\0");
|
||||
|
||||
text_out stdcall (#text, #fontlol, 17, 0x0, 10, 10);
|
||||
|
||||
strcpy(#text, "fuck this shit!\0");
|
||||
|
||||
text_out stdcall (#text, #fontlol, 27, 0x0, 10, 30);
|
||||
|
||||
|
||||
strcpy(#text, "alarm!\0");
|
||||
|
||||
text_out stdcall (#text, #fontlol, 47, 0x00FF0000, 10, 70);
|
||||
text_out stdcall ("hello world\0",#fontlol, 17, 0x0, 10, 10);
|
||||
text_out stdcall ("heyeyey!\0",#fontlol, 27, 0x0, 10, 30);
|
||||
text_out stdcall ("alarm!\0", #fontlol, 47, 0x00FF0000, 10, 70);
|
||||
/*
|
||||
strcpy(#text, "hello world\0");
|
||||
|
||||
@ -233,7 +223,7 @@ void SetElementSizes()
|
||||
void Draw_Window()
|
||||
{
|
||||
int j;
|
||||
DefineAndDrawWindow(215,100,WIN_W,WIN_H,0x73,0x00E4DFE1,0);
|
||||
DefineAndDrawWindow(215,100,WIN_W,WIN_H,0x73,0x00E4DFE1,0,0);
|
||||
|
||||
GetProcessInfo(#Form, SelfInfo);
|
||||
if (Form.status_window>2) //åñëè ñâåðíóòî â çàãîëîâîê, íè÷åãî íå ðèñóåì
|
||||
@ -254,8 +244,8 @@ void Draw_Window()
|
||||
PutImage(#URLgoto,40,19,onLeft(57,0),14);
|
||||
DefineButton(onLeft(37,0),15, 18, 16, GOTOURL+BT_HIDE, 0xE4DFE1);
|
||||
DefineButton(onLeft(56,0),15, 17, 16, SEARCHWEB+BT_HIDE, 0xE4DFE1);
|
||||
DrawRegion(205,14,onLeft(58,205),18,0x94AECE); //îáîäîê ïîëîñû àäðåñà
|
||||
DrawRegion(206,15,onLeft(59,205),16,0xE4ECF3);
|
||||
DrawRectangle(205,14,onLeft(58,205),18,0x94AECE); //îáîäîê ïîëîñû àäðåñà
|
||||
DrawRectangle(206,15,onLeft(59,205),16,0xE4ECF3);
|
||||
|
||||
SetElementSizes();
|
||||
WB1.ShowPage();
|
||||
|
@ -1,6 +1,12 @@
|
||||
11.11.12 - 0.97.6a
|
||||
SoUrcerer - Синхронизация программы с новой
|
||||
оптимизированной версией библитеки TryeType.
|
||||
18.11.12 - 0.97.7
|
||||
- если изображение не загрузилось, но содержит ссылку отображается
|
||||
заменяющий его текст;
|
||||
- частично исправлен перенос ссылках в тексте;
|
||||
- отображение в меню текущей кодировки;
|
||||
- SoUrcerer - Синхронизация программы с новой оптимизированной
|
||||
версией библитеки TryeType.
|
||||
|
||||
|
||||
|
||||
10.11.12 - 0.97.6
|
||||
- нормальный запуск программы даже без библиотеки lib_img;
|
||||
|
@ -8,7 +8,7 @@ dword
|
||||
|
||||
char download_path[]="/rd/1/.download";
|
||||
char search_path[]="http://nigma.ru/index.php?s=";
|
||||
char version[]=" Text-based Browser 0.97.6";
|
||||
char version[]=" Text-based Browser 0.97.7";
|
||||
|
||||
|
||||
struct TWebBrowser {
|
||||
@ -27,7 +27,7 @@ struct TWebBrowser {
|
||||
TWebBrowser WB1;
|
||||
|
||||
byte rez, b_text, i_text, u_text, s_text, pre_text, blq_text, li_text,
|
||||
link, ignor_text, li_tab, first_line_drawed;
|
||||
link, ignor_text, li_tab, first_line_drawed, cur_encoding;
|
||||
|
||||
|
||||
dword text_colors[300],
|
||||
@ -262,6 +262,7 @@ void TWebBrowser::ReadHtml(byte encoding)
|
||||
else
|
||||
ReadFile(0, filesize, buf, #URL);
|
||||
|
||||
cur_encoding = encoding;
|
||||
if (encoding==_WIN) wintodos(buf);
|
||||
if (encoding==_UTF) utf8rutodos(buf);
|
||||
if (encoding==_KOI) koitodos(buf);
|
||||
@ -282,7 +283,7 @@ void TWebBrowser::OpenPage()
|
||||
DeleteFile(#download_path);
|
||||
IF (URL[strlen(#URL)-1]=='/') URL[strlen(#URL)-1]='';
|
||||
downloader_id = RunProgram("/sys/network/downloader", #URL);
|
||||
//ýòî ãåíèàëüíî è ýòî ïèçäåö!!!
|
||||
//Browser Hack v2.0
|
||||
Pause(60);
|
||||
if (GetProcessSlot(downloader_id)<>0)
|
||||
{
|
||||
@ -376,56 +377,9 @@ void TWebBrowser::ParseHTML(dword bword){
|
||||
break;
|
||||
}
|
||||
case 0x0d:
|
||||
debug("0x0d");
|
||||
bukva = ' ';
|
||||
goto DEFAULT_MARK;
|
||||
case '<':
|
||||
bword++; //ïðîìîòàåì ñèìâîë <
|
||||
tag = parametr = tagparam = ignor_param = 0;
|
||||
if (ESBYTE[bword] == '!') //ôèëüòðàöèÿ âíóòðè <!-- -->, äåðçêî
|
||||
{
|
||||
bword++;
|
||||
if (ESBYTE[bword] == '-')
|
||||
{
|
||||
HH_:
|
||||
do
|
||||
{
|
||||
bword++;
|
||||
if (buf + filesize <= bword) break 2;
|
||||
}
|
||||
while (ESBYTE[bword] <>'-');
|
||||
|
||||
bword++;
|
||||
if (ESBYTE[bword] <>'-') goto HH_;
|
||||
}
|
||||
}
|
||||
while (ESBYTE[bword] <>'>') && (bword < buf + filesize) //ïîëó÷àåì òåã è åãî ïàðàìåòðû
|
||||
{
|
||||
bukva = ESBYTE[bword];
|
||||
if (bukva == '\9') || (bukva == '\x0a') || (bukva == '\x0d') bukva = ' ';
|
||||
if (!ignor_param) && (bukva <>' ')
|
||||
{
|
||||
if (strlen(#tag)<sizeof(tag)) strcat(#tag, #bukva);
|
||||
}
|
||||
else
|
||||
{
|
||||
ignor_param = true;
|
||||
if (!ignor_text) && (strlen(#tagparam)+1<sizeof(tagparam)) strcat(#tagparam, #bukva);
|
||||
}
|
||||
bword++;
|
||||
}
|
||||
strlwr(#tag);
|
||||
strlwr(#tagparam);
|
||||
|
||||
if (tag[strlen(#tag)-1]=='/') tag[strlen(#tag)-1]=''; //for br/
|
||||
if (tagparam) && (strlen(#tagparam) < 4000) GetNextParam();
|
||||
|
||||
DrawPage();
|
||||
line=0;
|
||||
|
||||
if (tag) WhatTextStyle(left + 5, stroka * 10 + top + 5, width - 20); //îáðàáîòêà òåãîâ
|
||||
|
||||
tag = parametr = tagparam = ignor_param = '\0';
|
||||
break;
|
||||
case '=': //ïîääåðæêà øàéòàíñêîé êîäèðîâêè ñòðàíèö, ñîõðàí¸ííûõ ÷åðåç ÈÅ7
|
||||
if (strcmp(#URL + strlen(#URL) - 4, ".mht")<>0) goto DEFAULT_MARK;
|
||||
|
||||
@ -469,9 +423,57 @@ void TWebBrowser::ParseHTML(dword bword){
|
||||
|
||||
strcat(#line,#tag); //âûâîäèì íà ýêðàí íåîáðàáîòàííûé òåã, òàê áðàóçåðû çà÷åì-òî äåëàþò
|
||||
break;
|
||||
case '<':
|
||||
bword++; //ïðîìîòàåì ñèìâîë <
|
||||
tag = parametr = tagparam = ignor_param = NULL;
|
||||
if (ESBYTE[bword] == '!') //ôèëüòðàöèÿ âíóòðè <!-- -->, äåðçêî
|
||||
{
|
||||
bword++;
|
||||
if (ESBYTE[bword] == '-')
|
||||
{
|
||||
HH_:
|
||||
do
|
||||
{
|
||||
bword++;
|
||||
if (buf + filesize <= bword) break 2;
|
||||
}
|
||||
while (ESBYTE[bword] <>'-');
|
||||
|
||||
bword++;
|
||||
if (ESBYTE[bword] <>'-') goto HH_;
|
||||
}
|
||||
}
|
||||
while (ESBYTE[bword] <>'>') && (bword < buf + filesize) //ïîëó÷àåì òåã è åãî ïàðàìåòðû
|
||||
{
|
||||
bukva = ESBYTE[bword];
|
||||
if (bukva == '\9') || (bukva == '\x0a') || (bukva == '\x0d') bukva = ' ';
|
||||
if (!ignor_param) && (bukva <>' ')
|
||||
{
|
||||
if (strlen(#tag)<sizeof(tag)) strcat(#tag, #bukva);
|
||||
}
|
||||
else
|
||||
{
|
||||
ignor_param = true;
|
||||
if (!ignor_text) && (strlen(#tagparam)+1<sizeof(tagparam)) strcat(#tagparam, #bukva);
|
||||
}
|
||||
bword++;
|
||||
}
|
||||
strlwr(#tag);
|
||||
strlwr(#tagparam);
|
||||
|
||||
if (tag[strlen(#tag)-1]=='/') tag[strlen(#tag)-1]=NULL; //for br/
|
||||
if (tagparam) && (strlen(#tagparam) < 4000) GetNextParam();
|
||||
|
||||
DrawPage();
|
||||
line=NULL;
|
||||
|
||||
if (tag) WhatTextStyle(left + 5, stroka * 10 + top + 5, width - 20); //îáðàáîòêà òåãîâ
|
||||
|
||||
tag = parametr = tagparam = ignor_param = NULL;
|
||||
break;
|
||||
default:
|
||||
DEFAULT_MARK:
|
||||
if (!pre_text) && (bukva == ' ') && (line[strlen(#line)-1]==' ') break;
|
||||
if (!pre_text) && (bukva == ' ') && (line[strlen(#line)-1]==' ') break; //óáðàòü 2 ïðîáåëà ïîäðÿä
|
||||
//
|
||||
if (stolbec + strlen(#line) > lines.column_max)
|
||||
{
|
||||
@ -514,9 +516,6 @@ void TWebBrowser::DrawPage() //
|
||||
{
|
||||
if (strlen(#version)+strlen(#line)+2>sizeof(header))
|
||||
{
|
||||
//line = 123456789
|
||||
//header = 1234
|
||||
//line = 56789
|
||||
strcpy(#temp, #line);
|
||||
temp[sizeof(header)-strlen(#version)-2]=0;
|
||||
strcpy(#header, #temp);
|
||||
@ -532,7 +531,7 @@ void TWebBrowser::DrawPage() //
|
||||
strcat(#header, #version);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
if (stroka >= 0) && (stroka - 2 < lines.visible) && (line) && (!anchor)
|
||||
{
|
||||
if (!stroka) && (!stolbec)
|
||||
@ -572,7 +571,7 @@ void TWebBrowser::WhatTextStyle(int left1, top1, width1) {
|
||||
dword hr_color;
|
||||
|
||||
dword image;
|
||||
char temp[4096];
|
||||
char temp[4096], alt[4096];
|
||||
int w=0, h=0, img_lines_first=0;
|
||||
|
||||
//ïðîâåðÿåì òåã îòêðûâàåòñÿ èëè çàêðûâàåòñÿ
|
||||
@ -782,21 +781,23 @@ void TWebBrowser::WhatTextStyle(int left1, top1, width1) {
|
||||
IMG_TAG:
|
||||
if (!strcmp(#parametr,"src=")) //íàäî îáúåäèíèòü ñ GetNewUrl()
|
||||
{
|
||||
if (downloader_id!=0) strcpy(#temp, #history_list[history_current-1].Item);
|
||||
if (downloader_id) strcpy(#temp, #history_list[history_current-1].Item);
|
||||
else strcpy(#temp, BrowserHistory.CurrentUrl()); //äîñòà¸ì àäðåñ òåêóùåé ñòðàíèöû
|
||||
if (!strcmpn(#temp, "http:", 5)) || (!strcmpn(#options, "http:", 5)) return;
|
||||
temp[strrchr(#temp, '/')] = 0x00; //îáðåçàåì å¸ óðë äî ïîñëåäíåãî /
|
||||
strcat(#temp, #options);
|
||||
image=load_image(#temp);
|
||||
w=DSWORD[image+4];
|
||||
h=DSWORD[image+8];
|
||||
if (strcmpn(#temp, "http:", 5)!=0) || (strcmpn(#options, "http:", 5)!=0)
|
||||
{
|
||||
temp[strrchr(#temp, '/')] = 0x00; //îáðåçàåì å¸ óðë äî ïîñëåäíåãî /
|
||||
strcat(#temp, #options);
|
||||
image=load_image(#temp);
|
||||
w=DSWORD[image+4];
|
||||
h=DSWORD[image+8];
|
||||
}
|
||||
}
|
||||
/*if (!strcmp(#parametr,"alt="))
|
||||
if (!strcmp(#parametr,"alt="))
|
||||
{
|
||||
strcpy(#tag, "[Image: ");
|
||||
strcat(#tag, #options);
|
||||
strcat(#tag, "]");
|
||||
}*/
|
||||
strcpy(#alt, "[");
|
||||
strcat(#alt, #options);
|
||||
strcat(#alt, "]");
|
||||
}
|
||||
|
||||
IF(tagparam)
|
||||
{
|
||||
@ -804,7 +805,11 @@ void TWebBrowser::WhatTextStyle(int left1, top1, width1) {
|
||||
GOTO IMG_TAG;
|
||||
}
|
||||
|
||||
if (!image) return;
|
||||
if (!image)
|
||||
{
|
||||
if (alt) && (link) strcat(#line, #alt);
|
||||
return;
|
||||
}
|
||||
|
||||
if (w>width1) w=width1;
|
||||
|
||||
@ -838,9 +843,9 @@ void TWebBrowser::WhatTextStyle(int left1, top1, width1) {
|
||||
{
|
||||
strcpy(#options, #options[strrchr(#options, '=')]); //ïîèñê â content=
|
||||
|
||||
if (!strcmp(#options,"utf-8")) || (!strcmp(#options,"utf8")) ReadHtml(_UTF);
|
||||
if (!strcmp(#options, "koi8-r")) || (!strcmp(#options, "koi8-u")) ReadHtml(_KOI);
|
||||
if (!strcmp(#options, "dos")) || (!strcmp(#options, "cp-866")) ReadHtml(_DOS);
|
||||
if (!strcmp(#options,"utf-8")) || (!strcmp(#options,"utf8")) ReadHtml(_UTF);
|
||||
if (!strcmp(#options, "koi8-r")) || (!strcmp(#options, "koi8-u")) ReadHtml(_KOI);
|
||||
if (!strcmp(#options, "dos")) || (!strcmp(#options, "cp-866")) ReadHtml(_DOS);
|
||||
}
|
||||
if (tagparam)
|
||||
{
|
||||
|
@ -7,146 +7,146 @@ struct color_spec {
|
||||
};
|
||||
|
||||
struct color_spec color_specs[] = {
|
||||
"aliceblue", 0xF0F8FF,
|
||||
"antiquewhite", 0xFAEBD7,
|
||||
"aqua", 0x00FFFF,
|
||||
"aquamarine", 0x7FFFD4,
|
||||
"azure", 0xF0FFFF,
|
||||
"beige", 0xF5F5DC,
|
||||
"bisque", 0xFFE4C4,
|
||||
"black", 0x000000,
|
||||
"blanchedalmond", 0xFFEBCD,
|
||||
"blue", 0x0000FF,
|
||||
"blueviolet", 0x8A2BE2,
|
||||
"brown", 0xA52A2A,
|
||||
"burlywood", 0xDEB887,
|
||||
"cadetblue", 0x5F9EA0,
|
||||
"chartreuse", 0x7FFF00,
|
||||
"chocolate", 0xD2691E,
|
||||
"coral", 0xFF7F50,
|
||||
"cornflowerblue", 0x6495ED,
|
||||
"cornsilk", 0xFFF8DC,
|
||||
"crimson", 0xDC143C,
|
||||
"cyan", 0x00FFFF,
|
||||
"darkblue", 0x00008B,
|
||||
"darkcyan", 0x008B8B,
|
||||
"darkgoldenrod", 0xB8860B,
|
||||
"darkgray", 0xA9A9A9,
|
||||
"darkgreen", 0x006400,
|
||||
"darkkhaki", 0xBDB76B,
|
||||
"darkmagenta", 0x8B008B,
|
||||
"darkolivegreen", 0x556B2F,
|
||||
"darkorange", 0xFF8C00,
|
||||
"darkorchid", 0x9932CC,
|
||||
"darkred", 0x8B0000,
|
||||
"darksalmon", 0xE9967A,
|
||||
"darkseagreen", 0x8FBC8F,
|
||||
"darkslateblue", 0x483D8B,
|
||||
"darkslategray", 0x2F4F4F,
|
||||
"darkturquoise", 0x00CED1,
|
||||
"darkviolet", 0x9400D3,
|
||||
"deeppink", 0xFF1493,
|
||||
"deepskyblue", 0x00BFFF,
|
||||
"dimgray", 0x696969,
|
||||
"dodgerblue", 0x1E90FF,
|
||||
"firebrick", 0xB22222,
|
||||
"floralwhite", 0xFFFAF0,
|
||||
"forestgreen", 0x228B22,
|
||||
"fuchsia", 0xFF00FF,
|
||||
"gainsboro", 0xDCDCDC,
|
||||
"ghostwhite", 0xF8F8FF,
|
||||
"gold", 0xFFD700,
|
||||
"goldenrod", 0xDAA520,
|
||||
"gray", 0x808080,
|
||||
"green", 0x008000,
|
||||
"greenyellow", 0xADFF2F,
|
||||
"honeydew", 0xF0FFF0,
|
||||
"hotpink", 0xFF69B4,
|
||||
"indianred", 0xCD5C5C,
|
||||
"indigo", 0x4B0082,
|
||||
"ivory", 0xFFFFF0,
|
||||
"khaki", 0xF0E68C,
|
||||
"lavender", 0xE6E6FA,
|
||||
"lavenderblush", 0xFFF0F5,
|
||||
"lawngreen", 0x7CFC00,
|
||||
"lemonchiffon", 0xFFFACD,
|
||||
"lightblue", 0xADD8E6,
|
||||
"lightcoral", 0xF08080,
|
||||
"lightcyan", 0xE0FFFF,
|
||||
"aliceblue", 0xF0F8FF,
|
||||
"antiquewhite", 0xFAEBD7,
|
||||
"aqua", 0x00FFFF,
|
||||
"aquamarine", 0x7FFFD4,
|
||||
"azure", 0xF0FFFF,
|
||||
"beige", 0xF5F5DC,
|
||||
"bisque", 0xFFE4C4,
|
||||
"black", 0x000000,
|
||||
"blanchedalmond",0xFFEBCD,
|
||||
"blue", 0x0000FF,
|
||||
"blueviolet", 0x8A2BE2,
|
||||
"brown", 0xA52A2A,
|
||||
"burlywood", 0xDEB887,
|
||||
"cadetblue", 0x5F9EA0,
|
||||
"chartreuse", 0x7FFF00,
|
||||
"chocolate", 0xD2691E,
|
||||
"coral", 0xFF7F50,
|
||||
"cornflowerblue",0x6495ED,
|
||||
"cornsilk", 0xFFF8DC,
|
||||
"crimson", 0xDC143C,
|
||||
"cyan", 0x00FFFF,
|
||||
"darkblue", 0x00008B,
|
||||
"darkcyan", 0x008B8B,
|
||||
"darkgoldenrod", 0xB8860B,
|
||||
"darkgray", 0xA9A9A9,
|
||||
"darkgreen", 0x006400,
|
||||
"darkkhaki", 0xBDB76B,
|
||||
"darkmagenta", 0x8B008B,
|
||||
"darkolivegreen",0x556B2F,
|
||||
"darkorange", 0xFF8C00,
|
||||
"darkorchid", 0x9932CC,
|
||||
"darkred", 0x8B0000,
|
||||
"darksalmon", 0xE9967A,
|
||||
"darkseagreen", 0x8FBC8F,
|
||||
"darkslateblue", 0x483D8B,
|
||||
"darkslategray", 0x2F4F4F,
|
||||
"darkturquoise", 0x00CED1,
|
||||
"darkviolet", 0x9400D3,
|
||||
"deeppink", 0xFF1493,
|
||||
"deepskyblue", 0x00BFFF,
|
||||
"dimgray", 0x696969,
|
||||
"dodgerblue", 0x1E90FF,
|
||||
"firebrick", 0xB22222,
|
||||
"floralwhite", 0xFFFAF0,
|
||||
"forestgreen", 0x228B22,
|
||||
"fuchsia", 0xFF00FF,
|
||||
"gainsboro", 0xDCDCDC,
|
||||
"ghostwhite", 0xF8F8FF,
|
||||
"gold", 0xFFD700,
|
||||
"goldenrod", 0xDAA520,
|
||||
"gray", 0x808080,
|
||||
"green", 0x008000,
|
||||
"greenyellow", 0xADFF2F,
|
||||
"honeydew", 0xF0FFF0,
|
||||
"hotpink", 0xFF69B4,
|
||||
"indianred", 0xCD5C5C,
|
||||
"indigo", 0x4B0082,
|
||||
"ivory", 0xFFFFF0,
|
||||
"khaki", 0xF0E68C,
|
||||
"lavender", 0xE6E6FA,
|
||||
"lavenderblush", 0xFFF0F5,
|
||||
"lawngreen", 0x7CFC00,
|
||||
"lemonchiffon", 0xFFFACD,
|
||||
"lightblue", 0xADD8E6,
|
||||
"lightcoral", 0xF08080,
|
||||
"lightcyan", 0xE0FFFF,
|
||||
"lightgoldenrodyellow", 0xFAFAD2,
|
||||
"lightgreen", 0x90EE90,
|
||||
"lightgrey", 0xD3D3D3,
|
||||
"lightpink", 0xFFB6C1,
|
||||
"lightsalmon", 0xFFA07A,
|
||||
"lightseagreen", 0x20B2AA,
|
||||
"lightskyblue", 0x87CEFA,
|
||||
"lightslategray", 0x778899,
|
||||
"lightsteelblue", 0xB0C4DE,
|
||||
"lightyellow", 0xFFFFE0,
|
||||
"lime", 0x00FF00,
|
||||
"limegreen", 0x32CD32,
|
||||
"linen", 0xFAF0E6,
|
||||
"magenta", 0xFF00FF,
|
||||
"maroon", 0x800000,
|
||||
"mediumaquamarine", 0x66CDAA,
|
||||
"mediumblue", 0x0000CD,
|
||||
"mediumorchid", 0xBA55D3,
|
||||
"mediumpurple", 0x9370DB,
|
||||
"mediumseagreen", 0x3CB371,
|
||||
"mediumslateblue", 0x7B68EE,
|
||||
"mediumspringgreen", 0x00FA9A,
|
||||
"mediumturquoise", 0x48D1CC,
|
||||
"mediumvioletred", 0xC71585,
|
||||
"midnightblue", 0x191970,
|
||||
"mintcream", 0xF5FFFA,
|
||||
"mistyrose", 0xFFE4E1,
|
||||
"moccasin", 0xFFE4B5,
|
||||
"navajowhite", 0xFFDEAD,
|
||||
"navy", 0x000080,
|
||||
"oldlace", 0xFDF5E6,
|
||||
"olive", 0x808000,
|
||||
"olivedrab", 0x6B8E23,
|
||||
"orange", 0xFFA500,
|
||||
"orangered", 0xFF4500,
|
||||
"orchid", 0xDA70D6,
|
||||
"palegoldenrod", 0xEEE8AA,
|
||||
"palegreen", 0x98FB98,
|
||||
"paleturquoise", 0xAFEEEE,
|
||||
"palevioletred", 0xDB7093,
|
||||
"papayawhip", 0xFFEFD5,
|
||||
"peachpuff", 0xFFDAB9,
|
||||
"peru", 0xCD853F,
|
||||
"pink", 0xFFC0CB,
|
||||
"plum", 0xDDA0DD,
|
||||
"powderblue", 0xB0E0E6,
|
||||
"purple", 0x800080,
|
||||
"red", 0xFF0000,
|
||||
"rosybrown", 0xBC8F8F,
|
||||
"royalblue", 0x4169E1,
|
||||
"saddlebrown", 0x8B4513,
|
||||
"salmon", 0xFA8072,
|
||||
"sandybrown", 0xF4A460,
|
||||
"seagreen", 0x2E8B57,
|
||||
"seashell", 0xFFF5EE,
|
||||
"sienna", 0xA0522D,
|
||||
"silver", 0xC0C0C0,
|
||||
"skyblue", 0x87CEEB,
|
||||
"slateblue", 0x6A5ACD,
|
||||
"slategray", 0x708090,
|
||||
"snow", 0xFFFAFA,
|
||||
"springgreen", 0x00FF7F,
|
||||
"steelblue", 0x4682B4,
|
||||
"tan", 0xD2B48C,
|
||||
"teal", 0x008080,
|
||||
"thistle", 0xD8BFD8,
|
||||
"tomato", 0xFF6347,
|
||||
"turquoise", 0x40E0D0,
|
||||
"violet", 0xEE82EE,
|
||||
"wheat", 0xF5DEB3,
|
||||
"white", 0xFFFFFF,
|
||||
"whitesmoke", 0xF5F5F5,
|
||||
"yellow", 0xFFFF00,
|
||||
"yellowgreen", 0x9ACD32,
|
||||
"lightgreen", 0x90EE90,
|
||||
"lightgrey", 0xD3D3D3,
|
||||
"lightpink", 0xFFB6C1,
|
||||
"lightsalmon", 0xFFA07A,
|
||||
"lightseagreen", 0x20B2AA,
|
||||
"lightskyblue", 0x87CEFA,
|
||||
"lightslategray",0x778899,
|
||||
"lightsteelblue",0xB0C4DE,
|
||||
"lightyellow", 0xFFFFE0,
|
||||
"lime", 0x00FF00,
|
||||
"limegreen", 0x32CD32,
|
||||
"linen", 0xFAF0E6,
|
||||
"magenta", 0xFF00FF,
|
||||
"maroon", 0x800000,
|
||||
"mediumaquamarine",0x66CDAA,
|
||||
"mediumblue", 0x0000CD,
|
||||
"mediumorchid", 0xBA55D3,
|
||||
"mediumpurple", 0x9370DB,
|
||||
"mediumseagreen",0x3CB371,
|
||||
"mediumslateblue",0x7B68EE,
|
||||
"mediumspringgreen",0x00FA9A,
|
||||
"mediumturquoise",0x48D1CC,
|
||||
"mediumvioletred",0xC71585,
|
||||
"midnightblue", 0x191970,
|
||||
"mintcream", 0xF5FFFA,
|
||||
"mistyrose", 0xFFE4E1,
|
||||
"moccasin", 0xFFE4B5,
|
||||
"navajowhite", 0xFFDEAD,
|
||||
"navy", 0x000080,
|
||||
"oldlace", 0xFDF5E6,
|
||||
"olive", 0x808000,
|
||||
"olivedrab", 0x6B8E23,
|
||||
"orange", 0xFFA500,
|
||||
"orangered", 0xFF4500,
|
||||
"orchid", 0xDA70D6,
|
||||
"palegoldenrod", 0xEEE8AA,
|
||||
"palegreen", 0x98FB98,
|
||||
"paleturquoise", 0xAFEEEE,
|
||||
"palevioletred", 0xDB7093,
|
||||
"papayawhip", 0xFFEFD5,
|
||||
"peachpuff", 0xFFDAB9,
|
||||
"peru", 0xCD853F,
|
||||
"pink", 0xFFC0CB,
|
||||
"plum", 0xDDA0DD,
|
||||
"powderblue", 0xB0E0E6,
|
||||
"purple", 0x800080,
|
||||
"red", 0xFF0000,
|
||||
"rosybrown", 0xBC8F8F,
|
||||
"royalblue", 0x4169E1,
|
||||
"saddlebrown", 0x8B4513,
|
||||
"salmon", 0xFA8072,
|
||||
"sandybrown", 0xF4A460,
|
||||
"seagreen", 0x2E8B57,
|
||||
"seashell", 0xFFF5EE,
|
||||
"sienna", 0xA0522D,
|
||||
"silver", 0xC0C0C0,
|
||||
"skyblue", 0x87CEEB,
|
||||
"slateblue", 0x6A5ACD,
|
||||
"slategray", 0x708090,
|
||||
"snow", 0xFFFAFA,
|
||||
"springgreen", 0x00FF7F,
|
||||
"steelblue", 0x4682B4,
|
||||
"tan", 0xD2B48C,
|
||||
"teal", 0x008080,
|
||||
"thistle", 0xD8BFD8,
|
||||
"tomato", 0xFF6347,
|
||||
"turquoise", 0x40E0D0,
|
||||
"violet", 0xEE82EE,
|
||||
"wheat", 0xF5DEB3,
|
||||
"white", 0xFFFFFF,
|
||||
"whitesmoke", 0xF5F5F5,
|
||||
"yellow", 0xFFFF00,
|
||||
"yellowgreen", 0x9ACD32,
|
||||
0};
|
||||
|
||||
dword StrToCol(char* htmlcolor)
|
||||
|
@ -46,7 +46,7 @@ byte UrlsHistory::GoBack()
|
||||
|
||||
history_current--;
|
||||
strcpy(#URL, #history_list[history_current].Item);
|
||||
return 1;
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
|
@ -7,7 +7,7 @@ char *ITEMS_LIST[]={
|
||||
"View in Tinypad F3",52,
|
||||
"WIN F5",REFRESH,
|
||||
"DOS Ctrl+D",04,
|
||||
"KOI-8 Ctrl+K",11,
|
||||
"KOI Ctrl+K",11,
|
||||
"UTF Ctrl+U",21,
|
||||
"Line breaks ON" ,01,
|
||||
"TrueType fonts" ,05,
|
||||
@ -78,10 +78,9 @@ void menu_rmb()
|
||||
|
||||
case evReDraw:
|
||||
while (ITEMS_LIST[items_num*2]) items_num++;
|
||||
DefineAndDrawWindow(Form.left+m.x,Form.top+m.y+GetSkinHeight()+3,ITEM_WIDTH,items_num*ITEM_HEIGHT+1,0x01,0x10FFFFFF,0);
|
||||
DefineButton(0, 0, ITEM_WIDTH, ITEM_HEIGHT, 10+BT_HIDE+BT_NOFRAME, 0); //hack
|
||||
DefineAndDrawWindow(Form.left+m.x,Form.top+m.y+GetSkinHeight()+3,ITEM_WIDTH,items_num*ITEM_HEIGHT+1,0x01,0x10FFFFFF,0,0x01fffFFF);
|
||||
|
||||
DrawRegion(0,0,ITEM_WIDTH,items_num*ITEM_HEIGHT+1,0x777777); //îáîäîê
|
||||
DrawRectangle(0,0,ITEM_WIDTH,items_num*ITEM_HEIGHT+1,0x777777); //îáîäîê
|
||||
_ITEMS_DRAW:
|
||||
for (i=0; i<items_num; i++;)
|
||||
{
|
||||
@ -91,6 +90,7 @@ void menu_rmb()
|
||||
if (ITEMS_LIST[i*2+1]==1) && (pre_text==2) DrawBar(ITEM_WIDTH-18, i*ITEM_HEIGHT+8, 4, 4, 0x444444);
|
||||
if (ITEMS_LIST[i*2+1]==5) && (use_truetype==1) DrawBar(ITEM_WIDTH-18, i*ITEM_HEIGHT+8, 4, 4, 0x444444);
|
||||
}
|
||||
DrawBar(33, cur_encoding+1*ITEM_HEIGHT+8, 4, 4, 0x444444); //ïîêàçûâàåò âûáðàíóþ êîäèðîâêó
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
//ェュョッェィ
|
||||
//<EFBFBD>ⅰ<EFBFBD>
|
||||
#define BACK 300
|
||||
#define FORWARD 301
|
||||
#define REFRESH 302
|
||||
|
33
programs/network/htmlv/lib/figures.h
Normal file
33
programs/network/htmlv/lib/figures.h
Normal file
@ -0,0 +1,33 @@
|
||||
void DrawRectangle(dword x,y,width,height,color1)
|
||||
{
|
||||
DrawBar(x,y,width,1,color1);
|
||||
DrawBar(x,y+height,width,1,color1);
|
||||
DrawBar(x,y,1,height,color1);
|
||||
DrawBar(x+width,y,1,height+1,color1);
|
||||
}
|
||||
|
||||
void DrawRectangle3D(dword x,y,width,height,color1,color2)
|
||||
{
|
||||
DrawBar(x,y,width+1,1,color1);
|
||||
DrawBar(x,y+1,1,height-1,color1);
|
||||
DrawBar(x+width,y+1,1,height,color2);
|
||||
DrawBar(x,y+height,width,1,color2);
|
||||
}
|
||||
|
||||
void DrawCaptButton(dword x,y,width,height,id,color,text,text_len)
|
||||
{
|
||||
DefineButton(x,y,width,height,id+BT_HIDE,0xEFEBEF);
|
||||
WriteText(-text_len*6+width/2+x+1,height/2-3+y,0x80,0,text,0);
|
||||
}
|
||||
|
||||
void DrawCircle(int x, y, r)
|
||||
{
|
||||
int i;
|
||||
float px=0, py=r, ii = r * 3.1415926 * 2;
|
||||
FOR (i = 0; i < ii; i++)
|
||||
{
|
||||
PutPixel(px + x, y - py, 0);
|
||||
px = py / r + px;
|
||||
py = -px / r + py;
|
||||
}
|
||||
}
|
@ -71,7 +71,8 @@ void mouse::get()
|
||||
|
||||
struct system_colors
|
||||
{
|
||||
dword frame,grab,grab_button,grab_button_text,grab_text,work,work_button,work_button_text,work_text,work_graph;
|
||||
dword frame,grab,grab_button,grab_button_text,grab_text,
|
||||
work,work_button,work_button_text,work_text,work_graph;
|
||||
void get();
|
||||
};
|
||||
|
||||
@ -263,7 +264,7 @@ inline fastcall int GetSystemLanguage()
|
||||
$int 0x40
|
||||
}
|
||||
|
||||
inline fastcall dword GetSkinHeight()
|
||||
inline fastcall GetSkinHeight()
|
||||
{
|
||||
$push ebx
|
||||
$mov eax,48
|
||||
@ -313,9 +314,30 @@ inline fastcall int PlaySpeaker( ESI)
|
||||
$int 0x40
|
||||
}
|
||||
|
||||
inline fastcall void debug( EDX)
|
||||
{
|
||||
$push ebx
|
||||
$push ecx
|
||||
$mov eax, 63
|
||||
$mov ebx, 1
|
||||
next_char:
|
||||
$mov ecx, DSDWORD[edx]
|
||||
$or cl, cl
|
||||
$jz done
|
||||
$int 0x40
|
||||
$inc edx
|
||||
$jmp next_char
|
||||
done:
|
||||
$mov cl, 13
|
||||
$int 0x40
|
||||
$mov cl, 10
|
||||
$int 0x40
|
||||
$pop ecx
|
||||
$pop ebx
|
||||
}
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
void DefineAndDrawWindow(dword x,y, sizeX,sizeY, byte WindowType,dword WindowAreaColor, EDI)
|
||||
void DefineAndDrawWindow(dword x,y, sizeX,sizeY, byte WindowType,dword WindowAreaColor, EDI, ESI)
|
||||
{
|
||||
EAX = 12; // function 12:tell os about windowdraw
|
||||
EBX = 1;
|
||||
@ -438,69 +460,4 @@ inline fastcall void DeleteButton( EDX)
|
||||
EAX = 8;
|
||||
EDX += BT_DEL;
|
||||
$int 0x40;
|
||||
}
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
:void DrawRegion(dword x,y,width,height,color1)
|
||||
{
|
||||
DrawBar(x,y,width,1,color1); //¯®«®á £®à ᢥàåã
|
||||
DrawBar(x,y+height,width,1,color1); //¯®«®á £®à ᨧã
|
||||
DrawBar(x,y,1,height,color1); //¯®«®á ¢¥àåã á«¥¢
|
||||
DrawBar(x+width,y,1,height+1,color1); //¯®«®á ¢¥àåã á¯à ¢
|
||||
}
|
||||
|
||||
:void DrawRegion_3D(dword x,y,width,height,color1,color2)
|
||||
{
|
||||
DrawBar(x,y,width+1,1,color1); //¯®«®á £®à ᢥàåã
|
||||
DrawBar(x,y+1,1,height-1,color1); //¯®«®á á«¥¢
|
||||
DrawBar(x+width,y+1,1,height,color2); //¯®«®á á¯à ¢
|
||||
DrawBar(x,y+height,width,1,color2); //¯®«®á £®à ᨧã
|
||||
}
|
||||
|
||||
:void DrawFlatButton(dword x,y,width,height,id,color,text)
|
||||
{
|
||||
DrawRegion_3D(x,y,width,height,0x94AECE,0x94AECE);
|
||||
DrawRegion_3D(x+1,y+1,width-2,height-2,0xFFFFFF,0xC7C7C7);
|
||||
DrawBar(x+2,y+2,width-3,height-3,color); //§ «¨¢ª
|
||||
IF (id<>0) DefineButton(x,y,width,height,id+BT_HIDE,0xEFEBEF); //ª®¯ª
|
||||
//WriteText(-strlen(text)*6+width/2+x+1,height/2-3+y,0x80,0,text,0);
|
||||
WriteText(width/2+x+1,height/2-3+y,0x80,0,text,0);
|
||||
}
|
||||
|
||||
:void DrawCircle(int x, y, r)
|
||||
{
|
||||
int i;
|
||||
float px=0, py=r, ii = r * 3.1415926 * 2;
|
||||
FOR (i = 0; i < ii; i++)
|
||||
{
|
||||
PutPixel(px + x, y - py, 0);
|
||||
px = py / r + px;
|
||||
py = -px / r + py;
|
||||
}
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
inline fastcall void debug( EDX)
|
||||
{
|
||||
$push ebx
|
||||
$push ecx
|
||||
$mov eax, 63
|
||||
$mov ebx, 1
|
||||
next_char:
|
||||
$mov ecx, DSDWORD[edx]
|
||||
$or cl, cl
|
||||
$jz done
|
||||
$int 0x40
|
||||
$inc edx
|
||||
$jmp next_char
|
||||
done:
|
||||
$mov cl, 13
|
||||
$int 0x40
|
||||
$mov cl, 10
|
||||
$int 0x40
|
||||
$pop ecx
|
||||
$pop ebx
|
||||
}
|
||||
}
|
@ -193,7 +193,7 @@ inline fastcall signed int strchr( ESI,BL)
|
||||
|
||||
inline fastcall signed int strrchr( ESI,BL)
|
||||
{
|
||||
int jj=0, last=-1;
|
||||
int jj=0, last=0;
|
||||
do{
|
||||
jj++;
|
||||
$lodsb
|
||||
|
Loading…
Reference in New Issue
Block a user