1 /**************************************************************************/ 2 /* */ 3 /* Copyright (c) Microsoft Corporation. All rights reserved. */ 4 /* */ 5 /* This software is licensed under the Microsoft Software License */ 6 /* Terms for Microsoft Azure RTOS. Full text of the license can be */ 7 /* found in the LICENSE file at https://aka.ms/AzureRTOS_EULA */ 8 /* and in the root directory of this software. */ 9 /* */ 10 /**************************************************************************/ 11 12 13 /**************************************************************************/ 14 /**************************************************************************/ 15 /** */ 16 /** GUIX Component */ 17 /** */ 18 /** Multi Line Text View Management (Multi Line Text View) */ 19 /** */ 20 /**************************************************************************/ 21 22 #define GX_SOURCE_CODE 23 24 25 /* Include necessary system files. */ 26 27 #include "gx_api.h" 28 #include "gx_system.h" 29 #include "gx_multi_line_text_view.h" 30 #include "gx_scrollbar.h" 31 #include "gx_window.h" 32 33 /**************************************************************************/ 34 /* */ 35 /* FUNCTION RELEASE */ 36 /* */ 37 /* _gx_multi_line_text_view_whitespace_set PORTABLE C */ 38 /* 6.1 */ 39 /* AUTHOR */ 40 /* */ 41 /* Kenneth Maxwell, Microsoft Corporation */ 42 /* */ 43 /* DESCRIPTION */ 44 /* */ 45 /* This function sets whitespace for a multi line text view widget. */ 46 /* */ 47 /* INPUT */ 48 /* */ 49 /* text_view Multi-line text view widget */ 50 /* control block */ 51 /* whitespace Value to set */ 52 /* */ 53 /* OUTPUT */ 54 /* */ 55 /* status Completion status */ 56 /* */ 57 /* CALLS */ 58 /* */ 59 /* _gx_multi_line_text_view_string_total_rows_compute */ 60 /* Calculate total rows of */ 61 /* text view text */ 62 /* _gx_window_scrollbar_find Find scrollbar for a window */ 63 /* _gx_scrollbar_reset Reset scrollbar information */ 64 /* _gx_multi_line_text_view_line_cache_update */ 65 /* Update line cache */ 66 /* _gx_system_dirty_mark Mark the widget dirty */ 67 /* _gx_system_event_fold Fold a event */ 68 /* */ 69 /* CALLED BY */ 70 /* */ 71 /* Application Code */ 72 /* */ 73 /* RELEASE HISTORY */ 74 /* */ 75 /* DATE NAME DESCRIPTION */ 76 /* */ 77 /* 05-19-2020 Kenneth Maxwell Initial Version 6.0 */ 78 /* 09-30-2020 Kenneth Maxwell Modified comment(s), */ 79 /* resulting in version 6.1 */ 80 /* */ 81 /**************************************************************************/ _gx_multi_line_text_view_whitespace_set(GX_MULTI_LINE_TEXT_VIEW * text_view,GX_UBYTE whitespace)82UINT _gx_multi_line_text_view_whitespace_set(GX_MULTI_LINE_TEXT_VIEW *text_view, GX_UBYTE whitespace) 83 { 84 GX_EVENT newevent; 85 86 text_view -> gx_multi_line_text_view_whitespace = whitespace; 87 text_view -> gx_multi_line_text_view_line_index_old = GX_TRUE; 88 89 if (text_view -> gx_widget_status & GX_STATUS_VISIBLE) 90 { 91 memset(&newevent, 0, sizeof(GX_EVENT)); 92 newevent.gx_event_type = GX_EVENT_CLIENT_UPDATED; 93 newevent.gx_event_target = (GX_WIDGET *)text_view; 94 _gx_system_event_fold(&newevent); 95 } 96 97 return(GX_SUCCESS); 98 } 99 100