gui.c 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511
  1. #include "gui.h"
  2. #include "app.h"
  3. #include "lcdDrv.h"
  4. #include "lsapi_fs.h"
  5. #include "log.h"
  6. #include "fonts.h"
  7. #include "ohboard.h"
  8. #include "uiEntry.h"
  9. #define COLOR_BACKGROUND COLOR_WHITE
  10. #define COLOR_FOREGROUND COLOR_BLUE
  11. #define LCD_X_OFFSET 2
  12. #define LCD_Y_OFFSET 2
  13. unsigned int g_backColor;
  14. unsigned int g_foreColor;
  15. unsigned int guiGetBackColor(void){return g_backColor;}
  16. unsigned int guiGetForeColor(void){return g_foreColor;}
  17. static unsigned short RGB888_2_RGB565(unsigned int rgb888){
  18. unsigned short r,g,b,rgb565;
  19. b=(rgb888 >> (16+3))&0x1F;
  20. g=(rgb888 >> (8+2))&0x3f;
  21. r=(rgb888 >> (0+3))&0x1f;
  22. rgb565=((r<<11) + (g<<5) + (b<<0));
  23. return rgb565;
  24. }
  25. static void guiDrawDot(unsigned short colorData){
  26. LCD_DataWrite_ST7735(colorData >> 8);
  27. LCD_DataWrite_ST7735(colorData & 0xff);
  28. }
  29. static void guiBlockSet(unsigned short sx, unsigned short ex, unsigned short sy, unsigned short ey){
  30. LCD_CtrlWrite_ST7735(0x2a);
  31. sx+=LCD_X_OFFSET;
  32. sy+=LCD_Y_OFFSET;
  33. ex+=LCD_Y_OFFSET;
  34. ey+=LCD_X_OFFSET;
  35. guiDrawDot(sx);
  36. guiDrawDot(sy);
  37. LCD_CtrlWrite_ST7735(0x2B);
  38. guiDrawDot(ex);
  39. guiDrawDot(ey);
  40. LCD_CtrlWrite_ST7735(0x2C);
  41. }
  42. #define KEEP_HZK_OPENED //ê?·?±£3????t3£?a
  43. static int guiGetHzk(unsigned char hiByte, unsigned char loByte, unsigned char *pHzk, FONT_MODEENUM fontMode){
  44. unsigned char Q,W;
  45. unsigned int offset;
  46. const char hzk_12x12[]="HZK12";
  47. const char hzk_16x16[]="HZK16";
  48. char *hzk_ptr=NULL;
  49. static int fd_12=NULL,fd_16=NULL;
  50. int *fd_ptr=NULL;
  51. int fsize;
  52. if(hiByte<0xa0 || loByte<0xa0)return -1;
  53. Q=hiByte-0xa0;
  54. W=loByte-0xa0;
  55. if(FONT_MODE_12X12==fontMode){
  56. fsize = 24;
  57. hzk_ptr=(char *)hzk_12x12;
  58. fd_ptr=&fd_12;
  59. }else if(FONT_MODE_16X16==fontMode){
  60. fsize = 32;
  61. hzk_ptr=(char *)hzk_16x16;
  62. fd_ptr=&fd_16;
  63. }else return -2;
  64. offset=(94 * (Q-1) + (W-1))* fsize;
  65. //′ò?a???t
  66. if(*fd_ptr==NULL){
  67. int fd=LSAPI_FS_Open(hzk_ptr, LSAPI_FS_O_RDONLY, 0);
  68. if(fd==NULL){
  69. MSG_ERR(1, "%s open failed", hzk_ptr);
  70. return -3;
  71. }
  72. *fd_ptr=fd;
  73. }
  74. //?áè??úèY
  75. LSAPI_FS_Seek(*fd_ptr, offset, LSAPI_FS_SEEK_SET);
  76. offset=LSAPI_FS_Read(*fd_ptr, pHzk,fsize);
  77. #ifndef KEEP_HZK_OPENED
  78. LSAPI_FS_Close(*fd_ptr);
  79. *fd_ptr=NULL;
  80. #endif
  81. return offset;
  82. }
  83. static void guiShowChars(unsigned short x,unsigned short y,unsigned char hiByte, unsigned char loByte,
  84. FONT_MODEENUM fontMode,
  85. unsigned int frontColorID,//????
  86. unsigned int backColorID,//????
  87. REV_ENUM rev){//??
  88. unsigned short i,j,k,m,n,fcolor,bcolor;
  89. unsigned short width,height;
  90. unsigned char ByteWidth,data;
  91. const unsigned char *l_pucFont,*l_pucLetter;
  92. unsigned char *p;
  93. unsigned char sucHzk16[32];
  94. unsigned char sucHzk12[24];
  95. int ret;
  96. //===?¨¨?¨′?Y?á??¤?¨|¨¨????¨o?|ì??¨a??é????é|ì??¨?¨oy?Y????|쨨===
  97. k = 0;
  98. if(hiByte==0){//english
  99. if(fontMode==FONT_MODE_12X12){//8* 12
  100. width=8;//8
  101. height = 12; //12
  102. ByteWidth = 1;
  103. l_pucFont = g_apucFonts12;
  104. l_pucLetter = g_apucLetter12;
  105. }else{ //8*16
  106. width=8;
  107. height = 16;
  108. ByteWidth = 1;
  109. l_pucFont = g_apucFonts16;
  110. l_pucLetter = g_apucLetter16;
  111. }
  112. while(*l_pucLetter){
  113. if(loByte == *l_pucLetter)break;
  114. l_pucLetter ++;
  115. k ++;
  116. }
  117. //2¨|?¨°|ì??á??a|ì??a¨o?????
  118. l_pucFont += k * ByteWidth * height;
  119. }else{//chinese
  120. if(fontMode==FONT_MODE_12X12){//12*16
  121. width=16;
  122. height = 12;
  123. ByteWidth = 2;
  124. l_pucFont = sucHzk12;
  125. l_pucLetter = 0;
  126. k=0;
  127. ret=guiGetHzk(hiByte,loByte,sucHzk12,fontMode);
  128. if(sizeof(sucHzk12)!=ret){//??¨?sFlash|ì?HZK???t?D?¨¢¨¨??á??a¨oy?Y
  129. //?¨°2?|ì??á??a?ê???¨o?"?¨2"
  130. l_pucFont=g_apucCLetter16;
  131. MSG_ERR(1, "guiGetHzk12Err:%02x,%02x,%d",hiByte,loByte,ret);
  132. }
  133. }else{//16*16
  134. width=16;
  135. height = 16;
  136. ByteWidth = 2;
  137. l_pucFont = sucHzk16;
  138. l_pucLetter = 0;
  139. k=0;
  140. ret=guiGetHzk(hiByte,loByte,sucHzk16,fontMode);
  141. if(sizeof(sucHzk16)!=ret){//??¨?sFlash|ì?HZK16???t?D?¨¢¨¨??á??a¨oy?Y
  142. //?¨°2?|ì??á??a?ê???¨o?"?¨2"
  143. l_pucFont=g_apucCLetter16;
  144. MSG_ERR(1, "guiGetHzk16Err:%02x,%02x,%d",hiByte,loByte,ret);
  145. }
  146. }
  147. }
  148. //====================?¨′??|¨¤¨a|ì??¨?¨oy?Y==========
  149. if(y+height>GLCD_HEIGHT)return;
  150. if(x+width>GLCD_WIDTH)return;
  151. guiBlockSet(x,y,x+width-1,y+height-1);//8,12
  152. fcolor=RGB888_2_RGB565(frontColorID);
  153. bcolor=RGB888_2_RGB565(backColorID);
  154. //¨°?????à?¨???|ì??¨???é|ì?LCD?ê?2?¨?????????ê¨??¨?¨22a¨o??ê??á?騰a|ì??¨??2?¨°a|ì??¨??PaintBufToLcd?ê??¤??¨°¨°2??é?¨¢¨¢?
  155. //?¨′?Y?á???ê?¨2??????D?-|ì?
  156. for(j=0;j<height;j++){
  157. m=y+j;
  158. for(i=0;i<ByteWidth;i++){
  159. n=x+i*8;
  160. data=*l_pucFont++;
  161. for(k=0;k<8;k++){
  162. if(data & (0x80>>k)){//??,??frontColorID
  163. if(REVERSED_NO==rev) guiDrawDot(fcolor);
  164. else guiDrawDot(bcolor);
  165. }else{//??,??backColorID
  166. if(REVERSED_NO==rev) guiDrawDot(bcolor);
  167. else guiDrawDot(fcolor);
  168. }
  169. }
  170. }
  171. }
  172. }
  173. short guiGetStrXLen(char *str, FONT_MODEENUM fontMode){
  174. unsigned char ch;
  175. unsigned short len=0;
  176. unsigned char bsize;
  177. if(FONT_MODE_12X12==fontMode) bsize=6;
  178. else if(FONT_MODE_16X16==fontMode) bsize=8;
  179. else return 0;
  180. while ((ch=*str++)){
  181. if(ch=='M')len+=12;
  182. else if(ch>='A'&&ch<='Z')len+=8;
  183. else if(ch>='a'&&ch<='z')len+=8;
  184. else if(ch>='0'&&ch<='9')len+=8;
  185. else if(ch>=0x20&& ch<=0x60)len+=8; //¨??¨oa?á??¤?
  186. else len+=bsize;
  187. }
  188. return len;
  189. }
  190. //
  191. void guiShowStr(unsigned short x, unsigned short y,const char *string, FONT_MODEENUM fontMode,
  192. REV_ENUM rev, //????
  193. unsigned int frontColorID,//???
  194. unsigned int backColorID){//???
  195. unsigned char width1,width2,heigh;
  196. unsigned char *p;
  197. unsigned short i;
  198. //fontMode=FONT_MODE_12X12;// BND 文件系统大小不够
  199. if(fontMode == FONT_MODE_12X12){
  200. width1 = 12;
  201. width2 = 1;
  202. heigh=12;
  203. }else if(fontMode == FONT_MODE_16X16){
  204. width1 = 16;
  205. width2 = 1;
  206. heigh=16;
  207. }else
  208. return;
  209. p = (unsigned char *)string;
  210. i = 0;
  211. while(*p){
  212. if (*p > 0x9f){//chinese letter
  213. guiShowChars(x+i,y,*p, *(p+1),fontMode,frontColorID,backColorID,rev);
  214. i += width1 ;
  215. p += 2;
  216. }else{//english letter
  217. guiShowChars(x + i,y,0,*p,fontMode,frontColorID,backColorID,rev);
  218. if(fontMode==0) i += width2 * 8;
  219. else i += width2 * 8;
  220. p ++;
  221. }
  222. }
  223. }
  224. void guiShowButton(unsigned short x, unsigned short y,const char *str, FONT_MODEENUM fontMode,unsigned int buttonColorID, unsigned int strColorID){
  225. int heigh,len;
  226. if(FONT_MODE_12X12==fontMode) heigh=12+4;
  227. else if(FONT_MODE_16X16==fontMode) heigh=16+4;
  228. else return;
  229. len=guiGetStrXLen((char *)str, fontMode);
  230. guiFillRect(x,y,x+len+8,y+heigh,buttonColorID);
  231. guiShowStr(x+4, y+1, str, fontMode,REVERSED_NO,strColorID,buttonColorID);
  232. }
  233. void guiFillRect(unsigned short x1, unsigned short y1, unsigned short x2, unsigned short y2,unsigned int colorData){
  234. unsigned short x=x2,y=y2,w,h,i,m,k,j,data;
  235. if(x1>x2 || y1>y2) return;
  236. if(x1>=GLCD_WIDTH || y1>=GLCD_HEIGHT) return;
  237. if(x>GLCD_WIDTH) x=GLCD_WIDTH;
  238. if(y>GLCD_HEIGHT) y=GLCD_HEIGHT;
  239. w=x-x1+1;
  240. h=y-y1+1;
  241. data=RGB888_2_RGB565(colorData);
  242. guiBlockSet(x1,y1,x,y);
  243. for(i=0;i<h;i++){
  244. m=y1+i;
  245. for(j=0;j<w;j++){
  246. k=x1+j;
  247. guiDrawDot(data);
  248. }
  249. }
  250. }
  251. void guiClearRect(unsigned short x1, unsigned short y1, unsigned short x2, unsigned short y2, unsigned int colorData){
  252. guiFillRect(x1,y1,x2,y2,colorData);
  253. }
  254. //??????
  255. void guiDrawHLine(unsigned short x1, unsigned short x2, unsigned short y, unsigned short ysize, unsigned int colorID){
  256. if(ysize==0) return;
  257. if(x2<x1) return;
  258. guiFillRect(x1,y,x2,y+ysize-1,colorID);
  259. }
  260. //′1?±??
  261. void guiDrawVLine(unsigned short y1, unsigned short y2, unsigned short x, unsigned short xsize, unsigned int colorID){
  262. if(xsize==0) return;
  263. if(y2<y1) return;
  264. guiFillRect(x,y1,x+xsize-1,y2,colorID);
  265. }
  266. void guiDrawRect(unsigned short x1, unsigned short y1, unsigned short x2, unsigned short y2,unsigned char width, unsigned int colorID){
  267. if(x1>x2||y1>y2) return;
  268. guiDrawHLine(x1,x2,y1,width,colorID);
  269. guiDrawHLine(x1,x2,y2,width,colorID);
  270. guiDrawVLine(y1,y2,x1,width,colorID);
  271. guiDrawVLine(y1,y2+width-1,x2,width,colorID);
  272. }
  273. //óé·??ò?aμ?(x,y)?aê??-
  274. void guiDrawArrow(unsigned short x, unsigned short y,unsigned short len, ARROW_ENUM direction, unsigned int colorID){
  275. unsigned short i;
  276. switch(direction){
  277. case ARROW_LEFT:
  278. for(i=0;i<len;i++) guiDrawRect(x+i,y-i,x+i,y+i,1,colorID);
  279. break;
  280. case ARROW_RIGHT:
  281. for(i=0;i<len;i++) guiDrawRect(x-i,y-i,x-i,y+i,1,colorID);
  282. break;
  283. case ARROW_UP:
  284. for(i=0;i<len;i++) guiDrawRect(x-i,y+i,x+i,y+i,1,colorID);
  285. break;
  286. case ARROW_DOWN:
  287. for(i=0;i<len;i++) guiDrawRect(x-i,y-i,x+i,y-i,1,colorID);
  288. break;
  289. }
  290. }
  291. static void guiFillBmpBuf(unsigned short x, unsigned short y, unsigned short width, unsigned short height, unsigned char *bmpBuf){
  292. int i,j,k,t;
  293. unsigned short RGB565,r,g,b;
  294. unsigned char R,G,B;
  295. for(j=0;j<height;j++){
  296. t=y+j;
  297. k=j*width;
  298. for(i=0;i<width;i++){
  299. R=bmpBuf[3*i];
  300. G=bmpBuf[3*i+1];
  301. B=bmpBuf[3*i+2];
  302. r=R>>3;
  303. g=G>>2;
  304. b=B>>3;
  305. RGB565=((r<<11)+(g<<5)+(b<<0));
  306. guiDrawDot(RGB565);
  307. }
  308. }
  309. }
  310. void guiShowBmp(unsigned short x, unsigned short y, char *bmp){
  311. int fd,l,w,i;
  312. unsigned short type;
  313. unsigned int width,height,bfOffBits;
  314. unsigned char tbuf[GLCD_WIDTH*4];
  315. fd=LSAPI_FS_Open(bmp, LSAPI_FS_O_RDONLY,0);
  316. if(fd<0){
  317. MSG_ERR(1, "%s open failed", bmp);
  318. return;
  319. }
  320. //?áè????tààDí
  321. LSAPI_FS_Seek(fd, 0x1c, LSAPI_FS_SEEK_SET);
  322. LSAPI_FS_Read(fd, (unsigned char *)&type, 2);
  323. if(type != 0x0018){
  324. MSG_ERR(1, "%s is not 24bits bmp",bmp);
  325. LSAPI_FS_Close(fd);
  326. return;
  327. }
  328. //?áè?í????í?è
  329. LSAPI_FS_Seek(fd, 0x12, LSAPI_FS_SEEK_SET);
  330. LSAPI_FS_Read(fd, (unsigned char *)&width, 4);
  331. //?áè?í??????è
  332. LSAPI_FS_Seek(fd, 0x16, LSAPI_FS_SEEK_SET);
  333. LSAPI_FS_Read(fd, (unsigned char *)&height, 4);
  334. //?D??3?′?
  335. if(width>GLCD_WIDTH || height>GLCD_HEIGHT){
  336. MSG_ERR(1, "%s size overflow",bmp);
  337. LSAPI_FS_Close(fd);
  338. return;
  339. }
  340. //?á3?êy?Y?eê?μ??·
  341. LSAPI_FS_Seek(fd, 0x0a, LSAPI_FS_SEEK_SET);
  342. LSAPI_FS_Read(fd, (unsigned char *)&bfOffBits, 4);
  343. l=width%4;
  344. w=width*3+l;
  345. l=height-1;
  346. guiBlockSet(x,y,x+width-1,y+height-1);
  347. for(i=0;i<height;i++){
  348. LSAPI_FS_Seek(fd, bfOffBits+l*w, LSAPI_FS_SEEK_SET);
  349. LSAPI_FS_Read(fd, tbuf, w);
  350. guiFillBmpBuf(x,y+i,width,1,tbuf);
  351. l--;
  352. }
  353. LSAPI_FS_Close(fd);
  354. }
  355. /*?ó?D??ê?*/
  356. void guiShowCaption(unsigned short xType, const char *str, unsigned short y, unsigned int frontColorID, unsigned int backColorID, FONT_MODEENUM fontMode){
  357. int len,sy;
  358. unsigned short x;
  359. len=guiGetStrXLen((char *)str,fontMode);
  360. if(xType==0) x=(GLCD_WIDTH-len)/2;
  361. else x=xType;
  362. guiShowStr(x, y, str, fontMode, REVERSED_NO, frontColorID, backColorID);
  363. }
  364. void guiClearArea(unsigned short x, unsigned short y, unsigned short width, unsigned short height,unsigned int colorID){
  365. guiFillRect(x,y,x+width,y+height,colorID);
  366. }
  367. void guiInit(void){
  368. g_backColor=COLOR_BACKGROUND;
  369. g_foreColor=COLOR_FOREGROUND;
  370. guiFillRect(0,0,GLCD_WIDTH-1,GLCD_HEIGHT-1,guiGetBackColor());
  371. // SetMessageConfi();
  372. if(sutApp.UserInfo.tnet==5)guiShowBmp(0,0,"welcome5G.bmp");//开机图片
  373. else guiShowBmp(0,0,"welcome.bmp");//开机图片
  374. CTL_LCD_BL(1);//清屏后打开,否则会看到关机前的画面
  375. }
  376. void guiClearAll(unsigned int colorID){//只清第二,三区
  377. guiFillRect(0, UI_STATUS_ITEM_Y, GLCD_WIDTH-1, UI_CONTENT_SHOW_Y-1, guiGetForeColor());//清除第二区
  378. guiFillRect(0,UI_CONTENT_SHOW_Y,GLCD_WIDTH-1,GLCD_HEIGHT-1,colorID);
  379. }
  380. void guiShowMessageBox(char *msg){
  381. char buf[70];
  382. short len,x,y;
  383. y=GLCD_HEIGHT/2;
  384. guiClearRect(0,y-20,GLCD_WIDTH-1,y+20,guiGetBackColor());
  385. guiDrawRect(2,y-18,GLCD_WIDTH-3,y+18,1,COLOR_BLACK);
  386. StrIntercept(buf,msg,18);
  387. #ifdef USE_12X12_FONT_ONLY
  388. len=guiGetStrXLen(buf,FONT_MODE_12X12);
  389. x=(GLCD_WIDTH-len)/2;
  390. guiShowStr(x,y-6,buf,FONT_MODE_12X12,REVERSED_NO,COLOR_BLACK,guiGetBackColor());
  391. #else
  392. len=guiGetStrXLen(buf,FONT_MODE_16X16);
  393. x=(GLCD_WIDTH-len)/2;
  394. guiShowStr(x,y-8,buf,FONT_MODE_16X16,REVERSED_NO,COLOR_BLACK,guiGetBackColor());
  395. #endif
  396. }
  397. /*
  398. x1,x2:显示的起点坐标
  399. multiple:放大倍数
  400. data:QRCODE数据缓存
  401. size:QRCODE图片大小,长=宽
  402. */
  403. void guiDrawQRimage(unsigned short x1, unsigned short y1,unsigned char multiple,unsigned char **data, int size){
  404. unsigned short x=x1+size,y=y1+size,w,h,i,j,ww,kk;
  405. unsigned short startx, starty,endx,endy;
  406. unsigned char tmp;
  407. if(multiple<=0) tmp=1;
  408. else tmp=multiple;
  409. if(x1>=GLCD_WIDTH || y1>=GLCD_HEIGHT) return;
  410. if(x>GLCD_WIDTH) x=GLCD_WIDTH;
  411. if(y>GLCD_HEIGHT) y=GLCD_HEIGHT;
  412. w=x-x1+1;
  413. h=y-y1+1;
  414. unsigned short blackdata=RGB888_2_RGB565(COLOR_BLACK);
  415. unsigned short whitedata=RGB888_2_RGB565(COLOR_WHITE);
  416. unsigned short filldata;
  417. if(tmp==1) guiBlockSet(x1,y1,x,y);
  418. else kk=tmp+1;
  419. for(i=0;i<w;i++){
  420. startx=x1+i*tmp;
  421. for(j=0;j<h;j++){
  422. starty=y1+j*tmp;
  423. if(data[i][j]==0) filldata=whitedata;
  424. else filldata=blackdata;
  425. if(tmp==1) guiDrawDot(filldata);
  426. else{
  427. endx=startx+tmp;endy=starty+tmp;
  428. guiBlockSet(startx,starty,endx,endy);
  429. for(ww=0;ww<(kk*kk);ww++) guiDrawDot(filldata);
  430. }
  431. }
  432. }
  433. }
  434. //////////////////////////////////////测试接口///////////////////////////////////
  435. void guiTest(void){
  436. //return;
  437. //char testbuf[5]={0xB2,0xE2,0xCA,0xD4,0x00};
  438. //??ê?DD??
  439. guiDrawHLine(1, GLCD_WIDTH-2, 1, 1, guiGetForeColor());
  440. //??ê?áD??
  441. guiDrawVLine(3, GLCD_HEIGHT-2, 1, 1, guiGetForeColor());
  442. //??ê???D???D?
  443. guiDrawRect(3,3,3+10,3+10,1,guiGetForeColor());
  444. //??ê?êμD???D?
  445. guiFillRect(15, 3, 15+10, 3+10,guiGetForeColor());
  446. //??ê??yí·
  447. guiDrawArrow(50, 3,10, ARROW_UP, guiGetForeColor());
  448. guiDrawArrow(70, 3+10,10, ARROW_DOWN, guiGetForeColor());
  449. guiDrawArrow(90, 3+8,10, ARROW_LEFT, guiGetForeColor());
  450. guiDrawArrow(110, 3+8,10, ARROW_RIGHT, guiGetForeColor());
  451. //??ê?12X12×?·?′?
  452. guiShowStr(3, 30,"123测试45中,国AW", FONT_MODE_12X12, REVERSED_NO,guiGetForeColor(),guiGetBackColor());
  453. //??ê?16X16×?·?′?
  454. guiShowStr(3, 50,"123测试45你。好AW", FONT_MODE_16X16, REVERSED_NO,guiGetForeColor(),guiGetBackColor());
  455. //??ê?í???
  456. guiShowBmp(3, 80, "Palace2.bmp");
  457. //??ê?°′?ü
  458. guiShowButton(100, 80,"B12", FONT_MODE_12X12,guiGetForeColor(), guiGetBackColor());
  459. }