gui_inputs.c
资源名称:mmi.rar [点击查看]
上传用户:lqx1163
上传日期:2014-08-13
资源大小:9183k
文件大小:662k
源码类别:
MTK
开发平台:
C/C++
- {
- UI_editor_play_tone_cannot_insert();
- return MMI_FALSE;
- }
- if (GSM_extended_flag)
- {
- b->GSM_ext_count++;
- }
- UI_STRING_GET_NEXT_CHARACTER(b->cursor_p, dummy_c); /* get next character */
- if (b_flags & UI_MULTI_LINE_INPUT_BOX_USE_ENCODING_BASED_LENGTH)
- {
- if (b_flags & UI_MULTI_LINE_INPUT_BOX_ONE_LESS_CHARACTER)
- {
- UI_TEST_UCS2_INCREMENT_COUNT_SET_LENGTH_TYPE2(
- c,
- b->UCS2_count,
- b->allocated_length,
- b->available_length);
- }
- else if (b_flags & UI_MULTI_LINE_INPUT_BOX_FORTY_FOUR_LESS_CHARACTER)
- {
- UI_TEST_UCS2_INCREMENT_COUNT_SET_LENGTH_TYPE3(
- c,
- b->UCS2_count,
- b->allocated_length,
- b->available_length);
- }
- else
- {
- UI_TEST_UCS2_INCREMENT_COUNT_SET_LENGTH(c, b->UCS2_count, b->allocated_length, b->available_length);
- }
- }
- while (!UI_STRING_END_OF_STRING_CHARACTER(c))
- {
- UI_STRING_GET_NEXT_CHARACTER(p1, old_c);
- UI_STRING_INSERT_CHARACTER(p2, c);
- c = old_c;
- }
- UI_STRING_INSERT_CHARACTER(p2, c); /* insert character */
- b->text_length += ((S32) p2 - (S32) p1);
- }
- if (b->show_action_flag)
- {
- //hjf,force to update offset_y b->flags |= UI_MULTI_LINE_INPUT_BOX_DISABLE_DRAW;
- gui_show_multi_line_input_box(b);
- //hjf,force to update offset_y b->flags &= ~UI_MULTI_LINE_INPUT_BOX_DISABLE_DRAW;
- }
- #if defined(__MMI_SMART_MESSAGE_MO__) && !defined(__MMI_MESSAGES_EMS__)
- if (GetMessagesCurrScrnID() == SCR_ID_MSG_WRITE)
- {
- g_nsm_msg_context.UCS2_count = b->UCS2_count;
- MMI_multiline_inputbox.available_length = mmi_nsm2_get_remaining_len();
- wgui_inputbox_buffer_size = (MMI_multiline_inputbox.available_length >> 1);
- if (wgui_inputbox_information_flag)
- {
- wgui_redraw_input_information_bar();
- }
- g_nsm_msg_context.textlength = b->text_length;
- }
- #endif /* defined(__MMI_SMART_MESSAGE_MO__) && !defined(__MMI_MESSAGES_EMS__) */
- #if defined(__MMI_SMART_MESSAGE_MT__)
- if (GetMessagesCurrScrnID() == SCR_ID_NSM_EDITOR)
- {
- picmsg_text_struct.ucs2_count = b->UCS2_count;
- MMI_multiline_inputbox.available_length = mmi_nsm_get_infobar_maxlen();
- wgui_inputbox_buffer_size = (MMI_multiline_inputbox.available_length >> 1);
- wgui_redraw_input_information_bar();
- }
- #endif /* defined(__MMI_SMART_MESSAGE_MT__) */
- b->validation_callback(b->text, b->cursor_p, (b->text_length >> 1) - 1);
- b->change_callback();
- UI_UNUSED_PARAMETER(dummy_c);
- return MMI_TRUE;
- }
- void gui_multi_line_input_box_insert_character(multi_line_input_box *b, UI_character_type c)
- {
- gui_multi_line_input_box_insert_character_internal(b,c);
- }
- /*****************************************************************************
- * FUNCTION
- * gui_multi_line_input_box_insert_newline
- * DESCRIPTION
- *
- * PARAMETERS
- * b [?]
- * RETURNS
- * void
- *****************************************************************************/
- void gui_multi_line_input_box_insert_newline(multi_line_input_box *b)
- {
- if(gui_multi_line_input_box_insert_character_internal(b,(UI_character_type)0x0D))
- if(!gui_multi_line_input_box_insert_character_internal(b,(UI_character_type)0x0A))
- gui_multi_line_input_box_delete_character(b);
- }
- /*****************************************************************************
- * FUNCTION
- * gui_multi_line_current_character
- * DESCRIPTION
- *
- * PARAMETERS
- * b [?]
- * RETURNS
- *
- *****************************************************************************/
- UI_character_type gui_multi_line_current_character(multi_line_input_box *b)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- UI_buffer_type cursor_p = b->cursor_p;
- UI_character_type current_character;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- if (b->cursor_p == b->text)
- {
- return 0;
- }
- else
- {
- UI_STRING_GET_PREVIOUS_CHARACTER(cursor_p, current_character);
- return current_character;
- }
- }
- /*****************************************************************************
- * FUNCTION
- * gui_EMS_current_character
- * DESCRIPTION
- *
- * PARAMETERS
- * b [?]
- * RETURNS
- *
- *****************************************************************************/
- UI_character_type gui_EMS_current_character(UI_EMS_input_box *b)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- UI_character_type current_character = 0;
- #ifdef __MMI_HINDI_ALG__
- U8 object_type_check;
- EMSObject *o;
- EMSPosition p = b->data->CurrentPosition;
- EMSData *data = b->data;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- object_type_check = gui_EMS_input_box_get_previous_object(data, &p, ¤t_character, &o);
- if (object_type_check == 2)
- {
- return 0;
- }
- #endif /* __MMI_HINDI_ALG__ */
- if (b->data->CurrentPosition.OffsetToText == 0)
- {
- return 0;
- }
- else
- {
- current_character = *((UI_character_type*) (b->data->textBuffer + b->data->CurrentPosition.OffsetToText - 2));
- return current_character;
- }
- }
- /*****************************************************************************
- * FUNCTION
- * gui_single_line_current_character
- * DESCRIPTION
- *
- * PARAMETERS
- * b [?]
- * RETURNS
- *
- *****************************************************************************/
- UI_character_type gui_single_line_current_character(single_line_input_box *b)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- UI_buffer_type current_text_p = b->current_text_p;
- UI_character_type current_character = 0;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- if (b->current_text_p == 0)
- {
- return 0;
- }
- else
- {
- UI_STRING_GET_PREVIOUS_CHARACTER(current_text_p, current_character);
- return current_character;
- }
- }
- /*****************************************************************************
- * FUNCTION
- * gui_multi_line_input_box_insert_multitap_character
- * DESCRIPTION
- * Inserts a multitap character at the current cursor position
- *
- * This function is normally used as the input_callback
- * function with multitap input objects
- * PARAMETERS
- * b [IN] Is the multi-line inputbox object
- * c [IN] Is the character to be inserted
- * RETURNS
- * void
- *****************************************************************************/
- void gui_multi_line_input_box_insert_multitap_character(multi_line_input_box *b, UI_character_type c)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- UI_buffer_type p1, p2;
- #ifdef __MMI_HINDI_ALG__
- UI_buffer_type middle_pointer, first_cons_ptr, second_cons_ptr;
- static U8 cursor_pos_flag = 0;
- #endif /* __MMI_HINDI_ALG__ */
- UI_character_type old_c, dummy_c = 0;
- U32 b_flags = b->flags;
- S32 text_length = b->text_length;
- /* MTK Terry for 0x81 support for Phone Book */
- U8 temp_0x81 = 0;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- // check can be changed or not
- if(b->change_event_handler)
- {
- UI_buffer_type tmp_p = b->cursor_p;
- if (b_flags & UI_MULTI_LINE_INPUT_BOX_STATE_MULTITAP)
- {
- UI_STRING_GET_PREVIOUS_CHARACTER(tmp_p, dummy_c);
- if(!b->change_event_handler(GUI_MULTI_LINE_INPUT_BOX_DELETE_CHAR,dummy_c))
- return;
- }
- if(!b->change_event_handler(GUI_MULTI_LINE_INPUT_BOX_INSERT_CHAR,c))
- return;
- }
- p1 = p2 = b->cursor_p;
- if ((MMI_current_input_ext_type & INPUT_TYPE_EXT_USE_0x81_ENCODING)
- /* &&(b_flags & UI_MULTI_LINE_INPUT_BOX_STATE_MULTITAP) */ )
- {
- if (b_flags & UI_MULTI_LINE_INPUT_BOX_STATE_MULTITAP)
- {
- UI_STRING_GET_NEXT_CHARACTER(p1, old_c); /* get next character */
- UI_STRING_GET_PREVIOUS_CHARACTER(p2, dummy_c);
- UI_STRING_INSERT_CHARACTER(p2, c);
- temp_0x81 = mmi_phb_convert_to_0x81((S8*) b->text, FALSE);
- UI_STRING_GET_PREVIOUS_CHARACTER(p2, old_c);
- UI_STRING_INSERT_CHARACTER(p2, dummy_c);
- }
- else
- {
- temp_0x81 = mmi_phb_convert_to_0x81((S8*) b->text, FALSE);
- }
- }
- if ((MMI_current_input_ext_type & INPUT_TYPE_EXT_USE_0x81_ENCODING) && (0 != temp_0x81))
- {
- if ((text_length >> 1) >= (b->allocated_length >> 1) - 3)
- {
- if ((b_flags & UI_MULTI_LINE_INPUT_BOX_STATE_MULTITAP) &&
- ((text_length >> 1) == (b->allocated_length >> 1) - 3))
- {
- }
- else
- {
- UI_editor_play_tone_cannot_insert(); /* play error tone */
- return;
- }
- }
- }
- else
- {
- if (b_flags & UI_MULTI_LINE_INPUT_BOX_CHECK_GSM_EXTENDED)
- {
- /* No support for inserting GSM extended characters through multitap */
- if (UI_TEST_GSM_EXTENDED(c))
- {
- UI_editor_play_tone_cannot_insert(); /* play error tone */
- return;
- }
- if (b->UCS2_count == 0)
- {
- text_length += (b->GSM_ext_count * ENCODING_LENGTH);
- }
- }
- if ((b_flags & UI_MULTI_LINE_INPUT_BOX_USE_ENCODING_BASED_LENGTH) && (b->UCS2_count == 0) &&
- UI_TEST_UCS2_CHARACTER(c))
- {
- if ((((b->flags & UI_MULTI_LINE_INPUT_BOX_SMS_MAX_LENGTH_HANDLING) &&
- ((((b->text_length - 2) - ENCODING_LENGTH) >> 1) >= MAX_MSG_SIZE_UCS2)) ||
- ((b->flags & UI_MULTI_LINE_INPUT_BOX_ONE_LESS_CHARACTER) &&
- ((b->text_length - 2) >= ((b->available_length >> 1) - 1))) ||
- ((b->text_length - 2) >= (b->available_length >> 1))))
- {
- if ((b_flags & UI_MULTI_LINE_INPUT_BOX_ONE_LESS_CHARACTER) &&
- (text_length >= UI_UCS2_STRING_HALF_LENGTH_MINUS_ONE(b->available_length)))
- {
- UI_editor_play_tone_cannot_insert(); /* play error tone */
- return;
- }
- else if ((b_flags & UI_MULTI_LINE_INPUT_BOX_FORTY_FOUR_LESS_CHARACTER) &&
- (text_length >= UI_UCS2_STRING_HALF_LENGTH_MINUS_FORTYFOUR(b->available_length)))
- {
- UI_editor_play_tone_cannot_insert(); /* play error tone */
- return;
- }
- else if (text_length >= UI_UCS2_STRING_HALF_LENGTH(b->available_length))
- {
- UI_editor_play_tone_cannot_insert();
- return;
- }
- }
- }
- /* MTK Terry for 0x81 encoding */
- if (text_length > b->available_length)
- {
- UI_editor_play_tone_cannot_insert();
- return;
- }
- }
- if (b_flags & UI_MULTI_LINE_INPUT_BOX_STATE_MULTITAP)
- {
- UI_STRING_GET_PREVIOUS_CHARACTER(b->cursor_p, dummy_c); /* get previous character */
- #ifdef __MMI_HINDI_ALG__
- if (cursor_pos_flag && ((c == 49) || (c == 0x901) || (c == 0x902))) /* Only when multitap input is 1 */
- {
- UI_STRING_GET_PREVIOUS_CHARACTER(save_cursor_p, dummy_c);
- b->cursor_p = save_cursor_p;
- cursor_pos_flag = 0;
- }
- cursor_pos_flag = 0;
- #endif /* __MMI_HINDI_ALG__ */
- p1 = p2 = b->cursor_p;
- #ifdef __MMI_HINDI_ALG__
- middle_pointer = p1;
- first_cons_ptr = p1 - 2;
- #endif /* __MMI_HINDI_ALG__ */
- UI_STRING_GET_NEXT_CHARACTER(p1, old_c); /* get next character */
- if (!UI_STRING_END_OF_STRING_CHARACTER(old_c))
- {
- UI_STRING_INSERT_CHARACTER(p2, c);
- if (b_flags & UI_MULTI_LINE_INPUT_BOX_USE_ENCODING_BASED_LENGTH)
- {
- if (b_flags & UI_MULTI_LINE_INPUT_BOX_ONE_LESS_CHARACTER)
- {
- UI_TEST_UCS2_CHANGE_COUNT_SET_LENGTH_TYPE2(
- old_c,
- c,
- b->UCS2_count,
- b->allocated_length,
- b->available_length);
- }
- else if (b_flags & UI_MULTI_LINE_INPUT_BOX_FORTY_FOUR_LESS_CHARACTER)
- {
- UI_TEST_UCS2_CHANGE_COUNT_SET_LENGTH_TYPE3(
- old_c,
- c,
- b->UCS2_count,
- b->allocated_length,
- b->available_length);
- }
- else
- {
- UI_TEST_UCS2_CHANGE_COUNT_SET_LENGTH(
- old_c,
- c,
- b->UCS2_count,
- b->allocated_length,
- b->available_length);
- }
- }
- b->cursor_p = p2;
- #ifdef __MMI_HINDI_ALG__
- second_cons_ptr = b->cursor_p;
- if ((UI_CHK_CONSONANT(*first_cons_ptr)) && (UI_CHK_CONSONANT(*second_cons_ptr)) && (*middle_pointer == 0x4d)) /* tarun4 */
- {
- U8 skip_moves = 0;
- PU8 first_ptr = second_cons_ptr;
- PU8 second_ptr;
- save_cursor_p = b->cursor_p;
- second_ptr = hf_get_next_cluster_p(first_ptr, first_ptr);
- skip_moves = second_ptr - first_ptr; /* Number of moves */
- skip_moves = skip_moves >> 1;
- while (skip_moves--)
- {
- UI_STRING_GET_NEXT_CHARACTER(b->cursor_p, dummy_c);
- }
- cursor_pos_flag = 1;
- }
- #endif /* __MMI_HINDI_ALG__ */
- }
- else /* UI_STRING_END_OF_STRING_CHARACTER(old_c) */
- {
- p1 = b->cursor_p;
- UI_STRING_GET_NEXT_CHARACTER(b->cursor_p, dummy_c); /* get next character */
- while (!UI_STRING_END_OF_STRING_CHARACTER(c))
- {
- UI_STRING_GET_NEXT_CHARACTER(p1, old_c);
- UI_STRING_INSERT_CHARACTER(p2, c);
- c = old_c;
- }
- UI_STRING_INSERT_CHARACTER(p2, c);
- if (b_flags & UI_MULTI_LINE_INPUT_BOX_USE_ENCODING_BASED_LENGTH)
- {
- UI_TEST_UCS2_CHANGE_COUNT_SET_LENGTH(old_c, c, b->UCS2_count, b->allocated_length, b->available_length);
- }
- b->text_length += ((S32) p2 - (S32) p1);
- }
- }
- else /* b_flags & UI_MULTI_LINE_INPUT_BOX_STATE_MULTITAP */
- {
- #ifdef __MMI_HINDI_ALG__
- cursor_pos_flag = 0;
- #endif
- p1 = p2 = b->cursor_p;
- if (b_flags & UI_MULTI_LINE_INPUT_BOX_OVERWRITE_MODE)
- {
- UI_STRING_GET_NEXT_CHARACTER(p1, old_c);
- if ((p1 == b->last_position_p) && (text_length >= b->available_length))
- {
- UI_editor_play_tone_cannot_insert();
- return;
- }
- if (!UI_STRING_END_OF_STRING_CHARACTER(old_c))
- {
- UI_STRING_INSERT_CHARACTER(p2, c);
- if (b_flags & UI_MULTI_LINE_INPUT_BOX_USE_ENCODING_BASED_LENGTH)
- {
- if (b_flags & UI_MULTI_LINE_INPUT_BOX_ONE_LESS_CHARACTER)
- {
- UI_TEST_UCS2_CHANGE_COUNT_SET_LENGTH_TYPE2(
- old_c,
- c,
- b->UCS2_count,
- b->allocated_length,
- b->available_length);
- }
- else if (b_flags & UI_MULTI_LINE_INPUT_BOX_FORTY_FOUR_LESS_CHARACTER)
- {
- UI_TEST_UCS2_CHANGE_COUNT_SET_LENGTH_TYPE3(
- old_c,
- c,
- b->UCS2_count,
- b->allocated_length,
- b->available_length);
- }
- else
- {
- UI_TEST_UCS2_CHANGE_COUNT_SET_LENGTH(
- old_c,
- c,
- b->UCS2_count,
- b->allocated_length,
- b->available_length);
- }
- }
- b->cursor_p = p2;
- }
- else /* !UI_STRING_END_OF_STRING_CHARACTER(old_c) */
- {
- p1 = b->cursor_p;
- UI_STRING_GET_NEXT_CHARACTER(b->cursor_p, dummy_c);
- while (!UI_STRING_END_OF_STRING_CHARACTER(c))
- {
- UI_STRING_GET_NEXT_CHARACTER(p1, old_c);
- UI_STRING_INSERT_CHARACTER(p2, c);
- c = old_c;
- }
- UI_STRING_INSERT_CHARACTER(p2, c);
- if (b_flags & UI_MULTI_LINE_INPUT_BOX_USE_ENCODING_BASED_LENGTH)
- {
- if (b_flags & UI_MULTI_LINE_INPUT_BOX_ONE_LESS_CHARACTER)
- {
- UI_TEST_UCS2_CHANGE_COUNT_SET_LENGTH_TYPE2(
- old_c,
- c,
- b->UCS2_count,
- b->allocated_length,
- b->available_length);
- }
- else if (b_flags & UI_MULTI_LINE_INPUT_BOX_FORTY_FOUR_LESS_CHARACTER)
- {
- UI_TEST_UCS2_CHANGE_COUNT_SET_LENGTH_TYPE3(
- old_c,
- c,
- b->UCS2_count,
- b->allocated_length,
- b->available_length);
- }
- else
- {
- UI_TEST_UCS2_CHANGE_COUNT_SET_LENGTH(
- old_c,
- c,
- b->UCS2_count,
- b->allocated_length,
- b->available_length);
- }
- }
- b->text_length += ((S32) p2 - (S32) p1);
- }
- }
- else /* b_flags & UI_MULTI_LINE_INPUT_BOX_OVERWRITE_MODE */
- {
- if (text_length >= b->available_length && (0 == temp_0x81))
- {
- UI_editor_play_tone_cannot_insert();
- return;
- }
- UI_STRING_GET_NEXT_CHARACTER(b->cursor_p, dummy_c);
- if (b_flags & UI_MULTI_LINE_INPUT_BOX_USE_ENCODING_BASED_LENGTH)
- {
- if (b_flags & UI_MULTI_LINE_INPUT_BOX_ONE_LESS_CHARACTER)
- {
- UI_TEST_UCS2_INCREMENT_COUNT_SET_LENGTH_TYPE2(
- c,
- b->UCS2_count,
- b->allocated_length,
- b->available_length);
- }
- else if (b_flags & UI_MULTI_LINE_INPUT_BOX_FORTY_FOUR_LESS_CHARACTER)
- {
- UI_TEST_UCS2_INCREMENT_COUNT_SET_LENGTH_TYPE3(
- c,
- b->UCS2_count,
- b->allocated_length,
- b->available_length);
- }
- else
- {
- UI_TEST_UCS2_INCREMENT_COUNT_SET_LENGTH(c, b->UCS2_count, b->allocated_length, b->available_length);
- }
- }
- while (!UI_STRING_END_OF_STRING_CHARACTER(c))
- {
- UI_STRING_GET_NEXT_CHARACTER(p1, old_c);
- UI_STRING_INSERT_CHARACTER(p2, c);
- c = old_c;
- }
- UI_STRING_INSERT_CHARACTER(p2, c);
- b->text_length += ((S32) p2 - (S32) p1);
- }
- b->flags |= UI_MULTI_LINE_INPUT_BOX_STATE_MULTITAP;
- }
- //hjf,force to update offset_y b->flags |= UI_MULTI_LINE_INPUT_BOX_DISABLE_DRAW;
- gui_show_multi_line_input_box(b); /* show multiline input box */
- //hjf,force to update offset_y b->flags &= ~UI_MULTI_LINE_INPUT_BOX_DISABLE_DRAW;
- #if defined(__MMI_SMART_MESSAGE_MO__) && !defined(__MMI_MESSAGES_EMS__)
- if (GetMessagesCurrScrnID() == SCR_ID_MSG_WRITE)
- {
- g_nsm_msg_context.UCS2_count = b->UCS2_count;
- MMI_multiline_inputbox.available_length = mmi_nsm2_get_remaining_len();
- wgui_inputbox_buffer_size = (MMI_multiline_inputbox.available_length >> 1);
- if (wgui_inputbox_information_flag)
- {
- wgui_redraw_input_information_bar();
- }
- g_nsm_msg_context.textlength = b->text_length;
- }
- #endif /* defined(__MMI_SMART_MESSAGE_MO__) && !defined(__MMI_MESSAGES_EMS__) */
- #if defined(__MMI_SMART_MESSAGE_MT__)
- if (GetMessagesCurrScrnID() == SCR_ID_NSM_EDITOR)
- {
- picmsg_text_struct.ucs2_count = b->UCS2_count;
- MMI_multiline_inputbox.available_length = mmi_nsm_get_infobar_maxlen();
- wgui_inputbox_buffer_size = (MMI_multiline_inputbox.available_length >> 1);
- wgui_redraw_input_information_bar();
- }
- #endif /* defined(__MMI_SMART_MESSAGE_MT__) */
- b->validation_callback(b->text, b->cursor_p, (b->text_length >> 1) - 1); /* call validation callback func */
- b->change_callback();
- UI_UNUSED_PARAMETER(dummy_c);
- }
- /*****************************************************************************
- * FUNCTION
- * gui_multi_line_input_box_confirm_multitap_character
- * DESCRIPTION
- * Completes the multitap input sequence
- *
- * This function is normally used as the input_complete_callback
- * function with multitap input objects
- * PARAMETERS
- * b [IN] Is the multi-line inputbox object
- * RETURNS
- * void
- *****************************************************************************/
- void gui_multi_line_input_box_confirm_multitap_character(multi_line_input_box *b)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- b->flags &= ~UI_MULTI_LINE_INPUT_BOX_STATE_MULTITAP;
- }
- /* PMT dara added for Multitap thai */
- #ifdef __MMI_MULTITAP_THAI__
- /*****************************************************************************
- * FUNCTION
- * gui_multi_line_input_box_get_previous_character
- * DESCRIPTION
- * get the previous character
- * PARAMETERS
- * b [IN] Is the multi-line inputbox object
- * c [?]
- * RETURNS
- * void
- *****************************************************************************/
- U8 gui_multi_line_input_box_get_previous_character(multi_line_input_box *b, UI_character_type *c)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- if (b->text == NULL)
- {
- return 0;
- }
- if (b->cursor_p == b->text)
- {
- return 0;
- }
- /* c = (data->textBuffer[current_position->OffsetToText-1]|(data->textBuffer[current_position->OffsetToText-2]<<8)); */
- *c = (*(b->cursor_p - 2)) | (*(b->cursor_p - 1)) << 8;
- return 1;
- }
- #endif /* __MMI_MULTITAP_THAI__ */
- /* msz065_20050420 Peng Hua add for multitap thai input method end */
- /*****************************************************************************
- * FUNCTION
- * gui_multi_line_input_box_previous
- * DESCRIPTION
- * Moves the cursor to the previous character
- * PARAMETERS
- * b [IN] Is the multi-line inputbox object
- * RETURNS
- * void
- *****************************************************************************/
- void gui_multi_line_input_box_previous(multi_line_input_box *b)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- UI_character_type dummy_c = 0;
- UI_buffer_type save_text_p = b->cursor_p;
- #if defined(__MMI_LANG_VIETNAMESE__)
- UI_character_type previous_unicode = 0;
- viet_tone_mark tone_mark = VIET_TONE_NONE;
- viet_vowel_letter viet_vowel = VIET_VOWEL_NONE;
- #endif /* defined(__MMI_LANG_VIETNAMESE__) */
- /* MTK Steven 20050505 */
- #if defined(__MMI_LANG_THAI__)
- UI_character_type pre_one_char = 0;
- UI_character_type pre_two_char = 0;
- UI_character_type pre_three_char = 0;
- #endif /* defined(__MMI_LANG_THAI__) */
- /* MTK End */
- #ifdef __MMI_HINDI_ALG__
- /* Added for knowing the current character is hindi or not */
- UI_buffer_type check_text_p = b->cursor_p;
- #endif /* __MMI_HINDI_ALG__ */
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- if (b->text == NULL)
- {
- UI_editor_play_tone_cannot_navigate();
- return;
- }
- if (b->cursor_p == b->text)
- {
- UI_editor_play_tone_cannot_navigate();
- return;
- }
- #ifdef __MMI_HINDI_ALG__
- UI_STRING_GET_PREVIOUS_CHARACTER(check_text_p, dummy_c); /* get previous character */
- /* If Hindi Character */
- if (UI_HINDI_CHARACTER_UCS2_RANGE(dummy_c))
- {
- /* Move by a syllable rather than by a character as in English */
- b->cursor_p = hf_get_prev_cluster_p(b->text, b->cursor_p);
- }
- else
- #endif /* __MMI_HINDI_ALG__ */
- {
- UI_STRING_GET_PREVIOUS_CHARACTER(b->cursor_p, dummy_c); /* get previous character */
- }
- #if defined(__MMI_LANG_VIETNAMESE__)
- if ((dummy_c >= 0x0300) && (dummy_c <= 0x0323))
- {
- UI_STRING_GET_PREVIOUS_CHARACTER(b->cursor_p, previous_unicode); /* get next character */
- viet_vowel = mmi_viet_vowel_letter(previous_unicode);
- if (VIET_VOWEL_NONE != viet_vowel)
- {
- tone_mark = mmi_viet_tone_mark(dummy_c);
- if (VIET_TONE_NONE != tone_mark)
- {
- dummy_c = mmi_viet_combine_vowel_tone(viet_vowel, tone_mark);
- }
- else
- {
- UI_STRING_GET_NEXT_CHARACTER(b->cursor_p, previous_unicode);
- }
- }
- else
- {
- UI_STRING_GET_NEXT_CHARACTER(b->cursor_p, previous_unicode);
- }
- }
- #endif /* defined(__MMI_LANG_VIETNAMESE__) */
- /* MTK Steven 20050505 */
- #if defined(__MMI_LANG_THAI__)
- if (isThaiChar(dummy_c))
- {
- UI_STRING_GET_PREVIOUS_CHARACTER(b->cursor_p, pre_one_char);
- if (isThaiChar(pre_one_char))
- {
- if (!RequireToMoveCursor(pre_one_char, dummy_c))
- {
- if (b->cursor_p != b->text)
- {
- UI_STRING_GET_PREVIOUS_CHARACTER(b->cursor_p, pre_two_char);
- if (isThaiChar(pre_two_char))
- {
- if (!RequireToMoveCursor(pre_two_char, pre_one_char))
- {
- if (b->cursor_p != b->text)
- {
- UI_STRING_GET_PREVIOUS_CHARACTER(b->cursor_p, pre_three_char);
- if (isThaiChar(pre_three_char))
- {
- if (RequireToMoveCursor(pre_three_char, pre_two_char))
- {
- UI_STRING_GET_NEXT_CHARACTER(b->cursor_p, dummy_c);
- }
- }
- else
- {
- UI_STRING_GET_NEXT_CHARACTER(b->cursor_p, dummy_c);
- }
- }
- }
- else
- {
- UI_STRING_GET_NEXT_CHARACTER(b->cursor_p, dummy_c);
- }
- }
- else
- {
- UI_STRING_GET_NEXT_CHARACTER(b->cursor_p, dummy_c);
- }
- }
- }
- else
- {
- UI_STRING_GET_NEXT_CHARACTER(b->cursor_p, dummy_c);
- }
- }
- else
- {
- UI_STRING_GET_NEXT_CHARACTER(b->cursor_p, dummy_c);
- }
- }
- #endif /* defined(__MMI_LANG_THAI__) */
- /* MTK End */
- #if defined(__MMI_LANG_ARABIC__) || defined(__MMI_LANG_PERSIAN__)
- if (IS_ARABIC_CHARACTER(dummy_c))
- {
- U16 idx;
- idx = (b->cursor_p - b->text + 2) / 2 - 1;
- while (idx > 0)
- {
- if (OrgToSha[idx] == OrgToSha[idx - 1])
- {
- UI_STRING_GET_PREVIOUS_CHARACTER(b->cursor_p, dummy_c);
- }
- else
- {
- break;
- }
- idx--;
- }
- }
- #endif /* defined(__MMI_LANG_ARABIC__) || defined(__MMI_LANG_PERSIAN__) */
- if (b->icon_callback)
- {
- /* previous_text_p is the first character to be deleted */
- S32 cnt;
- UI_character_type tmp_c;
- UI_STRING_GET_PREVIOUS_CHARACTER(save_text_p, tmp_c);
- for (cnt = 1; cnt <= MMI_MULTILINE_ICON_MAX_STRING_LEN; cnt++)
- {
- if (save_text_p < b->text)
- {
- break;
- }
- if (cnt == b->icon_callback(save_text_p, MMI_FALSE, NULL, NULL, 0, 0))
- {
- /* Delete an icon as character sequence */
- b->cursor_p = save_text_p;
- dummy_c = tmp_c;
- break;
- }
- UI_STRING_GET_PREVIOUS_CHARACTER(save_text_p, tmp_c);
- }
- }
- #if(MULTILINE_INPUTBOX_USE_CRLF_COMBINATION)
- else if (UI_TEST_LF_CHARACTER(dummy_c) && (b->cursor_p != b->text))
- {
- UI_STRING_GET_PREVIOUS_CHARACTER(b->cursor_p, dummy_c);
- if (!UI_TEST_CR_CHARACTER(dummy_c))
- {
- UI_STRING_GET_NEXT_CHARACTER(b->cursor_p, dummy_c);
- }
- }
- #endif /* (MULTILINE_INPUTBOX_USE_CRLF_COMBINATION) */
- if (b->show_action_flag)
- {
- b->flags |= UI_MULTI_LINE_INPUT_BOX_DISABLE_DRAW;
- gui_show_multi_line_input_box(b); /* show multiline input box */
- b->flags &= ~UI_MULTI_LINE_INPUT_BOX_DISABLE_DRAW;
- }
- }
- /*****************************************************************************
- * FUNCTION
- * gui_multi_line_input_box_next
- * DESCRIPTION
- * Moves the cursor to the next character
- * PARAMETERS
- * b [IN] Is the multi-line inputbox object
- * RETURNS
- * void
- *****************************************************************************/
- void gui_multi_line_input_box_next(multi_line_input_box *b)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- UI_buffer_type cursor_p = b->cursor_p;
- UI_character_type current_character;
- #if defined(__MMI_LANG_VIETNAMESE__)
- UI_character_type next_unicode = 0;
- viet_tone_mark tone_mark = VIET_TONE_NONE;
- viet_vowel_letter viet_vowel = VIET_VOWEL_NONE;
- #endif /* defined(__MMI_LANG_VIETNAMESE__) */
- /* MTK Steven 20050505 */
- #if defined(__MMI_LANG_THAI__)
- UI_character_type next_one_char = 0;
- UI_character_type next_two_char = 0;
- UI_character_type next_three_char = 0;
- #endif /* defined(__MMI_LANG_THAI__) */
- /* MTK End */
- #ifdef __MMI_HINDI_ALG__
- /* Added for knowing the current character is hindi or not */
- UI_buffer_type check_text_p = b->cursor_p;
- #endif /* __MMI_HINDI_ALG__ */
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- if (b->text == NULL)
- {
- UI_editor_play_tone_cannot_navigate();
- return;
- }
- #ifdef __MMI_HINDI_ALG__
- UI_STRING_GET_NEXT_CHARACTER(check_text_p, current_character); /* get previous character */
- /* If Hindi Character */
- if (UI_HINDI_CHARACTER_UCS2_RANGE(current_character))
- {
- /* Move by a syllable rather than by a character as in English */
- cursor_p = (U8*) hf_get_next_cluster_p(b->cursor_p, b->cursor_p);
- }
- else
- #endif /* __MMI_HINDI_ALG__ */
- {
- UI_STRING_GET_NEXT_CHARACTER(cursor_p, current_character); /* get next character */
- }
- #if defined(__MMI_LANG_VIETNAMESE__)
- if ((current_character > 0x0040) && (current_character < 0x01B1))
- {
- UI_STRING_GET_NEXT_CHARACTER(cursor_p, next_unicode); /* get next character */
- tone_mark = mmi_viet_tone_mark(next_unicode);
- if (VIET_TONE_NONE != tone_mark)
- {
- viet_vowel = mmi_viet_vowel_letter(current_character);
- if (VIET_VOWEL_NONE != viet_vowel)
- {
- current_character = mmi_viet_combine_vowel_tone(viet_vowel, tone_mark);
- }
- else
- {
- UI_STRING_GET_PREVIOUS_CHARACTER(cursor_p, next_unicode);
- }
- }
- else
- {
- UI_STRING_GET_PREVIOUS_CHARACTER(cursor_p, next_unicode);
- }
- }
- #endif /* defined(__MMI_LANG_VIETNAMESE__) */
- /* MTK Steven 20050505 */
- #if defined(__MMI_LANG_THAI__)
- if (isThaiChar(current_character) && *cursor_p != ' ')
- {
- UI_STRING_GET_NEXT_CHARACTER(cursor_p, next_one_char);
- if (isThaiChar(next_one_char))
- {
- if (!RequireToMoveCursor(current_character, next_one_char))
- {
- if (*cursor_p == ' ')
- {
- current_character = next_one_char;
- }
- else
- {
- UI_STRING_GET_NEXT_CHARACTER(cursor_p, next_two_char);
- if (isThaiChar(next_two_char))
- {
- if (!RequireToMoveCursor(next_one_char, next_two_char))
- {
- if (*cursor_p == ' ')
- {
- current_character = next_two_char;
- }
- else
- {
- UI_STRING_GET_NEXT_CHARACTER(cursor_p, next_three_char);
- if (isThaiChar(next_three_char))
- {
- if (!RequireToMoveCursor(next_two_char, next_three_char))
- {
- current_character = next_three_char;
- }
- else
- {
- UI_STRING_GET_PREVIOUS_CHARACTER(cursor_p, current_character);
- }
- }
- else
- {
- UI_STRING_GET_PREVIOUS_CHARACTER(cursor_p, current_character);
- }
- }
- }
- else
- {
- UI_STRING_GET_PREVIOUS_CHARACTER(cursor_p, current_character);
- }
- }
- else
- {
- UI_STRING_GET_PREVIOUS_CHARACTER(cursor_p, current_character);
- }
- }
- }
- else
- {
- UI_STRING_GET_PREVIOUS_CHARACTER(cursor_p, current_character);
- }
- }
- else
- {
- UI_STRING_GET_PREVIOUS_CHARACTER(cursor_p, current_character);
- }
- }
- #endif /* defined(__MMI_LANG_THAI__) */
- /* MTK End */
- #if defined(__MMI_LANG_ARABIC__) || defined(__MMI_LANG_PERSIAN__)
- if (IS_ARABIC_CHARACTER(current_character))
- {
- U16 idx;
- idx = (cursor_p - b->text) / 2 - 1;
- while (idx < unshaped_text_len)
- {
- if (OrgToSha[idx] == OrgToSha[idx + 1])
- {
- UI_STRING_GET_NEXT_CHARACTER(cursor_p, current_character);
- }
- else
- {
- break;
- }
- idx++;
- }
- }
- #endif /* defined(__MMI_LANG_ARABIC__) || defined(__MMI_LANG_PERSIAN__) */
- if (UI_STRING_END_OF_STRING_CHARACTER(current_character))
- {
- UI_editor_play_tone_cannot_navigate();
- return;
- }
- if (b->icon_callback)
- {
- S32 cnt;
- if ((cnt = b->icon_callback(b->cursor_p, MMI_FALSE, NULL, NULL, 0, 0)) > 0)
- {
- cursor_p = b->cursor_p + ((cnt - 1) << 1);
- UI_STRING_GET_NEXT_CHARACTER(cursor_p, current_character);
- }
- }
- #if(MULTILINE_INPUTBOX_USE_CRLF_COMBINATION)
- else if (UI_TEST_CR_CHARACTER(current_character))
- {
- UI_STRING_GET_NEXT_CHARACTER(cursor_p, current_character);
- if (!UI_TEST_LF_CHARACTER(current_character))
- {
- UI_STRING_GET_PREVIOUS_CHARACTER(cursor_p, current_character);
- }
- }
- #endif /* (MULTILINE_INPUTBOX_USE_CRLF_COMBINATION) */
- b->cursor_p = cursor_p;
- if (b->show_action_flag)
- {
- b->flags |= UI_MULTI_LINE_INPUT_BOX_DISABLE_DRAW;
- gui_show_multi_line_input_box(b); /* show multiline input box */
- b->flags &= ~UI_MULTI_LINE_INPUT_BOX_DISABLE_DRAW;
- }
- }
- #if(MULTILINE_INPUTBOX_USE_CRLF_COMBINATION)
- /*****************************************************************************
- * FUNCTION
- * gui_multi_line_input_box_handle_CRLF_navigation
- * DESCRIPTION
- *
- * PARAMETERS
- * b [?]
- * RETURNS
- * void
- *****************************************************************************/
- void gui_multi_line_input_box_handle_CRLF_navigation(multi_line_input_box *b)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- UI_buffer_type cursor_p = b->cursor_p;
- UI_character_type current_character;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- UI_STRING_GET_NEXT_CHARACTER(cursor_p, current_character);
- if (UI_TEST_LF_CHARACTER(current_character))
- {
- UI_STRING_GET_PREVIOUS_CHARACTER(cursor_p, current_character);
- UI_STRING_GET_PREVIOUS_CHARACTER(cursor_p, current_character);
- if (UI_TEST_CR_CHARACTER(current_character))
- {
- UI_STRING_GET_PREVIOUS_CHARACTER(b->cursor_p, current_character);
- }
- }
- }
- #endif /* (MULTILINE_INPUTBOX_USE_CRLF_COMBINATION) */
- /* Used for move to next and previous line */
- /*****************************************************************************
- * FUNCTION
- * gui_multi_line_input_box_handle_icon_navigation
- * DESCRIPTION
- *
- * PARAMETERS
- * b [?]
- * RETURNS
- * void
- *****************************************************************************/
- void gui_multi_line_input_box_handle_icon_navigation(multi_line_input_box *b)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- UI_buffer_type cursor_p = b->cursor_p;
- UI_character_type dummy_c;
- S32 cnt;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- if (!b->icon_callback)
- {
- return;
- }
- UI_STRING_GET_PREVIOUS_CHARACTER(cursor_p, dummy_c);
- for (cnt = 2; cnt <= MMI_MULTILINE_ICON_MAX_STRING_LEN; cnt++)
- {
- /* Inside character sequence */
- if (b->icon_callback(cursor_p, MMI_FALSE, NULL, NULL, 0, 0) >= cnt)
- {
- b->cursor_p = cursor_p;
- break;
- }
- }
- }
- /*****************************************************************************
- * FUNCTION
- * gui_multi_line_input_box_previous_line
- * DESCRIPTION
- * Moves the cursor to the previous line
- * PARAMETERS
- * b [IN] Is the multi-line inputbox object
- * RETURNS
- * void
- *****************************************************************************/
- void gui_multi_line_input_box_previous_line(multi_line_input_box *b)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- S32 i, fh;
- UI_buffer_type p;
- UI_character_type dummy_c = 0;
- S32 line_width = 0, width = 0, height = 0;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- /* MTK Terry For Font Type when Key Down or UP */
- gui_set_font(b->text_font);
- if (b->flags & UI_MULTI_LINE_INPUT_BOX_VIEW_MODE)
- {
- if (b->text_offset_y < 0)
- {
- /* Note that scrolling offset might be exactly one line if UI_MULTI_LINE_INPUT_BOX_RICHTEXT is set. */
- fh = gui_get_character_height() + 1; /* +1 added for 1 pixel gap between lines */
- b->text_offset_y += fh;
- if (b->text_offset_y > 0)
- {
- b->text_offset_y = 0;
- }
- }
- else if (b->flags & UI_MULTI_LINE_INPUT_BOX_INSIDE_INLINE_MENU) /* Pixtel - 2/16/04 - Gurinder - Move to the previos item on up key in case on inline box. */
- {
- //Gurinder - 20/4/2004 - Use Inline Navigation Function Instead Of Noraml Text Menu
- //gui_fixed_list_menu_goto_previous_item(&MMI_fixed_list_menu);
- //show_fixed_list();
- //inline_fixed_list_goto_previous_item();
- hilited_item_changed = 1;
- }
- }
- else
- {
- if (b->line_before_cursor_line_p == b->cursor_line_p)
- {
- #if defined(__MMI_INSCREEN_MULTILINE_TEXTBOX__)
- if (MMI_multi_line_inputbox_present)
- {
- //handle_inline_full_screen_edit_close();
- //Gurinder - 20/4/2004 - Use Inline Navigation Function Instead Of Noraml Text Menu
- //gui_fixed_list_menu_goto_previous_item(&MMI_fixed_list_menu);
- //show_fixed_list();
- //inline_fixed_list_goto_previous_item();
- hilited_item_changed = 1;
- }
- else
- #endif /* defined(__MMI_INSCREEN_MULTILINE_TEXTBOX__) */
- if (b->header_height > 0 && b->text_offset_y < 0)
- {
- b->text_offset_y += 20;
- if (b->text_offset_y > 0)
- {
- b->text_offset_y = 0;
- }
- b->flags |= UI_MULTI_LINE_INPUT_BOX_DISABLE_DRAW;
- b->ext_flags |= GUI_MULTI_LINE_INPUT_BOX_DISABLE_FORCE_CURSOR_APPEAR;
- gui_show_multi_line_input_box(b); /* show multiline input box */
- b->flags &= ~UI_MULTI_LINE_INPUT_BOX_DISABLE_DRAW;
- b->ext_flags &= ~GUI_MULTI_LINE_INPUT_BOX_DISABLE_FORCE_CURSOR_APPEAR;
- StopMyTimer(BLINKING_CURSOR);
- }
- else
- {
- UI_editor_play_tone_cannot_navigate(); /* play error tone */
- }
- return;
- }
- /* MTK Terry for Move Up by Width */
- UI_STRING_GET_NEXT_CHARACTER(b->cursor_p, dummy_c);
- gui_measure_character(dummy_c, &width, &height);
- if (UI_TEST_CR_CHARACTER(dummy_c))
- {
- width = 0;
- }
- else if (UI_TEST_LF_CHARACTER(dummy_c))
- {
- width = 0;
- }
- else if (UI_STRING_END_OF_STRING_CHARACTER(dummy_c))
- {
- width = 0;
- }
- b->cursor_x -= (width);
- p = b->cursor_p = b->line_before_cursor_line_p;
- for (i = 0; line_width <= b->cursor_x + (width >> 1); i++)
- {
- if (p == b->cursor_line_p)
- {
- break;
- }
- else
- {
- b->cursor_p = p;
- }
- UI_STRING_GET_NEXT_CHARACTER(p, dummy_c);
- #if defined(__MMI_LANG_VIETNAMESE__)
- /* MTK Terry for Cursor Move Up and Down Issue */
- if ((dummy_c > 0x0040) && (dummy_c < 0x01B1))
- {
- UI_character_type next_unicode = 0;
- viet_tone_mark tone_mark = VIET_TONE_NONE;
- viet_vowel_letter viet_vowel = VIET_VOWEL_NONE;
- UI_STRING_GET_NEXT_CHARACTER(p, next_unicode); /* get next character */
- tone_mark = mmi_viet_tone_mark(next_unicode);
- if (VIET_TONE_NONE != tone_mark)
- {
- viet_vowel = mmi_viet_vowel_letter(dummy_c);
- if (VIET_VOWEL_NONE != viet_vowel)
- {
- dummy_c = mmi_viet_combine_vowel_tone(viet_vowel, tone_mark);
- }
- else
- {
- UI_STRING_GET_PREVIOUS_CHARACTER(p, next_unicode);
- }
- }
- else
- {
- UI_STRING_GET_PREVIOUS_CHARACTER(p, next_unicode);
- }
- }
- #endif /* defined(__MMI_LANG_VIETNAMESE__) */
- gui_measure_character(dummy_c, &width, &height);
- line_width += (width + b->text_gap);
- }
- gui_multi_line_input_box_handle_icon_navigation(b);
- #if(MULTILINE_INPUTBOX_USE_CRLF_COMBINATION)
- gui_multi_line_input_box_handle_CRLF_navigation(b);
- #endif
- //hjf,force to update offset_y b->flags |= UI_MULTI_LINE_INPUT_BOX_DISABLE_DRAW;
- gui_show_multi_line_input_box(b); /* show multiline input box */
- //hjf,force to update offset_y b->flags &= ~UI_MULTI_LINE_INPUT_BOX_DISABLE_DRAW;
- }
- UI_UNUSED_PARAMETER(dummy_c);
- }
- /*****************************************************************************
- * FUNCTION
- * gui_multi_line_input_box_next_line
- * DESCRIPTION
- * Moves the cursor to the next line
- * PARAMETERS
- * b [IN] Is the multi-line inputbox object
- * RETURNS
- * void
- *****************************************************************************/
- void gui_multi_line_input_box_next_line(multi_line_input_box *b)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /* MTK Terry Redesign the next line operation */
- /* Some issues happened because the dh is not the same as the b->text_height and we can't get the next line height */
- /* We use b->text_height instead of dh and adjust the move distance when reaching the last line of the text */
- S32 i, fh /* ,dh */ ;
- UI_buffer_type p;
- UI_character_type dummy_c = 0;
- S32 line_width = 0, width = 0, height = 0;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- /* MTK Terry For Font Type when Key Down or UP */
- gui_set_font(b->text_font);
- if (b->flags & UI_MULTI_LINE_INPUT_BOX_VIEW_MODE)
- {
- /* Note that scrolling offset might be exactly one line if UI_MULTI_LINE_INPUT_BOX_RICHTEXT is set. */
- fh = gui_get_character_height() + 1; /* +1 added for 1 pixel gap between lines */
- if (fh <= 0)
- {
- fh = 1;
- }
- /* Leo add: enlarge the hidden area to show all strings when strings with different languages */
- //dh=(b->edit_height/fh); /*MTK Terry roll back for stop watch title display need to discuss with Leo*/
- //dh=(b->edit_height/fh)-1;
- //dh*=fh;
- //START TARUN PMT 20041023 Added for sms chat issue
- //if ( (b->text_offset_y-fh)!=(-(b->text_height-(dh+fh)))) /*Comment this line here and have no idea why to need this line*/
- //END TARUN PMT 20041023
- {
- /* MTK Terry for In-Line Multiline Next Line Behavior */
- if ((b->text_offset_y /*-fh */ ) > (-(b->text_height - b->edit_height /* dh */ )))
- {
- b->text_offset_y -= fh;
- if (b->text_offset_y < b->edit_height - b->text_height)
- {
- b->text_offset_y = b->edit_height - b->text_height;
- }
- }
- else if (b->flags & UI_MULTI_LINE_INPUT_BOX_INSIDE_INLINE_MENU)
- {
- //Gurinder - 20/4/2004 - Use Inline Navigation Function Instead Of Noraml Text Menu
- //gui_fixed_list_menu_goto_first_item(&MMI_fixed_list_menu);
- /* MTK Terry for in line multiline read only to clear g_mmi_wgui_halfline_marquee_scroll_enable */
- if (complete_inline_item_edit)
- {
- complete_inline_item_edit();
- }
- inline_fixed_list_goto_next_item();
- hilited_item_changed = 1;
- //show_fixed_list();
- //Fix List Navigation Problem With Read Only Control - Gurinder - 3/27/2004.
- //register_fixed_list_keys();
- //End
- }
- }
- }
- else /* b->flags & UI_MULTI_LINE_INPUT_BOX_VIEW_MODE */
- {
- if (b->line_after_cursor_line_p == b->cursor_line_p)
- {
- #if defined(__MMI_INSCREEN_MULTILINE_TEXTBOX__)
- if (MMI_multi_line_inputbox_present)
- {
- //handle_inline_full_screen_edit_close();
- //Gurinder - 20/4/2004 - Use Inline Navigation Function Instead Of Noraml Text Menu
- //inline_fixed_list_goto_next_item();
- //gui_fixed_list_menu_goto_next_item(&MMI_fixed_list_menu);
- //show_fixed_list();
- hilited_item_changed = 1;
- }
- else
- #endif /* defined(__MMI_INSCREEN_MULTILINE_TEXTBOX__) */
- if (b->footer_height > 0 && (b->text_offset_y + b->text_height > b->edit_height))
- {
- b->text_offset_y -= 20;
- if (b->text_offset_y < b->edit_height - b->text_height)
- {
- b->text_offset_y = b->edit_height - b->text_height;
- }
- b->flags |= UI_MULTI_LINE_INPUT_BOX_DISABLE_DRAW;
- b->ext_flags |= GUI_MULTI_LINE_INPUT_BOX_DISABLE_FORCE_CURSOR_APPEAR;
- gui_show_multi_line_input_box(b); /* show multiline input box */
- b->flags &= ~UI_MULTI_LINE_INPUT_BOX_DISABLE_DRAW;
- b->ext_flags &=~GUI_MULTI_LINE_INPUT_BOX_DISABLE_FORCE_CURSOR_APPEAR;
- StopMyTimer(BLINKING_CURSOR);
- }
- else
- {
- UI_editor_play_tone_cannot_navigate();
- }
- return;
- }
- /* MTK Terry for Move Down by Width */
- UI_STRING_GET_NEXT_CHARACTER(b->cursor_p, dummy_c);
- gui_measure_character(dummy_c, &width, &height);
- if (UI_TEST_CR_CHARACTER(dummy_c))
- {
- width = 0;
- }
- else if (UI_TEST_LF_CHARACTER(dummy_c))
- {
- width = 0;
- }
- else if (UI_STRING_END_OF_STRING_CHARACTER(dummy_c))
- {
- width = 0;
- }
- b->cursor_x -= (width);
- p = b->cursor_p = b->line_after_cursor_line_p;
- for (i = 0; line_width <= b->cursor_x + (width >> 1); i++)
- {
- /* MTK Terry for Cursor Moving */
- b->cursor_p = p;
- if (p == b->line_after_cursor_line_last_p)
- {
- break;
- }
- UI_STRING_GET_NEXT_CHARACTER(p, dummy_c);
- #if defined(__MMI_LANG_VIETNAMESE__)
- /* MTK Terry for Cursor Move Up and Down Issue */
- if ((dummy_c > 0x0040) && (dummy_c < 0x01B1))
- {
- UI_character_type next_unicode = 0;
- viet_tone_mark tone_mark = VIET_TONE_NONE;
- viet_vowel_letter viet_vowel = VIET_VOWEL_NONE;
- UI_STRING_GET_NEXT_CHARACTER(p, next_unicode); /* get next character */
- tone_mark = mmi_viet_tone_mark(next_unicode);
- if (VIET_TONE_NONE != tone_mark)
- {
- viet_vowel = mmi_viet_vowel_letter(dummy_c);
- if (VIET_VOWEL_NONE != viet_vowel)
- {
- dummy_c = mmi_viet_combine_vowel_tone(viet_vowel, tone_mark);
- }
- else
- {
- UI_STRING_GET_PREVIOUS_CHARACTER(p, next_unicode);
- }
- }
- else
- {
- UI_STRING_GET_PREVIOUS_CHARACTER(p, next_unicode);
- }
- }
- #endif /* defined(__MMI_LANG_VIETNAMESE__) */
- gui_measure_character(dummy_c, &width, &height);
- line_width += (width + b->text_gap);
- }
- gui_multi_line_input_box_handle_icon_navigation(b);
- #if(MULTILINE_INPUTBOX_USE_CRLF_COMBINATION)
- gui_multi_line_input_box_handle_CRLF_navigation(b);
- #endif
- //hjf,force to update offset_y b->flags |= UI_MULTI_LINE_INPUT_BOX_DISABLE_DRAW;
- gui_show_multi_line_input_box(b); /* show multiline input box */
- //hjf,force to update offset_y b->flags &= ~UI_MULTI_LINE_INPUT_BOX_DISABLE_DRAW;
- }
- UI_UNUSED_PARAMETER(dummy_c);
- }
- /*****************************************************************************
- * FUNCTION
- * gui_multi_line_input_box_previous_page
- * DESCRIPTION
- * Moves the cursor to the previous page
- * PARAMETERS
- * b [IN] Is the multi-line inputbox object
- * RETURNS
- * void
- *****************************************************************************/
- void gui_multi_line_input_box_previous_page(multi_line_input_box *b)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- #ifdef __UI_PAGING_IN_MULTILINE_EDITOR__
- if (b->ext_flags & GUI_MULTI_LINE_INPUT_BOX_VIEW_PAGING_MODE)
- {
- gui_paging_multi_line_input_box_previous_page(b);
- }
- else
- {
- #endif /* __UI_PAGING_IN_MULTILINE_EDITOR__ */
- UI_UNUSED_PARAMETER(b);
- /* Feature not available */
- #ifdef __UI_PAGING_IN_MULTILINE_EDITOR__
- }
- #endif /* __UI_PAGING_IN_MULTILINE_EDITOR__ */
- }
- /*****************************************************************************
- * FUNCTION
- * gui_multi_line_input_box_next_page
- * DESCRIPTION
- * Moves the cursor to the next page
- * PARAMETERS
- * b [IN] Is the multi-line inputbox object
- * RETURNS
- * void
- *****************************************************************************/
- void gui_multi_line_input_box_next_page(multi_line_input_box *b)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- #ifdef __UI_PAGING_IN_MULTILINE_EDITOR__
- if (b->ext_flags & GUI_MULTI_LINE_INPUT_BOX_VIEW_PAGING_MODE)
- {
- gui_paging_multi_line_input_box_next_page(b);
- }
- else
- {
- #endif /* __UI_PAGING_IN_MULTILINE_EDITOR__ */
- UI_UNUSED_PARAMETER(b);
- /* Feature not available */
- #ifdef __UI_PAGING_IN_MULTILINE_EDITOR__
- }
- #endif /* __UI_PAGING_IN_MULTILINE_EDITOR__ */
- }
- #ifdef __UI_PAGING_IN_MULTILINE_EDITOR__
- /*****************************************************************************
- * FUNCTION
- * gui_paging_multi_line_input_box_previous_page
- * DESCRIPTION
- * show the previous page of the book
- * PARAMETERS
- * b [IN] Is the multi-line inputbox object
- * RETURNS
- * void
- *****************************************************************************/
- void gui_paging_multi_line_input_box_previous_page(multi_line_input_box *b)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- S32 fh;
- UI_character_type dummy_c = 0;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- gui_set_font(b->text_font);
- if (b->flags & UI_MULTI_LINE_INPUT_BOX_VIEW_MODE)
- {
- if (b->text_offset_y < 0)
- {
- fh = gui_get_character_height() + 1; /* +1 added for 1 pixel gap between lines */
- if (b->end_id == b->last_page_id && b->last_page_flag == 1)
- {
- /* prev_height=height of the text in the last page which can be a maximum of the window height.This variable is used to
- maintain the text relocation */
- b->text_offset_y += b->last_window_text_height;
- b->last_page_flag = 0;
- }
- else
- {
- b->text_offset_y += b->edit_height_displayed_lines;
- }
- if (b->text_offset_y >= -(b->page_details[PAGE_ZERO].page_height - b->edit_height_displayed_lines) &&
- b->size_of_total_data > GUI_PAGE_SIZE)
- {
- gui_paging_multi_line_input_box_get_previous_page_callback(b);
- if (b->page_details[PAGE_ZERO].page_id != 0)
- {
- b->text_offset_y -= b->page_details[PAGE_ZERO].page_height;
- /*
- * to maintain the text relocation issue we save the height of page at 0th index before a new page entry.According to
- * paging algorithm,after a new page entry ,page at 0th index will come to index 1 of the buffer.If the height of the saved value differs
- * with the height of page at index 1 then this condition will be tested
- */
- b->page_details[PAGE_ZERO].page_id = b->start_id;
- if (b->page_zero_prev_height != b->page_details[PAGE_ONE].page_height)
- {
- b->text_offset_y -= fh;
- }
- }
- }
- if (b->text_offset_y > 0)
- {
- b->text_offset_y = 0;
- }
- }
- }
- UI_UNUSED_PARAMETER(dummy_c);
- }
- /*****************************************************************************
- * FUNCTION
- * gui_paging_multi_line_input_box_next_page
- * DESCRIPTION
- * show the next page of the book
- * PARAMETERS
- * b [IN] Is the multi-line inputbox object
- * RETURNS
- * void
- *****************************************************************************/
- void gui_paging_multi_line_input_box_next_page(multi_line_input_box *b)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- S32 fh;
- UI_character_type dummy_c = 0;
- /* static S32 percentage_offset = 0; */
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- gui_set_font(b->text_font);
- if (b->flags & UI_MULTI_LINE_INPUT_BOX_VIEW_MODE)
- {
- fh = gui_get_character_height() + 1; /* +1 added for 1 pixel gap between lines */
- if (fh <= 0)
- {
- fh = 1;
- }
- if ((b->text_offset_y) > (-(b->text_height - b->edit_height)))
- {
- b->text_offset_y -= b->edit_height_displayed_lines; /* ritesh */
- if (b->text_offset_y <=
- -(b->page_details[PAGE_ZERO].page_height + b->page_details[PAGE_ONE].page_height +
- b->page_details[PAGE_TWO].page_height - b->edit_height_displayed_lines))
- {
- if (b->end_id < b->last_page_id)
- {
- b->text_offset_y += b->page_details[PAGE_ZERO].page_height;
- gui_paging_multi_line_input_box_get_next_page_callback(b);
- }
- else
- {
- if (b->text_offset_y - b->edit_height_displayed_lines < -b->text_height && b->last_page_flag == 0)
- {
- b->last_window_text_height = b->text_height + b->text_offset_y;
- b->last_page_flag = 1;
- }
- }
- }
- if (b->text_offset_y < b->edit_height - b->text_height)
- {
- b->text_offset_y = b->edit_height_displayed_lines - b->text_height;
- }
- }
- }
- UI_UNUSED_PARAMETER(dummy_c);
- }
- /*****************************************************************************
- * FUNCTION
- * gui_paging_multi_line_input_box_next_line_in_paging
- * DESCRIPTION
- * show the next line of current page
- * PARAMETERS
- * b [IN] Is the multi-line inputbox object
- * RETURNS
- * void
- *****************************************************************************/
- void gui_paging_multi_line_input_box_next_line_in_paging(multi_line_input_box *b)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- S32 fh;
- UI_character_type dummy_c = 0;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- gui_set_font(b->text_font);
- if (b->flags & UI_MULTI_LINE_INPUT_BOX_VIEW_MODE)
- {
- fh = gui_get_character_height() + 1; /* +1 added for 1 pixel gap between lines */
- if (fh <= 0)
- {
- fh = 1;
- }
- if ((b->text_offset_y) > (-(b->text_height - b->edit_height)))
- {
- if (b->ext_flags & GUI_MULTI_LINE_INPUT_BOX_AUTO_SCROLL_MODE && b->scroll_speed != 0 &&
- b->next_line_scroll_flag == 0)
- {
- b->text_offset_y -= (fh * b->scroll_speed) / GUI_SCROLL_STEPS_LINE_BY_LINE; /* ritesh */
- }
- else
- {
- b->text_offset_y -= fh;
- b->next_line_scroll_flag = 0;
- }
- /* if text_offset_y reaches to the height of last page - currently dispalyed height then we need next page */
- if (b->text_offset_y <=
- -(b->page_details[PAGE_ZERO].page_height + b->page_details[PAGE_ONE].page_height +
- b->page_details[PAGE_TWO].page_height - b->edit_height_displayed_lines))
- {
- if (b->end_id <= b->last_page_id - 1)
- {
- b->text_offset_y += b->page_details[PAGE_ZERO].page_height;
- gui_paging_multi_line_input_box_get_next_page_callback(b);
- }
- }
- if (b->text_offset_y < b->edit_height - b->text_height)
- {
- b->text_offset_y = b->edit_height - b->text_height;
- }
- }
- }
- UI_UNUSED_PARAMETER(dummy_c);
- }
- /*****************************************************************************
- * FUNCTION
- * gui_paging_multi_line_input_box_previous_line_in_paging
- * DESCRIPTION
- * show the previous line of current page
- * PARAMETERS
- * b [IN] Is the multi-line inputbox object
- * RETURNS
- * void
- *****************************************************************************/
- void gui_paging_multi_line_input_box_previous_line_in_paging(multi_line_input_box *b)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- S32 fh;
- UI_character_type dummy_c = 0;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- gui_set_font(b->text_font);
- if (b->flags & UI_MULTI_LINE_INPUT_BOX_VIEW_MODE)
- {
- if (b->text_offset_y < 0)
- {
- fh = gui_get_character_height() + 1; /* +1 added for 1 pixel gap between lines */
- b->text_offset_y += fh;
- if (b->text_offset_y >= -(b->page_details[PAGE_ZERO].page_height - b->edit_height_displayed_lines)) /* if text_offset_y reaches to height of page at 0th index */
- {
- gui_paging_multi_line_input_box_get_previous_page_callback(b);
- if (b->page_details[0].page_id != PAGE_ZERO)
- {
- b->text_offset_y -= b->page_details[PAGE_ZERO].page_height;
- b->page_details[PAGE_ZERO].page_id = b->start_id;
- /*
- * to maintain the text relocation issue we save the height of page at 0th index before a new page entry.According to
- * paging algorithm,after a new page entry ,page at 0th index will come to index 1 of the buffer.If the height of the saved value differs
- * with the height of page at index 1 then this condition will be tested
- */
- if (b->page_zero_prev_height != b->page_details[PAGE_ONE].page_height)
- {
- b->text_offset_y -= fh;
- }
- }
- }
- if (b->text_offset_y > 0)
- {
- b->text_offset_y = 0;
- }
- }
- }
- UI_UNUSED_PARAMETER(dummy_c);
- }
- #endif /* __UI_PAGING_IN_MULTILINE_EDITOR__ */
- /*****************************************************************************
- * FUNCTION
- * gui_multi_line_input_box_toggle_insert_mode
- * DESCRIPTION
- * Toggles between Insert and Overwrite modes
- * PARAMETERS
- * b [IN] Is the multi-line inputbox object
- * RETURNS
- * void
- *****************************************************************************/
- void gui_multi_line_input_box_toggle_insert_mode(multi_line_input_box *b)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- if (b->flags & UI_MULTI_LINE_INPUT_BOX_OVERWRITE_MODE)
- {
- b->flags &= ~UI_MULTI_LINE_INPUT_BOX_OVERWRITE_MODE;
- }
- else
- {
- b->flags |= UI_MULTI_LINE_INPUT_BOX_OVERWRITE_MODE;
- }
- }
- /*****************************************************************************
- * FUNCTION
- * gui_multi_line_input_box_highlight_cursor_end
- * DESCRIPTION
- *
- * PARAMETERS
- * b [IN] Is the multi-line inputbox object
- * RETURNS
- * void
- *****************************************************************************/
- S32 gui_multi_line_input_box_highlight_cursor_end(multi_line_input_box *b)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- UI_buffer_type saved_current_position = b->cursor_p;
- UI_buffer_type current_position = b->cursor_p;
- UI_buffer_type previous_position;
- UI_buffer_type last_position_p = b->last_position_p;
- U8 done = 0, bflag;
- UI_character_type current_character;
- S32 count = 0;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- UI_STRING_GET_PREVIOUS_CHARACTER(last_position_p, current_character);
- /* Move cursor backwards until a break character is encountered */
- while (!done)
- {
- previous_position = current_position;
- if (current_position == b->text)
- {
- break;
- }
- UI_STRING_GET_PREVIOUS_CHARACTER(current_position, current_character);
- count++;
- UI_MULTI_LINE_INPUT_BOX_BREAK_CHARACTER(current_character, bflag);
- if (bflag)
- {
- break;
- }
- }
- b->highlight_start_position = previous_position;
- current_position = saved_current_position;
- /* Move cursor forwards until a break character is encountered */
- if (current_position >= last_position_p)
- {
- done = 1;
- b->flags &= ~UI_MULTI_LINE_INPUT_BOX_WORD_HIGHLIGHT;
- }
- else
- {
- UI_STRING_GET_NEXT_CHARACTER(current_position, current_character);
- UI_STRING_GET_PREVIOUS_CHARACTER(current_position, current_character);
- UI_MULTI_LINE_INPUT_BOX_BREAK_CHARACTER(current_character, bflag);
- if (bflag)
- {
- done = 1;
- b->flags &= ~UI_MULTI_LINE_INPUT_BOX_WORD_HIGHLIGHT;
- }
- else
- {
- done = 0;
- b->flags |= UI_MULTI_LINE_INPUT_BOX_WORD_HIGHLIGHT;
- }
- }
- while (!done)
- {
- if (current_position >= last_position_p)
- {
- break;
- }
- UI_STRING_GET_NEXT_CHARACTER(current_position, current_character);
- count++;
- UI_MULTI_LINE_INPUT_BOX_BREAK_CHARACTER(current_character, bflag);
- if (bflag)
- {
- UI_STRING_GET_PREVIOUS_CHARACTER(current_position, current_character);
- break;
- }
- }
- b->highlight_end_position = current_position;
- b->cursor_p = current_position;
- b->flags |= UI_MULTI_LINE_INPUT_BOX_DISABLE_DRAW;
- gui_show_multi_line_input_box(b);
- b->flags &= ~UI_MULTI_LINE_INPUT_BOX_DISABLE_DRAW;
- return (count);
- }
- /*****************************************************************************
- * FUNCTION
- * gui_multi_line_input_box_highlight_cursor_start
- * DESCRIPTION
- *
- * PARAMETERS
- * b [IN] Is the multi-line inputbox object
- * RETURNS
- * S32
- *****************************************************************************/
- S32 gui_multi_line_input_box_highlight_cursor_start(multi_line_input_box *b)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- UI_buffer_type saved_current_position = b->cursor_p;
- UI_buffer_type current_position = b->cursor_p;
- UI_buffer_type previous_position;
- UI_buffer_type last_position_p = b->last_position_p;
- U8 done = 0, bflag;
- UI_character_type current_character;
- S32 count = 0;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- if (current_position == b->text)
- {
- b->flags &= ~UI_MULTI_LINE_INPUT_BOX_WORD_HIGHLIGHT;
- return (0);
- }
- UI_STRING_GET_PREVIOUS_CHARACTER(current_position, current_character);
- /* Move cursor forwards until a break character is encountered */
- while (!done)
- {
- if (current_position >= last_position_p)
- {
- break;
- }
- UI_STRING_GET_NEXT_CHARACTER(current_position, current_character);
- count++;
- UI_MULTI_LINE_INPUT_BOX_BREAK_CHARACTER(current_character, bflag);
- if (bflag)
- {
- UI_STRING_GET_PREVIOUS_CHARACTER(current_position, current_character);
- break;
- }
- }
- b->highlight_end_position = current_position;
- current_position = saved_current_position;
- /* Move cursor backwards until a break character is encountered */
- if (current_position == b->text)
- {
- b->flags &= ~UI_MULTI_LINE_INPUT_BOX_WORD_HIGHLIGHT;
- return (0);
- }
- UI_STRING_GET_PREVIOUS_CHARACTER(current_position, current_character);
- UI_MULTI_LINE_INPUT_BOX_BREAK_CHARACTER(current_character, bflag);
- if (bflag)
- {
- UI_STRING_GET_NEXT_CHARACTER(current_position, current_character);
- b->flags &= ~UI_MULTI_LINE_INPUT_BOX_WORD_HIGHLIGHT;
- return (0);
- }
- else
- {
- done = 0;
- b->flags |= UI_MULTI_LINE_INPUT_BOX_WORD_HIGHLIGHT;
- }
- while (!done)
- {
- previous_position = current_position;
- if (current_position == b->text)
- {
- break;
- }
- UI_STRING_GET_PREVIOUS_CHARACTER(current_position, current_character);
- count++;
- UI_MULTI_LINE_INPUT_BOX_BREAK_CHARACTER(current_character, bflag);
- if (bflag)
- {
- break;
- }
- }
- b->highlight_start_position = previous_position;
- b->cursor_p = previous_position;
- b->flags |= UI_MULTI_LINE_INPUT_BOX_DISABLE_DRAW;
- gui_show_multi_line_input_box(b);
- b->flags &= ~UI_MULTI_LINE_INPUT_BOX_DISABLE_DRAW;
- return (count);
- }
- /*****************************************************************************
- * FUNCTION
- * gui_multi_line_input_box_highlight_cursor_number
- * DESCRIPTION
- *
- * PARAMETERS
- * b [IN] Is the multi-line inputbox object
- * n [IN]
- * RETURNS
- * S32
- *****************************************************************************/
- S32 gui_multi_line_input_box_highlight_cursor_number(multi_line_input_box *b, S32 n)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- UI_buffer_type saved_current_position = b->cursor_p;
- UI_buffer_type current_position = b->cursor_p;
- UI_buffer_type previous_position;
- U8 done = 0, bflag = 0;
- UI_character_type current_character;
- S32 count = 0;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- if (current_position == b->text)
- {
- b->flags &= ~UI_MULTI_LINE_INPUT_BOX_WORD_HIGHLIGHT;
- return (0);
- }
- b->highlight_end_position = current_position;
- /* Move cursor backwards until n characters count out or a break character is encountered */
- while (!done)
- {
- previous_position = current_position;
- if (n <= 0)
- {
- break;
- }
- if (current_position <= b->text)
- {
- break;
- }
- UI_STRING_GET_PREVIOUS_CHARACTER(current_position, current_character);
- UI_MULTI_LINE_INPUT_BOX_BREAK_CHARACTER(current_character, bflag) if (bflag)
- {
- break;
- }
- count++;
- n--;
- }
- b->highlight_start_position = previous_position;
- b->cursor_p = saved_current_position;
- if (current_position == b->cursor_p)
- {
- b->flags &= ~UI_MULTI_LINE_INPUT_BOX_WORD_HIGHLIGHT;
- }
- else if (!(bflag && (count == 0)))
- {
- b->flags |= UI_MULTI_LINE_INPUT_BOX_WORD_HIGHLIGHT;
- }
- b->highlight_start_position = previous_position;
- if (b->show_action_flag)
- {
- gui_show_multi_line_input_box(b);
- }
- b->flags &= ~UI_MULTI_LINE_INPUT_BOX_DISABLE_DRAW;
- return (count);
- }
- /* GUI: dialer input box functions */
- UI_dialer_input_box_theme *current_dialer_input_box_theme = NULL;
- /*****************************************************************************
- * FUNCTION
- * gui_set_dialer_input_box_current_theme
- * DESCRIPTION
- * Applies the current theme for the single-line inputbox.
- * PARAMETERS
- * b [IN] Is the single-line inputbox object
- * RETURNS
- * void
- *****************************************************************************/
- void gui_set_dialer_input_box_current_theme(dialer_input_box *b)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- b->text_color = current_dialer_input_box_theme->normal_text_color;
- b->background_filler = current_dialer_input_box_theme->normal_filler;
- b->selection_color = current_dialer_input_box_theme->selection_color;
- b->selection_text_color = current_dialer_input_box_theme->selection_text_color;
- b->cursor_color = current_dialer_input_box_theme->cursor_color;
- b->text_font = current_dialer_input_box_theme->text_font;
- b->text_gap = current_dialer_input_box_theme->text_gap;
- b->flags |= current_dialer_input_box_theme->flags;
- }
- /*****************************************************************************
- * FUNCTION
- * gui_set_dialer_input_box_theme
- * DESCRIPTION
- * Applies the given theme to the single-line inputbox.
- * PARAMETERS
- * b [IN] Is the single-line inputbox object
- * t [?]
- * RETURNS
- * void
- *****************************************************************************/
- void gui_set_dialer_input_box_theme(dialer_input_box *b, UI_dialer_input_box_theme *t)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- b->text_color = t->normal_text_color;
- b->background_filler = t->normal_filler;
- b->selection_color = t->selection_color;
- b->selection_text_color = t->selection_text_color;
- b->cursor_color = t->cursor_color;
- b->text_font = t->text_font;
- b->text_gap = t->text_gap;
- b->flags |= t->flags;
- }
- /*****************************************************************************
- * FUNCTION
- * gui_dialer_input_box_clear
- * DESCRIPTION
- * Initilaize dialer input box to defualtr
- * PARAMETERS
- * b [IN] Is the dialer inputbox object
- * RETURNS
- * void
- *****************************************************************************/
- void gui_dialer_input_box_clear(dialer_input_box *b)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- if (b->text == NULL)
- {
- b->text_length = 0;
- b->allocated_length = 0;
- b->available_length = 0;
- }
- else
- {
- b->text[0] = ' ';
- b->text[1] = 0;
- b->text_length = 2;
- }
- b->current_text_p = b->text;
- b->last_position_p = b->text;
- b->UCS2_count = 0;
- if (b->flags & UI_DIALER_INPUT_BOX_USE_ENCODING_BASED_LENGTH)
- {
- b->available_length = b->allocated_length;
- }
- }
- /*****************************************************************************
- * FUNCTION
- * gui_create_dialer_input_box
- * DESCRIPTION
- * Creates a single line input box
- *
- * The object should be allocated before calling this function.
- * The buffer is automatically allocated by the inputbox.
- * The buffer is set to blank on creation of this object.
- * See also gui_destroy_dialer_input_box()
- * PARAMETERS
- * b [IN] Is the single-line inputbox object (pre-allocated)
- * x [IN] Is the left-top corner
- * y [IN] Is the left-top corner
- * width [IN] Is the width of the inputbox
- * height [IN] Is the height of the inputbox
- * length [IN] Is the length of the buffer to use
- * RETURNS
- * void
- *****************************************************************************/
- void gui_create_dialer_input_box(dialer_input_box *b, S32 x, S32 y, S32 width, S32 height, S32 length)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- b->x = x;
- b->y = y;
- b->width = width;
- b->height = height;
- b->text = (UI_buffer_type) gui_malloc(length * sizeof(UI_character_type));
- b->allocated_length = length;
- b->available_length = length;
- gui_dialer_input_box_clear(b);
- b->current_text_p = b->text;
- b->flags = 0;
- gui_set_dialer_input_box_current_theme(b);
- b->validation_callback = UI_dummy_validation_function;
- b->overflow_callback = UI_dummy_function;
- b->change_callback = UI_dummy_function;
- b->UCS2_count = 0;
- }
- /*****************************************************************************
- * FUNCTION
- * gui_create_dialer_input_box_use_buffer
- * DESCRIPTION
- * Creates a single line input box
- *
- * The object should be allocated before calling this function.
- * Also, the buffer should be allocated and passed to this function.
- * The buffer is set to blank on creation of this object.
- * PARAMETERS
- * b [IN] Is the single-line inputbox object (pre-allocated)
- * x [IN] Is the left-top corner
- * y [IN] Is the left-top corner
- * width [IN] Is the width of the inputbox
- * height [IN] Is the height of the inputbox
- * buffer [IN] Is the buffer the inputbox should use (pre-allocated)
- * length [IN] Is the length of the buffer
- * RETURNS
- * void
- *****************************************************************************/
- void gui_create_dialer_input_box_use_buffer(
- dialer_input_box *b,
- S32 x,
- S32 y,
- S32 width,
- S32 height,
- UI_string_type buffer,
- S32 length)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- b->x = x;
- b->y = y;
- b->width = width;
- b->height = height;
- b->text = (UI_buffer_type) buffer;
- b->allocated_length = length;
- b->available_length = length;
- b->flags = 0;
- gui_dialer_input_box_clear(b);
- b->current_text_p = b->text;
- gui_set_dialer_input_box_current_theme(b);
- b->overflow_callback = UI_dummy_function;
- b->change_callback = UI_dummy_function;
- b->validation_callback = UI_dummy_validation_function;
- b->UCS2_count = 0;
- }
- /*****************************************************************************
- * FUNCTION
- * gui_create_dialer_input_box_set_buffer
- * DESCRIPTION
- * Creates a single line input box
- *
- * The object should be allocated before calling this function.
- * Also, the buffer should be allocated and passed to this function.
- * The buffer retains the string passed.
- * PARAMETERS
- * b [IN] Is the single-line inputbox object (pre-allocated)
- * x [IN] Is the left-top corner
- * y [IN] Is the left-top corner
- * width [IN] Is the width of the inputbox
- * height [IN] Is the height of the inputbox
- * buffer [IN] Is the buffer the inputbox should use (pre-allocated)
- * length [IN] Is the length of the buffer
- * text_length [IN]
- * edit_position [IN] Is the cursor_position
- * RETURNS
- * void
- *****************************************************************************/
- void gui_create_dialer_input_box_set_buffer(
- dialer_input_box *b,
- S32 x,
- S32 y,
- S32 width,
- S32 height,
- UI_string_type buffer,
- S32 length,
- S32 text_length,
- S32 edit_position)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- UI_character_type dummy_c = 0;
- UI_buffer_type text;
- S32 i;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- b->x = x;
- b->y = y;
- b->width = width;
- b->height = height;
- b->text = (UI_buffer_type) buffer;
- b->current_text_p = b->text;
- b->allocated_length = length;
- b->available_length = length;
- b->UCS2_count = 0;
- if (b->text != NULL)
- {
- text = b->text;
- for (i = 0; i < edit_position; i++)
- {
- UI_STRING_GET_NEXT_CHARACTER(text, dummy_c);
- UI_TEST_UCS2_INCREMENT_COUNT(dummy_c, b->UCS2_count);
- if (UI_STRING_END_OF_STRING_CHARACTER(dummy_c))
- {
- break;
- }
- }
- b->current_text_p = text;
- for (i = edit_position; !UI_STRING_END_OF_STRING_CHARACTER(dummy_c); i++)
- {
- UI_STRING_GET_NEXT_CHARACTER(text, dummy_c);
- UI_TEST_UCS2_INCREMENT_COUNT(dummy_c, b->UCS2_count);
- }
- b->text_length = text_length;
- b->last_position_p = b->current_text_p;
- }
- else /* b->text!=NULL */
- {
- b->text_length = 0;
- }
- b->flags = 0;
- gui_set_dialer_input_box_current_theme(b);
- b->overflow_callback = UI_dummy_function;
- b->change_callback = UI_dummy_function;
- b->validation_callback = UI_dummy_validation_function;
- }
- /*****************************************************************************
- * FUNCTION
- * gui_move_dialer_input_box
- * DESCRIPTION
- * Moves a single line input box
- * PARAMETERS
- * b [IN] Is the single-line inputbox object (pre-allocated)
- * x [IN] Is the left-top corner
- * y [IN] Is the left-top corner
- * RETURNS
- * void
- *****************************************************************************/
- void gui_move_dialer_input_box(dialer_input_box *b, S32 x, S32 y)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- b->x = x;
- b->y = y;
- }
- /*****************************************************************************
- * FUNCTION
- * gui_dialer_input_box_show_cursor
- * DESCRIPTION
- * Displays the cursor in a single-line inputbox (internal function)
- *
- * This function is used internally.
- * PARAMETERS
- * b [IN] Is the single-line inputbox object
- * x [IN] Is the left-top corner of the cursor
- * y [IN] Is the left-top corner of the cursor
- * height [IN] Is the height of cursor
- * RETURNS
- * void
- *****************************************************************************/
- void gui_dialer_input_box_show_cursor(dialer_input_box *b, S32 x, S32 y, S32 height)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- color c = b->cursor_color;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- #if(UI_BLINKING_CURSOR_SUPPORT)
- UI_inputbox_show_cursor(x, y, x + 1, y + height - 1, c);
- #else
- gui_fill_rectangle(x, y, x + 1, y + height - 1, c);
- #endif
- }
- /* MTK Elvis for color dialing font */
- /*****************************************************************************
- * FUNCTION
- * gui_get_dialing_font_color
- * DESCRIPTION
- * get dialing font color
- * PARAMETERS
- * c [IN] Is the single-line inputbox object
- * RETURNS
- * color
- *****************************************************************************/
- color gui_get_dialing_font_color(UI_character_type c)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- U32 nIdx;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- for (nIdx = 0; color_dialing_font_map[nIdx].ch; nIdx++)
- {
- if (color_dialing_font_map[nIdx].ch == c)
- {
- return color_dialing_font_map[nIdx].c;
- }
- }
- return color_dialing_font_map[nIdx].c;
- }
- /* MTK end */
- /*****************************************************************************
- * FUNCTION
- * gui_show_dialer_input_box
- * DESCRIPTION
- * Displays a single-line inputbox
- * PARAMETERS
- * b [IN] Is the single-line inputbox object
- * RETURNS
- * void
- *****************************************************************************/
- void gui_show_dialer_input_box(dialer_input_box *b)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- gui_show_dialer_input_box_ext(b, (-1), (-1));
- }
- /*****************************************************************************
- * FUNCTION
- * gui_show_dialer_input_box_ext
- * DESCRIPTION
- *
- * PARAMETERS
- * b [?]
- * move_to_x [IN]
- * move_to_y [IN]
- * RETURNS
- * void
- *****************************************************************************/
- void gui_show_dialer_input_box_ext(dialer_input_box *b, S32 move_to_x, S32 move_to_y)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- S32 x1, y1, x2, y2;
- UI_filled_area *f = b->background_filler;
- U8 selection_flag = 0;
- #if(0)
- byte overwrite_mode_flag=0;
- #endif /* (0) */
- UI_character_type current_character;
- S32 character_width = 0;
- UI_buffer_type previous_text_p;
- UI_buffer_type current_text_p = b->text;
- U32 flags = b->flags;
- S32 text_x, text_y, character_height;
- U8 cursor_displayed_flag = 0;
- U8 cusrsor_set_flag = 0;
- S32 text_gap = b->text_gap;
- color b_normal_text_color = b->text_color;
- color b_selection_text_color = b->selection_text_color;
- color b_selection_color = b->selection_color;
- /* UI_character_type mask_character=b->mask_character; */
- UI_buffer_type b_current_text_p = b->current_text_p;
- UI_buffer_type b_text = b->text;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- x1 = b->x;
- y1 = b->y;
- x2 = x1 + b->width - 1;
- y2 = y1 + b->height - 1;
- gui_set_clip(x1, y1, x2, y2);
- gui_draw_filled_area(x1, y1, x2, y2, f);
- gui_set_text_clip(x1, y1, x2, y2);
- gui_set_font(b->text_font);
- if (current_text_p != NULL)
- {
- if (flags & UI_DIALER_INPUT_BOX_STATE_MULTITAP)
- {
- selection_flag = 1;
- }
- #if(0)
- if((flags & UI_DIALER_INPUT_BOX_OVERWRITE_MODE) && (!selection_flag))
- {
- overwrite_mode_flag=1;
- }
- #endif /* (0) */
- character_height = gui_get_character_height();
- current_character = (UI_character_type) - 1;
- #if(0)
- while(!UI_STRING_END_OF_STRING_CHARACTER(current_character))
- {
- UI_STRING_GET_NEXT_CHARACTER(current_text_p,current_character);
- }
- UI_STRING_GET_PREVIOUS_CHARACTER(current_text_p,current_character);
- b->last_position_p=current_text_p;
- #else /* (0) */
- current_text_p = b->last_position_p;
- #endif /* (0) */
- text_x = x2 - 4;
- /* start vijay 20050228, for touch dial screen */
- #if( defined(__MMI_TOUCH_DIAL_SCREEN__))
- text_y = y2 - character_height + 2;
- #else
- text_y = y2 - character_height - 2; /* previous implementation */
- #endif
- /* end vijay */
- if (b_text != current_text_p)
- {
- gui_set_text_color(b_normal_text_color);
- while (current_text_p != b_text)
- {
- previous_text_p = current_text_p;
- UI_STRING_GET_PREVIOUS_CHARACTER(current_text_p, current_character);
- character_width = gui_get_character_width(current_character);
- if ((text_x - (character_width + text_gap)) < x1)
- {
- b->n_lines++; /* vandana */
- text_x = x2 - 4;
- text_y -= character_height;
- if (text_y < y1)
- {
- break;
- }
- }
- if ((-1) == move_to_x && (-1) == move_to_y)
- {
- if (previous_text_p == b_current_text_p)
- {
- if (selection_flag)
- {
- text_x -= (character_width + text_gap);
- gui_fill_rectangle(
- text_x,
- text_y - 1,
- text_x + character_width,
- text_y + character_height,
- b_selection_color);
- gui_set_text_color(b_selection_text_color);
- /* MTK Elvis for R2L characters */
- if (r2lMMIFlag)
- {
- gui_move_text_cursor(text_x + character_width, text_y);
- }
- else
- {
- gui_move_text_cursor(text_x, text_y);
- }
- /* MTK end */
- gui_print_character(current_character);
- gui_set_text_color(b_normal_text_color);
- cursor_displayed_flag = 1;
- }
- else
- {
- if (!cursor_displayed_flag)
- {
- if (!(flags & UI_DIALER_INPUT_BOX_DISABLE_DRAW) &&
- !(flags & UI_DIALER_INPUT_BOX_DISABLE_CURSOR_DRAW))
- {
- if (flags & UI_DIALER_INPUT_BOX_SHOW_BLOCK_CURSOR)
- {
- gui_fill_rectangle(
- text_x,
- text_y - 1,
- text_x + character_width,
- text_y + character_height,
- b_selection_color);
- }
- else
- {
- gui_dialer_input_box_show_cursor(b, text_x - 1, text_y - 1, character_height);
- b->cursor_x = (text_x - 1);
- b->cursor_y = (text_y - 1);
- }
- }
- cursor_displayed_flag = 1;
- }
- text_x -= (character_width + text_gap);
- /* MTK Elvis for R2L characters */
- if (r2lMMIFlag)
- {
- gui_move_text_cursor(text_x + character_width, text_y);
- }
- else
- {
- gui_move_text_cursor(text_x, text_y);
- }
- //MTK end
- //MTK Elvis for color dialling font
- #ifdef __MMI_COLOR_DIALLING_FONT__
- gui_set_text_color(gui_get_dialing_font_color(current_character));
- #endif
- /* MTK end */
- gui_print_character(current_character);
- }
- }
- #if(0)
- else if(overwrite_mode_flag && (current_text_p==b_current_text_p))
- {
- text_x-=(character_width+text_gap);
- pixtel_UI_fill_rectangle(text_x,text_y-1,text_x+character_width,text_y+character_height,b_selection_color);
- pixtel_UI_set_text_color(b_selection_text_color);
- pixtel_UI_move_text_cursor(text_x,text_y);
- pixtel_UI_print_character(current_character);
- pixtel_UI_set_text_color(b_normal_text_color);
- cursor_displayed_flag=1;
- }
- #endif /* (0) */
- else /* previous_text_p==b_current_text_p */
- {
- text_x -= (character_width + text_gap);
- /* MTK Elvis for R2L characters */
- if (r2lMMIFlag)
- {
- gui_move_text_cursor(text_x + character_width, text_y);
- }
- else
- {
- gui_move_text_cursor(text_x, text_y);
- }
- /* MTK end */
- /* MTK Elvis for color dialling font */
- #ifdef __MMI_COLOR_DIALLING_FONT__
- gui_set_text_color(gui_get_dialing_font_color(current_character));
- #endif
- /* MTK end */
- gui_print_character(current_character);
- }
- }
- else /* (-1) == move_to_x && (-1) == move_to_y */
- {
- text_x -= (character_width + text_gap);
- if (((text_x) < move_to_x) && ((text_y + character_height) >= move_to_y) && (text_y < move_to_y) &&
- (!cusrsor_set_flag))
- {
- b->cursor_x = text_x - 1;
- b->cursor_y = text_y - 1;
- b->current_text_p = previous_text_p;
- cusrsor_set_flag = 1;
- }
- }
- }
- }
- if (!cursor_displayed_flag && ((-1) == move_to_x) && ((-1) == move_to_y))
- {
- if (!(flags & UI_DIALER_INPUT_BOX_DISABLE_DRAW) && !(flags & UI_DIALER_INPUT_BOX_DISABLE_CURSOR_DRAW))
- {
- if (flags & UI_DIALER_INPUT_BOX_SHOW_BLOCK_CURSOR)
- {
- gui_fill_rectangle(
- text_x,
- text_y - 1,
- text_x + character_width,
- text_y + character_height,
- b_selection_color);
- }
- else
- {
- gui_dialer_input_box_show_cursor(b, text_x - 1, text_y - 1, character_height);
- b->cursor_x = (text_x - 1);
- b->cursor_y = (text_y - 1);
- }
- }
- }
- if ((((-1) != move_to_x) || ((-1) != move_to_y)) && (!cusrsor_set_flag))
- {
- b->cursor_x = text_x - 1;
- b->cursor_y = text_y - 1;
- b->current_text_p = current_text_p;
- cusrsor_set_flag = 1;
- }
- }
- }
- /*****************************************************************************
- * FUNCTION
- * gui_destroy_dialer_input_box
- * DESCRIPTION
- * frees the buffer allocated for the box and resets the input box
- *
- * This doesn't free the single-line inputbox object. It only
- * frees the buffer that is used to store the text.
- * PARAMETERS
- * b [IN] Is the single-line inputbox object
- * RETURNS
- * void
- *****************************************************************************/
- void gui_destroy_dialer_input_box(dialer_input_box *b)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- b->text_length = 0;
- b->allocated_length = 0;
- b->available_length = 0;
- b->UCS2_count = 0;
- gui_free(b->text);
- b->current_text_p = b->text;
- }
- /*****************************************************************************
- * FUNCTION
- * gui_dialer_inputbox_locate_cursor
- * DESCRIPTION
- * locate cursor positin of dialer input box
- *
- * This doesn't free the single-line inputbox object. It only
- * frees the buffer that is used to store the text.
- * PARAMETERS
- * b [IN] Is the dialer inputbox object
- * RETURNS
- * void
- *****************************************************************************/
- void gui_dialer_inputbox_locate_cursor(dialer_input_box *b)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- UI_character_type c = (UI_character_type) - 1;
- UI_buffer_type current_text_p = b->text;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- while (!UI_STRING_END_OF_STRING_CHARACTER(c))
- {
- UI_STRING_GET_NEXT_CHARACTER(current_text_p, c);
- }
- b->last_position_p = current_text_p;
- }
- /*****************************************************************************
- * FUNCTION
- * gui_dialer_input_box_delete_character
- * DESCRIPTION
- * Deletes a character before the current cursor position (Backspace)
- * PARAMETERS
- * b [IN] Is the single-line inputbox object
- * RETURNS