Subversion Repositories Kolibri OS

Rev

Rev 7752 | Go to most recent revision | Blame | Last modification | View Log | Download | RSS feed

  1. #include "..\TWB\colors.h"
  2. #include "..\TWB\anchors.h"
  3. #include "..\TWB\parce_tag.h"
  4. #include "..\TWB\absolute_url.h"
  5. char line[500];
  6. #include "..\TWB\unicode_tags.h"
  7.  
  8. enum { ALIGN_LEFT, ALIGN_CENTER, ALIGN_RIGHT};
  9.  
  10. struct _style {
  11.         bool
  12.         b, u, s, h,
  13.         pre,
  14.         blq,
  15.         li,
  16.         li_tab,
  17.         button,
  18.         image,
  19.         align;
  20.         dword bg_color;
  21. };
  22.  
  23. struct TWebBrowser {
  24.         llist list;
  25.         _style style;
  26.         DrawBufer DrawBuf;
  27.         dword draw_y, stolbec;
  28.         int zoom;
  29.         dword o_bufpointer;
  30.         void SetPageDefaults();
  31.         void AddCharToTheLine();
  32.         void ParseHtml();
  33.         void SetStyle();
  34.         void DrawStyle();
  35.         void DrawPage();
  36.         void DrawScroller();
  37.         void NewLine();
  38.         bool CheckForLineBreak();
  39.         void BufEncode();
  40. } WB1;
  41.  
  42. dword link_color_inactive;
  43. dword link_color_active;
  44. dword page_bg;
  45.  
  46. bool    
  47.         link,
  48.         cur_encoding,
  49.         t_html,
  50.         t_body;
  51.  
  52. #include "..\TWB\img_cache.h"
  53. #include "..\TWB\links.h"
  54.  
  55. dword bufpointer=0;
  56. dword bufsize=0;
  57.  
  58. int body_magrin=6;
  59. int basic_line_h=22;
  60.  
  61. char header[150];
  62. char oldtag[100];
  63.  
  64. scroll_bar scroll_wv = { 15,200,398,44,0,2,115,15,0,0xeeeeee,0xBBBbbb,0xeeeeee,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1};
  65.  
  66. //============================================================================================
  67. void TWebBrowser::DrawStyle()
  68. {
  69.         dword start_x, line_length, stolbec_len;
  70.        
  71.         if (!header)
  72.         {
  73.                 strncpy(#header, #line, sizeof(header)-1);
  74.                 line = 0;
  75.                 return;
  76.         }
  77.         if (t_html) && (!t_body) return;
  78.        
  79.         if (line)
  80.         {
  81.                 start_x = stolbec * list.font_w + body_magrin + list.x;
  82.                 stolbec_len = strlen(#line) * zoom;
  83.                 line_length = stolbec_len * list.font_w;
  84.  
  85.                 if (debug_mode) {
  86.                         DrawBuf.DrawBar(start_x, draw_y, line_length, list.item_h, 0xDDDddd);
  87.                 }
  88.  
  89.                 if (style.bg_color!=page_bg) {
  90.                         DrawBuf.DrawBar(start_x, draw_y, line_length, list.item_h, style.bg_color);
  91.                 }
  92.  
  93.                 if (style.image) {
  94.                         DrawBuf.DrawBar(start_x, draw_y, line_length, list.item_h-1, 0xF9DBCB);
  95.                 }
  96.                 if (style.button) {
  97.                         DrawBuf.DrawBar(start_x, draw_y, line_length, list.item_h - calc(zoom*2), 0xCCCccc);
  98.                         DrawBuf.DrawBar(start_x, draw_y + list.item_h - calc(zoom*2), line_length, zoom, 0x999999);
  99.                 }
  100.  
  101.                 DrawBuf.WriteText(start_x, draw_y, list.font_type, text_colors[text_color_index], #line);
  102.                 if (style.b) DrawBuf.WriteText(start_x+1, draw_y, list.font_type, text_colors[text_color_index], #line);
  103.                 if (style.s) DrawBuf.DrawBar(start_x, list.item_h / 2 - zoom + draw_y, line_length, zoom, text_colors[text_color_index]);
  104.                 if (style.u) DrawBuf.DrawBar(start_x, list.item_h - zoom - zoom + draw_y, line_length, zoom, text_colors[text_color_index]);
  105.                 if (link) {
  106.                         if (line[0]==' ') && (line[1]==NULL) {} else {
  107.                                 DrawBuf.DrawBar(start_x, draw_y + list.item_h - calc(zoom*2), line_length, zoom, link_color_inactive);
  108.                                 PageLinks.AddText(start_x, draw_y + list.y, line_length, list.item_h - calc(zoom*2), UNDERLINE, zoom);                         
  109.                         }
  110.                 }
  111.                 stolbec += stolbec_len;
  112.                 if (debug_mode) debug(#line);
  113.                 line = NULL;
  114.         }
  115. }
  116. //============================================================================================
  117. void TWebBrowser::SetPageDefaults()
  118. {
  119.         style.b = style.u = style.s = style.h = style.blq = t_html = t_body = style.pre =
  120.         style.li = link = text_color_index = text_colors[0] = style.li_tab = false;
  121.         style.align = ALIGN_LEFT;
  122.         link_color_inactive = 0x0000FF;
  123.         link_color_active = 0xFF0000;
  124.         page_bg = 0xFFFFFF;
  125.         style.bg_color = page_bg;
  126.         DrawBuf.Fill(0, page_bg);
  127.         PageLinks.Clear();
  128.         anchors.clear();
  129.         strncpy(#header, #version, sizeof(header)-1);
  130.         cur_encoding = CH_NULL;
  131.         draw_y = body_magrin;
  132.         stolbec = 0;
  133.         line = 0;
  134.         zoom = 1;
  135.         if (o_bufpointer) free(o_bufpointer);
  136.         o_bufpointer = 0;
  137. }
  138. //============================================================================================
  139. void TWebBrowser::AddCharToTheLine(unsigned char _char)
  140. {
  141.         dword line_len;
  142.         if (_char<=15) _char=' ';
  143.         line_len = strlen(#line);
  144.         if (!style.pre) && (_char == ' ')
  145.         {
  146.                 if (line[line_len-1]==' ') return; //no double spaces
  147.                 if (!stolbec) && (!line) return; //no paces at the beginning of the line
  148.         }
  149.         if (line_len < sizeof(line)) chrcat(#line, _char);
  150.         CheckForLineBreak();
  151. }
  152. //============================================================================================
  153. void TWebBrowser::ParseHtml(){
  154.         word bukva[2];
  155.         char unicode_symbol[10];
  156.         dword unicode_symbol_result;
  157.         dword j;
  158.         bool ignor_param=false;
  159.         int tab_len;
  160.         dword bufpos;
  161.         SetPageDefaults();
  162.         if (strstri(bufpointer, "<body")==-1) {
  163.                 t_body = true;
  164.                 if (strstri(bufpointer, "<html")==-1)  style.pre = true; //show linebreaks for a plaint text
  165.         }
  166.         for (bufpos=bufpointer ; (bufpos < bufpointer+bufsize) && (ESBYTE[bufpos]!=0) ; bufpos++;)
  167.         {
  168.                 bukva = ESBYTE[bufpos];
  169.                 switch (bukva)
  170.                 {
  171.                 case 0x0a:
  172.                         if (style.pre) {
  173.                                 DrawStyle();
  174.                                 NewLine();
  175.                         } else {
  176.                                 AddCharToTheLine(0x0a);
  177.                         }
  178.                         break;
  179.                 case 0x09:
  180.                         if (style.pre) {
  181.                                 tab_len = strlen(#line) + stolbec % 4;
  182.                                 if (!tab_len) tab_len = 4; else tab_len = 4 - tab_len;
  183.                                 for (j=0; j<tab_len; j++;) chrcat(#line,' ');
  184.                         } else {
  185.                                 AddCharToTheLine(0x09);
  186.                         }
  187.                         break;
  188.                 case '&': //&nbsp; and so on
  189.                         for (j=1, unicode_symbol=0; (ESBYTE[bufpos+j]<>';') && (j<8); j++)
  190.                         {
  191.                                 bukva = ESBYTE[bufpos+j];
  192.                                 chrcat(#unicode_symbol, bukva);
  193.                         }
  194.                         if (bukva = GetUnicodeSymbol(#unicode_symbol)) {
  195.                                 bufpos += j;
  196.                                 CheckForLineBreak();
  197.                         } else {
  198.                                 AddCharToTheLine('&');
  199.                         }
  200.                         break;
  201.                 case '<':
  202.                         bufpos++;
  203.                         if (!strncmp(bufpos,"!--",3))
  204.                         {
  205.                                 bufpos+=3;
  206.                                 while (strncmp(bufpos,"-->",3)!=0) && (bufpos < bufpointer + bufsize)
  207.                                 {
  208.                                         bufpos++;
  209.                                 }
  210.                                 bufpos+=2;
  211.                                 break;
  212.                         }
  213.                         tag.reset();
  214.                         if (ESBYTE[bufpos] == '/') {
  215.                                 tag.opened = false;
  216.                                 bufpos++;
  217.                         }
  218.  
  219.                         ignor_param=false;
  220.                         while (ESBYTE[bufpos] !='>') && (bufpos < bufpointer + bufsize) //ïîëó÷àåì òåã è åãî ïàðàìåòðû
  221.                         {
  222.                                 bukva = ESBYTE[bufpos];
  223.                                 if (bukva == '\9') || (bukva == '\x0a') || (bukva == '\x0d') bukva = ' ';
  224.                                 if (!ignor_param) && (bukva <>' ')
  225.                                 {
  226.                                         if (strlen(#tag.name)+1<sizeof(tag.name)) chrcat(#tag.name, bukva);
  227.                                 }
  228.                                 else
  229.                                 {
  230.                                         ignor_param = true;
  231.                                         if (strlen(#tag.params)+1<sizeof(tag.params)) strcat(#tag.params, #bukva);
  232.                                         //      chrncat(#tag.params, bukva, sizeof(tag.params)-1);
  233.                                 }
  234.                                 bufpos++;
  235.                         }
  236.                         strlwr(#tag.name);
  237.  
  238.                         // ignore text inside the next tags
  239.                         if (tag.is("script")) || (tag.is("style")) || (tag.is("binary")) || (tag.is("select"))  {
  240.                                 sprintf(#tag.params, "</%s>", #tag.name);
  241.                                 j = strstri(bufpos, #tag.params);
  242.                                 if (j!=-1) bufpos = j-1;
  243.                                 break;
  244.                         }
  245.  
  246.                         if (tag.name[strlen(#tag.name)-1]=='/') tag.name[strlen(#tag.name)-1]=NULL; //for br/ !!!!!!!!
  247.                         if (tag.params) tag.parse_params();
  248.  
  249.                         if (tag.name) && (!tag.is("i")) && (!tag.is("svg")) {
  250.                                 CheckForLineBreak();
  251.                                 DrawStyle();
  252.                                 if (tag.name) SetStyle();
  253.                         }
  254.                         strncpy(#oldtag, #tag.name, sizeof(oldtag)-1);
  255.                         break;
  256.                 default:
  257.                         AddCharToTheLine(ESBYTE[bufpos]);
  258.                 }
  259.         }
  260.         DrawStyle();
  261.         NewLine();
  262.         list.count = draw_y;
  263.         list.CheckDoesValuesOkey();
  264.         anchors.current = NULL;
  265. }
  266. //============================================================================================
  267. bool TWebBrowser::CheckForLineBreak()
  268. {
  269.         int line_break_pos;
  270.         char new_line_text[4096];
  271.         if (strlen(#line)*zoom + stolbec < list.column_max) return false;
  272.         line_break_pos = strrchr(#line, ' ');
  273.         if (line_break_pos*zoom + stolbec > list.column_max) {
  274.                 line_break_pos = list.column_max/zoom - stolbec;
  275.                 while(line_break_pos) && (line[line_break_pos]!=' ') line_break_pos--;
  276.         }
  277.         if (!line_break_pos) && (strlen(#line)*zoom>list.column_max) {
  278.                 line_break_pos=list.column_max/zoom;
  279.                 if (!stolbec)&&(style.pre) draw_y-=list.item_h; //hack to fix https://prnt.sc/rk3kyt
  280.         }
  281.         strcpy(#new_line_text, #line + line_break_pos);
  282.         line[line_break_pos] = 0x00;
  283.         DrawStyle();
  284.         strcpy(#line, #new_line_text);
  285.         NewLine();
  286.         //if (strlen(#line)*zoom + stolbec > list.column_max)CheckForLineBreak();
  287.         return true;
  288. }
  289. //============================================================================================
  290. void TWebBrowser::SetStyle() {
  291.         char img_path[4096]=0;
  292.         int meta_encoding;
  293.  
  294.         dword value;
  295.  
  296.         if (value = tag.get_value_of("name=")) || (value = tag.get_value_of("id=")) {
  297.                 anchors.add(value, draw_y);
  298.                 if (anchors.current) && (streq(value, #anchors.current+1)) {
  299.                         list.first = draw_y;
  300.                         anchors.current = NULL;
  301.                 }
  302.         }      
  303.  
  304.         if (tag.is("html")) {
  305.                 t_html = tag.opened;
  306.                 return;
  307.         }
  308.         if(tag.is("title")) {
  309.                 if (tag.opened) header=NULL;
  310.                 return;
  311.         }
  312.        
  313.         IF(tag.is("q"))
  314.         {
  315.                 if (tag.opened) {
  316.                         meta_encoding = strlen(#line);
  317.                         if (line[meta_encoding-1] != ' ') chrcat(#line, ' ');
  318.                         chrcat(#line, '\"');
  319.                 }
  320.                 if (!tag.opened) strcat(#line, "\" ");
  321.                 return;
  322.         }
  323.         if (tag.is("body")) {
  324.                 t_body = tag.opened;
  325.                 if (value = tag.get_value_of("link="))  link_color_inactive = GetColor(value);
  326.                 if (value = tag.get_value_of("alink=")) link_color_active = GetColor(value);
  327.                 if (value = tag.get_value_of("text="))  text_colors[0]=GetColor(value);
  328.                 if (value = tag.get_value_of("bgcolor=")) {
  329.                         style.bg_color = page_bg = GetColor(value);
  330.                         DrawBuf.Fill(0, page_bg);
  331.                 }
  332.                 if (tag.opened) {
  333.                         if (cur_encoding==CH_NULL) {
  334.                                 cur_encoding = CH_CP866;
  335.                                 //BufEncode(CH_UTF8);
  336.                                 debugln("Document has no information about encoding!");
  337.                         }
  338.                         if (!streq(#header, #version)) {
  339.                                 ChangeCharset(charsets[cur_encoding], "CP866", #header);
  340.                                 strncat(#header, " - ", sizeof(header)-1);
  341.                                 strncat(#header, #version, sizeof(header)-1);
  342.                         }
  343.                         DrawTitle(#header);
  344.                 }
  345.                 return;
  346.         }
  347.         if (tag.is("a")) {
  348.                 if (tag.opened)
  349.                 {
  350.                         if (link) IF(text_color_index > 0) text_color_index--; //åñëè ïðåäûäóùèé òåã à íå áûë çàêðûò
  351.                         if (value = tag.get_value_of("href=")) && (!strstr(value,"javascript:"))
  352.                         {
  353.                                 text_color_index++;
  354.                                 text_colors[text_color_index] = text_colors[text_color_index-1];
  355.                                 link = 1;
  356.                                 text_colors[text_color_index] = link_color_inactive;
  357.                                 PageLinks.AddLink(value);
  358.                         }
  359.                 } else {
  360.                         link = 0;
  361.                         IF(text_color_index > 0) text_color_index--;
  362.                 }
  363.                 return;
  364.         }
  365.         if (tag.is("font")) {
  366.                 style.bg_color = page_bg;
  367.                 if (tag.opened)
  368.                 {
  369.                         text_color_index++;
  370.                         text_colors[text_color_index] = text_colors[text_color_index-1];
  371.                         if (value = tag.get_value_of("color=")) text_colors[text_color_index] = GetColor(value);
  372.                         if (value = tag.get_value_of("bg=")) style.bg_color = GetColor(value);
  373.                 }
  374.                 else if (text_color_index > 0) text_color_index--;
  375.                 return;
  376.         }
  377.         if (tag.is("div")) {
  378.                 if (streq(#oldtag,"div")) && (tag.opened) return;
  379.                 NewLine();
  380.                 //IF (oldtag[0] != 'h')
  381.                 return;
  382.         }
  383.         if (tag.is("header")) || (tag.is("article")) || (tag.is("footer")) || (tag.is("figure")) {
  384.                 NewLine();
  385.                 return;
  386.         }
  387.         if (tag.is("p")) {
  388.                 IF (oldtag[0] == 'h') || (streq(#oldtag,"td")) || (streq(#oldtag,"p")) return;
  389.                 NewLine();
  390.                 //IF(tag.opened) NewLine();
  391.                 return;
  392.         }
  393.         if (tag.is("br")) { NewLine(); return; }
  394.         if (tag.is("tr")) { if (tag.opened) NewLine(); return; }
  395.         if (tag.is("b")) || (tag.is("strong")) || (tag.is("big")) { style.b = tag.opened; return; }
  396.         if (tag.is("button")) { style.button = tag.opened; stolbec++; return; }
  397.         if (tag.is("u")) || (tag.is("ins")) { style.u=tag.opened; return;}
  398.         if (tag.is("s")) || (tag.is("strike")) || (tag.is("del")) { style.s=tag.opened; return; }
  399.         if (tag.is("dd")) { stolbec += 5; return; }
  400.         if (tag.is("blockquote")) { style.blq = tag.opened; return; }
  401.         if (tag.is("pre")) || (tag.is("code")) { style.pre = tag.opened; return; }
  402.         if (tag.is("img")) {
  403.                 if (value = tag.get_value_of("src=")) strlcpy(#img_path, value, sizeof(img_path)-1);
  404.                 if (value = tag.get_value_of("title=")) && (strlen(value)<sizeof(line)-3) && (value) sprintf(#line, "[%s]", value);
  405.                 if (value = tag.get_value_of("alt=")) && (strlen(value)<sizeof(line)-3) && (value) sprintf(#line, "[%s]", value);
  406.                 if (!img_path) { line=0; return; }
  407.                 style.image = true;
  408.                 text_color_index++;
  409.                 text_colors[text_color_index] = 0x9A6F29;
  410.                 if (!line) {
  411.                         if (!strncmp(#img_path, "data:", 5)) img_path=0;
  412.                         replace_char(#img_path, '?', NULL, strlen(#img_path));
  413.                         sprintf(#line, "[%s]", #img_path+strrchr(#img_path, '/'));
  414.                         line[50]= NULL;
  415.                 }
  416.                 while (CheckForLineBreak()) {};
  417.                 DrawStyle();
  418.                 text_color_index--;
  419.                 style.image = false;
  420.                 //ImgCache.Images( list.x, draw_y, WB1.list.w);
  421.                 return;
  422.         }
  423.         if (tag.is("h1")) || (tag.is("h2")) || (tag.is("h3")) || (tag.is("caption")) {
  424.                 style.h = tag.opened;
  425.                 if (tag.opened)
  426.                 {
  427.                         NewLine();
  428.                         draw_y += 10;
  429.                         WB1.zoom=2;
  430.                         WB1.list.font_type |= 10011001b;
  431.                         if (value = tag.get_value_of("align=")) {
  432.                                 if (streq(value, "center")) style.align = ALIGN_CENTER;
  433.                                 if (streq(value, "right")) style.align = ALIGN_RIGHT;
  434.                         }
  435.                         list.item_h = basic_line_h * 2;
  436.                         if (tag.is("h1")) style.b = true;
  437.                 }
  438.                 else
  439.                 {
  440.                         if (tag.is("h1")) style.b = false;
  441.                         NewLine();
  442.                         WB1.zoom=1;
  443.                         WB1.list.font_type = 10011000b;
  444.                         style.align = ALIGN_LEFT;
  445.                         list.item_h = basic_line_h;
  446.                 }
  447.                 return;
  448.         }
  449.         if (tag.is("dt")) {
  450.                 style.li = tag.opened;
  451.                 if (tag.opened) NewLine();
  452.                 return;
  453.         }
  454.         if (tag.is("li")) || (tag.is("dt"))
  455.         {
  456.                 style.li = tag.opened;
  457.                 if (tag.opened)
  458.                 {
  459.                         NewLine();
  460.                         stolbec = style.li_tab * 5 - 2;
  461.                         strcpy(#line, "\31 ");
  462.                         //stolbec-=2;
  463.                 }
  464.                 return;
  465.         }
  466.         if (tag.is("ul")) || (tag.is("ol")) {
  467.                 if (!tag.opened)
  468.                 {
  469.                         style.li = tag.opened;
  470.                         style.li_tab--;
  471.                         NewLine();
  472.                 }
  473.                 else style.li_tab++;
  474.         }
  475.         if (tag.is("hr")) {
  476.                 if (value = tag.get_value_of("color=")) EDI = GetColor(value); else EDI = 0x999999;
  477.                 $push edi;
  478.                 NewLine();
  479.                 $pop edi;
  480.                 draw_y += 10;
  481.                 DrawBuf.DrawBar(5, draw_y - 1, list.w-10, 1, EDI);
  482.                 NewLine();
  483.                 draw_y += 10;
  484.                 return;
  485.         }
  486.         if (tag.is("meta")) || (tag.is("?xml")) {
  487.                 meta_encoding = CH_NULL;
  488.                 if (value = tag.get_value_of("charset=")) || (value = tag.get_value_of("content=")) || (value = tag.get_value_of("encoding="))
  489.                 {
  490.                         value += strrchr(value, '='); //search in content=
  491.                         strlwr(value);
  492.                         if      (streq(value,"utf-8"))        || (streq(value,"utf8"))        meta_encoding = CH_UTF8;
  493.                         else if (streq(value,"windows-1251")) || (streq(value,"windows1251")) meta_encoding = CH_CP1251;
  494.                         else if (streq(value,"dos"))          || (streq(value,"cp-866"))      meta_encoding = CH_CP866;
  495.                         else if (streq(value,"iso-8859-5"))   || (streq(value,"iso8859-5"))   meta_encoding = CH_ISO8859_5;
  496.                         else if (streq(value,"koi8-r"))       || (streq(value,"koi8-u"))      meta_encoding = CH_KOI8;
  497.                 }
  498.                 if (meta_encoding!=CH_NULL) BufEncode(meta_encoding);
  499.                 return;
  500.         }
  501. }
  502. //============================================================================================
  503. void TWebBrowser::BufEncode(dword set_new_encoding)
  504. {
  505.         if (cur_encoding == set_new_encoding) return;
  506.         if (o_bufpointer==0) {
  507.                 o_bufpointer = malloc(bufsize);
  508.                 strcpy(o_bufpointer, bufpointer);
  509.         } else {
  510.                 strcpy(bufpointer, o_bufpointer);
  511.         }
  512.         //debugval("cur_encoding    ", cur_encoding);
  513.         //debugval("set_new_encoding", set_new_encoding);
  514.         cur_encoding = set_new_encoding;
  515.         bufpointer = ChangeCharset(charsets[cur_encoding], "CP866", bufpointer);
  516. }
  517. //============================================================================================
  518. void TWebBrowser::DrawScroller()
  519. {
  520.         scroll_wv.max_area = list.count;
  521.         scroll_wv.cur_area = list.visible;
  522.         scroll_wv.position = list.first;
  523.         scroll_wv.all_redraw = 0;
  524.         scroll_wv.start_x = list.x + list.w;
  525.         scroll_wv.start_y = list.y;
  526.         scroll_wv.size_y = list.h;
  527.         scrollbar_v_draw(#scroll_wv);
  528. }
  529. //============================================================================================
  530. void TWebBrowser::NewLine()
  531. {
  532.         dword onleft, ontop;
  533.         static int empty_line=0;
  534.  
  535.         if (!stolbec) && (draw_y==body_magrin) return;
  536.        
  537.         if (style.li) && (stolbec == style.li_tab * 5) {
  538.                 if (empty_line<1) empty_line++;
  539.                 else return;
  540.         } else if (!stolbec) {
  541.                 if (empty_line<1) empty_line++;
  542.                 else return;
  543.         } else {
  544.                 empty_line=0;
  545.         }
  546.  
  547.         onleft = list.x + body_magrin;
  548.         ontop = draw_y + list.y;
  549.         if (t_html) && (!t_body) return;
  550.         draw_y += list.item_h;
  551.         if (style.blq) stolbec = 6; else stolbec = 0;
  552.         if (style.li) stolbec = style.li_tab * 5;
  553.         if (debug_mode) debugln(NULL);
  554. }
  555. //============================================================================================
  556. void TWebBrowser::DrawPage()
  557. {
  558.         PutPaletteImage(list.first * DrawBuf.bufw * 4 + buf_data+8, DrawBuf.bufw, list.h, DrawBuf.bufx, DrawBuf.bufy, 32, 0);  
  559.         DrawScroller();
  560. }