Ejemplo n.º 1
0
/*********************************************************************
*
*       GUI_DispChar
*/
void GUI_DispChar(U16 c) {
  GUI_LOCK();
  #if (GUI_WINSUPPORT)
    CL_DispChar(c);
  #else
    GL_DispChar(c);
  #endif
  GUI_UNLOCK();
}
Ejemplo n.º 2
0
/*********************************************************************
*
*       GUI_DispCharAt
*/
void GUI_DispCharAt(U16 c, I16P x, I16P y) {
  GUI_LOCK();
  GUI_Context.DispPosX = x;
  GUI_Context.DispPosY = y;
  #if (GUI_WINSUPPORT)
    CL_DispChar(c);
  #else
    GL_DispChar(c);
  #endif
  GUI_UNLOCK();
}
/* Note on usage of this routine:
   If at all possible, try to avoid using this, since
   every call will invoke the window manager. If possible,
   use the string routines.
*/
static void CL_DispChar(U16 c) {
  GUI_RECT r;
  WM_ADDORG(GUI_Context.DispPosX, GUI_Context.DispPosY);
  r.x1 = (r.x0 = GUI_Context.DispPosX) + GUI_GetCharDistX(c)-1;
  r.y1 = (r.y0 = GUI_Context.DispPosY) + GUI_GetFontSizeY()-1;
  WM_ITERATE_START(&r) {
    GL_DispChar(c);
    if (c != '\n')
      GUI_Context.DispPosX = r.x1 + 1;
  } WM_ITERATE_END();
  WM_SUBORG(GUI_Context.DispPosX,GUI_Context.DispPosY);
}
Ejemplo n.º 4
0
/*********************************************************************
*
*       _DispLine_UC
*/
static void _DispLine_UC(const U16 GUI_UNI_PTR *s, int Len, const GUI_RECT *pRect) {
  if (GUI_Context.pClipRect_HL[GUI_Context.SelLayer]) {
    if (GUI_RectsIntersect(GUI_Context.pClipRect_HL[GUI_Context.SelLayer], pRect) == 0)
      return;
  }
  {
    U16 c0;
	c0=*s;  
	if((c0 == '\n') || (c0 == '\r')) //modified by Derek 2010.12.02.10:10
	{
		GUI_DispNextLine();
	}
	else
	{
		while (--Len >=0) 
		{
      		c0=*s++;
      		GL_DispChar(c0);
    	}
	}
	
    
  }
}