comparison src/ui/mfw/mfw_mnu.c @ 188:92abb46dc1ba

src/ui/mfw/*.[ch]: rm trailing white space
author Mychaela Falconia <falcon@freecalypso.org>
date Tue, 19 Jan 2021 06:10:27 +0000
parents 67bfe9f274f6
children
comparison
equal deleted inserted replaced
187:a33dd8a5dcc9 188:92abb46dc1ba
5 | CREATED: 24.11.98 $Modtime:: 24.02.00 8:07 $| 5 | CREATED: 24.11.98 $Modtime:: 24.02.00 8:07 $|
6 | STATE : code | 6 | STATE : code |
7 +--------------------------------------------------------------------+ 7 +--------------------------------------------------------------------+
8 8
9 MODULE : MFW_MNU 9 MODULE : MFW_MNU
10 10
11 PURPOSE : menu handling functions 11 PURPOSE : menu handling functions
12 12
13 EXPORT : 13 EXPORT :
14 14
15 TO DO : 15 TO DO :
18 18
19 June 05, 2006 REF:OMAPS00060424 x0045876 19 June 05, 2006 REF:OMAPS00060424 x0045876
20 Description: Header Toggling 20 Description: Header Toggling
21 Solution: Implemented the toggling of header when displaying the length text in SELECT ITEM and SET UP MENU 21 Solution: Implemented the toggling of header when displaying the length text in SELECT ITEM and SET UP MENU
22 22
23 May 18, 2006 REF: DRT OMAPS00076438 xdeepadh 23 May 18, 2006 REF: DRT OMAPS00076438 xdeepadh
24 Description: Scrolling not implemented in Imageviewer 24 Description: Scrolling not implemented in Imageviewer
25 Solution: The support for scrolling has been provided. 25 Solution: The support for scrolling has been provided.
26 26
27 27
28 May 03, 2006 REF: DRT OMAPS00076439 xdeepadh 28 May 03, 2006 REF: DRT OMAPS00076439 xdeepadh
29 Description: Image viewer back not working 29 Description: Image viewer back not working
30 Solution: The Preview List will be repopulated, when the list window is 30 Solution: The Preview List will be repopulated, when the list window is
31 resumed. 31 resumed.
32 32
33 Shashi Shekar B.S., a0876501, 16 Mar, 2006, OMAPS00061462 33 Shashi Shekar B.S., a0876501, 16 Mar, 2006, OMAPS00061462
34 Icon support for SetupMenu & Select item. 34 Icon support for SetupMenu & Select item.
35 35
36 * 36 *
37 * ************************************************ 37 * ************************************************
38 38
39 39
40 40
41 Dec 22, 2005 REF: ENH xdeepadh 41 Dec 22, 2005 REF: ENH xdeepadh
42 Description: Image Viewer Application 42 Description: Image Viewer Application
43 Solution: Implemeted the Image Viewer to view the jpeg images 43 Solution: Implemeted the Image Viewer to view the jpeg images
44 44
45 * User: xreddymn Date: Sep-30-2005 45 * User: xreddymn Date: Sep-30-2005
46 * Updated in $/GSM/Condat/MS/SRC/MFW 46 * Updated in $/GSM/Condat/MS/SRC/MFW
47 * Added header display for menus on monochrome 47 * Added header display for menus on monochrome
48 * screens for MMI-SPR-33781 48 * screens for MMI-SPR-33781
49 * 49 *
124 #include "ATBCommon.h" 124 #include "ATBCommon.h"
125 #include "ATBDisplay.h" 125 #include "ATBDisplay.h"
126 126
127 #define MNU_TOGGLE_TIMEOUT 3000 127 #define MNU_TOGGLE_TIMEOUT 3000
128 128
129 static USHORT g_title_pos; 129 static USHORT g_title_pos;
130 static USHORT g_title_next_pos; 130 static USHORT g_title_next_pos;
131 MfwHnd g_title_timer; 131 MfwHnd g_title_timer;
132 132
133 extern MfwHnd g_win; 133 extern MfwHnd g_win;
134 /* END: 05-June-2006, x0045876 (OMAPS00060424 - Header Toggle) */ 134 /* END: 05-June-2006, x0045876 (OMAPS00060424 - Header Toggle) */
135 135
136 static int menuIsEmpty (MfwMnu *m, MfwMnuAttr *ma); 136 static int menuIsEmpty (MfwMnu *m, MfwMnuAttr *ma);
137 static int countVisible (MfwMnu *m, MfwMnuAttr *ma, int start); 137 static int countVisible (MfwMnu *m, MfwMnuAttr *ma, int start);
138 static void drawPageMenu (MfwMnu *mnu); 138 static void drawPageMenu (MfwMnu *mnu);
139 static void drawListMenu (MfwMnu *m); 139 static void drawListMenu (MfwMnu *m);
140 static void drawIconsListMenu(MfwMnu *m); 140 static void drawIconsListMenu(MfwMnu *m);
141 static void drawFreeMenu (MfwMnu *m); 141 static void drawFreeMenu (MfwMnu *m);
142 //May 18, 2006 REF: DRT OMAPS00076438 xdeepadh 142 //May 18, 2006 REF: DRT OMAPS00076438 xdeepadh
143 static int mnuCommand (U32 cmd, void *h); 143 static int mnuCommand (U32 cmd, void *h);
144 144
145 /* 05-June-2006, x0045876 (OMAPS00060424 - Header Toggle) */ 145 /* 05-June-2006, x0045876 (OMAPS00060424 - Header Toggle) */
146 static int Menu_edit_TitleTimerCb(MfwEvt e, MfwTim *t); 146 static int Menu_edit_TitleTimerCb(MfwEvt e, MfwTim *t);
147 147
148 #define TIME_TRACE_EVENT 148 #define TIME_TRACE_EVENT
149 149
150 /* 150 /*
151 +--------------------------------------------------------------------+ 151 +--------------------------------------------------------------------+
152 | PROJECT : MMI-Framework (8417) MODULE : MFW_MNU | 152 | PROJECT : MMI-Framework (8417) MODULE : MFW_MNU |
153 | STATE : code ROUTINE : mnuInit | 153 | STATE : code ROUTINE : mnuInit |
188 | PROJECT : MMI-Framework (8417) MODULE : MFW_MNU | 188 | PROJECT : MMI-Framework (8417) MODULE : MFW_MNU |
189 | STATE : code ROUTINE : mnuCreate | 189 | STATE : code ROUTINE : mnuCreate |
190 +--------------------------------------------------------------------+ 190 +--------------------------------------------------------------------+
191 191
192 PURPOSE : create menu control 192 PURPOSE : create menu control
193 GW 05/10/01 - Changed single value 'lng' to 2 values indicating if ID's should be 193 GW 05/10/01 - Changed single value 'lng' to 2 values indicating if ID's should be
194 used (useStrID) and if the strings are ascii or unicode (uesDefLang). 194 used (useStrID) and if the strings are ascii or unicode (uesDefLang).
195 195
196 */ 196 */
197 197
198 MfwHnd mnuCreate (MfwHnd w, MfwMnuAttr *a, MfwEvt e, MfwCb f) 198 MfwHnd mnuCreate (MfwHnd w, MfwMnuAttr *a, MfwEvt e, MfwCb f)
199 { 199 {
200 MfwHdr *hdr = (MfwHdr *) mfwAlloc(sizeof(MfwHdr)); 200 MfwHdr *hdr = (MfwHdr *) mfwAlloc(sizeof(MfwHdr));
201 MfwMnu *mnu = (MfwMnu *) mfwAlloc(sizeof(MfwMnu)); 201 MfwMnu *mnu = (MfwMnu *) mfwAlloc(sizeof(MfwMnu));
202 MfwHdr *insert_status =0; 202 MfwHdr *insert_status =0;
203 203
204 if (!hdr || !mnu) 204 if (!hdr || !mnu)
205 { 205 {
206 TRACE_ERROR("ERROR: mnuCreate() Mem Alloc Failed."); 206 TRACE_ERROR("ERROR: mnuCreate() Mem Alloc Failed.");
207 207
208 if(hdr) 208 if(hdr)
209 mfwFree((U8*)hdr,sizeof(MfwHdr)); 209 mfwFree((U8*)hdr,sizeof(MfwHdr));
210 if(mnu) 210 if(mnu)
211 mfwFree((U8*)mnu,sizeof(MfwMnu)); 211 mfwFree((U8*)mnu,sizeof(MfwMnu));
212 212
213 return 0; 213 return 0;
214 } 214 }
215 215
216 mnu->mask = e; 216 mnu->mask = e;
217 mnu->flags = 0; 217 mnu->flags = 0;
276 | STATE : code ROUTINE : mnuLang | 276 | STATE : code ROUTINE : mnuLang |
277 +--------------------------------------------------------------------+ 277 +--------------------------------------------------------------------+
278 278
279 PURPOSE : set / get whether the string is associated with an ID or if it is null-terminated 279 PURPOSE : set / get whether the string is associated with an ID or if it is null-terminated
280 280
281 GW 05/10/01 - Changed single value 'lng' to 2 values indicating if ID's should be 281 GW 05/10/01 - Changed single value 'lng' to 2 values indicating if ID's should be
282 used (useStrID) and if the strings are ascii or unicode (uesDefLang). 282 used (useStrID) and if the strings are ascii or unicode (uesDefLang).
283 */ 283 */
284 284
285 MfwHnd mnuLang (MfwHnd m, MfwHnd l) 285 MfwHnd mnuLang (MfwHnd m, MfwHnd l)
286 { 286 {
300 mnu->textDCS = MNU_LIST_LANGUAGE_DEFAULT; 300 mnu->textDCS = MNU_LIST_LANGUAGE_DEFAULT;
301 } 301 }
302 else 302 else
303 { 303 {
304 mnu->textDCS = MNU_LIST_LANGUAGE_ASCII; 304 mnu->textDCS = MNU_LIST_LANGUAGE_ASCII;
305 } 305 }
306 306
307 return ol; 307 return ol;
308 } 308 }
309 309
310 /* 310 /*
313 | STATE : code ROUTINE : mnuStrType | 313 | STATE : code ROUTINE : mnuStrType |
314 +--------------------------------------------------------------------+ 314 +--------------------------------------------------------------------+
315 315
316 PURPOSE : set / get language in use (1=use default ascii/unicode, 0=assume ascii) 316 PURPOSE : set / get language in use (1=use default ascii/unicode, 0=assume ascii)
317 317
318 GW 05/10/01 - Changed single value 'lng' to 2 values indicating if ID's should be 318 GW 05/10/01 - Changed single value 'lng' to 2 values indicating if ID's should be
319 used (useStrID) and if the strings are ascii or unicode (uesDefLang). 319 used (useStrID) and if the strings are ascii or unicode (uesDefLang).
320 */ 320 */
321 MfwHnd mnuStrType (MfwHnd m, MfwHnd l) 321 MfwHnd mnuStrType (MfwHnd m, MfwHnd l)
322 { 322 {
323 MfwHnd ol; 323 MfwHnd ol;
336 } 336 }
337 else 337 else
338 { 338 {
339 mnu->textDCS = MNU_LIST_LANGUAGE_DEFAULT; 339 mnu->textDCS = MNU_LIST_LANGUAGE_DEFAULT;
340 } 340 }
341 341
342 return ol; 342 return ol;
343 } 343 }
344 344
345 345
346 /* 346 /*
361 if( (mnu = mfwControl(m)) == 0) 361 if( (mnu = mfwControl(m)) == 0)
362 return NULL; 362 return NULL;
363 363
364 ol = mnu->textDCS; 364 ol = mnu->textDCS;
365 mnu->textDCS = listLanguageType; 365 mnu->textDCS = listLanguageType;
366 366
367 return ol; 367 return ol;
368 } 368 }
369 369
370 370
371 371
404 */ 404 */
405 405
406 MfwRes mnuHide (MfwHnd m) 406 MfwRes mnuHide (MfwHnd m)
407 { 407 {
408 MfwMnu *mnu; 408 MfwMnu *mnu;
409 // U8 dsplOld; 409 // U8 dsplOld;
410 410
411 if ((mnu = mfwControl(m)) == 0) 411 if ((mnu = mfwControl(m)) == 0)
412 return MfwResIllHnd; 412 return MfwResIllHnd;
413 413
414 mnu->flags &= ~E_MNU_VISIBLE; 414 mnu->flags &= ~E_MNU_VISIBLE;
431 */ 431 */
432 432
433 MfwRes mnuUnhide (MfwHnd m) 433 MfwRes mnuUnhide (MfwHnd m)
434 { 434 {
435 MfwMnu *mnu; 435 MfwMnu *mnu;
436 // U8 dsplOld; 436 // U8 dsplOld;
437 437
438 if ((mnu = mfwControl(m)) == 0) 438 if ((mnu = mfwControl(m)) == 0)
439 return MfwResIllHnd; 439 return MfwResIllHnd;
440 440
441 mnu->flags |= E_MNU_VISIBLE; 441 mnu->flags |= E_MNU_VISIBLE;
457 */ 457 */
458 458
459 MfwRes mnuUpdate (MfwMnu *m) 459 MfwRes mnuUpdate (MfwMnu *m)
460 { 460 {
461 461
462 // U8 dsplOld; 462 // U8 dsplOld;
463 463
464 464
465 if (!m) 465 if (!m)
466 return MfwResIllHnd; 466 return MfwResIllHnd;
467 if (!(m->flags & E_MNU_VISIBLE)) 467 if (!(m->flags & E_MNU_VISIBLE))
468 return MfwResOk; 468 return MfwResOk;
473 473
474 /*JVJE Update to fit the menu to a visible item */ 474 /*JVJE Update to fit the menu to a visible item */
475 { 475 {
476 MfwMnuAttr *ma = m->curAttr; 476 MfwMnuAttr *ma = m->curAttr;
477 int index= m->lCursor[m->level]; 477 int index= m->lCursor[m->level];
478 // int iloop; 478 // int iloop;
479 U16 retVal; 479 U16 retVal;
480 480
481 if (ma->items[index].flagFunc) 481 if (ma->items[index].flagFunc)
482 retVal = ma->items[index].flagFunc(m,ma,&(ma->items[index])); 482 retVal = ma->items[index].flagFunc(m,ma,&(ma->items[index]));
483 else 483 else
492 if (ma->items[index].flagFunc) 492 if (ma->items[index].flagFunc)
493 retVal = ma->items[index].flagFunc(m,ma,&(ma->items[index])); 493 retVal = ma->items[index].flagFunc(m,ma,&(ma->items[index]));
494 else 494 else
495 retVal = 0; 495 retVal = 0;
496 496
497 } 497 }
498 m->lCursor[m->level]=index; 498 m->lCursor[m->level]=index;
499 } 499 }
500 500
501 if ((m->curAttr->mode & MNU_DISPLAY) == MNU_OVERLAPPED) 501 if ((m->curAttr->mode & MNU_DISPLAY) == MNU_OVERLAPPED)
502 drawFreeMenu(m); 502 drawFreeMenu(m);
503 //May 18, 2006 REF: DRT OMAPS00076438 xdeepadh 503 //May 18, 2006 REF: DRT OMAPS00076438 xdeepadh
504 else if ((m->curAttr->mode & MNU_DISPLAY) == MNU_PAGED) 504 else if ((m->curAttr->mode & MNU_DISPLAY) == MNU_PAGED)
505 drawPageMenu(m); 505 drawPageMenu(m);
506 else if ((m->curAttr->mode & MNU_DISPLAY) == MNU_LIST) 506 else if ((m->curAttr->mode & MNU_DISPLAY) == MNU_LIST)
507 drawListMenu(m); 507 drawListMenu(m);
508 else if ((m->curAttr->mode & MNU_DISPLAY) ==MNU_LIST_ICONS) 508 else if ((m->curAttr->mode & MNU_DISPLAY) ==MNU_LIST_ICONS)
533 MfwRes mnuUp (MfwHnd m) 533 MfwRes mnuUp (MfwHnd m)
534 { 534 {
535 MfwMnu *mnu; 535 MfwMnu *mnu;
536 MfwMnuAttr *ca; 536 MfwMnuAttr *ca;
537 MfwMnuItem *ci; 537 MfwMnuItem *ci;
538 // U8 uMode; 538 // U8 uMode;
539 539
540 if ((mnu = mfwControl(m)) == 0) 540 if ((mnu = mfwControl(m)) == 0)
541 return MfwResIllHnd; 541 return MfwResIllHnd;
542 542
543 543
544 ca = mnu->curAttr; 544 ca = mnu->curAttr;
557 mnu->lCursor[mnu->level] -= (U8) 1; 557 mnu->lCursor[mnu->level] -= (U8) 1;
558 mnu->flags &= ~E_MNU_TOPPED; 558 mnu->flags &= ~E_MNU_TOPPED;
559 } 559 }
560 ci = ca->items + mnu->lCursor[mnu->level]; 560 ci = ca->items + mnu->lCursor[mnu->level];
561 } while (ci->flagFunc(mnu,ca,ci) & MNU_ITEM_HIDE); 561 } while (ci->flagFunc(mnu,ca,ci) & MNU_ITEM_HIDE);
562 562
563 if (mnu->scrollMode) /* Simple scrolling */ 563 if (mnu->scrollMode) /* Simple scrolling */
564 { 564 {
565 U8 shift = mnu->lShift[mnu->level]; 565 U8 shift = mnu->lShift[mnu->level];
566 U8 index = countVisible(mnu,ca,mnu->lCursor[mnu->level]); 566 U8 index = countVisible(mnu,ca,mnu->lCursor[mnu->level]);
567 U8 visibleItems = countVisible(mnu,ca,ca->nItems); 567 U8 visibleItems = countVisible(mnu,ca,ca->nItems);
568 int nLines = mnu->nLines; 568 int nLines = mnu->nLines;
569 569
570 if (visibleItems<nLines) 570 if (visibleItems<nLines)
571 nLines = visibleItems; 571 nLines = visibleItems;
572 if (shift>1) 572 if (shift>1)
573 shift--; 573 shift--;
574 mnu->lShift[mnu->level] = shift; 574 mnu->lShift[mnu->level] = shift;
575 575
576 } 576 }
577 mnuUpdate(mnu); 577 mnuUpdate(mnu);
578 return MfwResOk; 578 return MfwResOk;
579 } 579 }
619 619
620 if (mnu->scrollMode) /* Simple scrolling */ 620 if (mnu->scrollMode) /* Simple scrolling */
621 { 621 {
622 U8 shift = mnu->lShift[mnu->level]; 622 U8 shift = mnu->lShift[mnu->level];
623 U8 index = countVisible(mnu,ca,mnu->lCursor[mnu->level]); 623 U8 index = countVisible(mnu,ca,mnu->lCursor[mnu->level]);
624 U8 visibleItems = countVisible(mnu,ca,ca->nItems); 624 U8 visibleItems = countVisible(mnu,ca,ca->nItems);
625 int nLines = mnu->nLines; 625 int nLines = mnu->nLines;
626 626
627 if (visibleItems<nLines) 627 if (visibleItems<nLines)
628 nLines = visibleItems; 628 nLines = visibleItems;
629 if (shift<nLines) 629 if (shift<nLines)
630 shift++; 630 shift++;
631 mnu->lShift[mnu->level] = shift; 631 mnu->lShift[mnu->level] = shift;
632 632
633 } 633 }
634 mnuUpdate(mnu); 634 mnuUpdate(mnu);
635 return MfwResOk; 635 return MfwResOk;
636 } 636 }
650 MfwRes mnuSelect (MfwHnd m) 650 MfwRes mnuSelect (MfwHnd m)
651 { 651 {
652 MfwMnu *mnu; 652 MfwMnu *mnu;
653 MfwMnuAttr *submenu, *ca; 653 MfwMnuAttr *submenu, *ca;
654 MenuFunc func; 654 MenuFunc func;
655 // U8 dsplOld; 655 // U8 dsplOld;
656 656
657 if ((mnu = mfwControl(m)) == 0) 657 if ((mnu = mfwControl(m)) == 0)
658 return MfwResIllHnd; 658 return MfwResIllHnd;
659 659
660 ca = mnu->curAttr; 660 ca = mnu->curAttr;
661 submenu = ca->items[mnu->lCursor[mnu->level]].menu; 661 submenu = ca->items[mnu->lCursor[mnu->level]].menu;
662 func = ca->items[mnu->lCursor[mnu->level]].func; 662 func = ca->items[mnu->lCursor[mnu->level]].func;
663 663
664 if (func) /* perform submenu */ 664 if (func) /* perform submenu */
714 MfwRes mnuEscape (MfwHnd m) 714 MfwRes mnuEscape (MfwHnd m)
715 { 715 {
716 MfwMnu *mnu; 716 MfwMnu *mnu;
717 MfwMnuAttr *attr; 717 MfwMnuAttr *attr;
718 U8 lvl; 718 U8 lvl;
719 // U8 dsplOld; 719 // U8 dsplOld;
720 720
721 if ((mnu = mfwControl(m)) == 0) 721 if ((mnu = mfwControl(m)) == 0)
722 return MfwResIllHnd; 722 return MfwResIllHnd;
723 723
724 if (mnu->level != 0) 724 if (mnu->level != 0)
1048 1048
1049 static int checkStatus (MfwMnu *m, MfwMnuAttr *ma, MfwMnuItem *mi, 1049 static int checkStatus (MfwMnu *m, MfwMnuAttr *ma, MfwMnuItem *mi,
1050 char *menuString) 1050 char *menuString)
1051 { 1051 {
1052 char *e; /* ES!! UNICODE */ 1052 char *e; /* ES!! UNICODE */
1053 int index = 0; 1053 int index = 0;
1054 /*a0393213 compiler warning removal - variable unicode removed*/ 1054 /*a0393213 compiler warning removal - variable unicode removed*/
1055 U16 flagResult; 1055 U16 flagResult;
1056 1056
1057 flagResult = mi->flagFunc(m,ma,mi); 1057 flagResult = mi->flagFunc(m,ma,mi);
1058 switch (flagResult) 1058 switch (flagResult)
1078 } 1078 }
1079 break; 1079 break;
1080 1080
1081 /* SPR998 - SH - Checked or unchecked option. 1081 /* SPR998 - SH - Checked or unchecked option.
1082 * Don't need to do anything here. */ 1082 * Don't need to do anything here. */
1083 1083
1084 case MNU_ITEM_UNCHECKED: 1084 case MNU_ITEM_UNCHECKED:
1085 case MNU_ITEM_CHECKED: 1085 case MNU_ITEM_CHECKED:
1086 break; 1086 break;
1087 1087
1088 default: 1088 default:
1089 break; 1089 break;
1090 } 1090 }
1091 1091
1092 return flagResult; /* SPR#998 - SH - Now returns item type */ 1092 return flagResult; /* SPR#998 - SH - Now returns item type */
1102 int nPixels; 1102 int nPixels;
1103 int xPos,yPos,sy,txtXpos; // Removed txtLen, sx 1103 int xPos,yPos,sy,txtXpos; // Removed txtLen, sx
1104 1104
1105 /* START: 05-June 2006, x0045876 (OMAPS00060424 - Header Toggle) */ 1105 /* START: 05-June 2006, x0045876 (OMAPS00060424 - Header Toggle) */
1106 dspl_DevCaps disData; 1106 dspl_DevCaps disData;
1107 1107
1108 T_DS_TEXTFORMAT format; 1108 T_DS_TEXTFORMAT format;
1109 1109
1110 T_ATB_TEXT title; 1110 T_ATB_TEXT title;
1111 T_ATB_TEXT newTitle; 1111 T_ATB_TEXT newTitle;
1112 1112
1113 USHORT titleWidth; 1113 USHORT titleWidth;
1114 /*a0393213 warning removal-variable titleHeight removed*/ 1114 /*a0393213 warning removal-variable titleHeight removed*/
1126 xPos = mnuArea->px; 1126 xPos = mnuArea->px;
1127 yPos = mnuArea->py; 1127 yPos = mnuArea->py;
1128 sy = res_getTitleHeight(); 1128 sy = res_getTitleHeight();
1129 resources_setTitleColour(mnuColour); 1129 resources_setTitleColour(mnuColour);
1130 dspl_Clear(xPos,yPos,(U16)(mnuArea->sx+xPos-1),(U16)(mnuArea->sy+yPos-1)); 1130 dspl_Clear(xPos,yPos,(U16)(mnuArea->sx+xPos-1),(U16)(mnuArea->sy+yPos-1));
1131 1131
1132 if ((mode & MNU_HDR_ALIGN) == MNU_HDR_LEFT) 1132 if ((mode & MNU_HDR_ALIGN) == MNU_HDR_LEFT)
1133 { 1133 {
1134 txtXpos = xPos; 1134 txtXpos = xPos;
1135 } 1135 }
1136 else 1136 else
1147 if (mnuAttr->header_toggle) 1147 if (mnuAttr->header_toggle)
1148 { 1148 {
1149 title.dcs = ATB_DCS_ASCII; 1149 title.dcs = ATB_DCS_ASCII;
1150 title.data = (UBYTE*)txt;/*a0393213 warnings removal-typecasting done*/ 1150 title.data = (UBYTE*)txt;/*a0393213 warnings removal-typecasting done*/
1151 title.len = ATB_string_Length(&title); 1151 title.len = ATB_string_Length(&title);
1152 1152
1153 ATB_display_SetFormatAttr(&format, 0, FALSE); 1153 ATB_display_SetFormatAttr(&format, 0, FALSE);
1154 titleWidth = ATB_display_StringWidth(&title, &format)+2; 1154 titleWidth = ATB_display_StringWidth(&title, &format)+2;
1155 /*titleHeight = ATB_display_StringHeight(&title, &format);*//*a0393213 warning removal-titleHeight assigned but never used*/ 1155 /*titleHeight = ATB_display_StringHeight(&title, &format);*//*a0393213 warning removal-titleHeight assigned but never used*/
1156 1156
1157 dspl_GetDeviceCaps(&disData); 1157 dspl_GetDeviceCaps(&disData);
1167 } 1167 }
1168 1168
1169 titleWidth = 0; 1169 titleWidth = 0;
1170 textIndex = g_title_pos; 1170 textIndex = g_title_pos;
1171 lastSpace = 0; 1171 lastSpace = 0;
1172 1172
1173 while (titleWidth<(disData.Width -2) && textIndex<title.len) 1173 while (titleWidth<(disData.Width -2) && textIndex<title.len)
1174 { 1174 {
1175 character = ATB_string_GetChar(&title, textIndex); 1175 character = ATB_string_GetChar(&title, textIndex);
1176 titleWidth+=ATB_display_GetCharWidth(character, &format); 1176 titleWidth+=ATB_display_GetCharWidth(character, &format);
1177 textIndex++; 1177 textIndex++;
1194 1194
1195 for (textIndex=0; textIndex<newTitle.len; textIndex++) 1195 for (textIndex=0; textIndex<newTitle.len; textIndex++)
1196 { 1196 {
1197 ATB_string_SetChar(&newTitle, textIndex, ATB_string_GetChar(&title, g_title_pos+textIndex)); 1197 ATB_string_SetChar(&newTitle, textIndex, ATB_string_GetChar(&title, g_title_pos+textIndex));
1198 } 1198 }
1199 ATB_string_SetChar(&newTitle, newTitle.len, UNICODE_EOLN); 1199 ATB_string_SetChar(&newTitle, newTitle.len, UNICODE_EOLN);
1200 ATB_display_Text(0,0,&format, &newTitle); 1200 ATB_display_Text(0,0,&format, &newTitle);
1201 mfwFree((UBYTE *)newTitle.data, (newTitle.len+1)*ATB_string_Size(&title)); 1201 mfwFree((UBYTE *)newTitle.data, (newTitle.len+1)*ATB_string_Size(&title));
1202 1202
1203 areaLeft->px = xPos; 1203 areaLeft->px = xPos;
1204 areaLeft->sx = mnuArea->sx; 1204 areaLeft->sx = mnuArea->sx;
1205 areaLeft->py = yPos+sy; 1205 areaLeft->py = yPos+sy;
1206 areaLeft->sy = mnuArea->sy-sy; 1206 areaLeft->sy = mnuArea->sy-sy;
1207 1207
1208 resources_restoreMnuColour(); 1208 resources_restoreMnuColour();
1209 return; 1209 return;
1210 1210
1211 } 1211 }
1212 else 1212 else
1213 { 1213 {
1214 nPixels = dspl_GetTextExtent( txt, 0); 1214 nPixels = dspl_GetTextExtent( txt, 0);
1215 txtXpos = xPos + (mnuArea->sx - nPixels)/2; 1215 txtXpos = xPos + (mnuArea->sx - nPixels)/2;
1226 1226
1227 // Shashi Shekar B.S., a0876501, Feb 4, 2006, DR: OMAPS00061462 1227 // Shashi Shekar B.S., a0876501, Feb 4, 2006, DR: OMAPS00061462
1228 #ifdef FF_MMI_SAT_ICON 1228 #ifdef FF_MMI_SAT_ICON
1229 if (mnuAttr->icon != NULL) 1229 if (mnuAttr->icon != NULL)
1230 { 1230 {
1231 if (mnuAttr->icon->area.sx > TITLE_ICON_WIDTH) 1231 if (mnuAttr->icon->area.sx > TITLE_ICON_WIDTH)
1232 { 1232 {
1233 titleIconWidth = TITLE_ICON_WIDTH; 1233 titleIconWidth = TITLE_ICON_WIDTH;
1234 } 1234 }
1235 else 1235 else
1236 { 1236 {
1237 titleIconWidth = mnuAttr->icon->area.sx; 1237 titleIconWidth = mnuAttr->icon->area.sx;
1238 } 1238 }
1239 } 1239 }
1240 else 1240 else
1241 { 1241 {
1242 titleIconWidth = 0; 1242 titleIconWidth = 0;
1243 } 1243 }
1244 1244
1251 { 1251 {
1252 if (txt[0] != (char)0x80) /*a0393213 lint warnings removal - typecast done*/ 1252 if (txt[0] != (char)0x80) /*a0393213 lint warnings removal - typecast done*/
1253 dspl_ScrText (txtXpos, yPos, txt, 0); 1253 dspl_ScrText (txtXpos, yPos, txt, 0);
1254 else 1254 else
1255 dspl_TextOut(txtXpos, yPos, DSPL_TXTATTR_CURRENT_MODE, txt ); 1255 dspl_TextOut(txtXpos, yPos, DSPL_TXTATTR_CURRENT_MODE, txt );
1256 } 1256 }
1257 } 1257 }
1258 else 1258 else
1259 { 1259 {
1260 if (txt[0] != (char)0x80) /*a0393213 lint warnings removal - typecast done*/ 1260 if (txt[0] != (char)0x80) /*a0393213 lint warnings removal - typecast done*/
1261 dspl_ScrText (txtXpos, yPos, txt, 0); 1261 dspl_ScrText (txtXpos, yPos, txt, 0);
1265 #else 1265 #else
1266 if (txt[0] != 0x80) 1266 if (txt[0] != 0x80)
1267 dspl_ScrText (txtXpos, yPos, txt, 0); 1267 dspl_ScrText (txtXpos, yPos, txt, 0);
1268 else 1268 else
1269 dspl_TextOut(txtXpos, yPos, DSPL_TXTATTR_CURRENT_MODE, txt ); 1269 dspl_TextOut(txtXpos, yPos, DSPL_TXTATTR_CURRENT_MODE, txt );
1270 #endif 1270 #endif
1271 1271
1272 // Shashi Shekar B.S., a0876501, Feb 4, 2006, DR: OMAPS00061462 1272 // Shashi Shekar B.S., a0876501, Feb 4, 2006, DR: OMAPS00061462
1273 #ifdef FF_MMI_SAT_ICON 1273 #ifdef FF_MMI_SAT_ICON
1274 if (mnuAttr->icon != NULL) 1274 if (mnuAttr->icon != NULL)
1275 { 1275 {
1276 if (mnuAttr->icon->icons != NULL) 1276 if (mnuAttr->icon->icons != NULL)
1277 { 1277 {
1278 if ((mnuAttr->icon->area.sx > TITLE_ICON_WIDTH) || (mnuAttr->icon->area.sy > TITLE_ICON_HEIGHT)) 1278 if ((mnuAttr->icon->area.sx > TITLE_ICON_WIDTH) || (mnuAttr->icon->area.sy > TITLE_ICON_HEIGHT))
1279 { 1279 {
1280 /* iconY calculates place holder to place the icon 1280 /* iconY calculates place holder to place the icon
1281 at the center of the screen. */ 1281 at the center of the screen. */
1282 iconX = 1; 1282 iconX = 1;
1283 iconY = 1+ ((sy-2) / 2) - (10 / 2); 1283 iconY = 1+ ((sy-2) / 2) - (10 / 2);
1284 dspl_BitBlt2(iconX, iconY, 8, 1284 dspl_BitBlt2(iconX, iconY, 8,
1285 10, (void*)SATIconQuestionMark, 0, BMP_FORMAT_256_COLOUR); 1285 10, (void*)SATIconQuestionMark, 0, BMP_FORMAT_256_COLOUR);
1286 } 1286 }
1287 else 1287 else
1288 { 1288 {
1289 dspl_BitBlt2(mnuAttr->icon->area.px, mnuAttr->icon->area.py, 1289 dspl_BitBlt2(mnuAttr->icon->area.px, mnuAttr->icon->area.py,
1292 } 1292 }
1293 } 1293 }
1294 } 1294 }
1295 #endif 1295 #endif
1296 1296
1297 areaLeft->px = xPos; 1297 areaLeft->px = xPos;
1298 areaLeft->sx = mnuArea->sx; 1298 areaLeft->sx = mnuArea->sx;
1299 areaLeft->py = yPos+sy; 1299 areaLeft->py = yPos+sy;
1300 areaLeft->sy = mnuArea->sy-sy; 1300 areaLeft->sy = mnuArea->sy-sy;
1301 #ifdef MFW_DEBUG_DISPLAY_SIZE 1301 #ifdef MFW_DEBUG_DISPLAY_SIZE
1302 dspl_DrawRect(xPos,yPos,(xPos+mnuArea->sx-1),(yPos+sy-1)); 1302 dspl_DrawRect(xPos,yPos,(xPos+mnuArea->sx-1),(yPos+sy-1));
1303 #endif 1303 #endif
1304 resources_restoreMnuColour(); 1304 resources_restoreMnuColour();
1305 } 1305 }
1306 1306
1307 // Sep 30, 2005 REF: CRR MMI-SPR-33781 xreddymn 1307 // Sep 30, 2005 REF: CRR MMI-SPR-33781 xreddymn
1308 // Description: Menu header not displayed for Golite 1308 // Description: Menu header not displayed for Golite
1366 | STATE : code ROUTINE : drawPageMenu | 1366 | STATE : code ROUTINE : drawPageMenu |
1367 +--------------------------------------------------------------------+ 1367 +--------------------------------------------------------------------+
1368 1368
1369 PURPOSE : draws menu in page mode 1369 PURPOSE : draws menu in page mode
1370 1370
1371 GW 05/10/01 - Changed single value 'lng' to 2 values indicating if ID's should be 1371 GW 05/10/01 - Changed single value 'lng' to 2 values indicating if ID's should be
1372 used (useStrID) and if the strings are ascii or unicode (uesDefLang). 1372 used (useStrID) and if the strings are ascii or unicode (uesDefLang).
1373 1373
1374 */ 1374 */
1375 void fastCopyBitmap(int startX, int startY, // start position of bitmap 1375 void fastCopyBitmap(int startX, int startY, // start position of bitmap
1376 int bmpSx, int bmpSy, //size of bitmap 1376 int bmpSx, int bmpSy, //size of bitmap
1377 char* srcBitmap, 1377 char* srcBitmap,
1378 int posX, int posY, // start of area to be copied into 1378 int posX, int posY, // start of area to be copied into
1379 int sx, int sy, // size of area to be copied into 1379 int sx, int sy, // size of area to be copied into
1380 U32 bgd_col, int bmptype); 1380 U32 bgd_col, int bmptype);
1381 1381
1382 static void drawPageMenu (MfwMnu *mnu) 1382 static void drawPageMenu (MfwMnu *mnu)
1383 { 1383 {
1384 MfwMnuAttr *ma; /* menu attributes */ 1384 MfwMnuAttr *ma; /* menu attributes */
1385 //U16 th, tw, tl; /* text height, width, len */ 1385 //U16 th, tw, tl; /* text height, width, len */
1386 U16 ax, ay, aw, ah; // , x; /* menu area dimensions */ 1386 U16 ax, ay, aw, ah; // , x; /* menu area dimensions */
1387 // int tLines; /* lines in item text */ 1387 // int tLines; /* lines in item text */
1388 // int nLines; /* lines in menu area */ 1388 // int nLines; /* lines in menu area */
1389 char *txt; // Removed *t2, save; /* item text & clip saver */ 1389 char *txt; // Removed *t2, save; /* item text & clip saver */
1390 MfwIcnAttr * icn; /* item icon */ 1390 MfwIcnAttr * icn; /* item icon */
1391 U8 oldFont = (U8)-1; /* save previous font */ /*a0393213 compiler warnings removal - explicit casting done*/ 1391 U8 oldFont = (U8)-1; /* save previous font */ /*a0393213 compiler warnings removal - explicit casting done*/
1392 MfwMnuItem *mi; /* current item */ 1392 MfwMnuItem *mi; /* current item */
1393 // char *t; // Removed tt [64] /* temp item string */ 1393 // char *t; // Removed tt [64] /* temp item string */
1404 icn = mi->icon; 1404 icn = mi->icon;
1405 txt = mi->str; 1405 txt = mi->str;
1406 resources_setColour(ma->mnuColour); 1406 resources_setColour(ma->mnuColour);
1407 1407
1408 if ((ma->mode & MNU_HDRFORMAT_STR)==0) /* header is a text ID */ 1408 if ((ma->mode & MNU_HDRFORMAT_STR)==0) /* header is a text ID */
1409 txt = (char*)MmiRsrcGetText((int)txt); 1409 txt = (char*)MmiRsrcGetText((int)txt);
1410 checkPredraw(mnu,mi,&txt,&icn); /* ES!! */ 1410 checkPredraw(mnu,mi,&txt,&icn); /* ES!! */
1411 { 1411 {
1412 MfwRect areaLeft; 1412 MfwRect areaLeft;
1413 mnuDrawHeader(ma,&areaLeft,txt); 1413 mnuDrawHeader(ma,&areaLeft,txt);
1414 ax = areaLeft.px; ay = areaLeft.py; 1414 ax = areaLeft.px; ay = areaLeft.py;
1419 MfwRect *bmpArea = &ma->bgdBitmap->area; 1419 MfwRect *bmpArea = &ma->bgdBitmap->area;
1420 if ((ma->bgdBitmap->icons != NULL) && (bmpArea->sx >0) && (bmpArea->sy >0)) 1420 if ((ma->bgdBitmap->icons != NULL) && (bmpArea->sx >0) && (bmpArea->sy >0))
1421 { 1421 {
1422 fastCopyBitmap( (int)bmpArea->px, (int)bmpArea->py, (int)bmpArea->sx, (int)bmpArea->sy, 1422 fastCopyBitmap( (int)bmpArea->px, (int)bmpArea->py, (int)bmpArea->sx, (int)bmpArea->sy,
1423 ma->bgdBitmap->icons, 1423 ma->bgdBitmap->icons,
1424 (int)ax,(int)ay, (int)aw, (int)ah, 1424 (int)ax,(int)ay, (int)aw, (int)ah,
1425 dspl_GetBgdColour(), 1425 dspl_GetBgdColour(),
1426 ma->bgdBitmap->icnType); 1426 ma->bgdBitmap->icnType);
1427 } 1427 }
1428 else 1428 else
1429 { 1429 {
1430 dspl_Clear(ax,ay,(U16)(ax+aw-1),(U16)(ay+ah-1)); 1430 dspl_Clear(ax,ay,(U16)(ax+aw-1),(U16)(ay+ah-1));
1431 } 1431 }
1432 } 1432 }
1433 else 1433 else
1434 { 1434 {
1435 dspl_Clear(ax,ay,(U16)(ax+aw-1),(U16)(ay+ah-1)); 1435 dspl_Clear(ax,ay,(U16)(ax+aw-1),(U16)(ay+ah-1));
1436 } 1436 }
1437 1437
1438 1438
1439 1439
1440 if (icn != NULL) 1440 if (icn != NULL)
1441 { /* show associated icon */ 1441 { /* show associated icon */
1442 dspl_BitBlt2(icn->area.px,icn->area.py, 1442 dspl_BitBlt2(icn->area.px,icn->area.py,
1443 icn->area.sx,icn->area.sy, 1443 icn->area.sx,icn->area.sy,
1449 1449
1450 checkPostdraw(mnu,mi); /* ES!! */ 1450 checkPostdraw(mnu,mi); /* ES!! */
1451 1451
1452 #ifdef MFW_DEBUG_DISPLAY_SIZE 1452 #ifdef MFW_DEBUG_DISPLAY_SIZE
1453 dspl_DrawRect(ax,ay,(ax+aw-1),(ay+ah-1)); 1453 dspl_DrawRect(ax,ay,(ax+aw-1),(ay+ah-1));
1454 #endif 1454 #endif
1455 resources_restoreColour(); 1455 resources_restoreColour();
1456 } 1456 }
1457 1457
1458 1458
1459 /* 1459 /*
1462 | STATE : code ROUTINE : drawListMenu | 1462 | STATE : code ROUTINE : drawListMenu |
1463 +--------------------------------------------------------------------+ 1463 +--------------------------------------------------------------------+
1464 1464
1465 PURPOSE : draws menu in list mode 1465 PURPOSE : draws menu in list mode
1466 1466
1467 GW 05/10/01 - Changed single value 'lng' to 2 values indicating if ID's should be 1467 GW 05/10/01 - Changed single value 'lng' to 2 values indicating if ID's should be
1468 used (useStrID) and if the strings are ascii or unicode (uesDefLang). 1468 used (useStrID) and if the strings are ascii or unicode (uesDefLang).
1469 */ 1469 */
1470 #define MAX_STR_CHAR 64 1470 #define MAX_STR_CHAR 64
1471 static void drawListMenu (MfwMnu *mnu) 1471 static void drawListMenu (MfwMnu *mnu)
1472 { 1472 {
1477 int nLines; 1477 int nLines;
1478 int i; 1478 int i;
1479 int nIdx; 1479 int nIdx;
1480 int nTextLen; 1480 int nTextLen;
1481 MfwIcnAttr * icn; 1481 MfwIcnAttr * icn;
1482 // int fit; 1482 // int fit;
1483 char *txtStr; /* item text */ 1483 char *txtStr; /* item text */
1484 char txt[MAX_STR_CHAR]; 1484 char txt[MAX_STR_CHAR];
1485 U8 oldFont =(U8) -1; /* save previous font */ /*a0393213 compiler warnings removal - explicit type casting done*/ 1485 U8 oldFont =(U8) -1; /* save previous font */ /*a0393213 compiler warnings removal - explicit type casting done*/
1486 int simpleScrolling; 1486 int simpleScrolling;
1487 int status; /* SPR#998 - SH - Status for each menu item */ 1487 int status; /* SPR#998 - SH - Status for each menu item */
1500 1500
1501 TRACE_EVENT("drawListMenu() start"); /*a0393213 compiler warnings removal - TIME_TRACE_EVENT changed to TRACE_EVENT*/ 1501 TRACE_EVENT("drawListMenu() start"); /*a0393213 compiler warnings removal - TIME_TRACE_EVENT changed to TRACE_EVENT*/
1502 ma = mnu->curAttr; 1502 ma = mnu->curAttr;
1503 1503
1504 /* SPR#1983 - SH - Ignore language type now */ 1504 /* SPR#1983 - SH - Ignore language type now */
1505 1505
1506 if (ma->font != (U8) -1) 1506 if (ma->font != (U8) -1)
1507 oldFont = dspl_SelectFontbyID(ma->font); /* setup font */ 1507 oldFont = dspl_SelectFontbyID(ma->font); /* setup font */
1508 1508
1509 /* xreddymn Dec-16-2004 MMI-SPR-27384: Two line height list display */ 1509 /* xreddymn Dec-16-2004 MMI-SPR-27384: Two line height list display */
1510 if((ma->mode & MNU_DISPLAY)== MNU_LIST_2_LINE) 1510 if((ma->mode & MNU_DISPLAY)== MNU_LIST_2_LINE)
1513 fh = hfh<<1; /* height of two lines */ 1513 fh = hfh<<1; /* height of two lines */
1514 } 1514 }
1515 else 1515 else
1516 fh = dspl_GetFontHeight(); 1516 fh = dspl_GetFontHeight();
1517 fw = dspl_GetTextExtent("X",1); // ES!! only for normal fonts ! 1517 fw = dspl_GetTextExtent("X",1); // ES!! only for normal fonts !
1518 1518
1519 //Display header info (if required) 1519 //Display header info (if required)
1520 if ((ma->hdrId != 0) && (dspl_getDisplayType()==DSPL_COLOUR)) 1520 if ((ma->hdrId != 0) && (dspl_getDisplayType()==DSPL_COLOUR))
1521 { 1521 {
1522 MfwRect areaLeft; 1522 MfwRect areaLeft;
1523 char *hdrStr; 1523 char *hdrStr;
1524 if ((ma->mode & MNU_HDRFORMAT_STR)==0) /* header is a text ID */ 1524 if ((ma->mode & MNU_HDRFORMAT_STR)==0) /* header is a text ID */
1525 hdrStr = MmiRsrcGetText(ma->hdrId); 1525 hdrStr = MmiRsrcGetText(ma->hdrId);
1526 else 1526 else
1527 hdrStr = (char*)(ma->hdrId); 1527 hdrStr = (char*)(ma->hdrId);
1528 mnuDrawHeader(ma,&areaLeft,hdrStr); 1528 mnuDrawHeader(ma,&areaLeft,hdrStr);
1529 ax = areaLeft.px; ay = areaLeft.py; 1529 ax = areaLeft.px; ay = areaLeft.py;
1530 aw = areaLeft.sx; ah = areaLeft.sy; 1530 aw = areaLeft.sx; ah = areaLeft.sy;
1554 dspl_Clear(ax,ay,(U16)(aw+ax-1),(U16)(ah+ay-1)); 1554 dspl_Clear(ax,ay,(U16)(aw+ax-1),(U16)(ah+ay-1));
1555 nLines = ah / fh; 1555 nLines = ah / fh;
1556 mnu->nLines = nLines; //Store the number of lines we are drawing for scrolling up/down 1556 mnu->nLines = nLines; //Store the number of lines we are drawing for scrolling up/down
1557 { 1557 {
1558 // TRACE_EVENT_P5(" ax:%d ay:%d aw:%d ah:%d lines:%d",ax,ay,aw,ah, nLines); 1558 // TRACE_EVENT_P5(" ax:%d ay:%d aw:%d ah:%d lines:%d",ax,ay,aw,ah, nLines);
1559 } 1559 }
1560 if ((!mnu->scrollMode)||(countVisible(mnu,ma,ma->nItems)<=nLines)) /* Simple scrolling */ 1560 if ((!mnu->scrollMode)||(countVisible(mnu,ma,ma->nItems)<=nLines)) /* Simple scrolling */
1561 simpleScrolling = TRUE; 1561 simpleScrolling = TRUE;
1562 else 1562 else
1563 simpleScrolling = FALSE; 1563 simpleScrolling = FALSE;
1564 1564
1573 int nVisibles = countVisible(mnu,ma,ma->nItems); 1573 int nVisibles = countVisible(mnu,ma,ma->nItems);
1574 1574
1575 while (ma->items[index-1].flagFunc(mnu,ma,&(ma->items[index-1])) & MNU_ITEM_HIDE) 1575 while (ma->items[index-1].flagFunc(mnu,ma,&(ma->items[index-1])) & MNU_ITEM_HIDE)
1576 { 1576 {
1577 index++; 1577 index++;
1578 } 1578 }
1579 1579
1580 while (count>0){ 1580 while (count>0){
1581 if (index<=0) 1581 if (index<=0)
1582 index = ma->nItems-1; 1582 index = ma->nItems-1;
1583 else 1583 else
1584 index--; 1584 index--;
1585 if (!(ma->items[index].flagFunc(mnu,ma,&(ma->items[index]))& MNU_ITEM_HIDE)) 1585 if (!(ma->items[index].flagFunc(mnu,ma,&(ma->items[index]))& MNU_ITEM_HIDE))
1586 count--; 1586 count--;
1587 } 1587 }
1588 if (nVisibles<nLines) 1588 if (nVisibles<nLines)
1589 nLines = nVisibles; 1589 nLines = nVisibles;
1590 nIdx = index; 1590 nIdx = index;
1591 } 1591 }
1592 1592
1593 for (i = 0; i < nLines; nIdx++) /* ES!! not so nice... */ 1593 for (i = 0; i < nLines; nIdx++) /* ES!! not so nice... */
1594 { 1594 {
1595 if (nIdx >= ma->nItems) 1595 if (nIdx >= ma->nItems)
1596 { 1596 {
1597 if (simpleScrolling) 1597 if (simpleScrolling)
1598 break; 1598 break;
1599 else 1599 else
1600 nIdx=0; 1600 nIdx=0;
1601 } 1601 }
1602 1602
1603 if (ma->items[nIdx].flagFunc(mnu,ma,&(ma->items[nIdx])) 1603 if (ma->items[nIdx].flagFunc(mnu,ma,&(ma->items[nIdx]))
1604 & MNU_ITEM_HIDE) 1604 & MNU_ITEM_HIDE)
1605 continue; 1605 continue;
1606 if (mnu->useStrID) /* use language handler */ 1606 if (mnu->useStrID) /* use language handler */
1607 txtStr = (char*)MmiRsrcGetText((int)ma->items[nIdx].str); //JVJE 1607 txtStr = (char*)MmiRsrcGetText((int)ma->items[nIdx].str); //JVJE
1611 1611
1612 // Shashi Shekar B.S., a0876501, Feb 4, 2006, DR: OMAPS00061462 1612 // Shashi Shekar B.S., a0876501, Feb 4, 2006, DR: OMAPS00061462
1613 #ifdef FF_MMI_SAT_ICON 1613 #ifdef FF_MMI_SAT_ICON
1614 if (icn != NULL) 1614 if (icn != NULL)
1615 { 1615 {
1616 if (icn->area.sx > TITLE_ICON_WIDTH) 1616 if (icn->area.sx > TITLE_ICON_WIDTH)
1617 { 1617 {
1618 titleIconWidth = TITLE_ICON_WIDTH; 1618 titleIconWidth = TITLE_ICON_WIDTH;
1619 } 1619 }
1620 else 1620 else
1621 { 1621 {
1622 titleIconWidth = icn->area.sx; 1622 titleIconWidth = icn->area.sx;
1623 } 1623 }
1624 } 1624 }
1625 else 1625 else
1626 { 1626 {
1627 titleIconWidth = 0; 1627 titleIconWidth = 0;
1628 } 1628 }
1629 #endif 1629 #endif
1673 nTextLen = dspl_GetTextExtent((char*)(txt+(EOL_position<<1)),(U16)dspl_str_length(txt)); 1673 nTextLen = dspl_GetTextExtent((char*)(txt+(EOL_position<<1)),(U16)dspl_str_length(txt));
1674 else 1674 else
1675 #endif 1675 #endif
1676 nTextLen = dspl_GetTextExtent((char*)(txt+EOL_position),(U16)dspl_str_length(txt)); 1676 nTextLen = dspl_GetTextExtent((char*)(txt+EOL_position),(U16)dspl_str_length(txt));
1677 1677
1678 /* SPR#998 - SH - If list is a checkbox list, include space for checkbox in width */ 1678 /* SPR#998 - SH - If list is a checkbox list, include space for checkbox in width */
1679 if (status==MNU_ITEM_CHECKED || status==MNU_ITEM_UNCHECKED) 1679 if (status==MNU_ITEM_CHECKED || status==MNU_ITEM_UNCHECKED)
1680 { 1680 {
1681 nTextLen+=(checkbox_spacing_left+checkbox_width+checkbox_spacing_right); 1681 nTextLen+=(checkbox_spacing_left+checkbox_width+checkbox_spacing_right);
1682 } 1682 }
1683 /* end of SPR#998 */ 1683 /* end of SPR#998 */
1684 1684
1685 if ((ma->mode & MNU_ALIGN) == MNU_CENTER) 1685 if ((ma->mode & MNU_ALIGN) == MNU_CENTER)
1686 x2 = (U16) (ax + (aw - nTextLen) / 2); 1686 x2 = (U16) (ax + (aw - nTextLen) / 2);
1687 else if ((ma->mode & MNU_ALIGN) == MNU_RIGHT) 1687 else if ((ma->mode & MNU_ALIGN) == MNU_RIGHT)
1688 x2 = (U16) (ax + aw - nTextLen); 1688 x2 = (U16) (ax + aw - nTextLen);
1689 else 1689 else
1694 } 1694 }
1695 1695
1696 nTextLen = dspl_GetTextExtent(txt,(U16)dspl_str_length(txt)); 1696 nTextLen = dspl_GetTextExtent(txt,(U16)dspl_str_length(txt));
1697 1697
1698 /* SPR#998 - SH - If list is a checkbox list, include space for checkbox in width */ 1698 /* SPR#998 - SH - If list is a checkbox list, include space for checkbox in width */
1699 1699
1700 if (status==MNU_ITEM_CHECKED || status==MNU_ITEM_UNCHECKED) 1700 if (status==MNU_ITEM_CHECKED || status==MNU_ITEM_UNCHECKED)
1701 { 1701 {
1702 nTextLen+=(checkbox_spacing_left+checkbox_width+checkbox_spacing_right); 1702 nTextLen+=(checkbox_spacing_left+checkbox_width+checkbox_spacing_right);
1703 } 1703 }
1704 1704
1705 /* end of SPR#998 */ 1705 /* end of SPR#998 */
1706 1706
1707 if ((ma->mode & MNU_ALIGN) == MNU_CENTER) 1707 if ((ma->mode & MNU_ALIGN) == MNU_CENTER)
1708 x = (U16) (ax + (aw - nTextLen) / 2); 1708 x = (U16) (ax + (aw - nTextLen) / 2);
1709 else if ((ma->mode & MNU_ALIGN) == MNU_RIGHT) 1709 else if ((ma->mode & MNU_ALIGN) == MNU_RIGHT)
1710 x = (U16) (ax + aw - nTextLen); 1710 x = (U16) (ax + aw - nTextLen);
1711 else 1711 else
1714 x =ax; 1714 x =ax;
1715 1715
1716 /* SPR#998 - SH - Draw checkboxes if required */ 1716 /* SPR#998 - SH - Draw checkboxes if required */
1717 1717
1718 if (status==MNU_ITEM_CHECKED || status==MNU_ITEM_UNCHECKED) 1718 if (status==MNU_ITEM_CHECKED || status==MNU_ITEM_UNCHECKED)
1719 { 1719 {
1720 checkbox_x = x+checkbox_spacing_left; 1720 checkbox_x = x+checkbox_spacing_left;
1721 checkbox_y = ay+i*fh+(fh-checkbox_height)/2; 1721 checkbox_y = ay+i*fh+(fh-checkbox_height)/2;
1722 1722
1723 if (status==MNU_ITEM_CHECKED) 1723 if (status==MNU_ITEM_CHECKED)
1724 { 1724 {
1725 /* NOTE: for some reason, a filled rect must have x2, y2 +1 of the same size 1725 /* NOTE: for some reason, a filled rect must have x2, y2 +1 of the same size
1726 * of unfilled rect...compare parameters here and below */ 1726 * of unfilled rect...compare parameters here and below */
1727 dspl_DrawFilledRect(checkbox_x, checkbox_y, checkbox_x+checkbox_width+1, 1727 dspl_DrawFilledRect(checkbox_x, checkbox_y, checkbox_x+checkbox_width+1,
1737 /* xreddymn Dec-16-2004 MMI-SPR-27384: For two line menu item display */ 1737 /* xreddymn Dec-16-2004 MMI-SPR-27384: For two line menu item display */
1738 x2+=(checkbox_spacing_left+checkbox_width+checkbox_spacing_right); 1738 x2+=(checkbox_spacing_left+checkbox_width+checkbox_spacing_right);
1739 } 1739 }
1740 1740
1741 /* end of SPR#998 */ 1741 /* end of SPR#998 */
1742 1742
1743 { 1743 {
1744 #ifdef NO_ASCIIZ 1744 #ifdef NO_ASCIIZ
1745 /*MC, use universal height rather than smaller chinese font height*/ 1745 /*MC, use universal height rather than smaller chinese font height*/
1746 /*MC, SPR1526, send whole string to dspl_TextOut, rather than missing out unicode tag*/ 1746 /*MC, SPR1526, send whole string to dspl_TextOut, rather than missing out unicode tag*/
1747 /* SPR#1983 - SH - If unicode is set, send text as unicode */ 1747 /* SPR#1983 - SH - If unicode is set, send text as unicode */
1748 1748
1776 if(icn->selfExplanatory == FALSE) 1776 if(icn->selfExplanatory == FALSE)
1777 dspl_TextOut(titleIconWidth + 1 + x,(U16)(ay+i*fh),DSPL_TXTATTR_CURRENT_MODE,txt); 1777 dspl_TextOut(titleIconWidth + 1 + x,(U16)(ay+i*fh),DSPL_TXTATTR_CURRENT_MODE,txt);
1778 } 1778 }
1779 else 1779 else
1780 dspl_TextOut(x,(U16)(ay+i*fh),DSPL_TXTATTR_CURRENT_MODE,txt); 1780 dspl_TextOut(x,(U16)(ay+i*fh),DSPL_TXTATTR_CURRENT_MODE,txt);
1781 #else 1781 #else
1782 dspl_TextOut(x,(U16)(ay+i*fh),DSPL_TXTATTR_CURRENT_MODE,txt); 1782 dspl_TextOut(x,(U16)(ay+i*fh),DSPL_TXTATTR_CURRENT_MODE,txt);
1783 #endif 1783 #endif
1784 if(EOL_position>0) /* xreddymn Dec-16-2004 MMI-SPR-27384: two line display */ 1784 if(EOL_position>0) /* xreddymn Dec-16-2004 MMI-SPR-27384: two line display */
1785 { 1785 {
1786 dspl_TextOut(x2,(U16)(ay+i*fh+hfh),DSPL_TXTATTR_CURRENT_MODE,(char*)(txt+EOL_position)); 1786 dspl_TextOut(x2,(U16)(ay+i*fh+hfh),DSPL_TXTATTR_CURRENT_MODE,(char*)(txt+EOL_position));
1787 } 1787 }
1788 } 1788 }
1789 } 1789 }
1790 1790
1791 if (nIdx == mnu->lCursor[mnu->level]) 1791 if (nIdx == mnu->lCursor[mnu->level])
1792 { 1792 {
1793 if ((ma->mode & MNU_ITEMSEL) == MNU_FRAMED) 1793 if ((ma->mode & MNU_ITEMSEL) == MNU_FRAMED)
1876 } 1876 }
1877 if (icn != NULL)// && icn->nIcons > nIdx) 1877 if (icn != NULL)// && icn->nIcons > nIdx)
1878 { 1878 {
1879 // Shashi Shekar B.S., a0876501, Feb 4, 2006, DR: OMAPS00061462 1879 // Shashi Shekar B.S., a0876501, Feb 4, 2006, DR: OMAPS00061462
1880 #ifdef FF_MMI_SAT_ICON 1880 #ifdef FF_MMI_SAT_ICON
1881 /* There is a problem when this icon is displayed. 1881 /* There is a problem when this icon is displayed.
1882 The last parameter was not taken into consideration & a default '0' was been set. This is corrected now.*/ 1882 The last parameter was not taken into consideration & a default '0' was been set. This is corrected now.*/
1883 /* dspl_BitBlt2(icn->area.px, icn->area.py, 1883 /* dspl_BitBlt2(icn->area.px, icn->area.py,
1884 icn->area.sx, icn->area.sy, 1884 icn->area.sx, icn->area.sy,
1885 icn->icons, 0, icn->icnType);*/ 1885 icn->icons, 0, icn->icnType);*/
1886 1886
1902 #endif 1902 #endif
1903 } 1903 }
1904 } 1904 }
1905 i++; 1905 i++;
1906 checkPostdraw(mnu,ma->items+nIdx); /* ES!! */ 1906 checkPostdraw(mnu,ma->items+nIdx); /* ES!! */
1907 } 1907 }
1908 1908
1909 if (oldFont != (U8) -1) 1909 if (oldFont != (U8) -1)
1910 dspl_SelectFontbyID(oldFont); /* restore previous font */ 1910 dspl_SelectFontbyID(oldFont); /* restore previous font */
1911 1911
1912 /* SPR#1983 - SH - No longer have to change text type back */ 1912 /* SPR#1983 - SH - No longer have to change text type back */
1913 1913
1914 resources_restoreColour(); 1914 resources_restoreColour();
1915 #ifdef MFW_DEBUG_DISPLAY_SIZE 1915 #ifdef MFW_DEBUG_DISPLAY_SIZE
1916 dspl_DrawRect(ax,ay,(ax+aw-1),(ay+ah-1)); 1916 dspl_DrawRect(ax,ay,(ax+aw-1),(ay+ah-1));
1917 #endif 1917 #endif
1918 TRACE_EVENT("drawListMenu() end"); /*a0393213 warnings removal-TIME_TRACE_EVENT changed to TRACE_EVENT*/ 1918 TRACE_EVENT("drawListMenu() end"); /*a0393213 warnings removal-TIME_TRACE_EVENT changed to TRACE_EVENT*/
1919 1919
1920 } 1920 }
1921 1921
1922 1922
1938 int icon_w=0; 1938 int icon_w=0;
1939 int icon_h=0; 1939 int icon_h=0;
1940 TRACE_FUNCTION("drawIconsListMenu()"); /* Replace TIME_TRACE_EVENT to TRACE_FUNCTION - x0020906 - Warning Correction */ 1940 TRACE_FUNCTION("drawIconsListMenu()"); /* Replace TIME_TRACE_EVENT to TRACE_FUNCTION - x0020906 - Warning Correction */
1941 ma = mnu->curAttr; 1941 ma = mnu->curAttr;
1942 /* SPR#1983 - SH - Ignore language type now */ 1942 /* SPR#1983 - SH - Ignore language type now */
1943 1943
1944 if (ma->font != (U8) -1) 1944 if (ma->font != (U8) -1)
1945 oldFont = dspl_SelectFontbyID(ma->font); /* setup font */ 1945 oldFont = dspl_SelectFontbyID(ma->font); /* setup font */
1946 1946
1947 fh = dspl_GetFontHeight(); 1947 fh = dspl_GetFontHeight();
1948 fw = dspl_GetTextExtent("X",1); // ES!! only for normal fonts ! 1948 fw = dspl_GetTextExtent("X",1); // ES!! only for normal fonts !
1949 1949
1950 //Display header info (if required) 1950 //Display header info (if required)
1951 if ((ma->hdrId != 0) && (dspl_getDisplayType()==DSPL_COLOUR)) 1951 if ((ma->hdrId != 0) && (dspl_getDisplayType()==DSPL_COLOUR))
1952 { 1952 {
1953 MfwRect areaLeft; 1953 MfwRect areaLeft;
1954 char *hdrStr; 1954 char *hdrStr;
1955 if ((ma->mode & MNU_HDRFORMAT_STR)==0) /* header is a text ID */ 1955 if ((ma->mode & MNU_HDRFORMAT_STR)==0) /* header is a text ID */
1956 hdrStr = MmiRsrcGetText(ma->hdrId); 1956 hdrStr = MmiRsrcGetText(ma->hdrId);
1957 else 1957 else
1958 hdrStr = (char*)(ma->hdrId); 1958 hdrStr = (char*)(ma->hdrId);
1959 mnuDrawHeader(ma,&areaLeft,hdrStr); 1959 mnuDrawHeader(ma,&areaLeft,hdrStr);
1960 ax = areaLeft.px; ay = areaLeft.py; 1960 ax = areaLeft.px; ay = areaLeft.py;
1961 aw = areaLeft.sx; ah = areaLeft.sy; 1961 aw = areaLeft.sx; ah = areaLeft.sy;
2015 int nVisibles = countVisible(mnu,ma,ma->nItems); 2015 int nVisibles = countVisible(mnu,ma,ma->nItems);
2016 2016
2017 while (ma->items[index-1].flagFunc(mnu,ma,&(ma->items[index-1])) & MNU_ITEM_HIDE) 2017 while (ma->items[index-1].flagFunc(mnu,ma,&(ma->items[index-1])) & MNU_ITEM_HIDE)
2018 { 2018 {
2019 index++; 2019 index++;
2020 } 2020 }
2021 2021
2022 while (count>0){ 2022 while (count>0){
2023 if (index<=0) 2023 if (index<=0)
2024 index = ma->nItems-1; 2024 index = ma->nItems-1;
2025 else 2025 else
2026 index--; 2026 index--;
2027 if (!(ma->items[index].flagFunc(mnu,ma,&(ma->items[index]))& MNU_ITEM_HIDE)) 2027 if (!(ma->items[index].flagFunc(mnu,ma,&(ma->items[index]))& MNU_ITEM_HIDE))
2028 count--; 2028 count--;
2029 } 2029 }
2030 if (nVisibles<nLines) 2030 if (nVisibles<nLines)
2031 nLines = nVisibles; 2031 nLines = nVisibles;
2032 nIdx = index; 2032 nIdx = index;
2033 } 2033 }
2034 if(ma->items[0].icon != NULL) 2034 if(ma->items[0].icon != NULL)
2035 { 2035 {
2036 ma->items[0].icon->area.px=ax; 2036 ma->items[0].icon->area.px=ax;
2037 ma->items[0].icon->area.py=ay; 2037 ma->items[0].icon->area.py=ay;
2041 if (nIdx >= ma->nItems) 2041 if (nIdx >= ma->nItems)
2042 { 2042 {
2043 if (simpleScrolling) 2043 if (simpleScrolling)
2044 break; 2044 break;
2045 else 2045 else
2046 nIdx=0; 2046 nIdx=0;
2047 } 2047 }
2048 if (ma->items[nIdx].flagFunc(mnu,ma,&(ma->items[nIdx])) 2048 if (ma->items[nIdx].flagFunc(mnu,ma,&(ma->items[nIdx]))
2049 & MNU_ITEM_HIDE) 2049 & MNU_ITEM_HIDE)
2050 continue; 2050 continue;
2051 if (mnu->useStrID) /* use language handler */ 2051 if (mnu->useStrID) /* use language handler */
2063 { 2063 {
2064 resources_setColourMnuItem( (int)ma->items[nIdx].str ); 2064 resources_setColourMnuItem( (int)ma->items[nIdx].str );
2065 } 2065 }
2066 2066
2067 nTextLen = dspl_GetTextExtent(txt,(U16)dspl_str_length(txt)); 2067 nTextLen = dspl_GetTextExtent(txt,(U16)dspl_str_length(txt));
2068 2068
2069 if ((ma->mode & MNU_ALIGN) == MNU_CENTER) 2069 if ((ma->mode & MNU_ALIGN) == MNU_CENTER)
2070 x = (U16) (ax + (aw - nTextLen) / 2); 2070 x = (U16) (ax + (aw - nTextLen) / 2);
2071 else if ((ma->mode & MNU_ALIGN) == MNU_RIGHT) 2071 else if ((ma->mode & MNU_ALIGN) == MNU_RIGHT)
2072 x = (U16) (ax + aw - nTextLen); 2072 x = (U16) (ax + aw - nTextLen);
2073 else 2073 else
2075 if ((ma->mode & MNU_ITEMSEL) == MNU_CUR_LINE) 2075 if ((ma->mode & MNU_ITEMSEL) == MNU_CUR_LINE)
2076 x =ax; 2076 x =ax;
2077 2077
2078 /* SPR#998 - SH - Draw checkboxes if required */ 2078 /* SPR#998 - SH - Draw checkboxes if required */
2079 2079
2080 2080
2081 2081
2082 /* end of SPR#998 */ 2082 /* end of SPR#998 */
2083 2083
2084 { 2084 {
2085 #ifdef NO_ASCIIZ 2085 #ifdef NO_ASCIIZ
2086 /*MC, use universal height rather than smaller chinese font height*/ 2086 /*MC, use universal height rather than smaller chinese font height*/
2087 /*MC, SPR1526, send whole string to dspl_TextOut, rather than missing out unicode tag*/ 2087 /*MC, SPR1526, send whole string to dspl_TextOut, rather than missing out unicode tag*/
2088 /* SPR#1983 - SH - If unicode is set, send text as unicode */ 2088 /* SPR#1983 - SH - If unicode is set, send text as unicode */
2089 2089
2090 if (txt[0] == (char)0x80 || mnu->textDCS==MNU_LIST_LANGUAGE_UNICODE) 2090 if (txt[0] == (char)0x80 || mnu->textDCS==MNU_LIST_LANGUAGE_UNICODE)
2091 { 2091 {
2092 dspl_TextOut(x+icon_w,(U16)ay+i*icon_h/*MC, 1319*/,DSPL_TXTATTR_UNICODE,txt); 2092 dspl_TextOut(x+icon_w,(U16)ay+i*icon_h/*MC, 1319*/,DSPL_TXTATTR_UNICODE,txt);
2093 } 2093 }
2094 else 2094 else
2095 #endif 2095 #endif
2096 { 2096 {
2097 2097
2098 dspl_TextOut(x+icon_w,(U16)(ay+i*icon_h),DSPL_TXTATTR_CURRENT_MODE,txt); 2098 dspl_TextOut(x+icon_w,(U16)(ay+i*icon_h),DSPL_TXTATTR_CURRENT_MODE,txt);
2099 } 2099 }
2100 } 2100 }
2101 2101
2102 if (nIdx == mnu->lCursor[mnu->level]) 2102 if (nIdx == mnu->lCursor[mnu->level])
2103 { 2103 {
2104 if ((ma->mode & MNU_ITEMSEL) == MNU_FRAMED) 2104 if ((ma->mode & MNU_ITEMSEL) == MNU_FRAMED)
2134 dspl_DrawFilledBgdRect(x,ay+i*icon_h,aw,ay+(i+1)*icon_h); 2134 dspl_DrawFilledBgdRect(x,ay+i*icon_h,aw,ay+(i+1)*icon_h);
2135 #ifdef NO_ASCIIZ 2135 #ifdef NO_ASCIIZ
2136 /* SPR#1983 - SH - If unicode is set, send text as unicode */ 2136 /* SPR#1983 - SH - If unicode is set, send text as unicode */
2137 if (txt[0] == (char)0x80 || mnu->textDCS==MNU_LIST_LANGUAGE_UNICODE) 2137 if (txt[0] == (char)0x80 || mnu->textDCS==MNU_LIST_LANGUAGE_UNICODE)
2138 { 2138 {
2139 2139
2140 dspl_TextOut(x+icon_w,(U16)ay+i*icon_h/*MC, 1319*/,DSPL_TXTATTR_UNICODE,txt); 2140 dspl_TextOut(x+icon_w,(U16)ay+i*icon_h/*MC, 1319*/,DSPL_TXTATTR_UNICODE,txt);
2141 } 2141 }
2142 else 2142 else
2143 #endif 2143 #endif
2144 { 2144 {
2145 2145
2146 dspl_TextOut(x+icon_w,(U16)(ay+i*icon_h),DSPL_TXTATTR_CURRENT_MODE,txt); 2146 dspl_TextOut(x+icon_w,(U16)(ay+i*icon_h),DSPL_TXTATTR_CURRENT_MODE,txt);
2147 2147
2148 } 2148 }
2149 resources_restoreMnuColour(); 2149 resources_restoreMnuColour();
2150 2150
2152 } 2152 }
2153 if (icn != NULL)// && icn->nIcons > nIdx) 2153 if (icn != NULL)// && icn->nIcons > nIdx)
2154 { 2154 {
2155 dspl_BitBlt2(ax,ay+i*icon_h, 2155 dspl_BitBlt2(ax,ay+i*icon_h,
2156 icn->area.sx,icn->area.sy, 2156 icn->area.sx,icn->area.sy,
2157 icn->icons,0,icn->icnType); 2157 icn->icons,0,icn->icnType);
2158 } 2158 }
2159 } 2159 }
2160 else 2160 else
2161 { 2161 {
2162 if (icn != NULL){ 2162 if (icn != NULL){
2164 icn->area.sx,icn->area.sy, 2164 icn->area.sx,icn->area.sy,
2165 icn->icons,0,icn->icnType); } 2165 icn->icons,0,icn->icnType); }
2166 } 2166 }
2167 i++; 2167 i++;
2168 checkPostdraw(mnu,ma->items+nIdx); /* ES!! */ 2168 checkPostdraw(mnu,ma->items+nIdx); /* ES!! */
2169 } 2169 }
2170 2170
2171 if (oldFont != (U8) -1) 2171 if (oldFont != (U8) -1)
2172 dspl_SelectFontbyID(oldFont); /* restore previous font */ 2172 dspl_SelectFontbyID(oldFont); /* restore previous font */
2173 2173
2174 2174
2175 resources_restoreColour(); 2175 resources_restoreColour();
2176 #ifdef MFW_DEBUG_DISPLAY_SIZE 2176 #ifdef MFW_DEBUG_DISPLAY_SIZE
2177 dspl_DrawRect(ax,ay,(ax+aw-1),(ay+ah-1)); 2177 dspl_DrawRect(ax,ay,(ax+aw-1),(ay+ah-1));
2178 #endif 2178 #endif
2179 2179
2180 } 2180 }
2181 2181
2182 2182
2183 /* 2183 /*
2212 x = wa->area->px + (wa->area->sx - nTextLen) / 2; 2212 x = wa->area->px + (wa->area->sx - nTextLen) / 2;
2213 else if ((wa->mode & MNU_ALIGN) == MNU_RIGHT) 2213 else if ((wa->mode & MNU_ALIGN) == MNU_RIGHT)
2214 x = wa->area->px + wa->area->sx - nTextLen; 2214 x = wa->area->px + wa->area->sx - nTextLen;
2215 else 2215 else
2216 x = wa->area->px; 2216 x = wa->area->px;
2217 2217
2218 dspl_TextOut((U16)x,(U16)(wa->area->py+wa->area->sy-nFontHeight),DSPL_TXTATTR_CURRENT_MODE, 2218 dspl_TextOut((U16)x,(U16)(wa->area->py+wa->area->sy-nFontHeight),DSPL_TXTATTR_CURRENT_MODE,
2219 wa->items[mnu->lCursor[mnu->level]].str); 2219 wa->items[mnu->lCursor[mnu->level]].str);
2220 2220
2221 for (i = 0; i < wa->nItems; i++) 2221 for (i = 0; i < wa->nItems; i++)
2222 { 2222 {
2273 */ 2273 */
2274 2274
2275 void mnuScrollMode (MfwHnd menu,U8 mode) 2275 void mnuScrollMode (MfwHnd menu,U8 mode)
2276 { 2276 {
2277 MfwMnu *mnu; 2277 MfwMnu *mnu;
2278 2278
2279 if ((mnu = mfwControl(menu)) == 0) 2279 if ((mnu = mfwControl(menu)) == 0)
2280 return; 2280 return;
2281 mnu->scrollMode = mode; 2281 mnu->scrollMode = mode;
2282 } 2282 }
2283 2283
2284 2284
2285 void mnuInitDataItem(MfwMnuItem* mnuItem) 2285 void mnuInitDataItem(MfwMnuItem* mnuItem)
2286 { 2286 {
2287 mnuItem->icon = 0; 2287 mnuItem->icon = 0;
2288 mnuItem->exta = 0; 2288 mnuItem->exta = 0;
2289 mnuItem->menu = 0; 2289 mnuItem->menu = 0;
2290 mnuItem->func = 0; 2290 mnuItem->func = 0;
2291 mnuItem->str = NULL; 2291 mnuItem->str = NULL;
2292 mnuItem->flagFunc = 0; 2292 mnuItem->flagFunc = 0;
2293 2293
2294 } 2294 }
2295 2295
2296 /* 2296 /*
2297 +--------------------------------------------------------------------+ 2297 +--------------------------------------------------------------------+
2306 2306
2307 int mnuIdentify(struct MfwMnuAttrTag *attr, struct MfwMnuItemTag *item) 2307 int mnuIdentify(struct MfwMnuAttrTag *attr, struct MfwMnuItemTag *item)
2308 { 2308 {
2309 int index; 2309 int index;
2310 int currentOption; 2310 int currentOption;
2311 2311
2312 /* Identify current menu option */ 2312 /* Identify current menu option */
2313 2313
2314 currentOption = -1; 2314 currentOption = -1;
2315 2315
2316 for (index=0; index < attr->nItems; index++) 2316 for (index=0; index < attr->nItems; index++)
2317 { 2317 {
2318 if (&attr->items[index]==item) 2318 if (&attr->items[index]==item)
2319 currentOption = index; 2319 currentOption = index;
2320 } 2320 }
2333 2333
2334 $Function: Menu_edit_TitleTimerCb 2334 $Function: Menu_edit_TitleTimerCb
2335 2335
2336 $Description: Callback function for the Menu title timer. Recalculates title_pos so that 2336 $Description: Callback function for the Menu title timer. Recalculates title_pos so that
2337 the next part of the string is displayed. 2337 the next part of the string is displayed.
2338 2338
2339 $Returns: None. 2339 $Returns: None.
2340 2340
2341 $Arguments: event - the event type 2341 $Arguments: event - the event type
2342 timer - the timer 2342 timer - the timer
2343 2343
2344 *******************************************************************************/ 2344 *******************************************************************************/
2345 static int Menu_edit_TitleTimerCb (MfwEvt e, MfwTim *t) 2345 static int Menu_edit_TitleTimerCb (MfwEvt e, MfwTim *t)
2346 { 2346 {
2347 TRACE_FUNCTION("Menu_edit_TitleTimerCb"); 2347 TRACE_FUNCTION("Menu_edit_TitleTimerCb");
2348 2348
2349 if (g_title_next_pos!=g_title_pos) 2349 if (g_title_next_pos!=g_title_pos)
2350 g_title_pos = g_title_next_pos; 2350 g_title_pos = g_title_next_pos;
2351 winShow(g_win); 2351 winShow(g_win);
2352 timStart(g_title_timer); 2352 timStart(g_title_timer);
2353 2353
2354 return 1; 2354 return 1;
2355 } 2355 }
2356 /* END: 05-June-2006, x0045876 (OMAPS00060424 - Header Toggle) */ 2356 /* END: 05-June-2006, x0045876 (OMAPS00060424 - Header Toggle) */
2357 2357