MS_MULTI.C
上传用户:super_houu
上传日期:2008-09-21
资源大小:4099k
文件大小:19k
- /* **************************************************************************************
- * Copyright (c) 2002 ZORAN Corporation, All Rights Reserved
- * THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF ZORAN CORPORATION
- *
- * File: $Workfile: MS_MULTI.C $
- *
- * Description:
- * ============
- *
- *
- * Log:
- * ====
- * $Revision: 7 $
- * Last Modified by $Author: Williaml $ at $Modtime: 04-03-30 11:18 $
- ****************************************************************************************
- * Updates:
- ****************************************************************************************
- * $Log: /I76/I76_Common/I76_Reference/UI/Menu_sys/MS_MULTI.C $
- *
- * 7 04-03-30 11:19 Williaml
- * add the switch D_DIRECTION_KEY_IN_SETUP_MENU for using
- * up/down/left/right keys select or open the set up menu
- *
- * 5 03-07-10 15:59 Leonm
- *
- * 4 03-07-09 15:53 Leonm
- * New Pro Logic II setup menu
- *
- * 3 03-07-06 17:13 Rogerl
- * Force action at last
- *
- * 11 23/04/02 9:39 Nirm
- * - Added dependency in "Config.h".
- *
- * 10 11/03/02 12:51 Nirm
- * Debug message in case of memory allocation failure.
- *
- * 9 2/27/02 7:02a Tomasp
- * Changed get_blk/rel_blk to malloc,free.
- *
- * 7 16/01/02 8:57 Nirm
- * Fixed debug-messages.
- *
- * 6 13/01/02 16:38 Atai
- * Remove old Defines
- *
- * 5 9/01/02 18:23 Nirm
- * Corrected Include-Paths.
- *
- * 4 30/12/01 10:02 Atai
- * add explicit casting
- *
- * 3 23/12/01 17:47 Atai
- *
- * 2 23/12/01 17:43 Atai
- * Code cleaning
- **************************************************************************************** */
- #include "Config.h" // Global Configuration - do not remove!
- #ifdef _DEBUG
- #include "DebugDbgMain.h"
- #undef IFTRACE
- #define IFTRACE if (gTraceMenu)
- #endif //_DEBUG
- #include <stdio.h>
- #include <stdlib.h>
- #include <string.h>
- #include "Includesysdefs.h"
- #include "Decoderosdrendr.h"
- #include "UIMenu_Sysosd_drv.h"
- #include "UIMenu_Sysms_wdgt.h"
- #include "UIMenu_Sysms_lib.h"
- #define CHOICE_HEIGHT MS_LINE_HEIGHT
- #define LAST_CHOICE (choice->text_list->size-1)
- #ifdef D_DIRECTION_KEY_IN_SETUP_MENU
- static BYTE no_change_choice;
- #endif
- // Support external display
- #ifdef D_MS_EXTENSIONS
- void choice_display_open_value(MS_CHOICE *pmsc, WORD wItemNum, char focus )
- {
- OSD_PutText(
- pmsc->choice_pos.x,
- #ifdef D_MS_EXTENSIONS
- MS_CHOICE_OPEN_VALUE_POS_Y(pmsc, wItemNum),
- #else
- pmsc->choice_pos.y + CHOICE_HEIGHT * wItemNum,
- #endif // D_MS_EXTENSIONS
- pmsc->choice_pos.w,
- #ifdef D_MS_EXTENSIONS
- pmsc->choice_pos.h,
- #else
- CHOICE_HEIGHT,
- #endif // D_MS_EXTENSIONS
- #ifdef D_MS_EXTENSIONS
- FORE_COLOR( pmsc, focus ),
- #else
- FG_COLOR(pmsc->widget.color),
- #endif
- BACK_COLOR((MS_WIDGET *) pmsc, focus ),
- (void *)pmsc->text_list->head[wItemNum],
- MS_JUST(pmsc),
- !C_ASCII);
- }
- #endif
- // Pass focus, use full color
- #ifdef D_MS_EXTENSIONS
- void choice_display_closed_value(MS_CHOICE *pmsc, char focus)
- #else
- void choice_display_closed_value(MS_CHOICE *pmsc, WORD back_color)
- #endif // D_MS_EXTENSIONS
- {
- OSD_SetOrigin( (MS_WIDGET *) pmsc->widget.parent );
-
- OSD_PutText(
- pmsc->widget.pos.x,
- pmsc->widget.pos.y,
- pmsc->widget.pos.w,
- pmsc->widget.pos.h,
- #ifdef D_MS_EXTENSIONS
- FORE_COLOR( pmsc, focus),
- BACK_COLOR( pmsc, focus),
- #else
- FG_COLOR(pmsc->widget.color),
- back_color,
- #endif
- (void *)pmsc->text_list->head[pmsc->current_choice],
- ALIGN_CENTER,
- !C_ASCII);
- }
- #ifdef D_MS_EXTENSIONS
- static void display_open_choice(MS_CHOICE *choice, char focus)
- {
- unsigned short i;
- // Can only do this if width is specified
- if ( IS_OPENABLE_LIST(choice) )
- {
- OSD_SetOrigin( (MS_WIDGET *) choice->widget.parent );
- for (i=0;i < LAST_CHOICE + 1;i++)
- {
- choice_display_open_value( choice, i, ((choice->current_choice == i) ? focus : !C_FOCUSED) );
- }
- }
- }
- static void display_closed_choice (MS_WIDGET *widget, char focus)
- {
- MS_CHOICE *choice = (MS_CHOICE *)widget;
- OSD_PutText(widget->pos.x,
- widget->pos.y,
- widget->pos.w,
- widget->pos.h,
- #ifdef D_MS_EXTENSIONS
- FORE_COLOR(widget, focus),
- #else
- FG_COLOR(widget->color),
- #endif
- BACK_COLOR(widget, focus),
- (void *)choice->text_list->head[choice->current_choice],
- // Allow all alignments
- #ifdef D_MS_EXTENSIONS
- MS_JUST(widget),
- #else
- ALIGN_CENTER,
- #endif // D_MS_EXTENSIONS
- !C_ASCII);
- }
- #endif // D_MS_EXTENSIONS
- #ifdef D_MS_EXTENSIONS
- static void display (MS_WIDGET *widget, char focus)
- {
- MS_CHOICE *choice = (MS_CHOICE *)widget;
- // Fix display of open toggle
- if ( IS_OPENABLE_LIST(choice) && MS_IS_CHOICE_OPEN(choice) )
- display_open_choice(widget, focus);
- else
- display_closed_choice(widget, focus);
- }
- #else
- static void display (MS_WIDGET *widget, char focus)
- {
- MS_CHOICE *choice = (MS_CHOICE *)widget;
- OSD_PutText(widget->pos.x,
- widget->pos.y,
- widget->pos.w,
- widget->pos.h,
- FG_COLOR(widget->color),
- BACK_COLOR(widget, focus),
- (void *)choice->text_list->head[choice->current_choice],
- // Allow all alignments
- #ifdef D_MS_EXTENSIONS
- MS_JUST(pmsc),
- #else
- ALIGN_CENTER,
- #endif // D_MS_EXTENSIONS
- !C_ASCII);
- }
- #endif // D_MS_EXTENSIONS
- // Support toggle with arrows, wraparound
- #ifdef D_MS_EXTENSIONS
- static void increment_choice(MS_CHOICE *choice)
- {
- if ( choice->current_choice < LAST_CHOICE )
- choice->current_choice ++;
- else
- choice->current_choice = 0;
- }
- static void decrement_choice(MS_CHOICE *choice)
- {
- if ( choice->current_choice )
- choice->current_choice --;
- else
- choice->current_choice = LAST_CHOICE;
- }
- #endif // D_MS_EXTENSIONS
- static int choice_previous(MS_CHOICE *choice)
- {
- #ifdef D_MS_EXTENSIONS
- if ( IS_OPENABLE_LIST(choice) && !MS_IS_CHOICE_OPEN(choice) )
- #else
- if ( !MS_IS_CHOICE_OPEN(choice) )
- #endif // D_MS_EXTENSIONS
- {
- return 0;
- }
- #ifdef D_MS_EXTENSIONS
- if ( !MS_IS_CHOICE_WRAP(choice) && (choice->current_choice == 0) )
- return 0;
- #endif // D_MS_EXTENSIONS
- if ( IS_OPENABLE_LIST(choice) )
- {
- #ifdef D_MS_EXTENSIONS
- #else
- if (choice->current_choice)
- #endif // D_MS_EXTENSIONS
- {
- #ifdef D_MS_EXTENSIONS
- choice_display_open_value(choice, choice->current_choice, !C_FOCUSED);
- decrement_choice(choice);
- choice_display_open_value(choice, choice->current_choice, C_FOCUSED);
- // When open, don't perform action on next/previous
- #else // D_MS_EXTENSIONS
- OSD_PutText(
- choice->choice_pos.x,
- choice->choice_pos.y + choice->current_choice * CHOICE_HEIGHT,
- choice->choice_pos.w,
- CHOICE_HEIGHT,
- FG_COLOR(choice->widget.color),
- BG_COLOR(choice->widget.color),
- (void *)choice->text_list->head[choice->current_choice],
- MS_JUST(choice),
- !C_ASCII);
- choice->current_choice --;
- OSD_PutText(
- choice->choice_pos.x,
- choice->choice_pos.y+choice->current_choice * CHOICE_HEIGHT,
- choice->choice_pos.w,
- CHOICE_HEIGHT,
- FG_COLOR(choice->widget.color),
- FOCUS_COLOR(choice->widget.color),
- (void *)choice->text_list->head[choice->current_choice],
- MS_JUST(choice),
- !C_ASCII);
- #endif // D_MS_EXTENSIONS
- }
- }
- else
- {
- #ifdef D_MS_EXTENSIONS
- decrement_choice(choice);
- // Use full color and pass focus
- choice_display_closed_value(choice, C_FOCUSED);
- // Perform action on UP/LEFT; Allow NULL actions
- if ( !MS_IS_CHOICE_ENTER(choice) && !MS_IS_CHOICE_ACTION_ON_ENTER(choice) )
- {
- if ( choice->action )
- choice->action(choice->current_choice);
- }
- #else
- if (choice->current_choice) {
- choice->current_choice --;
- }
- else {
- choice->current_choice = LAST_CHOICE;
- }
- OSD_PutText(
- choice->widget.pos.x,
- choice->widget.pos.y,
- choice->widget.pos.w,
- choice->widget.pos.h,
- FG_COLOR(choice->widget.color),
- FOCUS_COLOR(choice->widget.color),
- (void *)choice->text_list->head[choice->current_choice],
- ALIGN_CENTER,
- !C_ASCII);
- #endif // D_MS_EXTENSIONS
- }
- return 1;
- }
- #ifdef D_MS_EXTENSIONS
- #else
- #define choice_down choice_next
- #endif // D_MS_EXTENSIONS
- static int choice_next(MS_CHOICE *choice)
- {
- #ifdef D_MS_EXTENSIONS
- if ( IS_OPENABLE_LIST(choice) && !MS_IS_CHOICE_OPEN(choice) )
- #else
- if ( !MS_IS_CHOICE_OPEN(choice) )
- #endif // D_MS_EXTENSIONS
- {
- return 0;
- }
- #ifdef D_MS_EXTENSIONS
- if ( !MS_IS_CHOICE_WRAP(choice) && (choice->current_choice == LAST_CHOICE) )
- return 0;
- #endif // D_MS_EXTENSIONS
- if ( IS_OPENABLE_LIST(choice) )
- {
- #ifdef D_MS_EXTENSIONS
- #else
- if (choice->current_choice < LAST_CHOICE)
- #endif // D_MS_EXTENSIONS
- {
- #ifdef D_MS_EXTENSIONS
- choice_display_open_value(choice, choice->current_choice, !C_FOCUSED);
- increment_choice(choice);
- choice_display_open_value(choice, choice->current_choice, C_FOCUSED);
- #else // D_MS_EXTENSIONS
- OSD_PutText(
- choice->choice_pos.x,
- choice->choice_pos.y + choice->current_choice * CHOICE_HEIGHT,
- choice->choice_pos.w,
- CHOICE_HEIGHT,
- FG_COLOR(choice->widget.color),
- BG_COLOR(choice->widget.color),
- (void *)choice->text_list->head[choice->current_choice],
- MS_JUST(choice),
- !C_ASCII);
- choice->current_choice ++;
- OSD_PutText(
- choice->choice_pos.x,
- choice->choice_pos.y + choice->current_choice * CHOICE_HEIGHT,
- choice->choice_pos.w,
- CHOICE_HEIGHT,
- FG_COLOR(choice->widget.color),
- FOCUS_COLOR(choice->widget.color),
- (void *)choice->text_list->head[choice->current_choice],
- MS_JUST(choice),
- !C_ASCII);
- #endif // D_MS_EXTENSIONS
- }
- }
- else
- // Choice is a toggle
- {
- #ifdef D_MS_EXTENSIONS
- increment_choice(choice);
- choice_display_closed_value(choice, C_FOCUSED);
- if ( !MS_IS_CHOICE_ENTER(choice) && !MS_IS_CHOICE_ACTION_ON_ENTER(choice) )
- {
- if ( choice->action )
- choice->action(choice->current_choice);
- }
- #else
- if (choice->current_choice >= LAST_CHOICE) {
- choice->current_choice = 0;
- }
- else {
- choice->current_choice ++;
- }
- OSD_PutText(
- choice->widget.pos.x,
- choice->widget.pos.y,
- choice->widget.pos.w,
- choice->widget.pos.h,
- FG_COLOR(choice->widget.color),
- FOCUS_COLOR(choice->widget.color),
- (void *)choice->text_list->head[choice->current_choice],
- ALIGN_CENTER,
- !C_ASCII);
- #endif // D_MS_EXTENSIONS
- }
- // success
- return 1;
- }
- #ifdef D_MS_EXTENSIONS
- static void open_choice(MS_CHOICE *choice, MS_UOP uop)
- #else
- static void open_choice(MS_CHOICE *choice)
- #endif // D_MS_EXTENSIONS
- {
- #ifdef D_MS_EXTENSIONS
- #else
- unsigned short i;
- #endif // D_MS_EXTENSIONS
- ((MS_WIDGET *)choice)->attr |= MS_CHOICE_OPEN;
- if ( IS_OPENABLE_LIST(choice) ) {
- #ifdef D_MS_EXTENSIONS
- display_open_choice(choice, C_FOCUSED);
- #else
- OSD_SetOrigin( (MS_WIDGET *) choice->widget.parent );
- for (i=0;i<choice->text_list->size;i++) {
- OSD_PutText(
- choice->choice_pos.x,
- choice->choice_pos.y+CHOICE_HEIGHT*i,
- choice->choice_pos.w,
- CHOICE_HEIGHT,
- FG_COLOR(choice->widget.color),
- BACK_COLOR((MS_WIDGET *) choice, ((choice->current_choice == i) == C_FOCUSED)),
- (void *)choice->text_list->head[i],
- MS_JUST(choice),
- !C_ASCII);
- }
- #endif // D_MS_EXTENSIONS
- }
- else {
- #ifdef D_MS_EXTENSIONS
- switch (uop)
- {
- case MS_UOP_LEFT:
- case MS_UOP_UP:
- choice_previous(choice);
- break;
- case MS_UOP_ENTER:
- case MS_UOP_RIGHT:
- case MS_UOP_DOWN:
- choice_next(choice);
- break;
- }
- #else
- choice_next(choice);
- #endif // D_MS_EXTENSIONS
- }
- #ifdef D_DIRECTION_KEY_IN_SETUP_MENU
- no_change_choice = choice->current_choice;
- #endif
- }
- static void close_choice(MS_CHOICE *choice)
- {
- ((MS_WIDGET *)choice)->attr &= (unsigned char) ~MS_CHOICE_OPEN;
- if ( IS_OPENABLE_LIST(choice) ) {
- OSD_SetOrigin( (MS_WIDGET*)((MS_WIDGET *) choice)->parent );
- OSD_PutRect(
- choice->choice_pos.x,
- choice->choice_pos.y,
- choice->choice_pos.w,
- #ifdef D_MS_EXTENSIONS
- choice->text_list->size * choice->choice_pos.h,
- #else
- choice->text_list->size*CHOICE_HEIGHT,
- #endif // D_MS_EXTENSIONS
- BG_COLOR(((MS_WIDGET *)choice)->parent->widget.color)
- );
- display((MS_WIDGET *)choice, C_FOCUSED);
- }
- }
- MS_UOP choice_user_op(MS_WIDGET *widget, MS_UOP uop, char param)
- {
- MS_CHOICE *choice = (MS_CHOICE *)widget;
- switch (uop) {
- case MS_UOP_DELETE:
- uop = MS_UOP_NOP;
- break;
- case MS_UOP_DISPLAY:
- display(widget,param);
- uop = MS_UOP_NOP;
- break;
- case MS_UOP_UP:
- #ifdef D_MS_EXTENSIONS
- if ( MS_IS_CHOICE_UD(choice) )
- {
- if ( MS_IS_CHOICE_OPEN(choice) )
- choice_previous(choice);
- else
- open_choice(choice, uop);
- uop = MS_UOP_NOP;
- }
- else
- {
- if ( IS_OPENABLE_LIST(choice) )
- {
- if ( choice_previous(choice) )
- {
- uop = MS_UOP_NOP;
- }
- }
- }
- #else // D_MS_EXTENSIONS
- if ( IS_OPENABLE_LIST(choice) )
- {
- if ( choice_previous(choice) )
- {
- uop = MS_UOP_NOP;
- }
- }
- #endif // D_MS_EXTENSIONS
- break;
- case MS_UOP_RIGHT:
- #ifdef D_MS_EXTENSIONS
- if ( MS_IS_CHOICE_LR(choice) )
- {
- if ( MS_IS_CHOICE_OPEN(choice) )
- {
- choice_next(choice);
- }
- else
- {
- open_choice(choice, uop);
- }
- uop = MS_UOP_NOP;
- }
- else
- {
- if ( IS_OPENABLE_LIST(choice) )
- {
- if ( choice_next(choice) )
- {
- uop = MS_UOP_NOP;
- }
- }
- }
- break;
- #endif // D_MS_EXTENSIONS
- #ifdef D_DIRECTION_KEY_IN_SETUP_MENU
- // if(!no_toggle_in_audio&& (IS_SETUP_MENU_ACTIVE) )
- if (g_ui_active_menu_id == SETUP_MENU_ID)
- {
- if (!MS_IS_CHOICE_OPEN(choice))
- {
- open_choice(choice);
- if ( IS_TOGGLE(choice) )
- {
- choice->action(choice->current_choice);
- close_choice(choice);
- }
- }
- uop = MS_UOP_NOP;
- }else
- if(MS_IS_CHOICE_OPEN(choice))
- uop=MS_UOP_NOP;
- break;
- #endif
- case MS_UOP_LEFT:
- #ifdef D_MS_EXTENSIONS
- if ( MS_IS_CHOICE_LR(choice) )
- {
- if ( MS_IS_CHOICE_OPEN(choice) )
- {
- choice_previous(choice);
- }
- else
- {
- open_choice(choice, uop);
- }
- // Prevent further propagation of uop
- uop = MS_UOP_NOP;
- }
- else
- {
- if ( IS_OPENABLE_LIST(choice) )
- {
- if ( choice_previous(choice) )
- {
- uop = MS_UOP_NOP;
- }
- }
- }
- #else // D_MS_EXTENSIONS
- #ifdef D_DIRECTION_KEY_IN_SETUP_MENU
- // if(!no_toggle_in_audio&& (IS_SETUP_MENU_ACTIVE) )
- if (g_ui_active_menu_id == SETUP_MENU_ID)
- {
- if (MS_IS_CHOICE_OPEN(choice))
- {
- choice->current_choice = no_change_choice;
- close_choice(choice);
- uop = MS_UOP_NOP;
- }
- else if( IS_TOGGLE(choice) )
- {
- ((MS_WIDGET *)choice)->attr |= MS_CHOICE_OPEN;
- choice_previous(choice);
- choice->action(choice->current_choice);
- ((MS_WIDGET *)choice)->attr &= (unsigned char) ~MS_CHOICE_OPEN;
- uop = MS_UOP_NOP;
- }
- }else
- #endif
- if (MS_IS_CHOICE_OPEN(choice)) {
- uop=MS_UOP_NOP;
- }
- #endif // D_MS_EXTENSIONS
- break;
- case MS_UOP_DOWN:
- #ifdef D_MS_EXTENSIONS
- if ( MS_IS_CHOICE_UD(choice) )
- {
- if ( MS_IS_CHOICE_OPEN(choice) )
- choice_next(choice);
- else
- open_choice(choice, uop);
- // Prevent further propagation of uop
- uop = MS_UOP_NOP;
- }
- else
- {
- if ( IS_OPENABLE_LIST(choice) )
- {
- if ( choice_next(choice) )
- {
- uop = MS_UOP_NOP;
- }
- }
- }
- #else // D_MS_EXTENSIONS
- if ( IS_OPENABLE_LIST(choice) ) {
- #ifdef D_MS_EXTENSIONS
- if (choice_next(choice)) {
- #else
- if (choice_down(choice)) {
- #endif // D_MS_EXTENSIONS
- uop = MS_UOP_NOP;
- }
- }
- #endif // D_MS_EXTENSIONS
- break;
- case MS_UOP_ENTER:
- #ifdef D_MS_EXTENSIONS
- if ( MS_IS_CHOICE_ENTER(choice) && !(MS_IS_CHOICE_KEEP_OPEN(choice)) )
- {
- // Choice is ENTER-activated toggle or openable list
- if (MS_IS_CHOICE_OPEN(choice))
- {
- // Choice is open
- if ( IS_TOGGLE(choice) )
- {
- choice_next(choice);
- if ( choice->action )
- choice->action(choice->current_choice);
- }
- else
- {
- if ( choice->action )
- choice->action(choice->current_choice);
- }
- // Re-test in case the action changed the screen
- if ( MS_IS_CHOICE_OPEN(choice) )
- {
- close_choice(choice);
- }
- }
- else // MS_IS_CHOICE_OPEN
- {
- // Choice is not open
- open_choice(choice, uop);
- if ( IS_TOGGLE(choice) )
- {
- if ( choice->action )
- choice->action(choice->current_choice);
- close_choice(choice);
- }
- }
- uop = MS_UOP_NOP;
- }
- // Enable ENTER when choice is open
- else // ( MS_IS_CHOICE_ENTER(choice) && !(MS_IS_CHOICE_KEEP_OPEN(choice)) )
- {
- // Choice is a UD or LR-activated toggle or always open
- if ( MS_IS_CHOICE_OPEN(choice) )
- {
- // Allow NULL actions
- if ( choice->action )
- choice->action(choice->current_choice);
- uop = MS_UOP_NOP;
- }
- }
- #else // D_MS_EXTENSIONS
- if (MS_IS_CHOICE_OPEN(choice)) {
- if ( IS_TOGGLE(choice) ) {
- choice_down(choice);
- }
- // Re-test in case the action changed the screen
- if ( MS_IS_CHOICE_OPEN(choice) )
- {
- close_choice(choice);
- }
- // Force Action at last , RL 070603
- choice->action(choice->current_choice);
- }
- else {
- open_choice(choice);
- if ( IS_TOGGLE(choice) )
- {
- choice->action(choice->current_choice);
- close_choice(choice);
- }
- }
- uop = MS_UOP_NOP;
- #endif // D_MS_EXTENSIONS
- break;
- }
- return uop;
- }
- MS_CHOICE *MS_create_choice(CONST MS_POS *pos, MS_COLOR color, CONST MS_TEXT_LIST *text_list, CONST MS_POS *choice_pos, void (* action)(int), unsigned char attr)
- {
- MS_CHOICE *choice;
- dbg_printf(("MS_create_choicen"));
- choice = (MS_CHOICE *)malloc(sizeof(MS_CHOICE));
- #ifdef _DEBUG
- if (NULL == choice) {
- tr_printf(("FATAL: MS_create_choice() Failed: Low system resources.n"));
- return NULL;
- }
- #endif //_DEBUG
- choice->widget.pos = *pos;
- choice->widget.parent = NO_PARENT;
- choice->widget.color = color;
- choice->text_list = text_list;
- choice->action = action;
- choice->current_choice = 0;
- choice->choice_pos = *choice_pos;
- choice->widget.user_op = choice_user_op;
- choice->widget.attr = attr;
- #ifdef D_MS_EXTENSIONS
- // Correct attribute assignments
- if ( IS_OPENABLE_LIST(choice) )
- {
- choice->widget.attr &= ~( MS_IS_CHOICE_LR(choice) | MS_IS_CHOICE_UD(choice) );
- }
- else
- {
- choice->widget.attr |= MS_CHOICE_WRAP;
- }
- if ( MS_IS_CHOICE_OPEN(choice) )
- {
- choice->widget.attr |= MS_CHOICE_KEEP_OPEN;
- }
- #endif // D_MS_EXTENSIONS
- choice->widget.attrh = ALIGN_CENTER;
- return choice;
- }