ctk_80col_cclear(len / 2);
ctk_80col_cclear((len - 1)/ 2);
draw_widget(struct ctk_widget *w,	    unsigned char x, unsigned char y,	    unsigned char clipx,	    unsigned char clipy,	    unsigned char clipy1, unsigned char clipy2,	    unsigned char focus){  unsigned char xpos, ypos, xscroll;  unsigned char i, j;  char c, *text;  unsigned char len, wfocus;  wfocus = 0;  if(focus & CTK_FOCUS_WINDOW) {        if(focus & CTK_FOCUS_WIDGET) {      wfocus = 1;    }  } else if(focus & CTK_FOCUS_DIALOG) {    if(focus & CTK_FOCUS_WIDGET) {      wfocus = 1;    }  } else {  }    xpos = x + w->x;  ypos = y + w->y;      switch(w->type) {  case CTK_WIDGET_SEPARATOR:    if(ypos >= clipy1 && ypos < clipy2) {      chlinexy(xpos, ypos, w->w);    }    break;  case CTK_WIDGET_LABEL:    text = w->widget.label.text;    for(i = 0; i < w->h; ++i) {      if(ypos >= clipy1 && ypos < clipy2) {	gotoxy(xpos, ypos);	_cputsn(text, w->w);	if(w->w - (wherex() - xpos) > 0) {	  cclear(w->w - (wherex() - xpos));	}      }      ++ypos;      text += w->w;    }    break;  case CTK_WIDGET_BUTTON:    if(ypos >= clipy1 && ypos < clipy2) {      if(wfocus != 0) {	revers(1);      } else {	revers(0);      }      cputcxy(xpos, ypos, '[');      _cputsn(w->widget.button.text, w->w);      cputc(']');      revers(0);    }    break;  case CTK_WIDGET_HYPERLINK:    if(ypos >= clipy1 && ypos < clipy2) {      if(wfocus != 0) {	revers(0);      } else {	revers(1);      }      gotoxy(xpos, ypos);      _cputsn(w->widget.button.text, w->w);      revers(0);    }    break;  case CTK_WIDGET_TEXTENTRY:    text = w->widget.textentry.text;    if(wfocus != 0) {      revers(1);    } else {      revers(0);    }    xscroll = 0;    if(w->widget.textentry.xpos >= w->w - 1) {      xscroll = w->widget.textentry.xpos - w->w + 1;    }    for(j = 0; j < w->h; ++j) {      if(ypos >= clipy1 && ypos < clipy2) {	if(w->widget.textentry.state == CTK_TEXTENTRY_EDIT &&	   w->widget.textentry.ypos == j) {	  revers(0);	  cputcxy(xpos, ypos, '>');	  for(i = 0; i < w->w; ++i) {	    c = text[i + xscroll];	    if(i == w->widget.textentry.xpos - xscroll) {	      revers(1);	    } else {	      revers(0);	    }	    if(c == 0) {	      cputc(' ');	    } else {	      cputc(c);	    }	    revers(0);	  }	  cputc('<');	} else {	  cvlinexy(xpos, ypos, 1);	  gotoxy(xpos + 1, ypos);          	  _cputsn(text, w->w);	  i = wherex();	  if(i - xpos - 1 < w->w) {	    cclear(w->w - (i - xpos) + 1);	  }	  cvline(1);	}      }      ++ypos;      text += w->w;    }    revers(0);    break;  case CTK_WIDGET_ICON:    if(ypos >= clipy1 && ypos < clipy2) {      color(ctk_80col_theme.iconcolors[focus]);            /*      if(focus & 1) {		revers(1);      } else {	revers(0);	}*/      /*      gotoxy(xpos, ypos);*/      if(xpos >= 73) {	xpos = 73;      }      if(xpos <= 2) {	xpos = 2;      }      if(w->widget.icon.textmap != NULL) {	ctk_80col_bitmapptr = w->widget.icon.bitmap;	for(i = 0; i < 3; ++i) {	  if(ypos >= clipy1 && ypos < clipy2) {	    gotoxy(xpos, ypos);	    ctk_80col_draw_bitmapline(3);	    	  }	  ctk_80col_bitmapptr += 3 * 8;	  ++ypos;	}      }      x = xpos;        len = strlen(w->widget.icon.title);      if(x + len >= SCREEN_WIDTH) {	x = SCREEN_WIDTH - len;      }      if(ypos >= clipy1 && ypos < clipy2) {	len = strlen(w->widget.icon.title);	gotoxy((x & 0xfe) + 1, ypos);	ctk_80col_cclear(len / 2);	gotoxy(x, ypos);	ctk_80col_cputsn(w->widget.icon.title, len);      }      revers(0);    }    break;  default:    break;  }}